[Git][xorg-team/lib/mesa][upstream-unstable] 101 commits: docs: add sha sum for 26.0.3

"Timo Aaltonen (@tjaalton)" <[email protected]>
Newsgroups gmane.linux.debian.devel.x
Message-ID <[email protected]>

Timo Aaltonen pushed to branch upstream-unstable at X Strike Force / lib / mesa


Commits:
1897b189 by Eric Engestrom at 2026-03-18T17:25:12+01:00
docs: add sha sum for 26.0.3

- - - - -
2c256923 by Eric Engestrom at 2026-04-01T11:45:29+02:00
.pick_status.json: Update to 48c086cb4203d1a8e7458e0d0a85cfffc5b4bfe5

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
9c86791b by Eric Engestrom at 2026-04-01T11:45:30+02:00
.pick_status.json: Mark 26b19e355fefcd6a8325924e6a391dd67a675c34 as denominated

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
8e1a3577 by Eric Engestrom at 2026-04-01T11:45:30+02:00
.pick_status.json: Mark 32a818d11d3d60ebbc23a62127e988d17e742b79 as denominated

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
cc617b7b by Eric Engestrom at 2026-04-01T11:45:30+02:00
.pick_status.json: Mark d38916d673e6d2359e96fed45ebd83ca026dfcb5 as denominated

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
73d8c998 by Eric Engestrom at 2026-04-01T11:45:30+02:00
.pick_status.json: Mark 384d12816459996fbac5722e9fdb29527662cafb as denominated

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
4dc0c3ce by Faith Ekstrand at 2026-04-01T11:45:30+02:00
nak: Report progress from nak_nir_rematerialize_load_const()

Fixes: 8fffcdb18b4d ("nak/nir: Re-materialize load_const instructions in use blocks")
Reviewed-by: Karol Herbst <[email protected]>
Acked-by: Mel Henning <[email protected]>
(cherry picked from commit 381bc06c4a86e356817d12d4020334308838e516)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
59f2c950 by Mike Blumenkrantz at 2026-04-01T11:45:30+02:00
ntv: always emit const coord components for fbfetch loads

  VUID-StandaloneSpirv-SubpassData-04660
  The (u,v) coordinates used for a SubpassData must be the <id> of a constant vector (0,0)

cc: mesa-stable

(cherry picked from commit 95b7a5b82b4981228551c76847ecfa12282aeb82)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
18606773 by Icenowy Zheng at 2026-04-01T11:45:30+02:00
vulkan/wsi/headless: properly use CPU images for CPU devices

Currently the headless WSI unconditionally uses DRM images as WSI
images, which isn't proper behavior for working with lavapipe driver,
and leads to either error or crash (depending on whether udmabuf is
available).

Properly setup CPU images instead of DRM images for software-rendering
WSI devices.

This fixes (at least) `dEQP-VK.wsi.headless.swapchain.render.*` on
lavapipe.

Fixes: 90caf9bdbd24 ("vulkan/wsi/headless: drop the wsi_create_null_image_mem override")
Signed-off-by: Icenowy Zheng <[email protected]>
Reviewed-by: Yiwei Zhang <[email protected]>
(cherry picked from commit 38cf1b38291f936469fb7f54e34b9dfcae727990)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
1cfb84c0 by Dave Airlie at 2026-04-01T11:45:30+02:00
st/mesh: handle mesh shader point size

This sets the per-vertex point size state correctly in the presence of mesh shaders.

(fixes line is just a educated pick)

Fixes: 51d6e4404aeb ("mesa: allow NULL for vertex shader when mesh pipeline")
Reviewed-by: Mike Blumenkrantz <[email protected]>
(cherry picked from commit 5bfaf7536ad70d922e8849cdd95c3742556fe01a)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
1f9129a3 by Timothy Arceri at 2026-04-01T11:45:30+02:00
mesa: add force_explicit_uniform_loc_zero workaround

Allows a uniform name to be passed to force_explicit_uniform_loc_zero
allowing us to set that uniform to an explicit location of zero.

Cc: mesa-stable
Reviewed-by: Marek Olšák <[email protected]>
(cherry picked from commit 87ae5cab948cdf3d9bad9b23c3667a56feab9695)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
d55ff99a by Timothy Arceri at 2026-04-01T11:45:30+02:00
util/driconf: add workarounds for Lethis - Path Of Progress

The game uses glGetUniformLocation() but specifies the wrong program id
for one of the uniforms. The shader programs both contain shaders with
a uniform of the same name but because they have a different number of
uniforms the returned uniform location does not match the expected uniform.

Here we add a workaround to force the uniform with the wrong get location
params to always have the location 0 so that it doesn't matter which
shader the application checks for the location.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14864
Reviewed-by: Marek Olšák <[email protected]>
(cherry picked from commit 09393b33b2ab76ebba697bdeac00d5efdc41ef21)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
fbebd629 by Mary Guillemard at 2026-04-01T11:45:30+02:00
nvk: Move viewport and scissor emit to their own function

We are going to need to reuse those functions to fix FSR support on
Turing.

Signed-off-by: Mary Guillemard <[email protected]>
Reviewed-by: Mel Henning <[email protected]>
Cc: mesa-stable
(cherry picked from commit 56e31d8145634b2e4488f63b85cad767e71f2610)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
cb9c75e2 by Mary Guillemard at 2026-04-01T11:45:30+02:00
nvk: Broacast viewport0 and scissor0 in case of FSR on Turing

On Turing, the hardware rely on the viewport index for FSR.
If not all viewports are defined, we will end up not rendering
anything when selecting the primitive shading rate.

This patch makes it that we now broadcast the viewport and scissor 0
likes the proprietary driver.

This fixes "dEQP-VK.mesh_shader.ext.builtin.primitive_shading_rate_*" on
Turing.

Signed-off-by: Mary Guillemard <[email protected]>
Fixes: 2fb4aed9 ("nvk: Advertise VK_KHR_fragment_shading_rate")
Reviewed-by: Mel Henning <[email protected]>
(cherry picked from commit d00965651a4e22ba75d30464325a2c35d6bbe5e8)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
675c1885 by Eric R. Smith at 2026-04-01T11:45:30+02:00
panfrost: fix texel buffer calculations

We were computing some positions using `void*` rather than pointers to
the appropriate structures. This caused bad pointers, the effect of
which depended on the current memory environment -- tests related to
texel buffers could pass or not depending on what other tests had run
previously.

Fixes: a21ee564e20 ("pan/bi: Make texel buffers use Attribute Buffers")
Signed-off-by: Eric R. Smith <[email protected]>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <[email protected]>
Reviewed-by: Erik Faye-Lund <[email protected]>
Reviewed-by: Lorenzo Rossi <[email protected]>
(cherry picked from commit 0142e2e5e390e52311b65c3c3f0266cc816f8711)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
0629cbe0 by Eric R. Smith at 2026-04-01T11:45:30+02:00
panfrost: fix typos in architecture detection

The preprocessor symbol we want is `PAN_ARCH`, not `MALI_ARCH`.

Fixes: a21ee564e20 ("pan/bi: Make texel buffers use Attribute Buffers")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <[email protected]>
Reviewed-by: Erik Faye-Lund <[email protected]>
Reviewed-by: Lorenzo Rossi <[email protected]>
(cherry picked from commit 3945421c17add49787b9af40377b398e015fb848)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
676c9c7f by Eric Engestrom at 2026-04-01T11:45:30+02:00
ci: changing .gitlab-ci.yml itself also means the container jobs must exist

Fixes: 4b2a4dce78780823fa2b ("ci: Skip check-only container jobs for pre-merge")
(cherry picked from commit 44669146808b74024b9befeb59266db18ae5e165)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
eccd9df7 by Robert Mader at 2026-04-01T11:45:30+02:00
llvmpipe: Stop aligning height to raster block size for unbacked handles

This code path is usually used by lavapipe when importing dmabufs, not
for output.
The resulting size_required is then used to calculate the size
requirements for VkMemoryRequirements2 etc. Requiring a multiple of
LP_RASTER_BLOCK_SIZE - 4 - can eventually result in lavapipe rejecting
dmabuf imports.

An example is YUV420 at a resolution of 1680x1050 produced by Gstreamer
1.28 - e.g. from a screencasts. In this case we currently compute a size
of 3235840, while other drivers like radv compute 3225600. The actual
size is 3227648, fitting into the later but not the former.

Removing the alignment brings lavapipe in line with other drivers.

Cc: mesa-stable
Signed-off-by: Robert Mader <[email protected]>
(cherry picked from commit 0bbc26d2c4794c4427f311efc57d6141ea6056cc)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
111c2dac by Samuel Pitoiset at 2026-04-01T11:45:31+02:00
radv/amdgpu: free the VA range in case the BO allocation failed

Found by inspection.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <[email protected]>
(cherry picked from commit 02628a5eb74dac7e6bbdf38fcec49e8fd5ff4e25)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
9e5e58aa by Eric Engestrom at 2026-04-01T11:45:31+02:00
.pick_status.json: Mark 538c3ee6c7a419d5c55bef2294ca10166f8d9af4 as denominated

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
45391398 by Erik Faye-Lund at 2026-04-01T11:45:31+02:00
pan/genxml: remove non-existent YUV Enable for AFRC

This is controlled by the writeback-mode when using AFRC, not by an YUV
Enable field. This Filed doesn't exist in these, and should according to
the spec be zero.

Fixes: 7a763bb0a3b ("pan/genxml: Rework the RT/ZS emission logic")
Reviewed-by: Boris Brezillon <[email protected]>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <[email protected]>
(cherry picked from commit 15e0ac07315d03c461b30cd9c0240b0cebe20b34)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
0a5c858f by Erik Faye-Lund at 2026-04-01T11:45:31+02:00
pan/lib: do not try to use stencil-aspect of color attachment

We can't use the stencil-aspect of a color-attachment. That's going to
fail, so let's use the color-aspect instead. We already have it around
anyway.

Fixes: 7a763bb0a3b ("pan/genxml: Rework the RT/ZS emission logic")
Reviewed-by: Boris Brezillon <[email protected]>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <[email protected]>
(cherry picked from commit 322aaa88c6e39078bf7d8e42f2c8d78cc3e701cb)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
ad057adf by Erik Faye-Lund at 2026-04-01T11:45:31+02:00
pan/lib: set srgb-flag for afrc render-targets

Without this, sRGB rendering to AFRC is broken.

Fixes: 7a763bb0a3b ("pan/genxml: Rework the RT/ZS emission logic")
Reviewed-by: Boris Brezillon <[email protected]>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <[email protected]>
(cherry picked from commit b0c32fcc6629258ec15ae4610c5b8f1258597f88)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
2953656a by Erik Faye-Lund at 2026-04-01T11:45:31+02:00
pan/lib: divide extent by tile-extend, not itself

Dividing this by itself is nonsensical, and just always gives us one.
That's obviously not what we want here.

But in this case we also know that the extent is divisible by the tile
extent, so there's no need for DIV_ROUND_UP, we can just divide.

Fixes: e6f8cab6989 ("pan/layout: Split the logic per modifier")
Reviewed-by: Boris Brezillon <[email protected]>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <[email protected]>
(cherry picked from commit 5280b8028153580b77b6d6cb2b43abfc8ec500a0)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
3794d34a by Iván Briano at 2026-04-01T11:45:31+02:00
anv: fix anv_is_dual_src_blend_equation

Fixes new tests: dEQP-VK.pipeline.*.blend.dual_source.undefined_output.second*

Cc: mesa-stable
Signed-off-by: Iván Briano <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
(cherry picked from commit 2ce8a9e1be573b8ef8a90c8e5a2744c0fb9beb1e)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
b26c4014 by Iván Briano at 2026-04-01T11:45:31+02:00
brw: do not omit RT writes if dual_src_blend is on

Dual source blending when one of the sources is not written to leaves
those values undefined, but the other should still be valid.
By omitting unwritten outputs, we ended up not writing anything at all
for the case that OUT1 is written to but OUT0 is undefined.

Fixes new CTS tests: dEQP-VK.pipeline.*.blend.dual_source.undefined_output.first*

Cc: mesa-stable
Signed-off-by: Iván Briano <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
(cherry picked from commit fd556e54f61c4e8e250cb32bf43206412dd295ff)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
4f859cf5 by Rhys Perry at 2026-04-01T11:45:31+02:00
aco/tests: fix assembler tests with LLVM 22

Signed-off-by: Rhys Perry <[email protected]>
Backport-to: 26.0
Reviewed-by: Georg Lehmann <[email protected]>
(cherry picked from commit 0826685f1b7766abf43a3c1ab777ffb66cad5290)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
123322b8 by Rhys Perry at 2026-04-01T11:45:31+02:00
aco/tests: fix assembler/isel tests with LLVM 23

Signed-off-by: Rhys Perry <[email protected]>
Backport-to: 26.0
Reviewed-by: Georg Lehmann <[email protected]>
(cherry picked from commit e2ebcba11b8d606a7e292282aabdacdd529b6e0c)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
9c88f72f by David Rosca at 2026-04-01T11:45:31+02:00
frontends/va: Fix leaking H264/5 PPS/SPS objects when decoder wasn't created

When destroying H264/5 decode context we check the profile from decoder to
free the H264/5 PPS/SPS objects, but decoder is only created when decoding
first frame so these objects will never get freed in case decoder is NULL.

Cc: mesa-stable
Reviewed-by: Benjamin Cheng <[email protected]>
(cherry picked from commit 5134d37e7d7e7b75f513916e2027014a4a30d09d)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
f1b6e152 by David Rosca at 2026-04-01T11:45:31+02:00
frontends/va: Fix leaks when create_video_codec fails

Cc: mesa-stable
Reviewed-by: Benjamin Cheng <[email protected]>
(cherry picked from commit 089cd9d88e9bbde7979114993ac856bc4f90a4f4)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
ee797f71 by Simon Perretta at 2026-04-01T11:45:31+02:00
pco: use vm/icm for tile buffer store coverage mask

Use the valid/input coverage masks for tile buffer store coverage masks
when running single/multi-sampled fragment shaders respectively.

Fixes: 297a0c269aa ("pvr, pco: tile buffer support")

Signed-off-by: Simon Perretta <[email protected]>
Reported-by: Nick Hamilton <[email protected]>
Acked-by: Frank Binns <[email protected]>
(cherry picked from commit 8eee60fa78ed215169c3d8b23b7f07b1caae0518)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
ff902ec4 by Luigi Santivetti at 2026-04-01T11:45:31+02:00
pvr: expose partial usc mrt init routine

Expose the routine in preperation for a later commit.

Backport-to: 26.0

Signed-off-by: Luigi Santivetti <[email protected]>
Acked-by: Frank Binns <[email protected]>
(cherry picked from commit 6b0fea938b60ffbc954c062688c52657fa293e01)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
5594cb90 by Luigi Santivetti at 2026-04-01T11:45:31+02:00
pvr: keep compiler resources in sync with attachments

Do not assume that the application always provides images for backing
attachments. The app can provide a super set of attachments of which
only some are actually backed with images.

We want to filter-out attachments that aren't meaningful for rendering
or sampling, and create compiler resources only for relevant ones.

Fix assert in CTS:
  pvr_arch_mrt.c:215: pvr_rogue_init_usc_mrt_setup: Assertion `att_format != VK_FORMAT_UNDEFINED' failed.

Seen in pipeline monolithic, for instance:
  dEQP-VK.pipeline.monolithic.multisample.misc.dynamic_rendering.multi_renderpass.r8g8b8a8_unorm_r16g16b16a16_sfloat_r16g16b16a16_sint_d32_sfloat_s8_uint.random_127

Fixes: d549c1d045 ("pvr: add pipeline handling to use dynamic rendering info")
Signed-off-by: Luigi Santivetti <[email protected]>
Acked-by: Frank Binns <[email protected]>
(cherry picked from commit 5473ca3be3a692eca9474d0f250de2f95ebcba0d)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
b3197d68 by Nick Hamilton at 2026-04-01T11:45:31+02:00
pvr: Fix for multiple attachments being assigned to the same tile buffer.

When the first attachment is assigned to a tile buffer, the buffer
alloc mask was not been updated. This means when a second attachment
is added to the same tile buffer it will be assigned the same offset
as the first which will lead to incorrect behaviour.

Fixes for depq-vk:
dEQP-VK.renderpasses.dynamic_rendering.complete_secondary_cmd_buff.suballocation.attachment.4.568
dEQP-VK.renderpasses.dynamic_rendering.complete_secondary_cmd_buff.dedicated_allocation.attachment.4.568
dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.suballocation.attachment.4.568
dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.dedicated_allocation.attachment.4.568

Fixes: a7de9dae6bd ("pvr: Add routine for filling out usc_mrt_setup from dynamic rendering state")

Signed-off-by: Nick Hamilton <[email protected]>
Acked-by: Frank Binns <[email protected]>
(cherry picked from commit 96cfb1cb7fbec6358c97711ca943588bab8e3fc3)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
ad2384db by Mike Blumenkrantz at 2026-04-01T11:45:31+02:00
mesa/renderbuffer: always add PIPE_BIND_SAMPLER_VIEW to rendering textures

this fixes expectations around e.g., using u_blitter to copy textures

cc: mesa-stable

Reviewed-by: Marek Olšák <[email protected]>
(cherry picked from commit 929eb9a021110a41860a84e4728e67b4fd625dea)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
d769e67c by Mike Blumenkrantz at 2026-04-01T11:45:32+02:00
llvmpipe: fix color fbfetch

with the unlowering pass, there is no longer a separate gl_LastFragData variable,
so this workaround just breaks color outputs

fixes dEQP-GLES31.functional.shaders.framebuffer_fetch.basic.last_frag_data

cc: mesa-stable

(cherry picked from commit 4b2022a8f58aab6d06c04457b6d334714cecf744)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
7908d4e8 by Mary Guillemard at 2026-04-01T11:45:32+02:00
nir/dead_cf: Add missing load_ssbo_ir3 handling

Signed-off-by: Mary Guillemard <[email protected]>
Fixes: 0092edfec08 ("nir/dead_cf: Do not remove loops with loads that can't be reordered")
Reviewed-by: Faith Ekstrand <[email protected]>
Reviewed-by: Mel Henning <[email protected]>
(cherry picked from commit 6013667d61c7c552c19903a9dcea421c2d037faf)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
d4c73521 by Mary Guillemard at 2026-04-01T11:45:32+02:00
nir/dead_cf: Add missing load_global_bounded handling

Signed-off-by: Mary Guillemard <[email protected]>
Fixes: caa0854da87 ("nir: plumb load_global_bounded")
Reviewed-by: Faith Ekstrand <[email protected]>
Reviewed-by: Mel Henning <[email protected]>
(cherry picked from commit bb6fc8cc2064580e506fcc626d56eee38de9924e)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
79c1ff90 by Mary Guillemard at 2026-04-01T11:45:32+02:00
nak: Do not allow load_helper_invocation reordering

load_helper_invocation can not be reordered past a demote.

Signed-off-by: Mary Guillemard <[email protected]>
Fixes: 7ece220f968 ("nak/nir: Lower systm values before lowering I/O")
Reviewed-by: Faith Ekstrand <[email protected]>
(cherry picked from commit cba5841d61a5f8439f0a00531cb8f42e4817611b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
0b543632 by Liviu Prodea at 2026-04-01T11:45:32+02:00
clc: Fix static link with clang>=22

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

Backport-to: 26.0

Reviewed-by: Karol Herbst <[email protected]>

Tested-by: Rudi Heitbaum <[email protected]>
(cherry picked from commit 718afd787c682798e879ce748419b8222b8676f3)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
28f24b21 by Valentine Burley at 2026-04-01T11:45:32+02:00
tu/drm/virtio: Add missing lock to virtio_bo_init_dmabuf

Lock vma mutex when freeing iova in virtio_bo_init_dmabuf.

Fixes: f17c5297d7a ("tu: Add virtgpu support")
Signed-off-by: Valentine Burley <[email protected]>
(cherry picked from commit 28e3fb705210cad61e419c1b8ee2a979df965fe8)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
2aa33f41 by Valentine Burley at 2026-04-01T11:45:32+02:00
tu/drm/virtio: Move set_iova into success path of virtio_bo_init_dmabuf

set_iova() was called unconditionally after tu_bo_init(), even on the
failure path where the BO has been zeroed. This would call set_iova()
with res_id 0 and a stale iova, corrupting the iova mapping.

Move set_iova() into the success branch so it is only called when
tu_bo_init() succeeds.

Fixes: db88a490b8d2 ("tu: Avoid extraneous set_iova")
Signed-off-by: Valentine Burley <[email protected]>
(cherry picked from commit 7a96bc3187382eea0cd89cb46720b0908a7c3831)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
b6640c16 by Valentine Burley at 2026-04-01T11:45:32+02:00
tu/drm/virtio: Avoid freeing zombified tu_sparse_vma

This is d3cedd2fa56 ("tu/drm: msm's has_set_iova codepath should avoid
freeing zombified tu_sparse_vma") but for virtio.

Fixes: 764b3d9161c ("tu: Implement transient attachments and lazily allocated memory")
Signed-off-by: Valentine Burley <[email protected]>
(cherry picked from commit f1366ca14479254ed29b6aa6c1d218ca8af6456f)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
9ca275f2 by Valentine Burley at 2026-04-01T11:45:32+02:00
tu/drm/virtio: Do not free iova from heap for lazy BOs

When initializing a BO using a lazy VMA, the iova is provided by
the sparse VMA and was not allocated from the device's VMA heap.
Avoid calling util_vma_heap_free in the error path for such BOs
to prevent heap corruption and potential double-frees.

Fixes: 88d001383a7 ("tu: Add support for a "lazy" sparse VMA")
Signed-off-by: Valentine Burley <[email protected]>
(cherry picked from commit eb7897f57b4c2f3e21bec5d9e5a5fab0f4e1f5d6)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
e984faec by Valentine Burley at 2026-04-01T11:45:32+02:00
tu/drm/virtio: Fix GEM handle leak in tu_bo_init error path

In tu_bo_init, if growing the submit BO list fails, the GEM handle
must be closed. However, bo->gem_handle is only populated later
via compound assignment. Use the gem_handle parameter directly
to ensure the correct handle is closed and not leaked.

Fixes: d67d501af46 ("tu/drm/virtio: Switch to vdrm helper")
Signed-off-by: Valentine Burley <[email protected]>
(cherry picked from commit 316d9b02098598c5671ddab2f649c279117f7989)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
bb0c3b12 by Valentine Burley at 2026-04-01T11:45:32+02:00
tu/drm/virtio: Fix GEM handle leak on failed dmabuf res_id lookup

When vdrm_handle_to_res_id fails in virtio_bo_init_dmabuf, the handle
obtained from vdrm_dmabuf_to_handle was leaked.
Closing the handle is safe despite the lack of vdrm refcounting
because dma_bo_lock is held and already-imported BOs return early.
At this point, we are the sole holder of the handle.

While here, use the local vdrm variable consistently.

Fixes: 6ca192f586f ("turnip: virtio: fix iova leak upon found already imported dmabuf")
Signed-off-by: Valentine Burley <[email protected]>
(cherry picked from commit f2c89f01880d12061631801ab217d7b4d2fcca9b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
5d8b53be by kingstom.chen at 2026-04-01T11:45:32+02:00
radv/rt: only run move_rt_instructions() for CPS shaders

move_rt_instructions() only makes sense for CPS recursive shaders, where
later rt_trace_ray calls can overwrite the current shader's RT system
values.

Running it on the function-call path can hoist load_hit_attrib_amd
above merged intersection writes, which corrupts any-hit
hitAttributeEXT. Move the pass into the existing CPS-only
non-intersection branch before nir_lower_shader_calls().

Fixes: c5d796c902ce ("radv/rt: Use function call structure in NIR lowering")
Closes: #15074

Reviewed-by: Konstantin Seurer <[email protected]>
(cherry picked from commit 5a7f4c62d8538ad643644a0ea98bcea79039d837)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
57ef28bb by Ryan Zhang at 2026-04-01T11:45:32+02:00
panvk: trivial fix to remove repeated assignment

Fixes: c0d9827 ("panvk: Use WB mappings for the global RW and executable memory pools")

Signed-off-by: Ryan Zhang <[email protected]>
Reviewed-by: Christian Gmeiner <[email protected]>
(cherry picked from commit 760ac320be4fe9f62eb3e1df688d937359e396b6)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
a21f8ddf by Pierre-Eric Pelloux-Prayer at 2026-04-01T11:45:32+02:00
radeonsi: move spi_shader_*_format to si_shader_variant_info

Variants can affect theses value so it's best to store them
in this struct.

No functional changes.

Cc: mesa-stable
Reviewed-by: Marek Olšák <[email protected]>
(cherry picked from commit da7c51578384e3922b34a6417c2947bd14d8f422)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
d5f9f121 by Pierre-Eric Pelloux-Prayer at 2026-04-01T11:45:32+02:00
radeonsi: account for outputs_written when updating spi_shader_col_format

Variants can modify which outputs get written so we must update
these fields otherwise spi_shader_col_format will be incorrect.

This can happen for instance with uniforms inlining:

   uniform bool depth_only;
   void main() {
      if (depth_only) return;
      ...
   }

When depth_only is true, this shader becomes empty after uniforms
inlining but spi_shader_col_format wasn't updated properly,
causing a hang.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14737
Reviewed-by: Marek Olšák <[email protected]>
(cherry picked from commit 88986dcc9c81342a26951d576924d00a21d812c7)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
6462dac3 by Georg Lehmann at 2026-04-01T11:45:32+02:00
gallivm: don't optimize fadd(a, 0.0) with signed zero preserve

Fixes: 540e84bedbf ("gallivm: Preserve -0 and nan")
Reviewed-by: Konstantin Seurer <[email protected]>
(cherry picked from commit 284b4143f700078942ce40ffce4d486260968c13)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
97105a15 by Faith Ekstrand at 2026-04-01T11:45:32+02:00
nir: Consider if uses in nir_def_all_uses_*

They check for if uses and want to return false but nir_foreach_use()
means the if uses are never seen.

Cc: mesa-stable
Reviewed-by: Georg Lehmann <[email protected]>
Reviewed-by: Mel Henning <[email protected]>
(cherry picked from commit 3f870d62b0eea707c22ca79fa87e4707d40b0c33)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
9c45a18a by Liviu Prodea at 2026-04-01T11:45:32+02:00
util: Fix use of undeclared identifier 'NULL' in src/util/os_misc.h when compiling with clang

Fixes: 2771eb39fd ("util: Add function os_unset_option/os_set_option for latter use")

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

```
FAILED: [code=1] src/util/libmesa_util.a.p/u_process.c.obj
"cc" "-Isrc/util/libmesa_util.a.p" "-Isrc/util" "-I../../src/util" "-Iinclude" "-I../../include" "-Isrc" "-I../../src" "-Isrc/util/format" "-I../../src/util/format" "-IC:/msys64/clang64/bin/../include" "-fvisibility=hidden" "-fdiagnostics-color=always" "-D_FILE_OFFSET_BITS=64" "-Wall" "-Winvalid-pch" "-std=c11" "-O2" "-g" "-D__STDC_CONSTANT_MACROS" "-D__STDC_FORMAT_MACROS" "-D__STDC_LIMIT_MACROS" "-DPACKAGE_VERSION=\"26.0.0-rc3\"" "-DPACKAGE_BUGREPORT=\"https://gitlab.freedesktop.org/mesa/mesa/-/issues\"" "-DHAVE_OPENGL=1" "-DHAVE_OPENGL_ES_1=1" "-DHAVE_OPENGL_ES_2=1" "-DHAVE_SOFTPIPE" "-DHAVE_LLVMPIPE" "-DHAVE_ZINK" "-DHAVE_D3D12" "-DHAVE_VIRGL" "-DHAVE_SWRAST" "-DMESA_SYSTEM_HAS_KMS_DRM=0" "-DVIDEO_CODEC_VC1DEC=1" "-DVIDEO_CODEC_H264DEC=1" "-DVIDEO_CODEC_H264ENC=1" "-DVIDEO_CODEC_H265DEC=1" "-DVIDEO_CODEC_H265ENC=1" "-DVIDEO_CODEC_AV1DEC=1" "-DVIDEO_CODEC_AV1ENC=1" "-DVIDEO_CODEC_VP9DEC=1" "-DVIDEO_CODEC_MPEG12DEC=1" "-DVIDEO_CODEC_JPEGDEC=1" "-DHAVE_WINDOWS_PLATFORM" "-DHAVE_SURFACELESS_PLATFORM" "-DUSE_LIBGLVND=0" "-DUSE_D3D12_PREVIEW_HEADERS=0" "-DHAVE_GALLIUM_D3D12_VIDEO" "-DHAVE_VA_SURFACE_ATTRIB_DRM_FORMAT_MODIFIERS" "-DGLAPI_EXPORT_PROTO_ENTRY_POINTS=1" "-DALLOW_KCMP" "-DMESA_DEBUG=0" "-DHAVE___BUILTIN_BSWAP32" "-DHAVE___BUILTIN_BSWAP64" "-DHAVE___BUILTIN_CLZ" "-DHAVE___BUILTIN_CLZLL" "-DHAVE___BUILTIN_CTZ" "-DHAVE___BUILTIN_EXPECT" "-DHAVE___BUILTIN_FFS" "-DHAVE___BUILTIN_FFSLL" "-DHAVE___BUILTIN_POPCOUNT" "-DHAVE___BUILTIN_POPCOUNTLL" "-DHAVE___BUILTIN_UNREACHABLE" "-DHAVE___BUILTIN_TYPES_COMPATIBLE_P" "-DHAVE___BUILTIN_ADD_OVERFLOW" "-DHAVE_FUNC_ATTRIBUTE_CONST" "-DHAVE_FUNC_ATTRIBUTE_FLATTEN" "-DHAVE_FUNC_ATTRIBUTE_MALLOC" "-DHAVE_FUNC_ATTRIBUTE_PURE" "-DHAVE_FUNC_ATTRIBUTE_UNUSED" "-DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT" "-DHAVE_FUNC_ATTRIBUTE_WEAK" "-DHAVE_FUNC_ATTRIBUTE_FORMAT" "-DHAVE_FUNC_ATTRIBUTE_PACKED" "-DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL" "-DHAVE_FUNC_ATTRIBUTE_ALIAS" "-DHAVE_FUNC_ATTRIBUTE_NORETURN" "-DHAVE_FUNC_ATTRIBUTE_COLD" "-DHAVE_FUNC_ATTRIBUTE_VISIBILITY" "-DHAVE_UINT128" "-D_WIN32_WINNT=0x0A00" "-DWINVER=0x0A00" "-D_GNU_SOURCE" "-DUSE_SSE41" "-DHAVE___BUILTIN_IA32_CLFLUSHOPT" "-DUSE_GCC_ATOMIC_BUILTINS" "-DHAS_SCHED_H" "-DHAVE_DLFCN_H" "-DHAVE_CET_H" "-DHAVE_STRTOF" "-DHAVE_STRTOK_R" "-DHAVE_QSORT_S" "-DHAVE_STRUCT_TIMESPEC" "-DHAVE_ZLIB" "-DHAVE_ZSTD" "-DHAVE_COMPRESSION" "-DWIN32_LEAN_AND_MEAN" "-DWINDOWS_NO_FUTEX" "-DMESA_LLVM_VERSION_STRING=\"21.1.8\"" "-DLLVM_IS_SHARED=0" "-DDRAW_LLVM_AVAILABLE=1" "-DAMD_LLVM_AVAILABLE=1" "-DGALLIVM_USE_ORCJIT=0" "-DHAVE_SPIRV_TOOLS" "-DUSE_LIBELF" "-DTHREAD_SANITIZER=0" "-DHAVE_RENDERDOC_INTEGRATION=false" "-Werror=implicit-function-declaration" "-Werror=missing-prototypes" "-Werror=return-type" "-Werror=empty-body" "-Werror=incompatible-pointer-types" "-Werror=int-conversion" "-Wimplicit-fallthrough" "-Wmisleading-indentation" "-Wno-missing-field-initializers" "-Wno-format-truncation" "-fno-math-errno" "-fno-trapping-math" "-Qunused-arguments" "-fno-common" "-Wno-unknown-pragmas" "-Wno-microsoft-enum-value" "-Wno-unused-function" "-Werror=thread-safety" "-ffunction-sections" "-fdata-sections" "-pipe" "-Wp,-D_FORTIFY_SOURCE=2" "-fstack-protector-strong" "-Wp,-D__USE_MINGW_ANSI_STDIO=1" "-march=core2" "-Werror=pointer-arith" "-Werror=vla" "-Werror=gnu-empty-initializer" "-Wgnu-pointer-arith" -MD -MQ src/util/libmesa_util.a.p/u_process.c.obj -MF "src/util/libmesa_util.a.p/u_process.c.obj.d" -o src/util/libmesa_util.a.p/u_process.c.obj "-c" ../../src/util/u_process.c
In file included from ../../src/util/u_process.c:28:
../../src/util/os_misc.h:151:24: error: use of undeclared identifier 'NULL'
  151 |    os_set_option(name, NULL, true);
      |                        ^~~~
1 error generated.

```
Reviewed-by: Erik Faye-Lund <[email protected]>

Reviewed-by: Yonggang Luo <[email protected]>
(cherry picked from commit 128dc5743628c4f92d75c2ee6f8d9729e193becb)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
9257997e by Radu Costas at 2026-04-01T11:45:33+02:00
pco: Amend errant nir_move_option

Move options were bit or-ing from the wrong enum, causing undefined
behaviour when the number of intrinsics changed.
Replaced it with the values from the right nir_move_options enum that
were previously working. (Further refinement needed on these after
extensive testing.)

Fixes: f1b24267d25 ("pco: rework nir processing and passes")
Signed-off-by: Radu Costas <[email protected]>
Reviewed-by: Simon Perretta <[email protected]>
(cherry picked from commit 721c1b8f655e75b1958f71bc898d61d61f8956f3)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
64168376 by Marek Olšák at 2026-04-01T11:45:33+02:00
radeonsi: recompute IO bases after optimizations

to fix an assertion added by the commit, reproduced by viewperf13/catia

Fixes: d06616063cabda3 - radeonsi: assert that IO bases don't have holes & the same base isn't used twice

Reviewed-by: Pierre-Eric
(cherry picked from commit 8ea3d794fbce4e15ff1cd0e7fa2cf74c49031779)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
29a5d220 by Ian Romanick at 2026-04-01T11:45:33+02:00
brw/algebraic: Allow mixed types in saturate constant folding

Prevents assertion failures in func.shader-ballot.basic.q0 and other
tests starting with "nir/algebraic: Optimize some b2f of integer
comparison".

Vector immediates, bfloat, and 8-bit floats are still not supported.

v2: Almost complete re-write based on suggestions from Ken.

v3: Don't retype() on a brw_imm_f value.

Fixes: f8e54d02f79 ("intel/compiler: Relax mixed type restriction for saturating immediates")
Reviewed-by: Kenneth Graunke <[email protected]>
(cherry picked from commit 985ace332bc9d90fcbeca5e71aebfa7aea72afba)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
efc9ad39 by Ian Romanick at 2026-04-01T11:45:33+02:00
brw: Handle scalars and swizzles correctly in is_const_zero

v2: Massive simplification based on feedback from Ken.

Fixes: 96cde9cc01d ("intel/fs: Emit better code for bfi(..., 0)")
Reviewed-by: Kenneth Graunke <[email protected]>
(cherry picked from commit dff1e8ae28b4078f47b0e9b11df850855d4388ba)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
8c2283df by Valentine Burley at 2026-04-01T11:45:33+02:00
ci: Drop duplicate Intel shader-db run

Skylake is the default device for the Intel shim, and it's already
included in the four Intel families listed below.

Fixes: 183d57aa9e6 ("ci: Run intel shader-db on Haswell, Broadwell, and Meteorlake")
Signed-off-by: Valentine Burley <[email protected]>
(cherry picked from commit 9dd0f1919818c9020f040db178765ef6c41e5f2d)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
b640985a by Jose Maria Casanova Crespo at 2026-04-01T11:45:33+02:00
broadcom/common: fix V3D 7.1 TFU ICFG IFORMAT values

The V3D 7.1 TFU ICFG register restructured the IFORMAT field to 3 bits
(25:23) vs 4 bits on V3D 4.2. The defines were still using the V3D 4.2
encoding (11-15) which overflows the 3-bit field. Fix values to the
correct 3-7 range.

This was working by accident because the overflow bits land in the
SVTWID field, which is not used for the affected tiling formats.

Also rename SAND_128 to SAND since V3D 7.1 has a single SAND input
format; the tile width is now controlled by SVTWID.

Fixes: 146ceadcf45 ("v3dv: add support for TFU jobs in v71")
Reviewed-by: Iago Toral Quiroga <[email protected]>
(cherry picked from commit 89229f08bb84a07b999d6ecee221d2924e917e0f)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
e2e2dc6b by Job Noorman at 2026-04-01T11:45:33+02:00
ir3/legalize: don't drop sync flags on removed predt/predf

When a predt/predf branch can be removed, any sync flags set on the
terminator were removed as well. Fix this by copying these flags to the
prede that replaces the terminator.

Fixes frame instability in "Devil May Cry 5" and "Resident Evil 3".

Signed-off-by: Job Noorman <[email protected]>
Fixes: 39088571f08 ("ir3: add support for predication")
(cherry picked from commit b2a44da9e940e81b18f5d14bca6c32924e3466de)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
f8d492cc by juntak0916 at 2026-04-01T11:45:33+02:00
nvk: fix BindImageMemory2 per-bind status result

The per-bind status was always being set to VK_SUCCESS instead of the
actual result from nvk_bind_image_memory.

Fixes: 93792b5ef2a ("nvk: Add static wrappers for image/buffer binding")
Reviewed-by: Mel Henning <[email protected]>
(cherry picked from commit dd3e153a103fe26df39874a1934b612788c78fad)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
e406a5bb by Erik Faye-Lund at 2026-04-01T11:45:33+02:00
panvk: remove unused flag

This flag isn't used any more, so let's remove all references to it.

Fixes: e25064c026a ("panvk: Use indirect path for indexed draw on JM")
Acked-by: Boris Brezillon <[email protected]>
(cherry picked from commit 5b8ebb8553d19dd0a91bfe83b199f2dc8bbc11d9)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
dfa0f670 by Pierre-Eric Pelloux-Prayer at 2026-04-01T11:45:33+02:00
gallium/u_blitter: add a new fs_color_clear variant

The referenced commit switched from a passthrough shader
to fs_clear_color[write_all_cbufs=0]. It shouldn't matter since
the shader isn't supposed to be executed - it's only setup to get
the first color output active.

On some chips (gfx8) it seems to cause issues (hangs or page fault)
for some piglit tests, eg:
  framebuffer-blit-levels draw stencil

To fix this, introduce a 3rd variant, where a constant buffer isn't
required and instead the color is hardcoded in the shader.

Fixes: ca09c173f6e ("gallium/u_blitter: remove UTIL_BLITTER_ATTRIB_COLOR, use a constant buffer")
Reviewed-by: Marek Olšák <[email protected]>
(cherry picked from commit 2ff9fa8b728c5f206e19433a9d9b88eb8d97055b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
b26748a9 by Icenowy Zheng at 2026-04-01T11:45:33+02:00
pco: fix encoding of fred's s0abs bit

The s0abs bit in the encoing of fred instruction is wrongly set to the
status of .neg modifier instead of .abs modifier.

Fix this copy-n-paste error.

Fixes GLCTS tests when running on top of Zink:
dEQP-GLES2.functional.shaders.random.trigonometric.vertex.4
dEQP-GLES2.functional.shaders.random.trigonometric.vertex.45
dEQP-GLES2.functional.shaders.random.trigonometric.fragment.4
dEQP-GLES2.functional.shaders.random.trigonometric.fragment.45

Fixes: 8ec174b3f9a4 ("pco: add support for various selection, complex, trig ops")
Signed-off-by: Icenowy Zheng <[email protected]>
Reviewed-by: Simon Perretta <[email protected]>
(cherry picked from commit 54860bb4c733194b3eebd26414d3c38b64d10cf3)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
7b5e16fb by Alyssa Milburn at 2026-04-01T11:45:33+02:00
nv50,nvc0: Avoid uninitialized cbuf reads in blits

Overwrite the whole framebuffer cbuf rather than copying it from the
stack; fixes util_framebuffer_get_num_samples getting uninitialized
stack contents during validation.

Suggested-by: Karol Herbst <[email protected]>
Reviewed-by: Karol Herbst <[email protected]>
Signed-off-by: Alyssa Milburn <[email protected]>
Fixes: 2eb45daa9c8 ("gallium: de-pointerize pipe_surface")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14082
(cherry picked from commit a6992c7bbeee4e5e1ddd3555a0d2a25b8113f7d5)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
f54c73b0 by Yiwei Zhang at 2026-04-01T11:45:33+02:00
venus: fix to relax the KHR_external_memory_fd requirement

This reverts commit 1895de16a6ba00bf87b21400b1506bdf144c767e. The proper
way to filter out venus incapable physical devices is to do the platform
specific check during renderer side instance creation time.

Fixes: 1895de16a6b ("venus: filter out venus incapable physical devices")
(cherry picked from commit c2fe95a364b1063fc013cbbcc396177a3bc357d5)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
b5547c33 by Eric Engestrom at 2026-04-01T11:45:33+02:00
[26.0 only] venus/ci: mark a test as fixed

Couldn't easily figure out which commit fixed it, but since it's a fix
I didn't try very hard ^^

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
ca4f356d by Icenowy Zheng at 2026-04-01T11:45:33+02:00
pvr: Align width for PBE write when creating linear image

Even if a linear image isn't created with usages declaring PBE writes,
the image might be exported and then re-imported with a usage that
allows rendering to.

Always align linear images' width for being written by PBE.

This fixes WSI creating surfaces with odd width, exporting them and
re-importing for rendering.

Backport-to: 26.0
Signed-off-by: Icenowy Zheng <[email protected]>
Reviewed-by: Frank Binns <[email protected]>
(cherry picked from commit 765a9f4fd90b37e48df6dc45e5453313b8561ca8)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
ef136c26 by Alyssa Rosenzweig at 2026-04-01T11:45:33+02:00
nir: add nir_get_io_data_src

This complements our existing nir_get_io_index_src helper. Most, but annoyingly
not all, stores put their data source in source 0. Having a helper for this lets
us reduce special casing in a bunch of random places.

Signed-off-by: Alyssa Rosenzweig <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
Reviewed-by: Job Noorman <[email protected]>
(cherry picked from commit 8fb1d65426670f4c595f1278fddec8118a4e362f)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
014f4ce9 by Lionel Landwerlin at 2026-04-01T11:45:34+02:00
anv: add an analysis pass to detect compute shaders clearing data

Applications often miss emitting barriers between a shader
initializing data & another shader writing data in the same location
afterward. This is very common for UAVs (see vkd3d-proton).

Vkd3d-proton does a pretty good job as inserting missing barriers
between UAV clears & writes. But some applications also have similar
issues with custom shaders. Here we introduce an analysis pass that
recognize shaders doing clear/initialization. We'll use that
information in the following commit to insert barriers after those
shaders.

Since Gfx12.5 our HW has become a lot more sensitive to those issues
due to the introduction of an L1 untyped data cache that is not
coherent across the shader units. On Gfx20+, typed data is also L1
cacheable exposing even more issues.

Signed-off-by: Lionel Landwerlin <[email protected]>
Cc: mesa-stable
Reviewed-by: Ivan Briano <[email protected]>
(cherry picked from commit 13bf1a4008b90030e0973eb1edd6181f79b64074)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
eb382e0c by Lionel Landwerlin at 2026-04-01T11:45:34+02:00
anv: add drirc option to workaround missing application barriers on typed/untyped data

Enable it for Horizon Forbidden West (only seems to have untyped data
issue).

Signed-off-by: Lionel Landwerlin <[email protected]>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14889
Reviewed-by: Ivan Briano <[email protected]>
(cherry picked from commit db964068bfc9e49e4d68638062c59fd2f5527353)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
874cba57 by Icenowy Zheng at 2026-04-01T11:45:34+02:00
pvr: fix "obb" typo in oob_buffer_size when building vertex pds data

The ddmadt_oob_buffer_size structure to be filled is named
`obb_buffer_size`, which is obviously a typo.

Change to `oob_buffer_size` to fix the typo.

Fixes: 8991e646411b ("pvr: Add a Vulkan driver for Imagination Technologies PowerVR Rogue GPUs")
Signed-off-by: Icenowy Zheng <[email protected]>
Reviewed-by: Ella Stanforth <[email protected]>
(cherry picked from commit caea72cffc1ef906927b44b51f5a7d361f588b19)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
778c3580 by Icenowy Zheng at 2026-04-01T11:45:34+02:00
pvr: save vertex attribute size for DMA checking

Currently the size of single components inside one attribute is saved
and checked against when checking DMA capability. However, the vertex
attribute DMA happens for a whole attribute instead of individually for
its components, so checking against the component size is useless -- the
size of the whole attribute is what needs to be saved and checked.

Rename all component_size_in_bytes fields to attrib_size_in_bytes, and
save the size of the whole attribute inside them.

Fixes: 8991e646411b ("pvr: Add a Vulkan driver for Imagination Technologies PowerVR Rogue GPUs")
Signed-off-by: Icenowy Zheng <[email protected]>
Reviewed-by: Ella Stanforth <[email protected]>
(cherry picked from commit aa8dad141c3f6d7758e4b917b03c10d2dc6efdcf)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
e62ef26e by Icenowy Zheng at 2026-04-01T11:45:34+02:00
pvr: move PVR_BUFFER_MEMORY_PADDING_SIZE definition to pvr_buffer.h

This memory padding is enforced by GetBufferMemoryRequirements2 and
might be then checked against to decide whether it's enough.

Move it to pvr_buffer.h for further assertions.

Backport-to: 25.3
Signed-off-by: Icenowy Zheng <[email protected]>
Reviewed-by: Ella Stanforth <[email protected]>
(cherry picked from commit d992474be94b981582f7ab97f66a4c8eecb2c7d4)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
dbdbef67 by Icenowy Zheng at 2026-04-01T11:45:34+02:00
pvr: consider the size of DMA request when setting msize of DDMADT

The DDMADT instruction of PDS has out-of-bound test capability, which is
used for implementation of robust vertex input fetch.

According to the pseudocode in the comment block before the "LAST DDMAD"
mark in pvr_pipeline_pds.c, the check is between
`calculated_source_address + (burst_size << 2)` and `base_address +
buffer_size`, in which the `burst_size` seems to correspond to the BSIZE
field set in the low 32-bit of DDMAD(T) src3 and the `buffer_size`
corresponds to the MSIZE field set in the DDMADT-specific high 32-bit of
src3. As the calculated source address is just the base address adds the
multiplication result (the offset), the base address could be eliminated
from the check, results in the check between `offset + (BSIZE * 4)` and
`MSIZE` .

Naturally it's expected to just set the MSIZE field to the buffer size.
In addition, as the Vulkan spec says "Reads from a vertex input MAY
instead be bounds checked against a range rounded down to the nearest
multiple of the stride of its binding", the driver rounds down the
accessible buffer size before setting MSIZE to it.

However when running OpenGL ES 2.0 CTS, two problems are exhibited about
the setting of the size to check:

- dEQP-GLES2.functional.buffer.write.basic.array_stream_draw sets up a
  VBO with 3 bytes per vertex (RGB colors and 1B per color) and 340
  vertices (results in a buffer size of 1020 = 0x3fc). However as the
  DMA request size, which is specified by BSIZE, is counted by dwords,
  3 bytes are rounded up to 1 dword (which is 4 bytes). When the bound
  check of the last vertex happens, the vertex's DMA start offset is
  0x3f9, so the DDMADT check happens between 0x3fd (0x3f9 + 1 * 4) and
  0x3fc, and indicates a check failure. This prevents the last vertex,
  which is perfectly in-bound, from being properly fetched; this is
  against the Vulkan specification, and needs to be fixed.
- dEQP-GLES2.functional.vertex_arrays.single_attribute.strides.
  buffer_0_32_float2_vec4_dynamic_draw_quads_1 sets up a VBO with a size
  of 168 bytes, and tries to draw 6 vertices (each vertex consumes 2
  floats (thus 8 bytes) of attribute) with a stride of 32 bytes using
  this VBO. Zink then translates the VBO to a Vulkan vertex buffer bound
  with size = 168B, stride = 32B. Here the optional rule about rounding
  down buffer size happens in the current PowerVR driver, and the
  checked bound is rounded down to 160B, which prevented the last
  vertex's 8B attributes to be fetched. It looks like this kind of
  situation is considered in the codepath without DDMADT, but omitted
  for the codepath utilizing DDMADT for bound check.

So this patch tries to mimic the behavior of DDMADT when setting the
MSIZE field of it to prevent false out-of-bounds. It first calculates
the offset of the last valid vertex DMA, then adds the DMA request size
to it to form the final MSIZE value. With the code calculating the last
valid DMA offset considering the situation of fetching the attribute
from the space after the last whole multiple of stride, both problems
mentioned above are solved by this rework.

There're 99 GLES CTS testcases fixed by this change, and Vulkan CTS
shows no regression on `dEQP-VK.robustness.robustness1_vertex_access.*`
tests.

Fixes: 4873903b565a ("pvr: Enable PDS_DDMADT")
Signed-off-by: Icenowy Zheng <[email protected]>
Reviewed-by: Ella Stanforth <[email protected]>
(cherry picked from commit 252904f3d1efa74c420bf9999e36c3db01bfc903)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
b5c8c1dc by emre at 2026-04-01T11:45:34+02:00
nvk: fix barrier cache invalidation

Fixes: e1c1cdbd5f38 ("nvk: Implement vkCmdPipelineBarrier2 for real")
Reviewed-by: Mary Guillemard <[email protected]>
Reviewed-by: Mel Henning <[email protected]>
Reviewed-by: Faith Ekstrand <[email protected]>
(cherry picked from commit fe558d83281bc509fe097f8836627825786d041b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
e84168bd by Lionel Landwerlin at 2026-04-01T11:45:34+02:00
brw: fence SLM writes between workgroups

On LSC platforms the SLM writes are unfenced between workgroups. This
means a workgroup W1 finishing might have uncompleted SLM writes.
Another workgroup W2 dispatched after W1 which gets allocated an
overlapping SLM location might have writes that race with the previous
W1 operations.

The solution to this is fence all write operations (store & atomics)
of a workgroup before ending the threads. We do this by emitting a
single SLM fence either at the end of the shader or if there is only a
single unfenced right, at the end of that block.

Signed-off-by: Lionel Landwerlin <[email protected]>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13924
Reviewed-by: Alyssa Rosenzweig <[email protected]>
(cherry picked from commit fa523aedd0ab96cb4262f3d63e2d8fd75a112efb)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
ee98ce11 by Icenowy Zheng at 2026-04-01T11:45:34+02:00
pvr: fix dirty tracking for stencil ops

The dirty state of stencil ops is not checked when deciding whether to
rebuild the ISP state, although the values are part of the ISP state
(the 27:16 bits of ISPB word).

Add MESA_VK_DYNAMIC_DS_STENCIL_OP to the condition for rebuilding ISP
control registers.

Fixes GLCTS tests when running on top of Zink:
dEQP-GLES2.functional.fragment_ops.stencil.zero_stencil_fail

Fixes: 88f1fad3f768 ("pvr: Use common pipeline & dynamic state frameworks")
Signed-off-by: Icenowy Zheng <[email protected]>
Reviewed-by: Simon Perretta <[email protected]>
(cherry picked from commit ee031d67b48f6ab656b681803a3c663ee6c7cc52)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
5e538b5e by Natalie Vock at 2026-04-01T11:45:34+02:00
vulkan: Bump MAX_ENCODE_PASSES

RADV needs one more encode pass for a bugfix in the next commit.

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

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
a20678b2 by Marek Olšák at 2026-04-01T11:45:34+02:00
radeonsi: fix blits via util_blitter_draw_rectangle

It didn't save states properly. The only correct place to save them is
si_blitter_begin. Unfortunately, we can't skip saving and restoring
those states because we don't know in advance whether the rectangle path
will be used.

Cc: mesa-stable
Reviewed-by: Pierre-Eric
(cherry picked from commit 556ceb1b75ad81fe99fed47c6c07c3dbf531c3a5)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
b084df3e by Marek Olšák at 2026-04-01T11:45:34+02:00
radeonsi: disable streamout queries for u_blitter

Cc: mesa-stable
Reviewed-by: Pierre-Eric
(cherry picked from commit 918e5764f4df0309b1d2eec3e9daaf7f1d97d909)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
2527900b by Georg Lehmann at 2026-04-01T11:45:34+02:00
nir/lower_non_uniform_access: fix fusing loops for same index but different array variable

struct nu_handle is hashed and deduplicated using struct nu_handle_key, which ignored
parent_deref. That means all instructions will use the first parent_deref when rewriting
the sources.

Avoid this by not including the parent deref in the struct, and instead querying it
when needed.

Fixes: 4d09cd7fa59 ("nir/lower_non_uniform_access: Group accesses using the same resource")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15173
Reviewed-by: Konstantin Seurer <[email protected]>
(cherry picked from commit e7077e8f5c7943d0f70a94dd268ea0ca9cf33ec3)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
60df6998 by Faith Ekstrand at 2026-04-01T11:45:34+02:00
pan/bi: v2x16 conversions don't replicate

They swizzle just like anything else.  Technically, we could maybe do a
little better than the generic case for these since they only read 8
bits per 16 bits in the destination but the generic case is correct,
even if it isn't optimal.

Fixes: f7d44a46cd42 ("pan/bi: Optimize replication")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <[email protected]>
Reviewed-by: Christoph Pillmayer <[email protected]>
Reviewed-by: Lorenzo Rossi <[email protected]>
(cherry picked from commit 8dc458225b976833270d0f90752d6afffa385360)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
c7481189 by Faith Ekstrand at 2026-04-01T11:45:34+02:00
pan/buffer: Add the offset to the size for buffer textures

In the attribute model, the size is for the attribute binding and the
offset is an offset into that range.  If we're going to use that to
offset the buffer itself, we need to increase the size accordingly.

Fixes: a21ee564e205 ("pan/bi: Make texel buffers use Attribute Buffers")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <[email protected]>
Reviewed-by: Christoph Pillmayer <[email protected]>
Reviewed-by: Lorenzo Rossi <[email protected]>
(cherry picked from commit ce56f495618cf32612e7aa00339427d0d5643468)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
99129b13 by Adam Simpkins at 2026-04-01T11:45:35+02:00
iris: fix a crash in disable_rb_aux_buffer

I have been running into crashes in this function when using blender.
Some of the entries in ice->state.framebuffer.base.cbufs[0] can
apparently have the texture field be null, which was causing a segfault
in this loop.

In my case, nr_cbufs was 3, and the first two cbufs entries had a null
texture and format set to PIPE_FORMAT_NONE. The last entry had format of
PIPE_FORMAT_R16G16_FLOAT and a non-null texture.

Adding this null check before attempting to dereference the texture
fixes the crash for me and allows blender to work normally.

Fixes: ca96f8517cc ("iris: remove uses of pipe_surface as a pointer")
Reviewed-by: Tapani Pälli <[email protected]>
(cherry picked from commit e16c8cc57910770379ed58510f9ed70bab86c5a4)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
ad17b864 by Rhys Perry at 2026-04-01T11:45:35+02:00
radv: fix memory leak in radv_rt_nir_to_asm

Signed-off-by: Rhys Perry <[email protected]>
Backport-to: 26.0
Reviewed-by: Samuel Pitoiset <[email protected]>
(cherry picked from commit 574f5776577f627832152372114e1e29c2169882)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
b62216f8 by Hyunjun Ko at 2026-04-01T11:45:35+02:00
anv: Add dummy workload for AV1 decode on affected platforms (Wa_1508208842)

Implement software workaround for AVP decoder corruption on Gen12
platforms. These platforms require a warmup workload before
the actual AV1 decode to prevent output corruption.

- Gen12: Tiger Lake, DG1, Rocket Lake, Alder Lake

Signed-off-by: Hyunjun Ko <[email protected]>
Acked-by: Lionel Landwerlin <[email protected]>
(cherry picked from commit 260908cecb3b1362dea27430df9ffa6cd30198db)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
0287336e by Yiwei Zhang at 2026-04-01T11:45:35+02:00
vulkan/wsi/win32: add wsi_win32_find_idle_image helper

Prepare to handle timeout for sw wsi (no DXGI).

Cc: mesa-stable
(cherry picked from commit 8ff24c7db3faf2bf698f49b19829a112bc2bfa2a)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
4feda373 by Yiwei Zhang at 2026-04-01T11:45:35+02:00
vulkan/wsi/win32: respect acquire timeout for sw wsi

When DXGI is not supported, win32 falls back to sw wsi without acquire
timeout ignored.

This change:
1. adds the needed acquire mutex and cond
   - the fail path is intentionally left untouched so that mutex and
     cond are both valid when wsi_win32_swapchain_destroy is called
2. adds wsi_win32_acquire_idle_cpu_image helper to respect timeout
3. adds wsi_win32_set_image_idle helper to properly signal acquire_cond
   for sw wsi case

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/15122
Cc: mesa-stable
(cherry picked from commit af42f0c80fd4e86f2ce65b9c53a7427b6a685c26)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
88cfa8ff by utzcoz at 2026-04-01T11:45:35+02:00
gfxstream: Fix vkSetDebugUtilsObjectNameEXT crash for unwrapped objects

Mesa's vk_common_SetDebugUtilsObjectNameEXT assumes every Vulkan object
handle is a pointer to a vk_object_base struct. In gfxstream, only a
subset of objects (instance, device, queue, command buffer, command pool,
buffer, fence, semaphore) carry a Mesa wrapper. All other non-dispatchable
handles (shader modules, pipelines, render passes, etc.) are opaque host
handles that are not valid pointers.

Passing such an unwrapped handle to the common path causes it to be cast
to a vk_object_base pointer and dereferenced, resulting in a SIGSEGV
(null-pointer dereference at offset 0x40).

Override the function in the gfxstream driver to store debug names on
vk_object_base for wrapped objects and return VK_SUCCESS for unwrapped
objects.

Fixes: 7b50e62179f2 ("gfxstream: mega-change to support guest Linux WSI with gfxstream")
Test: Verified with hellovk (with validation layers) on Android Emulator - no crashes.
(cherry picked from commit bf8862b49f18269ff41d88deab826bc5cea3141a)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
58ab5760 by Eric Guo at 2026-04-01T11:45:35+02:00
panfrost: Fix NULL pointer dereference in panfrost_emit_images

Fix a crash in image descriptor emission caused by stale image_mask bits.

Root cause:
- set_shader_images used a shift expression with count==64 when clearing
  image_mask, which is undefined behavior in C.
- This could leave image_mask inconsistent with actual image bindings,
  so panfrost_emit_images() might dereferences NULL image resources.

Fixes:
- Use 64-bit-safe bit helpers for mask updates to avoid invalid shifts.

Crash observed when running: OpenCL-CTS api/test_api
Backtrace:
  #0 util_image_to_sampler_view (v->resource is NULL)
  #1 panfrost_emit_images
  #2 panfrost_update_shader_state
  #3 panfrost_launch_grid_on_batch
  #4 panfrost_launch_grid

Backport-to: *
Signed-off-by: Eric Guo <[email protected]>
Reviewed-by: Boris Brezillon <[email protected]>
Reviewed-by: Erik Faye-Lund <[email protected]>
(cherry picked from commit c1770565f3aed3bb95b7b55b7bca6d6b613334fd)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
af53a9bf by Mario Kleiner at 2026-04-01T11:45:35+02:00
dri: Fix "cosmetic" undefined behaviour warning for RGB[A]16_UNORM formats.

Ian Romanick reported some "undefined behaviour" warnings during some
not specified tests, relating to introduction of RGB[A}16_UNORM formats
in merge request
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38588

This due to overflowing the 32-bits masks[], and then during assignment
the red/green/blue/alphaMask fields in struct gl_config when using a 16
bpc format. Iow. the red/green/blue/alphaMask would not be usable.

Suppress this warning by setting masks[] to zero for unorm16 formats,
just as was previously done for is_float16, ie. fp16 formats.

16 bpc formats are only exposed for display on non-X11 WSI target
platforms like GBM+DRM, Wayland, surfaceless, and these platforms do
not use the info in red/green/blue/alphaMask at all, so the "undefined
behaviour" is meaningless.

Fixes: f2aaa9ce00ff ("dri,gallium: Add support for RGB[A]16_UNORM display formats.")
Reported-by: Ian Romanick @idr
Signed-off-by: Mario Kleiner <[email protected]>
Reviewed-by: Adam Jackson <[email protected]>
(cherry picked from commit ab94515b0a8d399f9702b7aec1b41aafbdea5edb)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
e06648d8 by Pavel Ondračka at 2026-04-01T11:45:35+02:00
r300: fix bias presubtract algebraic transformation

One fneg too many.

Fixes: 0508db915 ("r300: implement bias presubtract")
(cherry picked from commit e68e519b910c2e1720bb1f8054a8f657f489086d)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
27fec036 by Pavel Ondračka at 2026-04-01T11:45:35+02:00
r300: don't apply odd macroblock rounding to 3D textures

This is intended only for NPOT 2D textures.

Fixes: 0763fb947 ("r300: align macro-tiled stride-addressed textures in X")
(cherry picked from commit 648dfe88f493cceff80f9ecbfb7f7808ef1f76cf)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
8292cf55 by Pavel Ondračka at 2026-04-01T11:45:35+02:00
r300: disable zmask clears for large surfaces

(cherry picked from commit 3fc26278977036b99868c0543ecd712a504cf810)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
2b87cb01 by Pavel Ondračka at 2026-04-01T11:45:35+02:00
r300: add shared HyperZ pipe-count helper

Introduce r300_hyperz_pipe_count and use it in\nr300_setup_hyperz_properties.\n\nRV530 selects pipe topology from NUM_Z_PIPES, while other families use\nNUM_GB_PIPES. Keeping this in one helper avoids duplicated family checks\nand prepares follow-up HiZ clear sizing changes to reuse the same rule.

(cherry picked from commit e97ac38ff3b8bb8bbd10b3e44e3bbaf44b45bbd3)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
dfd0e55b by Pavel Ondračka at 2026-04-01T11:45:35+02:00
r300: split large HiZ clears into multiple packets

R300_PACKET3_3D_CLEAR_HIZ encodes COUNT in 14 bits (COUNT[13:0]), so a
single packet can clear at most 0x3fff dwords.

Large depth surfaces on R5xx can require more HiZ dwords than that.
When we emitted a single packet, COUNT truncated and part of HiZ RAM
remained uncleared, which could show up as HyperZ corruption.

Emit CLEAR_HIZ in chunks of R300_CLEAR_HIZ_COUNT_MAX and reserve enough
atom space for the worst-case packet count derived.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/360
Fixes: 12dcbd59546 ("r300g: enable Hyper-Z by default on r500")
(cherry picked from commit fddc101070b9474140828e924f97edc57abc477e)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
0a927077 by Samuel Pitoiset at 2026-04-01T11:45:35+02:00
radv: emit BOP events after every draw to workaround a VRS bug on GFX12

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/14812
Signed-off-by: Samuel Pitoiset <[email protected]>
(cherry picked from commit bf7e29617d203b91511c5348170fd6486ed4829f)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
ec101645 by Juan A. Suarez Romero at 2026-04-01T11:45:35+02:00
vc4: fix unwanted buffer release on uploader

When converting the index buffer from 4-bytes to 2-bytes, we use the
uploader for the job. Since commit b3133e250e1 we do an uploader alloc
ref, which releases the uploader buffer if there is no enough space,
creating a new one.

The problem happens when we also need this buffer because it is the one
containing the index buffer to convert. This happens, for instance, if
we need to convert the primitives because they are not supported (e.g.,
converting quads to triangles), as this is done
also using the uploader.

The solution is to ensure the uploader's buffer has an extra reference
so when released, it is not destroyed. This can easily achieved by
calling first pipe_buffer_map_range(), which is required to access the
buffer, and it increases the references.

This fixes `spec@!opengl 1.1@longprim`.

Fixes: b3133e250e1 ("gallium: add pipe_context::resource_release to eliminate buffer refcounting")
Reviewed-by: Iago Toral Quiroga <[email protected]>
Signed-off-by: Juan A. Suarez Romero <[email protected]>
(cherry picked from commit 48c086cb4203d1a8e7458e0d0a85cfffc5b4bfe5)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>

- - - - -
97c35648 by Eric Engestrom at 2026-04-01T19:37:49+02:00
docs: add release notes for 26.0.4

- - - - -
d9e5e36b by Eric Engestrom at 2026-04-01T19:37:49+02:00
VERSION: bump for 26.0.4

- - - - -


128 changed files:

- .gitlab-ci.yml
- .gitlab-ci/run-shader-db.sh
- .pick_status.json
- VERSION
- docs/relnotes.rst
- docs/relnotes/26.0.3.rst
- + docs/relnotes/26.0.4.rst
- meson.build
- src/amd/common/ac_gpu_info.c
- src/amd/common/ac_gpu_info.h
- src/amd/compiler/tests/test_assembler.cpp
- src/amd/compiler/tests/test_isel.cpp
- src/amd/vulkan/radv_cmd_buffer.c
- src/amd/vulkan/radv_pipeline_rt.c
- src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c
- src/broadcom/ci/broadcom-rpi3-fails.txt
- src/broadcom/common/v3d_tfu.h
- src/compiler/glsl/ast_to_hir.cpp
- src/compiler/nir/nir.c
- src/compiler/nir/nir.h
- src/compiler/nir/nir_lower_io.c
- src/compiler/nir/nir_lower_non_uniform_access.c
- src/compiler/nir/nir_opt_dead_cf.c
- src/freedreno/ir3/ir3_legalize.c
- src/freedreno/vulkan/tu_knl_drm_virtio.cc
- src/gallium/auxiliary/gallivm/lp_bld_arit.c
- src/gallium/auxiliary/pipe-loader/driinfo_gallium.h
- src/gallium/auxiliary/util/u_blitter.c
- src/gallium/auxiliary/util/u_driconf.c
- src/gallium/auxiliary/util/u_simple_shaders.c
- src/gallium/auxiliary/util/u_simple_shaders.h
- src/gallium/drivers/iris/iris_resolve.c
- src/gallium/drivers/llvmpipe/ci/llvmpipe-fails.txt
- src/gallium/drivers/llvmpipe/lp_state_fs.c
- src/gallium/drivers/llvmpipe/lp_texture.c
- src/gallium/drivers/nouveau/nv50/nv50_surface.c
- src/gallium/drivers/nouveau/nvc0/nvc0_surface.c
- src/gallium/drivers/panfrost/pan_cmdstream.c
- src/gallium/drivers/panfrost/pan_context.c
- src/gallium/drivers/r300/compiler/r300_nir_algebraic.py
- src/gallium/drivers/r300/r300_blit.c
- src/gallium/drivers/r300/r300_context.c
- src/gallium/drivers/r300/r300_emit.c
- src/gallium/drivers/r300/r300_reg.h
- src/gallium/drivers/r300/r300_screen.h
- src/gallium/drivers/r300/r300_texture_desc.c
- src/gallium/drivers/radeonsi/si_blit.c
- src/gallium/drivers/radeonsi/si_pipe.c
- src/gallium/drivers/radeonsi/si_pipe.h
- src/gallium/drivers/radeonsi/si_shader.c
- src/gallium/drivers/radeonsi/si_shader.h
- src/gallium/drivers/radeonsi/si_shader_info.h
- src/gallium/drivers/radeonsi/si_shader_internal.h
- src/gallium/drivers/radeonsi/si_shader_nir.c
- src/gallium/drivers/radeonsi/si_shader_variant_info.c
- src/gallium/drivers/radeonsi/si_state_draw.cpp
- src/gallium/drivers/radeonsi/si_state_shaders.cpp
- src/gallium/drivers/vc4/vc4_resource.c
- src/gallium/drivers/virgl/ci/virgl-gles-fails.txt
- src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c
- src/gallium/drivers/zink/nir_to_spirv/spirv_builder.c
- src/gallium/drivers/zink/nir_to_spirv/spirv_builder.h
- src/gallium/frontends/dri/dri_screen.c
- src/gallium/frontends/va/context.c
- src/gallium/frontends/wgl/stw_device.c
- src/gallium/include/frontend/api.h
- src/gfxstream/guest/vulkan/gfxstream_vk_device.cpp
- src/imagination/ci/bxs-4-64-fails.txt
- src/imagination/pco/pco_map.py
- src/imagination/pco/pco_nir.c
- src/imagination/pco/pco_trans_nir.c
- src/imagination/vulkan/pds/pvr_pds.h
- src/imagination/vulkan/pds/pvr_pipeline_pds.c
- src/imagination/vulkan/pvr_arch_cmd_buffer.c
- src/imagination/vulkan/pvr_arch_device.c
- src/imagination/vulkan/pvr_arch_mrt.c
- src/imagination/vulkan/pvr_arch_pipeline.c
- src/imagination/vulkan/pvr_buffer.h
- src/imagination/vulkan/pvr_device.c
- src/imagination/vulkan/pvr_image.c
- src/imagination/vulkan/pvr_mrt.h
- src/intel/compiler/brw/brw_compile_fs.cpp
- src/intel/compiler/brw/brw_from_nir.cpp
- src/intel/compiler/brw/brw_nir.c
- src/intel/compiler/brw/brw_nir.h
- + src/intel/compiler/brw/brw_nir_fence_shared_stores.c
- src/intel/compiler/brw/brw_opt_algebraic.cpp
- src/intel/compiler/brw/brw_reg.cpp
- src/intel/compiler/brw/brw_reg.h
- src/intel/compiler/brw/meson.build
- src/intel/compiler/brw/test_opt_algebraic.cpp
- src/intel/vulkan/anv_instance.c
- src/intel/vulkan/anv_nir.h
- + src/intel/vulkan/anv_nir_clear_shader_analysis.c
- src/intel/vulkan/anv_private.h
- src/intel/vulkan/anv_shader.c
- src/intel/vulkan/anv_shader_compile.c
- src/intel/vulkan/genX_cmd_compute.c
- src/intel/vulkan/genX_cmd_video.c
- src/intel/vulkan/genX_gfx_state.c
- src/intel/vulkan/meson.build
- src/mesa/main/consts_exts.h
- src/mesa/main/renderbuffer.c
- src/mesa/state_tracker/st_extensions.c
- src/mesa/state_tracker/st_util.h
- src/nouveau/compiler/nak_nir.c
- src/nouveau/compiler/nak_nir_rematerialize_load_const.c
- src/nouveau/vulkan/nvk_cmd_buffer.c
- src/nouveau/vulkan/nvk_cmd_draw.c
- src/nouveau/vulkan/nvk_image.c
- src/panfrost/ci/gitlab-ci.yml
- src/panfrost/compiler/bifrost/bi_lower_swizzle.c
- src/panfrost/genxml/v10.xml
- src/panfrost/genxml/v12.xml
- src/panfrost/genxml/v13.xml
- src/panfrost/lib/pan_desc.c
- src/panfrost/lib/pan_mod.c
- src/panfrost/lib/pan_texture.c
- src/panfrost/vulkan/csf/panvk_vX_gpu_queue.c
- src/panfrost/vulkan/panvk_instance.c
- src/panfrost/vulkan/panvk_instance.h
- src/util/00-mesa-defaults.conf
- src/util/driconf.h
- src/util/os_misc.h
- src/virtio/vulkan/vn_physical_device.c
- src/vulkan/runtime/vk_acceleration_structure.h
- src/vulkan/wsi/wsi_common_headless.c
- src/vulkan/wsi/wsi_common_win32.cpp


The diff was not included because it is too large.


View it on GitLab: https://salsa.debian.org/xorg-team/lib/mesa/-/compare/3f173c02d169ccc38c88fea9d58ce46ee1cf8d55...d9e5e36b1925d0a75f582b06075e374ab93abadc

-- 
View it on GitLab: https://salsa.debian.org/xorg-team/lib/mesa/-/compare/3f173c02d169ccc38c88fea9d58ce46ee1cf8d55...d9e5e36b1925d0a75f582b06075e374ab93abadc
You're receiving this email because of your account on salsa.debian.org.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.