turnip: Use VMA for all allocations and enable replayable BDA
With MSM_INFO_SET_IOVA
it's now possible for userspace to manually
set iova instead of relying on kernel. So now we are able to support
bufferDeviceAddressCaptureReplay
feature.
Since kernel doesn't guarantee how addresses are allocated, in order to
prevent address clashes of ordinary and replayable allocations - we have
to manually allocate all IOVAs. In order to do this we use a single
util_vma_heap
, where we allocate:
- ordinary allocations - from lowest address;
- replayable allocations - from highest address.
TODO:
-
Return VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS
when appropriate -
Don't enable bufferDeviceAddressCaptureReplay
and fall back to old method ifMSM_INFO_SET_IOVA
is unavailable
Edited by Danylo Piliaiev