Commit graph

206017 commits

Author SHA1 Message Date
Daniel Schürmann
51a2e1eb94 aco/ra: don't use kill-flags as indicator in get_reg_create_vector()
We are about to re-use this function for vector-aligned operands.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34359>
2025-05-28 09:24:17 +00:00
Daniel Schürmann
3d8b355f22 aco/assembler: support vector-aligned operands on MIMG instructions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34359>
2025-05-28 09:24:17 +00:00
Daniel Schürmann
8cb1700c74 aco/print_ir: print parenthesis around vector-aligned operands
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34359>
2025-05-28 09:24:16 +00:00
Daniel Schürmann
6aabcb02a1 aco/print_ir: only print 'lateKill' if requested via print_kill flag
Also only print lateKill for actually killed operands.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34359>
2025-05-28 09:24:16 +00:00
Daniel Schürmann
a9645fdd89 aco: introduce concept of vector-aligned Operands
Operand::isVectorAligned indicates that the Operand is part of a vector
consisting of multiple operands. Therefore, it must reside in a register
aligned with the next Operand.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34359>
2025-05-28 09:24:16 +00:00
Daniel Schürmann
a4fa3935fd aco/live_var_analysis: set same lateKill flags for same operands
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34359>
2025-05-28 09:24:16 +00:00
Daniel Schürmann
ee0ee282b9 aco: simplify Operand() constructor
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34359>
2025-05-28 09:24:16 +00:00
Mary Guillemard
19531a0162 pan/csf: Fix typo in cs_trace_run_idvs2
This should have been a multiply not an add.
Fix an assertion when running in tracing mode on panvk.

Fixes: 79a1d98e1e ("pan/csf: make cs_builder.h usable from c++")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35176>
2025-05-28 10:12:19 +02:00
Samuel Pitoiset
2ebfa64be7 radv: add radv_disable_hiz_his_gfx12 and enable for Mafia Definitive Edition
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This is a workaround for random GPU hangs with HiZ/HiS on GFX12
because the correct fix is complex and it will take time to be
implemented properly.

Mafia Definitive Edition is the first known game affected by this.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13222
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35182>
2025-05-28 07:20:26 +00:00
Marek Olšák
35c76bc7f7 nir/tcs_info: use range analysis to determine the range of tess levels
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35195>
2025-05-28 06:46:56 +00:00
Marek Olšák
24c3f30e4a nir/tcs_info: gather which patch outputs are only read/written by invoc 0
Tested thoroughly by a shader test.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35195>
2025-05-28 06:46:56 +00:00
Marek Olšák
a3632d7d88 nir/tcs_info: gather for all patch outputs whether they're written by all invocs
This substantially rewrites the pass. It also makes it easier to read.
Tested thoroughly by a shader test.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35195>
2025-05-28 06:46:56 +00:00
Faith Ekstrand
6b265d9d7d nvk: Use NAK by default on Kepler
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
At this point it's way more correct than codegen.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34975>
2025-05-28 01:47:19 +00:00
Faith Ekstrand
a37c50e985 nak/sm20: Encode OpSuLdGa and OpSuStGa
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34975>
2025-05-28 01:47:19 +00:00
Lorenzo Rossi
2a5ac439f5 nak/sm20: Encode imadsp
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34975>
2025-05-28 01:47:19 +00:00
Faith Ekstrand
2c0957d086 nak/sm20: Encode surface address ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34975>
2025-05-28 01:47:19 +00:00
Lorenzo Rossi
4d86f95cff nak/sm32: Encode surface address ops
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34975>
2025-05-28 01:47:19 +00:00
Lorenzo Rossi
2c0d0bad01 nak: Remove unused intrinsic image_load_raw_nv
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34975>
2025-05-28 01:47:19 +00:00
Lorenzo Rossi
ac3fd5768b nak: Add surface address ops
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34975>
2025-05-28 01:47:19 +00:00
Faith Ekstrand
82d789d22a nvk: Lower images to addresses on Kepler
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34975>
2025-05-28 01:47:19 +00:00
Lorenzo Rossi
bb3f4b86bf nvk: Use nil_su_info for image descriptors on Kepler
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34975>
2025-05-28 01:47:19 +00:00
Lorenzo Rossi
e5d4c4934d nak: Add an image address lowering pass
On Kepler, we don't have real surface opcodes. Instead, we have a bunch
of helper ops which make image calculations in the shader reasonably
efficient and we have to lower to that and an address-based load/store.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34975>
2025-05-28 01:47:19 +00:00
Faith Ekstrand
0b06feee92 nouveau: Move bitview to a common rust util folder
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34975>
2025-05-28 01:47:19 +00:00
Lorenzo Rossi
5fbcdd6e32 nir,nak: Add NV-specific image intrinsics
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34975>
2025-05-28 01:47:19 +00:00
Lorenzo Rossi
a27a711c3a nil: Add helpers for filling out Fermi/Kepler surface info
Kepler needs different descriptors for Image storage, these descriptors
are not directly used by the hardware but by lowering instructions
(added in later commits)

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34975>
2025-05-28 01:47:19 +00:00
Faith Ekstrand
e388f25a2a nil: Align linear image strides to the image alignment
This is a function no-op right.  In the case where we don't have an
explicit_row_stride_B, we use an alignment of 128B which is what we were
aligning the row stride to before.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34975>
2025-05-28 01:47:18 +00:00
Faith Ekstrand
7a577d2e3a nvk: Drop the union from nvk_buffer_view
The space saved is tiny and not having the union at all makes me way
more comfortable about the modifications we're about to do.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34975>
2025-05-28 01:47:18 +00:00
Adam Jackson
4b1c824b67 vtn/opencl: Handle OpenCLstd_F{Min,Max}_common
Normal fmin doesn't make any promises about NaN, common additionally
doesn't make any promises about infinities. Would be nice to hook that
up to codegen but lowering them to normal works for now.

Cc: mesa-stable
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34941>
2025-05-28 01:08:20 +00:00
Adam Jackson
92f07860a4 vtn: (Silently) handle FunctionParameterAttributeNo{Capture,Write}
Silences a few thousand warnings in sycl/test-e2e

Cc: mesa-stable
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34941>
2025-05-28 01:08:20 +00:00
Adam Jackson
fd7589d775 vtn: Handle SPV_KHR_uniform_group_instructions
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34941>
2025-05-28 01:08:20 +00:00
Caleb Callaway
52db0e1480 intel/compiler: fix SHA generation for shader replace
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35140>
2025-05-27 22:57:19 +00:00
Faith Ekstrand
8ffe0098be nvk: Reserve a sampler for TXF on Kepler
The SPIR-V spec says texelFetch and friends don't take a sampler.
However, on Kepler and earlier hardware, the sampler is read even for
tld.  In particular, the hardware reads the sRGB conversion bit in the
sampler and this can be in an inconsistent state if we haven't
initialized samplers properly.  On Kepler, we should just reserve a
sampler at device creation time and always use that for tld.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35190>
2025-05-27 22:23:37 +00:00
Faith Ekstrand
bfdc95b109 nak: Scalarize non-constant ald/ast on Kepler
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35190>
2025-05-27 22:23:36 +00:00
Faith Ekstrand
f10c42fcc1 bitview: Implement SetFieldU64 for all BitViewMutable
There's no reason why we need to keep overriding this.  There's also
probably not a good reason why this trait exists at all but that's a
problem for another day.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35190>
2025-05-27 22:23:36 +00:00
Eric Engestrom
6ec69e5a07 gallium: drop dynamic pipe-loader leftovers
Fixes: 30c5c7d811 ("gallium: remove dynamic pipe-loader")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35185>
2025-05-27 21:44:31 +00:00
Karol Herbst
0a9b871b9e rusticl: support cl_khr_kernel_clock
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35179>
2025-05-27 19:57:28 +00:00
Karol Herbst
8144c7ee86 rusticl: generate bindings for llvm version macros
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35179>
2025-05-27 19:57:28 +00:00
Karol Herbst
f5a9a80f29 clc: wire up cl_khr_kernel_clock
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35179>
2025-05-27 19:57:28 +00:00
Samuel Pitoiset
63758bc093 radv: fix capture/replay with sparse images and descriptor buffer
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The sparse image VA needs to be returned to the application for replay.

Reported by Baldur.

VKCTS has coverage but it doesn't verify this yet.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35162>
2025-05-27 19:30:18 +00:00
Eric Engestrom
a628190e0d ci/vkd3d: collapse section by default
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35180>
2025-05-27 18:52:50 +00:00
Eric Engestrom
f12f2bcae1 ci: uprev vkd3d
A new group of descriptor aliasing tests was added; let's run these in CI :)

7e829e8836...041cfa7558

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35180>
2025-05-27 18:52:50 +00:00
Erik Faye-Lund
738b95a35e panfrost: add max_4x_msaa quirk
Turns out, some Midgard GPUs don't support more than 4x MSAA. Add a
quirk for those GPUs, so don't expose it when it doesn't work.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35184>
2025-05-27 17:41:47 +00:00
Erik Faye-Lund
3a78d9213b panfrost: pass quirks through __VA_ARGS__
We can't easily pass multiple initializers here, because a comma in the
initializer list would be treated as a preprocessor argument separator
and not a separator in the initializer lst.

We could also have fixed this with some nested macro ugliness, but let's
instead do what nir_builder does for intrinsic indices and use __VA_ARGS__
to keep this neat.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35184>
2025-05-27 17:41:47 +00:00
Erik Faye-Lund
e77e4d5c17 panfrost: change tie-breaking rule for 16x MSAA
When using 16x MSAA, we have two sample-positions on the negative
boundary of the unit-square covering the pixel. This causes problems
when using the default tie-breaking rule, where we miss some
sample-positions when rasterizing primitives covering the entire
viewport.

This works fine on Bifrost and later, but this setting is ignored on
those GPUs, and they assume the default (e.g MINUS_180_OUT_0_IN).
Because we'd prefer for rasterization to match between Midgard and
Bifrost when we can, we only apply this when we have 16x MSAA.

As an added bonus, this behavior matches what the DDK does.

Fixes these tests when 16x MSAA is enabled:
- dEQP-GLES31.functional.texture.multisample.samples_16.use_texture_*
- dEQP-GLES3.functional.multisample.fbo_max_samples.proportionality_alpha_to_coverage

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35184>
2025-05-27 17:41:47 +00:00
Erik Faye-Lund
130bbf20c7 panfrost: properly compute tile-buffer requirements
This should be helful when we want to enable higher sample counts.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35184>
2025-05-27 17:41:47 +00:00
Erik Faye-Lund
64becaf142 panfrost: re-align table
The formatting here has grown some warts over time, let's clean it up a
bit.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35184>
2025-05-27 17:41:47 +00:00
Erik Faye-Lund
cf28edd8bd panfrost: do not calculate max-msaa on v4
The V4 GPUs doesn't have the dynamic allocation logic that V5 and later
has. There's nothing to calculate here; the GPU either supports 8x MSAA,
or 4x MSAA.

Since 8x MSAA is the architectural max, let's have this function report
that. We deal with the 4x limit separately as a quirk, because this
applies to some V5 GPUs as well.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35184>
2025-05-27 17:41:47 +00:00
Erik Faye-Lund
483ce5a1dc panfrost: do not try to use 4x4 tiles on v4 gpus
Mali V4 GPUs only ever use 16x16 tiles, so we need to set the minimum
tile-size to match.

Fixes: 329568b5eb ("panfrost: add color-attachment and msaa helpers")
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35184>
2025-05-27 17:41:47 +00:00
Erik Faye-Lund
7de12da5a2 panfrost: v4 does not support 16x msaa
This value isn't valid on V4, so let's make sure we don't try to use it.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35184>
2025-05-27 17:41:47 +00:00
Erik Faye-Lund
439b88c619 mesa/main: remove non-existing function prototype
This function was removed about a decade ago, let's get rid of the
prototype as well!

Fixes: a347a0f53f ("mesa: Completely remove QuerySamplesForFormat from driver func table")
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35184>
2025-05-27 17:41:47 +00:00