Commit graph

209155 commits

Author SHA1 Message Date
Karol Herbst
e22ca94e68 nak/qmd: import size_of for rust-1.78 compatability 2025-09-17 13:59:15 +02:00
Caio Oliveira
30d1a6db15 brw: Fix printing of blocks in disassembly when BRW is available
When disassembling and BRW IR is available (which happens in the
generator), there will be pointers to the BRW's basic block structures
that are used to print the block numbers and predecessor/successors
in the output.

There are two challenges:

- Because DO and FLOW instructions are not real instructions, they are
  not emitted in the output but would still cause the output to contain
  empty blocks.  Previous code accounted for DO but still had problems.

- DO blocks have special physical links that don't make sense when the
  DO is not emitted at the end, but they would be shown even if that
  block was omitted.

These issues can be seen here (edited to remove non-essential bits)

```
   START B0 (2 cycles)
mov(8)          g126<1>UD       0x3f800000UD
   END B0 ->B1
   START B2 <-B1 <-B4 (0 cycles)
   END B2 ->B3
   START B3 <-B2 (260 cycles)

LABEL1:
mov(8)          g1<1>D          0D
cmp.ge.f0.0(8)  null<1>D        g2<0,1,0>D      10D
sync nop(1)                     null<0,1,0>UB
send(1)         g0UD            g1UD            nullUD
(+f0.0) break(8) JIP:  LABEL0         UIP:  LABEL0
   END B3 ->B1 ->B5 ->B4
   START B4 <-B3 (1000 cycles)
sync nop(1)                     null<0,1,0>UB
mov(8)          g126<1>UD       g0<0,1,0>UD

LABEL0:
while(8)        JIP:  LABEL1
   END B4 ->B2
   START B5 <-B1 <-B3 (20 cycles)
```

For example:
- Block 1 is missing (a skipped DO block)
- Block 2 is empty (it was a FLOW block)
- Block 3 ends with a link to Block 1 (the special links involving DO
  blocks).

Two key changes were made to fix this.  First, skip the DO and FLOW
blocks completely.  The use_tail ensures that the instruction group is
reused to avoid empty blocks.  Second, when printing, the successors and
predecessors, walk through the skipped blocks.  And finally, don't print
the special blocks.

With the fix, here's the output.  Note the blocks retain their original
BRW IR number.

```
   START B0 (2 cycles)
mov(8)          g127<1>UD       0x3f800000UD
   END B0 ->B3
   START B3 <-B0 <-B4 (260 cycles)

LABEL1:
mov(8)          g1<1>D          0D
cmp.ge.f0.0(8)  null<1>D        g2<0,1,0>D      10D
sync nop(1)                     null<0,1,0>UB
send(1)         g0UD            g1UD            nullUD
(+f0.0) break(8) JIP:  LABEL0         UIP:  LABEL0
   END B3 ->B5 ->B4
   START B4 <-B3 (1000 cycles)
sync nop(1)                     null<0,1,0>UB
mov(8)          g127<1>UD       g0<0,1,0>UD

LABEL0:
while(8)        JIP:  LABEL1
   END B4 ->B3
   START B5 <-B3 (20 cycles)
```

Issue was spotted by Ken.

Fixes: d2c39b1779 ("intel/brw: Always have a (non-DO) block after a DO in the CFG")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36226>
(cherry picked from commit f37c9c873c)
2025-09-17 13:59:15 +02:00
Caio Oliveira
f88d6cf795 brw: Run validation as soon as we have the CFG around
Fixes: affa7567c2 ("intel/brw: Add phases to backend")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37148>
(cherry picked from commit 4e253184de)
2025-09-17 13:59:15 +02:00
Connor Abbott
4d60b13dee tu: Lower ViewIndex to 0 when multiview is disabled
This is an optimization, but it also seems to be required because the HW
sometimes fails to set ViewIndex to 0. This fixes flakes with
dEQP-VK.renderpass2.fragment_density_map.*multiviewport where the VS for
the main renderpass is reused for the copy renderpass afterwards and it
copies ViewIndex to ViewportIndex expecting it to be 0 since multiview
is disabled for the copy renderpass.

Closes: #13534
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37206>
(cherry picked from commit 7527ad001a)
2025-09-17 13:59:15 +02:00
Lionel Landwerlin
81b4015c0e anv: fix partial queries
Partial results should be computed for all types of queries.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36916>
(cherry picked from commit 262baafe27)
2025-09-17 13:59:15 +02:00
Patrick Lerda
985bbb279e r600: update multi_draw_indirect_params drm version requirement
The definitive linux kernel counterpart update is now merged.
The linux kernel commit dc5c742f41c0a1c2b14e4357c752851e015f3bcd
(v6.17-rc1) set the new r600 drm version requirement. This change
updates the drm version accordingly to 2.51.0.

Fixes: 9e1180b335 ("r600: implement ARB_indirect_parameters")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37118>
(cherry picked from commit ef01013b71)
2025-09-17 13:59:15 +02:00
Patrick Lerda
2cd143b0f5 r600: fix r600_resource_copy_region behavior for some formats
The function resource_copy_region is expected to have a memcpy()
like behavior. Some formats, like r11g11b10_float, do not preserve
the original raw values. This was the problem. This change
updates r600_resource_copy_region() to use the generic copy path
for those formats.

This change takes into account how 8235d3aa19 "radeonsi: preserve
NaNs in draw-based resource_copy_region" proceeds.

This change fixes the remaining khr-gl and deqp-gles31 copy_image tests. This
change was tested on palm, barts and cayman. Here are the tests fixed:
khr-gl4[2-6]/texture_view/view_classes: fail pass
khr-gl4[3-6]/copy_image/functional_src_target_texture_2d_array_src_format_rgb9_e5_dst_target_texture_2d_array_dst_format_r11f_g11f_b10f: fail pass
khr-gl4[3-6]/copy_image/functional_src_target_texture_2d_array_src_format_rgb9_e5_dst_target_texture_3d_dst_format_r11f_g11f_b10f: fail pass
khr-gl4[3-6]/copy_image/functional_src_target_texture_2d_array_src_format_rgb9_e5_dst_target_texture_rectangle_dst_format_r11f_g11f_b10f: fail pass
khr-gl4[3-6]/copy_image/functional_src_target_texture_3d_src_format_rgb9_e5_dst_target_texture_2d_array_dst_format_r11f_g11f_b10f: fail pass
khr-gl4[3-6]/copy_image/functional_src_target_texture_3d_src_format_rgb9_e5_dst_target_texture_3d_dst_format_r11f_g11f_b10f: fail pass
khr-gl4[3-6]/copy_image/functional_src_target_texture_3d_src_format_rgb9_e5_dst_target_texture_rectangle_dst_format_r11f_g11f_b10f: fail pass
khr-gl4[3-6]/copy_image/functional_src_target_texture_rectangle_src_format_rgb9_e5_dst_target_texture_2d_array_dst_format_r11f_g11f_b10f: fail pass
khr-gl4[3-6]/copy_image/functional_src_target_texture_rectangle_src_format_rgb9_e5_dst_target_texture_3d_dst_format_r11f_g11f_b10f: fail pass
khr-gl4[3-6]/copy_image/functional_src_target_texture_rectangle_src_format_rgb9_e5_dst_target_texture_rectangle_dst_format_r11f_g11f_b10f: fail pass
deqp-gles31/functional/copy_image/non_compressed/viewclass_16_bits/.*: fail pass
deqp-gles31/functional/copy_image/non_compressed/viewclass_32_bits/.*: fail pass

Cc: mesa-stable
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37117>
(cherry picked from commit df5e8e1252)
2025-09-17 13:59:15 +02:00
David Rosca
2b14506bc3 radv/video: Set rate control to default on reset
If we never get rate control info, we would treat it as rate control
disabled and use QP value from slice info which is always 0 for default
rate control.

Cc: mesa-stable
Reviewed-by: Autumn Ashton <misyl@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37156>
(cherry picked from commit a03e055cd3)
2025-09-17 13:59:15 +02:00
Christoph Neuhauser
64fd494f67 iris: Increase max_shader_buffer_size to max_buffer_size
This commit increases max_shader_buffer_size to max_buffer_size for Iris.

Signed-off-by: Christoph Neuhauser <christoph.neuhauser@intel.com>
Co-authored-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37182>
(cherry picked from commit 2f8b8649f0)
2025-09-17 13:59:15 +02:00
Caio Oliveira
4a2273eb8b util: Avoid invalid access in ralloc_print_info()
Check if allocation is large enough to hold the
linear and gc contexts before probing for them.

Fixes: 7b5b164281 ("util: Add function print information about a ralloc tree")
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37017>
(cherry picked from commit 62815cc91f)
2025-09-17 13:59:15 +02:00
Georg Lehmann
50f967cde1 mesa: clamp fog scale to -FLT_MAX instead of FLT_MIN
FLT_MIN is the smallest positive float, not the smallest negative float.

Fixes: 35ae5dce39 ("mesa: don't pass Infs to the shader via gl_Fog.scale")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11412

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37204>
(cherry picked from commit f47e4fee4c)
2025-09-17 13:59:15 +02:00
Mike Blumenkrantz
770debce96 zink: add another flag to determine whether linked program compile is done
it's otherwise possible for this to race and hit the draw before
precompile finishes without ever waiting on the fence

I guess this just worked coincidentally before?

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37197>
(cherry picked from commit 6596bf69c6)
2025-09-17 13:59:15 +02:00
Valentine Burley
390cf75610 tu: Enable robustBufferAccessUpdateAfterBind
This is supported and must be enabled when
descriptorBinding*UpdateAfterBind is active.

Fixes the following VVL error:
Validation Error: [ VUID-VkDeviceCreateInfo-robustBufferAccess-10247 ]
vkCreateDevice(): robustBufferAccessUpdateAfterBind is false, but both
robustBufferAccess and a descriptorBinding*UpdateAfterBind feature are
enabled.

Fixes: d9fcf5de55 ("turnip: Enable nonuniform descriptor indexing")
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36787>
(cherry picked from commit 31f6235126)
2025-09-17 13:59:15 +02:00
Timur Kristóf
3403c49ba5 radeonsi: Flush L2 for render condition when CP can't use L2
If CP can't use L2 then it also can't read the render condition
through L2, so we need a flush, just like on GFX6-8.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37121>
(cherry picked from commit 637f618ac5)
2025-09-17 13:59:15 +02:00
Timur Kristóf
56d84fb02f radv: Don't use EVENT_WRITE_EOS on GFX7
EOS events are buggy on GFX7 and can cause hangs when used
together in the same IB with CP DMA packets that use L2.
While we don't use the L2 for CP DMA copies, we still use it
with CP DMA prefetches, so the issue needs to be mitigated.

As a mitigation, avoid using EVENT_WRITE_EOS and prefer to use
the BOTTOM_OF_PIPE event instead of PS_DONE/CS_DONE, which should
be close enough.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37121>
(cherry picked from commit c56c746b71)
2025-09-17 13:59:14 +02:00
Timur Kristóf
79a84be743 radv/amdgpu: Don't use IB2 on GFX6 (for now)
GFX6 actually supports IB2, but doesn't support chaining between
chunks inside the IB2. See WaCpIb2ChainingUnsupported in PAL.

Disable IB2 on GFX6 for now.

The proper fix will be to disable use_ib in just secondary
command buffers on GFX6 and emit multiple IB2 packets in the
main command buffer. This will be implemented later.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37121>
(cherry picked from commit e8d1e935fb)
2025-09-17 13:59:14 +02:00
Timur Kristóf
15d67c309b radv/amdgpu: Use correct NOP packets when unchaining a CS
GFX6 doesn't support single-dword PKT3 NOP packets,
so they shouldn't be used when unchaining a CS.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37121>
(cherry picked from commit 3056279d09)
2025-09-17 13:59:14 +02:00
Timur Kristóf
36ef404a6c radv/amdgpu: Fix crash with RADV_DEBUG=noibs
After a refactor last year, the noibs option stopped working
because it hits an assertion when empty IBs are submitted.

Emit a single large NOP packet to avoid submitting empty IBs.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37121>
(cherry picked from commit 132a61c6b7)
2025-09-17 13:59:14 +02:00
Samuel Pitoiset
4623e861e4 radv: fix vk_error in radv_update_preambles()
This needs to be a vk object, otherwise it asserts or crashes.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37179>
(cherry picked from commit 57deff5658)
2025-09-17 13:59:14 +02:00
Mel Henning
8534c24593 nvk: Clear second SET_RENDER_ENABLE operand
The hardware actually compares a pair of 64-bit values, rather than
comparing a single value against zero like we previously assumed.

This wasn't an issue in most cases before because if the buffer is
zero-initialized the previous code happens to work. If we get a
buffer with garbage in it though we would run into issues.

Fixes: 80eac1337d ("nvk: Always copy conditional rendering value before compare")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13821
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37153>
(cherry picked from commit 90ac7d13dc)
2025-09-17 13:59:14 +02:00
Mel Henning
a5e926891c nvk: Clear cond_render_gart_* in reset_cmd_buffer
nvk_cmd_pool_free_gart_mem_list frees this buffer, so we need to clear
the pointers to it in order to avoid a use after free.

Fixes: 07c70c77de ("nvk: add cond render upload buffer.")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37153>
(cherry picked from commit eaa547f6f2)
2025-09-17 13:59:14 +02:00
Yiwei Zhang
46d835f823 tu: bind aliased wsi image at memory offset zero
The vulkan spec says that we should ignore memoryOffset when
VkBindImageMemorySwapchainInfoKHR is present. wsi common assumes that we
bind the wsi image at offset 0, so set the offset to 0. This change
aligns with common wsi, and also obeys dedicated alloc requirement.

Fixes: f887116c49 ("turnip: adopt wsi_common_get_memory")
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37099>
(cherry picked from commit cef48af271)
2025-09-17 13:59:14 +02:00
Yonggang Luo
ec27b06cf6 tgsi: Fixes ntt_should_vectorize_io parameters
Fixes: 5f757bb95c ("nir: Make the load_store_vectorizer provide align_mul + align_offset.")

This is found when I am trying to narrow bit_size and num_components to uint8_t

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37042>
(cherry picked from commit 949a056934)
2025-09-17 13:59:14 +02:00
Mike Blumenkrantz
677f1c4541 tc: don't unset resolve resource in set_framebuffer_state
this breaks the whole mechanism

Fixes: 2eb45daa9c ("gallium: de-pointerize pipe_surface")

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37166>
(cherry picked from commit 7984a16e27)
2025-09-17 13:59:14 +02:00
Eric R. Smith
3e543205e7 panfrost: fix debug print of spilled registers
We were testing some conditions in the wrong order, so spilled
registers were being printed as if they were uniforms. This is
incorrect, but only subtly so, and lead to confusion.

Fixes: 6c64ad934f ("panfrost: spill registers in SSA form")
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Ashley Smith <ashley.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37092>
(cherry picked from commit e3552c427e)
2025-09-17 13:59:14 +02:00
Eric R. Smith
b6e6285d9f panfrost: fix typo in register allocation
The intention of the code was to allow PHI values to be propagated
if they were in registers (as opposed to in memory). As written though
values were never propagated. I think this typo was due to some
debug code that wasn't removed properly.

Fixes: 6c64ad934f ("panfrost: spill registers in SSA form")
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Ashley Smith <ashley.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37092>
(cherry picked from commit d482b6ca68)
2025-09-17 13:59:14 +02:00
Yiwei Zhang
8f7563444c nvk: bind aliased wsi image at memory offset zero
This aligns with common wsi, and also obeys dedicated alloc requirement.

Fixes: 273df23a21 ("nvk: adopt wsi_common_get_memory")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37152>
(cherry picked from commit 611749a7f9)
2025-09-17 13:59:14 +02:00
Yiwei Zhang
8dc2746a84 radv: bind aliased wsi image at memory offset zero
This aligns with common wsi, and also obeys dedicated alloc requirement.

Fixes: 825c05a7e8 ("radv: adopt wsi_common_get_memory")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37152>
(cherry picked from commit 94d8a4a465)
2025-09-17 13:59:14 +02:00
Danylo Piliaiev
dda8f9f519 tu: Reset rp_trace on tu_reset_cmd_buffer
Secondary command buffers with RENDER_PASS_CONTINUE_BIT don't reset
rp_trace, and without reset we get garbage tracepoints.

Fixes garbage sysmem_clear_all tracepoints in some games running
though DXVK.

Fixes: 630380349b ("tu: Give renderpass events a separate trace buffer")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37161>
(cherry picked from commit 482e0d0d1e)
2025-09-17 13:59:14 +02:00
Erik Faye-Lund
63f47a9706 panvk: fix up vk1.4 properties
These two properties reports how the interaction between MSAA coverage
and occlusion queries works. We need to report the correct value here,
otherwise applications might misbehave.

Fixes: 5ee3c10d1e ("panvk: advertise vulkan 1.4 on v10+")
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37136>
(cherry picked from commit 166d650c10)
2025-09-17 13:59:13 +02:00
Eric Engestrom
8cc2dd1989 .pick_status.json: Mark aed7e7add1 as denominated 2025-09-17 13:59:13 +02:00
Eric Engestrom
46c12e804d .pick_status.json: Mark bd074a542e as denominated 2025-09-17 13:59:13 +02:00
Eric Engestrom
12f8f6d6e8 .pick_status.json: Mark 87ce4c6ca4 as denominated 2025-09-17 13:59:13 +02:00
Eric Engestrom
6df0855870 .pick_status.json: Mark d68344bffe as denominated 2025-09-17 13:59:13 +02:00
Eric Engestrom
6dab56189d .pick_status.json: Mark a09d18a316 as denominated 2025-09-17 13:59:13 +02:00
Eric Engestrom
58f1b12b42 .pick_status.json: Mark 2260681572 as denominated 2025-09-17 13:59:13 +02:00
Eric Engestrom
10f74cca40 .pick_status.json: Mark 83bf75e307 as denominated 2025-09-17 13:59:13 +02:00
Eric Engestrom
f77b2d5c84 .pick_status.json: Update to f99230cc67 2025-09-17 13:59:13 +02:00
Eric Engestrom
7fc153c93f docs: add sha sum for 25.2.2
Some checks failed
macOS-CI / macOS-CI (dri) (push) Has been cancelled
macOS-CI / macOS-CI (xlib) (push) Has been cancelled
2025-09-03 13:55:58 +02:00
Eric Engestrom
22ded5f256 VERSION: bump for 25.2.2 2025-09-03 13:13:56 +02:00
Eric Engestrom
4c175b4694 docs: add release notes for 25.2.2 2025-09-03 13:13:56 +02:00
Yiwei Zhang
d0f2434337 anv: fix broken utrace
The non-compute end flag should be INTEL_DS_TRACEPOINT_FLAG_END_OF_PIPE.
This fixes the broken anv utrace for anything non-compute that can
potentially overlap (execute in parallel).

Fixes: 6281b207db ("anv: add tracepoints timestamp mode for empty dispatches")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37155>
(cherry picked from commit c0e51bcf24)
2025-09-03 12:08:53 +02:00
Trigger Huang
30541bac9e virtio/vdrm: add ENABLE_DRM_AMDGPU for c_args
ENABLE_DRM_AMDGPU must be defined when amdgpu_virtio is enabled;
otherwise, vdrm and amdgpu_virtio will have different definitions of
struct virgl_renderer_capset_drm. As a result, on amdgpu_virtio side,
the content of struct vdrm_device will be corrupted.

Thanks Honglei Huang <honglei1.huang@amd.com> for pointing out the
different definitions of struct virgl_renderer_capset_drm.

Cc: mesa-stable
Signed-off-by: Trigger Huang <Trigger.Huang@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37023>
(cherry picked from commit 5736280730)
2025-09-03 12:08:52 +02:00
Samuel Pitoiset
bc010c72aa radv/rt: fix a potential issue with RADV_PERFTEST=dmashaders
Shaders must be synchronized before doing anything.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37126>
(cherry picked from commit 3cb77cb144)
2025-09-03 12:08:52 +02:00
Lionel Landwerlin
a48b826636 anv: fix pipeline barriers with pre-rasterization stages
Pre-rasterization stages need a CS stall if they need to wait on the
flushes from a PIPE_CONTROL.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37132>
(cherry picked from commit f262865a90)
2025-09-03 12:08:52 +02:00
Mike Blumenkrantz
399bbef8f9 kopper: unwrap screen before checking cpu flag
this otherwise may access the trace screen and return garbage

Fixes: 316bf3bd8a ("kopper, dri: remove trace_screen_unwrap")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37140>
(cherry picked from commit b536e38607)
2025-09-03 12:08:52 +02:00
Alyssa Ross
9fa878f0b2 gfxstream: guest: don't use transitional LFS64 API
musl removed the LFS64 APIs like mmap64(), which were intended to be a
transitional measure multiple decades ago, causing a build failure
here.  Since virtio-gpu sizes and offsets are 64-bit, we do still want
to make sure that we're using 64-bit mmap here, so I've added
-D_FILE_OFFSET_BITS=64, which will ensure that off_t is always 64-bit
in gfxstream guest, and which is generally the modern solution here.

With this change, I am able to build gfxstream with musl.

Fixes: fec8e296a3 ("Make VirtGpu* interfaces")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37086>
(cherry picked from commit 6f8cdd8a3c)
2025-09-03 12:08:52 +02:00
Mike Blumenkrantz
da4961f1d2 zink: don't increase db scale when resizing a db up to the current scale
this otherwise triggers infinite db scaling

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37068>
(cherry picked from commit 4971b58c96)
2025-09-03 12:08:52 +02:00
Mike Blumenkrantz
e70d8ec935 zink: zero db offset on batch reset
seems weird this hasn't been caught before

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37068>
(cherry picked from commit fbddc97b9e)
2025-09-03 12:08:52 +02:00
Hans-Kristian Arntzen
3d8eb5b392 nvk: Avoid passing garbage data in descriptor buffers for UBOs.
With the existing union setup, only the first 8 bytes are initialized
properly for UBOs, yet the UBO size is 16, and all 16 bytes are copied
to applications. This leads to broken capture-replay since the
descriptor payload is no longer invariant.

Fix this by ensuring all union members are 16 bytes, which then get
properly initialized with the designated initializers.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Fixes: 8b5835af31 ("nvk: Use bindless cbufs on Turing+")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37053>
(cherry picked from commit f28f72a5a2)
2025-09-03 12:08:52 +02:00