diff --git a/.pick_status.json b/.pick_status.json index ee20532ef04..b775776e09a 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -554,7 +554,7 @@ "description": "zink: rename optimal_key in update_gfx_program_optimal()", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/gallium/drivers/zink/zink_program.c b/src/gallium/drivers/zink/zink_program.c index 5d7bd54825f..135b8705605 100644 --- a/src/gallium/drivers/zink/zink_program.c +++ b/src/gallium/drivers/zink/zink_program.c @@ -669,14 +669,14 @@ update_gfx_shader_module_optimal(struct zink_context *ctx, struct zink_gfx_progr static void update_gfx_program_optimal(struct zink_context *ctx, struct zink_gfx_program *prog) { - const union zink_shader_key_optimal *optimal_key = (union zink_shader_key_optimal*)&prog->last_variant_hash; - if (ctx->gfx_pipeline_state.shader_keys_optimal.key.vs_bits != optimal_key->vs_bits) { + const union zink_shader_key_optimal *last_prog_key = (union zink_shader_key_optimal*)&prog->last_variant_hash; + if (ctx->gfx_pipeline_state.shader_keys_optimal.key.vs_bits != last_prog_key->vs_bits) { assert(!prog->is_separable); bool changed = update_gfx_shader_module_optimal(ctx, prog, ctx->last_vertex_stage->info.stage); ctx->gfx_pipeline_state.modules_changed |= changed; } - const bool shadow_needs_shader_swizzle = optimal_key->fs.shadow_needs_shader_swizzle && (ctx->dirty_gfx_stages & BITFIELD_BIT(MESA_SHADER_FRAGMENT)); - if (ctx->gfx_pipeline_state.shader_keys_optimal.key.fs_bits != optimal_key->fs_bits || + const bool shadow_needs_shader_swizzle = last_prog_key->fs.shadow_needs_shader_swizzle && (ctx->dirty_gfx_stages & BITFIELD_BIT(MESA_SHADER_FRAGMENT)); + if (ctx->gfx_pipeline_state.shader_keys_optimal.key.fs_bits != last_prog_key->fs_bits || /* always recheck shadow swizzles since they aren't directly part of the key */ unlikely(shadow_needs_shader_swizzle)) { assert(!prog->is_separable); @@ -688,7 +688,7 @@ update_gfx_program_optimal(struct zink_context *ctx, struct zink_gfx_program *pr } } if (prog->shaders[MESA_SHADER_TESS_CTRL] && prog->shaders[MESA_SHADER_TESS_CTRL]->non_fs.is_generated && - ctx->gfx_pipeline_state.shader_keys_optimal.key.tcs_bits != optimal_key->tcs_bits) { + ctx->gfx_pipeline_state.shader_keys_optimal.key.tcs_bits != last_prog_key->tcs_bits) { assert(!prog->is_separable); bool changed = update_gfx_shader_module_optimal(ctx, prog, MESA_SHADER_TESS_CTRL); ctx->gfx_pipeline_state.modules_changed |= changed;