Struct gpu_allocator::d3d12::AllocationCreateDesc
source · 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_winapi_d3d12_resource_desc(
device: *const ID3D12Device,
desc: &D3D12_RESOURCE_DESC,
name: &'a str,
location: MemoryLocation,
) -> Self
pub fn from_winapi_d3d12_resource_desc( device: *const ID3D12Device, desc: &D3D12_RESOURCE_DESC, name: &'a str, location: MemoryLocation, ) -> Self
Helper conversion function utilizing winapi
types.
This function is also available for [windows::Win32::Graphics::Direct3D12
]
types as from_d3d12_resource_desc()
.
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 conversion function utilizing [windows::Win32::Graphics::Direct3D12
] types.
This function is also available for winapi
types as from_winapi_d3d12_resource_desc()
when the public-winapi
feature is enabled.
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>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)