diff options
author | Stanislav Vorobiov <s.vorobiov@samsung.com> | 2013-11-05 14:25:27 +0400 |
---|---|---|
committer | Stanislav Vorobiov <sheffmail@mail.ru> | 2013-12-14 19:11:34 +0400 |
commit | bf10df307b1815ae98c8bc61cc731ed0e55d04a5 (patch) | |
tree | 6f68c93bdcda3ec3cdbe04793c06c1cc03bd0fd1 /hw | |
parent | 34668d898e6581ddc47865e6de2d30b55ef47031 (diff) | |
download | qemu-bf10df307b1815ae98c8bc61cc731ed0e55d04a5.tar.gz qemu-bf10df307b1815ae98c8bc61cc731ed0e55d04a5.tar.bz2 qemu-bf10df307b1815ae98c8bc61cc731ed0e55d04a5.zip |
YaGL: Fix surface invalidation in onscreen backend
We should always bind framebuffer zero before attaching
new texture/renderbuffer since current framebuffer might be
different from framebuffer zero
Change-Id: I797b9686473def2c85060a88ad7e9ae794070165
Diffstat (limited to 'hw')
-rw-r--r-- | hw/yagl/yagl_backends/egl_onscreen/yagl_egl_onscreen_surface.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/hw/yagl/yagl_backends/egl_onscreen/yagl_egl_onscreen_surface.c b/hw/yagl/yagl_backends/egl_onscreen/yagl_egl_onscreen_surface.c index bd9f2c3534..911e22a6b7 100644 --- a/hw/yagl/yagl_backends/egl_onscreen/yagl_egl_onscreen_surface.c +++ b/hw/yagl/yagl_backends/egl_onscreen/yagl_egl_onscreen_surface.c @@ -79,8 +79,20 @@ static void yagl_egl_onscreen_surface_invalidate(struct yagl_eglb_surface *sfc, osfc->ws_sfc = ws_sfc; if (egl_onscreen_ts->sfc_draw == osfc) { + GLuint cur_fb = 0; + yagl_egl_onscreen_surface_setup(osfc); + + egl_onscreen->gles_driver->GetIntegerv(GL_FRAMEBUFFER_BINDING, + (GLint*)&cur_fb); + + egl_onscreen->gles_driver->BindFramebuffer(GL_FRAMEBUFFER, + egl_onscreen_ts->ctx->fb); + yagl_egl_onscreen_surface_attach_to_framebuffer(osfc); + + egl_onscreen->gles_driver->BindFramebuffer(GL_FRAMEBUFFER, + cur_fb); } YAGL_LOG_FUNC_EXIT(NULL); |