-
Notifications
You must be signed in to change notification settings - Fork 398
Description
VMA version: 3442720
What i'm trying to do is to have all VMA-allocated GPU images/buffers be exportable by default while also supporting memory import (auto-export and import are mutually exclusive here).
For the auto-export part, I set the supported handle types in VmaAllocatorCreateInfo::pTypeExternalMemoryHandleTypes
for all DEVICE_LOCAL
memory types.
For the import part, I use vmaCreateDedicatedImage
/vmaCreateDedicatedBuffer
+ VkImportMemoryWin32HandleInfoKHR
+ custom pool, since the doc says that VmaAllocatorCreateInfo::pTypeExternalMemoryHandleTypes
only affects default pools.
The problem I'm facing is that when I import memory, VkExportMemoryAllocateInfoKHR
from the auto-export part still gets pushed to the VkMemoryAllocateInfo
pNext chain, which means I end up with both VkExportMemoryAllocateInfoKHR
with export handle type + VkImportMemoryWin32HandleInfoKHR
with import handle type.
As the handle types I use for auto-export and import are not compatible with each other (D3D11_TEXTURE
for import and OPAQUE_WIN32
for export), this doesn't work.