zink: fix gfx program cache pruning with generated tcs
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Mon, 1 Aug 2022 19:08:48 +0000 (15:08 -0400)
committerMarge Bot <emma+marge@anholt.net>
Wed, 3 Aug 2022 12:24:46 +0000 (12:24 +0000)
commitc7ef4f97350900fb6f9b05e1d1ec4e695033f0f9
tree6515859248cc1207a36d131a85a4cd7e12bff3d0
parente1c89abd8616dc6ae6d492ac43c70ca2d6a002ef
zink: fix gfx program cache pruning with generated tcs

if the tcs was generated, then the prgram was added to the non-tcs cache,
which means deleting it from the tcs+tes cache will fail and then
context_destroy will explode

Fixes: 4123ee3c714 ("zink: invoke descriptor_program_deinit for programs on context destroy")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17866>
src/gallium/drivers/zink/zink_compiler.c
src/gallium/drivers/zink/zink_context.c