From 63e62af31c30ff237fc18ff98f043378852592e9 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 24 Aug 2021 18:33:32 -0400 Subject: [PATCH] zink: ensure gfx shader module states are updated when doing a partial recalc these are in the pipeline state and must be updated Reviewed-by: Dave Airlie Part-of: --- src/gallium/drivers/zink/zink_draw.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/zink/zink_draw.cpp b/src/gallium/drivers/zink/zink_draw.cpp index 92507a306e0..2a44598d640 100644 --- a/src/gallium/drivers/zink/zink_draw.cpp +++ b/src/gallium/drivers/zink/zink_draw.cpp @@ -192,9 +192,12 @@ update_gfx_program(struct zink_context *ctx) struct hash_table *ht = &ctx->program_cache[ctx->shader_stages >> 2]; uint32_t hash = ht->key_hash_function(ctx->gfx_stages); struct hash_entry *entry = _mesa_hash_table_search_pre_hashed(ht, hash, ctx->gfx_stages); - if (entry) - zink_update_gfx_program(ctx, (struct zink_gfx_program*)entry->data); - else { + if (entry) { + prog = (struct zink_gfx_program*)entry->data; + u_foreach_bit(stage, prog->stages_present & ~ctx->dirty_shader_stages) + ctx->gfx_pipeline_state.modules[stage] = prog->modules[stage]->shader; + zink_update_gfx_program(ctx, prog); + } else { prog = zink_create_gfx_program(ctx, ctx->gfx_stages); entry = _mesa_hash_table_insert_pre_hashed(ht, hash, prog->shaders, prog); }