Commit graph

221577 commits

Author SHA1 Message Date
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
Sagar Ghuge
8a990b5a1c intel/genxml: Added dispatch timeout counter extended field
Since field is split in between multiple fields, we have to manually
write the values and refer to Bspec 43851 for exact values.

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
Sagar Ghuge
3e203a8040 util: Increase array size to 20
For the future patches in Anv, we will be expanding the driconf enum to
have 19 entries, so extend array from 5 to 20 to account that.

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
Emma Anholt
fa2750344d ci/piglit-traces: Remove ANGLE trace support.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
All consumers are now switched over to gpu-trace-replay.sh.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41115>
2026-04-23 22:54:12 +00:00
Emma Anholt
01cb024922 ci/intel: Switch over to the new tool for restricted traces.
The new tool has much better image diffing presentation (thanks to
Danilo's work on turnip's private trace CI), better performance, flake
checking within a single run, parallelized downloads along with replays,
system monitoring for replay debug (OOMs especially), and DXVK support
(I've added a few traces, but not most of the collection because I didn't
want to block on stabilizing this job with everything).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41115>
2026-04-23 22:54:12 +00:00
Emma Anholt
7094e30a00 ci/amd: Switch radv-raven-traces-restricted over to gpu-trace-replay.sh
The new tool has much better image diffing presentation (thanks to
Danilo's work on turnip's private trace CI), better performance, flake
checking within a single run, parallelized downloads along with replays,
system monitoring for replay debug (OOMs especially), and DXVK support
(I've added a few traces, but not most of the collection because I didn't
want to block on stabilizing this job with everything).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41115>
2026-04-23 22:54:12 +00:00
Valentine Burley
96ae27069d ci/crosvm: Sanitize CROSVM_RET in crosvm-runner.sh
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
When crosvm crashes, the `exit_code` file might not exist or might
contain unexpected garbage (multi-line output or spaces).
Because $CROSVM_RET was unquoted in comparisons, this led to intermittent
"too many arguments" bash syntax errors, which masked the true failure.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41124>
2026-04-23 21:47:21 +00:00
Valentine Burley
c22e4022a8 tu: Implement deferred image creation for ANB and AHB
Based on 075d78115e ("panvk: implement deferred image creation"),
8aa2f1a94f ("panvk: add panvk_android_get_wsi_memory for AHB spec v8+"),
and 66bbd9eec8 ("panvk: implement AHB image deferred init and memory alloc").

Defer image initialization for both ANB alias images (gralloc v8+)
and AHB-backed images using vk_android_init_deferred_image() to
deep-copy the VkImageCreateInfo at vkCreateImage time.

For ANB alias images, tu_image_init() and tu_image_update_layout()
run at vkBindImageMemory2 time via tu_android_get_wsi_memory() when
the native buffer arrives.

For AHB images, tu_image_init() and tu_image_update_layout() run at
vkAllocateMemory time when the AHardwareBuffer handle is available
via dedicated allocation.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40635>
2026-04-23 21:21:31 +00:00
Valentine Burley
5fb560688b vulkan: Query memory requirements in vk_android_import_anb_memory
Based on 752ea7f6df ("panvk: resolve ANB (pre spec v8)").

Replace the hardcoded memoryTypeIndex 0 and lseek-based allocationSize
with proper GetImageMemoryRequirements and GetMemoryFdPropertiesKHR
queries.

Also fix a missing error check on os_dupfd_cloexec().

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40635>
2026-04-23 21:21:31 +00:00
Valentine Burley
e0965d82b7 vulkan/android: Add vk_android_import_anb_memory helper
Extract the AllocateMemory/import-FD portion of vk_android_import_anb()
into vk_android_import_anb_memory(). This lets drivers with deferred
image creation import ANB memory without triggering BindImageMemory2.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40635>
2026-04-23 21:21:31 +00:00
Valentine Burley
8d4fb52919 panvk: Use vk_android deferred image helper
Switch to using the new helper.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40635>
2026-04-23 21:21:31 +00:00
Valentine Burley
013dee3b8f vulkan/android: Add deferred image helper
Add a new helper based on panvk's implementation added in
075d78115e ("panvk: implement deferred image creation").

vk_android_init_deferred_image  deep-copies and sanitizes a
VkImageCreateInfo chain for deferred Android native buffer (ANB)
alias image creation.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40635>
2026-04-23 21:21:31 +00:00
Eric Guo
ba92143ef2 compiler: Add missing MESA_SHADER_KERNEL case for SPIR-V dump
Fixes assertion failure when MESA_SPIRV_DUMP_PATH is set for OpenCL
programs.

Signed-off-by: Eric Guo <eric.guo@nxp.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41097>
2026-04-23 20:36:55 +00:00
Alyssa Rosenzweig
6a43e6c9e0 nir/opt_algebraic: add redundant u2u32/unpack_64_2x32_split_x patterns
reduces hello world kernel 57 -> 44 inst on jay. why do we have two opcodes that
do literally the same thing? :/

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41085>
2026-04-23 19:54:21 +00:00
Sagar Ghuge
e65e62b17f intel/genxml: Disable compute walker mid-thread preemption
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
On Xe, we have this bit reversed. It's called Thread preemption Disable.
On Xe2+ (Bspec 56590), it's called Thread preemption with option
enabled/disabled.

AFAIK, we don't support mid-thread preemption. This patch set values
properly according to bspec.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41120>
2026-04-23 19:24:41 +00:00
Lionel Landwerlin
b3fe0cb34e anv: expose VK_KHR_shader_constant_data
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40741>
2026-04-23 19:02:27 +00:00
Virgile Bello
50ab52f135 microsoft/compiler, d3d12: preserve TCS outputs and pad TES inputs for cross-stage signature matching
Four linked D3D12 pipeline-validation problems with GLSL TCS on DXIL:

1) dxil_nir_kill_unused_outputs killed TCS outputs read back by the
   patch-constant function after a barrier, zeroing the tess factors.
   Keep shader_out locations with any intra-shader load_deref live
   regardless of next_stage_read_mask.

2) is_dead_in_variable dropped TES padding placeholders (no local
   uses) in nir_remove_dead_variables. Also honor
   prev_stage_written_mask so padded TES inputs stay alive.

3) Preserving (1) leaves HS with outputs the DS doesn't declare,
   breaking pipeline validation (e.g. piglit's barrier.shader_test).
   Add dxil_nir_pad_tes_input_signature, called from both link paths,
   to synthesize matching TES inputs (reusing each TCS output's type
   so sig shape and stride match byte-for-byte) plus the tess-level
   inputs -- subsuming the tess-level-only block previously in
   dxil_spirv_nir_link. Scope the per-variable padding to TCS
   outputs that TCS itself reads back via load_deref: outputs that
   neither TES nor TCS consumes get killed from the HS signature,
   so padding them into DS would make the DS input signature longer
   than HS output and break validation for SSO pipelines whose TCS
   declares unused per-patch writes (arb_separate_shader_objects/
   mix-and-match-tcs-tes).

4) remove_hs_intrinsics rewrote load_output but not
   load_per_vertex_output in HS main. With (1) keeping outputs alive,
   GLSL reads of outputs in main whose result survives DCE (UAV
   atomics, non-tess per-vertex output writes) left
   LoadOutputControlPoint in the control-point function, which dxil.dll
   rejects outside the PCF (CreatePipelineState then fails with
   E_INVALIDARG). Treat load_per_vertex_output like load_output.

Validated on piglit arb_tessellation_shader/execution (WARP + DXC
1.8.2403): barrier now passes; the previously-crashing
tcs-output-unmatched and variable-indexing/tcs-output-array-* fail
gracefully matching baseline; isoline/isoline-no-tcs remain flakes
(pre-existing canary corruption, unrelated).

d3d12-quick_shader.txt drops barrier; d3d12-flakes.txt adds
isoline-no-tcs alongside isoline.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41028>
2026-04-23 18:45:01 +00:00
Virgile Bello
1d923fdd2b microsoft/compiler, d3d12: flip tess winding at caller, not in nir_to_dxil
get_tessellator_output_primitive used to unconditionally invert CW<->CCW
on the assumption the input was GL-origin (lower-left). That was wrong
for any upper-left caller — including spirv_to_dxil, whose SPIR-V sources
(DXC, glslang) already align with D3D winding.

Make nir_to_dxil copy info.tess.ccw through and expect upper-left. The
d3d12 gallium driver (GL) flips before the conversion to preserve its
output. spirv_to_dxil and dozen (Vulkan, UPPER_LEFT default) are unchanged.

Assisted-by: Claude Opus 4.7 <noreply@anthropic.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41028>
2026-04-23 18:45:01 +00:00
Virgile Bello
1262600f0f microsoft/compiler: sink load_invocation_id in TCS split even for single-use
dxil_nir_split_tess_ctrl sinks load_invocation_id into per-use local
loads before wrapping the pre-barrier region in a loop. That sinking
was skipped when the load had only one use, on the assumption that
duplication wasn't needed.

The skip produces wrong code when the single use is on the opposite
side of the barrier from the load — e.g. HLSL-style TCS with a post-
barrier `if (InvocationId == 0)` patch-constant gate. The load gets
wrapped into the loop but the use stays outside, and after SSA repair
the use sees the counter's post-loop value (== tcs_vertices_out),
making the gate fold to false. opt_dead_cf then strips the patch-
constant stores inside the gate body, producing an empty
PatchConstantFunc and zero tess factors at runtime.

Dropping the list_is_singular skip moves the single-use load right
before its use, letting the existing pre/post-barrier handling wrap
each region correctly. Multi-use loads still get one local load per
use as before.

Assisted-by: Claude Opus 4.7 <noreply@anthropic.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41028>
2026-04-23 18:45:01 +00:00
Christoph Pillmayer
b7f9974f3e pan/bi: Fix format in bi_repair_ssa
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40969>
2026-04-23 15:49:48 +00:00
Christoph Pillmayer
fcfc580f67 pan/bi: Fix source swizzle in bi_repair_ssa
Repairing SSA was creating invalid PHI nodes with source swizzles !=
BI_SWIZZLE_H01. PHI sources can't have non-identity swizzles.

In most cases the repair logic only replaces sources, in which case the
swizzle is taken from the old source that is getting replaced. However,
in add_phi_operands there is no old source because the phi is new, and
so the result from resolve_read is assigned directly. This falsely
carries over the destination swizzle to the source.

Since it never makes sense for resolve_read to carry over the swizzle
from the instruction writing the value, we can make it so that
resolve_read always returns the identity swizzle on indices.
resolve_read returns one of:
- An index stored by record_write
- An index created by bi_temp_like
- The result of a recursive resolve_read call
bi_temp_like already correctly sets the swizzle to H01. Setting it in
record_write leads to both base cases returning the desired swizzle.

Fixes: dd94d183 ("pan/bi: Fixup bi_repair_ssa.c for bi")
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40969>
2026-04-23 15:49:47 +00:00
Danylo Piliaiev
037873b8e1 tu: Fix draw call offset for LRZ warnings in secondaries
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: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41103>
2026-04-23 14:23:25 +00:00
Tapani Pälli
4394e26f52 drirc: set anv_disable_subgroup_size_control for bg3
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15225
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/14501
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40813>
2026-04-23 13:16:05 +00:00
Tapani Pälli
c105366165 drirc/anv: add flag to disable VK_EXT_subgroup_size_control
This can be used to workaround problem cases with application
controlled subgroup size.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40813>
2026-04-23 13:16:05 +00:00
Aitor Camacho
f2938d2708 kk: Add ds state to fragment key since it's part of the pipeline we compile
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/15301
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41128>
2026-04-23 12:59:24 +00:00
Samuel Pitoiset
91f5fcdcd5 radv: advertise VK_KHR_shader_constant_data
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: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40722>
2026-04-23 11:12:06 +00:00
Samuel Pitoiset
34b8ce948a spirv: add support for SPV_KHR_constant_data
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40722>
2026-04-23 11:12:06 +00:00
squidbus
378974588e kk: Update dynamic depth stencil state regardless of set attachments.
Even if the attachments are not defined, we still need to update the state to reflect
changes like depth test being turned off, etc. The state compile itself will take into
account which attachments are set and appropriately configure the Metal depth-stencil
state.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41119>
2026-04-23 10:15:18 +00:00
Liu, Mengyang
40fa195cd0 aco: fix broken VGPRs reservation for 64-bit attributes in VS prologs
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
After 8e6bff4caa, the large attribute counts as two slots in
`num_attributes` if the vertex shader consumes more than two
channels of it, even though `misaligned_mask` marks only the
lower slot.

Fixes: 8e6bff4caa ("radv: Lower 64-bit VS inputs to 32-bit")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41071>
2026-04-23 08:20:47 +00:00
Samuel Pitoiset
371316e989 radv: use radv_compiler_info everywhere during compilation
This prevents the compiler to access the logical/physical devices and
the instance during compilation.

The main goal is to make it more robust against cache related issues
when something isn't hashed correctly (this used to happen a lot in the
past). Also it would be much more robust for sharing binaries between
two GPUs in the same generation (eg. Vangogh/Rembrandt) because
everything needed for compilation is in radv_compiler_info. There is
still some work to do to achieve that but it's making good progress.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40992>
2026-04-23 07:56:48 +00:00
Samuel Pitoiset
4a91fd8bab radv: add a radv_compiler_info object
This object contains everything needed for compiling AMD binaries
from SPIR-V to assembly.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40992>
2026-04-23 07:56:48 +00:00
Samuel Pitoiset
6e86d2877b radv/rt: pass more parameters to radv_rt_nir_to_asm()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40992>
2026-04-23 07:56:47 +00:00
Valentine Burley
34ffa61805 radv/ci: Add more ASAN VKCTS jobs on Cezanne
Use more devices for the radv-cezanne-vkcts-asan job, but decrease
concurrency from 4 to 3 to avoid OOMs.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41099>
2026-04-23 07:34:03 +00:00
Valentine Burley
4e4207e639 zink/ci: Remove Cezanne job
The devices will be repurposed for a different job.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41099>
2026-04-23 07:34:03 +00:00
Valentine Burley
97baa27dad freedreno/drm/virtio: Fix wait_fence ret ordering
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
ret was read after the timeout check, so breaking on timeout returned 0
instead of the actual fence status, potentially reporting a signaled
fence when it was still pending.

Fixes: 441f01e778 ("freedreno/drm/virtio: Drop blocking in host")

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41108>
2026-04-23 06:52:14 +00:00
Valentine Burley
dad72b414b tu/drm/virtio: Fix tu_wait_fence timeout handling
Fixes two bugs in the WAIT_FENCE polling loop:
1. Break on timeout returned VK_SUCCESS because ret was read too late.
2. UINT64_MAX timeout_ns overflowed end_time, causing immediate exit.

Fix by reading rsp->ret before the timeout check and using
OS_TIMEOUT_INFINITE (like virtio_pipe_wait in freedreno) to avoid
overflow.

This prevents premature BO teardown during host-side fault recovery.

Fixes: f17c5297d7 ("tu: Add virtgpu support")
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41108>
2026-04-23 06:52:14 +00:00
jinmiliu
809bf45c12 radeonsi: enable protected context support for Android
Enable protected context capability for Android
when TMZ support is available. This is needed for Widevine L1 secure
video playback on Android, which requires a protected context.

Signed-off-by: jinmiliu <jinming.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40980>
2026-04-23 05:23:57 +00:00
Qiang Yu
b41cd59790 ac,radeonsi,radv: use V_581A_* engine sel for non-pws acquire_mem packet
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
V_581B_PFP and V_581B_ME is for pws acquire_mem. Current code
does not cause any problem because we won't pass engine arg
directly to acqure_mem packet. But use a native V_581A_* arg
for better coding.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41069>
2026-04-23 02:48:06 +00:00
Qiang Yu
89c1bf34ed ac,radeonsi,radv: fix print IB assertion fail for reserved fields
New IB print will assert reserved packet field to be zero.

Fixes: 1c75cd958f ("ac: enable the new auto-generated CP packet parser")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41069>
2026-04-23 02:48:06 +00:00
Iván Briano
c5edb90046 anv: silence warning
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
../src/intel/vulkan/genX_init_state.c: In function ‘gfx9_CreateSampler’:
../src/intel/vulkan/genX_init_state.c:1507:40: warning: ‘border_color_offset’ may be used uninitialized [-Wmaybe-uninitialized]
 1507 |       sampler_state.BorderColorPointer = border_color_offset;

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41116>
2026-04-22 16:17:35 -07:00
Eric Engestrom
0458a47cf9 docs: update calendar for 26.1.0-rc2
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41114>
2026-04-22 21:05:58 +00:00
GKraats
686266d2f1 crocus: Fix shader precompilation on Gen6 and higher
By default crocus precompiles shaders, to avoid stuttering at screens,
caused by compiling shaders at the drawing phase.
Unfortunately at intel Gen 6 and higher the precompiled version of the
fragment shaders is not used and every fragment shader is compiled twice.
These double fragment shaders also are added to the memory cache
and disk cache.
This is caused by setting wrong values to variables at the key during
precompiling at routine crocus_create_fs_state() at src/gallium/drivers/crocus/crocus_program.c,
which differ from values at crocus_populate_fs_key() at src/gallium/drivers/crocus/crocus_state.c.

This commit solves 3 problems:

it adjusts the predicted value 'input_slots_valid' at Gen 6
it adjusts the predicted value 'ignore_sample_mask_out' at Gen 6 and higher
it predicts the value 'multisample_fbo' , which helps if samplemask is used

Cc: mesa-stable
Signed-off-by: GKraats <vd.kraats@hccnet.nl>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35605>
2026-04-22 20:50:29 +00:00
GKraats
3c01e6139a hasvk: unbreak assert format != ISL_FORMAT_UNSUPPORTED
Format is set to ISL_FORMAT_UNSUPPORTED at anv_get_format_plane at src/intel/vulkan_hasvk/anv_formats.c,
because Ivy Bridge does not support enough 24 and 48-bits formats.

Problem solved by checking format after the call.

Signed-off-by: GKraats <vd.kraats@hccnet.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40237>
2026-04-22 20:35:25 +00:00
Valentine Burley
96d17d18be zink/ci: Move Turnip flakes to correct list
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
These belong in the zink directory, not freedreno. Also add 2-sample
variants and document the origin.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41111>
2026-04-22 19:56:11 +00:00
Valentine Burley
d982092865 anv/ci: Revert ADL VKCTS job to stable 6.17 kernel
Xe is unstable on 6.19; revert to the previous stable kernel.
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/97945843
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/97944526

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41112>
2026-04-22 19:29:43 +00:00
Caio Oliveira
26ef12f7c1 brw: Use brw prefix to LSC helpers tied to brw
Mapping from BRW ops to LSC ops.  And the len() helpers
that use the REG_SIZE as unit -- which is a BRW convention.

Acked-by: Iván Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41006>
2026-04-22 18:25:41 +00:00