mesa/src/intel
Kenneth Graunke 88756cee8d intel/compiler: Run nir_opt_large_constants before scalarizing consts
nir_opt_large_constants balks at seeing a store_deref of a variable
where the source is a vecN operation of multiple load_consts, and thinks
that isn't a constant, so it should not bother promoting it.

Unfortunately, we were running nir_lower_load_const_to_scalar before
nir_opt_large_constants, so this prevented a ton of constant promotion.

This commit /used to help/ some shaders in shader-db. Presumably since
!16770 landed, those shaders were already helped.  Currently ther are
no shader-db changes on any Intel platform.

Fossil-db results:

All Intel platforms had similar results. (Ice Lake shown)
Instructions in all programs: 141998227 -> 141421756 (-0.4%)
Instructions helped: 12515
Instructions hurt: 237

SENDs in all programs: 7437925 -> 7468033 (+0.4%)
SENDs hurt: 12806

Cycles in all programs: 9161655753 -> 9132869800 (-0.3%)
Cycles helped: 10163
Cycles hurt: 2637

Spills in all programs: 19977 -> 18678 (-6.5%)
Spills helped: 384
Spills hurt: 40

Fills in all programs: 32863 -> 31396 (-4.5%)
Fills helped: 385
Fills hurt: 42

Lost: 1

Lots of Shadow of the Tomb Raider fragment shaders and Batman Arkham
Origins vertex shaders were hurt for SENDs in this commit.  A couple
Aztec Ruins compute shaders and Spaceship shaders (multiple stages)
were also hurt.

All of the shaders hurt for spills or fills were Spaceship compute
shaders.  Nearly all of the shaders helped were Shadow of the Tomb
Raider fragmenet shaders.  One Spaceship shader was reall, REALLY helped:

Spills helped fossils/fossil-db/Spaceship.run.9f90a2a226fcc57f.1.foz/0b507d3abe2e3c28/compute: 321 -> 13 (-96.0%)
Fills helped fossils/fossil-db/Spaceship.run.9f90a2a226fcc57f.1.foz/0b507d3abe2e3c28/compute: 279 -> 21 (-92.5%)

Overall this seems like an improvement, but we may want to actually
run these few benchmarks before landing.

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16539>
2022-11-01 14:55:21 -07:00
..
blorp blorp: Fix typo in blorp_xy_block_copy_blt 2022-09-28 08:41:35 +00:00
ci glsl: drop sub to add neg lowering in GLSL IR 2022-10-19 03:52:21 +00:00
common anv: add support for mesh shading in INTEL_MEASURE 2022-10-27 15:03:28 +00:00
compiler intel/compiler: Run nir_opt_large_constants before scalarizing consts 2022-11-01 14:55:21 -07:00
dev intel/dev: Set display_ver = 13 on all ADL/RPL/DG2 2022-10-28 01:31:44 +00:00
ds anv: add mesh shading tracepoints 2022-10-27 15:03:28 +00:00
genxml iris: Reduce use of RHWO optimization (Wa_1508744258) 2022-10-31 23:26:06 +00:00
isl isl: add new MOCS field for protected buffers 2022-10-27 10:53:18 +00:00
nullhw-layer util/mesa/wide: Rename _SIMPLE_MTX_INITIALIZER_NP to SIMPLE_MTX_INITIALIZER 2022-10-14 03:27:41 +00:00
perf intel/perf: Use intel_device_info functions to compute subslice and eu totals 2022-10-28 20:12:07 +00:00
tools intel: Convert i915 engine type to intel in tools/ common/ and ds/ 2022-10-15 20:04:51 +00:00
vulkan anv: remove some unused functions 2022-10-31 06:59:36 +00:00
vulkan_hasvk hasvk: remove some unused functions 2022-10-31 06:59:36 +00:00
meson.build intel: add a hasvk vulkan driver 2022-09-02 09:40:45 +00:00