Skip to content

Commit a13f0a0

Browse files
authored
[vulkan] Automatically add linux buffer sharing extensions if available. (#7317)
* Automatically add linux sharing extensions to the requirements if supported. * Correct comment.
1 parent 3196a9d commit a13f0a0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

wgpu-hal/src/vulkan/adapter.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,6 +1051,16 @@ impl PhysicalDeviceProperties {
10511051
extensions.push(khr::external_memory_win32::NAME);
10521052
}
10531053

1054+
// Optional `VK_KHR_external_memory_fd`
1055+
if self.supports_extension(khr::external_memory_fd::NAME) {
1056+
extensions.push(khr::external_memory_fd::NAME);
1057+
}
1058+
1059+
// Optional `VK_EXT_external_memory_dma`
1060+
if self.supports_extension(ext::external_memory_dma_buf::NAME) {
1061+
extensions.push(ext::external_memory_dma_buf::NAME);
1062+
}
1063+
10541064
// Require `VK_KHR_draw_indirect_count` if the associated feature was requested
10551065
// Even though Vulkan 1.2 has promoted the extension to core, we must require the extension to avoid
10561066
// large amounts of spaghetti involved with using PhysicalDeviceVulkan12Features.

0 commit comments

Comments
 (0)