VulkanDevice: Add TryImportHostMemory

Utilizing `VK_EXT_external_memory_host`, attempt to import the host-pointer into a `VkBuffer`, `VkDeviceMemory`, and an offset to the start of the data. When the page size matches the import alignment, then it is possible to import an entire range of memory from the host directly into a vulkan-side buffer to read and write into.
This commit is contained in:
Wunkolo
2024-01-20 15:57:22 -08:00
committed by Stenzek
parent 0ce1149e41
commit 4309d8ebf3
2 changed files with 87 additions and 0 deletions

View File

@ -341,6 +341,9 @@ private:
void RenderBlankFrame();
bool TryImportHostMemory(const void* data, u32 data_size, VkBufferUsageFlags buffer_usage, VkDeviceMemory* out_memory,
VkBuffer* out_buffer, u32* out_offset);
bool CheckDownloadBufferSize(u32 required_size);
void DestroyDownloadBuffer();