Commit graph

203255 commits

Author SHA1 Message Date
Rhys Perry
82420ebc2c aco: fix PS epilog dual-source blending with only one color output
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40005>
2026-03-05 09:38:23 +00:00
Samuel Pitoiset
783c065f3b radv: always fast-clear non-MSAA color image with comp-to-single on GFX10-10.3
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This should enable fast-clear for color images with the GENERAL layout
on GFX10-10.3. This seems important because DXVK tends to use that
layout more often now.

There are still issues with MSAA images, so it's only enabled for
single-sampled.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40145>
2026-03-05 08:34:43 +00:00
Samuel Pitoiset
9de465da81 radv: remove radv_disable_depth_storage drirc
This was only for TW3.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40214>
2026-03-05 07:55:27 +00:00
Samuel Pitoiset
74defc5f24 radv: disable STORAGE for depth-only formats
This is actually not needed because nobody is using storage with
depth-only formats and compression doesn't work at all anyways.

PAL and native don't allow this either.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40214>
2026-03-05 07:55:26 +00:00
Ian Romanick
8624da56ee brw: Also check for ADDRESS file in update_for_reads
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Like accumulators and ARF address registers, the virtual address
registers are not tracked in a way the defs analysis can know
about. This could actually be fixed, but that is future work.

Fixes: b110b06447 ("brw: introduce a new register type for the address register")
Suggested-by: Lionel
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40083>
2026-03-05 00:02:51 +00:00
Ian Romanick
366410e913 brw: Use brw_reg_is_arf in update_for_reads
brw_reg::nr encodes both which ARF it is and which instance of that
ARF. In other words, nr for acc0 and acc2 have some bits that say
BRW_ARF_ACCUMULATOR and some bits that say 0 vs 2. The previous test
would only detect acc0.

Fixes: 0d144821f0 ("intel/brw: Add a new def analysis pass")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40083>
2026-03-05 00:02:51 +00:00
Ian Romanick
a548466186 brw: Don't mark_invalid in update_for_reads for non-VGRF destination
This can occur if NULL or an accumulator is an explicit destination.
update_for_reads still needs to process the sources.

v2: Pass a brw_reg to ::mark_invalid, and do the VGRF check in that one
place.

Fixes: 0d144821f0 ("intel/brw: Add a new def analysis pass")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40083>
2026-03-05 00:02:50 +00:00
Jason Macnak
c3ce55ff21 gfxstream: Fix StagingInfo destruction ordering
Encoders contain a reference to the stream so those should be
destructed first.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39330>
2026-03-04 23:45:40 +00:00
Val Packett
7bd096ca51 util/rust: Add memory map access mode detection to descriptor API
Add a method for determining which MESA_MAP_ACCESS_* flag would be
appropriate for a given OwnedDescriptor, based on both access flags and
write seals (since access mode can be RDWR despite the seals!)

This is useful for virtgpu implementations when mapping incoming buffers
from host software into the guest's address space. Previously Rutabaga
relied on basic heuristics like "SHM is always R/O", but with upcoming
extra protocols to be forwarded over virtgpu channels (like PipeWire)
those assumptions no longer hold true.

Signed-off-by: Val Packett <val@packett.cool>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40132>
2026-03-04 23:12:22 +00:00
Christian Gmeiner
651cf906e2 isaspec: Use %g format for float display to ensure round-trip fidelity
Change the TYPE_FLOAT display format from %f to %g with sufficient
significant digits (%.5g for f16, %.9g for f32), so that float
immediates round-trip correctly through disassembly and assembly.

The %f format loses precision for small values: f16 0x0001 (denormal
~5.96e-8) displays as 0.000000, which parses back as 0x0000. The %g
format uses the minimum significant digits per IEEE 754 and strips
trailing zeros, using scientific notation when needed. Whole-number
values use %.1f to keep them unambiguously float (e.g. "1.0").

Update the etnaviv PEST grammar and the freedreno ir3 lexer/parser to
accept the new output formats (scientific notation, stripped zeros).

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40207>
2026-03-04 22:42:27 +00:00
Caio Oliveira
ce1a9fbbc6 spirv: Remove conversions from vtn_nir_alu_op_for_spirv_opcode()
They were already being handled explicitly in vtn_alu, so just handle
them directly for spec constants too -- that has to do special work
for conversions anyway.  Remove the bit-size parameters from the function.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40157>
2026-03-04 22:04:45 +00:00
Caio Oliveira
6affcb43a7 spirv: Fix spec constant to handle Select for non-native floats
There was an assumption that if the instruction had non-native float
as a source, the first source would have such type.  This doesn't
hold for Select, and the code failed in two ways

- The boolean source of Select was being converted to the non-native
  float type.

- The loop that resolves the bit-size for unsized operands would
  trip at `assert(i == 0)` because Select has more than one source.

Re-organize the code to track the types of the sources independently,
and fix both issues above.

Fixes: 90e1b12890 ("spirv: Add bfloat16 support to SpecConstantOp")
Fixes: 51d3c4c889 ("spirv: support float8 spec constant op")
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40157>
2026-03-04 22:04:45 +00:00
Caio Oliveira
b0c3b20bff spirv: Pull constant source fixup to the existing loop
Backport-to: 26.0
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40157>
2026-03-04 22:04:44 +00:00
Caio Oliveira
1c3c987d5c spirv: Refactor ALU opcode translation to take bit sizes
Only used by Convert operations, so just pass 0 from callers that
are not Convert and clarify that in the code.

Backport-to: 26.0
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40157>
2026-03-04 22:04:44 +00:00
Sagar Ghuge
3a62dc0218 anv: Set max outstanding ray queries to 1024
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Set max outstanding ray queries to 1024. This value can be tuned later
specific to apps.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40182>
2026-03-04 21:45:14 +00:00
Marek Olšák
cc3401665d radeonsi: rename si_shader_gs/vs -> si_shader_gs/vs_legacy
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40022>
2026-03-04 21:14:56 +00:00
Marek Olšák
f421eecebe radv,radeonsi: PA_SC_BINNER changes for gfx12
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40022>
2026-03-04 21:14:56 +00:00
Marek Olšák
22f3761579 radv: make radv_postprocess_binary_config more correct and more readable
- don't set fields that don't exist on some generations
- add gfx_level checks for MEM_ORDERED even when it's technically not needed

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40022>
2026-03-04 21:14:56 +00:00
Marek Olšák
fd6941650c ac: add ac_cu_info::has_fmask, adjust FMASK checks
Some of these should check has_fmask, others should check < GFX11.

v2: move to ac_cu_info

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40022>
2026-03-04 21:14:56 +00:00
Marek Olšák
4cfe08e583 ac: set the correct number of Z planes for ALLOW_EXPCLEAR
This is an old driver bug that could cause Z corruption on gfx8-11.5.

v2: handle allow_expclear differently

Cc: mesa-stable

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> (v1)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> (v2)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40022>
2026-03-04 21:14:56 +00:00
Marek Olšák
4548ccaceb radeonsi: don't set any EXPCLEAR state on gfx12+
it's not supported there

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40022>
2026-03-04 21:14:56 +00:00
Marek Olšák
fae7aef5ca ac: tidy up ac_hw_cache_flags
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40022>
2026-03-04 21:14:56 +00:00
Marek Olšák
18bcfbe1b3 ac/llvm: encode LLVM cache flags manually
so that ac_hw_cache_flags doesn't have to match LLVM

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40022>
2026-03-04 21:14:56 +00:00
Marek Olšák
ed131f6347 ac/gpu_info: handle more VRAM types
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40022>
2026-03-04 21:14:56 +00:00
Lionel Landwerlin
db964068bf anv: add drirc option to workaround missing application barriers on typed/untyped data
Enable it for Horizon Forbidden West (only seems to have untyped data
issue).

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14889
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40187>
2026-03-04 20:40:59 +00:00
Lionel Landwerlin
13bf1a4008 anv: add an analysis pass to detect compute shaders clearing data
Applications often miss emitting barriers between a shader
initializing data & another shader writing data in the same location
afterward. This is very common for UAVs (see vkd3d-proton).

Vkd3d-proton does a pretty good job as inserting missing barriers
between UAV clears & writes. But some applications also have similar
issues with custom shaders. Here we introduce an analysis pass that
recognize shaders doing clear/initialization. We'll use that
information in the following commit to insert barriers after those
shaders.

Since Gfx12.5 our HW has become a lot more sensitive to those issues
due to the introduction of an L1 untyped data cache that is not
coherent across the shader units. On Gfx20+, typed data is also L1
cacheable exposing even more issues.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40187>
2026-03-04 20:40:59 +00:00
Lionel Landwerlin
0722f50d7b anv: remove unused bind_map field
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 487586fefa ("anv: implement inline parameter promotion from push constants")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40187>
2026-03-04 20:40:58 +00:00
Yiwei Zhang
f85416e79d ci/venus: skip broken drm display tests
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40227>
2026-03-04 20:20:14 +00:00
Georg Lehmann
6a218e346d nir: remove lower_vector_cmp
Use nir_lower_alu_width or nir_lower_alu_to_scalar instead.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40197>
2026-03-04 19:50:28 +00:00
Georg Lehmann
f628cd0333 r300: use nir_lower_alu_width to lower vector compare
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40197>
2026-03-04 19:50:28 +00:00
Georg Lehmann
35746f64ea freedreno/ir2: use nir_lower_alu_width to lower vector compare
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40197>
2026-03-04 19:50:28 +00:00
Georg Lehmann
4a794ddaef lima: use nir_lower_alu_width to lower vector compare
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40197>
2026-03-04 19:50:28 +00:00
Georg Lehmann
c40e496361 etnaviv: use nir_lower_alu_width to lower vector compare
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40197>
2026-03-04 19:50:28 +00:00
Georg Lehmann
0a219d8099 bifrost: use nir_lower_alu_width to lower vector comparisons
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40197>
2026-03-04 19:50:28 +00:00
Georg Lehmann
92510c9fb8 zink: use nir_lower_alu_to_scalar to lower vector compare
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40197>
2026-03-04 19:50:27 +00:00
Georg Lehmann
dfd35d3a3c kk,llvmpipe,nouveau: remove lower_vector_cmp from scalar backends
nir_lower_alu_width already does this.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40197>
2026-03-04 19:50:27 +00:00
Georg Lehmann
b6d75d3cda i915,nv30,softpipe,svga,mesa/st: remove lower_vector_cmp for tgsi backends
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40197>
2026-03-04 19:50:27 +00:00
Georg Lehmann
5e7c8c3009 ntt: lower vector comparisons using nir_lower_alu_to_scalar
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40197>
2026-03-04 19:50:27 +00:00
Georg Lehmann
3e6e1e213c nir: remove fall_equal/fany_nequal opcodes
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40197>
2026-03-04 19:50:27 +00:00
Georg Lehmann
d6977adc09 nir/lower_bool_to_float: assert that vector comparisons were lowered
There are no backends that handle the vector comparisons with float result.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40197>
2026-03-04 19:50:27 +00:00
Jordan Justen
0b94b15a3c anv: Add Xe3P (GFX_VERx10==350)
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: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40208>
2026-03-04 11:10:34 -08:00
Jordan Justen
1a12bca465 intel/l3: Add Xe3P (GFX_VERx10==350)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40208>
2026-03-04 11:10:34 -08:00
Jordan Justen
faefb3eec0 iris: Build for Xe3P (GFX_VERx10 == 350)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40208>
2026-03-04 11:10:34 -08:00
Jordan Justen
81d9ede7d6 intel/shaders: Build for Xe3P (GFX_VERx10 == 350)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40208>
2026-03-04 11:10:34 -08:00
Jordan Justen
218ba16232 intel/isl: Build for Xe3P (GFX_VERx10 == 350)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40208>
2026-03-04 11:10:34 -08:00
Jordan Justen
123e553b30 intel/genxml: Add gen125_rt.xml to default_imports in intel_genxml.py
This doesn't have a functional impact, but when this command is run:

$ src/intel/genxml/genxml_import.py --import

It causes the gen125_rt.xml file to be processed in the expected
order, before xe2.xml.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40217>
2026-03-04 10:08:41 -08:00
Jordan Justen
a135dcf165 intel/genxml: Fix Xe3P import filenames in intel_genxml.py
This fixes this command:

$ src/intel/genxml/genxml_import.py --import

Reported-by: Nicholas Ansell
Fixes: 22796f6cb1 ("intel/genxml: Start Xe3P (GFX_VERx10 == 350) support (xe3p.xml, xe3p_rt.xml)")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40217>
2026-03-04 10:07:45 -08:00
Felix DeGrood
e24078deae anv: report correct format for depth/stencil blorps in utrace
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: Felix DeGrood <felix.j.degrood@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40184>
2026-03-04 16:53:29 +00:00
Samuel Pitoiset
37ba573877 radv/meta: set the depth/stencil resolve region depth to 1
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
No 3D.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40135>
2026-03-04 15:12:54 +00:00
Samuel Pitoiset
4d3549d372 radv/meta: rework the barrier for depth/stencil resolves
Yes, COLOR_ATTACHMENT_WRITE_BIT can be used to synchronize ds resolves.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40135>
2026-03-04 15:12:54 +00:00