zink: copy optimal key always
this is going away in the future, but for now it's annoying
Fixes: 7336580408 ("zink: unspaghettify some program update code")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18784>
This commit is contained in:
committed by
Marge Bot
parent
95d61c5c75
commit
c338f7ae78
@@ -631,6 +631,7 @@ zink_gfx_program_update_optimal(struct zink_context *ctx)
|
||||
{
|
||||
if (ctx->gfx_dirty) {
|
||||
struct zink_gfx_program *prog = NULL;
|
||||
ctx->gfx_pipeline_state.optimal_key = ctx->gfx_pipeline_state.shader_keys_optimal.key.val;
|
||||
struct hash_table *ht = &ctx->program_cache[zink_program_cache_stages(ctx->shader_stages)];
|
||||
const uint32_t hash = ctx->gfx_hash;
|
||||
simple_mtx_lock(&ctx->program_lock[zink_program_cache_stages(ctx->shader_stages)]);
|
||||
@@ -640,7 +641,6 @@ zink_gfx_program_update_optimal(struct zink_context *ctx)
|
||||
ctx->gfx_pipeline_state.final_hash ^= ctx->curr_program->last_variant_hash;
|
||||
if (entry) {
|
||||
prog = (struct zink_gfx_program*)entry->data;
|
||||
ctx->gfx_pipeline_state.optimal_key = ctx->gfx_pipeline_state.shader_keys_optimal.key.val;
|
||||
update_gfx_program_optimal(ctx, prog);
|
||||
} else {
|
||||
ctx->dirty_gfx_stages |= ctx->shader_stages;
|
||||
@@ -655,6 +655,7 @@ zink_gfx_program_update_optimal(struct zink_context *ctx)
|
||||
ctx->gfx_pipeline_state.final_hash ^= ctx->curr_program->last_variant_hash;
|
||||
} else if (ctx->dirty_gfx_stages) {
|
||||
/* remove old hash */
|
||||
ctx->gfx_pipeline_state.optimal_key = ctx->gfx_pipeline_state.shader_keys_optimal.key.val;
|
||||
ctx->gfx_pipeline_state.final_hash ^= ctx->curr_program->last_variant_hash;
|
||||
update_gfx_program_optimal(ctx, ctx->curr_program);
|
||||
/* apply new hash */
|
||||
|
||||
Reference in New Issue
Block a user