Georg Lehmann
60f3f0fdbb
aco/ra: use a switch to check vop2acc instruction support
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29512 >
2024-06-06 16:28:23 +00:00
Georg Lehmann
fdc2fb6835
aco: move literal unswizzle opt to RA
...
Much simpler.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29512 >
2024-06-06 16:28:23 +00:00
Georg Lehmann
c63c750380
aco/gfx11+: fix inline constants for v_pk_fmac_f16
...
On newer hardware, the hi operation reads the lo half of the inline constant.
On older hardware, it reads the hi half (zero).
I tested this on Navi31 for gfx11 and Raphael for gfx10.
Foz-DB Navi31:
Totals from 4 (0.01% of 79395) affected shaders:
CodeSize: 36832 -> 36448 (-1.04%)
Latency: 20362 -> 20334 (-0.14%)
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29512 >
2024-06-06 16:28:23 +00:00
Georg Lehmann
39380d475a
aco: add affinities for possible sopk optimizations
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29512 >
2024-06-06 16:28:23 +00:00
Georg Lehmann
fac475bc25
aco: rework how affinities for acc operands are determined
...
Improve accuracy by adding a helper that's also used by
the optimization function.
Foz-DB Navi31:
Totals from 50 (0.06% of 79206) affected shaders:
CodeSize: 126148 -> 126128 (-0.02%); split: -0.05%, +0.04%
Latency: 334049 -> 334060 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 59203 -> 59205 (+0.00%)
Copies: 2011 -> 1998 (-0.65%); split: -0.75%, +0.10%
VALU: 14221 -> 14208 (-0.09%); split: -0.11%, +0.01%
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29512 >
2024-06-06 16:28:23 +00:00
Samuel Pitoiset
5b6207b282
radv: only set valid bitfields for CB/DS surfaces address on GFX12
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29566 >
2024-06-06 15:42:35 +00:00
Samuel Pitoiset
fe78ad2690
radv: fix emitting VGT_PRIMITIVEID_RESET in the GFX preamble on GFX12
...
It's a uconfig register.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29566 >
2024-06-06 15:42:35 +00:00
Samuel Pitoiset
be3c837c04
radv: update configuring COVERAGE_TO_SHADER_SELECT on GFX12
...
This bit has been moved to SPI_PS_INPUT_ENA.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29566 >
2024-06-06 15:42:35 +00:00
Samuel Pitoiset
27496928e4
radv: update configuring depth clamp enable on GFX12
...
DISABLE_VIEWPORT_CLAMP has been moved to a new register.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29566 >
2024-06-06 15:42:35 +00:00
Patrick Lerda
aa79030505
mesa/main: fix stack overflow related to the new mipmap code
...
Indeed, the access to the array is done with a 4x multiplier.
The size of the array should be calculated accordingly.
For instance, this issue is triggered on radeonsi with
"piglit/bin/arb_direct_state_access-gettextureimage-formats -auto -fbo":
==3419==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffc31f804b0 at pc 0x7fac7ef81b2d bp 0x7ffc31f803d0 sp 0x7ffc31f803c8
WRITE of size 1 at 0x7ffc31f804b0 thread T0
#0 0x7fac7ef81b2c in do_span_rgba_unorm8 ../src/mesa/main/mipmap.c:160
#1 0x7fac7ef83549 in do_row ../src/mesa/main/mipmap.c:258
#2 0x7fac7ef83986 in make_2d_mipmap ../src/mesa/main/mipmap.c:371
#3 0x7fac7ef8670b in generate_mipmap_compressed ../src/mesa/main/mipmap.c:1062
#4 0x7fac7ef8670b in _mesa_generate_mipmap ../src/mesa/main/mipmap.c:1119
#5 0x7fac7e5472aa in check_gen_mipmap ../src/mesa/main/teximage.c:2910
#6 0x7fac7e5472aa in check_gen_mipmap ../src/mesa/main/teximage.c:2904
#7 0x7fac7e5472aa in teximage ../src/mesa/main/teximage.c:3315
#8 0x7fac7e5472aa in teximage_err ../src/mesa/main/teximage.c:3342
#9 0x7fac7e550cfa in _mesa_TexImage2D ../src/mesa/main/teximage.c:3413
Address 0x7ffc31f804b0 is located in stack of thread T0 at offset 96 in frame
#0 0x7fac7ef814ff in do_span_rgba_unorm8 ../src/mesa/main/mipmap.c:132
This frame has 3 object(s):
[32, 96) 'result' (line 145) <== Memory access at offset 96 overflows this variable
[128, 384) 'rowA' (line 144)
[448, 704) 'rowB' (line 144)
Fixes: dd8fb7139d
("mesa/main: rewrite mipmap generation code")
Signed-off-by: Patrick Lerda <patrick9876@free.fr >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29572 >
2024-06-06 15:06:12 +00:00
Rhys Perry
8e475bba61
aco: implement nir_intrinsic_nop_amd and nir_intrinsic_sleep_amd
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Acked-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29466 >
2024-06-06 14:26:52 +00:00
Rhys Perry
1ad05d4ca8
aco: implement nir_atomic_op_ordered_add_gfx12_amd
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Acked-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29466 >
2024-06-06 14:26:52 +00:00
Rhys Perry
0dee5fdd3c
aco: don't combine vgpr into writelane src0
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Acked-by: Daniel Schürmann <daniel@schuermann.dev >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29466 >
2024-06-06 14:26:52 +00:00
Rhys Perry
2a4424425a
aco/gfx12: fix s_wait_event immediate
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Acked-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29466 >
2024-06-06 14:26:52 +00:00
Rhys Perry
26c981b2b8
ac/nir: skip subgroup_id/local_invocation_index lowering for gfx12
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Acked-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29466 >
2024-06-06 14:26:52 +00:00
Rhys Perry
c651eed1d8
aco/gfx12: implement load_subgroup_id
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Acked-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29466 >
2024-06-06 14:26:52 +00:00
Rhys Perry
61531b19cd
ac/llvm: implement load_subgroup_id
...
Usually this is lowered in NIR, but GFX12 needs to use an intrinsic.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Acked-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29466 >
2024-06-06 14:26:51 +00:00
Eric Engestrom
ea5b3bfcd1
radv/ci: move radv manual rules into their own group
...
Makes it easier to re-use.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29550 >
2024-06-06 13:00:04 +00:00
Eric Engestrom
47bd1cff4b
radv/ci: fix manual rules
...
It was set to "always run" for amd common files changes when I obviously
meant for it to be manual and messed up my copy/paste when I wrote that.
Fixes: ebaede788e
("amd/ci: limit radv jobs to radv + aco files changes")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29550 >
2024-06-06 13:00:04 +00:00
Samuel Pitoiset
4400ecafa7
Revert "radv/ci: Bring back vkcts-navi21-llvm-valve"
...
This job is consuming CI resources for nothing, it's still broken and
it's completely useless.
This reverts commit 8dc364806e
.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29568 >
2024-06-06 12:22:33 +00:00
Karol Herbst
c13d8ac6d6
v3d: add support for load_workgroup_size
...
This is required for ARB_compute_variable_group_size and OpenCL support.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29554 >
2024-06-06 12:01:00 +00:00
Karol Herbst
83883a6cc2
broadcom/compiler: handle load_workgroup_size
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29554 >
2024-06-06 12:01:00 +00:00
Eric Engestrom
3aafe75471
turnip/ci: add a750 flakes seen in the latest nightly
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29569 >
2024-06-06 10:47:53 +00:00
Samuel Pitoiset
e2db42298d
amd/common: add MIN_LOD for texture descriptors on GFX12
...
RADV will need that.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29321 >
2024-06-06 10:15:10 +00:00
Samuel Pitoiset
8cb2cad434
ac,radv,radeonsi: add a function to build texture descriptors
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29321 >
2024-06-06 10:15:10 +00:00
Samuel Pitoiset
4bb308d403
radv: use pipe_format when building image view descriptors
...
This simplifies things before adding a common helper for building
texture descriptors.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29321 >
2024-06-06 10:15:10 +00:00
Iago Toral Quiroga
50e5067be7
v3dv: allow VK_REMAINING_ARRAY_LAYERS in VkImageSubresourceLayers
...
This is allowed with VK_KHR_maintenance5. There are helpers in Mesa
to help with this.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29544 >
2024-06-06 07:12:27 +00:00
Iago Toral Quiroga
5b6495a953
v3dv: fix a few asserts that check layerCount instead of array_layers
...
The intent behind these asserts is to ensure the layer is within
bounds, so we rather check it is within the image layer count than
within the layerCount of the image subresource passed by the API.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29544 >
2024-06-06 07:12:27 +00:00
Iago Toral Quiroga
e1dddfa75a
v3dv: fix pipeline leaks when meta pipeline cache is disabled
...
If the cache is disabled then we need to destroy the pipelines
manually when they are no longer needed. Do that by adding them
as private objects to the command buffer.
Fixes: 4f26303dbb
('v3dv: add debug option to disable custom pipeline caches for meta operations')
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29544 >
2024-06-06 07:12:27 +00:00
Rebecca Mckeever
507a714506
panvk: Move vkCmd*Event functions to their own file
...
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29369 >
2024-06-06 06:47:44 +00:00
Rebecca Mckeever
b08a45c042
panvk: Move vkCmdDispatch* functions to their own file
...
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29369 >
2024-06-06 06:47:44 +00:00
Rebecca Mckeever
1f57aae4e4
panvk: Move vkCmdDraw* functions to their own file
...
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29369 >
2024-06-06 06:47:44 +00:00
Rebecca Mckeever
b9f194a6ed
panvk: Move panvk_descriptor_state to bifrost subdir
...
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29369 >
2024-06-06 06:47:44 +00:00
Rebecca Mckeever
d858c42a9d
panvk: Make helper functions panvk_cmd_buffer agnostic
...
Make some helper functions panvk_cmd_buffer agnostic to prepare for moving
them to the bifrost subdirectory.
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29369 >
2024-06-06 06:47:44 +00:00
Rebecca Mckeever
884382d496
panvk: Add push_uniform/constant helpers
...
Add helpers to fill/prepare the push_uniforms array. While at it
move the push_uniforms field out of the descriptor_state.
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29369 >
2024-06-06 06:47:44 +00:00
Rebecca Mckeever
2b5df15597
panvk: Add jm and bifrost dirs
...
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29369 >
2024-06-06 06:47:44 +00:00
Samuel Pitoiset
57d0d63d01
radv: only emit CB_COLOR0_DCC_CONTROL on GFX8
...
This register doesn't exist on GFX6-7 (no DCC at all).
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29545 >
2024-06-06 07:58:19 +02:00
Samuel Pitoiset
07b0096011
radv: only emit SPI_SHADER_PGM_SRC3_GS on GFX7+
...
This register doesn't exist on GFX6.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29545 >
2024-06-06 07:58:00 +02:00
Samuel Pitoiset
4a7150b469
radv: do not set VGT_SHADER_STAGES_EN.DYNAMIC_HS on GFX9
...
This bit doesn't exist.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29545 >
2024-06-06 07:58:00 +02:00
Samuel Pitoiset
4a75b50eb8
radv: only emit SQ_PERFCOUNTER_MASK on GFX7-9
...
This register doesn't exist on GFX10-10.3.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29545 >
2024-06-06 07:58:00 +02:00
Samuel Pitoiset
96e7ac027c
radv: only emit VGT_GS_MAX_PRIMS_PER_SUBGROUP on GFX9
...
This register doesn't exist on GFX10+.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29545 >
2024-06-06 07:58:00 +02:00
Samuel Pitoiset
f62a8f888f
radv: only set valid bitfields for CB/DS surfaces address
...
This isn't a problem in practice but better to mask them out.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29545 >
2024-06-06 07:57:59 +02:00
Dave Airlie
726838620e
nvk: Only enable WSI modifiers if the extension is supported.
...
The extension relies on the kernel being new, so don't tell
wsi about it.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11270
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11166
Fixes: e6f77defec
("nvk/wsi: Advertise modifier support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29563 >
2024-06-06 02:15:36 +00:00
Marek Olšák
3d05d86d88
radeonsi/gfx12: add DCC
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29510 >
2024-06-06 01:01:46 +00:00
Marek Olšák
7232995fb5
radeonsi: remove leftover comment of non-existent RADEON_FLAG_MALL_NOALLOC
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29510 >
2024-06-06 01:01:46 +00:00
Marek Olšák
0dad61dfb6
radeonsi: allow RADEON_HEAP_BIT_GL2_BYPASS for VRAM
...
Queries might use it on gfx12.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29510 >
2024-06-06 01:01:46 +00:00
Marek Olšák
e303aae145
radeonsi: remove RADEON_FLAG_READ_ONLY
...
It's not used much and it doubles the number of heaps.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29510 >
2024-06-06 01:01:46 +00:00
Marek Olšák
21d6d44e96
radeonsi: remove cp_to_L2 and L2_to_cp, inline the values
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29510 >
2024-06-06 01:01:46 +00:00
Marek Olšák
c713fc7762
radeonsi: assume si_set_ring_buffer is only used by gfx6-10.3
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29510 >
2024-06-06 01:01:46 +00:00
Marek Olšák
fbc237037c
radeonsi/gfx12: fix GPU deadlocks due to query result incoherency
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29510 >
2024-06-06 01:01:46 +00:00