8#ifndef skgpu_graphite_DawnGraphicsPipeline_DEFINED
9#define skgpu_graphite_DawnGraphicsPipeline_DEFINED
18#include "webgpu/webgpu_cpp.h"
33class GraphicsPipelineDesc;
34class DawnResourceProvider;
35class DawnSharedContext;
36struct DepthStencilSettings;
38class RuntimeEffectDictionary;
76 struct AsyncPipelineCreation;
79 PipelineInfo* pipelineInfo,
80 std::unique_ptr<AsyncPipelineCreation> pipelineCreationInfo,
87 int numFragmentTexturesAndSamplers);
89 void freeGpuData()
override;
91 std::unique_ptr<AsyncPipelineCreation> fAsyncPipelineCreation;
94 const uint32_t fStencilReferenceValue;
95 const bool fHasStepUniforms;
96 const bool fHasPaintUniforms;
97 const bool fHasGradientBuffer;
98 const int fNumFragmentTexturesAndSamplers;
bool hasStepUniforms() const
uint32_t stencilReferenceValue() const
static constexpr unsigned int kUniformBufferBindGroupIndex
static constexpr unsigned int kTextureBindGroupIndex
static constexpr unsigned int kRenderStepUniformBufferIndex
std::array< wgpu::BindGroupLayout, kBindGroupCount > BindGroupLayouts
const wgpu::RenderPipeline & dawnRenderPipeline() const
static constexpr unsigned int kPaintUniformBufferIndex
int numTexturesAndSamplers() const
static constexpr unsigned int kBindGroupCount
static constexpr unsigned int kInstanceBufferIndex
~DawnGraphicsPipeline() override
const BindGroupLayouts & dawnGroupLayouts() const
bool hasPaintUniforms() const
static constexpr unsigned int kNumUniformBuffers
static constexpr unsigned int kGradientBufferIndex
bool hasGradientBuffer() const
static sk_sp< DawnGraphicsPipeline > Make(const DawnSharedContext *sharedContext, DawnResourceProvider *resourceProvider, const RuntimeEffectDictionary *runtimeDict, const GraphicsPipelineDesc &pipelineDesc, const RenderPassDesc &renderPassDesc)
PrimitiveType primitiveType() const
static constexpr unsigned int kNumVertexBuffers
static constexpr unsigned int kVertexBufferIndex
static constexpr unsigned int kIntrinsicUniformBufferIndex
const SharedContext * sharedContext() const