13GrD3DTextureRenderTarget::GrD3DTextureRenderTarget(
25 std::string_view label)
35 colorRenderTargetView,
36 resolveRenderTargetView,
39 this->registerWithCache(budgeted);
42GrD3DTextureRenderTarget::GrD3DTextureRenderTarget(
51 std::string_view label)
56 this->registerWithCache(budgeted);
59GrD3DTextureRenderTarget::GrD3DTextureRenderTarget(
71 std::string_view label)
81 colorRenderTargetView,
82 resolveRenderTargetView,
85 this->registerWithCacheWrapped(cacheable);
88GrD3DTextureRenderTarget::GrD3DTextureRenderTarget(
97 std::string_view label)
102 this->registerWithCacheWrapped(cacheable);
110 const D3D12_RESOURCE_DESC& resourceDesc,
113 std::string_view label) {
115 D3D12_RESOURCE_STATES initialState = sampleCnt > 1 ? D3D12_RESOURCE_STATE_RESOLVE_DEST
116 : D3D12_RESOURCE_STATE_RENDER_TARGET;
118 D3D12_CLEAR_VALUE clearValue = {};
119 clearValue.Format = resourceDesc.Format;
120 clearValue.Color[0] = 0;
121 clearValue.Color[1] = 0;
122 clearValue.Color[2] = 0;
123 clearValue.Color[3] = 0;
130 static_cast<D3D12_RESOURCE_STATES
>(
info.fResourceState)));
143 std::tie(msInfo, msState) =
160 msaaRenderTargetView,
205 std::tie(msInfo, msState) =
222 msaaRenderTargetView,
226 "MakeWrappedTextureRenderTargetWithMSAASurface");
238 "MakeWrappedTextureRenderTarget"));
242size_t GrD3DTextureRenderTarget::onGpuMemorySize()
const {
244 if (numColorSamples > 1) {
253void GrD3DTextureRenderTarget::onSetLabel() {
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
GrD3DResourceProvider & resourceProvider()
void onSetLabel() override
GrD3DDescriptorHeap::CPUHandle createShaderResourceView(ID3D12Resource *resource, unsigned int mostDetailedMip=0, unsigned int mipLevels=-1)
GrD3DDescriptorHeap::CPUHandle createRenderTargetView(ID3D12Resource *textureResource)
static sk_sp< GrD3DTextureRenderTarget > MakeWrappedTextureRenderTarget(GrD3DGpu *, SkISize dimensions, int sampleCnt, GrWrapCacheable, const GrD3DTextureResourceInfo &, sk_sp< GrD3DResourceState >)
GrBackendFormat backendFormat() const override
static sk_sp< GrD3DTextureRenderTarget > MakeNewTextureRenderTarget(GrD3DGpu *, skgpu::Budgeted, SkISize dimensions, int sampleCnt, const D3D12_RESOURCE_DESC &, GrProtected isProtected, GrMipmapStatus, std::string_view label)
static bool InitTextureResourceInfo(GrD3DGpu *gpu, const D3D12_RESOURCE_DESC &desc, D3D12_RESOURCE_STATES initialState, GrProtected, D3D12_CLEAR_VALUE *, GrD3DTextureResourceInfo *)
static std::pair< GrD3DTextureResourceInfo, sk_sp< GrD3DResourceState > > CreateMSAA(GrD3DGpu *gpu, SkISize dimensions, int sampleCnt, const GrD3DTextureResourceInfo &info, SkColor4f clearColor)
D3D12_CPU_DESCRIPTOR_HANDLE shaderResourceView()
SkISize dimensions() const
static size_t ComputeSize(const GrBackendFormat &, SkISize dimensions, int colorSamplesPerPixel, skgpu::Mipmapped, bool binSize=false)
skgpu::Mipmapped mipmapped() const
GrMipmapStatus mipmapStatus() const
gr_cp< ID3D12Resource > fResource
skgpu::Protected fProtected