Commit graph

223931 commits

Author SHA1 Message Date
Alyssa Rosenzweig
ce4d2d7faa jay/register_allocate: make phi webs conservative
Noticed in a bunch of vkpeak shaders which had extra moves in the loop.

SIMD16:
   Totals from 547 (20.66% of 2647) affected shaders:
   Instrs: 1139024 -> 1131482 (-0.66%); split: -0.68%, +0.02%
   CodeSize: 15919528 -> 15834088 (-0.54%); split: -0.56%, +0.02%

SIMD32:
   Totals from 523 (19.76% of 2647) affected shaders:
   Instrs: 1271749 -> 1263534 (-0.65%); split: -0.75%, +0.10%
   CodeSize: 18180076 -> 18091180 (-0.49%); split: -0.60%, +0.11%

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42056>
2026-06-08 15:56:28 +00:00
Alyssa Rosenzweig
62e8998e39 jay: optimize out more early eot related copies
SIMD16:
   Totals from 1790 (67.62% of 2647) affected shaders:
   Instrs: 2082218 -> 2080428 (-0.09%)
   CodeSize: 29060912 -> 29046464 (-0.05%)

SIMD32:
   Totals from 2071 (78.24% of 2647) affected shaders:
   Instrs: 2163230 -> 2161159 (-0.10%)
   CodeSize: 30923760 -> 30906832 (-0.05%)

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42056>
2026-06-08 15:56:28 +00:00
Alyssa Rosenzweig
6812bddfe1 jay: uniformize bti indirects
these must be dynamically uniform but can be GPR. fixes validation on
dEQP-GLES31.functional.shaders.opaque_type_indexing.ubo.dynamically_uniform_tessellation_evaluation,
and probably really bugs doing indirect loads in divergent control flow
(when lane 0 is masked off).

no fossil-db changes.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42056>
2026-06-08 15:56:28 +00:00
Kenneth Graunke
9b82818510 anv: Fix shader stats when using jay for non-compute stages
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42056>
2026-06-08 15:56:27 +00:00
Calder Young
04cbd47f72 jay: Disable avoid_ternary_with_two_constants when using jay
This optimization mostly helped BRW because 3-src instructions can't take
immediates, and BRW can't allocate scalars without wasting an entire GRF unit
per scalar. Jay has a better RA that can pack many scalars into a single GRF
unit, so allocating temporary registers for the immediates is far less likely
to lead to as much spilling as it does on BRW.

SIMD16:
   Totals from 1331 (50.28% of 2647) affected shaders:
   Instrs: 1665848 -> 1665514 (-0.02%); split: -0.16%, +0.14%
   CodeSize: 23192072 -> 23215672 (+0.10%); split: -0.30%, +0.40%

SIMD32:
   Totals from 1114 (42.09% of 2647) affected shaders:
   Instrs: 1959968 -> 1960548 (+0.03%); split: -0.30%, +0.33%
   CodeSize: 28004460 -> 28023468 (+0.07%); split: -0.39%, +0.46%
   Number of spill instructions: 31157 -> 31161 (+0.01%); split: -0.01%, +0.03%
   Number of fill instructions: 32138 -> 32130 (-0.02%); split: -0.05%, +0.02%

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42056>
2026-06-08 15:56:27 +00:00
Alyssa Rosenzweig
e5450c4c85 jay: allow null in jay_collect_vectors
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42056>
2026-06-08 15:56:27 +00:00
Calder Young
101cc5e331 jay: Add support for saturating f2i16 and f2i8 NIR opcodes
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42056>
2026-06-08 15:56:27 +00:00
Alyssa Rosenzweig
010b443778 jay: fix last-use accounting with ARF sources
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42056>
2026-06-08 15:56:27 +00:00
Calder Young
6e66d1427d jay: Do not propagate ARF src unless its src0
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42056>
2026-06-08 15:56:27 +00:00
Alyssa Rosenzweig
8085f983b1 jay: follow source order for mad/bfe
otherwise s == 0 checks don't do the right thing.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42056>
2026-06-08 15:56:27 +00:00
Calder Young
7e74ba122a jay: Use gen_names.h to print CMODs and ARFs
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42056>
2026-06-08 15:56:27 +00:00
Calder Young
68753701e6 jay: Use gen_arf enums instead of jay_arf
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42056>
2026-06-08 15:56:27 +00:00
Kenneth Graunke
7db6fb7f0a jay: Fix rewrite_without_flags for SEL with other flag sources
The idea here is to eliminate the flag used for the select condition,
not eliminate other flag sources.

Previously, if we had an instruction like:

   gpr = SEL <not in flag> 0 <already in flag>

we would process source 0 and try to rewrite_without_flags().  Because
it's not in a flag, we think eliminating flags would be useful, so we
rewrite it.  But this only eliminates the source 2 selection flag, not
the source 0 flag.  It's valid to do so (but debatably useful).
However, we thought we were done, and skipped the setup that ensures
source 0's value was actually loaded into a flag.

Instead, we should just perform this optimization when processing the
selection flag (source 2).  By that point, we will have properly set
up any flags for sources 0 and 1.  And if source 2 is not in a flag,
we can decide to rewrite without it.  Or, if it's already in a flag,
we can keep it as-is.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42056>
2026-06-08 15:56:26 +00:00
Kenneth Graunke
a8b2f15dc4 jay: Improve unconditional discard removal
delete_solo_discard was removing unconditional discards in the case
where the entire program had been optimized away.  However, we can
do better: unconditional discards in the end block can be removed if

1. All render target writes after the discard have been eliminated
2. No intrinsics with side-effects (e.g. image stores) come after

See
dEQP-VK.fragment_operations.early_fragment.discard_early_fragment_tests_depth
where there's a discard at the end of the program which can be removed.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42056>
2026-06-08 15:56:26 +00:00
Kenneth Graunke
e7cfcf41f4 jay: Ignore RT store condition if there are no outputs
opt_unconditional_discards may eliminate all render target stores
due to all pixels being discarded.  In that case, it tries to add
one back with a Null RT and no colour/depth/stencil outputs, just
to end the thread.  In that case, we don't want to predicate it on
helper invocations - we just need a basic message to end the thread.

In particular, we already lowered nir_intrinsic_is_helper_invocation
so we don't want to emit it again, as nothing would lower it afterwards.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42056>
2026-06-08 15:56:26 +00:00
Kenneth Graunke
d4dce9d96c jay: Fix hard coded number of FS inputs
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42056>
2026-06-08 15:56:26 +00:00
Kenneth Graunke
c164ad3a00 jay: Assert FS input deltas exist
Clearer error message to help debugging.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42056>
2026-06-08 15:56:26 +00:00
Aitor Camacho
28d7132123 kk: Clean up per draw upload for tessellation stage
Reviewed-by: squidbus <squidbus@proton.me>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42024>
2026-06-08 15:39:33 +00:00
Aitor Camacho
9250f82461 kk: Move poly data out of root buffer
Reviewed-by: squidbus <squidbus@proton.me>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42024>
2026-06-08 15:39:33 +00:00
Aitor Camacho
7bd8954086 kk: Use subgroups for tessellation prefix count since they are now fixed
Reviewed-by: squidbus <squidbus@proton.me>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42024>
2026-06-08 15:39:33 +00:00
Aitor Camacho
25cef2e476 kk: Use index element size instead of Metal enum to avoid asserts
Since Metal only has 16 and 32 bit types, if 8 bit indices were used, we
would ran into asserts when trying to fetch the size from the util call.

Reviewed-by: squidbus <squidbus@proton.me>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42024>
2026-06-08 15:39:32 +00:00
Robert Mazur
aa26554e6c imagination/ci: Use standard CI-tron gfx-ci/linux kernel
Standard gfx-ci/linux kernel can be used for all imagination jobs.

Signed-off-by: Robert Mazur <robert.mazur@imgtec.com>
Co-authored-by: Martin Roukala <martin.roukala@mupuf.org>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41869>
2026-06-08 14:59:19 +00:00
Robert Mazur
81402777b6 ci: update kernel tag to v6.19-mesa-712d
Picks up drm/imagination bug fixes and enables DRM_POWERVR for TI AM62/AM68.

Signed-off-by: Robert Mazur <robert.mazur@imgtec.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41869>
2026-06-08 14:59:19 +00:00
Robert Mazur
81994d4346 ci: update firmware tag to ff46ce35
Adds a dedicated powervr firmware archive and bumps linux-firmware version.

Signed-off-by: Robert Mazur <robert.mazur@imgtec.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41869>
2026-06-08 14:59:19 +00:00
Samuel Pitoiset
f17179357a radv/ci: run vkd3d jobs with ASAN by default
I detected so many leaks with them, so I think running them with ASAN
is really useful, they take up to 6 minutes max.

I added a suffix to make it more obvious.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42022>
2026-06-08 14:24:12 +00:00
Samuel Pitoiset
ef9c0f30bb ci/vkd3d: add support for running with ASAN
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42022>
2026-06-08 14:24:11 +00:00
Samuel Pitoiset
271881ef4b ci: uprev vkd3d
This contains even more ASAN fixes that I missed in the previous build.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42022>
2026-06-08 14:24:11 +00:00
Juan A. Suarez Romero
127e5b567c broadcom/ci: update kernel for nightly jobs
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Use recent kernel in CI-Tron.

We keep old kernel in baremetal as we have some troubles to get the
proper v3d/vc4 kernel drivers loaded.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42084>
2026-06-08 12:10:56 +00:00
Jose Maria Casanova Crespo
729d30d755 v3d: use NO_GUARDBAND clipper for near-zero viewport Z scale
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
When GL_ARB_clip_control is used with a zero or very small depth range
(e.g. glDepthRange(d, d)), the viewport Z scale approaches zero. The
hardware guardband clipper divides by this scale, which can cause
incorrect clipping or dropped geometry.

V3D 7.1+ provides packet 112 (CLIPPER_Z_SCALE_AND_OFFSET_NO_GUARDBAND)
for this scenario. Use it when the absolute Z scale is below 0.01,
matching the threshold used by the v3dv Vulkan driver.

This fixes rendering with zero-width depth ranges under clip_control,
as exposed by the Vulkan CTS test:
dEQP-VK.draw.renderpass.inverted_depth_ranges.nodepthclamp_deltazero

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42082>
2026-06-08 11:53:47 +00:00
Jose Maria Casanova Crespo
d81c4bd242 v3d: Enables GL_ARB_clip_control for v71+
Based on current v3dv support for clip control

v1: original version (Andrew Copland)
v2: update docs, really enable extension (Alejandro Piñeiro)
v3: adjusted viewport and its dirty flag (Chema Casanova)
v4: avoid dirty flags when no rasterization is enabled (Iago Toral)

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42082>
2026-06-08 11:53:47 +00:00
Martin Roukala (né Peres)
cc1ebfd8e3 Revert "ci: disable the valve-kws farm"
This reverts commit 8fdf4ab4e570b4284f0478f0e3d3723661a38839, now that
the network outtage is over.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42081>
2026-06-08 11:20:42 +00:00
Daniel Stone
c9c48f79a1 doc/ci: Add custom-kernel testing workflow
So you're working on kernel stuff, and you want to test Mesa. Here you
go.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41899>
2026-06-08 11:16:28 +00:00
yserrr
3bf366f349 v3d: fix stencil blit layer selection
The stencil blit path used PIPE_TEXTURE_3D directly as a ternary
condition when computing the last layer. This tests the enum constant
itself rather than the resource target, so the 3D branch is always
selected.

Check src->base.target instead so non-3D stencil resources use their
array size when selecting the layer range.

Fixes: ac207acb97 ("broadcom/vc5: Implement stencil blits using RGBA.")
Signed-off-by: yserrr <dlwognsdc610@naver.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42054>
2026-06-08 11:00:33 +00:00
squidbus
d24599ee21 kk: Support VK_EXT_sample_locations
Sample locations are render pass state in Metal. In the best case
(same sample positions for all of subpass), we simply configure it
at the start and proceed as normal. For sub-optimal case (sample
positions change during subpass), we can support it by restarting
the Metal render pass with the new values.

This also interacts with the existing logic for centering sample
positions for bresenham lines. The user's custom sample positions
are prioritized, and centering applies in the default case. Some bug
fixes have also been made to prevent losing attachment contents from
render pass restarts and ensure the render pass restart happens before
other draw state is flushed.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42036>
2026-06-08 10:45:01 +00:00
squidbus
43b110dd62 kk: Fix divide by 0 in non-indexed draw unroll
For non-indexed draws, `index_buffer_el_size_B` is 0.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42071>
2026-06-08 10:29:35 +00:00
squidbus
70caf135d2 kk: Do not force render image view to all subresources
If the view type is not an array and the image has multiple layers,
this is invalid and leads to Metal asserts. The current approach also
probably won't work for block texel views since they create a single
layer alias at the subresource. Instead we can just skip setting the
attachment descriptor levels and slices if we created a view.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42071>
2026-06-08 10:29:35 +00:00
squidbus
de54167661 kk: Perform sink-and-move of instructions
This seems to fix some compiler crashes encountered on complex shaders,
possibly some attempted optimizations across blocks are going wrong.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42071>
2026-06-08 10:29:35 +00:00
Timothy Arceri
14a6aa3c15 nir: use the correct induction var when guessing loop iterations
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Previously when loop analyze was guessing loop iterations based
on array/sample access, we incorrectly used the induction variable of
the loop terminator to calculate loop iterations, rather than
the induction variable that accesses the array/sample.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15550
Fixes: de30bfd5b8 ("nir/loop_analyze: ignore terminating induction variable in guess_loop_limit()")

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42038>
2026-06-08 09:13:26 +00:00
Jose Maria Casanova Crespo
1160606074 broadcom/compiler: fix payload-register liveness condition
vir_setup_def_use() pins a temp's live-interval start to ip 0 when it is
initialised from a payload register (W, centroid W, Z), which the hardware
sets up before the program runs. The range check is mis-coded with '||'
instead of '&&', so it matches every index and pins any QFILE_REG read,
not just payload reads.

On V3D 7.x the per-varying C coefficient lands in rf0 (QFILE_REG 0), so
every flat varying gets pinned live-from-start; a shader reading many
varyings then keeps them all live at once, inflating register pressure to
roughly the varying count and failing register allocation.

This fixes spec@glsl-1.30@execution@varying-packing-mixed-types on rpi5
(previously crashing on RA failure).

Fixes: ce66c9aead ("broadcom/compiler: update payload registers handling when computing live intervals")
Assisted-by: Claude Opus 4.8
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42072>
2026-06-08 08:48:23 +00:00
Lei Huang
f29b92a46d amd/virtio: enable Android amdgpu-virtio build option
Android builds need to pass the Meson amdgpu-virtio option explicitly.
Add BOARD_MESA3D_AMDGPU_VIRTIO handling and forward it to Meson,
defaulting to false when the board flag is not set.

Use the same quoted amdgpu.h include style as the other AMD virtio
headers so the Android build resolves the header through Mesa's
configured include paths.

Signed-off-by: Lei Huang <Lei.Huang@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41957>
2026-06-08 08:29:43 +00:00
Ahmed Hesham
2a0bacd012 pan: report async CSF group faults via context reset status
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
A long-running job can trip the Panfrost watchdog, resulting
in the job timing out. However, GROUP_SUBMIT does not report
that through the normal submission/fence path. GROUP_SUBMIT
has already returned, and the syncobj is signalled, without
checking the group state, making any "completion" seem like
a success.

Poll the Panthor group state from get_device_reset_status()
and surface fatal faults and timeouts as a context reset.

This was observed when running the OpenCL-CTS test
test_allocations image2d_read on Mali, which is a very
long-running compute job. Rusticl already checks the device
reset status when flushing events, so following this change,
the timeout propagates as an execution failure instead of
being silently ignored, and the subsequent read observing
partial writes, with the test ultimately failing at the
verification step.

Signed-off-by: Ahmed Hesham <ahmed.hesham@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41995>
2026-06-08 07:30:45 +00:00
Valentine Burley
76e600a868 tu/ci: Add coverage for emulated second graphics queue
The runtime impact is negligible with fraction=20 for the regular jobs,
and the virtio job (a618-android) gets fraction=100.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41924>
2026-06-08 07:00:00 +00:00
Valentine Burley
57c69c9912 tu: Emulate second graphics queue for skiavk on Android
Use the new common queue emulation infrastructure to advertise 2 graphics
queues when the engine name is "android framework". The second queue is
emulated: submissions to it are redirected to the real queue by the
common runtime. No kernel submitqueue is created for the emulated queue.

This mirrors the approach used by Venus and enables skiavk, which
requires multiple graphics queues to avoid racing between webview and the
Skia Vulkan renderer.

Queue teardown iterates in reverse order so emulated aliases are finished
before the real queue that owns the lock.

Test: boot to UI with skiavk using ANGLE-on-Turnip in Cuttlefish
      full VK CTS run with tu_emulate_second_queue=true in CI
      few relevant VK CTS tests with tu_emulate_second_queue=true on KGSL

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41924>
2026-06-08 07:00:00 +00:00
Valentine Burley
07829aecd1 vulkan/queue: Add common queue emulation support
A driver can call vk_queue_set_emulated() to mark a queue as an emulated
alias of another queue. Submissions to the emulated queue are redirected
to the real queue's driver_submit(), so the driver always sees the queue
with actual hardware resources. All submissions (from both the real and
emulated queues) are serialized through a shared mutex (real_queue->lock)
to prevent concurrent hardware access.

The emulated queue does not need driver_submit set, it will use the real
queue's driver_submit and hardware resources.

Must be called from device-init context (single-threaded). The real queue
must outlive all of its emulated aliases, since vk_queue_finish() on the
real queue destroys the lock.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Acked-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41924>
2026-06-08 07:00:00 +00:00
Valentine Burley
efe6f086c8 tu: Fix vk_queue leak on submitqueue creation failure
tu_queue_init() calls vk_queue_init() before tu_drm_submitqueue_new().
If the DRM submitqueue creation fails, the function returns without
calling vk_queue_finish(), leaking the vk_queue resources.

Cc: mesa-stable
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41924>
2026-06-08 07:00:00 +00:00
Martin Roukala (né Peres)
d2eb5f8188 ci: disable the valve-kws farm
It seems like they are experiencing a network outtage, so let's disable
the farm until this gets addressed.

Reported-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42077>
2026-06-08 09:52:10 +03:00
Yiwei Zhang
2cf1f6cb50 venus: fix unbound malloc leak in vn_ring_get_submits
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Credits to Toshinari Morikawa, and this supersedes
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41904.

ring->free_submits can go unbound for heavy scenes that use 3 or more
shm pool allocs for CS storage. This change fixes to loop through the
free list for a cached entry, which is good enough in practice since
the most recently retired submit is cached at the list head.

Cc: mesa-stable
Reported-by: Toshinari Morikawa <morikawa.toshinari@jp.panasonic.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41917>
2026-06-08 03:32:20 +00:00
Christian Gmeiner
9ec5e9a34e etnaviv: blt: Don't sRGB-roundtrip same-encoding copies
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
etna_try_blt_blit(..) derived the BLT sRGB decode (on read) and encode
(on write) flags independently from the source and destination formats.
A copy between two sRGB formats - such as the glReadPixels resolve of an
SRGB8_ALPHA8 framebuffer - therefore decoded to linear and re-encoded.
That roundtrip through the hardware is not bit-preserving and loses up
to 2/255 at low values, corrupting the readback of the conversions
r32f, rg32f and rgba32f to srgb8_alpha8.

Apply the sRGB conversion only when the copy crosses the sRGB/linear
boundary. Same-encoding copies stay a plain bit copy.

Fixes dEQP-GLES3.functional.fbo.blit.conversion.{r32f,rg32f,rgba32f}_to_srgb8_alpha8

Fixes: 99400f272d ("etnaviv: blt: Add BLT format conversion support")
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41892>
2026-06-07 21:52:43 +00:00
Gert Wollny
08f801d6db r600/sfn: Pin alu sources as well when registers are pinned
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Assisted-by: Copilot (auto mode)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41945>
2026-06-07 21:36:58 +00:00
Gert Wollny
2643e12396 r600/sfn: rename pin_dest_to_chan to pin_registers
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Assisted-by: Copilot (auto mode)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41945>
2026-06-07 21:36:58 +00:00