radv: fix passing clip/cull distances from VS to PS
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 29 Aug 2018 20:13:52 +0000 (22:13 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 31 Aug 2018 15:34:36 +0000 (17:34 +0200)
commit6f47df312943b05653efc0494551ebf8c3903d43
tree71c4194090d4b74b54d4c2002bb6e233f4e0f9d9
parent54a9622dd5fdee7d18c05d968c97c4dd4fa9c83c
radv: fix passing clip/cull distances from VS to PS

CTS doesn't test input clip/cull distances for the fragment
shader stage, which explains why this was totally broken. I
wrote a simple test locally that works now.

This fixes a crash with GTA V and DXVK.

Note that we are exporting unused parameters from the vertex
shader now, but this can't be optimized easily because we don't
keep the fragment shader info...

Cc: mesa-stable@lists.freedesktop.org
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107477
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_nir_to_llvm.c
src/amd/vulkan/radv_pipeline.c
src/amd/vulkan/radv_shader.h
src/amd/vulkan/radv_shader_info.c