Commit graph

214038 commits

Author SHA1 Message Date
Vinson Lee
283cb22720 util/u_printf: Fix const correctness in util_printf_next_spec_pos
Fix compiler error:

../src/util/u_printf.c:75:13: error: initializing 'char *' with an
expression of type 'const char *' discards qualifiers
[-Werror,-Wincompatible-pointer-types-discards-qualifiers]
   75 |       char *spec_pos = strpbrk(str_found, "cdieEfFgGaAosuxXp%");
      |             ^          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

glibc now provides C23-style type-generic string functions. strpbrk
returns const char * when passed a const char * argument. Update
spec_pos declaration to match.

Fixes: 6d263ff5a3 ("util: Convert util/u_printf.cpp to util/u_printf.c")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
(cherry picked from commit c576d64801)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39117>
2025-12-28 18:58:25 -08:00
Vinson Lee
b8f5e721f0 bin/symbols-check: Fix undefined symbol detection on macOS
Commit e626636e90 ("bin/symbols-check: fix fields length condition
before accessing fields") changed the condition from `or` to `and`
to prevent potential IndexError when accessing fields[1].

However, this broke macOS because `nm -gP` outputs different field
counts for undefined symbols:
- Linux:  `_symbol U`           (2 fields)
- macOS:  `_symbol U 0 0`       (4 fields)

The condition `len(fields) == 2 and fields[1] == 'U'` only matched
the Linux format, causing undefined symbols like
_mesa_glapi_tls_Dispatch to be incorrectly reported as
"unknown symbol exported" on macOS.

Fix by using `len(fields) >= 2` to handle both platforms while still
guarding against IndexError.

Fixes: e626636e90 ("bin/symbols-check: fix fields length condition before accessing fields")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13451
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
(cherry picked from commit 191e4b8fe0)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39117>
2025-12-28 18:58:23 -08:00
Dylan Baker
a2290167f1 .pick_status.json: Update to ea4dedde8f
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39117>
2025-12-28 18:58:19 -08:00
Ahmed Hesham
5e24e96a0f panfrost: fix get_image_width for 1D buffer images
Image size queries for buffer images were incorrectly using the
underlying buffer's width instead of the image view's size.

This affected `get_image_width` in OpenCL C for 1Dbuffer images, in
cases where the buffer is larger than the image to account for
padding, breaking the conformance test `test_kernel_image_methods
1Dbuffer`.

Fixes: 0efe7a6eb9 ("panfrost: implement image_size sysval")

Signed-off-by: Ahmed Hesham <ahmed.hesham@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
(cherry picked from commit 95ed8d6638)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39117>
2025-12-19 08:05:07 -08:00
Mel Henning
309184075d nvk: Set maxStorageBufferRange = maxBufferSize
We were previously reporting a larger maxStorageBufferRange than our
maxBufferSize, which is weird. Lower maxStorageBufferRange to match
maxBufferSize.

Fixes crucible stress.limits.buffer-update.range.storage.q0

Fixes: 65f12fde44 ("nvk: Improve address space and buffer size limits")
Reviewed-by: Mary Guillemard <mary@mary.zone>
(cherry picked from commit c9ae59dec5)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39117>
2025-12-19 08:05:06 -08:00
Ian Romanick
a09a9f0234 brw/cmod: Don't propagate between instructions in different groups
The group implicity selects which flags the instruction can write. This
was discovered while working on another set of changes that could change
some logical operations into predicated MOV instructions.

Prevents regressions later in the series in
dEQP-VK.graphicsfuzz.cov-loop-fragcoord-identical-condition.

No shader-db or fossil-db changes on any Intel platform.

v2: Update the comment in the test case. Suggested by Caio.

Fixes: 95ac3b1dae ("i965/fs: don't propagate cmod when the exec sizes differ")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
(cherry picked from commit ba30794847)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39117>
2025-12-19 08:05:05 -08:00
hwandy
523662d93e anv: fix a memory leak in slab allocator.
An example when the memory leak happens: requested_size = 4 and alignment = 65536 in anv_slab_bo_alloc:

The alloc_size = 65536 and requested = 4 in this case.

The group to allocate the entry is the group of size 65536 based on the entry size,
while the group to reclaim the entry is the group of size 4 due to the bo->size is
registered as the requested_size=4 and used in anv_slab_bo_free.

That means, the entry is allocated in group[order of size 65535]->free,
moved from group[order of size 65535]->free to the user, and then moved
to group[order of size 4]->reclaim, so the entries is accumulated in
group[order of size 4]->reclaim and group[order of size 65535] keeps
allocating new entries and leading to OOM.

The solution is to use `bo->actual_size` to get the group in pb_slab_bo_free using the allocation size.

Fixes: dabb012423 ("anv: Implement anv_slab_bo and enable memory pool")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14396
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: hwandy <hwandy@google.com>
(cherry picked from commit ffbe6470a2)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39117>
2025-12-19 08:05:05 -08:00
Dylan Baker
2c14b0982e .pick_status.json: Update to 821baac5c3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39117>
2025-12-19 08:05:02 -08:00
Pierre-Eric Pelloux-Prayer
846a318998 ac/descriptors: account for num_storage_samples for gfx10
This fixes a page fault when nr_samples=4 but nr_storage_samples=2.
Based on si_is_format_supported this is only supported for color
formats and when has_eqaa_surface_allocator is true (< GFX11).

The referenced commit below didn't introduce the issue but it
exposed it by forcing the gfx blit path to be used.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13255
Fixes: 3424e16ece ("radeonsi: add decision code to select when to use CB_RESOLVE for performance")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 645fff5dae)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39117>
2025-12-18 08:41:57 -08:00
Boris Brezillon
ae1744310e panvk: Fix set_compute_sysval()
BITSET_SET_RANGE() was passed sysval_fau_start() instead of
sysval_fau_end() as a 3rd argument.

Fixes: ae76a6a045 ("panvk: Pack push constants")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14489
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
(cherry picked from commit d7d690b47f)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39117>
2025-12-18 08:41:55 -08:00
Lucas Stach
3e5c3d0dcd etnaviv: blt: fix tile count calculation for in-place resolve
A in-place resolve via the BLT engine is only supposed to fill the
tiles of a single layer of a resource, so the size to calculate the
number of tiles is the layer stride, same as done for the in-place
resolve via the RS engine in
8df11f3fad ("etnaviv: fix in-place resolve tile count.")

CC: mesa-stable
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
(cherry picked from commit 075eefc422)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39117>
2025-12-18 08:41:54 -08:00
Dylan Baker
49ced45772 .pick_status.json: Update to 645fff5dae
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39117>
2025-12-18 08:41:51 -08:00
Tapani Pälli
5ac2605b9d anv/drirc: disable Xe2 CCS drm modifiers for GTK engine
Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit 2418c91537)

Conflicts:
	src/util/driconf.h

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39117>
2025-12-17 14:12:40 -08:00
Lucas Fryzek
cb97aa57e7 Revert "drisw: Copy entire buffer ignoring damage regions"
This reverts commit 755e795e4c.

Cc: mesa-stable
(cherry picked from commit 48799005d7)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39117>
2025-12-17 14:09:50 -08:00
Lucas Fryzek
46155b0576 drisw: Modify drisw_swap_buffers_with_damage to swap entire buffer
When swapping buffer with damage regions, to be strictly correct we
need to swap the entire back buffer to the front buffer. This needs to
be done in case the compositor does not support damage regions. This
means we need to ignore the input damage region and tell drisw to swap
the entire buffer.

Cc: mesa-stable
(cherry picked from commit 17ab0f2ece)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39117>
2025-12-17 14:09:49 -08:00
Dylan Baker
8b3ddaed0b .pick_status.json: Update to c00ebca5c4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39117>
2025-12-17 14:09:46 -08:00
Dylan Baker
34e3101936 docs: Add checksums for 25.3.2
Some checks failed
macOS-CI / macOS-CI (dri) (push) Has been cancelled
macOS-CI / macOS-CI (xlib) (push) Has been cancelled
2025-12-17 14:06:34 -08:00
Dylan Baker
3848a08053 VERSION: bump for 25.3.2
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
2025-12-17 13:00:46 -08:00
Dylan Baker
ca4575c936 docs: add release notes for 25.3.2 2025-12-17 13:00:37 -08:00
Dylan Baker
391b31ce88 .pick_status.json: Mark bbc8ce2704 as backported
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39003>
2025-12-17 11:44:08 -08:00
Dylan Baker
4591eeb383 .pick_status.json: Mark 6dff50c8bc as backported
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39003>
2025-12-17 11:44:08 -08:00
Dylan Baker
5e2a06dcc1 .pick_status.json: Update to dfdaee5ca7
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39003>
2025-12-17 11:44:05 -08:00
Boris Brezillon
0bf0f4d3de pan/cs: Don't leak builder resources
cs_finish() is doing two things:

1. wrapping up the CS to prepare for its execution
2. freeing the temporary instrs array and maybe_ctx allocations

Mixing those two things lead to confusion and leaks, so let's split
those into cs_end() and cs_builder_fini(), and make sure panvk/panfrost
call both when appropriate.

Fixes: 50d2396b7e ("pan/cs: add helpers to emit contiguous csf code blocks")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39003>
2025-12-17 16:57:41 +01:00
Lionel Landwerlin
6bc126b86d anv: fix dynamic buffers & independent sets
In 0ca870c6f3 I forgot to fill the bind_map::dynamic_descriptors
array... Duh!

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 0ca870c6f3 ("anv: fix broken ray tracing dynamic descriptors")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
(cherry picked from commit 6dff50c8bc)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39003>
2025-12-16 12:20:33 -08:00
Lionel Landwerlin
f48d731953 anv: move load_num_workgroups tracking to driver
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
(cherry picked from commit 578d2f0daa)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39003>
2025-12-16 12:20:32 -08:00
Lionel Landwerlin
deaf382293 anv: reintroduce non independent sets dynamic descriptor optimization
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
(cherry picked from commit 36ba2672ca)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39003>
2025-12-16 12:20:32 -08:00
Lionel Landwerlin
bf02a31dd4 vulkan/runtime: add an internal flag for independent sets
Shader objects are by definition I think independents.

But implementation like Anv would like to optimize dynamic descriptors
if possible. It's possible if the sets are not independent.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
(cherry picked from commit 104206fb0f)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39003>
2025-12-16 12:20:32 -08:00
Caio Oliveira
837aa643cf nir/gcm: Consider dead code elimination done by GCM as progress
This will also fix NIR_DEBUG=extended_validation complaining about
invalid loop analysis.  GCM will invalidate loop analysis if progress
was made, and depending on the removed instruction it will affect the
instr_cost.

Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit a4e84c9244)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39003>
2025-12-16 09:51:58 -08:00
Erik Faye-Lund
7e327e5e31 panfrost: do not over-estimate memory needed for dummy-rt
This matches better what we do in pan_emit_fbd, where we don't increase
the cbuf_offset variable for unused render-targets. This way we simply
make sure we *at least* can fit a dummy-RT (as per the HW spec), but
since we don't write to it we also don't need to give it dedicated
memory beyond that.

This also seemingly fixes a subtle bug where we don't deal with PLS if
there's no active render-targets.

Fixes: 9ec6197a0b ("panfrost: allocate tile-buffer for dummy render-targets")
Fixes: c15a43cce0 ("pan/lib: prepare for pixel local storage support")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
(cherry picked from commit 762fe6e9dc)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39003>
2025-12-16 09:51:57 -08:00
Boris Brezillon
8f15e54119 panvk: Free the decode context in the create_device() error path
If we don't do that and something fails in the middle, we leak
the decode context.

Fixes: d155d6b7a3 ("panvk: Add a decode context at the panvk_device level")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
(cherry picked from commit 55481b6f10)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39003>
2025-12-16 09:51:56 -08:00
Boris Brezillon
33f50d918f panvk: Don't leak shader binaries when loaded from the cache
own_bin needs to be set to true if we want the bin_ptr to be freed.

Fixes: 3d2cc01f8a ("panvk: Add create_shader_from_binary")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
(cherry picked from commit d9fa4d5cbb)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39003>
2025-12-16 09:49:58 -08:00
Boris Brezillon
44c67805d1 pan/bi: Fix leak in bi_iterator_schedule()
s/util_dynarray_clear/util_dynarray_fini/ to fix the leak.

Fixes: 7dc4f28507 ("pan/bi: schedule simple iterators to avoid extra move")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
(cherry picked from commit b66861a5f0)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39003>
2025-12-16 09:49:57 -08:00
Boris Brezillon
58226fb70c panvk: Fix a memory leak in the descriptor set logic
The desc_heap field is unconditionally initialized, so we need to
call util_vma_heap_finish() on it.

Fixes: ec02137c86 ("panvk: Support DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
(cherry picked from commit 29d173060e)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39003>
2025-12-16 09:49:57 -08:00
Kenneth Graunke
4a15deeda6 nir: Fix mod analysis of ishl to shift the recursive result
When considering ((x << y) % divisor), we recursed to calculate
mod = (x % (divisor << y)) but incorrectly returned mod directly,
rather than the correct value, (mod << y).

(Note that we require divisor to be a power-of-two.)

As an example of this going wrong, (x << 1) % 4 was returning (x % 2)
which is 0 or 1, but x << 1 is 2x, which is always an even number so
the result mod 4 can only be 0 or 2.

Unit test suggested by Caio Oliveira during review.

Fixes: 2255375c4d ("nir: add nir_mod_analysis & its tests")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
(cherry picked from commit 97857d3224)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39003>
2025-12-16 09:49:26 -08:00
Lionel Landwerlin
f873b7f6c9 anv: disable crast on SKL
SKL is failing the following tests (maybe more) :

dEQP-VK.rasterization.conservative.overestimate.samples_1.triangles.degenerate.0_00
dEQP-VK.rasterization.conservative.overestimate.samples_16.triangles.degenerate.max
dEQP-VK.rasterization.conservative.overestimate.samples_2.triangles.degenerate.max
dEQP-VK.rasterization.conservative.overestimate.samples_2.triangles.degenerate.min
dEQP-VK.rasterization.conservative.overestimate.samples_4.triangles.degenerate.0_00
dEQP-VK.rasterization.conservative.overestimate.samples_8.triangles.degenerate.max
dEQP-VK.rasterization.conservative.overestimate.samples_8.triangles.degenerate.min

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
(cherry picked from commit 94d2ec975d)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39003>
2025-12-16 09:49:26 -08:00
Dylan Baker
3093f7fc70 .pick_status.json: Update to 9c16bbd023
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39003>
2025-12-16 09:49:20 -08:00
Nanley Chery
7de72fc3a6 iris: Fix pipe control around fast-clears
Use the right pipe control helper function so that texture invalidates
occur after the end-of-pipe sync rather than during.

Fixes: 23658920d1 ("anv,iris: Skip tex invalidate for clear conversion")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12550
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit 18e67d853f)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39003>
2025-12-16 09:49:04 -08:00
Karmjit Mahil
d1dfae23c5 gallium: Fix gnu-empty-initalizer error
Addresses:
```
../src/gallium/auxiliary/hud/hud_context.c:498:42: error: use of GNU
empty initializer extension [-Werror,-Wgnu-empty-initializer]
   struct pipe_resource *releasebuf[3] = {};
                                         ^

../src/gallium/auxiliary/postprocess/pp_mlaa.c:76:42: error: use of GNU
empty initializer extension [-Werror,-Wgnu-empty-initializer]
   struct pipe_resource *releasebuf[2] = {};
                                         ^
```

Fixes: 51605bfac2 ("gallium: Make upload_cb0 return a releasebuf")
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit cfd10a729d)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39003>
2025-12-16 09:49:04 -08:00
Mary Guillemard
9ce7afc1ac nvk: Use rendering state attachment count when setting SET_CT_SELECT
In case vk_color_attachment_location_state is in its default state, we
would end up with an identity mapping for color_map resulting in 8 RTs
being selected instead of what is really required.

This now use the rendering state attachment count to properly emit
SET_CT_SELECT.

Found while debugging MRT on
"dEQP-VK.shader_object.rendering.color_attachment_count_1.extra_attachment_after_1.none.none.same_color_formats.after.none.r16g16_sint_d32_sfloat_s8_uint"
and while comparing with the proprietary driver.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Fixes: 84de6c12b2 ("nvk: Emit SET_CT_SELECT based on the dynamic color location map")
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
(cherry picked from commit 86d190e158)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39003>
2025-12-16 09:49:04 -08:00
Nanley Chery
0823d1b35c intel/isl: Only assert surface addresses on gfx9+
Restrict the surface address assertions to platforms with soft-pin. We
technically could check for (gfx8+ && !CHV), but we choose to use the
simpler condition instead.

Fixes: 8e96b516ca ("intel/isl: Assert alignments of surface addresses")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11331
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit d2f336c108)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39003>
2025-12-16 09:49:04 -08:00
LingMan
f84713e2cd rust: build ucd-trie dependency with the correct edition
Although a crate may happen to be compatible with multiple editions, building with the wrong
edition can - generally speaking - lead to subtle bugs.

There are no known failures in this case, but better to match the official Cargo.toml anyway.

Fixes: e28ff81869 ("meson: Add pest rust dependencies")
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
(cherry picked from commit 2044cf885b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39003>
2025-12-16 09:49:04 -08:00
LingMan
c063c0b616 rust: build paste dependency with the correct edition
Although a crate may happen to be compatible with multiple editions, building with the wrong
edition can - generally speaking - lead to subtle bugs.

There are no known failures in this case, but better to match the official Cargo.toml anyway.

Fixes: dde95fc039 ("meson,ci: Add the paste crate")
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
(cherry picked from commit f95a5d5df8)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39003>
2025-12-16 09:49:04 -08:00
LingMan
5a991ee2a5 rust: build equivalent dependency with the correct edition
Although a crate may happen to be compatible with multiple editions, building with the wrong
edition can - generally speaking - lead to subtle bugs.

There are no known failures in this case, but better to match the official Cargo.toml anyway.

Fixes: 9e3e12e6a9 ("meson: Add indexmap rust dependencies")
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
(cherry picked from commit d757018e77)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39003>
2025-12-16 09:49:04 -08:00
Dylan Baker
7cd32d5ad7 .pick_status.json: Update to 518705a4fe
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39003>
2025-12-16 09:49:04 -08:00
Rhys Perry
8c4c1ebc49 ac/nir: fix check for increasing size of non-descriptor loads
In the previous version, "end" could have been zero, which would have
allowed an increase of "mul" bytes, when it should not not be increased at all.

For example:
- align_offset=4
- mul=4
- unaligned_new_size=96
- aligned_new_size=128
This would have loaded a dword which was not loaded previously.

fossil-db (gfx1201):
Totals from 115 (0.14% of 79839) affected shaders:
Instrs: 286697 -> 287097 (+0.14%); split: -0.16%, +0.30%
CodeSize: 1477728 -> 1481256 (+0.24%); split: -0.13%, +0.37%
SpillSGPRs: 1662 -> 1658 (-0.24%); split: -0.42%, +0.18%
Latency: 2288612 -> 2290248 (+0.07%); split: -0.04%, +0.11%
InvThroughput: 467307 -> 467602 (+0.06%); split: -0.03%, +0.10%
VClause: 3689 -> 3691 (+0.05%)
SClause: 5052 -> 5064 (+0.24%); split: -0.20%, +0.44%
Copies: 34837 -> 35103 (+0.76%); split: -0.80%, +1.56%
Branches: 7402 -> 7401 (-0.01%)
PreSGPRs: 9147 -> 9143 (-0.04%); split: -0.44%, +0.39%
VALU: 159333 -> 159372 (+0.02%); split: -0.01%, +0.04%
SALU: 52047 -> 52276 (+0.44%); split: -0.55%, +0.99%
SMEM: 9556 -> 9697 (+1.48%)

fossil-db (navi31):
Totals from 238 (0.30% of 79825) affected shaders:
Instrs: 484480 -> 485105 (+0.13%); split: -0.05%, +0.17%
CodeSize: 2514012 -> 2517928 (+0.16%); split: -0.06%, +0.22%
SpillSGPRs: 1064 -> 1059 (-0.47%)
Latency: 3941121 -> 3944670 (+0.09%); split: -0.04%, +0.13%
InvThroughput: 897483 -> 898090 (+0.07%); split: -0.04%, +0.11%
VClause: 7101 -> 7098 (-0.04%)
SClause: 9036 -> 9052 (+0.18%); split: -0.44%, +0.62%
Copies: 42790 -> 43096 (+0.72%); split: -0.30%, +1.01%
PreSGPRs: 14357 -> 14342 (-0.10%); split: -0.37%, +0.26%
VALU: 298325 -> 298347 (+0.01%); split: -0.01%, +0.02%
SALU: 57288 -> 57577 (+0.50%); split: -0.20%, +0.70%
SMEM: 18768 -> 18967 (+1.06%); split: -0.01%, +1.07%

fossil-db (navi21):
Totals from 239 (0.30% of 79825) affected shaders:
Instrs: 444783 -> 445177 (+0.09%); split: -0.07%, +0.15%
CodeSize: 2371776 -> 2373136 (+0.06%); split: -0.13%, +0.19%
Latency: 4226478 -> 4219221 (-0.17%); split: -0.24%, +0.07%
InvThroughput: 1430962 -> 1428445 (-0.18%); split: -0.23%, +0.06%
SClause: 9357 -> 9398 (+0.44%); split: -0.20%, +0.64%
Copies: 42742 -> 42927 (+0.43%); split: -0.53%, +0.96%
Branches: 12975 -> 12970 (-0.04%); split: -0.05%, +0.02%
PreSGPRs: 14368 -> 14312 (-0.39%); split: -0.47%, +0.08%
VALU: 306642 -> 306720 (+0.03%); split: -0.02%, +0.05%
SALU: 63702 -> 63790 (+0.14%); split: -0.31%, +0.45%
SMEM: 20030 -> 20231 (+1.00%); split: -0.00%, +1.01%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14458
Backport-to: 25.3
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit b5cf3b1628)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39003>
2025-12-15 11:23:34 -08:00
Rhys Perry
35e34299ff ac/nir: fix calculation of aligned_new_size
This should consider nir_round_up_components().

fossil-db (gfx1201):
Totals from 90 (0.11% of 79839) affected shaders:
MaxWaves: 1829 -> 1901 (+3.94%)
Instrs: 410780 -> 411825 (+0.25%); split: -0.02%, +0.27%
CodeSize: 2227956 -> 2234464 (+0.29%); split: -0.02%, +0.31%
VGPRs: 6952 -> 6760 (-2.76%); split: -3.11%, +0.35%
Latency: 3071765 -> 3073960 (+0.07%); split: -0.00%, +0.07%
InvThroughput: 766201 -> 767322 (+0.15%); split: -0.00%, +0.15%
VClause: 7887 -> 7898 (+0.14%); split: -0.08%, +0.22%
Copies: 48189 -> 48324 (+0.28%); split: -0.05%, +0.33%
PreVGPRs: 6605 -> 6595 (-0.15%); split: -0.18%, +0.03%
VALU: 237272 -> 238147 (+0.37%); split: -0.01%, +0.37%
SALU: 48987 -> 49003 (+0.03%)
VMEM: 15542 -> 15560 (+0.12%)
VOPD: 188 -> 200 (+6.38%)

fossil-db (navi31):
Totals from 89 (0.11% of 79825) affected shaders:
MaxWaves: 1811 -> 1883 (+3.98%)
Instrs: 403695 -> 404691 (+0.25%); split: -0.01%, +0.26%
CodeSize: 2150612 -> 2154860 (+0.20%); split: -0.03%, +0.23%
VGPRs: 6892 -> 6676 (-3.13%)
Latency: 3306107 -> 3310010 (+0.12%); split: -0.01%, +0.13%
InvThroughput: 813092 -> 814382 (+0.16%); split: -0.00%, +0.16%
VClause: 7999 -> 8010 (+0.14%); split: -0.06%, +0.20%
Copies: 50089 -> 50210 (+0.24%); split: -0.05%, +0.29%
PreVGPRs: 6596 -> 6586 (-0.15%); split: -0.18%, +0.03%
VALU: 239617 -> 240392 (+0.32%); split: -0.01%, +0.33%
SALU: 45349 -> 45363 (+0.03%)
VMEM: 15762 -> 15780 (+0.11%)
VOPD: 258 -> 262 (+1.55%)

fossil-db (navi21):
Totals from 89 (0.11% of 79825) affected shaders:
Instrs: 345634 -> 346426 (+0.23%); split: -0.00%, +0.23%
CodeSize: 1895616 -> 1900156 (+0.24%); split: -0.00%, +0.24%
Latency: 3043334 -> 3046859 (+0.12%); split: -0.01%, +0.13%
InvThroughput: 928236 -> 929626 (+0.15%); split: -0.01%, +0.16%
VClause: 7894 -> 7905 (+0.14%); split: -0.06%, +0.20%
Copies: 48694 -> 48785 (+0.19%); split: -0.03%, +0.22%
PreVGPRs: 6580 -> 6570 (-0.15%); split: -0.18%, +0.03%
VALU: 228323 -> 229072 (+0.33%); split: -0.01%, +0.33%
SALU: 47202 -> 47216 (+0.03%)
VMEM: 16546 -> 16564 (+0.11%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14458
Backport-to: 25.3
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 49d923078f)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39003>
2025-12-15 11:23:34 -08:00
Hyunjun Ko
7ee41d2337 anv/video: fix VP9 chroma subsampling format detection
Fixes: 314de7af ("anv: Initial support for VP9 decoding")
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
(cherry picked from commit 2fe09217a1)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39003>
2025-12-15 11:23:34 -08:00
Qiang Yu
36f02f4d26 ac/llvm: workaround legacy fma intrinsic crash on gfx12
This is a llvm bug:
  https://github.com/llvm/llvm-project/issues/170437

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14359
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 3f37740762)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39003>
2025-12-15 11:23:34 -08:00
Rob Clark
3c817582b2 asahi: Set prefer_real_buffer_in_constbuf0
This avoids u_upload_data_ref() when cb0 is bound.  The u_upload_*_ref()
paths are still problematic to mix with uploaders that the front-end
uses with explicitly managed releasebufs, but this at least side-steps
the issue, and is a legit fix on it's own.

Cc: mesa-stable
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
(cherry picked from commit cb9d9b8a6e)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39003>
2025-12-15 11:23:34 -08:00
Rob Clark
d4a14cba74 gallium: Make upload_cb0 return a releasebuf
pipe_upload_constant_buffer0() was immediately releasing the
u_upload_alloc() releasebuf.  But it is used in various call-
paths where the release needs to be deferred further.

Fixes crashes in firefox for any driver that uses the same
u_upload_mgr instance for pipe->const_uploader and
pipe->stream_uploader.

Fixes: b3133e250e ("gallium: add pipe_context::resource_release to eliminate buffer refcounting")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14309
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
(cherry picked from commit 51605bfac2)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39003>
2025-12-15 11:23:34 -08:00