iris: Fix doubling of shared local memory (SLM) sizes.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 14 Oct 2020 21:56:19 +0000 (14:56 -0700)
committerMarge Bot <eric+marge@anholt.net>
Wed, 14 Oct 2020 23:13:41 +0000 (23:13 +0000)
commit71ed8c5aa69c3edbd6ecb1e658824e6954b36d58
treeb68850c176861c30bc11a67e6856c02ee0abcfb5
parent341f5bffb78d05e4c3d16621f9d5de05f5149be3
iris: Fix doubling of shared local memory (SLM) sizes.

Commit 67ee9c5f5537fe85357556a4322a07253d13a697 added support for
using the `pipe_compute_state::req_local_mem` field, because Clover
can have a run-time specified size that isn't baked into the shaders.

However, it started adding the static size from the shader to the
dynamic state-supplied size.  The Mesa state tracker fills out
req_local_mem to prog->Base.info.cs.shared_size, which is exactly
what we fill out prog_data->total_shared to be.  Effectively, this
meant that we double-counted the same SLM requirements, doubling
our space requirements.

Fixes a 10% performance regression in Synmark2's OglCSDof test.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7152>
src/gallium/drivers/iris/iris_state.c