turnip,freedreno/a6xx: tell hw the size of shared mem used by CS
authorDanylo Piliaiev <dpiliaiev@igalia.com>
Mon, 15 Feb 2021 11:14:56 +0000 (13:14 +0200)
committerDanylo Piliaiev <dpiliaiev@igalia.com>
Fri, 19 Feb 2021 18:28:44 +0000 (20:28 +0200)
commit0fa7ec14734a640858e7f4047ffab78f71272ece
treed32e740c0e92c814994ee917bcfa701ef362c193
parentdab845d457eb04e63f78d4a1f8d2226e51347918
turnip,freedreno/a6xx: tell hw the size of shared mem used by CS

Before, we only used 2k of shared memory.

It was found that 5 lower bits of SP_CS_UNKNOWN_A9B1 do control
the available size of shared memory for compute shaders, with
AVAILABLE_SIZE = (SP_CS_UNKNOWN_A9B1_SHARED_SIZE + 1) * 1k
up to 32k. And SP_CS_UNKNOWN_A9B1_SHARED_SIZE being zero enables
all 32k of shared memory.

Fixes tests:
 dEQP-VK.rasterization.line_continuity.line-strip
 dEQP-VK.memory_model.message_passing.core11.u32.coherent.fence_fence.atomicwrite.workgroup.payload_local.buffer.guard_nonlocal.workgroup.comp
 dEQP-VK.memory_model.message_passing.core11.u32.coherent.fence_fence.atomicwrite.workgroup.payload_nonlocal.workgroup.guard_local.buffer.comp
 dEQP-VK.memory_model.write_after_read.core11.u32.coherent.fence_fence.atomicwrite.workgroup.payload_local.image.guard_nonlocal.workgroup.comp

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9157>
ci-expects/freedreno/deqp-freedreno-a630-fails.txt
src/freedreno/.gitlab-ci/reference/crash.log
src/freedreno/ir3/ir3_compiler_nir.c
src/freedreno/ir3/ir3_shader.h
src/freedreno/registers/adreno/a6xx.xml
src/freedreno/vulkan/tu_pipeline.c
src/gallium/drivers/freedreno/a6xx/fd6_compute.c