coregl_fastpath: Keep frame buffer binding state synchronization 38/87638/3 accepted/tizen/3.0/ivi/20161011.043906 accepted/tizen/3.0/mobile/20161015.032815 accepted/tizen/3.0/tv/20161016.004200 accepted/tizen/3.0/wearable/20161015.082015 accepted/tizen/common/20161004.194348 accepted/tizen/ivi/20161005.231845 accepted/tizen/mobile/20161005.231758 accepted/tizen/tv/20161005.231812 accepted/tizen/wearable/20161005.231827 submit/tizen/20161004.102645 submit/tizen_3.0_ivi/20161010.000001 submit/tizen_3.0_mobile/20161015.000001 submit/tizen_3.0_tv/20161015.000001 submit/tizen_3.0_wearable/20161015.000001
authorZhaowei Yuan <zhaowei.yuan@samsung.com>
Thu, 8 Sep 2016 14:53:42 +0000 (22:53 +0800)
committerGwan-gyeong Mun <kk.moon@samsung.com>
Thu, 29 Sep 2016 10:44:29 +0000 (03:44 -0700)
commit3a24da4bcd09c2b38559a6b5e8d578ae1c953858
treebdf38add5f5ba59b36fbeab21cffae87572d3a00
parent5084858c7ac36110b7bc3554e983b50b62e5e9a7
coregl_fastpath: Keep frame buffer binding state synchronization

Calling function fastpath_glBindFramebuffer() with target
GL_FRAMEBUFFER indicates bind to GL_READ_FRAMEBUFFER and
GL_DRAW_FRAMEBUFFER in the meantime.

If GL driver supports GL_READ_FRAMEBUFFER_BINDING and
GL_DRAW_FRAMEBUFFER_BINDING, clue state
gl_framebuffer_binding_read and gl_framebuffer_binding_draw
are both necessary to keep state synchronization, or state
gl_framebuffer_binding is enough.

Add judgement on current_ctx->gl_framebuffer_binding_draw_used
to make sure read and draw are both supproted.

Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: Ia74ff7b4d67dfaf0b2cf00e97d996e4bb2dd640d
src/modules/fastpath/coregl_fastpath.c
src/modules/fastpath/coregl_fastpath_gl.c
src/modules/fastpath/coregl_fastpath_state.h