mesa/src
Pavel Ondračka 0b39b5ea63
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
nir/opt_algebraic: improve dot product narrowing
The issue is that the current narrowing patterns are not working in a lot
of cases, for example
(('fdot3', ('vec3', a, 0.0, 0.0), b), ('fmul', a, b)),
is missing patterns like this:

32x3   %1 = load_const (0x3f800000, 0x00000000, 0x00000000) = (1.000000, 0.000000, 0.000000)
32x4   %7 = vec4 %6, %2 (0x0), %2 (0x0), %2 (0x0)
32    %19 = fdot3 %1 (1.000000, 0.000000, 0.000000), %7.xyz

or after some later transforms:

32x2   %0 = load_const (0x3f800000, 0x00000000) = (1.000000, 0.000000)
32x2   %6 = vec2 %5, %1 (0x0)
32    %18 = fdot3 %0 (1.000000, 0.000000).xyy, %6.xyy

This patch is heavily based on old branch from Ian Romanick from 2019.

r300 RV530 shader-db:
total instructions in shared programs: 128900 -> 128882 (-0.01%)
instructions in affected programs: 621 -> 603 (-2.90%)
helped: 10
HURT: 1
total cycles in shared programs: 191837 -> 191828 (<.01%)
cycles in affected programs: 799 -> 790 (-1.13%)
helped: 7
HURT: 1

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39068>
2026-01-02 16:07:10 +01:00
..
amd radv: add new drirc radv_prefer_2d_swizzle_for_3d_storage 2026-01-02 09:54:29 +00:00
android_stub android_stub: fix missing prototypes issues 2025-12-02 20:03:02 +00:00
asahi asahi/ci: skip fp64 subgroup tests 2025-12-31 10:27:04 -05:00
broadcom v3dv/ci: skip tests causing GPU issues 2025-12-23 18:26:08 +00:00
c11 c11/threads: fix build on c23 2025-11-10 07:01:50 +10:00
compiler nir/opt_algebraic: improve dot product narrowing 2026-01-02 16:07:10 +01:00
drm-shim drm-shim: handle DRM_CAP_ADDFB2_MODIFIERS 2025-11-24 12:34:08 +00:00
egl egl/x11: Fix memory leak when querying translated coord. 2025-12-11 14:58:59 +00:00
etnaviv etnaviv: isa: Add assembler support for infinity and NaN immediates 2025-12-25 22:57:48 +00:00
freedreno ir3: Schedule (eolm)/(eogm) 2026-01-02 14:08:49 +01:00
gallium tu,freedreno: add chicken bit to enable (eolm) 2026-01-02 14:08:48 +01:00
gbm gbm: Make documentation for gbm_bo_map more explicit 2025-12-29 10:05:38 +00:00
getopt
gfxstream gfxstream: don't dump genvk.py args to generated files 2025-12-18 18:52:19 +00:00
glx driconf: add a way to override GLX_CONTEXT_RESET_ISOLATION_BIT_ARB 2025-12-17 23:35:24 +00:00
gtest
imagination pvr: limit hw-defs to rogue 2025-12-19 10:35:05 +01:00
imgui imgui: Silence build warnings for imgui 2025-09-16 06:16:19 +00:00
intel nir: use a seperate enum for per alu floating point math control 2025-12-29 10:57:05 +00:00
kosmickrisp nir: Drop the mode argument of nir_lower_vars_to_scratch(). 2025-12-17 19:50:28 +00:00
loader loader: Wrap nouveau_zink_predicate with HAVE_LIBDRM 2025-11-20 18:39:19 +00:00
mesa nir,radeonsi: simplify load_color0 & load_color1 intrinsics and shader_info 2026-01-01 18:30:28 +00:00
microsoft treewide: use BITSET_*_COUNT 2025-12-16 17:42:10 +00:00
nouveau nir: use a seperate enum for per alu floating point math control 2025-12-29 10:57:05 +00:00
panfrost panvk: fix accidental assignment in assert 2025-12-31 16:29:07 +00:00
poly nir: remove nir_io_add_const_offset_to_base 2025-11-29 00:16:38 +00:00
tool pps/meson: minor refactor for pps_deps 2025-11-08 18:39:00 -08:00
util radv: enable radv_prefer_2d_swizzle_for_3d_storage for TLOU1 2026-01-02 09:54:29 +00:00
virtio venus: amend missing VKAPI_ATTR/CALL for render pass APIs 2026-01-01 20:11:28 +00:00
vulkan device-select: Avoid usage of legacy GetPhysicalDeviceProperties 2026-01-01 17:51:35 +00:00
x11 treewide: strip unneeded inc_gallium inc_gallium_aux 2025-11-13 22:01:43 +00:00
.clang-format util: Add sparse bitset data structure 2025-11-06 21:34:33 +00:00
meson.build kk: Add KosmicKrisp 2025-10-20 17:46:38 +00:00