[virglrenderer-devel] [PATCH] blitter, GL blit fallback: clean up framebuffer after use

Gert Wollny gert.wollny at collabora.com
Fri Jul 20 10:02:37 UTC 2018

Since the framebuffer used for blits is reused, attachements must be removed
after executing the blits, otherwise, a still bound depth buffer results
in failing color blits and vice versa.

Stabelizes piglits from "fbo-generatemipmap-formats"

Signed-off-by: Gert Wollny <gert.wollny at collabora.com>

This patch and 
  "blitter: Set fbo sRGB state according to the destination sourface type"
will need manual merging, but I think this one is a bit more important then 
the partial fix for sRGB, so I didn't base this on the other. 

thanks for reviewing, 

 src/vrend_blitter.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/vrend_blitter.c b/src/vrend_blitter.c
index 68b5bab..1c5c062 100644
--- a/src/vrend_blitter.c
+++ b/src/vrend_blitter.c
@@ -829,4 +829,9 @@ void vrend_renderer_blit_gl(UNUSED struct vrend_context *ctx,
       glBufferData(GL_ARRAY_BUFFER, sizeof(blit_ctx->vertices), blit_ctx->vertices, GL_STATIC_DRAW);
       glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
+                             GL_TEXTURE_2D, 0, 0);
+                             GL_TEXTURE_2D, 0, 0);

More information about the virglrenderer-devel mailing list