mesa/src/intel
Ian Romanick 1f15a0f8b2 intel/fs: Don't loop in try_constant_propagate
The caller already loops over the sources. This means that the caller
must loop over the sources in reverse because constant propagation
prefers to propagate into the last sources first.

The shader-db and fossil-db changes (below) are all due to SEL
instructions. Changing the order sources are visited changes whether a
SEL with two immediate sources is

    (+f0.0) sel     g12    IMM_A    IMM_B

or

    (-f0.0) sel     g12    IMM_B    IMM_A

The ordering of the sources affects the order the constant combining
encounters the values, and the determines which value is "combined"
and which value remains an immediate.

This affects the results by luck. If there are two instructions:

    (+f0.0) sel     g12    IMM_A    IMM_B
    (+f0.0) sel     g13    IMM_A    IMM_C

Picking IMM_A is advantageous over picking IMM_B and IMM_C. Since the
selection algorithm in constant combining is greedy, this case
requires the algorithm see the values in just the right order for the
right thing to happen.

v2: Rebase on many, many changes. Move instruction source fixup
reordering out or try_constant_propagate.

v3: Rebase on !7698.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25091>
2023-09-14 22:31:23 +00:00
..
blorp blorp: fix hangs with mesh enabled 2023-09-12 02:51:31 +00:00
ci ci/anv: Add testing on JSL. 2023-09-13 04:49:02 +00:00
common intel/decoder: Implement support for importing genxml 2023-09-14 11:05:16 -07:00
compiler intel/fs: Don't loop in try_constant_propagate 2023-09-14 22:31:23 +00:00
dev intel: Sync xe_drm.h 2023-09-13 16:38:15 +00:00
ds intel/compiler,intel/blorp,intel/vulkan: decouple vulkan driver and compiler from gallium 2023-08-03 22:00:15 +00:00
genxml intel/genxml: Auto-import genxml files using genxml_import.py 2023-09-14 11:05:16 -07:00
isl isl/tilememcpy_test: add multiple tile testing 2023-09-02 21:49:05 -07:00
nullhw-layer meson: support installation tags 2023-09-11 13:00:45 +00:00
perf intel: Move i915_drm.h specific code from common/intel_gem.h to common/i915/intel_gem.h 2023-07-28 15:36:52 +00:00
tools intel/common: Move intel_clflush.h to intel_mem.h/intel_mem.c 2023-09-06 01:39:53 +00:00
vulkan anv: Remove i915_drm.h include from common code 2023-09-13 13:10:59 -07:00
vulkan_hasvk meson: support installation tags 2023-09-11 13:00:45 +00:00
meson.build intel: Only build perf if drivers or tools are enabled 2023-08-31 21:53:19 +00:00