Mesa (main): zink: fix pipeline caching
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Aug 25 03:24:30 UTC 2021
Module: Mesa
Branch: main
Commit: 560dc4f79076123706559d6d9cff053ce1b77bba
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=560dc4f79076123706559d6d9cff053ce1b77bba
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>
---
src/gallium/drivers/zink/zink_program.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/zink/zink_program.c b/src/gallium/drivers/zink/zink_program.c
index 4fa238c050e..cf70f4f94a0 100644
--- a/src/gallium/drivers/zink/zink_program.c
+++ b/src/gallium/drivers/zink/zink_program.c
@@ -825,7 +825,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);
}
@@ -864,7 +864,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