Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/vulkan/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,15 @@ impl Allocation {
self.chunk_id
}

/// Returns the index into the `memory_types` array of
/// `vk::PhysicalDeviceMemoryProperties` of the memory type that this
/// allocation is using.
/// This can be useful when trying to bind this allocation to a resource
/// with specific memory requirements.
pub fn memory_type_index(&self) -> usize {
self.memory_type_index
}

///Returns the [`vk::MemoryPropertyFlags`] of this allocation.
pub fn memory_properties(&self) -> vk::MemoryPropertyFlags {
self.memory_properties
Expand Down