Skip to content

Commit 39f6596

Browse files
authored
[hal] Minor doc fixes for Vulkan texture memory changes. (gfx-rs#8703)
1 parent 660b21c commit 39f6596

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

wgpu-hal/src/vulkan/device.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ impl super::Device {
488488
/// - If `drop_callback` is [`None`], wgpu-hal will take ownership of `vk_image`. If
489489
/// `drop_callback` is [`Some`], `vk_image` must be valid until the callback is called.
490490
/// - If the `ImageCreateFlags` does not contain `MUTABLE_FORMAT`, the `view_formats` of `desc` must be empty.
491-
/// - If `external_memory` is not [`super::TextureMemory::External`], wgpu-hal will take ownership of the
491+
/// - If `memory` is not [`super::TextureMemory::External`], wgpu-hal will take ownership of the
492492
/// memory (which is presumed to back `vk_image`). Otherwise, the memory must remain valid until
493493
/// `drop_callback` is called.
494494
pub unsafe fn texture_from_raw(

wgpu-hal/src/vulkan/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,8 @@ impl Texture {
733733

734734
/// # Safety
735735
///
736-
/// - The external memory must not be manually freed
736+
/// - The caller must not free the `vk::DeviceMemory` or
737+
/// `gpu_alloc::MemoryBlock` in the returned `TextureMemory`.
737738
pub unsafe fn memory(&self) -> &TextureMemory {
738739
&self.memory
739740
}

0 commit comments

Comments
 (0)