mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
zink: also replace hash_entry::key when replacing separable program
this otherwise still points to the separable program's shader array and will access freed memory Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21246>
This commit is contained in:
parent
b5029a90df
commit
b73fe8d52e
1 changed files with 2 additions and 0 deletions
|
|
@ -699,6 +699,7 @@ zink_gfx_program_update_optimal(struct zink_context *ctx)
|
|||
if (util_queue_fence_is_signalled(&prog->base.cache_fence)) {
|
||||
struct zink_gfx_program *real = prog->full_prog;
|
||||
entry->data = real;
|
||||
entry->key = real->shaders;
|
||||
real->base.removed = false;
|
||||
prog->full_prog = NULL;
|
||||
prog->base.removed = true;
|
||||
|
|
@ -737,6 +738,7 @@ zink_gfx_program_update_optimal(struct zink_context *ctx)
|
|||
struct hash_entry *entry = _mesa_hash_table_search_pre_hashed(ht, hash, ctx->gfx_stages);
|
||||
struct zink_gfx_program *real = prog->full_prog;
|
||||
entry->data = real;
|
||||
entry->key = real->shaders;
|
||||
real->base.removed = false;
|
||||
prog->full_prog = NULL;
|
||||
prog->base.removed = true;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue