Commit graph

221622 commits

Author SHA1 Message Date
Emma Anholt
ed729bf948 ci/llvmpipe: Disable some traces too close to the timeout.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
I did my stress testing mostly outside of north america work hours, but it
turns out once the runners have 60-70% background CPU usage, these ones
intermittently time out.

Reported-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41163>
2026-04-24 18:06:48 +00:00
Alyssa Rosenzweig
bccaeb28bb brw/nir_lower_cs_intrinsics: do some math at 16-bit
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
There are less than 2^16 lanes within a threadgroup, so it is safe to do
all math at 16-bit. This allows us to use 16-bit integer division which is
much faster than 32-bit integer division (in terms of the lowerings).

In a "hello world" kernel with variable wg size, simd32 goes 72 inst -> 57
inst on jay and 82 -> 67 inst on brw.

OTOH it's a loss for non-variable wg size, so do it only there to avoid
unwelcome stats regresions on Vulkan.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41084>
2026-04-24 17:13:24 +00:00
Silvio Vilerino
e4c9d57ddf d3d12: Flush stale video encode wait registrations when reusing ID3D12Fence objects
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41160>
2026-04-24 16:52:14 +00:00
Silvio Vilerino
fb13c044a8 Revert "d3d12: Video sliced encode: Use same ID3D12Fence/different per slice values as optimization"
This reverts commit b83a931cb1 as it causes
regressions with dirty rects enabled on some HW platforms that signal
out of order completion and require individual fence objects per slice

Fixes: b83a931cb1 ("d3d12: Video sliced encode: Use same ID3D12Fence/different per slice values as optimization")

Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41160>
2026-04-24 16:52:14 +00:00
Yiwei Zhang
0b99d1db0b panvk: adopt common ANB helpers
Below are adopted:
- vk_android_import_anb
- vk_android_import_anb_memory

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41145>
2026-04-24 16:25:36 +00:00
Yiwei Zhang
58cc8e1f85 venus: adopt common ANB helpers
Below are adopted:
- vk_android_get_anb_layout
- vk_android_import_anb
- vk_android_import_anb_memory

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41145>
2026-04-24 16:25:36 +00:00
Yiwei Zhang
4c4302d14b venus: adopt common vk_image::anb_memory
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41145>
2026-04-24 16:25:36 +00:00
Yiwei Zhang
d4ae409365 venus: refactor vn_android_get_wsi_memory to return VkDeviceMemory
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41145>
2026-04-24 16:25:36 +00:00
Yiwei Zhang
f91520f75b venus: adopt vk_android_get_ahb_layout
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41145>
2026-04-24 16:25:35 +00:00
Yiwei Zhang
61bd3fcd84 venus: adopt vk_android_init_deferred_image
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41145>
2026-04-24 16:25:35 +00:00
Andrzej Datczuk
d476c96bad radv: enable advertising of VK_KHR_pipeline_library under llvm
KHR_pipeline_library is a base extension whose semantics can only
be exercised by extensions: EXT_graphics_pipeline_library
and KHR_ray_tracing_pipeline. Both remain gated under LLVM,
so advertising the KHR base extension is inert for conformant apps.

The reason for the change is a hard requirement for KHR_pipeline_library
in DXVK 2.7+. DX games under Proton, which uses DXVK, fail adapter
creation if this extension is absent. DXVK supports scenario when
KHR_pipeline_library is available but two dependent extensions aren't.

The !use_llvm condition originated in f1095260a4 when
KHR_pipeline_library was first wired up for ray tracing only. It was
touched also in 045c96d896 when EXT_graphics_pipeline_library also took
it as a dependency.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41134>
2026-04-24 15:59:59 +00:00
Caio Oliveira
0422165d9a brw: Remove various unused fields
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
These are a mix of fields whose last used was removed or fields that were
never used, possibly because they remained in a patch while the rest of the
code changed before landing.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41139>
2026-04-24 15:04:25 +00:00
Derek Lesho
ce45069c49 zink: Guard bo map/unmap on map_count.
Otherwise zink_bo_map can return cpu_ptr being destroyed by zink_bo_unmap.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41127>
2026-04-24 13:44:50 +00:00
Rhys Perry
f9f60aa844 radv: don't use radv_optimize_nir after lowering indirect derefs for RT
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Just these three passes seem necessary. radv_rt_nir_to_asm() will call
radv_optimize_nir() later.

fossil-db (navi21):
Totals from 32 (0.02% of 202427) affected shaders:
Instrs: 205974 -> 205948 (-0.01%)
CodeSize: 1131492 -> 1131352 (-0.01%)
SpillSGPRs: 321 -> 320 (-0.31%)
Latency: 2171106 -> 2170677 (-0.02%); split: -0.02%, +0.00%
InvThroughput: 540282 -> 540174 (-0.02%)
VClause: 5579 -> 5578 (-0.02%)
SClause: 4586 -> 4582 (-0.09%)
Copies: 23543 -> 23535 (-0.03%)
PreSGPRs: 2444 -> 2443 (-0.04%)
VALU: 129415 -> 129399 (-0.01%)
SMEM: 7175 -> 7170 (-0.07%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31265>
2026-04-24 11:01:03 +00:00
Rhys Perry
91d555c2cb radv: lower indirect derefs after linking
Scratch access isn't very optimizable, so more stores are optimized away
if we lower indirect derefs after both linking and radv_optimize_nir.

fossil-db (navi21):
Totals from 1264 (0.62% of 202427) affected shaders:
Instrs: 1504703 -> 1504708 (+0.00%); split: -0.02%, +0.02%
CodeSize: 8031388 -> 8031020 (-0.00%); split: -0.02%, +0.02%
SpillSGPRs: 1865 -> 1869 (+0.21%)
Latency: 12106362 -> 12106464 (+0.00%); split: -0.01%, +0.01%
InvThroughput: 4056269 -> 4056044 (-0.01%); split: -0.01%, +0.00%
VClause: 13927 -> 13940 (+0.09%)
SClause: 32382 -> 32396 (+0.04%); split: -0.03%, +0.08%
Copies: 188004 -> 187897 (-0.06%); split: -0.17%, +0.11%
Branches: 39045 -> 39052 (+0.02%); split: -0.01%, +0.03%
PreSGPRs: 79885 -> 79814 (-0.09%); split: -0.11%, +0.02%
VALU: 1072639 -> 1072532 (-0.01%); split: -0.01%, +0.00%
SALU: 187317 -> 187375 (+0.03%); split: -0.11%, +0.14%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31265>
2026-04-24 11:01:03 +00:00
Rhys Perry
1943e88d56 radv: move ac_nir_lower_indirect_derefs to end of radv_shader_spirv_to_nir
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31265>
2026-04-24 11:01:03 +00:00
Pavel Ondračka
caeaa6bad2 i915/ci: update expectations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41149>
2026-04-24 10:39:50 +00:00
Pavel Ondračka
1ca70a7d6c r300/ci: update expectations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41149>
2026-04-24 10:39:50 +00:00
Rob Herring (Arm)
4e8e4ca2fc ethosu: Add minimum and maximum operators
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39975>
2026-04-24 09:22:16 +00:00
Rob Herring (Arm)
03e29e2fa5 teflon: Add minimum and maximum operations
Add the plumbing for minimum and maximum operations.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39975>
2026-04-24 09:22:16 +00:00
Rob Herring (Arm)
dce4b0313a ethosu: Add reshape operation
A reshape operation just changes the dimensions of a tensor, but doesn't
change the data at all. So we just point the OFM to the IFM data and
we're done.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39975>
2026-04-24 09:22:16 +00:00
Rob Herring (Arm)
08d93a60f5 ethosu: Add quantize operation
The quantize operation lowers to a pooling nop operation.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39975>
2026-04-24 09:22:15 +00:00
Rob Herring (Arm)
e6f4f6aa5d teflon: Add quantize operation
Add the plumbing for quantize operations.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39975>
2026-04-24 09:22:15 +00:00
Rob Herring (Arm)
2fe1301e5e ethosu: Add LeakyRelu operation
Add support for LeakyRelu operations. These are implemented as a pooling
LUT.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39975>
2026-04-24 09:22:15 +00:00
Rob Herring (Arm)
15bc152185 teflon: Add LeakyRelu operation
Add the plumbing for LeakyRelu operations.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39975>
2026-04-24 09:22:14 +00:00
Rob Herring (Arm)
3487b15312 ethosu: Add hard swish operation
Hard swish lowers to a pooling operation with a LUT.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39975>
2026-04-24 09:22:14 +00:00
Rob Herring (Arm)
f2800fe13b teflon: Add hard swish operation
Add the plumbing for hard swish operations.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39975>
2026-04-24 09:22:14 +00:00
Rob Herring (Arm)
a305dfd54b ethosu: Add logistic and TANH operations
Logistic and TANH operations are similar and both lower to pooling
operation with a LUT.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39975>
2026-04-24 09:22:13 +00:00
Rob Herring (Arm)
6933207435 teflon: Add TANH operation support
Add the plumbing for TANH operations.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39975>
2026-04-24 09:22:13 +00:00
Rob Herring (Arm)
df051917a5 ethosu: Add multiply operation support
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39975>
2026-04-24 09:22:13 +00:00
Rob Herring (Arm)
024c70fbb3 teflon: Add multiply operation
Add the plumbing for multiply operations.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39975>
2026-04-24 09:22:12 +00:00
Rob Herring (Arm)
d55a574898 ethosu: Support element wise op with constant IFM buffer
Element wise operations can have a constant data buffer.

Re-order things a bit to group all the IFM2 setup together.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39975>
2026-04-24 09:22:12 +00:00
Rob Herring (Arm)
1f579379c1 ethosu: Rename ethosu_lower_add to ethosu_lower_eltwise
The ethosu_lower_add() function can handle other element wise operations
such as multiply, minimum, and maximum, so rename it in preparation to
add those operations.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39975>
2026-04-24 09:22:12 +00:00
Rob Herring (Arm)
fe97dab8b0 ethosu: Add fully-connected operation
Add support for fully-connected convolution. FC convolution lowering is
nearly the same, so refactor the existing convolution code to support
both.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39975>
2026-04-24 09:22:11 +00:00
Rob Herring (Arm)
ed65f84921 ethosu: Support axis 1 concatention
For axis 1 concatenation, the OFM strides need to match the IFM strides.

Presumably axis -3 can also be supported, but there haven't been any
models with -3. Not sure what axis 2 would need either.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39975>
2026-04-24 09:22:11 +00:00
Rob Herring (Arm)
aaaca26fd2 ethosu: Fix concatenation OFM scaling
Some pooling operations like concatenation are NOPs requiring different
scaling calculations.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39975>
2026-04-24 09:22:11 +00:00
Rob Herring (Arm)
d772f36741 ethosu: Move stride calculation to lowering
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39975>
2026-04-24 09:22:10 +00:00
Rob Herring (Arm)
ed2c19a411 ethosu: Store ethosu_tensor struct ptr in feature map
Some of the tensor info is needed at various points during lowering.
Instead of storing the tensor index and looking it up every time, store
a point to the tensor struct instead.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39975>
2026-04-24 09:22:10 +00:00
Rob Herring (Arm)
915cd57c08 ethosu: Add a common initializer for struct ethosu_operation
The struct ethosu_operation structure has the same initialization in
multiple ops. More ops with the same duplication are about to be added.
Move this out to a common initializer function.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39975>
2026-04-24 09:22:09 +00:00
Rob Herring (Arm)
76ad93bf93 ethosu: Make quantization shift signed
The vela compiler defines shift as signed and some upcoming LUT code
allows for negative shifts, so make shift signed everywhere.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39975>
2026-04-24 09:22:09 +00:00
Karmjit Mahil
4d4eb027d5 freedreno: Don't set UCHE_CLIENT_PF
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The kernel sets this up, and it's also read by the kernel for GPU
fault, so don't write this in Mesa.

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41131>
2026-04-24 08:58:27 +00:00
Duncan Brawley
7428af29f6 pco: Fix pco_last_igrp returning the first element instead of the last
Because of a previous refactor, pco_last_igrp was incorrectly changed to return
the first entry in a linked list instead of the last. Update pco_last_igrp to
return the last entry in a linked list.

The following CTS tests now pass:
dEQP-GLES3.functional.shaders.switch.conditional_fall_through_2_dynamic_fragment
dEQP-GLES3.functional.shaders.switch.conditional_fall_through_dynamic_fragment
dEQP-GLES3.functional.shaders.switch.conditional_fall_through_uniform_fragment

Fixes: 719ece42c0 ("pco: Switch back to util/list")

Signed-off-by: Duncan Brawley <duncan.brawley@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41125>
2026-04-24 08:17:56 +00:00
Christian Gmeiner
aed60946a1 panvk: Advertise VK_EXT_dynamic_rendering_unused_attachments
The Vulkan runtime and panvk already handle unused attachments
correctly. Enable the extension and feature flags.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40920>
2026-04-24 07:09:33 +00:00
Samuel Pitoiset
cf9fb46e54 radv: zero-initialize radv_cmd_state only when a cmdbuf is reset
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Command buffers are zero-allocated, so this is only needed when reset.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41107>
2026-04-24 06:28:41 +00:00
Samuel Pitoiset
0b21aaaa59 radv: remove redundant initialization when beginning a cmdbuf
radv_cmd_state is already zero-initialized few lines above.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41107>
2026-04-24 06:28:41 +00:00
Samuel Pitoiset
92a5526435 radv: move shader_upload_seq to radv_cmd_buffer_queue_state
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41107>
2026-04-24 06:28:40 +00:00
Samuel Pitoiset
b9b9850d82 radv: move uses_perf_counters to radv_cmd_buffer_queue_state
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41107>
2026-04-24 06:28:40 +00:00
Samuel Pitoiset
f8aed0793b radv: move queue related cmd buffer state to a new struct
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41107>
2026-04-24 06:28:39 +00:00
Dave Airlie
3f5d54ab8c nouveau: drop sector promotion.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Just like the fix for nvk, just drop this in the GL driver as well.

Cc: mesa-stable
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41143>
2026-04-24 04:20:10 +00:00
Sagar Ghuge
f36b6c8f13 anv: Update values for DispatchTimeoutCounter
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
BTD unit will keep accumulating the threads and then eventually dispatch
those active threads once it reaches the counter.

I guess dispatching too fast will not have full occupancy at the BTD
unit, instead we just pick the half of max value for counter.

This patch also add drirc option to dispatch_timeout_counter and tweak
values internally with respect to HW limits. Default value we have right
now is 512 clocks, we can for sure tune it per app.

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/40733>
2026-04-24 01:38:20 +00:00