Esempio n. 1
0
 internal GpuResource(
     ComputeDevice device,
     UniqueComPtr <ID3D12Resource> resource,
     InternalAllocDesc *desc,
     ComputeAllocator?allocator,
     int heapIndex   = -1 /* no relevant heap block */,
     HeapBlock block = default
     )
 {
     _device    = device;
     _value     = resource.Move();
     Desc       = *desc;
     HeapIndex  = heapIndex;
     Block      = block;
     _allocator = allocator;
 }
Esempio n. 2
0
        // Convienience wrapper methods over ID3D12Device*

        internal D3D12_RESOURCE_ALLOCATION_INFO GetAllocationInfo(InternalAllocDesc *desc)
        => DevicePointer->GetResourceAllocationInfo(0, 1, &desc->Desc);