radv: only export clip/cull distances if PS reads them
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 26 Jun 2019 14:35:44 +0000 (16:35 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 27 Jun 2019 06:56:37 +0000 (08:56 +0200)
commitd5004f60be7e5f950f5bd8fc8ced75f7a6dc3421
tree4a5e1826d7fd80c5b3b35e9d312c46974733720c
parent1e9ccc5429fcb5c6d6efa9fa35e19b364b8cabf7
radv: only export clip/cull distances if PS reads them

The only exception is the GS copy shader which emits them
unconditionally.

Totals from affected shaders:
SGPRS: 71320 -> 71008 (-0.44 %)
VGPRS: 54372 -> 54240 (-0.24 %)
Code Size: 2952628 -> 2941368 (-0.38 %) bytes
Max Waves: 9689 -> 9723 (0.35 %)

This helps Dota2, Doom, GTAV and Hitman 2.

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