blitter, GL blit fallback: clean up framebuffer after use

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@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
macos/master
Gert Wollny 7 years ago committed by Dave Airlie
parent eb9555c833
commit 79479ac982
  1. 4
      src/vrend_blitter.c

@ -829,4 +829,8 @@ 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);
}
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_STENCIL_ATTACHMENT,
GL_TEXTURE_2D, 0, 0);
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0,
GL_TEXTURE_2D, 0, 0);
}

Loading…
Cancel
Save