pub struct AllocationCreateDesc<'a> {
pub name: &'a str,
pub location: MemoryLocation,
pub size: u64,
pub alignment: u64,
pub resource_category: ResourceCategory,
}
Fields§
§name: &'a str
Name of the allocation, for tracking and debugging purposes
location: MemoryLocation
Location where the memory allocation should be stored
size: u64
Size of allocation, should be queried using [ID3D12Device::GetResourceAllocationInfo()
]
alignment: u64
Alignment of allocation, should be queried using [ID3D12Device::GetResourceAllocationInfo()
]
resource_category: ResourceCategory
Resource category based on resource dimension and flags. Can be created from a [D3D12_RESOURCE_DESC
]
using the helper into()
function. The resource category is ignored when Resource Heap Tier 2 or higher
is supported.
Implementations§
Source§impl<'a> AllocationCreateDesc<'a>
impl<'a> AllocationCreateDesc<'a>
Sourcepub fn from_d3d12_resource_desc(
device: &ID3D12Device,
desc: &D3D12_RESOURCE_DESC,
name: &'a str,
location: MemoryLocation,
) -> Self
pub fn from_d3d12_resource_desc( device: &ID3D12Device, desc: &D3D12_RESOURCE_DESC, name: &'a str, location: MemoryLocation, ) -> Self
Helper function to construct an AllocationCreateDesc
from an existing
[D3D12_RESOURCE_DESC
] utilizing [ID3D12Device::GetResourceAllocationInfo()
].
Trait Implementations§
Source§impl<'a> Clone for AllocationCreateDesc<'a>
impl<'a> Clone for AllocationCreateDesc<'a>
Source§fn clone(&self) -> AllocationCreateDesc<'a>
fn clone(&self) -> AllocationCreateDesc<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<'a> Freeze for AllocationCreateDesc<'a>
impl<'a> RefUnwindSafe for AllocationCreateDesc<'a>
impl<'a> Send for AllocationCreateDesc<'a>
impl<'a> Sync for AllocationCreateDesc<'a>
impl<'a> Unpin for AllocationCreateDesc<'a>
impl<'a> UnwindSafe for AllocationCreateDesc<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more