From 5e975c6a2ed321df56c59eb16291cbf1dea2c7a4 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 6 Mar 2015 16:34:05 +1000 Subject: [PATCH] renderer: switch hw contexts outside the transfer iov this fixes a regression since the transfer inline rewrite --- src/vrend_renderer.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index efe0201..32ef085 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -3683,8 +3683,6 @@ static int vrend_renderer_transfer_write_iov(struct vrend_context *ctx, { void *data; - vrend_hw_switch_context(vrend_lookup_renderer_ctx(0), TRUE); - if (res->target == 0 && res->ptr) { vrend_read_from_iovec(iov, num_iovs, info->offset, res->ptr + info->box->x, info->box->width); return 0; @@ -4089,8 +4087,6 @@ static int vrend_renderer_transfer_send_iov(struct vrend_context *ctx, return 0; } - vrend_hw_switch_context(vrend_lookup_renderer_ctx(0), TRUE); - if (res->target == GL_ELEMENT_ARRAY_BUFFER_ARB || res->target == GL_ARRAY_BUFFER_ARB || res->target == GL_TRANSFORM_FEEDBACK_BUFFER || @@ -4169,6 +4165,8 @@ int vrend_renderer_transfer_iov(const struct vrend_transfer_info *info, if (!check_iov_bounds(res, info, iov, num_iovs)) return EINVAL; + vrend_hw_switch_context(vrend_lookup_renderer_ctx(0), TRUE); + if (transfer_mode == VREND_TRANSFER_WRITE) return vrend_renderer_transfer_write_iov(ctx, res, iov, num_iovs, info);