#include <GrD3DAMDMemoryAllocator.h>
|
| ~GrD3DAMDMemoryAllocator () override |
|
gr_cp< ID3D12Resource > | createResource (D3D12_HEAP_TYPE, const D3D12_RESOURCE_DESC *, D3D12_RESOURCE_STATES initialResourceState, sk_sp< GrD3DAlloc > *allocation, const D3D12_CLEAR_VALUE *) override |
|
gr_cp< ID3D12Resource > | createAliasingResource (sk_sp< GrD3DAlloc > &allocation, uint64_t localOffset, const D3D12_RESOURCE_DESC *, D3D12_RESOURCE_STATES initialResourceState, const D3D12_CLEAR_VALUE *) override |
|
virtual gr_cp< ID3D12Resource > | createResource (D3D12_HEAP_TYPE, const D3D12_RESOURCE_DESC *, D3D12_RESOURCE_STATES initialResourceState, sk_sp< GrD3DAlloc > *allocation, const D3D12_CLEAR_VALUE *)=0 |
|
virtual gr_cp< ID3D12Resource > | createAliasingResource (sk_sp< GrD3DAlloc > &allocation, uint64_t localOffset, const D3D12_RESOURCE_DESC *, D3D12_RESOURCE_STATES initialResourceState, const D3D12_CLEAR_VALUE *)=0 |
|
| SkRefCntBase () |
|
virtual | ~SkRefCntBase () |
|
bool | unique () const |
|
void | ref () const |
|
void | unref () const |
|
Definition at line 23 of file GrD3DAMDMemoryAllocator.h.
◆ ~GrD3DAMDMemoryAllocator()
GrD3DAMDMemoryAllocator::~GrD3DAMDMemoryAllocator |
( |
| ) |
|
|
inlineoverride |
◆ createAliasingResource()
gr_cp< ID3D12Resource > GrD3DAMDMemoryAllocator::createAliasingResource |
( |
sk_sp< GrD3DAlloc > & |
allocation, |
|
|
uint64_t |
localOffset, |
|
|
const D3D12_RESOURCE_DESC * |
resourceDesc, |
|
|
D3D12_RESOURCE_STATES |
initialResourceState, |
|
|
const D3D12_CLEAR_VALUE * |
clearValue |
|
) |
| |
|
overridevirtual |
Implements GrD3DMemoryAllocator.
Definition at line 50 of file GrD3DAMDMemoryAllocator.cpp.
53 {
54 Alloc* alloc = (Alloc*)allocation.
get();
56 HRESULT hr = fAllocator->CreateAliasingResource(alloc->fAllocation, localOffset, resourceDesc,
57 initialResourceState, clearValue,
60 return nullptr;
61 }
62
64}
static SkString resource(SkPDFResourceType type, int index)
◆ createResource()
gr_cp< ID3D12Resource > GrD3DAMDMemoryAllocator::createResource |
( |
D3D12_HEAP_TYPE |
heapType, |
|
|
const D3D12_RESOURCE_DESC * |
resourceDesc, |
|
|
D3D12_RESOURCE_STATES |
initialResourceState, |
|
|
sk_sp< GrD3DAlloc > * |
allocation, |
|
|
const D3D12_CLEAR_VALUE * |
clearValue |
|
) |
| |
|
overridevirtual |
Implements GrD3DMemoryAllocator.
Definition at line 27 of file GrD3DAMDMemoryAllocator.cpp.
30 {
31 D3D12MA::ALLOCATION_DESC allocationDesc = {};
32 allocationDesc.HeapType = heapType;
33
34
35
36
38 D3D12MA::Allocation* d3d12maAllocation;
39 HRESULT hr = fAllocator->CreateResource(&allocationDesc, resourceDesc,
40 initialResourceState, clearValue,
41 &d3d12maAllocation, IID_PPV_ARGS(&
resource));
43 return nullptr;
44 }
45
46 allocation->reset(new Alloc(d3d12maAllocation));
48}
◆ Make()
Definition at line 11 of file GrD3DAMDMemoryAllocator.cpp.
12 {
13 D3D12MA::ALLOCATOR_DESC allocatorDesc = {};
14 allocatorDesc.pAdapter = adapter;
15 allocatorDesc.pDevice =
device;
16 allocatorDesc.Flags = D3D12MA::ALLOCATOR_FLAG_SINGLETHREADED;
17
18 D3D12MA::Allocator* allocator;
19 HRESULT hr = D3D12MA::CreateAllocator(&allocatorDesc, &allocator);
21 return nullptr;
22 }
23
25}
The documentation for this class was generated from the following files: