From ff5991e86acd2336c7fdb6b303ee47d1abbb7429 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 1 Sep 2021 15:35:55 -0400 Subject: [PATCH] zink: simplify flagging last vertex stage for updating Reviewed-by: Dave Airlie Part-of: --- src/gallium/drivers/zink/zink_draw.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/gallium/drivers/zink/zink_draw.cpp b/src/gallium/drivers/zink/zink_draw.cpp index 186c7464cb2..f586b4423eb 100644 --- a/src/gallium/drivers/zink/zink_draw.cpp +++ b/src/gallium/drivers/zink/zink_draw.cpp @@ -177,12 +177,8 @@ static void update_gfx_program(struct zink_context *ctx) { if (ctx->last_vertex_stage_dirty) { - if (ctx->gfx_stages[PIPE_SHADER_GEOMETRY]) - ctx->dirty_shader_stages |= BITFIELD_BIT(PIPE_SHADER_GEOMETRY); - else if (ctx->gfx_stages[PIPE_SHADER_TESS_EVAL]) - ctx->dirty_shader_stages |= BITFIELD_BIT(PIPE_SHADER_TESS_EVAL); - else - ctx->dirty_shader_stages |= BITFIELD_BIT(PIPE_SHADER_VERTEX); + enum pipe_shader_type pstage = pipe_shader_type_from_mesa(ctx->last_vertex_stage->nir->info.stage); + ctx->dirty_shader_stages |= BITFIELD_BIT(pstage); ctx->last_vertex_stage_dirty = false; } unsigned bits = BITFIELD_MASK(PIPE_SHADER_COMPUTE);