Commit graph

218856 commits

Author SHA1 Message Date
Alyssa Rosenzweig
9da61b3ea5 nir/opt_uniform_atomics: use data helper
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39939>
2026-02-19 14:47:11 +00:00
Alyssa Rosenzweig
76d5436f04 nir/lower_atomics: use data helper
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39939>
2026-02-19 14:47:11 +00:00
Alyssa Rosenzweig
8fb1d65426 nir: add nir_get_io_data_src
This complements our existing nir_get_io_index_src helper. Most, but annoyingly
not all, stores put their data source in source 0. Having a helper for this lets
us reduce special casing in a bunch of random places.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39939>
2026-02-19 14:47:11 +00:00
Romaric Jodin
2c5af51f98 pan/bi: lower phis to scalar early
This is a partial revert of
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38821/diffs?commit_id=2bd282a9680f6a53bff70f54e60b1c10aefce97a

We need to run `nir_lower_phis_to_scalar` early to make sure
`nir_opt_remove_phis` can do its work before other passes make it too
complicated to optimise with the existing passes.

More information here:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38821#note_3262002

Review-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Review-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39918>
2026-02-19 14:11:57 +00:00
David Rosca
0d7117f0d7 ac/vcn_dec: Fix tier2 dpb array size
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
In some cases, this would incorrectly set higher dpbArraySize
when overwriting already existing dpb slot.
This didn't seem to cause any issues, but the extra slot would
have zero va which was wrong.
Get the actual ref count from codec param, instead of using
cmd->num_refs which always includes current slot. Also add sanity
check that the ref surface was found.

Fixes: 79af03556c ("ac: Add VCN ac_video_dec implementation")
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39877>
2026-02-19 12:24:29 +00:00
Maíra Canal
1823bb67f9 broadcom/ci: don't skip dynamic loop tests in RPi 3
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
These tests were previously skipped because they contain dynamic loops
in the VS, which can cause GPU resets on VC4. However, (1) the only
tests that cause GPU resets are the ones that have divergent loops and
(2) now, the compiler is able to fail shader linking when it finds
divergent loops.

Therefore, allow tests with non-divergent loops to run on the CI and
add tests with divergent loops to the fail list.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39768>
2026-02-19 09:57:05 +00:00
Maíra Canal
e1aac4f7e0 vc4: fail VS compilation on divergent loops
VC4 hardware doesn't have a dispatch mask for the VS, so divergent
loops can have undefined/garbage contents in some execution channels,
potentially causing infinite loops and GPU hangs.

Fail shader linking instead of hanging the GPU when a divergent loop is
detected in a vertex shader.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39768>
2026-02-19 09:57:05 +00:00
Maíra Canal
5a1e0112a9 nir: add load_texture_scale intrinsic
Add load_texture_scale to the list of intrinsics whose divergence
depends on their sources. This is needed to support running divergence
analysis on VC4.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39768>
2026-02-19 09:57:05 +00:00
Maíra Canal
6f58861b95 vc4: drop redundant shader->failed reassignment
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39768>
2026-02-19 09:57:05 +00:00
Juan A. Suarez Romero
df22e50ab5 st/pbo_compute: remove unused variables
This fixes some dead assignment issues detected with static analyzer.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39578>
2026-02-19 09:32:44 +00:00
Juan A. Suarez Romero
56258f4cfd v3d,v3dv: emit always set point size
On V3D 4.2 (Raspberry Pi 4), there is a hardware bug where the binner
can trigger a GPU reset in some situations where primitives are
discarded, such as due to primitive restarts.

The way to avoid this is to force the binner to do always something, by
emitting the proper CL. In this case we decided to always set point
size, as it is a very simple and fast operation.

This fixes resets caused by
dEQP-VK.pipeline.monolithic.input_assembly.primitive_restart.*.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39826>
2026-02-19 09:07:03 +00:00
Juan A. Suarez Romero
0df50e8ed1 v3d: fix leak in blit fast
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Unref destination buffer's texture before returning.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39885>
2026-02-19 08:50:05 +00:00
Pavel Ondračka
451895c1d0 i915/ci: update expectations
Some new unrolls after d66de1bb49.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39980>
2026-02-19 08:12:34 +00:00
Pavel Ondračka
1a3525ed1c r300/ci: update expectations
Expectation updates after d66de1bb49.

Mostly more unrolls and thus fixes for the R3xx/R4xx, however also a
single new fail that looks like an uncovered R5xx backend bug.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39980>
2026-02-19 08:12:33 +00:00
Samuel Pitoiset
8b5296b01c radv: simplify buffer-to-image and image-to-image operations for 96-bit formats
It's possible to use the existing shaders with a small tweak. This
removes a bunch of code in meta.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39935>
2026-02-19 07:12:47 +00:00
Kenneth Graunke
1478329c53 iris: Move ALT mode handling from brw to iris
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
We just read this from the NIR and store it in iris_compiled_shader,
there's no reason for the backend compiler to be involved.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39926>
2026-02-19 02:51:00 +00:00
Kenneth Graunke
b985494d6f iris: Create our own enums for system values
These days, our system value concept is just about iris_program
communicating to iris_state which values to upload into a UBO.
Nowhere in that process is the backend compiler involved, so it
doesn't make sense for there to be brw/elk mechanisms.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39926>
2026-02-19 02:51:00 +00:00
Kenneth Graunke
53c5798194 iris: Move passthrough TCS generation out of brw and into iris
iris needs this, but anv does not, and it's just a small wrapper around
common NIR lowering anyway.  This also removes some brw/elk splitting.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39926>
2026-02-19 02:50:59 +00:00
Kenneth Graunke
341687a019 brw: Drop extra validation from TCS passthrough creation
nir_create_passthrough_tcs already validates the result, we don't need
to validate a second time.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39926>
2026-02-19 02:50:59 +00:00
Kenneth Graunke
a8481295d8 brw: Only lower system values for passthrough TCS
This cuts 75 passes that do nothing useful.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39926>
2026-02-19 02:50:58 +00:00
Rob Clark
78bab99812 freedreno: Move some draw regs into driver
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
When these are correctly mapped to draw usage, we can't rely on them
being globally initialized in tu_init_hw().  They need to be re-
initialized after rp stomping.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39819>
2026-02-19 00:56:43 +00:00
Rob Clark
d4d2684811 freedreno/decode: Use reg usage for reg summary
Use information about register usage to decide what to dump for register
summaries.  If --allregs, we continue to dump all regs that we have seen
a register write for.  Otherwise we dump registers that are written
since last summary (as before) along with regs with the appropriate
usage.

A new column at the start of the line will show a '?' for registers that
don't match the existing usage (ie. they have been written but usage
doesn't match current "draw").  This could simply mean it is the first
"draw" in the render-pass (collecting per-renderpass values).  Or it
could mean a mis-attributed or missing register usage.  This new column
is only included for a6xx and newer, since older gens don't have usage
specified in xml.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14829
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39819>
2026-02-19 00:56:43 +00:00
Rob Clark
b0907c004e freedreno/decode: Remove prefetch-test
We have other better tests for this now.  And the next patch will
balloon the reference trace to 90MB due to large # of draw calls.  So
just drop this test.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39819>
2026-02-19 00:56:43 +00:00
Rob Clark
f71bd97be6 freedreno/rnn: Track reg usage
Previously this was only used by gen_header.py, but now cffdec will use
it.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39819>
2026-02-19 00:56:43 +00:00
Rob Clark
48c2e15117 freedreno/registers: Usage additions/corrections
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39819>
2026-02-19 00:56:43 +00:00
Rob Clark
a99164651e freedreno/registers: Move remaining rp_blit to draw
After separating out the compute/blit/resolve usages, what remains is 3d
draws.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39819>
2026-02-19 00:56:43 +00:00
Rob Clark
c84b069fca freedreno/registers: Split out compute usage
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39819>
2026-02-19 00:56:43 +00:00
Rob Clark
5e7324511f freedreno/registers: Split out "resolve" usage
I included LRZ fast-clear in resolve, since there wasn't a better place
to put it.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39819>
2026-02-19 00:56:43 +00:00
Rob Clark
28eadff6e4 freedreno/registers: Split out "blit" usage
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39819>
2026-02-19 00:56:43 +00:00
Rob Clark
5a2def3200 freedreno/registers: Rename some unknown A2D regs
Also, these are only in a6xx, update variants accordingly.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39819>
2026-02-19 00:56:43 +00:00
Rob Clark
a4f8a3a529 freedreno/registers: Move binning regs to "cmd"
Move VSC and other binning related registers to "cmd" usage, to better
reflect their use.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39819>
2026-02-19 00:56:43 +00:00
Rob Clark
4b1cfc1b6a tu: Mark TU_CMD_DIRTY_COMPUTE_DESC_SETS after stomping
The rp_blit regstomping will stomp SP_CS_BINDLESS_BASE.  We need to
re-emit this state after stomping.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39819>
2026-02-19 00:56:43 +00:00
Rob Clark
e9b1b46faf tu: Split out stomp_regs() helper
A future commit will split out rp_blit usage into multiple more
fine-grained usages.  Make this easier to accomodate.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39819>
2026-02-19 00:56:43 +00:00
Rob Clark
0f1b1bf7a8 freedreno/registers: Update GRAS_BIN_FOVEAT
New bitfield for enabling FDM offsets in gen8.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39819>
2026-02-19 00:56:43 +00:00
Rob Clark
67dd667a62 freedreno/registers: Update CP_COND_WRITE
Noticed a new bit on gen8.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39819>
2026-02-19 00:56:43 +00:00
Rob Clark
66a394ad9a freedreno/decode: Fix endswith()
The existing implementation did not account for register names that
contain the suffix multiple times (ie. FOO_HIT_COUNT_HI).

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39819>
2026-02-19 00:56:43 +00:00
Alyssa Rosenzweig
e172f97fdd nir/opt_constant_folding: optimize ballot(false)
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
always zero. noticed on dEQP-VK.subgroups.ballot.graphics.graphic

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39948>
2026-02-18 23:40:44 +00:00
Jianxun Zhang
7899854e62 driconf: Refactor CCS modifier disabling entry
It can be in the above block that has the same gtk
version range. This is a following up of review

https://gitlab.freedesktop.org/mesa/mesa/-/
merge_requests/39223#note_3329542

Suggested-by: Tapani Pälli <tapani.palli@intel.com>

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39950>
2026-02-18 22:57:31 +00:00
Mike Blumenkrantz
d47ba92d42 zink: only do pre-sync transfer barrier after a renderpass
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
this is otherwise pointless and (for swapchain images) broken
(because they may never have acquired an image)

discovered by @valentine

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39970>
2026-02-18 22:07:36 +00:00
Natalie Vock
47e4a68a83 radv: Initialize nir_lower_io_to_scalar progress variable
The NIR_PASS macro only overwrites this when the pass actually makes
progress. If the pass doesn't make progress, the variable stays
uninitialized.

Clang correctly spots this and warns about it.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39968>
2026-02-18 21:44:49 +00:00
Mike Blumenkrantz
44f2c40830 zink: fix broken compiler assert
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39961>
2026-02-18 21:23:44 +00:00
Eric Engestrom
2a9bb91a97 nvk+zink/ci: add rusticl testing
Adds almost 2 minutes of runtime but we don't care anyway because this
is a nightly job :)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30073>
2026-02-18 20:19:41 +00:00
Eric Engestrom
48d3eb8d89 ci/build: include rusticl in debian-build-x86_64
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30073>
2026-02-18 20:19:41 +00:00
Frank Binns
74fd985c6c pvr/ci: move some timing out tests from fails to skips
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Some of these test cases where already in the skip list.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39962>
2026-02-18 20:01:02 +00:00
Natalie Vock
59a397793e radv/rt: Only use ds_bvh_stack_rtn if the stack base is possible to encode
The hardware only provides 13 bits for encoding the stack base (in
dwords). That translates to the stack base being required to be below
8192 dwords, or 32kB. It's possible to exceed this - LDS is 64kB after
all. Add an explicit check to make sure we don't end up with offsets
that overflow the hw's address fields. This fixes Metro Exodus Enhanced
Edition, which was using ray queries in a 1024-thread sized workgroup,
resulting in exactly 64kB of LDS being required for the stack.

This check isn't required for RT pipelines as we always use 32 or 64
wide workgroups with no other LDS used, so it's impossible to reach this
stack base limit.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39691>
2026-02-18 19:12:18 +00:00
Collabora's Gfx CI Team
b0cc03dfbd Uprev VVL to snapshot-2026wk07
https://github.com/KhronosGroup/Vulkan-ValidationLayers/compare/snapshot-2026wk06...snapshot-2026wk07

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39907>
2026-02-18 18:30:28 +00:00
Olivia Lee
e10f29399f hk: fix passthrough GS key invalidation
Just seeing that a passthrough GS was already bound is not sufficient to
know that it is a *matching* passthrough GS. If the application binds a
new VS that requires a different passthrough GS key than the previous
VS, then we need to bind a different passthrough GS.

Fixes: 5bc8284816 ("hk: add Vulkan driver for Apple GPUs")
Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39624>
2026-02-18 18:10:35 +00:00
Rohan Garg
dfa9df7cfd anv: refactor add_aux_state_tracking_buffer for conciseness
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: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39562>
2026-02-18 17:40:10 +00:00
Rohan Garg
11f8f333e2 anv: set a private binding when the image is not externally shared
This allows anv to use a suballocator for the clear color address, which
should decrease our memory requirement.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13091
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39562>
2026-02-18 17:40:10 +00:00
Janne Grunau
651a321ee2 hk: Use aligned vector fill in hk_CmdFillBuffer if possible
30% faster with 16KB buffers, more than twice as fast with 8MB and
larger buffers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39780>
2026-02-18 17:20:48 +00:00