vrend: restore GL_FRAMEBUFFER after clobbering

Both of these functions clobber the framebuffer-binding on
general-purpose GL contexts, which is bad for performance.

Tested-by: Jakob Bornecrantz <jakob@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
macos/master
Erik Faye-Lund 6 years ago committed by Dave Airlie
parent 7a353862c6
commit 6ae19d3da2
  1. 3
      src/vrend_renderer.c

@ -7275,7 +7275,7 @@ void vrend_renderer_resource_copy_region(struct vrend_context *ctx,
dstx + src_box->width, dstx + src_box->width,
dy2, dy2,
glmask, GL_NEAREST); glmask, GL_NEAREST);
glBindFramebuffer(GL_FRAMEBUFFER, ctx->sub->fb_id);
} }
static void vrend_renderer_blit_int(struct vrend_context *ctx, static void vrend_renderer_blit_int(struct vrend_context *ctx,
@ -7482,6 +7482,7 @@ static void vrend_renderer_blit_int(struct vrend_context *ctx,
dst_y2, dst_y2,
glmask, filter); glmask, filter);
} }
glBindFramebuffer(GL_FRAMEBUFFER, ctx->sub->fb_id);
if (make_intermediate_copy) { if (make_intermediate_copy) {
vrend_renderer_resource_destroy(intermediate_copy, false); vrend_renderer_resource_destroy(intermediate_copy, false);

Loading…
Cancel
Save