mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
zink: rename optimal_key in update_gfx_program_optimal()
no functional changes
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28017>
(cherry picked from commit daf2f4a583)
This commit is contained in:
parent
c318561067
commit
90386f2a27
2 changed files with 6 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue