8#ifndef GrD3DBuffer_DEFINED
10#define GrD3DBuffer_DEFINED
26 return fD3DResource.
get();
41 void releaseResource();
45 bool onClearToZero()
override;
46 bool onUpdateData(
const void*
src,
size_t offset,
size_t size,
bool preserve)
override;
52 void validate()
const;
55 void onSetLabel()
override;
64 ID3D12Resource* fStagingBuffer =
nullptr;
65 size_t fStagingOffset = 0;
void onAbandon() override
ID3D12Resource * d3dResource() const
void setResourceState(const GrD3DGpu *gpu, D3D12_RESOURCE_STATES newResourceState)
void onRelease() override
D3D12_RESOURCE_STATES fResourceState
static sk_sp< GrD3DBuffer > Make(GrD3DGpu *, size_t size, GrGpuBufferType, GrAccessPattern)
GrD3DBuffer(GrD3DGpu *, size_t size, GrGpuBufferType, GrAccessPattern, gr_cp< ID3D12Resource >, sk_sp< GrD3DAlloc >, D3D12_RESOURCE_STATES, std::string_view label)
size_t size() const final
GrGpuBuffer(GrGpu *, size_t sizeInBytes, GrGpuBufferType, GrAccessPattern, std::string_view label)
bool wasDestroyed() const