24 std::string_view label)
28 , fShaderResourceView(shaderResourceView) {
30 this->registerWithCache(budgeted);
41 std::string_view label)
45 , fShaderResourceView(shaderResourceView) {
50 this->registerWithCacheWrapped(cacheable);
60 std::string_view label)
64 , fShaderResourceView(shaderResourceView) {
71 const D3D12_RESOURCE_DESC&
desc,
74 std::string_view label) {
77 D3D12_RESOURCE_STATE_COPY_DEST,
116 "D3DWrappedTexture"));
121 const D3D12_RESOURCE_DESC& newDesc,
122 D3D12_RESOURCE_STATES resourceState) {
125 resourceState,
nullptr);
126 if (!
info.fResource) {
129 info.fResourceState = resourceState;
139 originalTexture->dimensions(),
143 originalTexture->mipmapStatus(),
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
std::wstring GrD3DMultiByteToWide(const std::string &str)
bool GrDxgiFormatIsCompressed(DXGI_FORMAT format)
#define INHERITED(method,...)
GrD3DMemoryAllocator * memoryAllocator() const
GrD3DResourceProvider & resourceProvider()
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
void recycleShaderView(const GrD3DDescriptorHeap::CPUHandle &)
GrD3DDescriptorHeap::CPUHandle createShaderResourceView(ID3D12Resource *resource, unsigned int mostDetailedMip=0, unsigned int mipLevels=-1)
GrD3DTextureResourceInfo fInfo
ID3D12Resource * d3dResource() const
void releaseResource(GrD3DGpu *gpu)
sk_sp< GrD3DResourceState > grD3DResourceState() const
static bool InitTextureResourceInfo(GrD3DGpu *gpu, const D3D12_RESOURCE_DESC &desc, D3D12_RESOURCE_STATES initialState, GrProtected, D3D12_CLEAR_VALUE *, GrD3DTextureResourceInfo *)
GrD3DTexture(GrD3DGpu *, SkISize dimensions, const GrD3DTextureResourceInfo &, sk_sp< GrD3DResourceState >, const GrD3DDescriptorHeap::CPUHandle &shaderResourceView, GrMipmapStatus, std::string_view label)
GrD3DGpu * getD3DGpu() const
void onRelease() override
static sk_sp< GrD3DTexture > MakeNewTexture(GrD3DGpu *, skgpu::Budgeted, SkISize dimensions, const D3D12_RESOURCE_DESC &, GrProtected, GrMipmapStatus, std::string_view label)
static sk_sp< GrD3DTexture > MakeAliasingTexture(GrD3DGpu *, sk_sp< GrD3DTexture >, const D3D12_RESOURCE_DESC &newDesc, D3D12_RESOURCE_STATES)
GrBackendTexture getBackendTexture() const override
static sk_sp< GrD3DTexture > MakeWrappedTexture(GrD3DGpu *, SkISize dimensions, GrWrapCacheable, GrIOType, const GrD3DTextureResourceInfo &, sk_sp< GrD3DResourceState >)
D3D12_CPU_DESCRIPTOR_HANDLE shaderResourceView()
void onSetLabel() override
void onAbandon() override
std::string getLabel() const
bool wasDestroyed() const
SkISize dimensions() const
void onAbandon() override
void onRelease() override
GrMipmapStatus mipmapStatus() const
EMSCRIPTEN_KEEPALIVE void empty()