Commit graph

209185 commits

Author SHA1 Message Date
Boris Brezillon
9174a02476 panvk/jm: Preload the FB even if we have no draws queued
There seems to be cases where we end up with a depth/stencil preload,
with no draw associated to it, so let's make sure we preload in that
case, otherwise we will write invalid data back.

Fixes: 0bc3502ca3 ("panvk: Implement a custom FB preload logic")
Signed-off-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/37158>
(cherry picked from commit 023972827a)
2025-09-17 13:59:17 +02:00
Jose Maria Casanova Crespo
652ce02ba0 v3d: Don't enable Early-z with discards when stencil updates are enabled
This fixes font rendering artifacts when Chromium/Firefox use Office365
PowerPoint set into fullscreen presentation mode.

Fixes: 5b951bcdd7 ("v3d: Enable Early-Z with discards when depth updates are disabled")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37349>
(cherry picked from commit 72d7864c6b)
2025-09-17 13:59:17 +02:00
Qiang Yu
f70ac948b9 panfrost: fix image plane array copy
Reference the original code, each plane resource have
the same image plane array.

Fixes: 53e5e07c4b ("pan: Add the concept of modifier handler")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37247>
(cherry picked from commit 95579b7af6)
2025-09-17 13:59:17 +02:00
Timur Kristóf
e93b3052b4 radv: Flush L2 before CP DMA copy/fill when CP DMA doesn't use L2
In case the source or destination were previously written
through L2, we need to writeback L2 to avoid the CP DMA accessing
stale data.

However, as the CP DMA doesn't write L2 either, an invalidation
is also needed to make sure other clients don't access stale data
when they read it through L2 after the CP DMA is complete.

Doing an invalidation before the CP DMA operation should take
care of both.

Additionally, radv_src_access_flush also invalidates L2 before
the copied data can be read.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36820>
(cherry picked from commit c183eb5bc8)
2025-09-17 13:59:17 +02:00
Corentin Noël
bb2c8704b3 virgl: Skip resource destruction only when there are actually needed references
Suggested by Jan Alexander Steffens in https://gitlab.freedesktop.org/mesa/mesa/-/issues/13844#note_3087461

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13844
Fixes: 6c1c116a0f
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37346>
(cherry picked from commit 63cd410c29)
2025-09-17 13:59:17 +02:00
Ian Romanick
838d3c13cc iris: Limit max_shader_buffer_size to INT32_MAX
GLSL arrays are sized by signed integers. Other places in the Mesa treat
this value is int32_t. Having the value larger than (uint32_t)INT32_MAX
causes assertion failures in many piglit tests.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Closes: #13873
Fixes: 2f8b8649f0 ("iris: Increase max_shader_buffer_size to max_buffer_size")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37282>
(cherry picked from commit 1eb4a2f5cd)
2025-09-17 13:59:17 +02:00
Mike Blumenkrantz
8ec6872fe3 cso: unbind vertex buffers when unbinding context
cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37276>
(cherry picked from commit 9f764486cb)
2025-09-17 13:59:17 +02:00
Christian Meissl
50394e4f7a panfrost: take reference from pool used for allocation
Fixes bo leaks caused by wrong ref counting when
using temporary sampler views.
The leak was observed when playing videos using the
DRM_FORMAT_MOD_VENDOR_MTK tiling format
through gstreamer.

Fixes: 0795f3d7e4 ("panfrost: Add a pool to sampler_view")
Signed-off-by: Christian Meissl <meissl.christian@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37325>
(cherry picked from commit 31a627bdc2)
2025-09-17 13:59:17 +02:00
Samuel Pitoiset
fb70b9ba58 spirv: add missing non-uniform access for SSBO atomics
This fixes new VKCTS coverage
dEQP-VK.descriptor_indexing.non_uniform_atomics.

Found this while implementing a new extension.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37295>
(cherry picked from commit 9fbf29fc6d)
2025-09-17 13:59:17 +02:00
Samuel Pitoiset
b0f0a80989 radv: fix capture/replay with sampler border color
The border color index must be captured and returned to the app,
otherwise it's broken if samplers aren't replayed in-order.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37291>
(cherry picked from commit a52483d9e7)
2025-09-17 13:59:17 +02:00
Mike Blumenkrantz
7337e57115 zink: use implicit offsets for function temp variables in ntv
this is also apparently illegal

Fixes: 0b7611824a ("zink: use implicit stride in ntv for temp vars"
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37312>
(cherry picked from commit f419a96d76)
2025-09-17 13:59:17 +02:00
Sagar Ghuge
8dd3853f23 isl: Respect driconf option for EnableSamplerRoutetoLSC
For EnableSamplerRoutetoLSC, we do check driconf option. Buffer state
setup is just missing that option so add check for that too.

Fixes: 7934b70f ("isl/iris/anv: provide drirc toggle intel_sampler_route_to_lsc")
Cc: mesa-stable
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Caleb Callaway <caleb.callaway@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37190>
(cherry picked from commit 99cd6ffd1f)
2025-09-17 13:59:17 +02:00
Danylo Piliaiev
fd1c62be65 egl: Bring back util_cpu_trace_init
Partially reverts "perfetto: unify init". EGL lib uses perfetto,
but after the change, util_cpu_trace_init doesn't happen inside
libEGL.so, so when it tries to use perfetto, it crashes.
Perfetto initialization happens inside other Mesa's libs, but
each lib that uses perfetto must initialize it.

Fixes: c7045e3e63 ("perfetto: unify init")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37303>
(cherry picked from commit 715b8ba539)
2025-09-17 13:59:17 +02:00
Erik Faye-Lund
5fb8e4af4b aux/pp: fixup sampler-view release
Without this, the prost-processing mechanism crashes badly, whoops.

Fixes: 73da0dcddc ("gallium: eliminate frontend refcounting from samplerviews")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37290>
(cherry picked from commit fc0418a69f)
2025-09-17 13:59:17 +02:00
Karol Herbst
3df08d2657 rusticl/mem: fix Image::read for 1Darray images
Some drivers do not return identical strides when mapping 1Darray images
leading to data being written in the wrong place.

Cc: mesa-stable
Tested-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37284>
(cherry picked from commit b584b47d01)
2025-09-17 13:59:17 +02:00
Dylan Baker
283734b598 intel/brw: Fix implementaiton of |= operator for enum
The current implementation does nothing, since it has no side effects,
only a return value. By passing `x` as a reference we can mutate the
value before returning.

Fixes: df37c7ca74 ("brw: fix analysis dirtying with pulled constants")
CID: 1665293
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37263>
(cherry picked from commit f18aca8689)
2025-09-17 13:59:16 +02:00
David Rosca
c6aed295dc radeonsi/vcn: Fix calculating QP map region dimensions
It needs to be aligned to block size otherwise it would skip last
row/column on resolutions like 1080p.

Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37143>
(cherry picked from commit 8eb84f8854)
2025-09-17 13:59:16 +02:00
Mike Blumenkrantz
09043aba63 zink: flag vertex element state for rebind after vstate draws
vstate draws bind their own elements unrelated to the bound
gallium elements, so any draw occurring after a vstate draw must
rebind to ensure the correct ones are bound

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

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37274>
(cherry picked from commit 5fefb9e795)
2025-09-17 13:59:16 +02:00
Ella Stanforth
693b12113d util/list: Fix next instruction removal usecase for non safe iterators
Introducing this iterator debug information breaks the usecase of removing
elements in the list other than the current element.

Fixes: 372e83b95f

Reviewed-by: Rob Clark <rob.clark@oss.qualcomm.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37061>
(cherry picked from commit 6863223033)
2025-09-17 13:59:16 +02:00
Mike Blumenkrantz
9517120528 zink: ensure transient surface is created when doing msaa expand
forgetting this can lead to res->transient being NULL

Fixes: ef3f798957 ("zink: prune zink_surface down to the imageview and create/fetch on demand")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37257>
(cherry picked from commit 7c1c2f8fce)
2025-09-17 13:59:16 +02:00
Mike Blumenkrantz
d9094cf0cd zink: set current compute prog after comparing against current compute prog
not sure how this was never caught before now?

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37139>
(cherry picked from commit e21438192a)
2025-09-17 13:59:16 +02:00
Mike Blumenkrantz
c99a6f8470 zink: only set compute module info on dispatch (after compile fence)
this otherwise can attempt to access thread data

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37139>
(cherry picked from commit 3fecf68784)
2025-09-17 13:59:16 +02:00
Sviatoslav Peleshko
91f3af81f4 anv: Always disable Color Blending for unused Render Targets
Commit d2f7b6d5 changed the BLEND_STATE update process so that only
the used render targets will be updated. This mostly works fine, but
in cases when the Dual Source Blending was used previously, we still
must turn it off to avoid the undefined behavior that leads to hangs.

Fixes: d2f7b6d5 ("anv: implement VK_KHR_dynamic_rendering_local_read")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13675
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37246>
(cherry picked from commit b148d47c3e)
2025-09-17 13:59:16 +02:00
Mike Blumenkrantz
113db9ac20 zink: correctly handle batch_id==0 in check_last_finished()
in some places this assert is used to hang check, but here we
can assume that the batch_id is always valid (i.e., not a hang) and
check it accordingly to avoid spurious crashes

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37239>
(cherry picked from commit 28342d1f11)
2025-09-17 13:59:16 +02:00
Mike Blumenkrantz
f8a88724ad zink: fix edgeflags check on program creation
can't check the shaders before the shaders are set

Fixes: a93685ef55 ("zink: add `has_edgeflags` flag to zink_shader and zink_gfx_program")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37239>
(cherry picked from commit 683e3ea0af)
2025-09-17 13:59:16 +02:00
Mike Blumenkrantz
af7f3d1dbb zink: clamp subgroup op return types to required int/uint types
required by spec

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37239>
(cherry picked from commit a11a02d6f6)
2025-09-17 13:59:16 +02:00
Mike Blumenkrantz
462f8c59e5 zink: flag pipeline_changed when updating shader modules
this otherwise breaks everything when switching from pipeline -> shobj draw

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37239>
(cherry picked from commit fe82d156bf)
2025-09-17 13:59:16 +02:00
Rob Clark
8f81950c5a freedreno/registers: Re-enable validation for gen_header.py
Commit 84e93daa26 ("freedreno/registers: allow skipping the
validation") synced a change that made validation optional for
kernel builds, to avoid a lxml dependency for kernel builds.
But this inadvertantly also disabled schema validation on the
mesa side.  CI (and meson "test" target) still validates the
xml against the schema, but it is easier if this is also done
as part of the normal build to avoid suprises from Marge.

Fixes: 84e93daa26 ("freedreno/registers: allow skipping the validation")
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37216>
(cherry picked from commit a70279adc2)
2025-09-17 13:59:16 +02:00
Jose Maria Casanova Crespo
88a8e4fea1 v3dv: Fix stencil clear values for only stencil clears
The attachment loadOp for stencil buffers is not stored at
attachment->desc.loadOp. It is stored at attachment->desc.stencilLoadOp
so v3dv was ignoring the clear values for stencil if the depth buffer
wasn't setup with the VK_ATTACHMENT_LOAD_OP_CLEAR.

Fixes: 4d0e497a3e ("v3dv: implement support for depth testing")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37228>
(cherry picked from commit 914b60f0dd)
2025-09-17 13:59:16 +02:00
Mike Blumenkrantz
e5c8ed73db zink: toggle ctx->has_swapchain when flushing clears
this otherwise breaks resolve handling

Fixes: b122c3eaa9 ("zink: unify/fix clear flushing")

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13841
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13847
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37234>
(cherry picked from commit 504a522a1e)
2025-09-17 13:59:16 +02:00
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