Commit graph

209376 commits

Author SHA1 Message Date
Taras Pisetskyi
d098ab32ba drirc/anv: force_vk_vendor=-1 for Wuthering Waves
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12459

Signed-off-by: Taras Pisetskyi <taras.pisetskyi@globallogic.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38023>
(cherry picked from commit dcd9b90aff)
2025-10-29 17:42:23 +01:00
Mary Guillemard
f8010cf813 hk: Allocate the temp tile buffer in copy_image_to_image_cpu
We may require a bigger more than 16KiB to handle the image copy.
We now always allocate a buffer to handle it properly fixing the
remaining failures on VKCTS 1.4.4.0 for HIC.

Fixes: 5bc8284816 ("hk: add Vulkan driver for Apple GPUs")
Signed-off-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38060>
(cherry picked from commit d37ba302d0)
2025-10-29 17:42:23 +01:00
Mary Guillemard
8a95275988 hk: Make width and height per block in HIC
We were assuming that every formats used for HIC had a block widgh and
height of 1x1.

This is wrong for compressed formats like BC5, ASTC, ect.

Fixes: 5bc8284816 ("hk: add Vulkan driver for Apple GPUs")
Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38060>
(cherry picked from commit 887f06a966)
2025-10-29 17:42:23 +01:00
Mary Guillemard
5a3f942bef hk: Remove unused allocation in queue_submit
Unused and leaking memory, found with address sanitizer.

Fixes: c64a2bbff5 ("asahi: port to stable uAPI")
Signed-off-by: Mary Guillemard <mary@mary.zone>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38054>
(cherry picked from commit 64131475a8)
2025-10-29 17:42:22 +01:00
Mary Guillemard
6ee5bb45ef hk: Disable 1x in sampleLocationsSampleCounts
We don't support it, everyone dropped support for that, let's not expose it.

Fixes: 5bc8284816 ("hk: add Vulkan driver for Apple GPUs")
Signed-off-by: Mary Guillemard <mary@mary.zone>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38054>
(cherry picked from commit 7e636d52f1)
2025-10-29 17:42:22 +01:00
Mary Guillemard
df3274f6c0 hk: Fix maxVariableDescriptorCount with inline uniform block
Same problem as NVK on VKCTS 1.4.4.0

Fixes: 5bc8284816 ("hk: add Vulkan driver for Apple GPUs")
Signed-off-by: Mary Guillemard <mary@mary.zone>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38054>
(cherry picked from commit 8447b99f61)
2025-10-29 17:42:22 +01:00
Faith Ekstrand
ea04b97dc5 panvk/shader: Use the right copy size for deserializing dynamic UBOs/SSBOs
Fixes: 563823c9ca ("panvk: Implement vk_shader")
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38019>
(cherry picked from commit 64ad337036)
2025-10-29 17:42:22 +01:00
Faith Ekstrand
0f12956d83 panvk/shader: [de]serialize desc_info.max_varying_loads
Fixes: de86641d3f ("panvk: Limit AD allocation to max var loads in v9+")
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38019>
(cherry picked from commit a546484ed9)
2025-10-29 17:42:22 +01:00
Faith Ekstrand
914864a5e4 nvk: Capture/replay buffer addresses for EDB capture/replay
Fixes: 3f1c3f04be ("nvk: Advertise VK_EXT_descriptor_buffer")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38040>
(cherry picked from commit 998dbd43d3)
2025-10-29 17:42:22 +01:00
Faith Ekstrand
c2609fade5 nvk: Look at the right pointer in GetDescriptorInfo for SSBOs
It doesn't actually matter but we shouldn't poke at the wrong union
field.

Fixes: 77db71db7d ("nvk: Implement GetDescriptorEXT")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38040>
(cherry picked from commit a13474939d)
2025-10-29 17:42:22 +01:00
Connor Abbott
8c38ff74f7 tu: Fix RT count with remapped color attachments
The index of each RT is the remapped color attachment index, so we have
to use the remapped indices when telling the HW the number of RTs.

This fixes KHR-GLES3.framebuffer_blit.scissor_blit on ANGLE once we
enabled VK_EXT_multisampled_render_to_single_sampled, which switched
ANGLE to using dynamic rendering with
VK_KHR_dynamic_rendering_local_read.

Fixes: d50eef5b06 ("tu: Support color attachment remapping")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37990>
(cherry picked from commit 8d276e0d70)
2025-10-29 17:42:22 +01:00
Lionel Landwerlin
8d1294d6dd anv: destroy sets when destroying pool
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14169
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38035>
(cherry picked from commit 2689056c82)
2025-10-29 17:42:22 +01:00
Xaver Hugl
3bb663fea5 vulkan/wsi: remove support for VK_COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT
It's not really clear whether or not it should use gamma 2.2 or the piece-wise
transfer function, or how clients would use it for wider gamut in general.
Currently no compositors I know of support ext_srgb, so this shouldn't affect
applications in practice.

Signed-off-by: Xaver Hugl <xaver.hugl@kde.org>
Fixes: 4b663d56 ("vulkan/wsi: implement support for VK_EXT_hdr_metadata on Wayland")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36444>
(cherry picked from commit 14fcf145e3)
2025-10-29 17:42:22 +01:00
Konstantin Seurer
514e0665dc aco: Fixup out_launch_size_y in the RT prolog for 1D dispatch
launch_size_y is set to ACO_RT_CONVERTED_2D_LAUNCH_SIZE for 1D
dispatches. The prolog needs to set it to 1 so that the app shader
loads the correct value.

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37974>
(cherry picked from commit 47ffe2ecd4)
2025-10-29 17:42:22 +01:00
Faith Ekstrand
3c31f722ed nvk: Disable sampleLocationsSampleCounts for 1x MSAA
Suggested-by: Mel Henning <mhenning@darkrefraction.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14108
Fixes: a34edc7500 ("nvk: Fill out sample locations on Maxwell B+")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38018>
(cherry picked from commit aa0f404f7b)
2025-10-29 17:42:22 +01:00
Faith Ekstrand
b3b6bac3e5 nvk: Include the chipset in the pipeline/binary cache UUID
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38018>
(cherry picked from commit d1793c7a59)
2025-10-29 17:42:22 +01:00
Valentine Burley
cdccd8a1ba tu: Fix maxVariableDescriptorCount with inline uniform blocks
It must not be larger than maxInlineUniformBlockSize.

Fixes VKCTS 1.4.4.0's
dEQP-VK.api.maintenance3_check.support_count_inline_uniform_block*.

Cc: mesa-stable

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38002>
(cherry picked from commit fd2fa0fbc9)
2025-10-29 17:42:21 +01:00
Valentine Burley
ac45b8fde2 tu: Fix indexing with variable descriptor count
Based on RADV.
The Vulkan spec says:
    "If bindingCount is zero or if this structure is not included in
     the pNext chain, the VkDescriptorBindingFlags for each descriptor
     set layout binding is considered to be zero. Otherwise, the
     descriptor set layout binding at
     VkDescriptorSetLayoutCreateInfo::pBindings[i] uses the flags in
     pBindingFlags[i]."

Fixes dEQP-VK.api.maintenance3_check.* in VKCTS 1.4.4.0.

Cc: mesa-stable

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38002>
(cherry picked from commit 17e25b4983)
2025-10-29 17:42:21 +01:00
Benjamin Cheng
8b860c7abd radv/video_enc: Cleanup slice count assert
This was left over when first enabling multiple slice encoding.

Fixes: 63e952ff2c ("radv/video: Support encoding multiple slices")
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37999>
(cherry picked from commit b6d6c1af73)
2025-10-29 17:42:21 +01:00
Pierre-Eric Pelloux-Prayer
2e1004290e radeonsi: propagate shader updates for merged shaders
In case of merged shaders (eg: VS+GS), a change to VS should trigger
a GS update.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13935
Fixes: b1a34ac95d ("radeonsi: change do_update_shaders boolean to a bitmask")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37882>
(cherry picked from commit 90103fe618)
2025-10-29 17:42:21 +01:00
Karol Herbst
31c097e077 nak: fix MMA latencies on Ampere
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Fixes: 7a01953a39 ("nak: Add Ampere and Ada latency information")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37941>
(cherry picked from commit e7dca5a6ca)
2025-10-29 17:42:21 +01:00
Olivia Lee
e790aed444 panfrost: fix cl_local_size for precompiled shaders
nir_lower_compute_system_values will attempt to lower
load_workgroup_size unless workgroup_size_variable is set. For precomp
shaders, the workgroup size is set statically for each entrypoint by
nir_precompiled_build_variant. Because we call
lower_compute_system_values early, it sets the workgroup size to zero.
Temporarily setting workgroup_size_variable while we are still
processing all the entrypoints together inhibits this.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Fixes: 20970bcd96 ("panfrost: Add base of OpenCL C infrastructure")
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37799>
(cherry picked from commit a410d90fd2)
2025-10-29 17:42:21 +01:00
Faith Ekstrand
a234f97caa panvk: Fix integer dot product properties
We already set has_[su]dot_4x8[_sat] in nir_shader_compiler_options so
we're already getting the opcodes.  We just need to advertise the
features properly.  If bifrost_compile.h is to be believed, those are
all available starting at gen 9.

Closes: https://gitlab.freedesktop.org/panfrost/mesa/-/issues/218
Closes: https://gitlab.freedesktop.org/panfrost/mesa/-/issues/219
Fixes: f7f9b3d170 ("panvk: Move to vk_properties")
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37980>
(cherry picked from commit 38950083ae)
2025-10-29 17:42:21 +01:00
Lionel Landwerlin
b1b037254d brw: fix ballot() type operations in shaders with HALT instructions
Fixes dEQP-VK.reconvergence.terminate_invocation.bit_count

LNL fossildb stats:

 Totals from 16489 (3.36% of 490184) affected shaders:
 Instrs: 3710499 -> 3710500 (+0.00%)
 Cycle count: 91601018 -> 90305642 (-1.41%); split: -1.81%, +0.40%
 Max dispatch width: 523936 -> 523952 (+0.00%); split: +0.02%, -0.01%

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37939>
(cherry picked from commit 757c042e39)
2025-10-29 17:42:21 +01:00
Lionel Landwerlin
74e2818dfb brw: only consider cross lane access on non scalar VGRFs
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 1bff4f93ca ("brw: Basic infrastructure to store convergent values as scalars")
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37939>
(cherry picked from commit 70aa028f27)
2025-10-29 17:42:21 +01:00
Mel Henning
6b3cce402f nvk: Really fix maxVariableDescriptorCount w/ iub
I didn't test "nvk: Fix maxVariableDescriptorCount with iub" as
thoroughly as I should have and it regressed
dEQP-VK.api.maintenance3_check.descriptor_set because we were then
violating the requirement that maxPerSetDescriptors describes a limit
that's guaranteed to be supported (and reported as supported in
GetDescriptorSetLayoutSupport).

That commit was also based on a misreading of nvk_nir_lower_descriptors.c
where I thought that the end offset of an inline uniform block needed to
be less than the size of a UBO. That is not the case - on closer
inspection that code gracefully falls back to placing IUBs in globablmem
if necessary. So, we can afford to be less strict about our IUB sizing
and only require that IUBs follow the existing limit imposed by
maxInlineUniformBlockSize.

Fixes: ff7f785f09 ("nvk: Fix maxVariableDescriptorCount with iub")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37922>
(cherry picked from commit 77cd629b34)
2025-10-29 17:42:21 +01:00
Emma Anholt
2f0f0ba01b nir/shrink_stores: Don't shrink stores to an invalid num_components.
Avoids a regression in the CL CTS on the next commit.

Fixes: 2dba7e6056 ("nir: split nir_opt_shrink_stores from nir_opt_shrink_vectors")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37313>
(cherry picked from commit 537cc4e0ff)
2025-10-29 17:42:21 +01:00
Connor Abbott
84d7289a3b tu: Also disable stencil load for attachments not in GMEM
We were accidentally still emitting loads for D32S8 resolve attachments.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37919>
(cherry picked from commit a3652af380)
2025-10-29 17:42:21 +01:00
Connor Abbott
2b8d7ec8de tu: Fix 3d load path with D24S8 on a7xx
We need to always use the FMT6_Z24S8_AS_R8G8B8A8 format for GMEM even if
UBWC is disabled, as already done for the 2d store path. Because we
use the pre-baked RB_MRT_BUF_INFO register value, this means we have to
override it.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37919>
(cherry picked from commit 9417ce287c)
2025-10-29 17:42:21 +01:00
Connor Abbott
b20ae27893 tu: Don't patch GMEM for input attachments never in GMEM
This can happen if we resolve to a resolve attachment and then use that
resolve attachment as an input attachment in a later subpass. We don't
need to put it in GMEM, but it's still considered "written" because
input attachment reads need a dependency after the resolve.

MSRTSS input attachment tests effectively created such a scenario after
lowering to transient multisample attachments and inserting resolves.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37919>
(cherry picked from commit d491a79027)
2025-10-29 17:42:20 +01:00
Yiwei Zhang
fd29ba54ec panvk: fix to advance vs res_table properly
Fix a regression from an unfortunate typo.

Fixes: 48e8d6d207 ("panfrost, panvk: The size of resource tables needs to be a multiple of 4.")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37951>
(cherry picked from commit 387f75f43d)
2025-10-29 17:42:20 +01:00
Yiwei Zhang
118b7d3938 panvk: fix to advance vs driver_set properly
Should only set once outside the multidraw loop so that per draw can
patch its own own desc attribs when needed.

Fixes: a5a0dd3ccc ("panvk: Implement multiDrawIndirect for v10+")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37951>
(cherry picked from commit 800c4d3430)
2025-10-29 17:42:20 +01:00
Timur Kristóf
57711bc0cf ac/nir/ngg_mesh: Lower num_subgroups to constant
Mesh shader workgroups always have the same amount of subgroups.

When the API workgroup size is the same as the real workgroup
size, this is a small optimization (using a constant instead of
a shader arg).

When the API workgroup size is smaller than the real workgroup
size (eg. when the number of output vertices or primitves is
greater than the API workgroup size on RDNA 2), this fixes a
potential bug because num_subgroups would return the "real"
workgroup size instead of the API one.

Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37947>
(cherry picked from commit d20049b430)
2025-10-29 17:42:20 +01:00
Marek Olšák
60194f00b4 winsys/radeon: fix completely broken tessellation for gfx6-7
The info was moved to radeon_info, but it was only set for the amdgpu
kernel driver. It was uninitialized for radeon.

Fixes: d82eda72a1 - ac/gpu_info: move HS info into radeon_info

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37910>
(cherry picked from commit f5b648f6d3)
2025-10-29 17:42:20 +01:00
Job Noorman
0183b1aafc nir: mark fneg distribution through fadd/ffma as nsz
df1876f615 ("nir: Mark negative re-distribution on fadd as imprecise")
fixed the fadd case by marking it as imprecise. This commit fixes the
ffma case for the same reason.

However, "imprecise" isn't necessary and nowadays we have "nsz" which is
more accurate here. Use that for both fadd and ffma.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 62795475e8 ("nir/algebraic: Distribute source modifiers into instructions")
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37930>
(cherry picked from commit ad421cdf2e)
2025-10-29 17:42:20 +01:00
Mike Blumenkrantz
190eab9675 zink: consistently set/unset msrtss in begin_rendering
this has to always be set or unset, never persistent from previous renderpass

Fixes: 5080f2b6f5 ("zink: disable msrtss handling when blitting")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37923>
(cherry picked from commit f74cf45078)
2025-10-29 17:42:20 +01:00
Marek Olšák
ebcd616b71 r300: fix DXTC blits
Fixes: 9d359c6d10 - gallium: delete pipe_surface::width and pipe_surface::height
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37912>
(cherry picked from commit 733ba77bfe)
2025-10-29 17:42:20 +01:00
Xaver Hugl
0ea4ca0f44 vulkan/wsi: require extended target volume support for scRGB
It's hardly going to be useful without that

Signed-off-by: Xaver Hugl <xaver.hugl@kde.org>
Fixes: 4b663d56 ("vulkan/wsi: implement support for VK_EXT_hdr_metadata on Wayland")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37920>
(cherry picked from commit 892cf427a0)
2025-10-29 17:42:20 +01:00
Ruijing Dong
057423c7d4 radeonsi/vcn: Correct a typo condition for jpeg decoding
Checking dec->jctx[i] instead of sctx->ctx

Cc: mesa-stable

Reviewed-by: David Rosca <david.rosca@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37875>
(cherry picked from commit 6e1988e3ed)
2025-10-29 17:42:20 +01:00
Danylo Piliaiev
2cc59fc509 tu: Synchronize access to copy_timestamp_cs_pool
tu_u_trace_submission_data_finish happens on the other thread than
tu_create_copy_timestamp_cs.

Fixes: 6e5944ec4b ("tu: Cache copy timestamp cs to avoid allocations on submit")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37848>
(cherry picked from commit 9f85c8897a)
2025-10-29 17:42:20 +01:00
Danylo Piliaiev
2e40c0beb1 tu: Destroy all mutexes used for device
We never destroyed most of mutexes we used, it was likely fine on
platforms turnip is running on, but still not correct.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37465>
(cherry picked from commit ea849b5557)
2025-10-29 17:42:20 +01:00
Timur Kristóf
b0814ec8d4 radv: Mitigate GPU hang on Hawaii in Dota 2 and RotTR
Mitigate a GPU hang in Dota 2 and Rise of the Tomb Raider
by reducing the primitive rate for triangle lists.
This workaround is not documented by AMD and may not be correct.

The problem isn't well understood and needs further investigation
to narrow down what the root cause is. Until then, it's better
to give users something that works, even if not optimal.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37885>
(cherry picked from commit 8ea08747b8)
2025-10-29 17:42:19 +01:00
Timur Kristóf
78c83d097e radv: Disable compute queues when the regalloc bug is present
Compute queues may run compute dispatches in parallel with
the graphics queue, even from other processes/apps.
At the moment we can't make sure that all compute shaders
use a workgroup size of 256 to mitigate the regalloc hang,
so disable compute queues on affected chips.

Can be reverted if a better mitigation is found in the future.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37885>
(cherry picked from commit 6f499141f5)
2025-10-29 17:42:19 +01:00
Timur Kristóf
747df8a637 radeonsi: Don't use compute queue with regalloc hang bug
It already didn't use compute queues on GFX6, but some GFX7
chips are also affected by the same bug.

Compute queues may run compute dispatches in parallel with
the graphics queue, even from other processes/apps.
At the moment we don't have a way to restrict all workgroups
to 256 invocations, so instead let's make sure not to use the
compute queue.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37885>
(cherry picked from commit 765a748840)
2025-10-29 17:42:19 +01:00
Mel Henning
c936c0183d nvk: Fix maxVariableDescriptorCount with iub
Otherwise, we would report very high values for inline uniform block
since NVK_MAX_DESCRIPTOR_SET_SIZE is a lot larger than
NVK_MAX_INLINE_UNIFORM_BLOCK_SIZE.

Fixes
dEQP-VK.api.maintenance3_check.support_count_inline_uniform_block_nonzero_binding_offset
on vulkan-cts-1.4.4.0

Fixes: 6a74b3e311 ("nvk: Support VkDescriptorSetVariableDescriptorCountLayoutSupport")
Reviewed-by: Mohamed Ahmed <mohamedahmedegypt2001@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37878>
(cherry picked from commit ff7f785f09)
2025-10-29 17:42:19 +01:00
José Roberto de Souza
c7be587b23 gallium/llvmpipe/test: Rename rsqrtf() to _rsqrtf()
Some versions of math.h exports rsqrtf() while others don't, so this
was causing compilation to fail when it is supported.
I have not found a easy way to detect if rsqrtf() is supported and
as this is only used in a llvmpipe tests it is not worthy do changes
in Meson files to detected if it is supported.

So here just renaming the Mesa function to _rsqrtf() and fixing the
build for both math.h versions.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13797
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12934
Reviewed-by: Roland Scheidegger <roland.scheidegger@broadcom.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37515>
(cherry picked from commit 5a482a7a3d)
2025-10-29 17:42:19 +01:00
Mike Blumenkrantz
f19d3d5b95 zink: defer swapchain updates for interval changes if acquired image is active
in the case where an app triggers a swap interval change mid-frame, this handling
previously triggered an immediate swapchain retire and then presented the new swapchain
which had yet to be rendered to

instead, defer swapchain updates to immediately after present when things are
safe to ensure that the right image is always presented

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14104

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37894>
(cherry picked from commit db9dbcbec0)
2025-10-29 17:42:19 +01:00
Gert Wollny
b5c32aa2cc r600: Fix comparison of strides array when emitting vertex buffers
The comparison was only comparing a number of bytes where we actually
have to compare a number of dwords (Thanks QuadShader for digging into this)

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14067
Fixes: 659b7eb279 ("r600: better tracking for vertex buffer emission")

v2: use element size instead of type size (Vitaly)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37856>
(cherry picked from commit 673351bbf3)
2025-10-29 17:42:19 +01:00
Lionel Landwerlin
a3290bb5af brw: prevent LOAD_REG modifications on MOV_INDIRECT/BROADCAST
Due to those opcode reading variable amount of data in src0, it's not
possible to easily figure out what builder SIMD size should be used to
produce the LOAD_REG replacement.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 2d13acf9d9 ("brw: Add passes to generate and lower load_reg")
Fixes: 93996c07e2 ("brw: fix broadcast opcode")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14054
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37756>
(cherry picked from commit acf953757e)
2025-10-29 17:42:19 +01:00
Lionel Landwerlin
ff2522385e brw: fix invalid sparse bitfield offset computation
dest_size is the number of outputs to be provided into the IR, but the
location of the sparse bitfield in the dst temporary SEND destination
might be different (shorter due to masking of unused components
computed above).

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14094
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37876>
(cherry picked from commit 49226692e5)
2025-10-29 17:42:19 +01:00