Page MenuHomePhabricator

evas gl: recover current program state.
ClosedPublic

Authored by Hermet on Nov 20 2018, 12:50 AM.

Details

Summary

When we meets a new shader program in shape_context_push(),
it loads a shader binary, if it is necessary, create a new program for the shader.

In this step, the current program state could changed to this new one.
But still our gl context by shader_flush() could keep the previous program for next shader flush.

But it doens't know current program was changed by dropping by.

Here is a simple scenario:

  1. evas_gl_common_context_image_push():

This image requires Program A. it calls evas_gl_common_context_push() internally.
then shader_array_flush() instantly.
It stores the current context including shader program(Program A)

  1. evas_gl_common_context_xxx_push():

call evas_gl_common_shader_program_get().
xxx draws first time, it loads a new shader program.
Now this changed the current program to a new instant one.

...

  1. shader_array_flush():

draw image which requires Prorgam A (No.1).
Unfortunately, stored context is same to this.
So, it skips some gl context setting including shader program.

@fix

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
Hermet created this revision.Nov 20 2018, 12:50 AM

It seems that this patch has no reviewers specified. If you are unsure who can review your patch, please check this wiki page and see if anyone can be added: https://phab.enlightenment.org/w/maintainers_reviewers/

Hermet requested review of this revision.Nov 20 2018, 12:50 AM
Hermet updated this revision to Diff 17443.Nov 20 2018, 12:59 AM

updated commit message.

Hermet updated this revision to Diff 17444.Nov 20 2018, 1:00 AM
Hermet retitled this revision from evas gl: recover curren program state. to evas gl: recover current program state..

updated commit message.

This revision was not accepted when it landed; it landed in state Needs Review.Nov 26 2018, 6:25 PM
This revision was automatically updated to reflect the committed changes.