Wunkolo / Vulkanator

An Adobe After Effects sample project with Vulkan GPU acceleration
MIT License
57 stars 2 forks source link

Conditionally utilize `VK_EXT_external_memory_host` to optimize bandwidth #4

Open Wunkolo opened 1 year ago

Wunkolo commented 1 year ago

This is something I've already done before in my other personal plugins, where rather than copying data into a staging ring-buffer to upload/download onto the GPU, VK_EXT_external_memory_host allows arbitrary pointers to be imported directly. This would remove an entire copy from the upload/download path by allowing vulkan to directly write into host-memory.

image

This would also have to introduce the concept of "trivially importable memory", where minImportedHostPointerAlignment is the same as the operating system's page-size (4096 bytes) allowing practically any pointer to be imported.

MoltenVK support is tracked over at https://github.com/KhronosGroup/MoltenVK/issues/794.

Wunkolo commented 1 year ago

MacOS dependency on https://github.com/KhronosGroup/MoltenVK/issues/794 and https://github.com/KhronosGroup/MoltenVK/pull/1854