From 1ffa77c6a8377b26887085439fcaac1024659882 Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Wed, 21 Aug 2019 14:51:21 +0200 Subject: [PATCH] vrend: Clear blit framebuffer attachments after copy_resource Signed-off-by: Gert Wollny Reviewed-by: Gurchetan Singh --- src/vrend_renderer.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index 3725413..624a5d7 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -7974,6 +7974,14 @@ void vrend_renderer_resource_copy_region(struct vrend_context *ctx, dstx + src_box->width, dy2, glmask, GL_NEAREST); + + glBindFramebuffer(GL_READ_FRAMEBUFFER, ctx->sub->blit_fb_ids[0]); + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, + GL_TEXTURE_2D, 0, 0); + glBindFramebuffer(GL_READ_FRAMEBUFFER, ctx->sub->blit_fb_ids[1]); + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, + GL_TEXTURE_2D, 0, 0); + glBindFramebuffer(GL_FRAMEBUFFER, ctx->sub->fb_id); if (ctx->sub->rs_state.scissor)