Struct vulkan_malloc::AllocatorMemoryRequirements [] [src]

pub struct AllocatorMemoryRequirements {
    pub own_memory: bool,
    pub usage: MemoryUsage,
    pub required_flags: MemoryPropertyFlags,
    pub preferred_flags: Option<MemoryPropertyFlags>,
    pub never_allocate: bool,
}

In addition to normal MemoryRequirements, this struct provides additional details affecting how the allocator chooses memory to allocate.

Fields

Set to true if this allocation should have its own memory block.

Use it for special, big resources, like fullscreen images used as attachments.

This flag must also be used for host visible resources that you want to map simultaneously because otherwise they might end up as regions of the same DeviceMemory, and mapping the same DeviceMemory multiple times is illegal.

Intended usage of the allocated memory. If you specify required_flags as non-empty, you can (but do not have to) leave this set to MemoryUsage::Unknown.

Flags that must be satisfied by the memory type used for allocation. Can be left empty if usage is not MemoryUsage::Unknown.

Flags that determine which memory types should be chosen preferentially over others. If this is not empty, it must be a superset of required_flags.

Set this flag to only try to allocate from existing device memory blocks and never create new blocks.

If the new allocation cannot be placed in any of the existing blocks, allocation fails with Error::OutOfDeviceMemory.

It makes no sense to set own_memory and never_allocate at the same time.

Trait Implementations

impl Copy for AllocatorMemoryRequirements
[src]

impl Clone for AllocatorMemoryRequirements
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for AllocatorMemoryRequirements
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Eq for AllocatorMemoryRequirements
[src]

impl PartialOrd for AllocatorMemoryRequirements
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

[src]

This method tests less than (for self and other) and is used by the < operator. Read more

[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Ord for AllocatorMemoryRequirements
[src]

[src]

This method returns an Ordering between self and other. Read more

[src]

🔬 This is a nightly-only experimental API. (ord_max_min)

Compares and returns the maximum of two values. Read more

[src]

🔬 This is a nightly-only experimental API. (ord_max_min)

Compares and returns the minimum of two values. Read more

impl Hash for AllocatorMemoryRequirements
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more