31 wgpu::TextureFormat::RGBA8Unorm,
32 wgpu::TextureFormat::R8Unorm,
33#if !defined(__EMSCRIPTEN__)
34 wgpu::TextureFormat::R16Unorm,
36 wgpu::TextureFormat::BGRA8Unorm,
37 wgpu::TextureFormat::RGBA16Float,
38 wgpu::TextureFormat::R16Float,
39 wgpu::TextureFormat::RG8Unorm,
40#if !defined(__EMSCRIPTEN__)
41 wgpu::TextureFormat::RG16Unorm,
43 wgpu::TextureFormat::RGB10A2Unorm,
44 wgpu::TextureFormat::RG16Float,
46 wgpu::TextureFormat::Stencil8,
47 wgpu::TextureFormat::Depth32Float,
48 wgpu::TextureFormat::Depth24PlusStencil8,
50 wgpu::TextureFormat::BC1RGBAUnorm,
51 wgpu::TextureFormat::ETC2RGB8Unorm,
53 wgpu::TextureFormat::Undefined,
56#if !defined(__EMSCRIPTEN__)
57bool IsMultiplanarFormat(wgpu::TextureFormat
format) {
59 case wgpu::TextureFormat::R8BG8Biplanar420Unorm:
60 case wgpu::TextureFormat::R10X6BG10X6Biplanar420Unorm:
61 case wgpu::TextureFormat::R8BG8A8Triplanar420Unorm:
74 this->initCaps(backendContext,
options);
75 this->initShaderCaps(backendContext.
fDevice);
76 this->initFormatTable(backendContext.
fDevice);
87 if (!
info.isValid()) {
91 const auto& spec =
info.dawnTextureSpec();
93 if (!(spec.fUsage & wgpu::TextureUsage::TextureBinding)) {
97#if !defined(__EMSCRIPTEN__)
98 switch (spec.fFormat) {
99 case wgpu::TextureFormat::R8BG8Biplanar420Unorm: {
100 if (spec.fAspect == wgpu::TextureAspect::Plane0Only &&
101 spec.getViewFormat() != wgpu::TextureFormat::R8Unorm) {
104 if (spec.fAspect == wgpu::TextureAspect::Plane1Only &&
105 spec.getViewFormat() != wgpu::TextureFormat::RG8Unorm) {
110 case wgpu::TextureFormat::R10X6BG10X6Biplanar420Unorm: {
111 if (spec.fAspect == wgpu::TextureAspect::Plane0Only &&
112 spec.getViewFormat() != wgpu::TextureFormat::R16Unorm) {
115 if (spec.fAspect == wgpu::TextureAspect::Plane1Only &&
116 spec.getViewFormat() != wgpu::TextureFormat::RG16Unorm) {
121 case wgpu::TextureFormat::R8BG8A8Triplanar420Unorm: {
122 if (spec.fAspect == wgpu::TextureAspect::Plane0Only &&
123 spec.getViewFormat() != wgpu::TextureFormat::R8Unorm) {
126 if (spec.fAspect == wgpu::TextureAspect::Plane1Only &&
127 spec.getViewFormat() != wgpu::TextureFormat::RG8Unorm) {
130 if (spec.fAspect == wgpu::TextureAspect::Plane2Only &&
131 spec.getViewFormat() != wgpu::TextureFormat::R8Unorm) {
141 return this->isTexturable(
info.dawnTextureSpec().getViewFormat());
144bool DawnCaps::isTexturable(wgpu::TextureFormat
format)
const {
145 const FormatInfo& formatInfo = this->getFormatInfo(
format);
146 return SkToBool(FormatInfo::kTexturable_Flag & formatInfo.fFlags);
150 return info.isValid() &&
151 (
info.dawnTextureSpec().fUsage & wgpu::TextureUsage::RenderAttachment) &&
156 if (!
info.isValid()) {
159 if (!(
info.dawnTextureSpec().fUsage & wgpu::TextureUsage::StorageBinding)) {
162 const FormatInfo& formatInfo = this->getFormatInfo(
info.dawnTextureSpec().getViewFormat());
163 return info.numSamples() == 1 &&
SkToBool(FormatInfo::kStorage_Flag & formatInfo.fFlags);
166uint32_t DawnCaps::maxRenderTargetSampleCount(wgpu::TextureFormat
format)
const {
167 const FormatInfo& formatInfo = this->getFormatInfo(
format);
168 if (!
SkToBool(formatInfo.fFlags & FormatInfo::kRenderable_Flag)) {
171 if (
SkToBool(formatInfo.fFlags & FormatInfo::kMSAA_Flag)) {
179 return sampleCount <= this->maxRenderTargetSampleCount(
format);
186 wgpu::TextureUsage
usage = wgpu::TextureUsage::TextureBinding |
187 wgpu::TextureUsage::CopyDst |
188 wgpu::TextureUsage::CopySrc;
189 if (renderable == Renderable::kYes) {
190 usage |= wgpu::TextureUsage::RenderAttachment;
194 if (
format == wgpu::TextureFormat::Undefined) {
200 info.fMipmapped = mipmapped;
211 if (!textureInfo.getDawnTextureInfo(&
info)) {
216 info.fMipmapped = mipmapped;
217 info.fUsage = wgpu::TextureUsage::TextureBinding | wgpu::TextureUsage::CopyDst |
218 wgpu::TextureUsage::CopySrc;
225 switch (compression) {
227 return wgpu::TextureFormat::ETC2RGB8Unorm;
229 return wgpu::TextureFormat::BC1RGBAUnorm;
231 return wgpu::TextureFormat::Undefined;
239 wgpu::TextureUsage
usage = wgpu::TextureUsage::TextureBinding |
240 wgpu::TextureUsage::CopyDst |
241 wgpu::TextureUsage::CopySrc;
243 wgpu::TextureFormat
format = format_from_compression(compression);
244 if (
format == wgpu::TextureFormat::Undefined) {
250 info.fMipmapped = mipmapped;
263 const DawnTextureSpec& singleSpec = singleSampledInfo.dawnTextureSpec();
267 info.fMipmapped = Mipmapped::kNo;
270 info.fUsage = wgpu::TextureUsage::RenderAttachment;
272#if !defined(__EMSCRIPTEN__)
274 info.fUsage |= wgpu::TextureUsage::TransientAttachment;
283 uint32_t sampleCount,
287 info.fMipmapped = Mipmapped::kNo;
290 info.fUsage = wgpu::TextureUsage::RenderAttachment;
292#if !defined(__EMSCRIPTEN__)
293 if (fTransientAttachmentSupport) {
294 info.fUsage |= wgpu::TextureUsage::TransientAttachment;
303 if (
format == wgpu::TextureFormat::Undefined) {
308 const FormatInfo& formatInfo = this->getFormatInfo(
format);
309 if (!
SkToBool(FormatInfo::kStorage_Flag & formatInfo.fFlags)) {
313 wgpu::TextureUsage
usage = wgpu::TextureUsage::StorageBinding |
314 wgpu::TextureUsage::TextureBinding |
315 wgpu::TextureUsage::CopySrc;
318 info.fMipmapped = Mipmapped::kNo;
327 const SkISize colorAttachmentDimensions)
const {
328#if !defined(__EMSCRIPTEN__)
332 const auto& dawnTextureSpec = textureInfo.dawnTextureSpec();
333 wgpu::TextureFormat
format = dawnTextureSpec.fFormat;
334 if (IsMultiplanarFormat(
format) && dawnTextureSpec.fAspect == wgpu::TextureAspect::Plane1Only) {
337 colorAttachmentDimensions.
height() * 2);
341 return colorAttachmentDimensions;
346 auto dawnFormat = textureInfo.dawnTextureSpec().getViewFormat();
347 if (dawnFormat == wgpu::TextureFormat::Undefined) {
352 const FormatInfo&
info = this->getFormatInfo(dawnFormat);
353 for (
int i = 0; i <
info.fColorTypeInfoCount; ++i) {
364 const auto& spec = textureInfo.dawnTextureSpec();
365 return spec.fUsage & wgpu::TextureUsage::CopyDst;
369 const auto& spec = textureInfo.dawnTextureSpec();
370 return spec.fUsage & wgpu::TextureUsage::CopySrc;
377 return {dstColorType,
false};
384 auto dawnFormat = getFormatFromColorType(srcColorType);
385 const FormatInfo&
info = this->getFormatInfo(dawnFormat);
386 for (
int i = 0; i <
info.fColorTypeInfoCount; ++i) {
387 const auto& ctInfo =
info.fColorTypeInfos[i];
388 if (ctInfo.fColorType == srcColorType) {
389 return {srcColorType,
false};
398#if !defined(__EMSCRIPTEN__)
399 wgpu::AdapterProperties props;
400 backendContext.
fDevice.GetAdapter().GetProperties(&props);
402#if defined(GRAPHITE_TEST_UTILS)
403 this->setDeviceName(props.name);
407 wgpu::SupportedLimits limits;
409 [[maybe_unused]]
bool limitsSucceeded = backendContext.
fDevice.GetLimits(&limits);
412#if !defined(__EMSCRIPTEN__) || \
413 (__EMSCRIPTEN_major__ > 3 || \
414 (__EMSCRIPTEN_major__ == 3 && __EMSCRIPTEN_minor__ > 1) || \
415 (__EMSCRIPTEN_major__ == 3 && __EMSCRIPTEN_minor__ == 1 && __EMSCRIPTEN_tiny__ > 50))
434#if !defined(__EMSCRIPTEN__)
453#if defined(GRAPHITE_TEST_UTILS)
454 fDrawBufferCanBeMappedForReadback =
false;
457#if defined(__EMSCRIPTEN__)
464 backendContext.
fDevice.HasFeature(wgpu::FeatureName::BufferMapExtendedUsages);
467 backendContext.
fDevice.HasFeature(wgpu::FeatureName::MSAARenderToSingleSampled);
469 fTransientAttachmentSupport =
470 backendContext.
fDevice.HasFeature(wgpu::FeatureName::TransientAttachments);
473 if (!backendContext.
fTick) {
480 fUseAsyncPipelineCreation =
false;
483 fAllowScopedErrorChecks =
false;
489void DawnCaps::initShaderCaps(
const wgpu::Device&
device) {
499#if !defined(__EMSCRIPTEN__)
500 if (
device.HasFeature(wgpu::FeatureName::DualSourceBlending)) {
503 if (
device.HasFeature(wgpu::FeatureName::FramebufferFetch)) {
509void DawnCaps::initFormatTable(
const wgpu::Device&
device) {
513 info = &fFormatTable[GetFormatIndex(wgpu::TextureFormat::RGBA8Unorm)];
514 info->fFlags = FormatInfo::kAllFlags;
515 info->fColorTypeInfoCount = 2;
516 info->fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info->fColorTypeInfoCount);
520 auto& ctInfo =
info->fColorTypeInfos[ctIdx++];
522 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
526 auto& ctInfo =
info->fColorTypeInfos[ctIdx++];
528 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag;
535 info = &fFormatTable[GetFormatIndex(wgpu::TextureFormat::R8Unorm)];
536#if !defined(__EMSCRIPTEN__)
537 info->fFlags = FormatInfo::kAllFlags;
538 if (!
device.HasFeature(wgpu::FeatureName::R8UnormStorage)) {
539 info->fFlags &= ~FormatInfo::kStorage_Flag;
542 info->fFlags = FormatInfo::kAllFlags & ~FormatInfo::kStorage_Flag;
544 info->fColorTypeInfoCount = 3;
545 info->fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info->fColorTypeInfoCount);
549 auto& ctInfo =
info->fColorTypeInfos[ctIdx++];
551 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
555 auto& ctInfo =
info->fColorTypeInfos[ctIdx++];
557 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
563 auto& ctInfo =
info->fColorTypeInfos[ctIdx++];
565 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag;
570#if !defined(__EMSCRIPTEN__)
571 const bool supportUnorm16 =
device.HasFeature(wgpu::FeatureName::Unorm16TextureFormats);
575 info = &fFormatTable[GetFormatIndex(wgpu::TextureFormat::R16Unorm)];
576 if (supportUnorm16) {
577 info->fFlags = FormatInfo::kAllFlags & ~FormatInfo::kStorage_Flag;
578 info->fColorTypeInfoCount = 1;
579 info->fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info->fColorTypeInfoCount);
583 auto& ctInfo =
info->fColorTypeInfos[ctIdx++];
585 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
595 info = &fFormatTable[GetFormatIndex(wgpu::TextureFormat::BGRA8Unorm)];
596 info->fFlags = FormatInfo::kAllFlags;
597 info->fColorTypeInfoCount = 2;
598 info->fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info->fColorTypeInfoCount);
602 auto& ctInfo =
info->fColorTypeInfos[ctIdx++];
604 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
608 auto& ctInfo =
info->fColorTypeInfos[ctIdx++];
610 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag;
616 info = &fFormatTable[GetFormatIndex(wgpu::TextureFormat::RGBA16Float)];
617 info->fFlags = FormatInfo::kAllFlags;
618 info->fColorTypeInfoCount = 1;
619 info->fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info->fColorTypeInfoCount);
623 auto& ctInfo =
info->fColorTypeInfos[ctIdx++];
625 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
631 info = &fFormatTable[GetFormatIndex(wgpu::TextureFormat::R16Float)];
632 info->fFlags = FormatInfo::kAllFlags;
633 info->fColorTypeInfoCount = 1;
634 info->fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info->fColorTypeInfoCount);
638 auto& ctInfo =
info->fColorTypeInfos[ctIdx++];
640 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
649 info = &fFormatTable[GetFormatIndex(wgpu::TextureFormat::RG8Unorm)];
650 info->fFlags = FormatInfo::kAllFlags;
651 info->fColorTypeInfoCount = 1;
652 info->fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info->fColorTypeInfoCount);
656 auto& ctInfo =
info->fColorTypeInfos[ctIdx++];
658 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
662#if !defined(__EMSCRIPTEN__)
666 info = &fFormatTable[GetFormatIndex(wgpu::TextureFormat::RG16Unorm)];
667 if (supportUnorm16) {
668 info->fFlags = FormatInfo::kAllFlags;
669 info->fColorTypeInfoCount = 1;
670 info->fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info->fColorTypeInfoCount);
674 auto& ctInfo =
info->fColorTypeInfos[ctIdx++];
676 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
684 info = &fFormatTable[GetFormatIndex(wgpu::TextureFormat::RGB10A2Unorm)];
685 info->fFlags = FormatInfo::kAllFlags;
686 info->fColorTypeInfoCount = 1;
687 info->fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info->fColorTypeInfoCount);
691 auto& ctInfo =
info->fColorTypeInfos[ctIdx++];
693 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
699 info = &fFormatTable[GetFormatIndex(wgpu::TextureFormat::RG16Float)];
700 info->fFlags = FormatInfo::kAllFlags;
701 info->fColorTypeInfoCount = 1;
702 info->fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info->fColorTypeInfoCount);
706 auto& ctInfo =
info->fColorTypeInfos[ctIdx++];
708 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag;
714 if (
device.HasFeature(wgpu::FeatureName::TextureCompressionETC2)) {
715 info = &fFormatTable[GetFormatIndex(wgpu::TextureFormat::ETC2RGB8Unorm)];
716 info->fFlags = FormatInfo::kTexturable_Flag;
717 info->fColorTypeInfoCount = 1;
718 info->fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info->fColorTypeInfoCount);
722 auto& ctInfo =
info->fColorTypeInfos[ctIdx++];
724 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag;
731 if (
device.HasFeature(wgpu::FeatureName::TextureCompressionBC)) {
732 info = &fFormatTable[GetFormatIndex(wgpu::TextureFormat::BC1RGBAUnorm)];
733 info->fFlags = FormatInfo::kTexturable_Flag;
734 info->fColorTypeInfoCount = 1;
735 info->fColorTypeInfos = std::make_unique<ColorTypeInfo[]>(
info->fColorTypeInfoCount);
739 auto& ctInfo =
info->fColorTypeInfos[ctIdx++];
741 ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag;
752 info = &fFormatTable[GetFormatIndex(wgpu::TextureFormat::Stencil8)];
753 info->fFlags = FormatInfo::kMSAA_Flag;
754 info->fColorTypeInfoCount = 0;
759 info = &fFormatTable[GetFormatIndex(wgpu::TextureFormat::Depth32Float)];
760 info->fFlags = FormatInfo::kMSAA_Flag;
761 info->fColorTypeInfoCount = 0;
766 info = &fFormatTable[GetFormatIndex(wgpu::TextureFormat::Depth24PlusStencil8)];
767 info->fFlags = FormatInfo::kMSAA_Flag;
768 info->fColorTypeInfoCount = 0;
773 info = &fFormatTable[GetFormatIndex(wgpu::TextureFormat::Undefined)];
775 info->fColorTypeInfoCount = 0;
784 std::fill_n(fColorTypeToFormatTable,
kSkColorTypeCnt, wgpu::TextureFormat::Undefined);
789 {wgpu::TextureFormat::RGBA8Unorm, wgpu::TextureFormat::BGRA8Unorm});
799#if !defined(__EMSCRIPTEN__)
806size_t DawnCaps::GetFormatIndex(wgpu::TextureFormat
format) {
807 for (
size_t i = 0; i < std::size(kFormats); ++i) {
808 if (
format == kFormats[i]) {
811 if (kFormats[i] == wgpu::TextureFormat::Undefined) {
821 std::initializer_list<wgpu::TextureFormat> formats) {
822 static_assert(std::size(kFormats) ==
kFormatCnt,
823 "Size is not same for DawnCaps::fFormatTable and kFormats");
825 for (
auto it = formats.begin(); it != formats.end(); ++it) {
826 const auto&
info = this->getFormatInfo(*it);
827 for (
int i = 0; i <
info.fColorTypeInfoCount; ++i) {
829 fColorTypeToFormatTable[idx] = *it;
841 static_cast<uint32_t
>(depthStencilInfo.
getViewFormat()) <= 0xffff);
842 uint32_t colorAttachmentKey =
844 uint32_t dsAttachmentKey =
static_cast<uint32_t
>(depthStencilInfo.
getViewFormat()) << 16 |
846 return (((uint64_t) colorAttachmentKey) << 32) | dsAttachmentKey;
862 builder[2] = renderPassKey & 0xFFFFFFFF;
863 builder[3] = (renderPassKey >> 32) & 0xFFFFFFFF;
876 UniqueKey::Builder builder(&pipelineKey, kComputePipelineDomain, 1,
"ComputePipeline");
898 uint32_t formatKey =
static_cast<uint32_t
>(dawnSpec.
getViewFormat());
903 bool isMipped =
info.mipmapped() == Mipmapped::kYes;
908 SkASSERT(
static_cast<uint32_t
>(isMipped) < (1u << 1));
912 static int kNum32DataCnt = 2 + 1 + 1;
916 builder[0] = dimensions.
width();
917 builder[1] = dimensions.
height();
918 builder[2] = formatKey;
919 builder[3] = (samplesKey << 0) |
920 (
static_cast<uint32_t
>(isMipped) << 3) |
921 (
static_cast<uint32_t
>(dawnSpec.
fUsage) << 4);
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
#define SkDEBUGFAILF(fmt,...)
@ kR8G8_unorm_SkColorType
pixel with a uint8_t for red and green
@ kBGRA_8888_SkColorType
pixel with 8 bits for blue, green, red, alpha; in 32-bit word
@ kA16_unorm_SkColorType
pixel with a little endian uint16_t for alpha
@ kRGBA_F16_SkColorType
pixel with half floats for red, green, blue, alpha;
@ kAlpha_8_SkColorType
pixel with alpha in 8-bit byte
@ kGray_8_SkColorType
pixel with grayscale level in 8-bit byte
@ kRGBA_8888_SkColorType
pixel with 8 bits for red, green, blue, alpha; in 32-bit word
@ kRGB_888x_SkColorType
pixel with 8 bits each for red, green, blue; in 32-bit word
@ kA16_float_SkColorType
pixel with a half float for alpha
@ kRGBA_1010102_SkColorType
10 bits for red, green, blue; 2 bits for alpha; in 32-bit word
@ kR16G16_unorm_SkColorType
pixel with a little endian uint16_t for red and green
@ kUnknown_SkColorType
uninitialized
@ kR16G16_float_SkColorType
pixel with a half float for red and green
static constexpr int kSkColorTypeCnt
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
static SkColorType colorType(AImageDecoder *decoder, const AImageDecoderHeaderInfo *headerInfo)
static constexpr bool SkToBool(const T &x)
constexpr uint16_t asKey() const
static constexpr Swizzle RGB1()
static Domain GenerateDomain()
size_t fRequiredStorageBufferAlignment
bool fDrawBufferCanBeMapped
size_t fRequiredUniformBufferAlignment
bool fStorageBufferPreferred
bool fClampToBorderSupport
bool fMSAARenderToSingleSampledSupport
bool fFullCompressedUploadSizeMustAlignToBlockDims
std::unique_ptr< SkSL::ShaderCaps > fShaderCaps
bool fStorageBufferSupport
static uint32_t SamplesToKey(uint32_t numSamples)
void finishInitialization(const ContextOptions &)
size_t fRequiredTransferBufferAlignment
const SkSL::ShaderCaps * shaderCaps() const
ResourceBindingRequirements fResourceBindingReqs
size_t fTextureDataRowBytesAlignment
const ComputeStep * computeStep() const
uint32_t uniqueID() const
static constexpr size_t kFormatCnt
uint64_t getRenderPassDescKey(const RenderPassDesc &renderPassDesc) const
void buildKeyForTexture(SkISize dimensions, const TextureInfo &, ResourceType, Shareable, GraphiteResourceKey *) const override
TextureInfo getDefaultStorageTextureInfo(SkColorType) const override
bool onIsTexturable(const TextureInfo &) const override
std::pair< SkColorType, bool > supportedWritePixelsColorType(SkColorType dstColorType, const TextureInfo &dstTextureInfo, SkColorType srcColorType) const override
bool isStorage(const TextureInfo &) const override
std::pair< SkColorType, bool > supportedReadPixelsColorType(SkColorType srcColorType, const TextureInfo &srcTextureInfo, SkColorType dstColorType) const override
const ColorTypeInfo * getColorTypeInfo(SkColorType, const TextureInfo &) const override
bool isRenderable(const TextureInfo &) const override
bool supportsWritePixels(const TextureInfo &textureInfo) const override
TextureInfo getDefaultSampledTextureInfo(SkColorType, Mipmapped mipmapped, Protected, Renderable) const override
SkISize getDepthAttachmentDimensions(const TextureInfo &, const SkISize colorAttachmentDimensions) const override
TextureInfo getDefaultDepthStencilTextureInfo(SkEnumBitMask< DepthStencilFlags >, uint32_t sampleCount, Protected) const override
uint32_t channelMask(const TextureInfo &) const override
UniqueKey makeComputePipelineKey(const ComputePipelineDesc &) const override
DawnCaps(const DawnBackendContext &, const ContextOptions &)
UniqueKey makeGraphicsPipelineKey(const GraphicsPipelineDesc &, const RenderPassDesc &) const override
TextureInfo getTextureInfoForSampledCopy(const TextureInfo &textureInfo, Mipmapped mipmapped) const override
TextureInfo getDefaultCompressedTextureInfo(SkTextureCompressionType, Mipmapped mipmapped, Protected) const override
bool supportsReadPixels(const TextureInfo &textureInfo) const override
TextureInfo getDefaultMSAATextureInfo(const TextureInfo &singleSampledInfo, Discardable discardable) const override
UniquePaintParamsID paintParamsID() const
uint32_t renderStepID() const
uint32_t numSamples() const
uint32_t uint32_t * format
wgpu::TextureFormat DawnDepthStencilFlagsToFormat(SkEnumBitMask< DepthStencilFlags > mask)
uint32_t DawnFormatChannels(wgpu::TextureFormat format)
static const skgpu::UniqueKey::Domain kGraphicsPipelineDomain
static void usage(char *argv0)
static constexpr SkISize Make(int32_t w, int32_t h)
constexpr int32_t width() const
constexpr int32_t height() const
bool fDualSourceBlendingSupport
bool fShaderDerivativeSupport
wgpu::TextureFormat getViewFormat() const
wgpu::TextureUsage fUsage
wgpu::TextureFormat getViewFormat() const
wgpu::TextureFormat fFormat
AttachmentDesc fDepthStencilAttachment
AttachmentDesc fColorAttachment
Layout fUniformBufferLayout
Layout fStorageBufferLayout
bool fSeparateTextureAndSamplerBinding