• Home
  • Raw
  • Download

Lines Matching +full:no +full:- +full:ct

4  * Use of this source code is governed by a BSD-style license that can be
63 this->init(contextOptions, adapter, device); in GrD3DCaps()
90 // D3D12 can resolve between typeless and non-typeless formats, but we are not using in canCopyAsResolve()
101 if (src->isProtected() == GrProtected::kYes && dst->isProtected() != GrProtected::kYes) { in onCanCopySurface()
107 if (const GrRenderTargetProxy* rtProxy = dst->asRenderTargetProxy()) { in onCanCopySurface()
108 dstSampleCnt = rtProxy->numSamples(); in onCanCopySurface()
110 if (const GrRenderTargetProxy* rtProxy = src->asRenderTargetProxy()) { in onCanCopySurface()
111 srcSampleCnt = rtProxy->numSamples(); in onCanCopySurface()
113 SkASSERT((dstSampleCnt > 0) == SkToBool(dst->asRenderTargetProxy())); in onCanCopySurface()
114 SkASSERT((srcSampleCnt > 0) == SkToBool(src->asRenderTargetProxy())); in onCanCopySurface()
117 SkAssertResult(dst->backendFormat().asDxgiFormat(&dstFormat)); in onCanCopySurface()
118 SkAssertResult(src->backendFormat().asDxgiFormat(&srcFormat)); in onCanCopySurface()
120 return this->canCopyTexture(dstFormat, dstSampleCnt, srcFormat, srcSampleCnt) || in onCanCopySurface()
121 this->canCopyAsResolve(dstFormat, dstSampleCnt, srcFormat, srcSampleCnt); in onCanCopySurface()
135 GR_D3D_CALL_ERRCHECK(device->CheckFeatureSupport(D3D12_FEATURE_FEATURE_LEVELS, &flDesc, in init()
141 GR_D3D_CALL_ERRCHECK(adapter->GetDesc(&adapterDesc)); in init()
144 GR_D3D_CALL_ERRCHECK(device->CheckFeatureSupport(D3D12_FEATURE_D3D12_OPTIONS, &optionsDesc, in init()
148 // See https://docs.microsoft.com/en-us/windows/win32/direct3d12/hardware-support in init()
166 GR_D3D_CALL_ERRCHECK(device->CheckFeatureSupport(D3D12_FEATURE_D3D12_OPTIONS2, &optionsDesc2, in init()
171 this->initGrCaps(optionsDesc, device); in init()
172 this->initShaderCaps(adapterDesc.VendorId, optionsDesc); in init()
174 this->initFormatTable(adapterDesc, device); in init()
175 this->initStencilFormat(device); in init()
178 this->applyDriverCorrectnessWorkarounds(adapterDesc.VendorId); in init()
181 this->finishInitialization(contextOptions); in init()
201 // There's no specific cap for RT size, so use texture size in initGrCaps()
213 // from the get go. There is no hard data to suggest this is faster or slower. in initGrCaps()
227 shaderCaps->fVersionDeclString = "#version 330\n"; in initShaderCaps()
230 shaderCaps->fUsesPrecisionModifiers = true; in initShaderCaps()
231 shaderCaps->fFlatInterpolationSupport = true; in initShaderCaps()
234 shaderCaps->fPreferFlatInterpolation = kQualcomm_D3DVendor != vendorID; in initShaderCaps()
236 shaderCaps->fSampleMaskSupport = true; in initShaderCaps()
238 shaderCaps->fShaderDerivativeSupport = true; in initShaderCaps()
240 shaderCaps->fDualSourceBlendingSupport = true; in initShaderCaps()
242 shaderCaps->fIntegerSupport = true; in initShaderCaps()
243 shaderCaps->fNonsquareMatrixSupport = true; in initShaderCaps()
245 shaderCaps->fInverseHyperbolicSupport = false; in initShaderCaps()
246 shaderCaps->fVertexIDSupport = true; in initShaderCaps()
247 shaderCaps->fInfinitySupport = true; in initShaderCaps()
248 shaderCaps->fNonconstantArrayIndexSupport = true; in initShaderCaps()
249 shaderCaps->fBitManipulationSupport = true; in initShaderCaps()
251 shaderCaps->fFloatIs32Bits = true; in initShaderCaps()
252 shaderCaps->fHalfIs32Bits = in initShaderCaps()
255 // See https://docs.microsoft.com/en-us/windows/win32/direct3d12/hardware-support in initShaderCaps()
256 // The maximum number of samplers in a shader-visible descriptor heap is 2048, but in initShaderCaps()
258 shaderCaps->fMaxFragmentSamplers = in initShaderCaps()
270 GR_D3D_CALL_ERRCHECK(device->CheckFeatureSupport(D3D12_FEATURE_FORMAT_SUPPORT, in stencil_format_supported()
326 const auto& info = this->getFormatInfo(*it); in setColorType()
338 return nonConstThis->getFormatInfo(format); in getFormatInfo()
363 auto& info = this->getFormatInfo(format); in initFormatTable()
372 constexpr GrColorType ct = GrColorType::kRGBA_8888; in initFormatTable() local
374 ctInfo.fColorType = ct; in initFormatTable()
379 constexpr GrColorType ct = GrColorType::kRGB_888x; in initFormatTable() local
381 ctInfo.fColorType = ct; in initFormatTable()
391 auto& info = this->getFormatInfo(format); in initFormatTable()
400 constexpr GrColorType ct = GrColorType::kAlpha_8; in initFormatTable() local
402 ctInfo.fColorType = ct; in initFormatTable()
409 constexpr GrColorType ct = GrColorType::kGray_8; in initFormatTable() local
411 ctInfo.fColorType = ct; in initFormatTable()
420 auto& info = this->getFormatInfo(format); in initFormatTable()
429 constexpr GrColorType ct = GrColorType::kBGRA_8888; in initFormatTable() local
431 ctInfo.fColorType = ct; in initFormatTable()
439 auto& info = this->getFormatInfo(format); in initFormatTable()
448 constexpr GrColorType ct = GrColorType::kBGR_565; in initFormatTable() local
450 ctInfo.fColorType = ct; in initFormatTable()
458 auto& info = this->getFormatInfo(format); in initFormatTable()
467 constexpr GrColorType ct = GrColorType::kRGBA_F16; in initFormatTable() local
469 ctInfo.fColorType = ct; in initFormatTable()
474 constexpr GrColorType ct = GrColorType::kRGBA_F16_Clamped; in initFormatTable() local
476 ctInfo.fColorType = ct; in initFormatTable()
484 auto& info = this->getFormatInfo(format); in initFormatTable()
493 constexpr GrColorType ct = GrColorType::kAlpha_F16; in initFormatTable() local
495 ctInfo.fColorType = ct; in initFormatTable()
505 auto& info = this->getFormatInfo(format); in initFormatTable()
514 constexpr GrColorType ct = GrColorType::kRG_88; in initFormatTable() local
516 ctInfo.fColorType = ct; in initFormatTable()
524 auto& info = this->getFormatInfo(format); in initFormatTable()
533 constexpr GrColorType ct = GrColorType::kRGBA_1010102; in initFormatTable() local
535 ctInfo.fColorType = ct; in initFormatTable()
543 auto& info = this->getFormatInfo(format); in initFormatTable()
552 constexpr GrColorType ct = GrColorType::kABGR_4444; in initFormatTable() local
554 ctInfo.fColorType = ct; in initFormatTable()
564 auto& info = this->getFormatInfo(format); in initFormatTable()
573 constexpr GrColorType ct = GrColorType::kRGBA_8888_SRGB; in initFormatTable() local
575 ctInfo.fColorType = ct; in initFormatTable()
583 auto& info = this->getFormatInfo(format); in initFormatTable()
592 constexpr GrColorType ct = GrColorType::kAlpha_16; in initFormatTable() local
594 ctInfo.fColorType = ct; in initFormatTable()
604 auto& info = this->getFormatInfo(format); in initFormatTable()
613 constexpr GrColorType ct = GrColorType::kRG_1616; in initFormatTable() local
615 ctInfo.fColorType = ct; in initFormatTable()
623 auto& info = this->getFormatInfo(format); in initFormatTable()
632 constexpr GrColorType ct = GrColorType::kRGBA_16161616; in initFormatTable() local
634 ctInfo.fColorType = ct; in initFormatTable()
642 auto& info = this->getFormatInfo(format); in initFormatTable()
651 constexpr GrColorType ct = GrColorType::kRG_F16; in initFormatTable() local
653 ctInfo.fColorType = ct; in initFormatTable()
662 auto& info = this->getFormatInfo(format); in initFormatTable()
664 // No supported GrColorTypes. in initFormatTable()
672 this->setColorType(GrColorType::kAlpha_8, { DXGI_FORMAT_R8_UNORM }); in initFormatTable()
673 this->setColorType(GrColorType::kBGR_565, { DXGI_FORMAT_B5G6R5_UNORM }); in initFormatTable()
674 this->setColorType(GrColorType::kABGR_4444, { DXGI_FORMAT_B4G4R4A4_UNORM }); in initFormatTable()
675 this->setColorType(GrColorType::kRGBA_8888, { DXGI_FORMAT_R8G8B8A8_UNORM }); in initFormatTable()
676 this->setColorType(GrColorType::kRGBA_8888_SRGB, { DXGI_FORMAT_R8G8B8A8_UNORM_SRGB }); in initFormatTable()
677 this->setColorType(GrColorType::kRGB_888x, { DXGI_FORMAT_R8G8B8A8_UNORM }); in initFormatTable()
678 this->setColorType(GrColorType::kRG_88, { DXGI_FORMAT_R8G8_UNORM }); in initFormatTable()
679 this->setColorType(GrColorType::kBGRA_8888, { DXGI_FORMAT_B8G8R8A8_UNORM }); in initFormatTable()
680 this->setColorType(GrColorType::kRGBA_1010102, { DXGI_FORMAT_R10G10B10A2_UNORM }); in initFormatTable()
681 this->setColorType(GrColorType::kGray_8, { DXGI_FORMAT_R8_UNORM }); in initFormatTable()
682 this->setColorType(GrColorType::kAlpha_F16, { DXGI_FORMAT_R16_FLOAT }); in initFormatTable()
683 this->setColorType(GrColorType::kRGBA_F16, { DXGI_FORMAT_R16G16B16A16_FLOAT }); in initFormatTable()
684 this->setColorType(GrColorType::kRGBA_F16_Clamped, { DXGI_FORMAT_R16G16B16A16_FLOAT }); in initFormatTable()
685 this->setColorType(GrColorType::kAlpha_16, { DXGI_FORMAT_R16_UNORM }); in initFormatTable()
686 this->setColorType(GrColorType::kRG_1616, { DXGI_FORMAT_R16G16_UNORM }); in initFormatTable()
687 this->setColorType(GrColorType::kRGBA_16161616, { DXGI_FORMAT_R16G16B16A16_UNORM }); in initFormatTable()
688 this->setColorType(GrColorType::kRG_F16, { DXGI_FORMAT_R16G16_FLOAT }); in initFormatTable()
721 GR_D3D_CALL_ERRCHECK(device->CheckFeatureSupport(D3D12_FEATURE_MULTISAMPLE_QUALITY_LEVELS, in multisample_count_supported()
761 GR_D3D_CALL_ERRCHECK(device->CheckFeatureSupport(D3D12_FEATURE_FORMAT_SUPPORT, in init()
767 this->initSampleCounts(adapterDesc, device, format); in init()
791 return this->isFormatTexturable(dxgiFormat); in isFormatTexturable()
795 const FormatInfo& info = this->getFormatInfo(format); in isFormatTexturable()
799 bool GrD3DCaps::isFormatAsColorTypeRenderable(GrColorType ct, const GrBackendFormat& format, in isFormatAsColorTypeRenderable() argument
805 if (!this->isFormatRenderable(dxgiFormat, sampleCount)) { in isFormatAsColorTypeRenderable()
808 const auto& info = this->getFormatInfo(dxgiFormat); in isFormatAsColorTypeRenderable()
809 if (!SkToBool(info.colorTypeFlags(ct) & ColorTypeInfo::kRenderable_Flag)) { in isFormatAsColorTypeRenderable()
820 return this->isFormatRenderable(dxgiFormat, sampleCount); in isFormatRenderable()
824 return sampleCount <= this->maxRenderTargetSampleCount(format); in isFormatRenderable()
828 const FormatInfo& info = this->getFormatInfo(format); in isFormatUnorderedAccessible()
839 return this->getRenderTargetSampleCount(requestedCount, dxgiFormat); in getRenderTargetSampleCount()
845 const FormatInfo& info = this->getFormatInfo(format); in getRenderTargetSampleCount()
871 return this->maxRenderTargetSampleCount(dxgiFormat); in maxRenderTargetSampleCount()
875 const FormatInfo& info = this->getFormatInfo(format); in maxRenderTargetSampleCount()
881 return table[table.count() - 1]; in maxRenderTargetSampleCount()
885 const FormatInfo& info = this->getFormatInfo(format); in getFormatColorType()
901 const auto& info = this->getFormatInfo(dxgiFormat); in supportedWritePixelsColorType()
913 if (surface->isProtected()) { in surfaceSupportsReadPixels()
916 if (auto tex = static_cast<const GrD3DTexture*>(surface->asTexture())) { in surfaceSupportsReadPixels()
918 if (GrDxgiFormatIsCompressed(tex->dxgiFormat())) { in surfaceSupportsReadPixels()
922 } else if (auto rt = static_cast<const GrD3DRenderTarget*>(surface->asRenderTarget())) { in surfaceSupportsReadPixels()
923 if (rt->numSamples() > 1) { in surfaceSupportsReadPixels()
932 if (auto rt = surface->asRenderTarget()) { in onSurfaceSupportsWritePixels()
933 return rt->numSamples() <= 1 && SkToBool(surface->asTexture()); in onSurfaceSupportsWritePixels()
938 bool GrD3DCaps::onAreColorTypeAndFormatCompatible(GrColorType ct, in onAreColorTypeAndFormatCompatible() argument
945 const auto& info = this->getFormatInfo(dxgiFormat); in onAreColorTypeAndFormatCompatible()
947 if (info.fColorTypeInfos[i].fColorType == ct) { in onAreColorTypeAndFormatCompatible()
954 GrBackendFormat GrD3DCaps::onGetDefaultBackendFormat(GrColorType ct) const { in onGetDefaultBackendFormat()
955 DXGI_FORMAT format = this->getFormatFromColorType(ct); in onGetDefaultBackendFormat()
966 if (this->isFormatTexturable(DXGI_FORMAT_BC1_UNORM)) { in getBackendFormatFromCompressionType()
980 const auto& info = this->getFormatInfo(dxgiFormat); in onGetReadSwizzle()
995 const auto& info = this->getFormatInfo(dxgiFormat); in getWriteSwizzle()
1031 const auto& info = this->getFormatInfo(dxgiFormat); in onSupportedReadPixelsColorType()
1060 d3dRT->genKey(&b); in makeDesc()