diff --git a/crates/metal2vulkan-runtime/src/error.rs b/crates/metal2vulkan-runtime/src/error.rs index ddfee1a9c..fc0ed5845 100644 --- a/crates/metal2vulkan-runtime/src/error.rs +++ b/crates/metal2vulkan-runtime/src/error.rs @@ -1518,11 +1518,13 @@ pub enum Gap { /// [`Device::new_heap_texture_for_views`](crate::Device::new_heap_texture_for_views) and /// [`Device::heap_texture_size_and_align`](crate::Device::heap_texture_size_and_align)): in an /// exported block, whose memory is dedicated to its buffer - /// (`VUID-vkBindImageMemory-memory-10926`), or one whose image the device requires an - /// allocation of its own for, or that does not take the memory type of its heap's class - /// (`VkMemoryRequirements::memoryTypeBits`): the block's where it is placed, the Private type - /// at the size query and at a Shared heap's placement on a device without unified memory, - /// whose texture is an image of its own + /// (`VUID-vkBindImageMemory-memory-10926`), or, on a device with unified memory, in an imported + /// one ([`Device::import_host_memory`](crate::Device::import_host_memory), and on Unix the + /// dma-buf imports), a Shared block whose texture on a device without it is an image of its + /// own; or one whose image the device requires an allocation of its own for, or that does not + /// take the memory type of its heap's class (`VkMemoryRequirements::memoryTypeBits`): the + /// block's where it is placed, the Private type at the size query and at a Shared heap's + /// placement on a device without unified memory, whose texture is an image of its own /// ([`Device::has_unified_memory`](crate::Device::has_unified_memory)). /// /// Basis: ours (heap textures are built for Private and Shared heaps of placeable images). diff --git a/crates/metal2vulkan-runtime/src/texture.rs b/crates/metal2vulkan-runtime/src/texture.rs index 2c7f1a947..98e74d330 100644 --- a/crates/metal2vulkan-runtime/src/texture.rs +++ b/crates/metal2vulkan-runtime/src/texture.rs @@ -1658,12 +1658,16 @@ impl Device { /// Err: as [`Device::new_texture`], but for [`Refusal::TextureBufferNotOverBuffer`], a texture /// buffer's errors being [`Buffer::new_texture`]'s; [`Error::NoSuchBlock`] for a block the /// consumer does not hold; [`Gap::HeapTexture`] for an image in an exported block - /// ([`Device::new_exported_block`](crate::Device::new_exported_block)), or an image the device - /// requires an allocation of its own for or that does not take the memory type of the block's - /// class (the Private or the Shared type; for a Shared heap's image of its own, as - /// [`Device::heap_texture_size_and_align`]); [`Refusal::HeapTexturePlace`] for a heap range that - /// leaves its block, or a texture that does not fit in the heap at `offset` or is not aligned - /// there as the device requires ([`Device::heap_texture_size_and_align`]). + /// ([`Device::new_exported_block`](crate::Device::new_exported_block)), or, on a device with + /// unified memory, in an imported one + /// ([`Device::import_host_memory`](crate::Device::import_host_memory), and on Unix + /// `Device::import_dma_buf` and `Device::import_dma_bufs`; on a device without it, a texture in + /// an imported block, a Shared one, is an image of its own as in any Shared heap), or an image + /// the device requires an allocation of its own for or that does not take the memory type of + /// the block's class (the Private or the Shared type; for a Shared heap's image of its own, as + /// [`Device::heap_texture_size_and_align`]); [`Refusal::HeapTexturePlace`] for a heap range + /// that leaves its block, or a texture that does not fit in the heap at `offset` or is not + /// aligned there as the device requires ([`Device::heap_texture_size_and_align`]). pub fn new_heap_texture( &self, descriptor: &TextureDescriptor, @@ -1714,7 +1718,9 @@ impl Device { /// /// Err: [`Error::NoSuchBlock`]; for an image of its own, [`Device::heap_texture_size_and_align`]'s /// errors and [`Refusal::HeapTexturePlace`]; else [`Gap::HeapTexture`] for an exported block, - /// whose memory is dedicated to its buffer (`VUID-vkBindImageMemory-memory-10926`). + /// whose memory is dedicated to its buffer (`VUID-vkBindImageMemory-memory-10926`), or an + /// imported one, a Shared block of memory the consumer brought, which reaches here only on a + /// device with unified memory. fn heap_source( &self, descriptor: &TextureDescriptor,