Commit graph

216685 commits

Author SHA1 Message Date
Faith Ekstrand
5ed98c8267 nak: Use nir_lower_io_lower_64bit_to_32
This is the one that has Vulkan semantics.  We could probably make
nir_lower_io_lower_64bit_to_32_new work but it assumes the weird GL
semantics which don't map to what Vulkan does.  Using it with a Vulkan
driver would require remapping all the attribute indices.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Acked-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39135>
2026-01-05 20:11:56 +00:00
Faith Ekstrand
230fb83d61 nil: Claim buffer support for R64_[US]INT
They're implemented as RG32 so it's fine to claim storage texel buffer
support.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Acked-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39135>
2026-01-05 20:11:56 +00:00
Faith Ekstrand
26c50cb7ff nvk: Check before claiming UNIFORM_TEXEL_BUFFER_BIT
This is a no-op right now because NIL never claims buffer support on
anything that can't support texturing.  That will change in the next
commit.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Acked-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39135>
2026-01-05 20:11:56 +00:00
Eric Engestrom
5a917f035c rusticl: fix 'enable-drivers' meson option
Fixes: 1301d61de4 ("rusticl: allow devices to be enabled by default")
Fixes: 9cdf897c5e ("rusticl: allow asahi to be enabled by default")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14302
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39163>
2026-01-05 19:35:42 +00:00
Icenowy Zheng
e8c81652c9 vulkan/wsi/headless: do not destroy images that are never created
Currently the image creation failure handling codepath of
wsi_headless_surface_create_swapchain() just calls
wsi_headless_swapchain_destroy() , which will try to destroy all
`image_count` of images. However, some of these images might never be
successfully created because of the failure, which leads to double-free.

Set image_count to the number of successfully created images before
calling wsi_headless_swapchin_destroy() to prevent over-destroying.

Fixes dEQP-VK.wsi.headless.swapchain.simulate_oom.* on lavapipe and pvr,
although some of the tests got QualityWarning saying "Creating swapchain
did not succeed, callback limit exceeded" on lavapipe (Pass on pvr).

Cc: mesa-stable
Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39039>
2026-01-05 19:05:06 +00:00
Gurchetan Singh
bb17ad3f08 gfxstream: fix warning
Fixes:

DrmVirtGpuBlob.cpp:46:21: warning: comparison of integer
    expressions of different signedness: ‘uint32_t’
    {aka ‘unsigned int’} and ‘int’ [-Wsign-compare]

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39161>
2026-01-05 18:47:21 +00:00
Jason Macnak
d1ea08738a gfxstream: Remove unnecessary tag to simplify perfetto trace config
Test: capture guest + host trace

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39161>
2026-01-05 18:47:21 +00:00
Jason Macnak
462e73ce1c gfxstream: Add Vulkan func/structs for passing debugging data to host
... and send data on connection creation.

Test: cvd create --gpu_mode=gfxstream_guest_angle
      and go/cuttlefish-tracing to grab perfetto trace

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39161>
2026-01-05 18:47:21 +00:00
Emma Anholt
4edef77876 ir3: Fix leak in vars_to_scratch callback.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes: c00ebca5c4 ("ir3: Improve spilling of NIR vars to scratch.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39113>
2026-01-05 18:24:33 +00:00
Emma Anholt
2878b86ccf tu: Fix use-after-free in device destruction on old kernels
tu_bo_make_zombie() accesses the queue.

Fixes: f6c7f16322 ("tu: Implement VK_EXT_multisampled_render_to_single_sampled")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39113>
2026-01-05 18:24:33 +00:00
Alyssa Rosenzweig
2e78d6edf1 pan/mdg: clean up csel typing pass
v2: invert logic (Francesco Ansanelli)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39136>
2026-01-05 17:47:52 +00:00
Alyssa Rosenzweig
347a0ac212 panfrost,nir: drop my lonely Authors tags
We all know who wrote a bunch of Panfrost code. No need to repeat this a million
places, the copyright line is plenty.

in cases where there's a joint me & Italo/Eric/.. tag, i've left it alone to
respect others' potential wishes.

$ find . -type f -exec perl -i -p0e 's/ \*\s+\* Author[^\n]+\s+\*\s+Alyssa[^\n]+\n \*\// \*\//' \{} \;

v2: delete more tags (Boris).

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39136>
2026-01-05 17:47:52 +00:00
Eric Engestrom
93bda77fb5 mr-label-maker: tag src/virtio/virtgpu_kumquat* as part of gfxstream
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38924>
2026-01-05 17:01:39 +00:00
Eric Engestrom
4f91d4d888 virtgpu_kumquat_ffi: mark single-item match as expected
It will presumably get more values in the future and should not just be
replaced with an `if`.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38924>
2026-01-05 17:01:39 +00:00
Eric Engestrom
590daa1282 virtgpu_kumquat_ffi: use auto-deref instead of doing it by hand
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38924>
2026-01-05 17:01:39 +00:00
Eric Engestrom
6cb997ab22 virtgpu_kumquat_ffi: use mutex.get_mut() instead of mutex.lock() to get compile-time garantee that the mutex isn't already locked
See https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#mut_mutex_lock

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38924>
2026-01-05 17:01:38 +00:00
Eric Engestrom
ea9f75e85c virtgpu_kumquat_ffi: mark the remaining allow annotations (all non_camel_case_types) as expected
`#[expect(...)]` instead of `#[allow(...)]` means that the linter warns
once the annotation should be removed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38924>
2026-01-05 17:01:37 +00:00
Eric Engestrom
2b76adb765 virtgpu_kumquat: cleanup derelict allow(dead_code) & allow(unused) annotations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38924>
2026-01-05 17:01:37 +00:00
Pohsiang (John) Hsu
aba2bb4a16 mediafoundation: handle the case where output sample is returning after MFT has been released.
we can't use pipe object in stat pool on shutdown, because the pipe object is released when the MFT is released.
For async sink (i.e mp4 sinkwriter), the output samples can be returning after HMFT is released.

Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39131>
2026-01-05 16:47:45 +00:00
Anna Maniscalco
6a68542167 zink: fix use_reusable_pool condition
The code originally disabled reuse whenever a pNext was passed to
`bo_create_internal`, however code has been added before it that messed
with the pointer disabling it more often that necessary.

Rearrange code to restore the original check.

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39008>
2026-01-05 16:19:00 +00:00
Konstantin Seurer
405c93c665 radv: Optimize BVH4 acceleration structure updates
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
It is more efficient to compute the child index of the current node
inside the parent node and write the bounds when available. The previous
code could load up to 16 AABBs to compute the new ones. The new code
also only needs 1/7 of the previously used scratch memory. The new code
seems to be around 30% faster (0.5ms) in GOTG on a 6700XT.

Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39139>
2026-01-05 15:24:54 +00:00
Daniel Schürmann
2d0d5fc104 aco/validate: validate constant bus limit after register allocation based on PhysReg
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39107>
2026-01-05 14:54:00 +00:00
Daniel Schürmann
eb16f701a6 aco/tests: Add new test to pack 2x16 SGPRs into VGPR
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39107>
2026-01-05 14:54:00 +00:00
Daniel Schürmann
61c1ec541d aco/tests: Add test for subdword extraction from SGPR
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39107>
2026-01-05 14:54:00 +00:00
Daniel Schürmann
0674c9d30e aco/validate: Validate correct RegisterClasses after lowering to HW instructions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39107>
2026-01-05 14:53:59 +00:00
Daniel Schürmann
b087bf2fbf aco/lower_to_hw: Fix SGPR Operand RegClasses for pack_2x16
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39107>
2026-01-05 14:53:59 +00:00
Daniel Schürmann
9f5996ae8a aco/lower_to_hw: Don't use 2 SGPR operands before GFX10 in a single VOP3 instruction in do_pack_2x16()
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39107>
2026-01-05 14:53:58 +00:00
Daniel Schürmann
d8481fd7cc aco/lower_to_hw: Fix SGPR Operand RegClasses of subdword copies
Extracting from an SGPR could cause a wrong RegClass on
the operand which could later lead to selecting VOPD
instructions which falsely operate on the corresponding
VGPR.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39107>
2026-01-05 14:53:58 +00:00
José Roberto de Souza
6f031a98e0 intel/brw: Nuke brw_inst::is_volatile()
There is no users for that function, is_volatile is only used in
brw_opt_cse.cpp is_expression() but it access the information using brw_send_inst
struct.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39104>
2026-01-05 14:11:47 +00:00
Pavel Ondračka
7abe0363c7 r300: invalidate texture cache when clearing texture bound for sampling
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: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38842>
2026-01-05 10:32:18 +00:00
Samuel Pitoiset
48d30ce5bf ac/rgp: enable the new derived SPM chunk for performance counters on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39100>
2026-01-05 10:02:07 +00:00
Samuel Pitoiset
dcf9f630ff ac/spm: add support for Ray Tracing counters in RGP on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39100>
2026-01-05 10:02:07 +00:00
Samuel Pitoiset
179184c07e ac/spm: add support for new Memory percentage counters in RGP 2.6 on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39100>
2026-01-05 10:02:07 +00:00
Samuel Pitoiset
78bdc03282 ac/spm: add support for new Memory bytes counters in RGP 2.6 on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39100>
2026-01-05 10:02:07 +00:00
Samuel Pitoiset
4d7794f0b3 ac/spm: add support for new LDS counters in RGP 2.6 on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39100>
2026-01-05 10:02:07 +00:00
Samuel Pitoiset
e315bd0321 ac/spm: update the cache group on GFX12
No L1 counter.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39100>
2026-01-05 10:02:06 +00:00
Samuel Pitoiset
7349169745 ac/spm: rework indexing of the derived groups/counters/components
RGP expects linear indexing across the number of counters/components.
Because a component can be used with different counters, its index
should be re-used when needed.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39100>
2026-01-05 10:02:06 +00:00
Samuel Pitoiset
11a12893d6 ac/perfcounter: add new GCEA_SE block definition on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39100>
2026-01-05 10:02:05 +00:00
Samuel Pitoiset
7f84c0056f ac/perfcounter: add new GCEA_CPWD block definition on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39100>
2026-01-05 10:02:05 +00:00
llyyr
688cc83c7d Revert "drirc/anv: force_vk_vendor=-1 for Wuthering Waves"
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This reverts commit dcd9b90aff.

The game falls back to software rendering if any of the enumerated GPUs
have invalid vendorID. This fix causes a regression for systems with an
AMD GPU where the game works perfectly fine, that also happen to have an
Intel iGPU.

The Intel iGPU will be enumerated with vendorID=-1 and this will cause
the game to not use the AMD GPU either. Clearly an issue with the game
but since this workaround is causing more issues than it is solving,
remove the config.

From what I can tell, this fix _did_ work at the time of committing, but
as this is a live service game it gets regularly updated and this buggy
behavior with choosing the device has been introduced recently.

Fixes: dcd9b90aff ("drirc/anv: force_vk_vendor=-1 for Wuthering Waves")
Acked-by: Tapani Pälli <tapani.palli@intel.com>
Acked-by: Taras Pisetskyi <taras.pisetskyi@globallogic.com>
Signed-off-by: llyyr <llyyr.public@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39089>
2026-01-05 09:32:40 +00:00
Samuel Pitoiset
3722ef141c ac/spm: fix a crash with the RT counters on GFX10
They are only enabled on GFX10.3+.

Fixes: 8bc37d0d19 ("ac/spm: add support for Ray Tracing counters in RGP")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39127>
2026-01-05 09:05:50 +00:00
Samuel Pitoiset
a057800300 ac/perfcounter: compute the number of block instance properly on GFX10
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39126>
2026-01-05 08:38:04 +00:00
Samuel Pitoiset
87b938ce41 ac/perfcounter: update configuration of many blocks on GFX10
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39126>
2026-01-05 08:38:04 +00:00
Samuel Pitoiset
381e4f4c9f ac/perfcounter: fix the number of static instances for some blocks on GFX10
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39126>
2026-01-05 08:38:04 +00:00
Samuel Pitoiset
91fdbadacc ac/perfcounter: define a distribution mode for all perf blocks on GFX10
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39126>
2026-01-05 08:38:03 +00:00
Samuel Pitoiset
736ddb6ba8 ac/perfcounter: move configuration for GFX10 in a separate file
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39126>
2026-01-05 08:38:03 +00:00
Samuel Pitoiset
6374484123 ac/perfcounter: compute the number of block instance properly on GFX10.3
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39126>
2026-01-05 08:38:02 +00:00
Samuel Pitoiset
a037feb40b ac/perfcounter: update configuration of many blocks on GFX10.3
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39126>
2026-01-05 08:38:02 +00:00
Samuel Pitoiset
b7c2e38019 ac/perfcounter: fix the number of static instances for some blocks on GFX10.3
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39126>
2026-01-05 08:38:01 +00:00
Samuel Pitoiset
1925d61a7b ac/perfcounter: define a distribution mode for all perf blocks on GFX10.3
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39126>
2026-01-05 08:38:01 +00:00