Module: Mesa Branch: main Commit: 4dfb5818ed7080a65ca901850515654bb2e296ca URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4dfb5818ed7080a65ca901850515654bb2e296ca
Author: Mike Blumenkrantz <[email protected]> Date: Tue Nov 9 19:44:48 2021 -0500 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 <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13727> --- src/gallium/drivers/zink/zink_program.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/zink_program.c b/src/gallium/drivers/zink/zink_program.c index 7802a37376d..5778a09afaf 100644 --- a/src/gallium/drivers/zink/zink_program.c +++ b/src/gallium/drivers/zink/zink_program.c @@ -167,6 +167,7 @@ update_gfx_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_gfx_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) {
