Commit Graph

208591 Commits

Author SHA1 Message Date
Mike Blumenkrantz
750dd55a4a zink: reenable unsynchronized texture subdata without HIC
now that the mapping issue is fixed, this should work everywhere

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36076>
2025-07-11 17:27:52 +00:00
Mike Blumenkrantz
841080ed42 zink: lock harder around memory mappings
this addresses an ancient race condition where unmapping memory
in one thread at the same time memory is mapped in a different thread
could proceed without synchronization and result in the second thread
writing to unmapped memory

this was the actual cause of #12533

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36076>
2025-07-11 17:27:52 +00:00
Loïc Molinari
0a581e7408 panfrost: Fix modifier conversion shaders search key
The key used to look-up a shader in the modifier conversion shader
hash table is incorrect. It currently uses the address of the key
argument variable while it should use the address already passed into
the key argument. The stack address being different at each call, the
search for a previously created shader always fails and a new one is
created at each call. This commit fixes that leak.

Fixes: ae3fb3089f ("panfrost: Add infrastructure for internal AFBC compute shaders")
Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
Acked-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36072>
2025-07-11 17:05:18 +00:00
Mike Blumenkrantz
b704b7b5dc zink: document VK_EXT_primitive_topology_list_restart in profile
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36077>
2025-07-11 16:28:06 +00:00
Job Noorman
7d01d8a37d freedreno/computerator: add support for UBOs
Exposed via a new @ubo header that works just like @buf. UBOs can be
accessed through an index starting at 0 for the first one.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36073>
2025-07-11 16:01:07 +00:00
David Rosca
95986108a6 radv/video: Add couple missing encode flags and stdSyntaxFlags
Also remove VK_VIDEO_ENCODE_H264_STD_WEIGHTED_BIPRED_IDC_EXPLICIT_BIT_KHR,
only default and implicit are supported.

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35972>
2025-07-11 15:21:21 +00:00
David Rosca
45652a9876 radeonsi/vcn: Allow B-frames as L0 reference
Only B-frame as L1 reference is not supported.

Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36039>
2025-07-11 15:04:40 +00:00
David Rosca
2d6560611f frontends/va: Fix leaking fences in GetImage/PutImage
When we need to perform format conversion, we use temporary surface
allocated with vlVaHandleSurfaceAllocate. If the driver requires
clearing the surface on allocation, it will create a fence that
must be destroyed later.

Fixes: 0f20a3a4f1 ("frontends/va: Add surface pipe_fence for vl_compositor rendering")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13198
Reported-by: Mariusz Białończyk <manio@skyboo.net>
Tested-by: Mariusz Białończyk <manio@skyboo.net>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36040>
2025-07-11 14:45:49 +00:00
Mike Blumenkrantz
94f42bb201 tc: fix usage wrapping in busy test
un-wrapping requires adding INT8_MAX (not INT8_MAX-1) because e.g.,
the cases of batch_generation=126 and batch_generation=0 are not the same

also fix a stale comment

Fixes: b89e0fa226 ("tc: rework resource usage tracking to be lighter")

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36069>
2025-07-11 13:51:42 +00:00
Eric Engestrom
e386680ab0 zink+lavapipe/ci: document recent flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36071>
2025-07-11 15:08:47 +02:00
Eric Engestrom
ecb69b30b5 zink+radv/ci: document recent flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36071>
2025-07-11 15:08:47 +02:00
Eric Engestrom
1e5e0b07b4 radv/ci: document recent flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36071>
2025-07-11 15:08:47 +02:00
Eric Engestrom
111a841767 radeonsi/ci: document recent flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36071>
2025-07-11 15:08:33 +02:00
Eric Engestrom
41ce45f754 radeonsi/ci: sort stoney flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36071>
2025-07-11 15:07:10 +02:00
Eric Engestrom
b2845f3a3f broadcom/ci: document recent flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36071>
2025-07-11 15:04:21 +02:00
Eric Engestrom
634ecaf4f3 vc4/ci: sort dEQP-GLES2 flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36071>
2025-07-11 15:04:21 +02:00
Eric Engestrom
1f178e93c0 nvk/ci: document usual run time for ad106 job
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36071>
2025-07-11 15:04:21 +02:00
Ashley Smith
e55e63c5a7 panvk: Enable VK_KHR_shader_atomic_int64 on Valhall
Bifrost will require more work

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Signed-off-by: Ashley Smith <ashley.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35789>
2025-07-11 12:42:30 +00:00
Ashley Smith
c88c66754c pan/va: Add support for 64-bit atomic operations
Adds support for 64-bit atomic operations for KHR_shader_atomic_int64
using 64-bit atomic instructions. Valhall is working but Bifrost will
require some more work to implement as it requires two instructions to
execute a 64-bit atomic.

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Signed-off-by: Ashley Smith <ashley.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35789>
2025-07-11 12:42:30 +00:00
Ashley Smith
c3a21fb0af bi/va: Add instructions required for KHR_shader_atomic_int64
Add 64-bit atomic instructions for bifrost/valhall

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Signed-off-by: Ashley Smith <ashley.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35789>
2025-07-11 12:42:30 +00:00
Rhys Perry
3b9a1ce4ca aco: remove RegClass::as_subdword
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35465>
2025-07-11 12:15:09 +00:00
Rhys Perry
9c55b0ca20 aco: use MUBUF for global access with SGPR address on GFX7/8
This should be better than using FLAT, which only supports a VGPR address.

fossil-db (polaris10):
Totals from 159 (0.26% of 62070) affected shaders:
MaxWaves: 789 -> 803 (+1.77%)
Instrs: 234284 -> 230557 (-1.59%); split: -1.71%, +0.12%
CodeSize: 1212324 -> 1186716 (-2.11%); split: -2.23%, +0.11%
SGPRs: 10504 -> 10712 (+1.98%)
VGPRs: 10556 -> 10236 (-3.03%); split: -3.37%, +0.34%
SpillSGPRs: 579 -> 577 (-0.35%)
Latency: 3903056 -> 3875625 (-0.70%); split: -0.87%, +0.16%
InvThroughput: 3139443 -> 3114426 (-0.80%); split: -0.86%, +0.07%
VClause: 4205 -> 4433 (+5.42%); split: -0.43%, +5.85%
SClause: 4461 -> 4445 (-0.36%); split: -0.43%, +0.07%
Copies: 30889 -> 31507 (+2.00%); split: -0.29%, +2.29%
PreSGPRs: 7370 -> 7609 (+3.24%)
PreVGPRs: 8339 -> 8193 (-1.75%)
VALU: 175025 -> 170232 (-2.74%); split: -2.77%, +0.03%
SALU: 27269 -> 28532 (+4.63%); split: -0.01%, +4.64%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35465>
2025-07-11 12:15:08 +00:00
Rhys Perry
0094e6c32a aco: optimize lds-only or vmem-only flat access
fossil-db (polaris10):
Totals from 138 (0.22% of 62070) affected shaders:
Instrs: 233452 -> 234436 (+0.42%)
CodeSize: 1209392 -> 1213220 (+0.32%)
Latency: 3934496 -> 3928089 (-0.16%); split: -0.17%, +0.00%
InvThroughput: 3040782 -> 3038562 (-0.07%); split: -0.07%, +0.00%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35465>
2025-07-11 12:15:08 +00:00
Rhys Perry
d705b6198c aco: simplify waitcnt insertion for flat access
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35465>
2025-07-11 12:15:08 +00:00
Rhys Perry
6396a82695 aco: return a format in lower_global_address
No fossil-db changes (navi10, pitcairn).

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35465>
2025-07-11 12:15:07 +00:00
Rhys Perry
89c2c94147 aco: increase global constant offset limit slightly
Before, this wasn't actually the maximum value plus one.

fossil-db (navi10):
Totals from 4 (0.01% of 63207) affected shaders:
(no stat changes)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35465>
2025-07-11 12:15:07 +00:00
Rhys Perry
d7dcd81c77 aco/gfx6: allow both constant and gpr offset for global with sgpr address
fossil-db (pitcairn):
Totals from 81 (0.13% of 62069) affected shaders:
MaxWaves: 332 -> 335 (+0.90%)
Instrs: 150087 -> 149737 (-0.23%); split: -0.30%, +0.06%
CodeSize: 754636 -> 752712 (-0.25%); split: -0.31%, +0.06%
SGPRs: 6128 -> 6184 (+0.91%)
VGPRs: 7220 -> 7208 (-0.17%); split: -0.28%, +0.11%
SpillSGPRs: 288 -> 287 (-0.35%)
Latency: 2199197 -> 2198338 (-0.04%); split: -0.20%, +0.17%
InvThroughput: 1613474 -> 1614303 (+0.05%); split: -0.07%, +0.12%
VClause: 2905 -> 2862 (-1.48%); split: -2.34%, +0.86%
SClause: 2366 -> 2378 (+0.51%); split: -0.17%, +0.68%
Copies: 17312 -> 17264 (-0.28%); split: -1.03%, +0.76%
PreSGPRs: 5080 -> 5004 (-1.50%)
PreVGPRs: 5656 -> 5640 (-0.28%)
VALU: 114097 -> 113831 (-0.23%); split: -0.31%, +0.07%
SALU: 16004 -> 15944 (-0.37%); split: -0.41%, +0.04%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35465>
2025-07-11 12:15:06 +00:00
Rhys Perry
684943bd1f aco/gfx6: allow vgpr offset for global access with sgpr address
No reason why we can't use offen like normal buffer loads.

fossil-db (pitcairn):
Totals from 122 (0.20% of 62069) affected shaders:
MaxWaves: 521 -> 525 (+0.77%)
Instrs: 238341 -> 237228 (-0.47%); split: -0.57%, +0.10%
CodeSize: 1196260 -> 1188076 (-0.68%); split: -0.78%, +0.09%
SGPRs: 8752 -> 8760 (+0.09%); split: -0.64%, +0.73%
VGPRs: 10456 -> 10440 (-0.15%); split: -0.88%, +0.73%
Latency: 3958385 -> 3946186 (-0.31%); split: -0.38%, +0.07%
InvThroughput: 3097193 -> 3084417 (-0.41%); split: -0.42%, +0.01%
VClause: 4058 -> 4500 (+10.89%); split: -0.02%, +10.92%
SClause: 4511 -> 4500 (-0.24%); split: -0.42%, +0.18%
Copies: 31228 -> 31718 (+1.57%); split: -0.38%, +1.95%
PreSGPRs: 7211 -> 7461 (+3.47%)
PreVGPRs: 8174 -> 8147 (-0.33%); split: -0.34%, +0.01%
VALU: 174779 -> 173294 (-0.85%); split: -0.87%, +0.02%
SALU: 29138 -> 29641 (+1.73%); split: -0.09%, +1.82%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35465>
2025-07-11 12:15:05 +00:00
Rhys Perry
09a5af121f aco: simplify the load callback
We can put these parameters in the LoadEmitInfo instead.

No fossil-db changes (navi10, pitcairn).

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35465>
2025-07-11 12:15:04 +00:00
Rhys Perry
101d0b791f aco: add too-large constant offset to the address instead of the offset
In case the addition with the offset overflows.

No fossil-db changes (navi10, pitcairn).

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35465>
2025-07-11 12:15:03 +00:00
Rhys Perry
bd9a9a77fe aco: use addition helper in emit_load
No fossil-db changes (navi10, pitcairn).

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35465>
2025-07-11 12:15:03 +00:00
Rhys Perry
8defd1bc16 aco/gfx6: disallow global access with sgpr address and two offsets
No fossil-db changes (navi10, pitcairn).

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35465>
2025-07-11 12:15:03 +00:00
Rhys Perry
5ad04c02d4 ac/nir: don't combine multiple non-constant offsets into a global access
This isn't correct if the addition overflows.

No fossil-db changes (gfx1201, navi10, pitcairn).

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35465>
2025-07-11 12:15:03 +00:00
Rhys Perry
1c0d065dae aco: count flat as vmem in statistics
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35465>
2025-07-11 12:15:03 +00:00
Job Noorman
d4d9cbdbef mailmap,bin/people.csv: fix my preferred email address
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36063>
2025-07-11 12:04:08 +00:00
Mike Blumenkrantz
de65a5ebac zink: fix fb attachment usage setting
usage should always be set after barriers to improve reordering

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36057>
2025-07-11 11:20:10 +00:00
Mike Blumenkrantz
919ad8c08d zink: always emit fb attachment sync
the sync functions should be smart enough by now to figure this out

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36057>
2025-07-11 11:20:10 +00:00
Mike Blumenkrantz
485b520cf2 zink: fix qbo sync
this shouldn't be using bespoke handling to avoid sync

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

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36057>
2025-07-11 11:20:10 +00:00
Mike Blumenkrantz
d6e89787ed zink: always create gfx shader objects with 5 descriptor layouts
these are separate shader objects

fixes VUID-vkCmdDraw*-None-08879

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36057>
2025-07-11 11:20:10 +00:00
Mike Blumenkrantz
39f45f2a04 zink: double-check descriptor layout creation before adding to cache
this can race against the background compile thread, so ensure that
no collisions happen

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36057>
2025-07-11 11:20:10 +00:00
Mike Blumenkrantz
033aa3560e zink: tighten up same-batch sync
for a resource usage sequence like:
* TRANSFER_WRITE
* SHADER_READ
* TRANSFER_READ

the previous code would only synchronize SHADER_READ, which meant the
following TRANSFER_READ was subject to RaW hazards

instead, accumulate read accesses and emit new read sync when necessary

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36057>
2025-07-11 11:20:10 +00:00
Mike Blumenkrantz
efac6228b9 zink: unify setting general access flags in sync
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36057>
2025-07-11 11:20:10 +00:00
Mike Blumenkrantz
342313b145 zink: remove duplicate setting of last_write in image sync
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36057>
2025-07-11 11:20:09 +00:00
Juan A. Suarez Romero
cb22616f18 docs/features: GL_ARB_timer_query implemented for v3d
This extension is implemented for v3d, but we forgot to update the
documentation.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36042>
2025-07-11 08:03:45 +00:00
Samuel Pitoiset
fa23a50322 radv: simplify creating descriptor sets with variable desciptor count
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36044>
2025-07-11 06:04:41 +00:00
Samuel Pitoiset
b7f4e344bc radv: fix the maximum variable descriptor count with inline uniform blocks
It must not be larger than maxInlineUniformBlockSize.

Fixes recent VKCTS
dEQP-VK.api.maintenance3_check.support_count_inline_uniform_block*.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36044>
2025-07-11 06:04:41 +00:00
Samuel Pitoiset
36879c4f99 radv: fix indexing with variable descriptor count
The Vulkan spec says:
    "If bindingCount is zero or if this structure is not included in
     the pNext chain, the VkDescriptorBindingFlags for each descriptor
     set layout binding is considered to be zero. Otherwise, the
     descriptor set layout binding at
     VkDescriptorSetLayoutCreateInfo::pBindings[i] uses the flags in
     pBindingFlags[i]."

Fixes recent VKCTS dEQP-VK.api.maintenance3_check.*.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13503
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36044>
2025-07-11 06:04:40 +00:00
Samuel Pitoiset
01fccec1dc ac/descriptors,radv: move the nbc view param to the gfx10 union
This is only GFX10+.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36043>
2025-07-11 05:46:50 +00:00
Samuel Pitoiset
36e4b52e9f radv: do not perform a per-pixel copy for BCn formats with mips on GFX12+
This is unnecessary because GFX12 isn't affected by this clamping issue
when NO_EDGE_CLAMP is correctly configured.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36043>
2025-07-11 05:46:50 +00:00
Qiang Yu
88c79a13b9 ac,radv: move nir_load_ring_mesh_scratch_offset_amd to ac
To be shared with radeonsi.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35931>
2025-07-11 02:25:51 +00:00