Mesa (master): zink: store prim mode to context during draw
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Feb 25 00:12:43 UTC 2021
Module: Mesa
Branch: master
Commit: b9676976d033b97a43b541293baf2324d4a4449b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b9676976d033b97a43b541293baf2324d4a4449b
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Wed Feb 17 09:51:43 2021 -0500
zink: store prim mode to context during draw
we need to be able to access this for shader rewrites
Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9115>
---
src/gallium/drivers/zink/zink_context.h | 1 +
src/gallium/drivers/zink/zink_draw.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/gallium/drivers/zink/zink_context.h b/src/gallium/drivers/zink/zink_context.h
index 0b1b3c94cb5..9b5868e0bbf 100644
--- a/src/gallium/drivers/zink/zink_context.h
+++ b/src/gallium/drivers/zink/zink_context.h
@@ -132,6 +132,7 @@ struct zink_context {
struct zink_shader *gfx_stages[ZINK_SHADER_COUNT];
struct zink_gfx_pipeline_state gfx_pipeline_state;
+ enum pipe_prim_type gfx_prim_mode;
struct hash_table *program_cache;
struct zink_gfx_program *curr_program;
diff --git a/src/gallium/drivers/zink/zink_draw.c b/src/gallium/drivers/zink/zink_draw.c
index 70d1fd6673b..76e3d18898e 100644
--- a/src/gallium/drivers/zink/zink_draw.c
+++ b/src/gallium/drivers/zink/zink_draw.c
@@ -664,6 +664,7 @@ zink_draw_vbo(struct pipe_context *pctx,
if (drawid_broken != ctx->drawid_broken)
ctx->dirty_shader_stages |= BITFIELD_BIT(PIPE_SHADER_VERTEX);
ctx->gfx_pipeline_state.vertices_per_patch = dinfo->vertices_per_patch;
+ ctx->gfx_prim_mode = dinfo->mode;
struct zink_gfx_program *gfx_program = get_gfx_program(ctx);
if (!gfx_program)
return;
More information about the mesa-commit
mailing list