#include <GrD3DBuffer.h>
|
| GrD3DBuffer (GrD3DGpu *, size_t size, GrGpuBufferType, GrAccessPattern, gr_cp< ID3D12Resource >, sk_sp< GrD3DAlloc >, D3D12_RESOURCE_STATES, std::string_view label) |
|
void | onAbandon () override |
|
void | onRelease () override |
|
| GrGpuBuffer (GrGpu *, size_t sizeInBytes, GrGpuBufferType, GrAccessPattern, std::string_view label) |
|
void | registerWithCache (skgpu::Budgeted) |
|
void | registerWithCacheWrapped (GrWrapCacheable) |
|
| GrGpuResource (GrGpu *, std::string_view label) |
|
virtual | ~GrGpuResource () |
|
GrGpu * | getGpu () const |
|
virtual void | onRelease () |
|
virtual void | onAbandon () |
|
virtual void | setMemoryBacking (SkTraceMemoryDump *, const SkString &) const |
|
SkString | getResourceName () const |
|
void | dumpMemoryStatisticsPriv (SkTraceMemoryDump *traceMemoryDump, const SkString &resourceName, const char *type, size_t size) const |
|
| GrIORef () |
|
bool | internalHasRef () const |
|
bool | internalHasNoCommandBufferUsages () const |
|
void | addInitialRef () const |
|
| GrBuffer ()=default |
|
Definition at line 18 of file GrD3DBuffer.h.
◆ ~GrD3DBuffer()
GrD3DBuffer::~GrD3DBuffer |
( |
| ) |
|
|
inlineoverride |
◆ GrD3DBuffer()
Definition at line 82 of file GrD3DBuffer.cpp.
89 , fD3DResource(std::move(bufferResource))
90 , fAlloc(std::move(alloc)) {
92
93
94
96}
D3D12_RESOURCE_STATES fResourceState
size_t size() const final
GrGpuBufferType intendedType() const
GrAccessPattern accessPattern() const
void registerWithCache(skgpu::Budgeted)
◆ d3dResource()
ID3D12Resource * GrD3DBuffer::d3dResource |
( |
| ) |
const |
|
inline |
◆ Make()
Definition at line 64 of file GrD3DBuffer.cpp.
65 {
67 D3D12_RESOURCE_STATES resourceState;
68
71 &resourceState, &alloc);
73 return nullptr;
74 }
75
77 std::move(
resource), std::move(alloc),
78 resourceState,
79 "MakeD3DBuffer"));
80}
static gr_cp< ID3D12Resource > make_d3d_buffer(GrD3DGpu *gpu, size_t size, GrGpuBufferType intendedType, GrAccessPattern accessPattern, D3D12_RESOURCE_STATES *resourceState, sk_sp< GrD3DAlloc > *alloc)
@ kStatic_GrAccessPattern
static SkString resource(SkPDFResourceType type, int index)
GrD3DBuffer(GrD3DGpu *, size_t size, GrGpuBufferType, GrAccessPattern, gr_cp< ID3D12Resource >, sk_sp< GrD3DAlloc >, D3D12_RESOURCE_STATES, std::string_view label)
bool protectedContext() const
◆ onAbandon()
void GrD3DBuffer::onAbandon |
( |
| ) |
|
|
overrideprotectedvirtual |
Overridden to abandon any internal handles, ptrs, etc to backend API resources. This may be called when the underlying 3D context is no longer valid and so no backend API calls should be made.
Reimplemented from GrGpuResource.
Definition at line 138 of file GrD3DBuffer.cpp.
138 {
139 this->releaseResource();
141}
◆ onRelease()
void GrD3DBuffer::onRelease |
( |
| ) |
|
|
overrideprotectedvirtual |
Overridden to free GPU resources in the backend API.
Reimplemented from GrGpuResource.
Definition at line 133 of file GrD3DBuffer.cpp.
133 {
134 this->releaseResource();
136}
◆ setResourceState()
void GrD3DBuffer::setResourceState |
( |
const GrD3DGpu * |
gpu, |
|
|
D3D12_RESOURCE_STATES |
newResourceState |
|
) |
| |
Definition at line 98 of file GrD3DBuffer.cpp.
99 {
101
104 return;
105 }
106
107 D3D12_RESOURCE_TRANSITION_BARRIER barrier = {};
109 barrier.Subresource = D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES;
111 barrier.StateAfter = newResourceState;
112
114
116}
static constexpr bool SkToBool(const T &x)
ID3D12Resource * d3dResource() const
void addBufferResourceBarriers(GrD3DBuffer *buffer, int numBarriers, D3D12_RESOURCE_TRANSITION_BARRIER *barriers) const
◆ fResourceState
D3D12_RESOURCE_STATES GrD3DBuffer::fResourceState |
|
protected |
The documentation for this class was generated from the following files: