OSDN Git Service

radv: reduce the number of loaded channels for vertex input fetches
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 12 Feb 2019 14:09:32 +0000 (15:09 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 14 Feb 2019 08:10:56 +0000 (09:10 +0100)
commit4b3549c0846f451119ee883a33205b0caa1cf16e
treeab6a66296ebc72150aafb11e61fe3a0377b8ffd2
parent210aec3612bc02a6a02035188937a4755da5a252
radv: reduce the number of loaded channels for vertex input fetches

It's unnecessary to load more channels than the vertex attribute
format. The remaining channels are filled with 0 for y and z,
and 1 for w.

29077 shaders in 15096 tests
Totals:
SGPRS: 1321605 -> 1318869 (-0.21 %)
VGPRS: 935236 -> 932252 (-0.32 %)
Spilled SGPRs: 24860 -> 24776 (-0.34 %)
Code Size: 49832348 -> 49819464 (-0.03 %) bytes
Max Waves: 242101 -> 242611 (0.21 %)

Totals from affected shaders:
SGPRS: 93675 -> 90939 (-2.92 %)
VGPRS: 58016 -> 55032 (-5.14 %)
Spilled SGPRs: 172 -> 88 (-48.84 %)
Code Size: 2862740 -> 2849856 (-0.45 %) bytes
Max Waves: 15474 -> 15984 (3.30 %)

This mostly helps Croteam games (Talos/Sam2017).

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