Mesa (main): zink: move batch decl to top of draw_vbo
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jun 16 05:12:14 UTC 2021
Module: Mesa
Branch: main
Commit: 38119e4e7d58a3472eae88715c60f6520a568f25
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=38119e4e7d58a3472eae88715c60f6520a568f25
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Tue May 11 13:49:42 2021 -0400
zink: move batch decl to top of draw_vbo
this may still change during descriptor updating, but having the pointer
earlier is helpful
Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11408>
---
src/gallium/drivers/zink/zink_draw.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/zink/zink_draw.c b/src/gallium/drivers/zink/zink_draw.c
index 2512279f348..df79732176c 100644
--- a/src/gallium/drivers/zink/zink_draw.c
+++ b/src/gallium/drivers/zink/zink_draw.c
@@ -406,6 +406,7 @@ zink_draw_vbo(struct pipe_context *pctx,
struct zink_screen *screen = zink_screen(pctx->screen);
struct zink_rasterizer_state *rast_state = ctx->rast_state;
struct zink_depth_stencil_alpha_state *dsa_state = ctx->dsa_state;
+ struct zink_batch *batch = &ctx->batch;
struct zink_so_target *so_target =
dindirect && dindirect->count_from_stream_output ?
zink_so_target(dindirect->count_from_stream_output) : NULL;
@@ -520,7 +521,7 @@ zink_draw_vbo(struct pipe_context *pctx,
if (ctx->descriptor_refs_dirty[0])
zink_update_descriptor_refs(ctx, false);
- struct zink_batch *batch = zink_batch_rp(ctx);
+ batch = zink_batch_rp(ctx);
VkPipeline prev_pipeline = ctx->gfx_pipeline_state.pipeline;
VkPipeline pipeline = zink_get_gfx_pipeline(ctx, ctx->curr_program,
More information about the mesa-commit
mailing list