Skip to content

Commit 990aef9

Browse files
authored
Expose external memory of vulkan texture (#8257)
1 parent 2f7ebf1 commit 990aef9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

wgpu-hal/src/vulkan/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -963,6 +963,13 @@ impl Texture {
963963
pub unsafe fn raw_handle(&self) -> vk::Image {
964964
self.raw
965965
}
966+
967+
/// # Safety
968+
///
969+
/// - The external memory must not be manually freed
970+
pub unsafe fn external_memory(&self) -> Option<vk::DeviceMemory> {
971+
self.external_memory
972+
}
966973
}
967974

968975
#[derive(Debug)]

0 commit comments

Comments
 (0)