svga: ignore sampler view resource if not used by shaders
authorCharmaine Lee <charmainel@vmware.com>
Wed, 18 Oct 2023 17:00:43 +0000 (20:00 +0300)
committerMarge Bot <emma+marge@anholt.net>
Thu, 19 Oct 2023 22:00:24 +0000 (22:00 +0000)
commita5ac29d85f9d38007e93375c24ce2ad1df1e9465
tree8a5a0030098926fcf9bbaf01d2dda8b38c220f5f
parente36e9bd3922e501d8f3c8441045a730dd5d77649
svga: ignore sampler view resource if not used by shaders

Currently bound sampler view resources are relevant only if the
currently bound shaders also access them. So when checking for shader
resource collision, we only need to check those shader resources that
are actively used by the shaders.

This fixes a regression with manhattan on SVGA device when only the
active state changes are sent to the driver and a no longer relevant
shader resource is included in the shader resource collision check.
This causes a backing resource to be unnecessarily created and the content
never propagated to the original resource.

Fixes: aaa4b0e6186 ("st/mesa: move check_program_state code into _mesa_update_state")
Reviewed-by: Neha Bhenden <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25801>
src/gallium/drivers/svga/svga_context.h
src/gallium/drivers/svga/svga_pipe_cs.c
src/gallium/drivers/svga/svga_pipe_fs.c
src/gallium/drivers/svga/svga_pipe_gs.c
src/gallium/drivers/svga/svga_pipe_ts.c
src/gallium/drivers/svga/svga_pipe_vs.c
src/gallium/drivers/svga/svga_shader.c
src/gallium/drivers/svga/svga_shader.h
src/gallium/drivers/svga/svga_state_sampler.c
src/gallium/drivers/svga/svga_tgsi.c