8#ifndef skgpu_graphite_MtlGraphicsPipeline_DEFINED
9#define skgpu_graphite_MtlGraphicsPipeline_DEFINED
17#import <Metal/Metal.h>
27class GraphicsPipelineDesc;
28class MtlResourceProvider;
29class MtlSharedContext;
43 const std::string& label,
48 sk_cfp<id<MTLDepthStencilState>>,
49 uint32_t stencilRefValue,
52 PipelineInfo* pipelineInfo);
62 PipelineInfo* pipelineInfo,
63 sk_cfp<id<MTLRenderPipelineState>> pso,
64 sk_cfp<id<MTLDepthStencilState>> dss,
67 void freeGpuData()
override;
69 sk_cfp<id<MTLRenderPipelineState>> fPipelineState;
70 sk_cfp<id<MTLDepthStencilState>> fDepthStencilState;
71 uint32_t fStencilReferenceValue;
std::pair< id< MTLLibrary >, std::string > MSLFunction
id< MTLDepthStencilState > mtlDepthStencilState() const
static constexpr unsigned int kVertexBufferIndex
uint32_t stencilReferenceValue() const
static constexpr unsigned int kInstanceBufferIndex
static constexpr unsigned int kPaintUniformBufferIndex
id< MTLRenderPipelineState > mtlPipelineState() const
~MtlGraphicsPipeline() override
static constexpr unsigned int kRenderStepUniformBufferIndex
static constexpr unsigned int kIntrinsicUniformBufferIndex
static sk_sp< MtlGraphicsPipeline > Make(const MtlSharedContext *, const std::string &label, MSLFunction vertexMain, SkSpan< const Attribute > vertexAttrs, SkSpan< const Attribute > instanceAttrs, MSLFunction fragmentMain, sk_cfp< id< MTLDepthStencilState > >, uint32_t stencilRefValue, const BlendInfo &blendInfo, const RenderPassDesc &, PipelineInfo *pipelineInfo)
static constexpr unsigned int kGradientBufferIndex
const SharedContext * sharedContext() const