gallium/cso_context: remove cso_delete_xxx_shader helpers to fix the live cache
authorMarek Olšák <marek.olsak@amd.com>
Thu, 5 Mar 2020 20:09:28 +0000 (15:09 -0500)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 11 Mar 2020 02:19:47 +0000 (22:19 -0400)
commit2dc300421d3079d653f106a876263904ba0faacc
tree5ba3065cc8ee26f18ef60234e8da96aa71d7e802
parent1fa259b035c000b590a91a5b51412a2ff1972ab0
gallium/cso_context: remove cso_delete_xxx_shader helpers to fix the live cache

With the live shader cache, equivalent shaders can be backed by the same
CSO. This breaks the logic that identifies whether the shader being deleted
is bound.

For example, having shaders A and B, you can bind shader A and delete
shader B. Deleting shader B will unbind shader A if they are equivalent.

Pierre-Eric figured out the root cause for this issue.

Fixes: 0db74f479b9 - radeonsi: use the live shader cache
Closes: #2596
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4078>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4078>
src/gallium/auxiliary/cso_cache/cso_context.c
src/gallium/auxiliary/cso_cache/cso_context.h
src/gallium/state_trackers/nine/vertexshader9.c
src/gallium/state_trackers/xa/xa_tgsi.c
src/mesa/state_tracker/st_cb_clear.c
src/mesa/state_tracker/st_cb_drawpixels.c
src/mesa/state_tracker/st_cb_drawtex.c
src/mesa/state_tracker/st_context.c
src/mesa/state_tracker/st_pbo.c
src/mesa/state_tracker/st_program.c