[vulkan] Automatically add linux buffer sharing extensions if available. (#7317)

* Automatically add linux sharing extensions to the requirements if supported.

* Correct comment.
This commit is contained in:
Vecvec
2025-03-13 04:27:34 +13:00
committed by GitHub
parent 3196a9d6fb
commit a13f0a03ef

View File

@@ -1051,6 +1051,16 @@ impl PhysicalDeviceProperties {
extensions.push(khr::external_memory_win32::NAME);
}
// Optional `VK_KHR_external_memory_fd`
if self.supports_extension(khr::external_memory_fd::NAME) {
extensions.push(khr::external_memory_fd::NAME);
}
// Optional `VK_EXT_external_memory_dma`
if self.supports_extension(ext::external_memory_dma_buf::NAME) {
extensions.push(ext::external_memory_dma_buf::NAME);
}
// Require `VK_KHR_draw_indirect_count` if the associated feature was requested
// Even though Vulkan 1.2 has promoted the extension to core, we must require the extension to avoid
// large amounts of spaghetti involved with using PhysicalDeviceVulkan12Features.