drm/amdgpu
Bas Nieuwenhuizen 085ee3e488 amdgpu: Add vamgr for capture/replay.
In Vulkan we have extensions to assist with capture in replay in a
world where addresses are returned to the application. This involves
creating buffers at the same VA during replay as they were during
capture.

By itself libdrm_amdgpu already has support for this, but there is
the obvious failure mode that if another buffer is already allocated
at that VA things fail spectacularly. This is an actual issue as
internal buffers, like winsys images or shader binaries also
participate in the same VA allocation.

To avoid this problem applications have to create buffers which
are going to be captured with a flag, and the implementation is to
separate VA allocation for those buffers to reduce the collision risk:

"Implementations are expected to separate such buffers in the GPU address
space so normal allocations will avoid using these addresses. Apps/tools
should avoid mixing app-provided and implementation-provided addresses for
buffers created with VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT,
to avoid address space allocation conflicts."

This patch implements that by adding a flag for these buffers and allocating
address space from the top of the address range instead of the bottom.

Signed-off-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Christian König <christian.koenig@amd.com>
2021-06-15 13:08:20 +00:00
..
.editorconfig Add meson build system 2018-01-12 09:40:48 -08:00
Android.mk amdgpu: Only remember the device's marketing name 2017-12-05 12:50:20 +01:00
Makefile.sources amdgpu: remove the hash table implementation 2018-08-07 13:27:33 +02:00
amdgpu-symbols.txt amdgpu: add function of INFO ioctl for querying video caps 2021-04-06 08:58:57 -04:00
amdgpu.h amdgpu: Add vamgr for capture/replay. 2021-06-15 13:08:20 +00:00
amdgpu_asic_id.c meson,configure: include config.h automatically 2018-03-20 18:19:26 +00:00
amdgpu_bo.c amdgpu: Add BO handle to table in amdgpu_bo_create 2019-07-01 11:31:59 +02:00
amdgpu_cs.c amdgpu: clean up the cs structure variable 2020-02-12 19:55:22 +08:00
amdgpu_device.c amdgpu: Rename fd_mutex/list to dev_mutex/list 2019-07-01 11:32:05 +02:00
amdgpu_gpu_info.c amdgpu: add function of INFO ioctl for querying video caps 2021-04-06 08:58:57 -04:00
amdgpu_internal.h amdgpu: increase cpu_map_count storage size 2020-03-23 13:18:01 +01:00
amdgpu_vamgr.c amdgpu: Add vamgr for capture/replay. 2021-06-15 13:08:20 +00:00
amdgpu_vm.c amdgpu: annotate public functions 2018-09-19 22:46:45 -07:00
handle_table.c amdgpu: fix off by one in handle_table_insert 2018-08-16 08:50:04 +02:00
handle_table.h amdgpu: add handle table implementation v2 2018-08-07 13:27:16 +02:00
libdrm_amdgpu.pc.in amdgpu: add libdrm as private requirement/dependency 2016-02-04 13:22:50 +00:00
meson.build meson: use library() instead of shared_library(). 2021-03-09 16:57:32 +08:00