Lionel Landwerlin
62c52fb59d
anv: expose VK_MESA_image_alignment_control
...
Our implementation is a no-op for the following reasons :
- ISL always tries to go for the smallest tiling mode (see
isl_surf_choose_tiling())
- In the few cases where we need to use Tile64 for compression
workarounds, VK_MESA_image_alignment_control doesn't require use
to disable compression
- vkd3d-proton has the ability to disable compression using
VK_EXT_image_compression_control, disabling Tile64 requirements
and ensuring ISL can select a 4k tiling mode
So vkd3d-proton should always be able to get a 4k tiling mode if it
wants to.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Rohan Garg <rohan.garg@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29175 >
2024-06-06 19:00:47 +00:00
Eric Engestrom
3e7a82968d
nvk+zink/ci: add another flake seen in nightly
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29574 >
2024-06-06 18:49:11 +00:00
Samuel Pitoiset
15fe733703
radv: add a helper to get image VA
...
Similar to buffer, and less error prone.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29428 >
2024-06-06 18:21:33 +00:00
Rhys Perry
4cfb7a0c17
aco: remove support for sub-dword push constants
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29480 >
2024-06-06 17:52:05 +00:00
Rhys Perry
e21312018e
ac/llvm: remove support for sub-dword push constants
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29480 >
2024-06-06 17:52:05 +00:00
Rhys Perry
41c5f71343
radv: lower sub-dword push constants
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29480 >
2024-06-06 17:52:05 +00:00
Rhys Perry
69b7fcd775
ac/nir: support lowering of sub-dword push constants
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29480 >
2024-06-06 17:52:04 +00:00
Yusuf Khan
e7a2127f0e
aux/draw: Use the draw info we get passed in instead of our own
...
Signed-off-by: Yusuf Khan <yusisamerican@gmail.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28641 >
2024-06-06 17:00:18 +00:00
Yusuf Khan
377600b9df
nv50/vbo: wrap draw_vbo to avoid ovehead from multidraw
...
Same as the nvc0 patch pretty much, similar improvement.
Signed-off-by: Yusuf Khan <yusisamerican@gmail.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
---
v2: remove tmp_info as per Karol Herbst suggestion
v3: nv50_draw_vbo -> nv50_draw_single_vbo per Karol's suggestion
v4: mutex assertion and remove num_draws
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28641 >
2024-06-06 17:00:18 +00:00
Yusuf Khan
225f2aac96
nvc0/vbo: wrap draw_vbo for multidraw performance
...
This patch is to avoid the high overhead that exists when trying to
kick ever single draw during multidraw.
glMultiDrawArrays performance profiling:
342.5 thousand draws/second -> 40 million draws/second
Special thanks to Arthur Huillet for helping getting this profiled
in irc.
Signed-off-by: Yusuf Khan <yusisamerican@gmail.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
---
v2: fix typos pointed out by Arthur
v3: nvc0_draw_vbo -> nvc0_draw_single_vbo, intialize count
v4: remove num_draws from wrapped function and add mutex assert
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28641 >
2024-06-06 17:00:18 +00:00
Georg Lehmann
3fb1a64918
aco: move s_add_u32 -> s_addk_i32 optimization fully to ra
...
Having this in one place is better.
When I wrote the old I wasn't aware that checking the kill flag on definitions
is the same as checking zero uses.
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
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