zink: fix the fix for separate shader program refcounting

the previous fix fixed the initial refcount but then left a dangling
ref when doing the optimized program replacement

Fixes: 4e38061643 ("zink: fix separate shader program refcounting")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24255>
This commit is contained in:
Mike Blumenkrantz 2023-07-18 14:05:29 -04:00 committed by Marge Bot
parent 70eff58767
commit 318d0316dd

View file

@ -703,7 +703,7 @@ replace_separable_prog(struct zink_screen *screen, struct hash_entry *entry, str
entry->data = real;
entry->key = real->shaders;
real->base.removed = false;
prog->full_prog = NULL;
zink_gfx_program_reference(screen, &prog->full_prog, NULL);
prog->base.removed = true;
return real;
}