Commit Graph

215144 Commits

Author SHA1 Message Date
Karol Herbst
810dca450c rusticl/kernel: fix clGetKernelSuggestedLocalWorkSizeKHR implementation
There were two issues:
1. The global_work_offset parameter is optional but we errored on NULL
2. We didn't return the reqd_work_group_size when set on the kernel.

Fixes: 376d1e6667 ("rusticl: implement cl_khr_suggested_local_work_size")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38375>
2025-11-18 15:42:43 +00:00
David Rosca
2587a565d8 radeonsi/vcn: Remove unnecessary vars for AV1 encode
These are just copied from picture desc.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38260>
2025-11-18 09:28:13 +00:00
David Rosca
698de5360c radeonsi/vcn: Cleanup AV1 screen content tools coding
There is no disable_screen_content_tools in AV1 spec, instead this
should be seq_choose_screen_content_tools. But we don't need that either
as we keep the effective value in force_screen_content_tools.
Same for seq_choose_integer_mv and force_integer_mv.
Also stop overriding these values and instead fix frame header coding
to work with all combinations.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38260>
2025-11-18 09:28:13 +00:00
David Rosca
6050bda231 radeonsi/uvd_enc: Cleanup HEVC encode deblock params handling
This should consider values from PPS and overrides from slice header
if enabled.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38260>
2025-11-18 09:28:13 +00:00
David Rosca
153ff5dd8a radeonsi/vcn: Cleanup HEVC encode deblock params handling
This should consider values from PPS and overrides from slice header
if enabled.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38260>
2025-11-18 09:28:13 +00:00
David Rosca
10e274af62 radeonsi/video: Make helper radeon_bitstream functions static
Those are now only used in radeon_bitstream.c

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38260>
2025-11-18 09:28:12 +00:00
David Rosca
094e20f134 radeonsi/vcn: Use radeon_bitstream functions to code headers
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38260>
2025-11-18 09:28:12 +00:00
David Rosca
628694c16c radeonsi/vce: Use radeon_bitstream functions to code headers
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38260>
2025-11-18 09:28:12 +00:00
David Rosca
332ec608ad radeonsi/uvd_enc: Use radeon_bitstream functions to code headers
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38260>
2025-11-18 09:28:12 +00:00
David Rosca
1f51401dae radeonsi/video: Add VPS/SPS/PPS and sequence header functions to radeon_bitstream
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38260>
2025-11-18 09:28:12 +00:00
David Rosca
c5f898edb4 frontends/va: Add AV1 encode high_bitdepth flag
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38260>
2025-11-18 09:28:12 +00:00
Christoph Pillmayer
617f0562bb pan: Use bitset instead of bool array in bi_find_loop_blocks
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38393>
2025-11-18 09:02:58 +00:00
Christoph Pillmayer
6535a3b6b3 pan: Fix bi_find_loop_blocks
Before this commit, nested loops aren't counted correctly:
   -------------
   V           |
-> A --> B --> C ->
         ^     |
         -------
A is both predecessor and successor of B but A isn't in B's loop.

Instead a block B is in loop header H's block if H is the successor
of B and H dominates B.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38393>
2025-11-18 09:02:56 +00:00
Christoph Pillmayer
5ae1b68cb0 pan: Adapt calc_dominance from nir to bi
Mostly "s/nir_block/bi_block/g" and some small fixups.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38393>
2025-11-18 09:02:55 +00:00
Christoph Pillmayer
dd01573207 pan: Copy nir_dominance.c to bi_dominance.c
Next commit will actually convert it to be bifrost.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38393>
2025-11-18 09:02:52 +00:00
Christoph Pillmayer
ca9c9957e2 pan: Avoid some redundant SSA spills
Instead of inserting the spill instruction before the instruction that
caused the spill, instead insert it either right after the definition
or at the end of the block that contains the definition.
This helps reduce code size and also moves STOREs outside of loops on
average.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38238>
2025-11-18 08:42:23 +00:00
Valentine Burley
45c9c61ad3 anv/ci: Run vkd3d job in parallel
Running vkd3d in parallel appears to be stable now on ANV.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38491>
2025-11-18 07:41:42 +00:00
Timothy Arceri
b0047be0c2 mesa: fix _mesa_update_texture_matrices()
_math_matrix_is_dirty() should only be used to decide if we need to
run _math_matrix_analyse(). We already decided that we had a new
texture matrix when we called _mesa_update_texture_matrices() so
we need to set _TexMatEnabled correctly otherwise we might
incorrectly return _NEW_FF_VERT_PROGRAM | _NEW_FF_FRAG_PROGRAM in
the following if-statement.

Fixes: ec978e002f ("mesa: only update fixed-func programs on texture matrix enablement changes")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14286
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38473>
2025-11-18 01:31:12 +00:00
Dave Airlie
ad25196d35 radv: add support for cooperative matrix reductions.
This add support to the lowering the reduction operations.

Thanks to Georg Lehmann for a lot of the ideas and optimising in
this.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38389>
2025-11-17 23:33:59 +00:00
Georg Lehmann
3a175b54a4 aco,nir: support subdword v_permlane_b16
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38389>
2025-11-17 23:33:59 +00:00
Dave Airlie
a4a0d28ea6 spirv: add support for cooperative matrix reduction operation
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38389>
2025-11-17 23:33:59 +00:00
Dave Airlie
438245404c nir: add support for cooperative matrix reduction operations.
This adds some new call operations to handle various parts of the
reductions.

cmat_reduce: is the initial toplevel operation from SPIR-V
this is used after lowering for row/col operation on single hw
supported matrix sizes. The spir-v operation is lowered into
multiple of these on flex dimensions, but also can be lowered into
others.

cmat_reduce_finish:
after multiple reduction operations on a flexible dimension matrix,
there is often subsequent operations on the output matrices to
finish the operation.

cmat_reduce_2x2:
this takes 4 input matrices, and 1 dst to do a 2x2 reduction op.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38389>
2025-11-17 23:33:59 +00:00
Dave Airlie
9385d94bc9 nir: add a flag for functions that are used in cmat calls.
With coopmat2 a bunch of functions need a lot of lowering passes
to happen before they can be lowered, so mark them as to be lowered
later.

Drivers needing these should call the nir_remove_non_cmat_call_entrypoints
where they remove entrypoints now, and call the original nir_remove_non_entrypoints
after lowering coopmat2.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38389>
2025-11-17 23:33:58 +00:00
Dave Airlie
26eaba935d nir: add a cmat call instruction type.
This adds a new instruction type to handle cooperative matrix calls.

This clones the call instr, drops callee, and adds a single metadata
slot and a call operation (dummy only for now).

(Not NACKed by Alyssa)

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38389>
2025-11-17 23:33:58 +00:00
Christian Gmeiner
6ba0797a06 etnaviv: Improve flatshading
If the shader has flat varyings but API level flatshade is disabled, we
need to switch to flat shading in PA.CONFIG to ensure proper interpolation.

Passes dEQP-GLES3.functional.rasterization.flatshading.* on GC7000.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Tested-by: Daniel Lang <dalang@gmx.at>
Reviewed-by: Daniel Lang <dalang@gmx.at>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36404>
2025-11-17 23:18:49 +00:00
Aitor Camacho
3e9cbea34e kk: Fill driverUUID
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38420>
2025-11-17 22:50:08 +00:00
Aitor Camacho
38fe7b7352 util: Add build_id for macOS
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38420>
2025-11-17 22:50:07 +00:00
Aitor Camacho
a77e09eaeb util: Introduce HAVE_BUILD_ID for build id utils
Build utilities to retrieve the build id are now exposed
through the new HAVE_BUILD_ID instead of HAVE_DL_ITERATE_PHDR
since this will allow adding support for platforms that do
not support HAVE_DL_ITERATE_PHDR

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38420>
2025-11-17 22:50:07 +00:00
Dylan Baker
9d2c8e5b98 bin/gen_release_notes: Remove duplicate bug entires
A multiple commits may reference the same bug (for example, a commit
is only a partial fix). We don't want that to show up in our fixed bug
log.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38492>
2025-11-17 22:45:13 +00:00
Dylan Baker
cda114e0e4 bin/gen_release_notes: Remove cast that does nothing
Without an assignment this cast is dead code.

Cast's in python work like:
```python
from typing import cast
x = ['a', 'b', 'c']
x = cast(list[str | int], x)
x.append(5)
```

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38492>
2025-11-17 22:45:13 +00:00
Dylan Baker
9b7a676fa6 docs/relnotes/25.3.0: Escape some rst language constructs
That are from the gitlog, which we don't currently escape.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38454>
2025-11-17 22:07:43 +00:00
Dylan Baker
4a524a6de6 docs/relnotes/25.3.0: Remove duplicate bug fixes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38454>
2025-11-17 22:07:43 +00:00
Dylan Baker
b1640d027f docs: update calendar for 25.3.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38454>
2025-11-17 22:07:42 +00:00
Dylan Baker
04e1c46089 docs: Add sha sums for 25.3.0
(cherry picked from commit 0cb99ef602b77ef7dbccc04f535a570c67cd7b68)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38454>
2025-11-17 22:07:42 +00:00
Dylan Baker
34c520037a docs: add release notes for 25.3.0
(cherry picked from commit 523eea18c546b67ce0ed8425f5eb469808fa7523)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38454>
2025-11-17 22:07:42 +00:00
Aitor Camacho
c49b3c670c kk: Add MESA_KK_DISABLE_WORKAROUNDS to disable workarounds
MESA_KK_DISABLE_WORKAROUNDS provides a way to disable workarounds
we've had to apply to get Vulkan conformance. In hopes that Metal
bugs get fixed in upcoming macOS releases.

Reviewed-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38426>
2025-11-17 21:52:10 +00:00
Christian Gmeiner
adf881cd3e etnaviv: Add support for ARB_vertex_type_2_10_10_10_rev
This extension seems to be supported on GC3000 (HALTI2) and later hardware.
While no explicit feature bit documents this capability, testing
confirms that the required vertex formats work correctly on these GPUs.

This patch adds the missing B10G10R10A2 vertex format variants
(UNORM, SNORM, USCALED, SSCALED), gates support behind the HALTI2
feature check, and updates features.txt to reflect the new capability.

All relevant piglit tests pass.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38446>
2025-11-17 21:33:31 +00:00
Lionel Landwerlin
401b2066b0 anv: ensure slab allocated memory matches image requirements
The VMA of VkDeviceMemory has to accomodate all the resources that can
be bound to it. For sparse images it's 64KiB alignment, for other
tiled images it's 4KiB. But we also have a workaround that requires a
64KiB alignment for Tile4 images.

The initial version of the slab allocator missed the 4KiB alignment.
This fix adds the workaround handling too.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: dabb012423 ("anv: Implement anv_slab_bo and enable memory pool")
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38480>
2025-11-17 20:51:47 +00:00
Lionel Landwerlin
775f8ec105 anv: fixup load_ubo lowering
Use ult like nir_lower_explicit_io.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38477>
2025-11-17 20:02:00 +00:00
Olivia Lee
4a2df9127f panvk/csf: add PANLIB_BARRIER_CSF_WAIT, to insert WAIT after precomp
This is useful for running multiple dependent precomp shaders in a row.
We could do this using PANLIB_BARRIER_CSF_WAIT and then immediately wait
on the syncobj, but it's a little silly to do that on the same subqueue.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Acked-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37971>
2025-11-17 19:31:31 +00:00
Olivia Lee
f5e0d90231 panvk/csf: put precomp syncobj behind PANLIB_BARRIER_CSF_SYNC option
In some cases, we don't need to signal the syncobj yet because we will
be issuing a second asynchronous instruction afterwards blocking on the
first.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Acked-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37971>
2025-11-17 19:31:31 +00:00
Olivia Lee
ebbf05f9d2 panvk/csf: explicitly set ls_sb_slot in set_fbds_provoking_vertex
SB_ID(LS) is currently equal to zero, so this is not a behavior change,
but worth setting it explicitly for clarity and in case the sb
assignments change.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Fixes: 885805560f ("panvk/csf: fix case where vk_meta is used before PROVOKING_VERTEX_MODE_LAST")
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38458>
2025-11-17 19:11:05 +00:00
Olivia Lee
e899bc8be8 panvk/csf: fix uninitialized read in draw context
We check fn_set_fbds_provoking_vertex_stride == 0 to determine whether a
previous function variant has already been allocated, so this value must
be initialized to zero before we start the loop. We could fix this by
explicitly initializing just that field, but I figure it's simpler and
safer to just zero-initialize the whole struct.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Fixes: 885805560f ("panvk/csf: fix case where vk_meta is used before PROVOKING_VERTEX_MODE_LAST")
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38458>
2025-11-17 19:11:05 +00:00
Casey Bowman
bcdc0aae44 anv: Make pipeline mode switches show which mode is being entered
This helps for debug when wanting to check which pipeline mode the
driver has selected for a given section of a frame.

Signed-off-by: Casey Bowman <casey.g.bowman@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38317>
2025-11-17 09:38:50 -08:00
Casey Bowman
3f795016d3 anv: Remove vf_flush for start of command buffers
These vertex fetch flushes aren't required in gen9+ because the display
driver will take care of this invalidation on QueueSubmit. So let's remove it.

Signed-off-by: Casey Bowman <casey.g.bowman@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38317>
2025-11-17 09:38:50 -08:00
Lionel Landwerlin
4816318887 brw: fix workaround fence rlen field
send.ugm (1|M0)          r125     r0      null:0  0x0            0x0200651F           {$9} // wr:1+0, rd:0; fence invalid flush type scoped to tile

When destination of Send(s) is not null, the response length must not be 0.

Should only affect DG2 products.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38478>
2025-11-17 17:08:30 +00:00
David Rosca
17c015c2de radeonsi/vce: Add workaround for unaligned input surface
VCE requires 16x16 aligned input surface. Blit into an internal
scratch surface when input surface is not 16 aligned.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14270
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38392>
2025-11-17 16:49:21 +00:00
Georg Lehmann
018f45f981 aco/insert_NOPs: remove redundant VALUReadSGPRHazard waits
Mostly removes SALU->VALU waits if the VALU writes a sgpr.

Foz-DB GFX1201:
Totals from 18553 (22.51% of 82419) affected shaders:
Instrs: 27388414 -> 27321118 (-0.25%)
CodeSize: 145389276 -> 145118128 (-0.19%); split: -0.19%, +0.00%
Latency: 200288087 -> 200252583 (-0.02%); split: -0.02%, +0.00%
InvThroughput: 36311237 -> 36307369 (-0.01%); split: -0.01%, +0.00%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38445>
2025-11-17 16:28:36 +00:00
Georg Lehmann
b1d730982e aco/insert_NOPs: remove redundant VALUMaskWriteHazard waits
This removes a lot of VALU->SALU waits.

Foz-DB Navi31:
Totals from 8908 (10.84% of 82179) affected shaders:
Instrs: 17118986 -> 17084870 (-0.20%)
CodeSize: 91057212 -> 90919300 (-0.15%); split: -0.15%, +0.00%
Latency: 154044128 -> 154036848 (-0.00%); split: -0.00%, +0.00%
InvThroughput: 26608698 -> 26607933 (-0.00%); split: -0.00%, +0.00%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38445>
2025-11-17 16:28:36 +00:00
Erik Faye-Lund
c3170d11ac pvr: limit availability of HW defs
To be able to support multiple GPU architectures, we need to thread
carefully with HW defs. So let's limit the availability of the HW defs
to where it's needed. We do this by moving the HW def includes and
helpers to query them to end of the source-files.

In the long run, we probably want something a bit more formal to get
access to HW-dependent values based on the hw-info. But there's some
work in progress to change how that works, so let's kick the can down
the road a bit on that part.

Reviewed-by: Ashish Chauhan <ashish.chauhan@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38423>
2025-11-17 16:04:31 +00:00