Mesa (staging/21.3): zink: update gfx pipeline shader module pointer even if the program is unchanged
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Nov 10 11:16:40 UTC 2021
Module: Mesa
Branch: staging/21.3
Commit: 088ce9ab61d260f22f4a7ecbeb8e6044952f614d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=088ce9ab61d260f22f4a7ecbeb8e6044952f614d
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
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 <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13727>
(cherry picked from commit 4dfb5818ed7080a65ca901850515654bb2e296ca)
---
.pick_status.json | 2 +-
src/gallium/drivers/zink/zink_program.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 0dd99439dbc..a68490d7133 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -22,7 +22,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
},
diff --git a/src/gallium/drivers/zink/zink_program.c b/src/gallium/drivers/zink/zink_program.c
index bfa06611d02..936de65cfbf 100644
--- a/src/gallium/drivers/zink/zink_program.c
+++ b/src/gallium/drivers/zink/zink_program.c
@@ -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) {
More information about the mesa-commit
mailing list