Commit graph

213717 commits

Author SHA1 Message Date
Benjamin Cheng
8a2bf930bb radv/video: Override H265 SPS unaligned resolutions
VCN requires 64x16 alignment for HEVC. When the app requests non-aligned
resolutions, make up for it with conformance window cropping.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Cc: mesa-stable
(cherry picked from commit cef8eff74d)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-28 12:53:18 -07:00
Benjamin Cheng
ac492d42be radv/video: Override H265 SPS block size parameters
VCN only supports this set of parameters.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Cc: mesa-stable
(cherry picked from commit 84b6d8e0d7)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-28 12:53:17 -07:00
Lionel Landwerlin
2e17fd0cb2 vulkan/render_pass: Add a missing sType
Fixes: 3a204d5cf3 ("vulkan/render_pass: Add a better helper for render pass inheritance")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
(cherry picked from commit c5740c2548)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-28 12:53:16 -07:00
Marek Olšák
9311f170c4 zink: fix mesh and task shader pipeline statistics
Fixes: 9d0e73335a - zink: enable GL_EXT_mesh_shader
(cherry picked from commit 41a8c4d37c)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-28 12:53:15 -07:00
Dylan Baker
3e227a04b1 .pick_status.json: Update to 32b646c597
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-28 12:53:10 -07:00
Sagar Ghuge
f63a5df30b brw/rt: fix ray_object_(direction|origin) for closest-hit shaders
We were returning world BVH level for origin/direction, this commit
fixes by retuning correct object BVH level origin/direction.

Fixes: aaff191356 ("brw/rt: fix ray_object_(direction|origin) for closest-hit shaders")
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit 89fbcc8c34)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-27 09:34:33 -07:00
Sagar Ghuge
9ba765e3e3 brw/rt: Move nir_build_vec3_mat_mult_col_major helper to header
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit 3edeb1e191)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-27 09:34:33 -07:00
Mike Blumenkrantz
8010d0cd39 zink: disable primitiveFragmentShadingRateMeshShader feature
features are auto-enabled, but some of them cause validation errors
which are simple to work around

Fixes: 90f3c57337 ("zink: hook up VK_EXT_mesh_shader")
(cherry picked from commit a2ef369abf)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-27 09:34:33 -07:00
Job Noorman
f1f32d557e ir3/ra: fix assert during file start reset
While accounting for an input register's merge set when resetting the
file start after the preamble, we implicitly assume that the allocated
register is the preferred one by asserting that the register's merge set
offset is not smaller than its physreg (to prevent an underflow).
However, inputs are not guaranteed to have their preferred register
allocated which causes the assert to get triggered.

Fix this by only taking the whole merge set into account for inputs that
actually got their preferred register allocated.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 9d4ba885bb ("ir3/ra: make main shader reg select independent of preamble")
(cherry picked from commit f84d85790e)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-27 09:34:33 -07:00
Natalie Vock
05e5db1a4d nir/lower_shader_calls: Repair SSA after wrap_instrs
Wrapping jump instructions that are located inside ifs can break SSA
invariants because the else block no longer dominates the merge block.
Repair the SSA to make the validator happy again.

Cc: mesa-stable
(cherry picked from commit 50e65dac79)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-27 09:34:33 -07:00
Taras Pisetskyi
5ae8474029 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>
(cherry picked from commit dcd9b90aff)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-27 09:34:33 -07:00
Mary Guillemard
b3470359bf 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>
(cherry picked from commit d37ba302d0)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-27 09:34:33 -07:00
Mary Guillemard
5e1a88cea0 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>
(cherry picked from commit 887f06a966)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-27 09:34:33 -07:00
Sagar Ghuge
040453857b anv: Call brw_nir_lower_rt_intrinsics_pre_trace lowering pass
Call this pass before nir_lower_shader_calls().

Fixes: d39e443e ("anv: add infrastructure for common vk_pipeline")
Cc: mesa-stable
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit 006085e676)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-27 09:34:33 -07:00
Mary Guillemard
28e172e956 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>
(cherry picked from commit 64131475a8)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-27 09:34:33 -07:00
Mary Guillemard
74880f8954 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>
(cherry picked from commit 7e636d52f1)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-27 09:34:33 -07:00
Mary Guillemard
f02f5e217f 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>
(cherry picked from commit 8447b99f61)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-27 09:34:33 -07:00
Dylan Baker
d9636807f7 intel/compiler/brw: Add assert that we don't have a negative value
Coverity notices that `nir_get_io_index_src_number` could return -1, and
that we use it to index an array. It cannot understand that -1 only
happens for unhandled enum values, but all of these are handled. Add an
assert to help it out.

CID: 1667234
Fixes: 37a9c5411f ("brw: serialize messages on Gfx12.x if required")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit a5b9f428f9)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-27 09:34:33 -07:00
Dylan Baker
b768139858 .pick_status.json: Update to 45a762727c
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-27 09:34:33 -07:00
Olivia Lee
498a25cfb8 hk: fix data race when initializing poly_heap
hk_heap is called during command buffer recording, which may be
concurrent, so writing dev->heap without synchronization is a data race.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Fixes: 5bc8284816 ("hk: add Vulkan driver for Apple GPUs")
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
(cherry picked from commit bca29b1c92)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-27 09:34:33 -07:00
Connor Abbott
9728bbf7b0 tu: Also disable stencil load for attachments not in GMEM
We were accidentally still emitting loads for D32S8 resolve attachments.

Cc: mesa-stable
(cherry picked from commit a3652af380)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-24 08:07:30 -07:00
Connor Abbott
f142fdc273 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
(cherry picked from commit 9417ce287c)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-24 08:07:28 -07:00
Connor Abbott
1c52a94428 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
(cherry picked from commit d491a79027)

Conflicts:
	src/freedreno/vulkan/tu_pass.cc

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-24 08:07:28 -07:00
Faith Ekstrand
2cfd3c52b2 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>
(cherry picked from commit 64ad337036)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-24 07:55:08 -07:00
Faith Ekstrand
606ebb042e 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>
(cherry picked from commit a546484ed9)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-24 07:55:07 -07:00
Samuel Pitoiset
424f37b348 radv: dirty dynamic descriptors when required
The user SGPRS might be different and dynamic descriptors need to be
re-emitted again

This fixes a regression with ANGLE, and VCKTS is currently missing
coverage.

Fixes: a47952d495 ("radv: upload and emit dynamic descriptors separately from push constants")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14146
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit 54a6c81d3a)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-24 07:55:06 -07:00
Faith Ekstrand
7f75931019 nvk: Capture/replay buffer addresses for EDB capture/replay
Fixes: 3f1c3f04be ("nvk: Advertise VK_EXT_descriptor_buffer")
(cherry picked from commit 998dbd43d3)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-24 07:55:05 -07:00
Faith Ekstrand
ba107091c2 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")
(cherry picked from commit a13474939d)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-24 07:55:05 -07:00
Faith Ekstrand
b74000dbce nvk: Emit inactive vertex attributes
VK_KHR_maintenance9 requires that vertex attributes in shaders which map
to vertex attributes that aren't bound at the API return a consistent
value.  In order to do this, we need toemit SET_VERTEX_ATTRIBUTE_A, even
for unused attributes.  The RGBA32F format was chosen to ensure we
return (0, 0, 0, 0) from unbound attributes.

Fixes: 7692d3c0e1 ("nvk: Advertise VK_KHR_maintenance9")
(cherry picked from commit d39221cef3)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-24 07:55:04 -07:00
Mauro Rossi
fb2273df78 util: Fix gnu-empty-initializer error
Fixes the following building error happening with clang:

../src/util/os_file.c:291:29: error: use of GNU empty initializer extension [-Werror,-Wgnu-empty-initializer]
   struct epoll_event evt = {};
                            ^
1 error generated.

Fixes: 17e28652 ("util: mimic KCMP_FILE via epoll when KCMP is missing")
Cc: "25.3"
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
(cherry picked from commit 7bbbfa6670)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-24 07:55:03 -07:00
Connor Abbott
65eb3aed4b 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")
(cherry picked from commit 8d276e0d70)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-24 07:55:02 -07:00
Lionel Landwerlin
a9653fa019 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>
(cherry picked from commit 2689056c82)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-24 07:55:02 -07:00
Lionel Landwerlin
159d397437 anv/brw: fix output tcs vertices
brw_prog_tcs_data::instances can be divided by vertices per threads on
earlier generations.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: a91e0e0d61 ("brw: add support for separate tessellation shader compilation")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
(cherry picked from commit e450297ea9)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-24 07:55:01 -07:00
Xaver Hugl
6a7effe059 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")
(cherry picked from commit 14fcf145e3)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-24 07:55:00 -07:00
Konstantin Seurer
2a0a2cc5b0 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

(cherry picked from commit 47ffe2ecd4)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-24 07:54:59 -07:00
Faith Ekstrand
3f9f4d79d3 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+")
(cherry picked from commit aa0f404f7b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-24 07:54:59 -07:00
Faith Ekstrand
cd253df92a nvk: Include the chipset in the pipeline/binary cache UUID
Cc: mesa-stable
(cherry picked from commit d1793c7a59)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-24 07:54:58 -07:00
Lionel Landwerlin
bfd09d9891 nir/lower_io: add missing levels intrinsics to get_io_index_src_number
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: c7ac46a1d8 ("nir/lower_io: add get_io_index_src_number support for image intrinsics")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
(cherry picked from commit aa929ea706)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-24 07:54:57 -07:00
Lionel Landwerlin
dcecd8fd1e brw: handle GLSL/GLSL tessellation parameters
Apparently various tessellation parameters come specified from
TESS_EVAL stage in GLSL while they come from the TESS_CTRL stage in
HLSL.

We switch to store the tesselation params more like shader_info with 0
values for unspecified fields. That let's us merge it with a simple OR
with values from from tcs/tes and the resulting merge can be used for
state programming.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: a91e0e0d61 ("brw: add support for separate tessellation shader compilation")
Fixes: 50fd669294 ("anv: prep work for separate tessellation shaders")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
(cherry picked from commit f3df267735)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-24 07:54:56 -07:00
Lionel Landwerlin
1648f759c1 anv: rename structure holding 3DSTATE_WM_DEPTH_STENCIL state
Cc stable for the next commit.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
(cherry picked from commit 8d05b7b72e)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-24 07:54:55 -07:00
Valentine Burley
d5f7261ce5 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>
(cherry picked from commit fd2fa0fbc9)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-24 07:54:54 -07:00
Valentine Burley
2c1c52a8c8 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>
(cherry picked from commit 17e25b4983)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-24 07:54:52 -07:00
Dylan Baker
fe3a3b08c9 .pick_status.json: Update to fd55e874ed
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
2025-10-24 07:54:46 -07:00
Dylan Baker
d9812eaea8 VERSION: bump for rc2
Some checks failed
macOS-CI / macOS-CI (dri) (push) Has been cancelled
macOS-CI / macOS-CI (xlib) (push) Has been cancelled
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
2025-10-22 16:13:33 -07:00
Benjamin Cheng
be191ceff7 radv/video_enc: Cleanup slice count assert
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
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>
(cherry picked from commit b6d6c1af73)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38010>
2025-10-22 09:03:39 -07:00
Pierre-Eric Pelloux-Prayer
49bfddbd11 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>
(cherry picked from commit 90103fe618)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38010>
2025-10-22 09:03:39 -07:00
Faith Ekstrand
0182cde848 util: Build util/cache_ops_x86.c with -msse2
__builtin_ia32_clflush() requires -msse2 so we need to set -msse2 at
least for building that file.  Fortunately, there are no GPUs that
actually need userspace cache flushing that can ever be bolted onto a
pre-SSE2 x86 CPUs.

Fixes: 555881e574 ("util/cache_ops: Add some cache flush helpers")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14134
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
(cherry picked from commit efbecd93ba)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38010>
2025-10-22 09:03:38 -07:00
Faith Ekstrand
94ec7c686d util: Don't advertise cache ops on x86 without SSE2
Fixes: 555881e574 ("util/cache_ops: Add some cache flush helpers")
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
(cherry picked from commit 3739d7a90c)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38010>
2025-10-22 09:03:37 -07:00
Olivia Lee
4202ea6c7f 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>
(cherry picked from commit a410d90fd2)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38010>
2025-10-22 09:03:37 -07:00
Rhys Perry
10475e8ac1 amd/lower_mem_access_bit_sizes: fix shared access when bytes<bit_size/8
This can happen with (for example) 32x2 loads with
align_mul=4,align_offset=2.

This patch does bit_size=min(bit_size,bytes) to prevent num_components
from being 0.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: 52cd5f7e69 ("ac/nir_lower_mem_access_bit_sizes: Split unsupported shared memory instructions")
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
(cherry picked from commit b18421ae3d)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38010>
2025-10-22 09:03:36 -07:00