Commit graph

213844 commits

Author SHA1 Message Date
Timur Kristóf
1cbce7ea76 ac/gpu_info: Disable sparse VM mappings pre-Polaris, for now
Disable sparse mappings on GFX7-8 due to GPU hangs in the VK CTS,
except Polaris where it happens to work "well enough" to pass
the VK CTS and run some games already.

Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit 567e1b56ef)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-11-17 09:54:33 -08:00
Timur Kristóf
1f6d6533c0 radv: Disable sparse mapping when unsupported by VM
Also disable the sparse binding queue and other related features.
Using sparse on GFX6-8 can cause GPU hangs at the moment.

Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit 1c8881fc60)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-11-17 09:54:32 -08:00
Daniel Schürmann
19cab16a87 nir/opt_large_constants: Fix dead deref instructions accessing lowered variables
It could happen that unused derefs weren't removed
if DCE wasn't called prior to nir_opt_large_constants.

Cc: mesa-stable
(cherry picked from commit 0d70716c8a)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-11-17 09:54:32 -08:00
Lionel Landwerlin
8b20f43336 brw: fix SIMD lowering of sampler messages with fp16 data
We need to make sure the data part returned by sampler messages is
always aligned to a physical register. Just like the residency data
lives in a single physical register after the data.

Lowering a vec3 16bits per components led to a half a physical
register allocation which then confused the descriptor lowering
(expecting physical register units).

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 295734bf88 ("intel/fs: fix residency handling on Xe2")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12794
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
(cherry picked from commit 61d6aea401)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-11-17 09:54:31 -08:00
Yiwei Zhang
d29700fce6 venus: use seq_cst for ring cs and tail update ordering
To avoid incompatibility between the compiler implementations used by
the driver and the renderer, seq_cst ordering is picked here, which has
required a full mfence instruction. Then the renderer side acquire is
ensured to be ordered after the cache flush of ring cs updates.

Perf wise, there's no regression in headless vkmark runs. In theory,
the overhead introduced here weighs trivially as compared to the ring
cs encode/decode part. So we should go for better robustness.

Test: venus on windows guest works with renderer on Linux
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14277
(cherry picked from commit 07d059f3e2)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-11-17 09:54:30 -08:00
Lionel Landwerlin
d22a20de74 brw: fixup 64bit atomics emulation on 2D array images
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: ce7208c3ee ("brw: add support for texel address lowering")
Acked-by: Nanley Chery <nanley.g.chery@intel.com>
(cherry picked from commit b3cc54731f)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-11-17 09:54:27 -08:00
Connor Abbott
1f1b69c35a tu: Handle case where pipeline writes unused color attachments
With VK_EXT_unused_attachments, we may have a case where the FS writes
to attachments 0 and 1, both have valid formats and are enabled, yet the
renderpass only has 1 color attachment. In this case we would set
RB_PS_MRT_CNTL to 2, but since we never emitted RB_MRT_BUF_INFO[1] and
so on, we would get garbage attachment info from the last render pass
and end up writing to an attachment that doesn't exist.

Fix this by disabling attachments that are unused. We can't move setting
RB_PS_MRT_CNTL to emitting when we emit color RT state, because then we
have the inverse problem of a FS that writes to attachments 0 and 1, a
renderpass that has 2 attachments, but a blend state that only includes
1 attachment (and therefore disables color writes for attachment 1). At
least one side (blending or RT emission) has to assume that the other
side may have more RTs enabled and disable the rest of the RTs up to
MAX_RTS.

Fixes: c2eb768eb2 ("tu: Expose VK_EXT_dynamic_rendering_unused_attachments")
(cherry picked from commit 6064e3a7d8)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-11-17 09:54:26 -08:00
Alyssa Rosenzweig
b475bf8f26 nir/sweep: fix use-after-free with dominance LCA
Either we need to save this pointer or toss it.

==146166==ERROR: AddressSanitizer: heap-use-after-free on address 0x7bfe77013920 at pc 0x7b9e6fd5b978 bp 0x7ffc30ef18e0 sp 0x7ffc30ef18d8
READ of size 4 at 0x7bfe77013920 thread T0
    #0 0x7b9e6fd5b977 in get_header ../src/util/ralloc.c:83
    #1 0x7b9e6fd5b977 in ralloc_parent ../src/util/ralloc.c:382
    #2 0x7b9e6fd5b977 in reralloc_size ../src/util/ralloc.c:198
    #3 0x7b9e6fd5b977 in reralloc_array_size ../src/util/ralloc.c:241
    #4 0x7b9e705f83c2 in range_minimum_query_table_resize ../src/util/range_minimum_query.c:21
    #5 0x7b9e7018af1d in realloc_info ../src/compiler/nir/nir_dominance_lca.c:33
    #6 0x7b9e7018af1d in nir_calc_dominance_lca_impl ../src/compiler/nir/nir_dominance_lca.c:126
    #7 0x7b9e6ff9815c in nir_metadata_require ../src/compiler/nir/nir_metadata.c:42
    #8 0x7b9e6ff998e4 in nir_metadata_require_most ../src/compiler/nir/nir_metadata.c:200
    #9 0x7b9e6f8aab4d in st_finalize_nir ../src/mesa/state_tracker/st_glsl_to_nir.cpp:735
    #10 0x7b9e6f0afb14 in st_create_common_variant ../src/mesa/state_tracker/st_program.c:858
    #11 0x7b9e6f0be2d3 in st_get_common_variant ../src/mesa/state_tracker/st_program.c:973
    #12 0x7b9e6f0bf9cf in st_precompile_shader_variant ../src/mesa/state_tracker/st_program.c:1478
    #13 0x7b9e6f0bf9cf in st_finalize_program ../src/mesa/state_tracker/st_program.c:1596
    #14 0x7b9e6f8b0127 in st_link_glsl_to_nir ../src/mesa/state_tracker/st_glsl_to_nir.cpp:633
    #15 0x7b9e6f8b3611 in st_link_shader ../src/mesa/state_tracker/st_glsl_to_nir.cpp:816
    #16 0x7b9e6f7bcf51 in link_program ../src/mesa/main/shaderapi.c:1412
    #17 0x7b9e6f7bcf51 in link_program_error ../src/mesa/main/shaderapi.c:1474
    #18 0x0000004020b0 in main._omp_fn.0 /home/alyssa/shader-db/run.c:872
    #19 0x7f9e7893dd65 in GOMP_parallel (/lib64/libgomp.so.1+0xdd65) (BuildId: 9cc501fdca53b5d4ab094f709486781c98573bc9)
    #20 0x000000400d6a in main /home/alyssa/shader-db/run.c:689
    #21 0x7f9e78011574 in __libc_start_call_main (/lib64/libc.so.6+0x3574) (BuildId: 48c4b9b1efb1df15da8e787f489128bf31893317)
    #22 0x7f9e78011627 in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x3627) (BuildId: 48c4b9b1efb1df15da8e787f489128bf31893317)
    #23 0x000000401014 in _start (/home/alyssa/shader-db/run+0x401014) (BuildId: a83b8d830cc265be3f54ea3e7a21a0fb5156624b)

0x7bfe77013920 is located 0 bytes inside of 64-byte region [0x7bfe77013920,0x7bfe77013960)
freed by thread T0 here:
    #0 0x7f9e782e5beb in free.part.0 (/usr/lib64/libasan.so.8+0xe5beb) (BuildId: cab80046dbc1c97c6e14490acc37d079701f8d9a)
    #1 0x7b9e6fd5bc39 in unsafe_free ../src/util/ralloc.c:319
    #2 0x7b9e6fd5bc39 in ralloc_free ../src/util/ralloc.c:264
    #3 0x7b9e70063d81 in nir_sweep ../src/compiler/nir/nir_sweep.c:219
    #4 0x7b9e6f0bf499 in st_finalize_program ../src/mesa/state_tracker/st_program.c:1585
    #5 0x7b9e6f8b0127 in st_link_glsl_to_nir ../src/mesa/state_tracker/st_glsl_to_nir.cpp:633
    #6 0x7b9e6f8b3611 in st_link_shader ../src/mesa/state_tracker/st_glsl_to_nir.cpp:816
    #7 0x7b9e6f7bcf51 in link_program ../src/mesa/main/shaderapi.c:1412
    #8 0x7b9e6f7bcf51 in link_program_error ../src/mesa/main/shaderapi.c:1474
    #9 0x0000004020b0 in main._omp_fn.0 /home/alyssa/shader-db/run.c:872

previously allocated by thread T0 here:
    #0 0x7f9e782e5e4b in realloc.part.0 (/usr/lib64/libasan.so.8+0xe5e4b) (BuildId: cab80046dbc1c97c6e14490acc37d079701f8d9a)
    #1 0x7b9e6fd5a883 in resize ../src/util/ralloc.c:167
    #2 0x7b9e705f83c2 in range_minimum_query_table_resize ../src/util/range_minimum_query.c:21
    #3 0x7b9e7018af1d in realloc_info ../src/compiler/nir/nir_dominance_lca.c:33
    #4 0x7b9e7018af1d in nir_calc_dominance_lca_impl ../src/compiler/nir/nir_dominance_lca.c:126
    #5 0x7b9e6ff9815c in nir_metadata_require ../src/compiler/nir/nir_metadata.c:42
    #6 0x7b9e6ff998e4 in nir_metadata_require_most ../src/compiler/nir/nir_metadata.c:200
    #7 0x7b9e6f8b0ede in st_link_glsl_to_nir ../src/mesa/state_tracker/st_glsl_to_nir.cpp:550
    #8 0x7b9e6f8b3611 in st_link_shader ../src/mesa/state_tracker/st_glsl_to_nir.cpp:816
    #9 0x7b9e6f7bcf51 in link_program ../src/mesa/main/shaderapi.c:1412
    #10 0x7b9e6f7bcf51 in link_program_error ../src/mesa/main/shaderapi.c:1474
    #11 0x0000004020b0 in main._omp_fn.0 /home/alyssa/shader-db/run.c:872

Fixes: 17876a00af ("nir: Add a faster lowest common ancestor algorithm")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit 65fcdf4c81)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-11-17 09:54:26 -08:00
Benjamin Cheng
4bd93089a7 radv/video: Align each layer of encode DPB to 256
VCN requires the luma/chroma VAs to be 256 aligned. On VCN5, the
collocated buffer was not 256 aligned which can cause these VAs to be
unaligned.

This fixes VVL PositiveVideoEncodeH264.Basic on VCN5.

Fixes: 37e71a5cb2 ("radv/video: add support for AV1 encoding")
Reviewed-by: David Rosca <david.rosca@amd.com>
(cherry picked from commit 8848495875)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-11-17 09:54:25 -08:00
Dylan Baker
7e61052f7b .pick_status.json: Update to 018f45f981
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-11-17 09:54:24 -08:00
Dylan Baker
0cb99ef602 docs: Add sha sums for 25.3.0
Some checks failed
macOS-CI / macOS-CI (dri) (push) Has been cancelled
macOS-CI / macOS-CI (xlib) (push) Has been cancelled
2025-11-14 13:56:23 -08:00
Dylan Baker
f7aeb0d677 VERSION: bump for 25.3.0
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
2025-11-14 13:25:42 -08:00
Dylan Baker
523eea18c5 docs: add release notes for 25.3.0 2025-11-14 13:24:41 -08:00
Samuel Pitoiset
48b0dd2892 radv: add vk_wsi_disable_unordered_submits and enable for GTK
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
GTK is missing a semaphore between QueueSubmit() and QueuePresent()
causing the WSI submit to be "unordered" and to immediately signal the
semaphores (because it's missing a wait semaphore in QueuePresent()).

The workaround is to disable unordered WSI submits until GTK fixes it
properly.

Cc: "25.3"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14087
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit 0d9d45db4e)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
2025-11-14 08:36:53 -08:00
Dylan Baker
25abf47e3e .pick_status.json: Update to 8f13905c5e
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
2025-11-14 08:36:53 -08:00
Mario Kleiner
28ca4a48d6 wsi/wayland: Zero min_luminance, max_luminance HDR light levels are valid.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
CTA-861-G section 6.9.1 Static Metadata Type 1 declares that zero values
for different groups of HDR Metadata properties are allowed, including
zero nits values for max display mastering luminance, max content light
level, max frame-average light level and min display mastering luminance.

A zero value is meant to be treated by the video sink as "undefined" /
"unknown", and handled accordingly. This is common for dynamically
generated visual content.

The is_hdr_metadata_legal() function in the Vulkan/WSI/Wayland HDR backend
currently declares HDR light level metadata as invalid if the mastering
display min_luminance and max_luminance light levels are set to the legal
level of zero nits. This causes valid HDR metadata as set by the client
via vkSetHdrMetadata() to be not sent to the compositor.

Fix this by skipping checks that don't apply if min_luminance or
max_luminance are zero. If max_luminance is zero then we skip sending
of mastering display min/max luminance to Wayland, as sending a a
max_luminance <= min_luminance would trigger a protocol error. All
other valid data is still send, ie. color primaries, white-point,
content light levels.

Fixes: cb7726bb2c ("vulkan/wsi: validate HDR metadata to not cause protocol errors")
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Co-authored-by: Michel Dänzer <michel@daenzer.net>
Reviewed-by: Xaver Hugl <xaver.hugl@kde.org>
(cherry picked from commit 490f05f82c)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
2025-11-13 08:38:01 -08:00
Lars-Ivar Hesselberg Simonsen
23665f9bd9 pan/format: Disable PAN_BIND_STORAGE_IMAGE for RGBA4/BGRA4
The RGBA4/BGRA4 formats had the PAN_BIND_STORAGE_IMAGE set, but we
cannot support that.

Fixes: d95423686f ("pan/format: Add PAN_BIND_STORAGE_IMAGE flag")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
(cherry picked from commit 15868cf6e9)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
2025-11-13 08:38:00 -08:00
Lars-Ivar Hesselberg Simonsen
b7ce6abb6a pan/format: Fix mapping for I16F
This was mapped to RG16F, while R16F should be correct.

Cc: mesa-stable
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
(cherry picked from commit 1e2ca4dad6)

Conflicts:
	src/panfrost/ci/panfrost-g610-fails.txt
	src/panfrost/ci/panfrost-g610-flakes.txt

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
2025-11-13 08:37:59 -08:00
Ludvig Lindau
0fbf00af9b panfrost: Make instrs_equal check res table/index
Add resource table and index check to instruction equality function.
This prevents CSE from mistakenly eliminating LEA_BUF_IMM instructions
that load from different resources, but with the same buffer offset.

Cc: mesa-stable
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
(cherry picked from commit 00b5275fe8)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
2025-11-13 08:10:40 -08:00
Gert Wollny
e2164fbc11 r600/sfn: Don't start a new ALU-CF if LDS pipeline loads are pending
Fixes: e57643cf (r600/sfn: Add handling for R600 indirect access alias handling)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
(cherry picked from commit 79e4323cf0)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
2025-11-13 08:10:39 -08:00
Joshua Simmons
f651443a74 vtn: Fix OpCopyLogical destination type
Previously the type info for nested values was copied from the source
operand, rather than propagating the new type from the destination
operand.

Fixes: 4c363acf94 ("vtn: Allow for OpCopyLogical with different but compatible types")
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
(cherry picked from commit 7ac1f7777d)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
2025-11-13 08:10:38 -08:00
Marek Olšák
b5a4245193 gallium/noop: don't unref buffers passed to set_vertex_buffers to fix crashes
this code is invalid after the refcounting rework

Fixes: b3133e250e - gallium: add pipe_context::resource_release to eliminate buffer refcounting

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
(cherry picked from commit 7d22e4c7ba)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
2025-11-13 08:10:37 -08:00
Lionel Landwerlin
76d66b72db anv: disable software detiling on Xe2+ for image atomics 64bits
This is what happens when you leave MR unreviewed for months.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: d39e443ef8 ("anv: add infrastructure for common vk_pipeline")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
(cherry picked from commit c4e2878537)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
2025-11-13 08:10:37 -08:00
Timur Kristóf
09b856c367 ac/nir/ngg: Fix scratch space for NGG GS streamout
For GS streamout, we need the following LDS scratch space:

- Repacking streamout vertices takes 1 dword per 4 waves per stream
  (max 16 bytes for Wave64, max 32 bytes for Wave32)
- 1 dword per stream for buffer info
  (16 bytes)
- 1 dword per buffer for buffer info
  (16 bytes)

Previously, the space used for buffer info aliased with the
space for repacking the output vertices in ngg_gs_finale(),
and there was no barrier in between, which caused a race
condition, resulting in random failure.

Fix this by allocating a few more LDS dwords so that aliasing
is not required, which also allows us to remove an extra
workgroup barrier.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12705
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
(cherry picked from commit 8f99d736d0)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
2025-11-13 08:10:36 -08:00
Christian Gmeiner
e5f9980d50 meson: require sysprof-capture-4 >= 4.49.0
When Mesa is compiled with sysprof support, applications can crash with a
segfault during shutdown. This happens because sysprof_collector_mark()
registers thread-local storage destructors that get called after the library
containing the destructor code has been unloaded.

The problem was fixed in sysprof https://gitlab.gnome.org/GNOME/sysprof/-/merge_requests/152

CC: mesa-stable
Closes: mesa/mesa#13571
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
(cherry picked from commit e9341568fa)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
2025-11-13 08:10:35 -08:00
Dmitry Baryshkov
7f68450a6c ci: drop google-freedreno remnants
Drop remnants of the  google-freedreno lab entries.

Fixes: 6541b911bd ("freedreno/ci: Remove baremetal job templates")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
(cherry picked from commit 9a33edca35)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
2025-11-13 08:10:34 -08:00
Natalie Vock
feccefbc86 radv: Fix PSO history with RT pipelines
1. The prolog needs to have a null check. Libraries don't have prologs.
2. We only need to print the shaders actually included in this pipeline.
   Libraries were already printed separately.
3. The traversal shader was wrongly omitted from the output.

Cc: mesa-stable
(cherry picked from commit 73a31dafbc)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
2025-11-13 08:10:33 -08:00
Sviatoslav Peleshko
a407dc6d83 driconf: Add vertex_program_default_out option for Penumbra: Overture
Penumbra's vertex program Diffuse_EnvMap_Reflect_vp.cg produces 3-component
texture coordinates and primitive colors while using the FF fragment
program. Add this WA to fix the misrenderings.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14170
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
(cherry picked from commit 5af8abbf8b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
2025-11-13 08:10:32 -08:00
Sviatoslav Peleshko
4a0cb910e4 mesa,driconf: Add WA to initialize vertex program outputs to vec4(0,0,0,1)
Per ARB_vertex_program spec result registers are 4-component and initially
undefined, and the FF fragment program expects its intputs to be
4-component too. So, if the client's vertex program does not write the
whole vector it will cause misrenderings unless the same client also
supplies fragment program that expects less than 4 componens.

This commit adds a workaround that initializes results to vec4(0, 0, 0, 1)
which seems to be an expected behavior for such clients.

Cc: mesa-stable
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
(cherry picked from commit f03432c81a)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
2025-11-13 08:10:31 -08:00
Faith Ekstrand
8ffc19f935 nir: Add a couple panfrost sysvals to divergence analysis
Fixes: 2af6e4beeb ("pan: Don't pretend we support load_{vertex_id_zero_base,first_vertex}")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayern@arm.com>
(cherry picked from commit 0e9fcb33c3)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
2025-11-13 08:10:30 -08:00
Tapani Pälli
de44196bfb anv: fix issues found with indirect data stride
Use tristate for the aligned setting, otherwise it is always
first disabled which contributes to the condition if we set the
new stride active.

v2: set ByteStride in dword units and take secondary cmdbuf
    in to account (Lionel)

Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Nataraj Deshpande <nataraj.deshpande@intel.com>
(cherry picked from commit 2741ddd75a)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
2025-11-13 08:10:30 -08:00
Timothy Arceri
f0aeb824b9 glsl: assign block indices in the order they appear
The hash lookup should be negligible. This makes things
predictable rather than having hash table modifications causing
the order to change, and fixes things for some seemingly buggy games.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13802
Fixes: be5a15f11d ("util/hash_table: start with 16 entries to reduce reallocations")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 595a2fdbd2)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
2025-11-13 08:10:29 -08:00
Sagar Ghuge
2cb191d7d1 intel/common: Consider 0 threads while setting TG
In ray tracing dispatch, we have dispatch.threads set to 0 since we
calculate the local_size_x/y/z based on the launch sizes.

This change takes 0 threads into an account and returh the TG size 8 in
such scenarios. Before this change, we were setting TG size to 2.

Fixes: 0c4e1c9efc ("intel/common: Add helper for compute thread group dispatch size")
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
(cherry picked from commit 16f66ffe55)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
2025-11-13 08:10:28 -08:00
Patrick Lerda
b074ea9fe8 r600: limit pre-evergreen predicate ready size
With the current stack configuration the rv770 seems to be unable
to go beyond three with the "vs-output-array-float-index-wr-before-gs.shader_test"
test. Anyway, the value four seems to be sufficient for the other tests.

This issue was triggered on rv770, for instance, with:
"piglit/bin/shader_runner tests/spec/glsl-1.50/execution/variable-indexing/gs-output-array-float-index-wr.shader_test -auto -fbo"
"piglit/bin/shader_runner tests/spec/glsl-1.50/execution/variable-indexing/vs-output-array-float-index-wr-before-gs.shader_test -auto -fbo"

Fixes: 713edb5998 ("r600/sfn: handle the IF predicate in the scheduler")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
(cherry picked from commit ae049f6fea)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
2025-11-13 08:10:27 -08:00
Karol Herbst
42726a2afa rusticl/spirv: preserve signed zeroes by default
Cc: mesa-stable
(cherry picked from commit 92a4ae0ab2)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
2025-11-13 08:10:26 -08:00
Karol Herbst
e42294ba9f rusticl/kernel: take no kernel_info reference inside the launch closure
Otherwise patterns like this wouldn't work:

clCreateKernel(prog)
clEnqueueNDRangeKernel
clReleaseKernel
clBuildProgram(prog)

Fixes: bb2453c649 ("rusticl/kernel: move most of the code in launch inside the closure")
(cherry picked from commit df344f12cc)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
2025-11-13 08:10:26 -08:00
Karol Herbst
3bb77d6906 rusticl/queue: fix error code for invalid sampler kernel arg
Fixes: 5795ee0e08 ("rusticl: translate spirv to nir and first steps to kernel arg handling")
(cherry picked from commit c0f0baeaca)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
2025-11-13 08:10:25 -08:00
Karol Herbst
efd2f1d61c rusticl/queue: fix error code for invalid queue properties part 2
Fixes: 2c202eb787 ("rusticl: verify validity of property names and values")
(cherry picked from commit e98abe35c0)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
2025-11-13 08:10:24 -08:00
Karol Herbst
2cd6bc199a rusticl/queue: fix error code for invalid queue properties part 1
Cc: mesa-stable
(cherry picked from commit e83400cab2)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
2025-11-13 08:10:23 -08:00
Eric Engestrom
5c3427b1fe ci: track src/android_stub/ changes
Fixes: 932f51d593 ("ci: Include enough Android headers to let us compile test EGL")
Suggested-by: Yonggang Luo <luoyonggang@gmail.com>
(cherry picked from commit f689322d27)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
2025-11-13 08:10:23 -08:00
Eric Engestrom
b6ae45d326 ci: track src/c11/ changes
It's used by mesa_util, so let's just consider changes to it can affect
any job.

Fixes: b2ddec4e98 ("c11: Implement c11/time.h with c11/impl/time.c")
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
(cherry picked from commit 2ec3e536fd)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
2025-11-13 08:10:22 -08:00
Lionel Landwerlin
14097ed79d anv/blorp/iris: rework Wa_14025112257
Drivers already have to track this workaround, so remove the logic
from Blorp and let the driver manage this.

Also in Anv don't accumulate this workaround, emit it directly in
place right after COMPUTE_WALKER. Accumulating can be problematic when
you want to dispatch concurrent compute shaders that do not need any
cache flush interaction (typical example with the internal
simple_shader framework).

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 3e0ad0176b ("anv: Emit state cache invalidation after every compute dispatch")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
(cherry picked from commit c478b6355a)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
2025-11-13 08:10:21 -08:00
Dave Airlie
0ef221f4a4 c11/threads: fix build on c23
C23/glibc is now including once_init in stdlib.h

https://patchwork.sourceware.org/project/glibc/patch/78061085-f04a-0c45-107b-5a8a15521083@redhat.com/#213088

Just fix up our use of it.

Cc: mesa-stable
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
(cherry picked from commit 179e744f75)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
2025-11-13 08:10:20 -08:00
Karol Herbst
263e1823d2 st/interop: fix fence leak
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14050
Fixes: 1396dc1c38 ("mesa/st, dri2, wgl, glx: Modify flush_objects interop func to export a fence_fd")
Tested-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
(cherry picked from commit 87550fc657)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
2025-11-13 08:10:19 -08:00
Faith Ekstrand
e334938384 nil: Add support for Blackwell 8 and 16-bit modifiers
Backport-to: 25.2
Reviewed-by: James Jones <jajones@nvidia.com>
(cherry picked from commit f1cb63a21d)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
2025-11-13 08:10:18 -08:00
Faith Ekstrand
f299249d8b drm-uapi: Import the new NVIDIA modifiers
Imported from kernel commit eef295a850820 of drm-misc-fixes

Backport-to: 25.2
Reviewed-by: James Jones <jajones@nvidia.com>
(cherry picked from commit 3247452b2c)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
2025-11-13 08:10:17 -08:00
Sagar Ghuge
594ae17ec9 anv: Drop unwanted untyped flush for AS query
CmdWriteAccelerationStructuresPropertiesKHR writes the data with MI
commands, we no longer dispatch shaders to write the properties.
As a result, we don't need to flush untyped cache.

Fixes: f0e18c475b ("intel: remove GRL/intel-clc")
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
(cherry picked from commit 14194e59a4)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
2025-11-13 08:10:15 -08:00
Benjamin Cheng
02ba16ec03 radv/video: Fix dummy DPB addresses
This fixes the VVL PositiveVideoDecodeAV1.* tests, which trigger error
concealment. These DPB addresses would not be normally used, but get
used by the error concealment path.

Fixes: d103b76ad6 ("radv/video: add VK_KHR_video_decode_av1 support.")
Reviewed-by: David Rosca <david.rosca@amd.com>
(cherry picked from commit 82d944b388)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
2025-11-13 08:10:14 -08:00
Lars-Ivar Hesselberg Simonsen
1460a0319f panvk: Fix IUB decode
The base address used for bounds checking the entry was wrong. Directly
pass the end_of_entry address instead.

Fixes: db4bcd48d7 ("panvk: Fix IUB decode")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
(cherry picked from commit 89293120f0)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
2025-11-13 08:10:09 -08:00
Dylan Baker
d48e4a3f3b .pick_status.json: Update to 294e72e2b5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
2025-11-13 08:10:00 -08:00