From: Erik Faye-Lund Date: Wed, 10 Jul 2019 15:19:39 +0000 (+0200) Subject: zink: save original scissor and viewport X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4887ceb79e66a996e5a067003f4d443dd75f8b1a;p=mesa.git zink: save original scissor and viewport Acked-by: Jordan Justen --- diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index b95a9a139ae..751ceb13222 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -378,6 +378,7 @@ zink_set_viewport_states(struct pipe_context *pctx, state[i].translate[2] - state[i].scale[2], state[i].translate[2] + state[i].scale[2] }; + ctx->viewport_states[start_slot + i] = state[i]; ctx->viewports[start_slot + i] = viewport; } ctx->num_viewports = start_slot + num_viewports; @@ -397,6 +398,7 @@ zink_set_scissor_states(struct pipe_context *pctx, scissor.offset.y = states[i].miny; scissor.extent.width = states[i].maxx - states[i].minx; scissor.extent.height = states[i].maxy - states[i].miny; + ctx->scissor_states[start_slot + i] = states[i]; ctx->scissors[start_slot + i] = scissor; } ctx->num_scissors = start_slot + num_scissors; diff --git a/src/gallium/drivers/zink/zink_context.h b/src/gallium/drivers/zink/zink_context.h index d2cc752764a..445579c59b9 100644 --- a/src/gallium/drivers/zink/zink_context.h +++ b/src/gallium/drivers/zink/zink_context.h @@ -87,9 +87,11 @@ struct zink_context { struct zink_framebuffer *framebuffer; + struct pipe_viewport_state viewport_states[PIPE_MAX_VIEWPORTS]; VkViewport viewports[PIPE_MAX_VIEWPORTS]; unsigned num_viewports; + struct pipe_scissor_state scissor_states[PIPE_MAX_VIEWPORTS]; VkRect2D scissors[PIPE_MAX_VIEWPORTS]; unsigned num_scissors;