Samuel Pitoiset
f63ced7ff2
radv/meta: convert the query resolve pipelines to vk_meta
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744 >
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
9ebfe81a24
radv/meta: rework creating meta pipelines for query resolves
...
To use the same design as other meta operations.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744 >
2024-12-29 18:31:49 +00:00
Samuel Pitoiset
a7d32be1dd
radv: rename GDS queries to emulated queries
...
Emulated is more generic than GDS. GDS will be replaced with SSBO
atomics anyways.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32702 >
2024-12-19 08:08:53 +00:00
Samuel Pitoiset
2e1c87c1ca
radv: add few more query helpers for copying results
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32678 >
2024-12-18 07:51:57 +00:00
Samuel Pitoiset
5b53f6deaa
radv: remove dead code in radv_CmdCopyQueryPoolResults()
...
Incrementing dest_va doesn't do anything.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32678 >
2024-12-18 07:51:57 +00:00
Samuel Pitoiset
ebe9dc49b7
radv: reorganize query code by adding separate begin/end helpers
...
The query code is getting big and complex over time. It will be even
more complicated because GDS doesn't exist on GFX12. Let's reorganize
slightly to make it more readable and easier to maintain.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32678 >
2024-12-18 07:51:57 +00:00
Samuel Pitoiset
cbae7792f9
radv: stop emulating GS invocations for legacy GS on RDNA1-2
...
This is basically a revert of !24231 . This emulation was introduced
to fix counting the number of GS invocations in cases it's VS/TES as
NGG (hw does that), but it's unnecessary.
Since the specification has been clarified and pipeline stat queries
are undefined for stages not present in pipelines.
See https://gitlab.khronos.org/vulkan/vulkan/-/merge_requests/6547
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31153 >
2024-09-20 12:28:08 +00:00
Samuel Pitoiset
8863704c6b
radv/meta: add a helper to create descriptor set layout
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30187 >
2024-07-16 06:17:07 +00:00
Samuel Pitoiset
3d322b787e
radv/meta: add a helper to create pipeline layout
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30187 >
2024-07-16 06:17:07 +00:00
Samuel Pitoiset
c6a626e000
radv/meta: add a helper to create compute pipeline
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30187 >
2024-07-16 06:17:07 +00:00
Samuel Pitoiset
bf3b2d2912
radv/meta: remove useless checks for NULL handles before destroying
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30187 >
2024-07-16 06:17:07 +00:00
Samuel Pitoiset
e739d0e5bb
radv/meta: remove non-valuable comments
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30187 >
2024-07-16 06:17:07 +00:00
Samuel Pitoiset
e18cc3b39b
radv: fix waiting for occlusion queries on GFX6-8
...
Occlusion queries don't go through L2 on GFX6-8, and waiting properly
in shaders is more complicated to implement. Use the previous
WAIT_REG_MEM logic on these GPUs to fix this.
This fixes flickering on many games on GFX8.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8954
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9415
Fixes: d44651bfc3 ("radv: wait for occlusion queries in the resolve query shader")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28796 >
2024-04-19 07:36:37 +00:00
Dave Airlie
16682b6054
radv/video: don't advertise timestamp bits for decode/encode
...
At this point I'm not sure if the queues can support timestamps.
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25900 >
2024-04-11 13:40:04 +10:00
Dave Airlie
1d74661dfd
radv: add encoder queue support pieces and encoder queries.
...
This is just checks for events and avoiding an assert in the winsys,
and adds support for the encoder queries.
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25900 >
2024-04-11 12:57:05 +10:00
Samuel Pitoiset
87fde606cf
radv: use SPDX-License-Identifier
...
Only files under src/amd/vulkan/** are concerned.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28599 >
2024-04-08 07:17:31 +00:00
Samuel Pitoiset
69b911bc53
radv: remove radv_private.h
...
This file was a giant mess and I'm very happy to remove it entirely.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28568 >
2024-04-04 21:57:46 +00:00
Samuel Pitoiset
0388df3d08
radv: replace RADV_FROM_HANDLE by VK_FROM_HANDLE
...
It was exactly the same thing.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28568 >
2024-04-04 21:57:45 +00:00
Samuel Pitoiset
195383a5ec
radv: add radv_rmv.h
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551 >
2024-04-04 16:35:15 +00:00
Samuel Pitoiset
db736ebf53
radv: implement VK_EXT_device_address_binding_report
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28373 >
2024-04-03 08:48:36 +00:00
Samuel Pitoiset
c4e83026af
radv: add radv_perfcounter.h
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28510 >
2024-04-02 21:04:53 +00:00
Samuel Pitoiset
bccaeab503
radv: add radv_query.h
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28510 >
2024-04-02 21:04:53 +00:00
Samuel Pitoiset
b35b2718be
radv: remove radv_physical_device::instance
...
Get the instance object using the base object.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28500 >
2024-04-01 16:35:09 +00:00
Samuel Pitoiset
e2c29c9bb6
radv: remove radv_device::instance
...
Use the physical device to access the instance.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28500 >
2024-04-01 16:35:09 +00:00
Samuel Pitoiset
675d7f4bd0
radv: remove radv_cmd_buffer::device
...
Get the logical device object using the base object.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28500 >
2024-04-01 16:35:09 +00:00
Samuel Pitoiset
896c9cf486
radv: remove radv_device::physical_device
...
Get the logical device object using the base object.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28500 >
2024-04-01 16:35:09 +00:00
Samuel Pitoiset
310597cab6
radv: rename radv_physical_device::rad_info to info
...
The extra rad_ prefix isn't necessary and it's longer to type.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28500 >
2024-04-01 16:35:09 +00:00
Samuel Pitoiset
e715cf30dc
radv/rmv: log allocated/destroyed BOs in radv_buffer_{create,destroy}()
...
This will likely log more things because a bunch of them were missing.
This will also allow us to implement
VK_EXT_device_address_binding_report more easily.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28367 >
2024-03-27 08:54:34 +01:00
Samuel Pitoiset
36f6a5b8ff
radv: add radv_bo_{create,destroy}() helpers
...
This will allow us to easily log all BOs both for RMV and
VK_EXT_device_address_binding_report.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28367 >
2024-03-27 08:54:23 +01:00
Samuel Pitoiset
0b1ab23130
radv/rmv: remove unnecessary is_internal parameter to some helpers
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28367 >
2024-03-27 08:52:50 +01:00
Samuel Pitoiset
f9105dea24
radv: make some create resources helpers static
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28367 >
2024-03-27 08:52:50 +01:00
Bas Nieuwenhuizen
cccbe1527c
radv/winsys: Use radv_buffer_map wrapper.
...
So we can have 1 function ptr and then have a version with default
args.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27689 >
2024-03-01 15:07:09 +00:00
Bas Nieuwenhuizen
f7e8fdf35d
radv: Add winsys argument to buffer map/unmap.
...
To use later.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27689 >
2024-03-01 15:07:09 +00:00
Samuel Pitoiset
f9787864e0
radv: remove a TODO about adding mesh/task queries on GFX11
...
It's implemented and it's passing dEQP-VK.mesh_shader.ext.query.*.
Though, it's not enabled yet because task shader can still randomly
hang on RDNA3.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26304 >
2024-02-22 14:12:00 +00:00
Samuel Pitoiset
35e0c88f49
radv: add support for task shader invocations queries on GFX11
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26304 >
2024-02-22 14:12:00 +00:00
Samuel Pitoiset
b24e07e9ed
radv: add support for mesh primitives queries on GFX11
...
This is natively supported with new pipeline statistics.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26304 >
2024-02-22 14:12:00 +00:00
Chia-I Wu
ec5d0ffb04
radv: fix pipeline stats mask
...
Left-shifting by 11*8 or 14*8 is undefined. This fixes many
dEQP-VK.query_pool.statistics_query.* failures (but not pre-existing
flakes) for release builds using clang.
Fixes: 48aabaf225 ("radv: do not harcode the pipeline stats mask for query resolves")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27651 >
2024-02-16 17:04:30 +00:00
Joshua Ashton
86954c766f
radv: Ensure vkGetQueryPoolResults returns in finite-time
...
When a device lost occured, we were not ensuring that
vkGetQueryPoolResults with VK_QUERY_RESULT_WAIT_BIT was returning.
We could have the caller stuck in our while(...) loop polling the query
atomics forever which violates the finite-time guarantees of this function.
This solves that by adding a timeout to this call to be double the
default TDR timeout for the potential queues relating to this query.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27091 >
2024-01-19 07:52:01 +00:00
Samuel Pitoiset
10e2dbb63b
radv: delay emitting streamout enable at draw time
...
Since Vulkan 1.3.271, the spec allowed vkCmdBeginTransformFeedbackEXT
to be called without an active graphics pipeline bound when using
shader objects.
That means that the last VGT shader would be NULL once VKCTS is
updated accordingly. This change delays emitting streamout enable at
draw time to make sure the last VGT shader is present, regarldess if
ESO is enabled or not.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27075 >
2024-01-17 17:33:17 +00:00
Samuel Pitoiset
58d2a78dba
radv: move dri options to radv_instance::drirc
...
To make it clearer that such an option is a per-application option.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26946 >
2024-01-10 10:07:40 +00:00
Samuel Pitoiset
395dee0d89
radv: drop si_ prefix from all functions
...
Most of these functions were copied from RadeonSI but they should be
prefixed with radv_ instead.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26854 >
2024-01-04 08:40:37 +00:00
Samuel Pitoiset
744cb98bc6
radv: add support for version 2 of all descriptor binding commands
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26757 >
2024-01-03 11:24:27 +00:00
Timur Kristóf
7a4f535145
radv: Implement vkCmdWriteTimestamp2 on transfer queues.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26580 >
2023-12-09 01:49:13 +00:00
Yonggang Luo
83a5fb9faf
util: Fixes note: the alignment of ‘_Atomic long long int’ fields changed in GCC 11.
...
This is a improve of https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22121
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23961 >
2023-12-05 09:26:08 +00:00
Samuel Pitoiset
6c7265338d
radv: add support for task shader invocations queries on GFX10.3
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25950 >
2023-11-21 15:24:49 +00:00
Samuel Pitoiset
1b3efecd56
radv: rework gfx10_copy_gds_query() slightly
...
To prepare for the same function with ACE.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25950 >
2023-11-21 15:24:49 +00:00
Samuel Pitoiset
b7d668a819
radv: add support for mesh shader invocations queries on GFX10.3
...
Also emulated with a GDS atomic counter in shaders.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25950 >
2023-11-21 15:24:49 +00:00
Samuel Pitoiset
48aabaf225
radv: do not harcode the pipeline stats mask for query resolves
...
Otherwise, mesh/task shader invocations would be ignored.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25950 >
2023-11-21 15:24:49 +00:00
Samuel Pitoiset
272ad65397
radv: bump the pipeline state query size to 14 on GFX10.3
...
GFX10.3 doesn't natively support mesh/task shader invocations query
and they need to be emulated in shaders. In order to share more code
between GFX10.3 and GFX11, it's easier to use the same size as GFX11.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25950 >
2023-11-21 15:24:49 +00:00
Samuel Pitoiset
7b13500a99
radv: define new pipeline statistics indices for mesh/task on GFX11
...
GFX11 uses pipeline statistics for mesh/task queries but on GFX10.3
they need to be emulated. Though the number of mesh/task shader
invocations would be copied to the pipeline statistics range to
simplify the implementation.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25950 >
2023-11-21 15:24:49 +00:00