ac/nir: do not emit unnecessary null exports in fragment shaders
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 8 Mar 2018 08:53:14 +0000 (09:53 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 8 Mar 2018 10:56:05 +0000 (11:56 +0100)
commit4e3c1ace659c7325bd8d54b66370c3755e40a266
tree56d5fd8e59a186e958926c10c8407ecae393cca1
parent19dd7f007e62d3962a5a9f1d92332e8e23e0deee
ac/nir: do not emit unnecessary null exports in fragment shaders

Null exports should only be needed when no other exports are
emitted. This removes a bunch of 'exp null off, off, off, off done vm'.

Affected games are Dota 2 and Wolfenstein 2, not sure if that
really helps, but code size is decreasing there.

Polaris10:
Totals from affected shaders:
SGPRS: 8216 -> 8216 (0.00 %)
VGPRS: 7072 -> 7072 (0.00 %)
Spilled SGPRs: 0 -> 0 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Code Size: 454968 -> 453896 (-0.24 %) bytes
Max Waves: 772 -> 772 (0.00 %)

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/common/ac_nir_to_llvm.c