Mesa (staging/21.2): zink: fix pipeline caching
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Aug 27 17:23:30 UTC 2021
Module: Mesa
Branch: staging/21.2
Commit: be328711105f9c1bb77e74798625922225ee8217
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=be328711105f9c1bb77e74798625922225ee8217
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Tue Aug 24 18:32:17 2021 -0400
zink: fix pipeline caching
this was apparently always broken, but in a very, very subtle way
where the hash table would compare the current pipeline state against
itself instead of using the cache entry's state
Cc: mesa-stable
Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12535>
(cherry picked from commit 560dc4f79076123706559d6d9cff053ce1b77bba)
---
.pick_status.json | 2 +-
src/gallium/drivers/zink/zink_program.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index f2cb7d8d10c..1abb165c015 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1498,7 +1498,7 @@
"description": "zink: fix pipeline caching",
"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 e5e736c72df..9245869835a 100644
--- a/src/gallium/drivers/zink/zink_program.c
+++ b/src/gallium/drivers/zink/zink_program.c
@@ -823,7 +823,7 @@ zink_get_gfx_pipeline(struct zink_context *ctx,
memcpy(&pc_entry->state, state, sizeof(*state));
pc_entry->pipeline = pipeline;
- entry = _mesa_hash_table_insert_pre_hashed(prog->pipelines[vkmode], state->final_hash, state, pc_entry);
+ entry = _mesa_hash_table_insert_pre_hashed(prog->pipelines[vkmode], state->final_hash, pc_entry, pc_entry);
assert(entry);
}
@@ -862,7 +862,7 @@ zink_get_compute_pipeline(struct zink_screen *screen,
memcpy(&pc_entry->state, state, sizeof(*state));
pc_entry->pipeline = pipeline;
- entry = _mesa_hash_table_insert_pre_hashed(comp->pipelines, state->hash, state, pc_entry);
+ entry = _mesa_hash_table_insert_pre_hashed(comp->pipelines, state->hash, pc_entry, pc_entry);
assert(entry);
}
More information about the mesa-commit
mailing list