mesa/src
Alyssa Rosenzweig e8d25b50c9 pan/bi: Lower swizzles on CSEL.i32/MUX.i32
This is counter-intuitive, but required for correct operation when
CSEL.i32 takes a 1-bit (stored 16-bit) boolean argument. The impedance
mismatch ultimately is between CSEL.b32 (nir's bcsel, nonexistant in the
hardware) and the lowering CSEL.i32. However, a similar problem exists
even with MUX.i32 which lacks a good way of zero/sign-extending
booleans.

Cherry-picked from my Valhall branch though the issue also affects
Bifrost. Fixes piglit shaders@glsl-vs-if-bool on Bifrost.

Unfortunately, shader-db is quite unhappy :-(

The proper fix is to use lower_bool_to_bitsize, but that can't be
backported to mesa-stable.

total instructions in shared programs: 157539 -> 158953 (0.90%)
instructions in affected programs: 55621 -> 57035 (2.54%)
helped: 2
HURT: 259
helped stats (abs) min: 2.0 max: 2.0 x̄: 2.00 x̃: 2
helped stats (rel) min: 2.11% max: 2.67% x̄: 2.39% x̃: 2.39%
HURT stats (abs)   min: 1.0 max: 40.0 x̄: 5.47 x̃: 2
HURT stats (rel)   min: 0.36% max: 16.13% x̄: 2.55% x̃: 1.59%
95% mean confidence interval for instructions value: 4.44 6.40
95% mean confidence interval for instructions %-change: 2.21% 2.82%
Instructions are HURT.

total tuples in shared programs: 132322 -> 132907 (0.44%)
tuples in affected programs: 31806 -> 32391 (1.84%)
helped: 5
HURT: 152
helped stats (abs) min: 1.0 max: 2.0 x̄: 1.40 x̃: 1
helped stats (rel) min: 0.39% max: 3.03% x̄: 1.70% x̃: 1.61%
HURT stats (abs)   min: 1.0 max: 42.0 x̄: 3.89 x̃: 2
HURT stats (rel)   min: 0.29% max: 18.18% x̄: 2.50% x̃: 1.79%
95% mean confidence interval for tuples value: 2.88 4.58
95% mean confidence interval for tuples %-change: 1.87% 2.85%
Tuples are HURT.

total clauses in shared programs: 28672 -> 28698 (0.09%)
clauses in affected programs: 869 -> 895 (2.99%)
helped: 1
HURT: 24
helped stats (abs) min: 1.0 max: 1.0 x̄: 1.00 x̃: 1
helped stats (rel) min: 5.88% max: 5.88% x̄: 5.88% x̃: 5.88%
HURT stats (abs)   min: 1.0 max: 2.0 x̄: 1.12 x̃: 1
HURT stats (rel)   min: 0.49% max: 33.33% x̄: 8.46% x̃: 3.59%
95% mean confidence interval for clauses value: 0.82 1.26
95% mean confidence interval for clauses %-change: 3.84% 11.93%
Clauses are HURT.

total cycles in shared programs: 15119.04 -> 15137.88 (0.12%)
cycles in affected programs: 922.87 -> 941.71 (2.04%)
helped: 4
HURT: 79
helped stats (abs) min: 0.0416669999999999 max: 0.0833330000000001 x̄: 0.05 x̃: 0
helped stats (rel) min: 0.40% max: 3.17% x̄: 1.57% x̃: 1.35%
HURT stats (abs)   min: 0.041665999999999315 max: 1.75 x̄: 0.24 x̃: 0
HURT stats (rel)   min: 0.30% max: 20.00% x̄: 2.83% x̃: 2.12%
95% mean confidence interval for cycles value: 0.17 0.29
95% mean confidence interval for cycles %-change: 1.86% 3.37%
Cycles are HURT.

total arith in shared programs: 4922.71 -> 4947.71 (0.51%)
arith in affected programs: 1423.79 -> 1448.79 (1.76%)
helped: 5
HURT: 177
helped stats (abs) min: 0.0416669999999999 max: 0.0833330000000001 x̄: 0.06 x̃: 0
helped stats (rel) min: 0.40% max: 3.17% x̄: 1.82% x̃: 1.67%
HURT stats (abs)   min: 0.041665999999999315 max: 1.75 x̄: 0.14 x̃: 0
HURT stats (rel)   min: 0.30% max: 22.22% x̄: 2.50% x̃: 1.52%
95% mean confidence interval for arith value: 0.11 0.17
95% mean confidence interval for arith %-change: 1.86% 2.90%
Arith are HURT.

total quadwords in shared programs: 120605 -> 120956 (0.29%)
quadwords in affected programs: 26535 -> 26886 (1.32%)
helped: 6
HURT: 143
helped stats (abs) min: 1.0 max: 7.0 x̄: 2.83 x̃: 1
helped stats (rel) min: 0.93% max: 6.33% x̄: 2.29% x̃: 1.71%
HURT stats (abs)   min: 1.0 max: 21.0 x̄: 2.57 x̃: 2
HURT stats (rel)   min: 0.34% max: 13.79% x̄: 2.02% x̃: 1.22%
95% mean confidence interval for quadwords value: 1.86 2.86
95% mean confidence interval for quadwords %-change: 1.45% 2.24%
Quadwords are HURT.

total threads in shared programs: 4670 -> 4669 (-0.02%)
threads in affected programs: 2 -> 1 (-50.00%)
helped: 0
HURT: 1

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14576>
(cherry picked from commit 8bd4976d98)
2022-02-24 14:56:52 -08:00
..
amd ac/nir/ngg: Fix mixed up primitive ID after culling. 2022-02-24 14:56:51 -08:00
android_stub android_stub: update platform headers to include atrace 2021-10-09 00:42:32 +00:00
asahi agx: Lower UBO loads to use per-element indexing 2022-01-24 14:25:18 +00:00
broadcom broadcom/compiler: fix offset alignment for ldunifa when skipping 2022-02-03 10:32:01 -08:00
compiler nir: fix lower_memcpy 2022-02-24 14:56:51 -08:00
drm-shim drm-shim: Support kernels with >4k pages 2021-08-13 23:33:52 +00:00
egl egl/wayland: Reset buffer age when destroying buffers 2022-02-07 21:49:41 -08:00
etnaviv etnaviv: add support for INTEL_blackhole_render 2022-01-31 16:52:29 +00:00
freedreno ir3/spill: Fix simplify_phi_nodes with multiple loop nesting 2022-02-24 14:56:51 -08:00
gallium amd: add a workaround for an SQ perf counter bug 2022-02-24 14:56:51 -08:00
gbm replace 0 with NULL for NULL pointers 2022-01-10 22:53:32 +00:00
getopt
glx glx: fix pbuffer refcount init 2022-02-24 14:56:51 -08:00
gtest gtest: Fix output of array ASSERT/EXPECT macros 2021-11-11 09:53:09 -08:00
hgl
imgui
intel anv: don't set color state when input state was requested 2022-02-24 14:56:51 -08:00
loader loader: Restore i915g support. 2021-12-09 09:05:23 -08:00
mapi glthread: call _mesa_glthread_BindBuffer unconditionally 2022-02-01 06:11:22 +00:00
mesa mesa/st: always use DXT5 when transcoding ASTC format 2022-02-24 14:56:51 -08:00
microsoft microsoft/compiler: Only treat tess level location as special if it's a patch constant 2022-02-07 21:36:02 -08:00
nouveau
panfrost pan/bi: Lower swizzles on CSEL.i32/MUX.i32 2022-02-24 14:56:52 -08:00
tool ci: Use a dlclose-disabling preload library for leak checking in Vulkan. 2022-01-27 23:47:46 +00:00
util radv: enable radv_disable_aniso_single_level for The Evil Within 1&2 2022-02-24 14:56:51 -08:00
virtio venus: properly destroy deferred ahb image before real image creation 2022-02-24 14:56:51 -08:00
vulkan vulkan/wsi/wayland: remove format switch from wl_shm_format_for_vk_format 2022-02-01 08:00:22 +00:00
meson.build meson: start building intel earlier. 2022-01-20 06:41:17 +00:00