radv: add support for loading the LSHS vertex stride from a SGPR
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 7 Aug 2023 12:31:34 +0000 (14:31 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 11 Aug 2023 07:43:58 +0000 (07:43 +0000)
commit8a97302f57fede4791acdb504bad449508fbfc01
tree07185b4f4a4af34dd3e7585bf4c55723278874c1
parent0cb88ddca295bc99f47fa0572b7142d119a43b60
radv: add support for loading the LSHS vertex stride from a SGPR

With shader object, if VS and TCS aren't linked together, the LSHS
vertex stride should be computed from the vertex outputs. Otherwise,
if an output is unused, the stride is wrong in TCS.

This is currently for GFX8 only because for merged shaders this won't
be needed but shader object on GFX9+ isn't yet a thing.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24540>
src/amd/vulkan/nir/radv_nir_lower_abi.c
src/amd/vulkan/radv_cmd_buffer.c
src/amd/vulkan/radv_shader.h
src/amd/vulkan/radv_shader_args.c