Realm

vk::mem · Structs · I1

Actual external backing extent and compatible types for one import.

StRustExperimental

Stvk::mem::ImportMemoryInfo

pub struct ImportMemoryInfo { pub allocation_size: u64, pub memory_type_bits: u32, pub resource: Option<ImportResource>, }
Actual external backing extent and compatible types for one import.

Contract

Actual external backing extent and compatible types for one import.

Attach through super::AllocationChain::new_from_record_with_import. This is Rust metadata, not a Vulkan ABI record or a support query. All bytes are charged to the selected heap even when Vulkan ignores the size.

Fields

allocation_size

Field
allocation_size: u64

Exact backing size from native external properties or authoritative OS metadata.

memory_type_bits

Field
memory_type_bits: u32

Compatible native types for this exact device and payload; never inferred from PFNs.

resource

Field
resource: Option<ImportResource>

Exact resource when dedication is required or pre-bind requirements cannot be queried. Its requirements must fit the supplied extent and type mask. Binding remains explicit.

Methods and associated items

new

Method
pub fn new(allocation_size: u64, memory_type_bits: u32) -> Self

Describe explicit backing size/types without resource-specific dedication. The unsafe import operation still requires authoritative payload/device metadata.

set_allocation_size

Method
pub fn set_allocation_size(self, value: u64) -> Self

Set allocation_size and return the updated record.

set_memory_type_bits

Method
pub fn set_memory_type_bits(self, value: u32) -> Self

Set memory_type_bits and return the updated record.

set_resource

Method
pub fn set_resource(self, value: Option<ImportResource>) -> Self

Set resource and return the updated record.

fmt

Method
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Formats the value using the given formatter. Read more