mesa/src
Kenneth Graunke 07f2ad32e4 intel/fs: Pick the lowest register pressure schedule when spilling
We try various pre-RA scheduler modes and see if any of them allow
us to register allocate without spilling.  If all of them spill,
however, we left it on the last mode: LIFO.  This is unfortunately
sometimes significantly worse than other modes (such as "none").

This patch makes us instead select the pre-RA scheduling mode that
gives the lowest register pressure estimate, if none of them manage
to avoid spilling.  The hope is that this scheduling will spill the
least out of all of them.

fossil-db stats (on Alchemist) speak for themselves:

    Totals:
    Instrs: 197297092 -> 195326552 (-1.00%); split: -1.02%, +0.03%
    Cycles: 14291286956 -> 14303502596 (+0.09%); split: -0.55%, +0.64%
    Spill count: 190886 -> 129204 (-32.31%); split: -33.01%, +0.70%
    Fill count: 361408 -> 225038 (-37.73%); split: -39.17%, +1.43%
    Scratch Memory Size: 12935168 -> 10868736 (-15.98%); split: -16.08%, +0.10%

    Totals from 1791 (0.27% of 668386) affected shaders:
    Instrs: 7628929 -> 5658389 (-25.83%); split: -26.50%, +0.67%
    Cycles: 719326691 -> 731542331 (+1.70%); split: -10.95%, +12.65%
    Spill count: 110627 -> 48945 (-55.76%); split: -56.96%, +1.20%
    Fill count: 221560 -> 85190 (-61.55%); split: -63.89%, +2.34%
    Scratch Memory Size: 4471808 -> 2405376 (-46.21%); split: -46.51%, +0.30%

Improves performance when using XeSS in Cyberpunk 2077 by 90% on A770.
Improves performance of Borderlands 3 by 1.54% on A770.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24707>
2023-08-23 21:34:38 +00:00
..
amd aco: combine a | ~b to bfi(b, a, -1) 2023-08-23 20:06:49 +00:00
android_stub
asahi asahi: Move UBO lowering into GL driver 2023-08-23 15:06:55 +00:00
broadcom ci/deqp: backport fix for dEQP-EGL.functional.wide_color.*_888_colorspace_* 2023-08-22 18:12:08 +00:00
c11 util/meson: Getting mesa util core to be self contained 2023-08-02 03:41:24 +00:00
compiler nir: Remove dead nir_const_value variables 2023-08-23 19:29:19 +00:00
drm-shim drm-shim: Avoid assertion fail if someone does close(-1). 2023-06-01 01:50:41 +00:00
egl egl,venus,vulkan,turnip,freedreno: Update CPU trace init to init more than perfetto. 2023-08-19 23:09:45 +02:00
etnaviv etnaviv: Fully replicate back stencil config 2023-08-22 12:00:27 +02:00
freedreno ci/deqp: backport fix for dEQP-EGL.functional.wide_color.*_888_colorspace_* 2023-08-22 18:12:08 +00:00
gallium Revert "radeonsi/vcn: add an exception of field case for h264 decoding" 2023-08-23 20:27:34 +00:00
gbm egl/drm: Assume modern DRI interface versions 2023-07-28 12:25:19 +00:00
getopt
glx glx: Advertise GLX_MESA_gl_interop extension if support present 2023-08-19 01:08:30 +00:00
gtest gtest: backport ansi color fix 2023-08-18 21:33:14 +00:00
imagination nir: Drop nir_instr_rewrite_src() 2023-08-18 01:00:15 +00:00
imgui
intel intel/fs: Pick the lowest register pressure schedule when spilling 2023-08-23 21:34:38 +00:00
loader dri3: only invalidate drawables on geometry change if geometry has changed 2023-06-15 12:22:24 +00:00
mapi glthread: sync for VDPAU sync functions 2023-08-17 04:53:37 +00:00
mesa nir: Drop most uses if nir_instr_rewrite_src() 2023-08-18 01:00:15 +00:00
microsoft nir: unify lower_find_msb with has_{find_msb_rev,uclz} 2023-08-22 12:08:37 +00:00
nouveau nv/codegen: Remove Function::buildDefSets 2023-08-22 10:42:24 -04:00
panfrost panfrost/ci: revert Disable T720 2023-08-23 19:05:30 +00:00
tool meson: remove needless c++17-overrides 2023-05-19 12:45:31 +00:00
util util: Decouple disk cache from EGL_ANDROID_blob_cache 2023-08-23 00:04:16 +00:00
virtio egl,venus,vulkan,turnip,freedreno: Update CPU trace init to init more than perfetto. 2023-08-19 23:09:45 +02:00
vulkan vulkan: Add CPU tracing for vkWaitForFences. 2023-08-19 23:10:37 +02:00
.clang-format clang-format: Disable formatting by default 2023-08-13 16:48:49 +02:00
meson.build nvk: add vulkan skeleton 2023-08-04 21:31:52 +00:00