zink: update gfx pipeline shader module pointer even if the program is unchanged

this is used for pipeline comparisons, so it has to always be accurate

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13727>
(cherry picked from commit 4dfb5818ed)
This commit is contained in:
Mike Blumenkrantz 2021-11-09 19:44:48 -05:00 committed by Eric Engestrom
parent 0f40fdd4d9
commit 3327295498
2 changed files with 2 additions and 2 deletions

View file

@ -85,7 +85,7 @@
"description": "zink: update gfx pipeline shader module pointer even if the program is unchanged",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null
},

View file

@ -167,6 +167,7 @@ update_shader_modules(struct zink_context *ctx,
u_foreach_bit(pstage, mask) {
assert(prog->shaders[pstage]);
struct zink_shader_module *zm = get_shader_module_for_stage(ctx, screen, prog->shaders[pstage], prog, state);
state->modules[pstage] = zm->shader;
if (prog->modules[pstage] == zm)
continue;
if (prog->modules[pstage])
@ -175,7 +176,6 @@ update_shader_modules(struct zink_context *ctx,
default_variants &= zm->default_variant;
prog->modules[pstage] = zm;
variant_hash ^= prog->modules[pstage]->hash;
state->modules[pstage] = zm->shader;
}
if (hash_changed && state) {