Commit graph

12222 commits

Author SHA1 Message Date
Faith Ekstrand
fd9c2ce73d compiler/rust/nir: Add helpers for getting ALU input/output types
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41896>
2026-06-01 03:24:17 +00:00
Faith Ekstrand
52e2439973 compiler/rust/nir: Add structured block iterators
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41896>
2026-06-01 03:24:17 +00:00
Faith Ekstrand
4d129b10ac compiler/rust: Add a nir_shader::to_string()
Annoyingly, this has to take a &mut nir_shader because printing
re-indexes SSA value.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41896>
2026-06-01 03:24:16 +00:00
Faith Ekstrand
5922db15bf compiler/rust: Add a nir_shader::get_entrypoint() helper
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41896>
2026-06-01 03:24:16 +00:00
Faith Ekstrand
8b71407672 compiler/rust/bindings: Add util_dyarray
NIR uses dynarray for predecessors now so we should include it in the
bindings to keep other users from pulling in a duplicate.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41896>
2026-06-01 03:24:16 +00:00
Faith Ekstrand
0d8ca7cc6c meson: Suffix compiler/rust bindings with _compiler_rs_extern
This prevents symbol collisions with other crates in Mesa.

Fixes: b60694b91e ("compiler/rust: Add a float16 wrapper")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41896>
2026-06-01 03:24:16 +00:00
Konstantin Seurer
f48f681fb5 nir: Duplicate the name in nir_def_set_name
nir_sweep expects that nir_instr_debug_info::variable_name is owned by
nir_instr_debug_info.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40706>
2026-05-31 13:31:55 +02:00
Faith Ekstrand
e6bc41ed44 compiler/rust: Add LowerBoundedU32[Array] types
This is a generalization of NAK's SSAValue and SSAValueArray structs.
But instead of depending on NAK's bespoke invariants, this depends on
something far simpler: A lower bound on the u32.  As long as you can
guarantee that the maximum array length is strictly less than the
minimum U32 value, we can pull the same trick as NAK and generalize it
into a LowerBoundedU32Array type.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41462>
2026-05-30 01:20:10 +00:00
Karol Herbst
87b5340831 nir/opt_dead_write_vars: cache is_entrypoint of the function
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
ends_program calls into nir_cf_node_get_function repeadtly to fetch the
same function and to check whether we are inside an entry point or not.

But we already got the information higher up the chain so use that
instead.

nir_cf_node_get_function is quite expensive, because it follows pointers
through the tree.

Speeds up compilation of more complex shaders by quite a bit. I am seeing
a 66% cut of compilation time spent in e.g. llama-bench.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41891>
2026-05-29 22:58:00 +00:00
Paulo Zanoni
a84addd941 libcl/vk: add VkCopyMemoryToImageIndirectCommandKHR and its members
The members are all naturally aligned to 4, but other
naturally-aligned-to-4 structs in this file still have the attribute
declared (such as VkDispatchIndirectCommand), so I'm adding the
attributes to these as well.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39338>
2026-05-29 18:12:37 +00:00
Paulo Zanoni
d3c87303da libcl/vk: add aligned(4) to VkCopyMemoryIndirectCommandKHR
This structure, despite containing 8-bit members, can be 4-byte
aligned:

    "VUID-VkCopyMemoryIndirectInfoKHR-copyAddressRange-10942
     copyAddressRange.address must be 4 byte aligned"

So do it like we do with the other structures.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39338>
2026-05-29 18:12:37 +00:00
Faith Ekstrand
932ee0f806 etnaviv: Remove f32_to_f16_fallback() in favor of float16::F16
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41375>
2026-05-29 05:13:24 +00:00
Faith Ekstrand
b60694b91e compiler/rust: Add a float16 wrapper
This adds an F16 struct which provides a 16-bit float type using Mesa's
existing half-precision support internally.  Right now, it only contains
the basics but it could be expanded if needed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41375>
2026-05-29 05:13:24 +00:00
Georg Lehmann
dea444f80f nir/deref: consider atomics that store derefs as complex use
src[1] or src[2] would mean that the atomic uses the deref as data for the
op, we only want to allow address source uses.

Fixes: bb311ce370 ("nir: Allow atomics as non-complex uses for var-splitting passes")
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41818>
2026-05-28 18:58:33 +00:00
Karol Herbst
8dc4e8094e nir/opt_algebraic: add missing fmadz lowering for lower_fmulz_with_abs_min
Fixes: 32e91a7467 ("nir: add new float multiply-add opcodes")
Suggested-by: Georg Lehmann <dadschoorse@gmail.com>
Acked-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41723>
2026-05-27 16:28:48 +00:00
Rhys Perry
b1429caab3 nir,ac/nir,aco: add load_global_tr_amd
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41653>
2026-05-27 14:44:59 +00:00
Rhys Perry
b982e71084 nir: add load_global_transpose_amd
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41653>
2026-05-27 14:44:59 +00:00
Rhys Perry
57498eca83 nir: add load_deref_transpose_amd
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41653>
2026-05-27 14:44:59 +00:00
Rhys Perry
6229e89fa8 nir: make cmat_muladd_amd a subgroup intrinsic
It's a subgroup op.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41653>
2026-05-27 14:44:59 +00:00
Rhys Perry
81925d7f41 nir/algebraic: optimize ishl(iadd(iadd(iadd(a, #b), c), d), #e)
This improves combining of constants offsets into memory accesses in
dEQP-VK.compute.pipeline.cooperative_matrix.khr_a.subgroupscope.mul.float16_float16.buffer.colmajor.linear

fossil-db (gfx1201):
Totals from 121 (0.06% of 208640) affected shaders:
Instrs: 204278 -> 204199 (-0.04%); split: -0.06%, +0.03%
CodeSize: 1110856 -> 1110076 (-0.07%); split: -0.10%, +0.03%
VGPRs: 7620 -> 7680 (+0.79%); split: -0.16%, +0.94%
Latency: 1225169 -> 1225067 (-0.01%); split: -0.02%, +0.01%
InvThroughput: 191629 -> 191580 (-0.03%); split: -0.03%, +0.01%
SClause: 5732 -> 5731 (-0.02%)
Copies: 16358 -> 16356 (-0.01%); split: -0.02%, +0.01%
PreSGPRs: 5715 -> 5711 (-0.07%)
PreVGPRs: 5907 -> 5905 (-0.03%)
VALU: 112808 -> 112742 (-0.06%); split: -0.06%, +0.00%
SALU: 27121 -> 27113 (-0.03%)

fossil-db (gfx1201, dEQP-VK.compute.pipeline.cooperative_matrix.*):
Totals from 198 (12.20% of 1623) affected shaders:
Instrs: 13011 -> 11584 (-10.97%)
CodeSize: 90188 -> 77920 (-13.60%)
VGPRs: 3456 -> 2724 (-21.18%)
Latency: 144421 -> 142553 (-1.29%)
InvThroughput: 11158 -> 10608 (-4.93%)
Copies: 1119 -> 1117 (-0.18%)
PreSGPRs: 1954 -> 1857 (-4.96%)
PreVGPRs: 1675 -> 1354 (-19.16%)
VALU: 4894 -> 3476 (-28.97%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41653>
2026-05-27 14:44:59 +00:00
Rhys Perry
c3db34a525 nir/algebraic: optimize ishl(iadd(ishl, ishl))
This reduces arithmetic for cooperative matrix loads:
v_mbcnt_lo_u32_b32 v0, -1, 0
v_and_b32_e32 v1, 15, v0
v_lshrrev_b32_e32 v0, 4, v0
v_lshlrev_b32_e32 v1, 4, v1
v_lshl_add_u32 v0, v0, 3, v1
v_lshlrev_b32_e32 v0, 1, v0
->
v_mbcnt_lo_u32_b32 v0, -1, 0
v_and_b32_e32 v1, -16, v0
v_and_b32_e32 v0, 15, v0
v_lshl_add_u32 v0, v0, 5, v1

fossil-db (gfx1201):
Totals from 38 (0.02% of 208640) affected shaders:
Instrs: 42234 -> 42181 (-0.13%)
CodeSize: 232656 -> 232384 (-0.12%)
Latency: 128807 -> 128759 (-0.04%)
InvThroughput: 20860 -> 20850 (-0.05%)
VALU: 23035 -> 23013 (-0.10%)
SALU: 4790 -> 4784 (-0.13%)

fossil-db (gfx1201, dEQP-VK.compute.pipeline.cooperative_matrix.*):
Totals from 44 (2.71% of 1623) affected shaders:
Instrs: 46834 -> 46802 (-0.07%)
CodeSize: 287536 -> 287272 (-0.09%)
Latency: 100960 -> 100918 (-0.04%); split: -0.10%, +0.06%
InvThroughput: 21808 -> 21796 (-0.06%)
VALU: 19336 -> 19328 (-0.04%)
SALU: 10790 -> 10782 (-0.07%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41653>
2026-05-27 14:44:59 +00:00
Samuel Pitoiset
8c9995e7fa nir: add nir_lower_abort
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41651>
2026-05-27 06:37:03 +00:00
Samuel Pitoiset
88fb73c883 spirv: implement SPV_KHR_abort
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41651>
2026-05-27 06:37:03 +00:00
Samuel Pitoiset
f431d6bc87 nir: add new intrinsics for SPV_KHR_abort
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41651>
2026-05-27 06:37:03 +00:00
Marek Olšák
7f2130c86e nir/opt_algebraic: add more ffract/ffloor/ftrunc/f2u/f2i patterns
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Totals from 1390 (0.69% of 202429) affected shaders:
MaxWaves: 33336 -> 33348 (+0.04%)
Instrs: 4101809 -> 4095218 (-0.16%); split: -0.17%, +0.01%
CodeSize: 22973700 -> 22944812 (-0.13%); split: -0.13%, +0.00%
VGPRs: 95592 -> 95460 (-0.14%); split: -0.15%, +0.01%
SpillSGPRs: 2910 -> 2913 (+0.10%)
Latency: 27815305 -> 27807064 (-0.03%); split: -0.06%, +0.03%
InvThroughput: 4563067 -> 4555622 (-0.16%); split: -0.18%, +0.02%
VClause: 98544 -> 98570 (+0.03%); split: -0.04%, +0.06%
SClause: 91148 -> 91149 (+0.00%); split: -0.00%, +0.01%
Copies: 324008 -> 324028 (+0.01%); split: -0.10%, +0.10%
Branches: 99085 -> 99084 (-0.00%); split: -0.00%, +0.00%
PreSGPRs: 70920 -> 70734 (-0.26%); split: -0.27%, +0.00%
PreVGPRs: 78288 -> 78190 (-0.13%); split: -0.15%, +0.03%
VALU: 2123606 -> 2117766 (-0.28%); split: -0.28%, +0.00%
SALU: 621757 -> 621671 (-0.01%); split: -0.02%, +0.00%
VMEM: 163395 -> 163387 (-0.00%); split: -0.01%, +0.00%
SMEM: 140374 -> 140376 (+0.00%)
VOPD: 258332 -> 258264 (-0.03%); split: +0.04%, -0.07%

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41455>
2026-05-25 20:02:30 +00:00
Thong Thai
931dba218e nir: Only build NIR headers when with_gfx_compute is false
Signed-off-by: Thong Thai <thong.thai@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41493>
2026-05-25 15:44:12 +00:00
Marek Olšák
1b45a8aee2 radv: select frag_coord_xy and pixel_coord conditionally based on dynamic state
the code explains it

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com> (shader parts)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41689>
2026-05-25 13:38:08 +00:00
Marek Olšák
a5ba7694b5 nir/opt_frag_coord_to_pixel_coord: factor out helper nir_all_uses_of_float_are_integer
to be used in a new RADV pass

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41689>
2026-05-25 13:38:05 +00:00
Timur Kristóf
b0b61a4bf8 nir/divergence: Consider ttmp_register_amd and load_scalar_arg_amd as workgroup divergent
These are SGPR inputs, so they are uniform in subgroups but may
have different values in different subgroups.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41584>
2026-05-25 12:29:27 +00:00
Timur Kristóf
dd5b6f3940 nir/divergence: Consider uniformity of read_invocation accross subgroups
These intrinsics are generally divergent between different
subgroups, but they can be uniform when all their sources
are also uniform.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41584>
2026-05-25 12:29:27 +00:00
Timur Kristóf
5b385b703b nir/divergence: Consider ACCESS_SMEM_AMD divergence across subgroups
AMD SMEM instructions are always uniform within a subgroup,
but they may be divergent across subgroups, ie. each subgroup
may have a different value from the same SMEM instruction.

This needs to be considered for divergence across subgroups
as well as for vertex divergence, because vertices of the
same primitive may be split between different waves.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41584>
2026-05-25 12:29:27 +00:00
Georg Lehmann
a92d0356eb nir: seperate ffmaz from has_fmulz
There is no hardware which supports ffmaz with denorms.
We also need this to be seperate because there is AMD hardware
with ffma but not ffmaz.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41649>
2026-05-25 11:50:38 +00:00
Caio Oliveira
3ded84870f spirv: Stop warning about ignored invalid ArrayStride decorations
In practice, these warnings produce more noise than signal.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41758>
2026-05-23 04:39:46 +00:00
Lionel Landwerlin
88418718a9 spirv: fixup infinite recursion with shader replacement
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
While trying to use that feature on RADV I ran into an infinite
recursion.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 97b4a6d0e3 ("compiler: SPIR-V shader replacement")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41751>
2026-05-22 14:31:22 +00:00
Valentine Burley
190ce8280f meson: Add Soong compatibility compiler flags to Vulkan drivers
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Suggested by @gurchetansingh.

Android's Soong build system treats several compiler warnings as errors
by default: https://android.googlesource.com/platform/build/soong/+/27f57506/cc/config/global.go/#218

To catch these issues in Mesa, introduce `soong_compat_c_args`
and `soong_compat_cpp_args` with the following flags treated as errors:
 -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS
 -Werror=date-time
 -Werror=gnu-alignof-expression
 -Werror=ignored-qualifiers
 -Werror=implicit-fallthrough
 -Werror=int-conversion
 -Werror=missing-prototypes
 -Werror=pragma-pack
 -Werror=pragma-pack-suspicious-include
 -Werror=sizeof-array-div
 -Werror=string-plus-int
 -Werror=unreachable-code-loop-increment

These compatibility flags are added to the meson configurations
for ANV, Gfxstream, Lavapipe, PanVK, Turnip, and Venus.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Gurchetan Singh <gurchetan.singh.foss@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41644>
2026-05-22 07:09:49 +00:00
Caio Oliveira
c8914985c4 compiler: Support more than 255 cols/rows in cmat descriptions
This struct was initially packed to fit in a slot in NIR intrinsics
indices.  Nowadays NIR supports larger indices and cooperative matrix
has extensions that allow it to go beyond the existing limit.  This
patch changes the struct to be larger and remove the manual bit packing.

The hash table change is to use the specialized version for u64 keys
that's available in src/util.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41691>
2026-05-21 21:47:03 +00:00
Caio Oliveira
7b286abe33 nir: Add print for other cmat_description slots
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes: 102d7409ef ("nir: Add convert_cmat_intel intrinsic")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41690>
2026-05-21 19:23:12 +00:00
Kenneth Graunke
35622f165f jay, nir: Make a dispatch_mask_intel intrinsic
jay is trying to use the fragment shader dispatch mask for helper
invocation lowering, but it was using load_sample_mask_in for that
(now load_coverage_mask_intel).  But this isn't the MSAA coverage
mask, the two are different payload fields.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41688>
2026-05-21 15:34:46 +00:00
Kenneth Graunke
6c142f7edc jay: Implement sample mask writes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41688>
2026-05-21 15:34:46 +00:00
Kenneth Graunke
b01d286083 jay: Move render target store payload/descriptor construction to backend
Constructing the render target store payload is more complex than we can
reasonably handle at the NIR level.  The main reason is that samplemask
and stencil are packed 16-bit and 8-bit parameters, respectively, which
are intermixed with other values that are 32-bit.  In SIMD32 mode, the
packed sub-32-bit values take up fewer registers than normal values.

Currently we also don't specialize the NIR for each FS dispatch width,
and we can't construct the message descriptor without knowing it.

So, we alter nir_intrinsic_store_render_target_intel to take each of
the expected parameters - colour, depth, stencil, samplemask,
src0_alpha, and discard predicate.  We construct the payloads and
descriptors in the backend.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41688>
2026-05-21 15:34:46 +00:00
Karol Herbst
273204e24e nir: add uniform address to nvidia IO intrinsics
Adding the zero constants have a minor impact on stats due to some unlucky
interactions with nir_opt_cse, opt_instr_sched_prepass and assign_regs.

Totals from 61 (0.01% of 1212873) affected shaders:
CodeSize: 1044720 -> 1047472 (+0.26%); split: -0.00%, +0.27%
Static cycle count: 1198932 -> 1198490 (-0.04%); split: -0.07%, +0.04%

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39384>
2026-05-20 17:23:33 +00:00
Karol Herbst
32fd51687d nir: add nir_intrinsic_cmat_load_shared_nv to nir_get_io_offset_src_number
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39384>
2026-05-20 17:23:32 +00:00
Konstantin Seurer
cfdaa26a64 vulkan,spirv: Update spec to 1.4.352
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41682>
2026-05-20 15:36:39 +00:00
Caio Oliveira
992b35704e nir/instr_set: Consider normalization when calculating hash
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The nir_instrs_equal normalizes the some indices but hash_intrinsic
wasn't normalizing them.  Reorganize the code so both do it using the
same helper.

Fixes: b2bc57551a ("nir/instr_set: allow cse with fp_math_ctrl mismatches for intrinsics")
Assisted-by: Pi coding agent (GPT-5.5)
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41606>
2026-05-20 05:24:21 +00:00
Karol Herbst
e9c1cce35f nir: remove ffma_old
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:42 +00:00
Karol Herbst
099e876a38 vtn_bindgen2: keep ffma_weak
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:42 +00:00
Karol Herbst
a140781aec vtn/opencl: map mad to ffma_weak and fma to ffma
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:42 +00:00
Karol Herbst
09d50cc7a3 vtn: use ffma_weak
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:42 +00:00
Karol Herbst
d534a2057f vtn: handle OpFmaKHR
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:42 +00:00
Karol Herbst
3e158b713c vtn/glsl: translate fma as ffma_weak
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:41 +00:00