Commit graph

224012 commits

Author SHA1 Message Date
Christian Gmeiner
fbd2f140fe etnaviv: Drop unused num_loops shader stat
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The field was never populated (initialized to 0 with a TODO) yet
printed in dump_shader_info(..) and etna_dump_shader(..), giving
the misleading impression that loop counts were tracked. Remove
the field and its consumers.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41560>
2026-06-09 22:23:04 +00:00
Dave Airlie
4ac11c9006 nak: block pipe_format from nak bindings.
This comes from the compiler bindings and lately we get

error[E0659]: `PIPE_FORMAT_R8_UINT` is ambiguous
    --> ../src/nouveau/compiler/nak/from_nir.rs:2193:13
     |
2193 |             PIPE_FORMAT_R8_UINT => MemType::U8,
     |             ^^^^^^^^^^^^^^^^^^^ ambiguous name
     |
     = note: ambiguous because of multiple glob imports of a name in the same module
note: `PIPE_FORMAT_R8_UINT` could refer to the constant imported here
    --> ../src/nouveau/compiler/nak/from_nir.rs:12:5
     |
12   | use nak_bindings::*;
     |     ^^^^^^^^^^^^^^^
     = help: consider adding an explicit import of `PIPE_FORMAT_R8_UINT` to disambiguate
note: `PIPE_FORMAT_R8_UINT` could also refer to the constant imported here
    --> ../src/nouveau/compiler/nak/from_nir.rs:14:5
     |
14   | use compiler::bindings::*;
     |     ^^^^^^^^^^^^^^^^^^^^^
     = help: consider adding an explicit import of `PIPE_FORMAT_R8_UINT` to disambiguate

Acked-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42109>
2026-06-09 22:06:55 +00:00
Lone_Wolf
f958ad1195 clc: fix build with LLVM23 (TargetRegistry::lookupTarget)
See d50631faad

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15471
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41558>
2026-06-09 21:17:21 +00:00
Rob Clark
1ab1799733 freedreno/perfetto: Use sequence-scoped clk
Now that the clock snapshots are serialized properly, switch to sequence
scoped clock id.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42013>
2026-06-09 20:33:11 +00:00
Rob Clark
2a2199fb3e freedreno/perfetto: serialize clk snapshots
Move clk snapshots into same thread as render-stage traces.  This will
let us move to sequence scoped clock.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42013>
2026-06-09 20:33:10 +00:00
Rob Clark
87b34e03ae freedreno/perfetto: Add non-draw stage
Make it easier to see the scope of non-draw passes, rather than only
showing individual compute/blit jobs.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42013>
2026-06-09 20:33:10 +00:00
Rob Clark
b9e2da183e perfetto: Use BufferExhaustedPolicy::kStall
Renderpass traces on traceq are ok to block.  We'd prefer this over
dropping traces.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42013>
2026-06-09 20:33:10 +00:00
Rob Clark
1b8a219c54 perfetto: Increase SMB size
Increase local perfetto shared memory buffer size, to reduce dropped
traces.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42013>
2026-06-09 20:33:10 +00:00
Rob Clark
4adf158aef rusticl: Flush perfetto track events
Flush periodically in the single and worker thread.  And also before
thread exit.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42013>
2026-06-09 20:33:10 +00:00
Rob Clark
f68e6f8848 util/queue: Flush perfetto before blocking
In particular if a queue is going to block, a trace may end with
buffered end traces before the queue gets it's next job.  So flush
before blocking.  (Also on the producer side, since it is easy.)

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42013>
2026-06-09 20:33:10 +00:00
Rob Clark
4b8d296e05 util/thread: Flush traces at thread exit
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42013>
2026-06-09 20:33:10 +00:00
Rob Clark
fd591a9eba perfetto: Add API to flush track events
Track events can be buffered in TLS.  They should be flushed before a
thread exits, and ideally periodically (ie. before a thread blocks) to
ensure that "end" events are not lost.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42013>
2026-06-09 20:33:10 +00:00
Vinson Lee
94c7ccbaa3 radeonsi: remove duplicate '.bpp' initializer in si_sdma_copy_image
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Compiling with clang produces a -Winitializer-overrides warning:

  src/gallium/drivers/radeonsi/si_sdma_copy_image.c:217:17: warning:
  initializer overrides prior initialization of this subobject
  [-Winitializer-overrides]

The surf_src and surf_dst ac_sdma_surf initializers each set '.bpp = bpp'
twice: once next to the other scalar fields and once again after the
nested '.offset' initializer. The values are identical, so behavior is
unchanged, but the duplicate field initializer is redundant. Drop the
second one.

Fixes: e6e305988c ("ac,radv,radeonsi: merge tiled/linear surfaces into one struct")
Assisted-by: Claude Code (Claude Opus 4.8)
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pelloux@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42068>
2026-06-09 13:10:56 -07:00
Sushma Venkatesh Reddy
48bc6cbe38 intel/perf: Add WCL OA support
WCL is mapped to PTL

Tested-by: Vishwanatha Fnu <fnu.vishwanatha@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42009>
2026-06-09 19:34:54 +00:00
Caio Oliveira
0aff5e006c jay: Handle dpas_intel intrinsic
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@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41913>
2026-06-09 17:33:23 +00:00
Caio Oliveira
0f309dbfe5 jay: Add helpers for managing unordered instructions
In addition to the general predicates, add wrappers to set
and get the SBID, since they are in the extra struct of
each instruction.  This is a preparation for adding DPAS.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41913>
2026-06-09 17:33:23 +00:00
Sid Pranjale
f6dd632b31 v3dv: drop legacy CPU queue fallback paths
We now require kernel side CPU queue support (introduced via
DRM_V3D_PARAM_SUPPORTS_CPU_QUEUE). If the underlying kernel lacks
this support i.e. is older than kernel 6.8, physical device
initialization will now fail.

With this requirement guaranteed, we can remove the userspace
fallback paths that manually managed and stalled on indirect
CSD dispatches and query resets.

Reviewed-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42087>
2026-06-09 16:53:48 +00:00
Maíra Canal
37ef45a8c0 v3dv: Drop legacy comments about single-sync support
After commit 16c96b0e93 ("v3dv: drop single sync kernel interface"), we
no longer use V3DV_QUEUE_ANY. Therefore, drop it and also remove the
legacy comments about single-sync support.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42119>
2026-06-09 16:34:47 +00:00
Samuel Pitoiset
156752feb5 radv/ci: skip all WSI tests on GFX1201
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
They cause random kernel NULL pointer dereferences. Seems pretty
recent but skipping them is definitely more reliable.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42123>
2026-06-09 16:06:31 +00:00
Lakshman Chandu Kondreddy
0752d8b08d zink: Set can_do_invalid_linear_modifier workaround for QCOM blob driver
As QCOM blob driver handles invalid <-> linear modifier conversion,
set can_do_invalid_linear_modifier workaround to true.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42116>
2026-06-09 15:40:15 +00:00
Tapani Pälli
93476c6299 anv: fix a null pointer access with isl_mod_info
It is possible for isl_mod_info to be NULL if no drm modifier was
given, layout transition on external queue can hit this condition.

Fixes: 11f8f333e2 ("anv: set a private binding when the image is not externally shared")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42015>
2026-06-09 15:20:02 +00:00
Calder Young
864bee8d49 nir: Do not mask helper lanes of writes if ACCESS_INCLUDE_HELPERS is set
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes: 586da7b ("nir: Add nir_lower_helper_writes pass")
Reviewed-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/42031>
2026-06-09 12:57:04 +00:00
Alyssa Rosenzweig
09df2ee2ba nir/opt_sink: sink more Intel block instructions
Results on my jay branch

SIMD16:
   Totals from 1456 (55.01% of 2647) affected shaders:
   Instrs: 2119110 -> 2116320 (-0.13%); split: -0.23%, +0.10%
   CodeSize: 29561972 -> 29460340 (-0.34%); split: -0.47%, +0.13%

SIMD32:
   Totals from 1462 (55.23% of 2647) affected shaders:
   Instrs: 2421472 -> 2422930 (+0.06%); split: -0.20%, +0.26%
   CodeSize: 34434240 -> 34415840 (-0.05%); split: -0.33%, +0.28%
   Number of fill instructions: 29830 -> 29829 (-0.00%); split: -0.01%, +0.00%

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/42102>
2026-06-09 12:16:57 +00:00
Sagar Ghuge
3da4653d46 jay: Implement halt
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Halt needs to be always in pair. First halt issued will mask off active
channels and second one will basically re-enable those masked off
channels.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42067>
2026-06-09 11:47:33 +00:00
Samuel Pitoiset
36f3175187 radv/amdgpu: defer allocating the NULL PRT BO
To avoid wasting VRAM when emulated sparse residency isn't used.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41883>
2026-06-09 11:13:35 +00:00
Samuel Pitoiset
887a390ec0 radv: advertise VK_KHR_shader_abort
Without VK_KHR_device_fault there is no way to get back the abort
messages.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40723>
2026-06-09 10:33:12 +00:00
Samuel Pitoiset
982f9312bd radv: implement VK_KHR_shader_abort
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40723>
2026-06-09 10:33:11 +00:00
Samuel Pitoiset
6fe7fdb100 aco: emit nir_jump_halt
To halt execution by setting FATAL_HALT.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40723>
2026-06-09 10:33:11 +00:00
squidbus
371ed09659 kk: Work around crash with multiple concurrent MTL4Compiler
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Using multiple `MTL4Compiler` instances concurrently may result in
the process crashing from within the Metal driver. Work around this
by maintaining one `MTL4Compiler` per `MTLDevice`.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41842>
2026-06-09 02:47:38 -07:00
squidbus
6a25e3a0b0 kk: Migrate to Metal 4 pipelines
Enables using new features that are only available with Metal 4 pipelines,
and fixes Metal validation errors from depth/stencil format mismatches
between pipeline and render pass attachments due to differences in strictness
between Metal and Vulkan.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41842>
2026-06-09 02:47:31 -07:00
squidbus
9cbda0fd60 kk: Enable shaderTessellationAndGeometryPointSize
Supported with the proper hardware vertex stage lowering.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42020>
2026-06-09 09:07:03 +00:00
squidbus
9b587e5ff1 kk: Ensure some vertex lowerings happen on hardware stage
Lowerings like ensuring correct point size outputs, vertex position
output, and clip space control are expected to happen on the shader
stage which becomes the vertex stage on the actual hardware.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42020>
2026-06-09 09:07:03 +00:00
Ganesh Belgur Ramachandra
859a7f5436 amd/llvm: truncate const intergers to bitwidth
Fixes assertion checks in LLVM APInt's constructor
when value cannot fit the interger bitwidth

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41822>
2026-06-09 08:36:50 +00:00
Ganesh Belgur Ramachandra
bf3333156e amd/llvm: fix LLVM asserts for signed integer constants
After LLVM APInt's refactor, stricter checks for
integer signedness are imposed. If a sign extended
uint64_t is passed to LLVMConstInt(...) producing
a value much larger than uintNmax for N < 64,
then LLVM complains.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41822>
2026-06-09 08:36:50 +00:00
Ganesh Belgur Ramachandra
7e7f6e79ec amd/llvm: fix target feature setting (DumpCode -> dumpcode)
Refer changes made to AMDGPU backend of llvm-project
in commit 4b1cfc5d7c606ece125d1e0ef6d13e0289553200

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41822>
2026-06-09 08:36:50 +00:00
squidbus
6b06f70af0 kk: Remove unused deprecated Metal APIs
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42096>
2026-06-09 07:17:29 +00:00
Collabora's Gfx CI Team
9c424edd2e Uprev VVL to 2ab77a01659e3e46d6ca8a25425b19b3425adb11
d2b091858d...2ab77a0165

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42010>
2026-06-09 06:33:06 +00:00
Yiwei Zhang
936ceed0a6 anv: amend missing shader dump finish upon device destruction
Fixes: 0a965c0bce ("anv: add a shader-dump debug option")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42095>
2026-06-09 06:00:14 +00:00
Emma Anholt
fbd9c67e2a drm-shim/freedreno: Fix VM_BIND support.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
We need to initialize the out fence.  This was supposed to be in the
merged code, but I failed to force-push before marging.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42103>
2026-06-09 03:39:42 +00:00
Christian Meissl
9da4fb526a nir/lower_tex: skip external texture YUV lowering for query instructions
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Guard external texture lowering by !nir_tex_instr_is_query(), matching
the pattern already used by swizzle_result and lower_srgb.

Fixes textureSize() on samplerExternalOES on panfrost, which triggers
the assertion:

```
Invalid invariant idx.type == BI_INDEX_REGISTER:
	   r10 = TEX_SINGLE.rgb.2d.f32.zero_lod _.h00, ^r10, ^r11, sr_count:0
```

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41454>
2026-06-09 01:26:45 +00:00
Karol Herbst
9d858b6719 rusticl/program: implement CL_PROGRAM_BUILD_LOG without a copy
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42021>
2026-06-09 00:38:10 +00:00
Karol Herbst
fed9ea7aa7 rusticl/program: implement CL_PROGRAM_BUILD_OPTIONS without a copy
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42021>
2026-06-09 00:38:10 +00:00
Karol Herbst
23295a7f3e rusticl/program: store build options as CString
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42021>
2026-06-09 00:38:10 +00:00
Karol Herbst
6abe48d835 rusticl/program: set __OPENCL_C_VERSION__ ourselves
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42021>
2026-06-09 00:38:10 +00:00
Karol Herbst
7aa9a36ade rusticl/program: move -cl-std handling inside CompileOptions::get_clang_args
Also ignore empty options while at it, because that can now happen and
makes other part of the code upset.

Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42021>
2026-06-09 00:38:10 +00:00
Karol Herbst
d1482321ae rusticl/program: handle -create-library inside CompileOptions::new
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42021>
2026-06-09 00:38:09 +00:00
Karol Herbst
13511279c9 rusticl/program: turn iter map into loop inside CompileOptions::new
Otherwise error handling is going to be painful later on.

Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42021>
2026-06-09 00:38:08 +00:00
Karol Herbst
1e41c73cf5 rusticl/program: construct __OPENCL_VERSION__ inside CompileOptions::get_clang_args
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42021>
2026-06-09 00:38:08 +00:00
Karol Herbst
73b3d81a48 rusticl/program: add CompileOptions::get_clang_args
Soon we'll parse the options earlier where we don't target a specific
device yet, so we need to be able to generate the clang arguments on the
fly after parsing.

Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42021>
2026-06-09 00:38:08 +00:00
Karol Herbst
33f6c01caa rusticl/util: add CStrExt::from_ptr_or_empty
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42021>
2026-06-09 00:38:08 +00:00