Samuel Pitoiset
2009815d61
radv: add radv_wait_for_vm_map_updates drirc and enable for Forza Horizon 5
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13321
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38031 >
2025-10-27 07:56:45 +00:00
Samuel Pitoiset
f9af7f7b2a
radv: use radv_buffer_get_va() more
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38031 >
2025-10-27 07:56:44 +00:00
Emma Anholt
f7cbc7b1c5
radv: Allocate BOs as implicit sync even if the WSI is doing implicit sync.
...
As noted, the flag we allocate with controls whether *anyone* can implicit
sync on the BO through amdgpu interfaces, not just whether our fd does.
This restores radv to the behavior before the regressing commit.
Fixes: 4dcf32c56e ("wsi/drm: Don't request implicit sync if we're doing implicit sync ourselves.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37772 >
2025-10-10 19:17:04 +00:00
Emma Anholt
38ac55ebff
radv: Restore marking WSI image's mem->buffer as uncached.
...
Prior to 4dcf32c56e , radv was getting a request for implicit sync, even
when we were doing the work to do implicit sync in the WSI. Once that was
turned off, we incidentally dropped flagging WSI's mem->buffer as
uncached, due to it being under the wrong condition.
Fixes: 4dcf32c56e ("wsi/drm: Don't request implicit sync if we're doing implicit sync ourselves.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37772 >
2025-10-10 19:17:04 +00:00
Konstantin Seurer
0d73aeea27
radv: Add RADV_DEBUG=validatevas for address validation in nir
...
The option creates a buffer where each bit stores whether the
corresponding 4096 byte memory section has been allocated. The helper
radv_build_is_valid_va allows for querying the validity of addresses
inside a nir shader which can be useful for debugging.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34392 >
2025-08-15 10:32:35 +00:00
Samuel Pitoiset
ea742877f6
radv: re-run clang-format
...
For style consistency.
$ clang-format -i $(find src/amd/vulkan/ -name "*.h" -o -name "*.c" -o -name "*.cpp")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36118 >
2025-07-16 09:10:33 +02:00
Samuel Pitoiset
219a2b1e32
radv: ignore radv_zero_vram=true if zeroInitialDeviceMemory is enabled
...
To let applications like vkd3d-proton to take full control.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34896 >
2025-05-12 06:53:55 +00:00
Samuel Pitoiset
eaf646d020
radv: implement VK_EXT_zero_initialize_device_memory
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34896 >
2025-05-12 06:53:55 +00:00
Samuel Pitoiset
410f7f9f6e
radv: only enable DCC for invisible VRAM on GFX12
...
DCC should only be allowed on invisible VRAM, otherwise the CPU could
read the data and it will read garbage if it's compressed.
This also caused GPU hangs after suspend/resume probably because
some buffers were compressed when moved back from GTT to VRAM.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12962
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12922
Fixes: 9af11bf306 ("radv: add initial DCC support on GFX12")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34347 >
2025-04-14 07:39:33 +00:00
Lucas Fryzek
cfcc522bf8
vulkan/runtime: Add object type to DMR API
...
radv: Update DMR usage to make use of object type arg
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33767 >
2025-03-04 15:24:39 +00:00
Julia Zhang
f504ed9e73
radv: emit device memory report for device memory events
...
Emit device memory report when radv create memory or free memory.
Signed-off-by: Julia Zhang <julia.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33088 >
2025-03-03 08:26:51 +00:00
Julia Zhang
900be035c8
radv: add import and export handle_type in radv_alloc_memory
...
The import_handle_type and export_handle_type will be used to set the
memoryObjectId for memory report.
Signed-off-by: Julia Zhang <julia.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33088 >
2025-03-03 08:26:51 +00:00
Samuel Pitoiset
9af11bf306
radv: add initial DCC support on GFX12
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33255 >
2025-02-17 12:03:09 +00:00
Samuel Pitoiset
4987926e61
radv: remove unused device memory init/finish helpers
...
Also zero-allocate the vulkan object.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33475 >
2025-02-11 15:12:33 +00:00
Samuel Pitoiset
e20d5173fd
radv: promote VK_KHR_map_memory2 to core 1.4 API
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432 >
2024-12-03 10:21:55 +00:00
Samuel Pitoiset
f8af89aaa0
radv: add address binding report support for BOs imported with a ptr
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32403 >
2024-12-03 08:13:13 +00:00
Samuel Pitoiset
723cbc95d8
radv: add address binding report support for BOs imported with a fd
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32403 >
2024-12-03 08:13:13 +00: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
e75fdac533
radv: replace align_{u32,u64}() by align{64}()
...
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
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
fb73ccea56
radv: add radv_android.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
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
83841b0b78
radv: add radv_device_memory.h
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28526 >
2024-04-03 13:32:53 +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
d7141bbf79
radv: add radv_image.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
c925f03712
radv: add radv_buffer.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
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
Bas Nieuwenhuizen
7e029735e6
radv: Implement reserving the VA range on unmap.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27689 >
2024-03-01 15:07:09 +00:00
Bas Nieuwenhuizen
a6a31538c5
radv: Support for mapping a buffer at a fixed address.
...
Doing the separate bool to support mapping at 0.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27689 >
2024-03-01 15:07:09 +00: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
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
Eric Engestrom
8b319c6db8
radv: reformat according to its .clang-format
...
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23253 >
2023-06-16 19:59:52 +00:00
Dave Airlie
5deb476095
radv: align video images internal width/height inside the driver.
...
Due to how the decoders work, they will write garbage data into
the padding, and later using the image for sampling with linear
images will use the garbage to create broken results. Let the
user specify the image size and align it up in the driver, so
sampling of the image later has the correct w/h.
cc: mesa-stable
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23227 >
2023-05-30 02:53:32 +00:00
Samuel Pitoiset
cb721d5de5
radv: use vk_image::samples instead of radv_image::info::samples
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22816 >
2023-05-08 09:17:12 +00:00
Samuel Pitoiset
cb5701eed9
radv: implement VK_KHR_map_memory2
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22032 >
2023-03-21 23:08:03 +00:00
Chia-I Wu
5691b10b0f
radv: set RADEON_FLAG_GTT_WC for external mem on vram
...
We used to set RADEON_FLAG_GTT_WC when wsi_info is set. This changes it
to set the flag for any external mem on vram, extending the logic for
apps using external memory directly.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21803 >
2023-03-09 22:21:09 +00:00
Samuel Pitoiset
842b8f14f4
radv: move device memory related code to radv_device_memory.c
...
radv_device.c is getting too big.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21767 >
2023-03-08 16:21:10 +00:00