42 const std::array<float, 4>& clearColor,
46 desc.fWriteSwizzle = writeSwizzle;
47 desc.fSampleCount = 1;
53 desc.fColorAttachment.fTextureInfo = targetInfo;
54 desc.fColorAttachment.fLoadOp = loadOp;
55 desc.fColorAttachment.fStoreOp = storeOp;
61 if (msaaTextureInfo.isValid()) {
62 desc.fColorAttachment.fTextureInfo = msaaTextureInfo;
70 desc.fColorResolveAttachment.fTextureInfo = targetInfo;
76 desc.fColorResolveAttachment.fStoreOp = storeOp;
78 desc.fSampleCount = msaaTextureInfo.numSamples();
81 desc.fColorAttachment.fTextureInfo = targetInfo;
82 desc.fColorAttachment.fLoadOp = loadOp;
83 desc.fColorAttachment.fStoreOp = storeOp;
87 desc.fColorAttachment.fTextureInfo = targetInfo;
88 desc.fColorAttachment.fLoadOp = loadOp;
89 desc.fColorAttachment.fStoreOp = storeOp;
91 desc.fClearColor = clearColor;
99 desc.fClearDepth = 0.f;
100 desc.fClearStencil = 0;
108 return SkStringPrintf(
"RP(color: %s, resolve: %s, ds: %s, samples: %u, swizzle: %s, "
109 "clear: c(%f,%f,%f,%f), d(%f), s(0x%02x))",
124 const char* colorLoadStr =
"";
127 colorLoadStr =
" w/ msaa load";
131 return SkStringPrintf(
"RP(color: %s%s, resolve: %s, ds: %s, samples: %u, swizzle: %s)",
147 return SkString(
"invalid attachment");
SK_API SkString SkStringPrintf(const char *format,...) SK_PRINTF_LIKE(1
Creates a new string and writes into it using a printf()-style format.
const char * c_str() const
SkString asString() const
virtual TextureInfo getDefaultDepthStencilTextureInfo(SkEnumBitMask< DepthStencilFlags >, uint32_t sampleCount, Protected) const =0
virtual TextureInfo getDefaultMSAATextureInfo(const TextureInfo &singleSampledInfo, Discardable discardable) const =0
int defaultMSAASamplesCount() const
bool msaaRenderToSingleSampledSupport() const
SkString toString() const
SkString toRPAttachmentString() const
Protected isProtected() const
static std::string to_str(const SharedContext *ctx, const GraphicsPipelineDesc &gpDesc, const RenderPassDesc &rpDesc)
SkString toString() const
AttachmentDesc fDepthStencilAttachment
SkString toString() const
AttachmentDesc fColorResolveAttachment
std::array< float, 4 > fClearColor
SkString toPipelineLabel() const
AttachmentDesc fColorAttachment
static RenderPassDesc Make(const Caps *caps, const TextureInfo &targetInfo, LoadOp loadOp, StoreOp storeOp, SkEnumBitMask< DepthStencilFlags > depthStencilFlags, const std::array< float, 4 > &clearColor, bool requiresMSAA, Swizzle writeSwizzle)