mesa/src/amd
Timothy Arceri 72e4287e8f radv: make use of nir_lower_load_const_to_scalar()
This allows NIR to CSE more operations. LLVM does this also so the
impact is limited, however doing this in NIR allows other opts to
make progress. For example in radeonsi more loops are unrolled in
Civilization Beyond Earth.

The actual pipeline-db stats are not overwhelming but even in the
negatively affected shaders the NIR is clearly better. It just
happens that the code shuffling and in some cases calls to max
rather than a flt result in the final output from LLVM not
giving as good numbers.

However this is an incremental opt that further passes build off
so the change should be made IMO.

Totals from affected shaders:
SGPRS: 20192 -> 20184 (-0.04 %)
VGPRS: 19516 -> 19524 (0.04 %)
Spilled SGPRs: 437 -> 444 (1.60 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Private memory VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 1527444 -> 1522276 (-0.34 %) bytes
LDS: 6 -> 6 (0.00 %) blocks
Max Waves: 1018 -> 1016 (-0.20 %)
Wait states: 0 -> 0 (0.00 %)

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2018-09-25 09:31:22 +10:00
..
addrlib amd/addrlib: Fix include path for c99_compat.h 2018-08-22 14:39:02 -07:00
common ac: add 16-bit support to ac_build_bitfield_reverse() 2018-09-17 15:18:37 +02:00
vulkan radv: make use of nir_lower_load_const_to_scalar() 2018-09-25 09:31:22 +10:00
Android.addrlib.mk amd: remove always-true BRAHMA_BUILD define 2017-12-01 13:49:42 +00:00
Android.common.mk Android: fix undeclared identifier 'gfx9d_reg_table' 2017-09-11 09:35:23 -05:00
Android.mk android: radv: build vulkan.radv conditionally to radeonsi 2018-08-03 20:09:16 +02:00
Makefile.addrlib.am amd/addrlib: mark returnCode as MAYBE_UNUSED in ElemGetExportNorm 2018-08-22 14:33:21 -04:00
Makefile.am autotools: include meson build files in tarball 2018-01-19 16:30:51 -08:00
Makefile.common.am Revert "configure: allow building with python3" 2018-08-24 11:14:15 +01:00
Makefile.sources ac/nir: Use lower_vote_eq_to_ballot instead of ac_nir_lower_subgroups 2018-03-13 13:25:27 -07:00
meson.build meson: build "radv" vulkan driver for radeon hardware 2017-09-27 09:12:34 -07:00