Vulkan直接使用CPU内存指针

Depending on the target platform, some recently published EXT extensions allow sharing memory between different physical devices.

VK_EXT_external_memory_host enables importing host allocations or host-mapped foreign device memory using a host pointer as the handle.

VK_EXT_external_memory_dma_buf enables importing dma_buf handles on Linux which can possibly come from another physical device.

The spec now also has a table where it's listed which external memory handle types require a matching physical device and which don't.

Additionally, I'd also like to draw your attention to additional features which enable execution control across multiple physical devices. At least on Linux (and possibly other POSIX based systems) semaphores and fences can be shared across physical devices if the FENCE_FD and SYNC_FD handle types are used. These are part of the KHR external semaphore/fence extensions.

扩展 VK_EXT_external_memory_host2018404被合并到Android主分支,后续的版本可能可以使用这个插件了,这个使得显卡设备可以直接使用CPU创建的内存指针,减少内存的拷贝操作。

参考链接


发布者

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注