69 this->init(contextOptions, adapter,
device);
73 DXGI_FORMAT srcFormat,
int srcSampleCnt)
const {
74 if ((dstSampleCnt > 1 || srcSampleCnt > 1) && dstSampleCnt != srcSampleCnt) {
80 return srcFormat == dstFormat;
84 DXGI_FORMAT srcFormat,
int srcSampleCnt)
const {
86 if (srcSampleCnt <= 1) {
91 if (dstSampleCnt > 1) {
98 if (srcFormat != dstFormat) {
108 if (srcRect.
size() != dstRect.
size()) {
115 int dstSampleCnt = 0;
116 int srcSampleCnt = 0;
118 dstSampleCnt = rtProxy->numSamples();
121 srcSampleCnt = rtProxy->numSamples();
126 DXGI_FORMAT dstFormat, srcFormat;
130 return this->
canCopyTexture(dstFormat, dstSampleCnt, srcFormat, srcSampleCnt) ||
134void GrD3DCaps::init(
const GrContextOptions& contextOptions, IDXGIAdapter1* adapter,
136 D3D_FEATURE_LEVEL featureLevels[] = {
137 D3D_FEATURE_LEVEL_11_0,
138 D3D_FEATURE_LEVEL_11_1,
139 D3D_FEATURE_LEVEL_12_0,
140 D3D_FEATURE_LEVEL_12_1,
142 D3D12_FEATURE_DATA_FEATURE_LEVELS flDesc = {};
143 flDesc.NumFeatureLevels = _countof(featureLevels);
144 flDesc.pFeatureLevelsRequested = featureLevels;
148 SkASSERT(flDesc.MaxSupportedFeatureLevel >= D3D_FEATURE_LEVEL_11_0);
150 DXGI_ADAPTER_DESC adapterDesc;
153 D3D12_FEATURE_DATA_D3D12_OPTIONS optionsDesc;
155 sizeof(optionsDesc)));
159 if (D3D12_RESOURCE_BINDING_TIER_1 == optionsDesc.ResourceBindingTier) {
160 fMaxPerStageShaderResourceViews = 128;
161 if (D3D_FEATURE_LEVEL_11_0 == flDesc.MaxSupportedFeatureLevel) {
162 fMaxPerStageUnorderedAccessViews = 8;
164 fMaxPerStageUnorderedAccessViews = 64;
169 fMaxPerStageUnorderedAccessViews = 2032;
170 fMaxPerStageShaderResourceViews = 2032;
173 fStandardSwizzleLayoutSupport = (optionsDesc.StandardSwizzle64KBSupported);
175 D3D12_FEATURE_DATA_D3D12_OPTIONS2 optionsDesc2;
177 sizeof(optionsDesc2)));
178 fResolveSubresourceRegionSupport = (optionsDesc2.ProgrammableSamplePositionsTier !=
179 D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER_NOT_SUPPORTED);
181 this->initGrCaps(optionsDesc,
device);
182 this->initShaderCaps(adapterDesc.VendorId, optionsDesc);
184 this->initFormatTable(adapterDesc,
device);
185 this->initStencilFormat(
device);
188 this->applyDriverCorrectnessWorkarounds(adapterDesc.VendorId);
194void GrD3DCaps::initGrCaps(
const D3D12_FEATURE_DATA_D3D12_OPTIONS& optionsDesc,
202 if (D3D12_CONSERVATIVE_RASTERIZATION_TIER_NOT_SUPPORTED !=
203 optionsDesc.ConservativeRasterizationTier) {
232void GrD3DCaps::initShaderCaps(
int vendorID,
const D3D12_FEATURE_DATA_D3D12_OPTIONS& optionsDesc) {
261 D3D12_SHADER_MIN_PRECISION_SUPPORT_NONE == optionsDesc.MinPrecisionSupport;
267 (D3D12_RESOURCE_BINDING_TIER_1 == optionsDesc.ResourceBindingTier) ? 16 : 2032;
270void GrD3DCaps::applyDriverCorrectnessWorkarounds(
int vendorID) {
276 D3D12_FEATURE_DATA_FORMAT_SUPPORT formatSupportDesc;
277 formatSupportDesc.Format =
format;
280 sizeof(formatSupportDesc)));
281 return SkToBool(D3D12_FORMAT_SUPPORT1_DEPTH_STENCIL & formatSupportDesc.Support1);
284void GrD3DCaps::initStencilFormat(ID3D12Device*
device) {
286 fPreferredStencilFormat = DXGI_FORMAT_D24_UNORM_S8_UINT;
289 fPreferredStencilFormat = DXGI_FORMAT_D32_FLOAT_S8X24_UINT;
296 DXGI_FORMAT_R8G8B8A8_UNORM,
297 DXGI_FORMAT_R8_UNORM,
298 DXGI_FORMAT_B8G8R8A8_UNORM,
299 DXGI_FORMAT_B5G6R5_UNORM,
300 DXGI_FORMAT_R16G16B16A16_FLOAT,
301 DXGI_FORMAT_R16_FLOAT,
302 DXGI_FORMAT_R8G8_UNORM,
303 DXGI_FORMAT_R10G10B10A2_UNORM,
304 DXGI_FORMAT_B4G4R4A4_UNORM,
305 DXGI_FORMAT_R8G8B8A8_UNORM_SRGB,
306 DXGI_FORMAT_BC1_UNORM,
307 DXGI_FORMAT_R16_UNORM,
308 DXGI_FORMAT_R16G16_UNORM,
309 DXGI_FORMAT_R16G16B16A16_UNORM,
310 DXGI_FORMAT_R16G16_FLOAT
313void GrD3DCaps::setColorType(
GrColorType colorType, std::initializer_list<DXGI_FORMAT> formats) {
315 for (
size_t i = 0;
i < kNumDxgiFormats; ++
i) {
316 const auto& formatInfo = fFormatTable[
i];
317 for (
int j = 0; j < formatInfo.fColorTypeInfoCount; ++j) {
318 const auto& ctInfo = formatInfo.fColorTypeInfos[j];
320 !
SkToBool(ctInfo.fFlags & ColorTypeInfo::kWrappedOnly_Flag)) {
322 for (
auto it = formats.begin(); it != formats.end(); ++it) {
333 for (
auto it = formats.begin(); it != formats.end(); ++it) {
334 const auto&
info = this->getFormatInfo(*it);
335 for (
int i = 0;
i <
info.fColorTypeInfoCount; ++
i) {
337 fColorTypeToFormatTable[idx] = *it;
344const GrD3DCaps::FormatInfo& GrD3DCaps::getFormatInfo(DXGI_FORMAT
format)
const {
346 return nonConstThis->getFormatInfo(
format);
349GrD3DCaps::FormatInfo& GrD3DCaps::getFormatInfo(DXGI_FORMAT
format) {
351 "Size of DXGI_FORMATs array must match static value in header");
354 return fFormatTable[
i];
357 static FormatInfo kInvalidFormat;
358 return kInvalidFormat;
361void GrD3DCaps::initFormatTable(
const DXGI_ADAPTER_DESC& adapterDesc, ID3D12Device*
device) {
363 "Size of DXGI_FORMATs array must match static value in header");
365 std::fill_n(fColorTypeToFormatTable,
kGrColorTypeCnt, DXGI_FORMAT_UNKNOWN);
370 constexpr DXGI_FORMAT
format = DXGI_FORMAT_R8G8B8A8_UNORM;
374 if (
SkToBool(
info.fFlags & FormatInfo::kTexturable_Flag)) {
375 info.fColorTypeInfoCount = 2;
376 info.fColorTypeInfos.reset(
new ColorTypeInfo[
info.fColorTypeInfoCount]());
381 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
382 ctInfo.fColorType = ct;
383 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
388 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
389 ctInfo.fColorType = ct;
390 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag;
398 constexpr DXGI_FORMAT
format = DXGI_FORMAT_R8_UNORM;
402 if (
SkToBool(
info.fFlags & FormatInfo::kTexturable_Flag)) {
403 info.fColorTypeInfoCount = 3;
404 info.fColorTypeInfos.reset(
new ColorTypeInfo[
info.fColorTypeInfoCount]());
409 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
410 ctInfo.fColorType = ct;
411 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
416 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
417 ctInfo.fColorType = ct;
418 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
425 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
426 ctInfo.fColorType = ct;
427 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag;
434 constexpr DXGI_FORMAT
format = DXGI_FORMAT_B8G8R8A8_UNORM;
438 if (
SkToBool(
info.fFlags & FormatInfo::kTexturable_Flag)) {
439 info.fColorTypeInfoCount = 1;
440 info.fColorTypeInfos.reset(
new ColorTypeInfo[
info.fColorTypeInfoCount]());
445 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
446 ctInfo.fColorType = ct;
447 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
453 constexpr DXGI_FORMAT
format = DXGI_FORMAT_B5G6R5_UNORM;
457 if (
SkToBool(
info.fFlags & FormatInfo::kTexturable_Flag)) {
458 info.fColorTypeInfoCount = 1;
459 info.fColorTypeInfos.reset(
new ColorTypeInfo[
info.fColorTypeInfoCount]());
464 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
465 ctInfo.fColorType = ct;
466 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
472 constexpr DXGI_FORMAT
format = DXGI_FORMAT_R16G16B16A16_FLOAT;
476 if (
SkToBool(
info.fFlags & FormatInfo::kTexturable_Flag)) {
477 info.fColorTypeInfoCount = 2;
478 info.fColorTypeInfos.reset(
new ColorTypeInfo[
info.fColorTypeInfoCount]());
483 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
484 ctInfo.fColorType = ct;
485 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
490 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
491 ctInfo.fColorType = ct;
492 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
498 constexpr DXGI_FORMAT
format = DXGI_FORMAT_R16_FLOAT;
502 if (
SkToBool(
info.fFlags & FormatInfo::kTexturable_Flag)) {
503 info.fColorTypeInfoCount = 1;
504 info.fColorTypeInfos.reset(
new ColorTypeInfo[
info.fColorTypeInfoCount]());
509 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
510 ctInfo.fColorType = ct;
511 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
519 constexpr DXGI_FORMAT
format = DXGI_FORMAT_R8G8_UNORM;
523 if (
SkToBool(
info.fFlags & FormatInfo::kTexturable_Flag)) {
524 info.fColorTypeInfoCount = 1;
525 info.fColorTypeInfos.reset(
new ColorTypeInfo[
info.fColorTypeInfoCount]());
530 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
531 ctInfo.fColorType = ct;
532 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
538 constexpr DXGI_FORMAT
format = DXGI_FORMAT_R10G10B10A2_UNORM;
542 if (
SkToBool(
info.fFlags & FormatInfo::kTexturable_Flag)) {
543 info.fColorTypeInfoCount = 1;
544 info.fColorTypeInfos.reset(
new ColorTypeInfo[
info.fColorTypeInfoCount]());
549 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
550 ctInfo.fColorType = ct;
551 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
557 constexpr DXGI_FORMAT
format = DXGI_FORMAT_B4G4R4A4_UNORM;
561 if (
SkToBool(
info.fFlags & FormatInfo::kTexturable_Flag)) {
562 info.fColorTypeInfoCount = 1;
563 info.fColorTypeInfos.reset(
new ColorTypeInfo[
info.fColorTypeInfoCount]());
568 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
569 ctInfo.fColorType = ct;
570 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
578 constexpr DXGI_FORMAT
format = DXGI_FORMAT_R8G8B8A8_UNORM_SRGB;
582 if (
SkToBool(
info.fFlags & FormatInfo::kTexturable_Flag)) {
583 info.fColorTypeInfoCount = 1;
584 info.fColorTypeInfos.reset(
new ColorTypeInfo[
info.fColorTypeInfoCount]());
589 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
590 ctInfo.fColorType = ct;
591 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
597 constexpr DXGI_FORMAT
format = DXGI_FORMAT_R16_UNORM;
601 if (
SkToBool(
info.fFlags & FormatInfo::kTexturable_Flag)) {
602 info.fColorTypeInfoCount = 1;
603 info.fColorTypeInfos.reset(
new ColorTypeInfo[
info.fColorTypeInfoCount]());
608 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
609 ctInfo.fColorType = ct;
610 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
618 constexpr DXGI_FORMAT
format = DXGI_FORMAT_R16G16_UNORM;
622 if (
SkToBool(
info.fFlags & FormatInfo::kTexturable_Flag)) {
623 info.fColorTypeInfoCount = 1;
624 info.fColorTypeInfos.reset(
new ColorTypeInfo[
info.fColorTypeInfoCount]());
629 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
630 ctInfo.fColorType = ct;
631 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
637 constexpr DXGI_FORMAT
format = DXGI_FORMAT_R16G16B16A16_UNORM;
641 if (
SkToBool(
info.fFlags & FormatInfo::kTexturable_Flag)) {
642 info.fColorTypeInfoCount = 1;
643 info.fColorTypeInfos.reset(
new ColorTypeInfo[
info.fColorTypeInfoCount]());
648 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
649 ctInfo.fColorType = ct;
650 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
656 constexpr DXGI_FORMAT
format = DXGI_FORMAT_R16G16_FLOAT;
660 if (
SkToBool(
info.fFlags & FormatInfo::kTexturable_Flag)) {
661 info.fColorTypeInfoCount = 1;
662 info.fColorTypeInfos.reset(
new ColorTypeInfo[
info.fColorTypeInfoCount]());
667 auto& ctInfo =
info.fColorTypeInfos[ctIdx++];
668 ctInfo.fColorType = ct;
669 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
676 constexpr DXGI_FORMAT
format = DXGI_FORMAT_BC1_UNORM;
706void GrD3DCaps::FormatInfo::InitFormatFlags(
const D3D12_FEATURE_DATA_FORMAT_SUPPORT& formatSupport,
708 if (
SkToBool(D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE & formatSupport.Support1)) {
712 if (
SkToBool(D3D12_FORMAT_SUPPORT1_RENDER_TARGET & formatSupport.Support1) &&
713 SkToBool(D3D12_FORMAT_SUPPORT1_BLENDABLE & formatSupport.Support1)) {
718 if (
SkToBool(D3D12_FORMAT_SUPPORT1_MULTISAMPLE_RENDERTARGET & formatSupport.Support1)) {
722 if (
SkToBool(D3D12_FORMAT_SUPPORT1_MULTISAMPLE_RESOLVE & formatSupport.Support1)) {
726 if (
SkToBool(D3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEW & formatSupport.Support1)) {
732 D3D12_FEATURE_DATA_MULTISAMPLE_QUALITY_LEVELS msqLevels;
733 msqLevels.Format =
format;
734 msqLevels.SampleCount = sampleCount;
735 msqLevels.Flags = D3D12_MULTISAMPLE_QUALITY_LEVELS_FLAG_NONE;
737 &msqLevels,
sizeof(msqLevels)));
739 return msqLevels.NumQualityLevels > 0;
742void GrD3DCaps::FormatInfo::initSampleCounts(
const DXGI_ADAPTER_DESC& adapterDesc,
745 fColorSampleCounts.push_back(1);
757 fColorSampleCounts.push_back(2);
760 fColorSampleCounts.push_back(4);
763 fColorSampleCounts.push_back(8);
766 fColorSampleCounts.push_back(16);
774 D3D12_FEATURE_DATA_FORMAT_SUPPORT formatSupportDesc;
775 formatSupportDesc.Format =
format;
778 sizeof(formatSupportDesc)));
780 InitFormatFlags(formatSupportDesc, &
fFlags);
781 if (
fFlags & kRenderable_Flag) {
787 DXGI_FORMAT dxgiFormat;
788 if (!
format.asDxgiFormat(&dxgiFormat)) {
792 switch (dxgiFormat) {
793 case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB:
801 DXGI_FORMAT dxgiFormat;
802 if (!
format.asDxgiFormat(&dxgiFormat)) {
810 const FormatInfo&
info = this->getFormatInfo(
format);
811 return SkToBool(FormatInfo::kTexturable_Flag &
info.fFlags);
815 int sampleCount)
const {
816 DXGI_FORMAT dxgiFormat;
817 if (!
format.asDxgiFormat(&dxgiFormat)) {
823 const auto&
info = this->getFormatInfo(dxgiFormat);
824 if (!
SkToBool(
info.colorTypeFlags(ct) & ColorTypeInfo::kRenderable_Flag)) {
831 DXGI_FORMAT dxgiFormat;
832 if (!
format.asDxgiFormat(&dxgiFormat)) {
843 const FormatInfo&
info = this->getFormatInfo(
format);
844 return SkToBool(FormatInfo::kUnorderedAccess_Flag &
info.fFlags);
849 DXGI_FORMAT dxgiFormat;
850 if (!
format.asDxgiFormat(&dxgiFormat)) {
858 requestedCount =
std::max(1, requestedCount);
860 const FormatInfo&
info = this->getFormatInfo(
format);
862 int count =
info.fColorSampleCounts.size();
868 if (1 == requestedCount) {
869 SkASSERT(
info.fColorSampleCounts.size() &&
info.fColorSampleCounts[0] == 1);
874 if (
info.fColorSampleCounts[
i] >= requestedCount) {
875 return info.fColorSampleCounts[
i];
882 DXGI_FORMAT dxgiFormat;
883 if (!
format.asDxgiFormat(&dxgiFormat)) {
890 const FormatInfo&
info = this->getFormatInfo(
format);
892 const auto&
table =
info.fColorSampleCounts;
900 const FormatInfo&
info = this->getFormatInfo(
format);
901 return info.fFormatColorType;
907 DXGI_FORMAT dxgiFormat;
908 if (!surfaceFormat.asDxgiFormat(&dxgiFormat)) {
914 D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT);
916 const auto&
info = this->getFormatInfo(dxgiFormat);
917 for (
int i = 0;
i <
info.fColorTypeInfoCount; ++
i) {
918 const auto& ctInfo =
info.fColorTypeInfos[
i];
919 if (ctInfo.fColorType == surfaceColorType) {
920 return { surfaceColorType, offsetAlignment };
938 if (rt->numSamples() > 1) {
946bool GrD3DCaps::onSurfaceSupportsWritePixels(
const GrSurface*
surface)
const {
947 if (
auto rt =
surface->asRenderTarget()) {
953bool GrD3DCaps::onAreColorTypeAndFormatCompatible(
GrColorType ct,
955 DXGI_FORMAT dxgiFormat;
956 if (!
format.asDxgiFormat(&dxgiFormat)) {
960 const auto&
info = this->getFormatInfo(dxgiFormat);
961 for (
int i = 0;
i <
info.fColorTypeInfoCount; ++
i) {
962 if (
info.fColorTypeInfos[
i].fColorType == ct) {
971 if (
format == DXGI_FORMAT_UNKNOWN) {
974 return GrBackendFormat::MakeDxgi(
format);
979 switch (compressionType) {
982 return GrBackendFormat::MakeDxgi(DXGI_FORMAT_BC1_UNORM);
994 DXGI_FORMAT dxgiFormat;
996 const auto&
info = this->getFormatInfo(dxgiFormat);
997 for (
int i = 0;
i <
info.fColorTypeInfoCount; ++
i) {
998 const auto& ctInfo =
info.fColorTypeInfos[
i];
1000 return ctInfo.fReadSwizzle;
1003 SkDEBUGFAILF(
"Illegal color type (%d) and format (%d) combination.",
1010 DXGI_FORMAT dxgiFormat;
1012 const auto&
info = this->getFormatInfo(dxgiFormat);
1013 for (
int i = 0;
i <
info.fColorTypeInfoCount; ++
i) {
1014 const auto& ctInfo =
info.fColorTypeInfos[
i];
1016 return ctInfo.fWriteSwizzle;
1019 SkDEBUGFAILF(
"Illegal color type (%d) and format (%d) combination.",
1025 DXGI_FORMAT dxgiFormat;
1028 return (uint64_t)dxgiFormat;
1034 DXGI_FORMAT dxgiFormat;
1035 if (!srcBackendFormat.asDxgiFormat(&dxgiFormat)) {
1046 size_t offsetAlignment = D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT;
1048 const auto&
info = this->getFormatInfo(dxgiFormat);
1049 for (
int i = 0;
i <
info.fColorTypeInfoCount; ++
i) {
1050 const auto& ctInfo =
info.fColorTypeInfos[
i];
1051 if (ctInfo.fColorType == srcColorType) {
1052 return { srcColorType, offsetAlignment };
1092#if defined(GR_TEST_UTILS)
1093std::vector<GrTest::TestFormatColorTypeCombination> GrD3DCaps::getTestingCombinations()
const {
1094 std::vector<GrTest::TestFormatColorTypeCombination> combos = {
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
SkAssertResult(font.textToGlyphs("Hello", 5, SkTextEncoding::kUTF8, glyphs, std::size(glyphs))==count)
SkTextureCompressionType GrBackendFormatToCompressionType(const GrBackendFormat &format)
bool stencil_format_supported(ID3D12Device *device, DXGI_FORMAT format)
static constexpr DXGI_FORMAT kDxgiFormats[]
static bool multisample_count_supported(ID3D12Device *device, DXGI_FORMAT format, int sampleCount)
bool GrDxgiFormatIsCompressed(DXGI_FORMAT format)
static constexpr size_t GrDxgiFormatBytesPerBlock(DXGI_FORMAT format)
#define GR_D3D_CALL_ERRCHECK(X)
static const int kGrColorTypeCnt
static constexpr size_t SkAlignTo(size_t x, size_t alignment)
#define SkDEBUGFAILF(fmt,...)
static constexpr bool SkTextureCompressionTypeIsOpaque(SkTextureCompressionType compression)
static SkColorType colorType(AImageDecoder *decoder, const AImageDecoderHeaderInfo *headerInfo)
static constexpr bool SkToBool(const T &x)
bool fDynamicStateArrayGeometryProcessorTextureSupport
int fMaxPreferredRenderTargetSize
bool fFinishedProcAsyncCallbackSupport
bool fReadPixelsRowBytesSupport
const GrShaderCaps * shaderCaps() const
std::unique_ptr< GrShaderCaps > fShaderCaps
bool fReuseScratchTextures
bool fNativeDrawIndirectSupport
bool fTransferFromBufferToBufferSupport
bool fTransferFromBufferToTextureSupport
bool fTransferPixelsToRowBytesSupport
bool fBackendSemaphoreSupport
bool fHalfFloatVertexAttributeSupport
bool fSampleLocationsSupport
bool fOversizedStencilSupport
bool fTwoSidedStencilRefsAndMasksMustMatch
bool fWritePixelsRowBytesSupport
size_t fTransferBufferRowBytesAlignment
bool fNPOTTextureTileSupport
bool fTransferFromSurfaceToBufferSupport
void finishInitialization(const GrContextOptions &options)
bool fConservativeRasterSupport
bool fDrawInstancedSupport
bool fCrossContextTextureSupport
GrProgramDesc makeDesc(GrRenderTarget *, const GrProgramInfo &, ProgramDescOverrideFlags) const override
GrColorType getFormatColorType(DXGI_FORMAT) const
DXGI_FORMAT getFormatFromColorType(GrColorType colorType) const
bool isFormatSRGB(const GrBackendFormat &) const override
bool canCopyTexture(DXGI_FORMAT dstFormat, int dstSampleCnt, DXGI_FORMAT srcFormat, int srcSamplecnt) const
int maxRenderTargetSampleCount(const GrBackendFormat &) const override
GrD3DCaps(const GrContextOptions &contextOptions, IDXGIAdapter1 *, ID3D12Device *)
uint64_t computeFormatKey(const GrBackendFormat &) const override
bool isFormatRenderable(const GrBackendFormat &format, int sampleCount) const override
bool isFormatAsColorTypeRenderable(GrColorType ct, const GrBackendFormat &format, int sampleCount=1) const override
void addExtraSamplerKey(skgpu::KeyBuilder *, GrSamplerState, const GrBackendFormat &) const override
SupportedWrite supportedWritePixelsColorType(GrColorType surfaceColorType, const GrBackendFormat &surfaceFormat, GrColorType srcColorType) const override
bool canCopyAsResolve(DXGI_FORMAT dstFormat, int dstSampleCnt, DXGI_FORMAT srcFormat, int srcSamplecnt) const
bool isFormatTexturable(const GrBackendFormat &, GrTextureType) const override
GrBackendFormat getBackendFormatFromCompressionType(SkTextureCompressionType) const override
SurfaceReadPixelsSupport surfaceSupportsReadPixels(const GrSurface *) const override
int getRenderTargetSampleCount(int requestedCount, const GrBackendFormat &) const override
bool isFormatUnorderedAccessible(DXGI_FORMAT) const
skgpu::Swizzle getWriteSwizzle(const GrBackendFormat &, GrColorType) const override
void genKey(skgpu::KeyBuilder *b) const
void genKey(skgpu::KeyBuilder *, const GrCaps &) const
static void Build(GrProgramDesc *, const GrProgramInfo &, const GrCaps &)
uint16_t primitiveTypeKey() const
const GrPipeline & pipeline() const
GrStencilSettings nonGLStencilSettings() const
void genKey(skgpu::KeyBuilder *b, bool includeRefsAndMasks) const
FlutterSemanticsFlag flags
uint32_t uint32_t * format
static float max(float r, float g, float b)
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
bool fDisableDriverCorrectnessWorkarounds
bool fBitManipulationSupport
bool fPreferFlatInterpolation
bool fNonconstantArrayIndexSupport
constexpr SkISize size() const
bool fExplicitTextureLodSupport
bool fDualSourceBlendingSupport
bool fShaderDerivativeSupport
bool fFlatInterpolationSupport
bool fInverseHyperbolicSupport
const char * fVersionDeclString
bool fNonsquareMatrixSupport
bool fUsesPrecisionModifiers