Karol Herbst
ca428e3b3c
nir: fix nir_fixup_is_exported for LLVM-22
...
Starting with LLVM-22 we won't see the kernel wrapper anymore, and this
is a trivial fix to get around this.
See: 5458eb2511
Cc: mesa-stable
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39374 >
(cherry picked from commit 24d20df3d6 )
2026-02-04 18:39:34 +01:00
Karol Herbst
84566763c2
clc: enable generic address space and seq_cst and device scope atomic features
...
This is going to be required with LLVM-22.
See 423bdb2bf2
Cc: mesa-stable
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39374 >
(cherry picked from commit 6eda573a8a )
2026-02-04 18:39:33 +01:00
Karol Herbst
05c679d37b
clc: support some atomic and generic address space features
...
Cc: mesa-stable
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39374 >
(cherry picked from commit 01e1392139 )
2026-02-04 18:39:33 +01:00
Karol Herbst
c6f8d2ef92
clc: reorder headers to fix compilation errors due to UNUSED
...
Cc: mesa-stable
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39374 >
(cherry picked from commit 7f9a7ed553 )
2026-02-04 18:39:33 +01:00
Georg Lehmann
1f5f2cc952
nir/opt_algebraic: use correct syntax to create exact fsat
...
Fixes: 3b06824e4c ("nir/opt_algebraic: optimize some post peephole select patterns")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39586 >
(cherry picked from commit d8ef28671d )
2026-02-04 18:39:33 +01:00
Iván Briano
cb8a069e24
brw: fix local_invocation_index with quad derivaties on mesh/task shaders
...
For mesh/task shaders, the thread payload provides a local invocation
index, but it's always linear so it doesn't give the correct value when
quad derivatives are in use.
The lowering pass where all of this is done correctly for compute
shaders assumes load_local_invocation_index will be lowered in the
backend for mesh/task, calculates the values for the quads correctly but
then avoid replacing the original intrinsic and we remain with the wrong
results.
Add an intel specific intrinsic and always lower the generic one to that
(or whatever else was calculated) to avoid ambiguities and fix the value
for quad derivatives.
Fixes future CTS tests using mesh/task shaders under:
dEQP-VK.spirv_assembly.instruction.compute.compute_shader_derivatives.*
Fixes: d89bfb1ff7 ("intel/brw: Reorganize lowering of LocalID/Index to handle Mesh/Task")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39276 >
(cherry picked from commit 5b48805b42 )
2026-01-28 16:17:59 +01:00
Eric Engestrom
e68f96eb1f
nir/meson: fix cpp_args of nir_opt_algebraic_pattern_tests
...
Fixes: 4c30c44b75 ("nir: Generate unit tests for nir_opt_algebraic")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39550 >
(cherry picked from commit d12e3454e6 )
2026-01-28 16:17:59 +01:00
Lionel Landwerlin
a19e949824
brw: move coarse_z computation to NIR
...
So that we can print it easily with debug printfs
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38996 >
2026-01-21 16:00:52 +00:00
Lionel Landwerlin
98194dfa0b
nir: add intrinsics for Z calculation in shaders with FSR
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38996 >
2026-01-21 16:00:52 +00:00
Lionel Landwerlin
12be2a580c
nir/compiler_options: add nir_load_pixel_coord
...
And use it for nir_printf_fmt_at_px().
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38996 >
2026-01-21 16:00:50 +00:00
Daniel Schürmann
89b9fcb5e7
nir/opt_load_store_vectorize: delay aliasing test in try_vectorize_shared2()
...
Checking for aliasing can be very expensive.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38659 >
2026-01-21 14:20:06 +00:00
Daniel Schürmann
598928d7e7
nir/loop_analyze: determine whether all control flow gets eliminated upon loop unrolling
...
Totals from 17 (0.02% of 79839) affected shaders: (Navi48)
MaxWaves: 241 -> 243 (+0.83%); split: +5.81%, -4.98%
Instrs: 44198 -> 43786 (-0.93%); split: -8.19%, +7.26%
CodeSize: 230284 -> 226900 (-1.47%); split: -10.55%, +9.08%
VGPRs: 2152 -> 2524 (+17.29%); split: -3.90%, +21.19%
Scratch: 718848 -> 0 (-inf%)
Latency: 128977 -> 145720 (+12.98%); split: -2.12%, +15.10%
InvThroughput: 206804 -> 254250 (+22.94%); split: -0.32%, +23.27%
VClause: 1296 -> 1309 (+1.00%); split: -28.09%, +29.09%
SClause: 835 -> 833 (-0.24%)
Copies: 6284 -> 3630 (-42.23%); split: -44.51%, +2.28%
Branches: 1003 -> 961 (-4.19%)
PreSGPRs: 1003 -> 996 (-0.70%); split: -1.20%, +0.50%
PreVGPRs: 1510 -> 2130 (+41.06%)
VALU: 23577 -> 24309 (+3.10%); split: -6.26%, +9.37%
SALU: 5875 -> 5688 (-3.18%); split: -6.26%, +3.08%
VMEM: 3679 -> 3001 (-18.43%); split: -33.27%, +14.84%
SMEM: 1632 -> 1631 (-0.06%)
VOPD: 23 -> 24 (+4.35%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38659 >
2026-01-21 14:20:06 +00:00
Daniel Schürmann
4997d8fb1b
nir/loop_analyze: determine for all ALU whether it can be constant-folded
...
Totals from 16 (0.02% of 79839) affected shaders: (Navi48)
MaxWaves: 512 -> 464 (-9.38%)
Instrs: 11821 -> 17205 (+45.55%)
CodeSize: 60536 -> 86644 (+43.13%)
VGPRs: 732 -> 804 (+9.84%)
Latency: 68411 -> 39349 (-42.48%)
InvThroughput: 14217 -> 9306 (-34.54%)
VClause: 223 -> 302 (+35.43%)
SClause: 262 -> 317 (+20.99%)
Copies: 961 -> 696 (-27.58%); split: -39.23%, +11.65%
Branches: 182 -> 158 (-13.19%); split: -29.67%, +16.48%
PreSGPRs: 1210 -> 945 (-21.90%); split: -29.42%, +7.52%
PreVGPRs: 647 -> 633 (-2.16%)
VALU: 5112 -> 10857 (+112.38%)
SALU: 3215 -> 2335 (-27.37%); split: -30.67%, +3.30%
VMEM: 228 -> 349 (+53.07%)
SMEM: 567 -> 549 (-3.17%); split: -3.70%, +0.53%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38659 >
2026-01-21 14:20:06 +00:00
Natalie Vock
30f6eacfad
radv/rt: Call ahit/isec shaders
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39314 >
2026-01-20 21:49:55 +00:00
Icenowy Zheng
b61dbc98fd
nir/algebraic: fix Python-3.10-incompatible syntax
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Using a string literal enclosed with the same type of quotation marks
with the outer f-string isn't supported on Python 3.10, which is
currently still with security maintainance.
This leads to syntax error when building Mesa with Python 3.10.
Fix this by alternating these string literals' quotation mark to '' (as
the outer f-string uses "").
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14673
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39372 >
2026-01-20 11:14:41 +00:00
Faith Ekstrand
2313bec66e
nir: Expose the guts of nir_lower_blend as builder helpers
...
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39367 >
2026-01-19 21:33:14 +00:00
Faith Ekstrand
d2c2d798f8
nir/lower_blend: Optimize trivial logic op cases
...
There's no point in going to/from UNORM if we're just going to copy or
throw away the source.
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39367 >
2026-01-19 21:33:14 +00:00
Faith Ekstrand
68d22b5a2a
nir/lower_blend: Move the format to nir_lower_blend_rt
...
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39367 >
2026-01-19 21:33:14 +00:00
Faith Ekstrand
d6556a580f
nir,pan: Add and implement a new store_tile_pan intrinsic
...
Like we just did with load_tile_pan, this maps directly to ST_TILE in
the hardware. This is more versatile and lets us do more of our
lowering in NIR.
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39367 >
2026-01-19 21:33:13 +00:00
Faith Ekstrand
11b6cd2f2c
nir,pan: Rework the pafrost tile load intrinsic
...
Instead of making it explicitly about outputs, this switchies it to
being a NIR version of LD_TILE. It means we have to do a bit of work in
NIR and add a builder helper but the end result is something much more
versatile.
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39367 >
2026-01-19 21:33:13 +00:00
Faith Ekstrand
4189865347
nir: panfrost tile loads are always divergent
...
Each lane refers to a different pixel.
Cc: mesa-stable
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39367 >
2026-01-19 21:33:13 +00:00
Georg Lehmann
70a951c3f3
nir/search: allow inexact patterns if denorms have to be flushed
...
Patterns should ensure that they flush denorms with fcanonicalize.
Removing in between denorm flushing when fusing operations is explicitly
allowed unless those optimizations are generally disallowed by other
floating point math control flags.
Foz-DB Navi21:
Totals from 291 (0.35% of 82377) affected shaders:
Instrs: 138347 -> 137773 (-0.41%)
CodeSize: 751460 -> 748516 (-0.39%)
Latency: 1686466 -> 1686226 (-0.01%); split: -0.02%, +0.01%
InvThroughput: 270847 -> 269963 (-0.33%)
VClause: 2023 -> 2022 (-0.05%)
SClause: 5271 -> 5260 (-0.21%); split: -0.25%, +0.04%
Copies: 8929 -> 8912 (-0.19%)
VALU: 87108 -> 86552 (-0.64%)
SALU: 23460 -> 23443 (-0.07%)
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39180 >
2026-01-19 16:11:29 +00:00
Georg Lehmann
442daeb54a
nir/opt_algebraic: use fcanonicalize
...
Mostly optimizations, some minor fixes but I don't
think they are worth backporting.
Foz-DB Navi21:
Totals from 7570 (9.21% of 82151) affected shaders:
MaxWaves: 204288 -> 204476 (+0.09%); split: +0.09%, -0.00%
Instrs: 4511439 -> 4500261 (-0.25%); split: -0.25%, +0.00%
CodeSize: 23727088 -> 23644388 (-0.35%); split: -0.35%, +0.00%
VGPRs: 290944 -> 290616 (-0.11%); split: -0.12%, +0.01%
SpillSGPRs: 1256 -> 1251 (-0.40%)
Latency: 16738072 -> 16726717 (-0.07%); split: -0.10%, +0.04%
InvThroughput: 3736856 -> 3716631 (-0.54%); split: -0.55%, +0.01%
VClause: 66150 -> 66156 (+0.01%); split: -0.05%, +0.06%
SClause: 93644 -> 93631 (-0.01%); split: -0.02%, +0.01%
Copies: 448816 -> 458584 (+2.18%); split: -0.05%, +2.22%
Branches: 139817 -> 139775 (-0.03%); split: -0.03%, +0.00%
PreSGPRs: 321922 -> 321900 (-0.01%); split: -0.01%, +0.00%
PreVGPRs: 239709 -> 238856 (-0.36%); split: -0.39%, +0.03%
VALU: 2595164 -> 2584250 (-0.42%); split: -0.43%, +0.01%
SALU: 839038 -> 838965 (-0.01%); split: -0.02%, +0.01%
VMEM: 137584 -> 137583 (-0.00%)
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39180 >
2026-01-19 16:11:29 +00:00
Rhys Perry
625afb0d29
nir: add fcanonicalize
...
v2(Georg Lehmann):
Always remove fcanonicalize if denorms must be neither flushed nor preserved.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39180 >
2026-01-19 16:11:29 +00:00
Georg Lehmann
43d998df84
nir: document that both input and output denorms have to be flushed
...
This allows us to remove a * 1.0 or a - 0.0 if is_only_used_as_float.
We already rely on that.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39180 >
2026-01-19 16:11:28 +00:00
Georg Lehmann
d7e88c0ccd
nir/constant_expressions: flush input denorms if denorms have to be flushed
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39180 >
2026-01-19 16:11:28 +00:00
Georg Lehmann
7e93aebbec
nir/constant_expressions: don't avoid unused source variable warnings
...
The only use case for this was fddx/fddy and they are no longer alu
for good reasons. For current and future alu, unused sources don't make sense.
And if you really want it, you can still explicitly cast the variable to void.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39180 >
2026-01-19 16:11:28 +00:00
Eric Engestrom
30c2e6dbf2
nir/meson: drop redundant --build-tests in favour of just checking if --out-tests is set
...
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/39350 >
2026-01-16 16:55:21 +00:00
Eric Engestrom
246095da49
nir/meson: only try to generate the nir_opt_algebraic tests when requested
...
Anything listed in a meson target's `output` is expected to exist once
the command has run. If it's missing, meson/ninja will run the command
again to try to generate it, resulting in a ton of files getting
re-generated/re-compiled for no reason.
Fixes: 4c30c44b75 ("nir: Generate unit tests for nir_opt_algebraic")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14667
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39350 >
2026-01-16 16:55:21 +00:00
Michal Vanis
75d95cb355
glsl: replace gl ctx direct access
...
Replaces GL API context access with an abstraction as
to allow for https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21343
Signed-off-by: Michal Vanis <mik@vanis.sh>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38981 >
2026-01-15 22:21:05 +00:00
Konstantin Seurer
4c30c44b75
nir: Generate unit tests for nir_opt_algebraic
...
This catches a number of bugs in the current NIR algebraic optimizations
or opcodes implementations (as fixed in this series, or documented in the
XFAIL tests), and should prevent many future bugs from landing.
This required bumping the test timeout, because s390x is very slow to
emulate in CI.
Closes : #3338
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39076 >
2026-01-15 19:09:43 +00:00
Emma Anholt
df215cc3cd
nir/opt_algebraic_tests: Mark patterns as unsupported or xfails.
...
This way as a pattern author/editor you can immediately see whether it's
getting test coverage and if there are known issues with the pattern.
This will also give us clear outcomes from testing as we fix failing
patterns.
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39076 >
2026-01-15 19:09:43 +00:00
Konstantin Seurer
f5864ed408
nir/opt_algebraic_tests: Add an option for generating unit tests
...
It only emits tests for exact patterns which do not use instructions
that drop precision by design.
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39076 >
2026-01-15 19:09:40 +00:00
Emma Anholt
14fafebc1a
nir/algebraic: Fix typo in error message print.
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39076 >
2026-01-15 19:09:40 +00:00
Konstantin Seurer
363b2655b6
nir: Add a unit test base class for algebraic patterns
...
nir_algebraic_pattern_test can validate shaders with the following
structure:
%0 = @provide(base = 0)
...
%N = @provide(base = input_count)
// multiple equivalent expressions
a = ...
b = ...
valid = ieq(a, b)
@use(valid)
Expressions are evaluated by emulating the shader using
nir_eval_const_opcode.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39076 >
2026-01-15 19:09:37 +00:00
Emma Anholt
8ebe630a13
nir/search_helpers: Avoid UB in is_2x_16_bits()/is_neg2x_16_bits().
...
Same trick we do for nir_imul evaluation -- do the multiply in unsigned to
get defined behavior from C. Fixes UBSan failures with
nir_opt_algebraic_pattern_tests.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39076 >
2026-01-15 19:09:37 +00:00
Emma Anholt
7dbd170a7f
nir/opcodes: Cast isub/iadd3's args to uint to avoid UB integer underflow.
...
Same treatment as iadd itself got.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39076 >
2026-01-15 19:09:37 +00:00
Emma Anholt
8529aaa399
nir/opcodes: Avoid technical UB left shifting ints.
...
We all know that (int)0xff << 24 is fine, but UBSan doesn't like it.
These were triggered by nir_opt_algebraic_pattern_tests.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39076 >
2026-01-15 19:09:37 +00:00
Konstantin Seurer
079d416e99
nir: Fix the types of udot_.*_uadd_sat
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39076 >
2026-01-15 19:09:37 +00:00
Konstantin Seurer
38d0bd7dd3
nir: Add an assert_eq intrinsic for testing nir_opt_algebraic
...
During the test this will compares both sources and fails the test if they
are not equal.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39076 >
2026-01-15 19:09:37 +00:00
Emma Anholt
ed8676dc28
nir: Rename the unit_test_*_amd intrinics to be un-vendored.
...
We'll reuse these from the nir_opt_algebraic_pattern_test.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39076 >
2026-01-15 19:09:37 +00:00
Emma Anholt
0dc3276a26
nir: Define udot_2x16_uadd_sat to have UB according to the SPIRV spec.
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39076 >
2026-01-15 19:09:32 +00:00
Emma Anholt
f638eb1b85
nir: Define extract/insert_i8 and friends to be UB if the shift is too large.
...
These opcodes are generated inside NIR algebraic when the shift is
constant, but this will help us do automated algebraic pattern testing
with arbitrary inputs that are unaware of the opcode's restrictions.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39076 >
2026-01-15 19:09:32 +00:00
Emma Anholt
045ae759a5
nir: Specify f2i/f2u as undefined if the float is out of range of the int.
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39076 >
2026-01-15 19:09:32 +00:00
Emma Anholt
94f0e2dbaf
nir/constant_expressions: Set the poison flag during i/ubitfield_extract.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39076 >
2026-01-15 19:09:32 +00:00
Emma Anholt
b375da7f2a
nir: Let nir_eval_const_opcode() return a poison mask in case of UB.
...
This is unused by any callers currently, but will be useful for nir
algebraic pattern testing, and as a way to turn our comments in
nir_opcodes.py into actual C code. For now, always returns false.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39076 >
2026-01-15 19:09:32 +00:00
Emma Anholt
f6008645f6
nir: Fix constant evaluation of non-32-bit bitfield_extract.
...
Caught by nir_opt_algebraic_pattern_tests.
Fixes: 226b0e28db ("nir: generalize bitfield insert/extract sizes")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39076 >
2026-01-15 19:09:29 +00:00
Emma Anholt
5bd669868f
nir: Add a note on how load_sample_pos_from_id works.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38911 >
2026-01-15 07:52:14 +00:00
Aitor Camacho
fcf53988c4
nir/opt_varyings: Support implementations that cannot compact 16-bits
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Add nir_io_compact_to_higher_16 flag so that the pass knows if it can
compact 16-bit varyings into the higher 16 bits of a 32-bit varying.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38994 >
2026-01-14 20:44:41 +00:00
Georg Lehmann
fdfe3acdf0
nir/constant_expression: remove fquantize2f16 denorm special case
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Unnessecary, as any fp32 denorm would be 0 here already.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39266 >
2026-01-14 17:05:24 +00:00