Commit graph

208937 commits

Author SHA1 Message Date
Eric Engestrom
890b484889 docs: add sha sum for 25.2.0
Some checks failed
macOS-CI / macOS-CI (dri) (push) Has been cancelled
macOS-CI / macOS-CI (xlib) (push) Has been cancelled
2025-08-06 19:12:42 +02:00
Eric Engestrom
0b97dcdd94 VERSION: bump for 25.2.0
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
2025-08-06 18:32:17 +02:00
Eric Engestrom
7d0a75ffc4 docs: add release notes for 25.2.0 2025-08-06 18:32:16 +02:00
Alyssa Rosenzweig
ed97f7791a asahi: enable virtgpu support
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
this updates our virtgpu support to match the upstream protocol, and enables. it
is marked for backport since the older Mesa releases already had virtgpu
support, just gated off to allow for breaking wire protocol changes (of which
there was 1 at the last moment).

Upstream virglrenderer MR assigned to marge:
https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/1541

Backport-to: 25.1
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36580>
(cherry picked from commit 20dab5f819)
2025-08-06 13:43:32 +02:00
Hans-Kristian Arntzen
a71f4f494a ac/nir: Avoid 0/0 when computing texel buffer size on Polaris.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13349
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36571>
(cherry picked from commit d7b17d4d9c)
2025-08-06 13:43:32 +02:00
Rhys Perry
203678acb6 aco/ra: set late-kill for operands of temporary p_create_vector
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13543
Fixes: c279dd6e61 ("aco: Support vector-aligned ops fixed to defs")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36469>
(cherry picked from commit 08f088479a)
2025-08-06 13:43:32 +02:00
Yurii Kolesnykov
ab6fbd4f28 Guard call to free_zombie_glx_drawable with condition from its definition
Signed-off-by: Yurii Kolesnykov <root@yurikoles.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13589
Fixes: ad9db6b259 ("glx: Free all populated fields of the glx_display on creation failure")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36495>
(cherry picked from commit f292faebd7)
2025-08-06 13:43:32 +02:00
Christoph Neuhauser
b412e0c0bd egl: Fix DRI utility function compilation on macOS
Signed-off-by: Christoph Neuhauser <christoph.neuhauser@intel.com>
Tested-by: Yurii Kolesnykov <root@yurikoles.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13556
Fixes: e99446fc5e ("egl: Add EGL_EXT_device_query_name and EGL_EXT_device_persistent_id")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36495>
(cherry picked from commit acbb2d018c)
2025-08-06 13:43:32 +02:00
Yurii Kolesnykov
d7c77d1578 Guard double include of libdrm.h by defining LIBDRM_H
Signed-off-by: Yurii Kolesnykov <root@yurikoles.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Fixes: 4be68b119e ("loader: Don't load nouveau GL on nvidia kmd")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36495>
(cherry picked from commit bdb9b50dc4)
2025-08-06 13:43:32 +02:00
Kenneth Graunke
7746e49314 brw: Update copy propagation into EOT sends handling for Xe2 units
We're counting in REG_SIZE units here, but g112-127 is twice as large on
Xe2.  Check against 15 * reg_unit() to avoid missing out on propagation.

fossil-db results on Arc B580:

   Totals:
   Instrs: 233779396 -> 233779098 (-0.00%)
   Cycle count: 32601212742 -> 32601187382 (-0.00%); split: -0.00%, +0.00%
   Max live registers: 72695253 -> 72694326 (-0.00%); split: -0.00%, +0.00%

   Totals from 232 (0.03% of 789301) affected shaders:
   Instrs: 41071 -> 40773 (-0.73%)
   Cycle count: 1756714 -> 1731354 (-1.44%); split: -2.01%, +0.57%
   Max live registers: 22092 -> 21165 (-4.20%); split: -4.48%, +0.28%

Fixes: ec2e8bc33f ("intel/compiler: Avoid copy propagating large registers into EOT messages")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36577>
(cherry picked from commit c12497f943)
2025-08-06 13:43:32 +02:00
Kenneth Graunke
eb68bb000f brw: Fix units in copy propagation EOT restriction size calculation
size_read() counts in bytes.  s.alloc.sizes[] counts in REG_SIZE units.

(Affects 4 raytracing shaders in Cyberpunk 2077.)

Fixes: ec2e8bc33f ("intel/compiler: Avoid copy propagating large registers into EOT messages")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36577>
(cherry picked from commit 946f768359)
2025-08-06 13:43:32 +02:00
Kenneth Graunke
c798c8db54 brw: Refactor copy propagation checks for EOT send restrictions
These are identical, pull them into a helper so we only have one place
to fix bugs.

(Marked fixes because the next two patches depend on the refactor.)

Fixes: ec2e8bc33f ("intel/compiler: Avoid copy propagating large registers into EOT messages")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36577>
(cherry picked from commit 4151a39b8a)
2025-08-06 13:43:32 +02:00
Dave Airlie
6d042b7bce spirv: move cmat store barrier after the store.
Fixes: b98f87612b ("spirv: Implement SPV_KHR_cooperative_matrix")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36583>
(cherry picked from commit b1242e6b30)
2025-08-06 13:43:32 +02:00
Mike Blumenkrantz
35f031db4b tc: don't clobber CSO info when renderpass has ended
if a renderpass has ended, the info is signaled and cannot be modified
for anything but resolves and invalidates. when a CSO is then bound
before the next fb state change, there is no way to increment rp info in
a way which keeps it in lockstep with the consumer thread, so storing the
new states until a new rp info is incremented ensures that everything works
as expected

Fixes: 4989a40e89 ("tc: explicitly terminate renderpasses on fb access")

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36576>
(cherry picked from commit 84fb88e5e7)
2025-08-06 13:43:32 +02:00
Mike Blumenkrantz
134561cc92 zink: fix assert for unsynchronized non-GENERAL image barriers
if this is already unsync then everything is fine

Fixes: 213874d42b ("zink: use unsynchronized cmdbuf for unsynchronized image GENERAL barriers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36576>
(cherry picked from commit c50ac33cd2)
2025-08-06 13:43:32 +02:00
Job Noorman
2f7fdcef1f nir/opt_uniform_subgroup: use ballot_bit_count
Using bit_count on the result of ballot doesn't work for targets where
ballot's num_components > 1.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Fixes: d2e1e4442a ("ir3: enable nir_opt_uniform_subgroup")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35669>
(cherry picked from commit ae66bd1c00)
2025-08-06 13:43:32 +02:00
Emma Anholt
6fd47bc7a8 i915: Avoid calling drm_intel_get_aperture_sizes().
It brings up and tears down libpci in order to return value we don't use,
which is a problem if anything else in the stack is using libpci.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13413
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36424>
(cherry picked from commit 52cdbd78ec)
2025-08-06 13:43:32 +02:00
Samuel Pitoiset
2f5e8312b9 vulkan: fix missing presentId2/presentWait2 enable features
Fixes recent VKCTS changes for dEQP-VK.info.device_mandatory_features.

Fixes: 07881b085e ("vulkan: Enable PresentWait2 on many physical devices")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36547>
(cherry picked from commit 07fe297a3e)
2025-08-06 13:43:32 +02:00
Samuel Pitoiset
6c1721fdee radv: fix fbfetch output with compresed FMASK on <= GFX9
GFX9 might not have DCC but compressed FMASK. In this case, it needs
to be decompressed to handle feedback loops.

Fixes new VKCTS coverage dEQP-VK.dynamic_rendering.*_ms.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36550>
(cherry picked from commit 72cf81df54)
2025-08-06 13:43:31 +02:00
Antonio Ospite
23d8c8c530 libcl: avoid calling UNREACHABLE(str) macro without arguments
In commit 9ced3148ca ("util: avoid calling UNREACHABLE(str) macro
without arguments", 2025-07-30) the argument type check in the
UNREACHABLE(str) macro in src/util/macros.h was improved to also avoid
calling it without arguments, but the definition in
src/compiler/libcl/libcl.h was not updated.

Apply a similar change to src/compiler/libcl/libcl.h to keep the C and
CL macros in sync.

Fixes: 9ced3148ca ("util: avoid calling UNREACHABLE(str) macro without arguments", 2025-07-30)

Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de> on gfx8 (Polaris 20)
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36508>
(cherry picked from commit 5649a0aa06)
2025-08-06 13:43:31 +02:00
Faith Ekstrand
7497828933 nvk: Blackwell is now Vulkan 1.4 conformant
https://www.khronos.org/conformance/adopters/conformant-products#submission_935

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12961
Backport-to: 25.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36183>
(cherry picked from commit 91a3cf4f58)
2025-08-06 13:43:31 +02:00
Patrick Lerda
fb37632abe r600: fix arb_shader_image_load_store incomplete
This change ensures a deterministic state compatible with
the expected ARB_shader_image_load_store behavior when an
incomplete shader image is detected.

Note: "spec/arb_shader_image_load_store/invalid/.*/address bounds test/.*"
are not addressed by this change.

This change was tested on cypress, palm, barts and cayman and
fixes the remaining issues concerning the following tests:
khr-gl4[2-6]/shader_image_load_store/incomplete_textures: fail pass
spec/arb_shader_image_load_store/invalid/.*/format mismatch test: fail pass
spec/arb_shader_image_load_store/invalid/.*/incompatible format test: fail pass
spec/arb_shader_image_load_store/invalid/.*/incomplete image test: fail pass
spec/arb_shader_image_load_store/invalid/.*/index bounds test: fail pass
spec/arb_shader_image_load_store/invalid/.*/invalid format test: fail pass
spec/arb_shader_image_load_store/invalid/.*/layer bounds test: fail pass
spec/arb_shader_image_load_store/invalid/.*/level bounds test: fail pass
spec/arb_shader_image_load_store/invalid/.*/target mismatch test: fail pass
spec/arb_shader_image_load_store/invalid/.*/unbound image test: fail pass

Cc: mesa-stable
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35685>
(cherry picked from commit d2be9f95e5)
2025-08-06 13:43:31 +02:00
Patrick Lerda
d33d0efb42 r600: fix remaining pbo issues
This functionality is working properly on rv770, but some
issues remain for the newer r600 gpus. These issues are not the
same for cypress and for palm and beyond.

As far as palm and beyond is concerned this change is consistent
with the radeonsi commit: 50c95d0c54 "radeonsi: reject some
3-component formats as buffer textures". This is explained
in a comment of this other commit.

This change assumes that all the real evergreen gpus (before
palm) behave like cypress.

This change was tested on palm, barts and cayman. Here are the tests fixed:
deqp-gles3/functional/texture/specification/teximage2d_pbo/rgb16f_cube: fail pass
deqp-gles3/functional/texture/specification/teximage2d_pbo/rgb16i_cube: fail pass
deqp-gles3/functional/texture/specification/teximage2d_pbo/rgb16ui_cube: fail pass
deqp-gles31/functional/texture/specification/teximage3d_pbo/rgb16f_cube_array: fail pass
deqp-gles31/functional/texture/specification/teximage3d_pbo/rgb16i_cube_array: fail pass
deqp-gles31/functional/texture/specification/teximage3d_pbo/rgb16ui_cube_array: fail pass

This change was also tested on cypress. Here are the tests fixed:
deqp-gles3/functional/texture/specification/teximage[23]d_pbo/rgb565_2d: fail pass
deqp-gles3/functional/texture/specification/teximage[23]d_pbo/rgb565_cube: fail pass
deqp-gles3/functional/texture/specification/teximage[23]d_pbo/rgb5_a1_2d: fail pass
deqp-gles3/functional/texture/specification/teximage[23]d_pbo/rgb5_a1_cube: fail pass
deqp-gles3/functional/texture/specification/teximage[23]d_pbo/rgba4_2d: fail pass
deqp-gles3/functional/texture/specification/teximage[23]d_pbo/rgba4_cube: fail pass
deqp-gles3/functional/texture/specification/texsubimage[23]d_pbo/rgb565_2d: fail pass
deqp-gles3/functional/texture/specification/texsubimage[23]d_pbo/rgb565_cube: fail pass
deqp-gles3/functional/texture/specification/texsubimage[23]d_pbo/rgb5_a1_2d: fail pass
deqp-gles3/functional/texture/specification/texsubimage[23]d_pbo/rgb5_a1_cube: fail pass
deqp-gles3/functional/texture/specification/texsubimage[23]d_pbo/rgba4_2d: fail pass
deqp-gles3/functional/texture/specification/texsubimage[23]d_pbo/rgba4_cube: fail pass
deqp-gles31/functional/texture/specification/teximage3d_pbo/rgb565_cube_array: fail pass
deqp-gles31/functional/texture/specification/teximage3d_pbo/rgb5_a1_cube_array: fail pass
deqp-gles31/functional/texture/specification/teximage3d_pbo/rgba4_cube_array: fail pass
deqp-gles31/functional/texture/specification/texsubimage3d_pbo/rgb565_cube_array: fail pass
deqp-gles31/functional/texture/specification/texsubimage3d_pbo/rgb5_a1_cube_array: fail pass
deqp-gles31/functional/texture/specification/texsubimage3d_pbo/rgba4_cube_array: fail pass

Cc: mesa-stable
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35430>
(cherry picked from commit f352491834)
2025-08-06 13:43:31 +02:00
Patrick Lerda
8963e632e1 r600: refactor r600_is_buffer_format_supported() for the next update
The variable "i" is updated to the type returned by
util_format_get_first_non_void_channel() which is int.

The function is refactored to handle "for_vbo" as false.

Cc: mesa-stable
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35430>
(cherry picked from commit bf76e5bb38)
2025-08-06 13:43:31 +02:00
Christian Gmeiner
27b45acbcd etnaviv: rs: Clear only requested color buffers
Fixes: 1ad37d42be ("etnaviv: rs: Extend to support MRTs")

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36530>
(cherry picked from commit b4791424b3)
2025-08-06 13:43:31 +02:00
Christian Gmeiner
804dd3bffe etnaviv: blt: Clear only requested color buffers
Fixes: d3a5306b91 ("etnaviv: blt: Extend to support MRTs")

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36530>
(cherry picked from commit c3aab93340)
2025-08-06 13:43:31 +02:00
Mary Guillemard
8ab4ef903f panvk: track oq write jobs in JM
Tracking for those jobs were missing and not reset when the batch was reissued.

Fixes: d1934e44fc ("panvk: Implement occlusion queries for JM")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35724>
(cherry picked from commit ab0f0323e0)
2025-08-06 13:43:31 +02:00
Mary Guillemard
67786d49ca panvk: Always use varying_count in emit_varying_attrs
We could end up in situations where the active count wouldn't match the
varying_count causing a memory corruption.

This fix it by not relying on the active count anymore.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 05020699b9 ("panvk: Move the linking bits to panvk_shader")
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35724>
(cherry picked from commit a1a98d1dc5)
2025-08-06 13:43:31 +02:00
Mike Blumenkrantz
a86dee372d tc: also inline depth resolves
this catches the case where an app resolves both color and depth buffers

previously the inlining would only catch the first color buffer, then the depth
resolve which followed would cause the whole of rp tracking to desync and
explode, as seen in Transport Fever 2

Fixes: 8933b3ed39 ("tc: add resolve resource to rp info")

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36521>
(cherry picked from commit a71b6ac41a)
2025-08-06 13:43:31 +02:00
Mike Blumenkrantz
9ff5d54a7d zink: zero dynamic rendering resolve views on rp end
this can otherwise leave stale pointers and trigger broken behavior

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36521>
(cherry picked from commit 71c4f13660)
2025-08-06 13:43:31 +02:00
LingMan
99d222e41c docs/rusticl: Update documented version requirements for meson and bindgen
The requirements bump a few weeks ago forgot to update the docs.

Fixes: 1a698c75ae ("build: Rust: Bump minimum Meson and bindgen version")
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36526>
(cherry picked from commit eda7043025)
2025-08-06 13:43:31 +02:00
Iván Briano
9436a96c10 intel: Re-disable ray tracing on 32 bits
We had this disabled before moving to the common framework for BVH
building and lost it along the way.

Fixes: f0e18c475b ("intel: remove GRL/intel-clc")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36522>
(cherry picked from commit bf8ebb6a7d)
2025-08-06 13:43:31 +02:00
Job Noorman
3fb8f1066f ir3/legalize: prevent infinite loop when inserting (ss)nop
We need to insert a (ss)nop when an instruction that doesn't support
(ss) needs it. However, when this happens in a block that needs to be
legalized more than once (e.g., because it is in a loop), the (ss)nop
would be inserted every iteration, causing an infinite loop.

Fix this by checking if the previous instructions is a nop and applying
(ss) there.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 5993723471 ("freedreno/a3xx/compiler: scheduling/legalize fixes")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36440>
(cherry picked from commit c8f9990733)
2025-08-06 13:43:31 +02:00
Erico Nunes
7995ec9c46 lima: ppir: fix store_output optimization for modifiers
If the mov node being handled here has modifiers, it cannot be
trivially removed. This happens in some shaders, so handle it
in the identity mov check for that optimization.

Fixes: d6987daef9 ("lima: ppir: introduce an optimizer")

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36490>
(cherry picked from commit 3020d27326)
2025-08-06 13:43:31 +02:00
Karol Herbst
ccfab45fe2 nv50: fully migrate away from util_framebuffer_init
somehow missed those.. oops.

Fixes: facb048cdb ("nouveau: move util_framebuffer_init into the driver")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36500>
(cherry picked from commit cbb2881716)
2025-08-06 13:43:31 +02:00
Caio Oliveira
04352acc96 brw: Remove extra iteration on instructions from brw_opt_address_reg_load
The helper function already iterate instructions.

Fixes: 8ac7802ac8 ("brw: move final send lowering up into the IR")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36478>
(cherry picked from commit f222b16f92)
2025-08-06 13:43:30 +02:00
Eric R. Smith
2a7afb5024 panvk: use minimum attachment size for frame buffer size
We were using the maximum of all attachment sizes as the bounding box
for the frame buffer. But in fact we want the minimum, as we do not
want to draw outside of any attachment boundaries.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36360>
(cherry picked from commit 904a4ab364)
2025-08-06 13:43:30 +02:00
Juston Li
5786396a77 anv: fix uninitialized mutex lock in anv_slab_bo_deinit()
anv_slab_bo_deinit() eventually calls down to anv_device_release_bo()
which locks a yet to be initilized device->bo_cache->mutex leading to:

signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
Abort message: 'FORTIFY: pthread_mutex_lock called on a destroyed mutex (0x79c25ee54bd8)'

Reorder anv_slab_bo_init() to occur after anv_bo_cache_init() and
anv_slab_bo_deinit() before anv_bo_cache_finish()

Fixes: 3bf6d42fda ("anv: Add the base infrastructure to support memory pool")
Signed-off-by: Juston Li <justonli@google.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36479>
(cherry picked from commit c8ea72093b)
2025-08-06 13:43:30 +02:00
Antonio Ospite
a4a07c695b util: avoid calling UNREACHABLE(str) macro without arguments
After commit 2dcd6bed6a ("util: enforce unreachable()'s argument being
a literal string", 2023-04-17) the compiler effectively emit errors when
an argument that is not a string literal is passed to UNREACHABLE(str),
however the compiler still allows the macro to be called without
arguments, which can be confusing.

Implement the type check outside of the assert() call so that we have
two types of errors:

1. The compiler will error out when the argument passed to the macro is
   not a string literal because the concatenation with an empty string
   will not be allowed.

2. The compiler will error out when no arguments are passed to the macro
   because the invocation of assert() will be invalid.

This also has the nice side-effect of removing the extra empty string
printed in the assert() messages; after the changes the messages will
look like:

  Assertion `!"Invalid type"' failed.

instead of:

  Assertion `!"" "Invalid type"' failed.

Fixes: 2dcd6bed6a ("util: enforce unreachable()'s argument being a literal string", 2023-04-17)

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36437>
(cherry picked from commit 9ced3148ca)
2025-08-06 13:43:30 +02:00
Antonio Ospite
90cf9327ce build: stop calling unreachable() without arguments
The unreachable(str) macro defined in src/util/macros.h is defined to
accept a literal string as an argument.

However the way it checks that the argument is a string literal, by
prepending an empty string where the argument is used, i.e.:

  #define unreachabel(str) assert(!"" str)

still allows users to call the macro with no arguments.

This is confusing, so pass an empty string to all invocations of
unreachable() for consistency.

This is done with the following command:

  git grep -l '[^_]unreachable();' -- "src/**" | sort | uniq | \
  while read file; \
  do \
    sed -e 's/\([^_]\)unreachable();/\1unreachable("");/g' -i "$file";
  done

This should not change the behaviour of the callers of unreachable() in
a meaningful way, but there will be some cosmetic consequence.

The changed invocations will now print:

  Assertion `!"" ""' failed.

instead of

  Assertion `!""' failed.

But this is also what happens for the invocations that do pass an
argument, for instance `unreachable("Invalid type")` currently prints:

  Assertion `!"" "Invalid type"' failed.

So all invocations now also have the same output style.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36437>
(cherry picked from commit b4c7d3a08e)
2025-08-06 13:43:30 +02:00
David Rosca
bb918ab253 vulkan/video: Fix h265 level values
From spec:
"general_level_idc shall be set equal to a value of 30 times the level number."

Fixes: 8243145f02 ("vulkan/video: add a h265 level translator.")
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36285>
(cherry picked from commit 2c3bb204a5)
2025-08-06 13:43:30 +02:00
Rhys Perry
4c9b91047b nir/load_store_vectorize: set is_store for shared append/consume
So that check_for_aliasing() doesn't ignore them.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Backport-to: 25.1
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36442>
(cherry picked from commit d3476650f1)
2025-08-06 13:43:30 +02:00
Rhys Perry
f9295bb5ec nir/load_store_vectorize: check for interfering shared2 before vectorizing
Only affected shaders in radv_fossils are f1_23.

fossil-db (navi21):
Totals from 3 (0.00% of 79825) affected shaders:
Instrs: 2700 -> 2730 (+1.11%)
CodeSize: 17096 -> 17228 (+0.77%)
Latency: 8424 -> 8726 (+3.58%)
InvThroughput: 3768 -> 3778 (+0.27%); split: -0.05%, +0.32%
Copies: 224 -> 234 (+4.46%)
PreVGPRs: 291 -> 287 (-1.37%)
VALU: 1989 -> 1996 (+0.35%); split: -0.05%, +0.40%

fossil-db (gfx1201):
Totals from 3 (0.00% of 79839) affected shaders:
Instrs: 2862 -> 2908 (+1.61%)
CodeSize: 17868 -> 18064 (+1.10%)
Latency: 7567 -> 7854 (+3.79%)
InvThroughput: 2810 -> 2802 (-0.28%)
Copies: 122 -> 120 (-1.64%)
PreVGPRs: 291 -> 287 (-1.37%)
VALU: 1890 -> 1885 (-0.26%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13616
Backport-to: 25.1
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36442>
(cherry picked from commit eeddf6b9e2)
2025-08-06 13:43:30 +02:00
Lionel Landwerlin
7247c50d44 anv: fix wsi image aliasing
The private BO can get removed due to WSI aliasing and that breaks the
submission code (expecting one).

Delay the registration on the device to when the image actually gets
bound and there is a private BO.

Fixes: b21e62b71a ("anv: avoid leaking private binding for aliased wsi image")
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36474>
(cherry picked from commit 9efb3ee511)
2025-08-06 13:43:30 +02:00
Eric Engestrom
1b545768a4 meson: fix VkLayer_MESA_device_select in the devenv
It's an implicit layer, not an explicit one like the others in that MR,
which I missed in the previous commit.

Fixes: 294d8ce80a ("meson: include VkLayer_MESA_device_select in the devenv")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36346>
(cherry picked from commit 45789ac396)
2025-08-06 13:43:30 +02:00
Mike Blumenkrantz
3ae34d3af5 zink: trigger multi-context buffer invalidate on internal buffer invalidate
this is the same as zink_context_replace_buffer_storage()

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36473>
(cherry picked from commit dedfb5ef78)
2025-08-06 13:43:30 +02:00
Mike Blumenkrantz
9bc3494a83 zink: fix tc buffer replacement rebind condition
this check is to detect multi-context rebinds, not to determine whether
all rebinds on the same context were successful

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36473>
(cherry picked from commit f1ba8f44d9)
2025-08-06 13:43:30 +02:00
Mike Blumenkrantz
0065fd2079 zink: also add access stage sync when rebinding buffers
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36473>
(cherry picked from commit 1c5e5aa4eb)
2025-08-06 13:43:30 +02:00
Thomas H.P. Andersen
8792dae1ef zink: do not overwrite existing error for miptail on uncommit
a7f86e38ca added the call to
sparse_backing_free. It reuses the ok variable and overwrites the
existing value

Fixes: a7f86e38ca
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36467>
(cherry picked from commit b08a23550f)
2025-08-06 13:43:30 +02:00
Eric Engestrom
7450850052 .pick_status.json: Update to 20dab5f819 2025-08-06 13:43:30 +02:00