Flutter Engine
The Flutter Engine
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
skgpu::graphite::DawnGraphicsPipeline Class Referencefinal

#include <DawnGraphicsPipeline.h>

Inheritance diagram for skgpu::graphite::DawnGraphicsPipeline:
skgpu::graphite::GraphicsPipeline skgpu::graphite::Resource

Classes

struct  AsyncPipelineCreation
 

Public Types

using BindGroupLayouts = std::array< wgpu::BindGroupLayout, kBindGroupCount >
 

Public Member Functions

 ~DawnGraphicsPipeline () override
 
uint32_t stencilReferenceValue () const
 
PrimitiveType primitiveType () const
 
bool hasStepUniforms () const
 
bool hasPaintUniforms () const
 
bool hasGradientBuffer () const
 
int numTexturesAndSamplers () const
 
const wgpu::RenderPipeline & dawnRenderPipeline () const
 
const BindGroupLayoutsdawnGroupLayouts () const
 
- Public Member Functions inherited from skgpu::graphite::GraphicsPipeline
 ~GraphicsPipeline () override
 
const char * getResourceType () const override
 
- Public Member Functions inherited from skgpu::graphite::Resource
 Resource (const Resource &)=delete
 
 Resource (Resource &&)=delete
 
Resourceoperator= (const Resource &)=delete
 
Resourceoperator= (Resource &&)=delete
 
void ref () const
 
void unref () const
 
void refCommandBuffer () const
 
void unrefCommandBuffer () const
 
Ownership ownership () const
 
skgpu::Budgeted budgeted () const
 
size_t gpuMemorySize () const
 
UniqueID uniqueID () const
 
virtual const char * getResourceType () const =0
 
std::string getLabel () const
 
void setLabel (std::string_view label)
 
bool wasDestroyed () const
 
const GraphiteResourceKeykey () const
 
void setKey (const GraphiteResourceKey &key)
 
void dumpMemoryStatistics (SkTraceMemoryDump *traceMemoryDump) const
 
virtual void prepareForReturnToCache (const std::function< void()> &takeRef)
 

Static Public Member Functions

static sk_sp< DawnGraphicsPipelineMake (const DawnSharedContext *sharedContext, DawnResourceProvider *resourceProvider, const RuntimeEffectDictionary *runtimeDict, const GraphicsPipelineDesc &pipelineDesc, const RenderPassDesc &renderPassDesc)
 

Static Public Attributes

static constexpr unsigned int kUniformBufferBindGroupIndex = 0
 
static constexpr unsigned int kTextureBindGroupIndex = 1
 
static constexpr unsigned int kBindGroupCount = 2
 
static constexpr unsigned int kIntrinsicUniformBufferIndex = 0
 
static constexpr unsigned int kRenderStepUniformBufferIndex = 1
 
static constexpr unsigned int kPaintUniformBufferIndex = 2
 
static constexpr unsigned int kGradientBufferIndex = 3
 
static constexpr unsigned int kNumUniformBuffers = 4
 
static constexpr unsigned int kVertexBufferIndex = 0
 
static constexpr unsigned int kInstanceBufferIndex = 1
 
static constexpr unsigned int kNumVertexBuffers = 2
 

Additional Inherited Members

- Protected Member Functions inherited from skgpu::graphite::GraphicsPipeline
 GraphicsPipeline (const SharedContext *, PipelineInfo *)
 
- Protected Member Functions inherited from skgpu::graphite::Resource
 Resource (const SharedContext *, Ownership, skgpu::Budgeted, size_t gpuMemorySize, bool commandBufferRefsAsUsageRefs=false)
 
virtual ~Resource ()
 
const SharedContextsharedContext () const
 
virtual void onDumpMemoryStatistics (SkTraceMemoryDump *traceMemoryDump, const char *dumpName) const
 
void setDeleteASAP ()
 

Detailed Description

Definition at line 40 of file DawnGraphicsPipeline.h.

Member Typedef Documentation

◆ BindGroupLayouts

Definition at line 72 of file DawnGraphicsPipeline.h.

Constructor & Destructor Documentation

◆ ~DawnGraphicsPipeline()

skgpu::graphite::DawnGraphicsPipeline::~DawnGraphicsPipeline ( )
override

Definition at line 623 of file DawnGraphicsPipeline.cpp.

623 {
624 this->freeGpuData();
625}

Member Function Documentation

◆ dawnGroupLayouts()

const BindGroupLayouts & skgpu::graphite::DawnGraphicsPipeline::dawnGroupLayouts ( ) const
inline

Definition at line 73 of file DawnGraphicsPipeline.h.

73{ return fGroupLayouts; }

◆ dawnRenderPipeline()

const wgpu::RenderPipeline & skgpu::graphite::DawnGraphicsPipeline::dawnRenderPipeline ( ) const

Definition at line 633 of file DawnGraphicsPipeline.cpp.

633 {
634 if (!fAsyncPipelineCreation) {
635 static const wgpu::RenderPipeline kNullPipeline = nullptr;
636 return kNullPipeline;
637 }
638 if (fAsyncPipelineCreation->fFinished) {
639 return fAsyncPipelineCreation->fRenderPipeline;
640 }
641#if defined(__EMSCRIPTEN__)
642 // We shouldn't use CreateRenderPipelineAsync in wasm.
643 SKGPU_LOG_F("CreateRenderPipelineAsync shouldn't be used in WASM");
644#else
645 wgpu::FutureWaitInfo waitInfo{};
646 waitInfo.future = fAsyncPipelineCreation->fFuture;
647 const auto& instance = static_cast<const DawnSharedContext*>(sharedContext())
648 ->device()
649 .GetAdapter()
650 .GetInstance();
651
652 [[maybe_unused]] auto status =
653 instance.WaitAny(1, &waitInfo, /*timeoutNS=*/std::numeric_limits<uint64_t>::max());
654 SkASSERT(status == wgpu::WaitStatus::Success);
655 SkASSERT(waitInfo.completed);
656#endif
657
658 return fAsyncPipelineCreation->fRenderPipeline;
659}
#define SKGPU_LOG_F(fmt,...)
Definition: Log.h:36
#define SkASSERT(cond)
Definition: SkAssert.h:116
const SharedContext * sharedContext() const
Definition: Resource.h:189
VkDevice device
Definition: main.cc:53
VkInstance instance
Definition: main.cc:48
static float max(float r, float g, float b)
Definition: hsl.cpp:49

◆ hasGradientBuffer()

bool skgpu::graphite::DawnGraphicsPipeline::hasGradientBuffer ( ) const
inline

Definition at line 68 of file DawnGraphicsPipeline.h.

68{ return fHasGradientBuffer; }

◆ hasPaintUniforms()

bool skgpu::graphite::DawnGraphicsPipeline::hasPaintUniforms ( ) const
inline

Definition at line 67 of file DawnGraphicsPipeline.h.

67{ return fHasPaintUniforms; }

◆ hasStepUniforms()

bool skgpu::graphite::DawnGraphicsPipeline::hasStepUniforms ( ) const
inline

Definition at line 66 of file DawnGraphicsPipeline.h.

66{ return fHasStepUniforms; }

◆ Make()

sk_sp< DawnGraphicsPipeline > skgpu::graphite::DawnGraphicsPipeline::Make ( const DawnSharedContext sharedContext,
DawnResourceProvider resourceProvider,
const RuntimeEffectDictionary runtimeDict,
const GraphicsPipelineDesc pipelineDesc,
const RenderPassDesc renderPassDesc 
)
static

Definition at line 260 of file DawnGraphicsPipeline.cpp.

264 {
265 const DawnCaps& caps = *static_cast<const DawnCaps*>(sharedContext->caps());
266 const auto& device = sharedContext->device();
267
268 SkSL::Program::Interface vsInterface, fsInterface;
270
271 settings.fForceNoRTFlip = true;
272
273 ShaderErrorHandler* errorHandler = caps.shaderErrorHandler();
274
275 const RenderStep* step = sharedContext->rendererProvider()->lookup(pipelineDesc.renderStepID());
276 const bool useStorageBuffers = caps.storageBufferPreferred();
277
278 std::string vsCode, fsCode;
279 wgpu::ShaderModule fsModule, vsModule;
280
281 // Some steps just render depth buffer but not color buffer, so the fragment
282 // shader is null.
283 UniquePaintParamsID paintID = pipelineDesc.paintParamsID();
284 FragSkSLInfo fsSkSLInfo = BuildFragmentSkSL(&caps,
286 runtimeDict,
287 step,
288 paintID,
289 useStorageBuffers,
290 renderPassDesc.fWriteSwizzle);
291 std::string& fsSkSL = fsSkSLInfo.fSkSL;
292 const BlendInfo& blendInfo = fsSkSLInfo.fBlendInfo;
293 const bool localCoordsNeeded = fsSkSLInfo.fRequiresLocalCoords;
294 const int numTexturesAndSamplers = fsSkSLInfo.fNumTexturesAndSamplers;
295
296 bool hasFragmentSkSL = !fsSkSL.empty();
297 if (hasFragmentSkSL) {
298 if (!skgpu::SkSLToWGSL(caps.shaderCaps(),
299 fsSkSL,
301 settings,
302 &fsCode,
303 &fsInterface,
304 errorHandler)) {
305 return {};
306 }
307 if (!DawnCompileWGSLShaderModule(sharedContext, fsSkSLInfo.fLabel.c_str(), fsCode,
308 &fsModule, errorHandler)) {
309 return {};
310 }
311 }
312
313 VertSkSLInfo vsSkSLInfo = BuildVertexSkSL(caps.resourceBindingRequirements(),
314 step,
315 useStorageBuffers,
316 localCoordsNeeded);
317 const std::string& vsSkSL = vsSkSLInfo.fSkSL;
318 if (!skgpu::SkSLToWGSL(caps.shaderCaps(),
319 vsSkSL,
321 settings,
322 &vsCode,
323 &vsInterface,
324 errorHandler)) {
325 return {};
326 }
327 if (!DawnCompileWGSLShaderModule(sharedContext, vsSkSLInfo.fLabel.c_str(), vsCode,
328 &vsModule, errorHandler)) {
329 return {};
330 }
331
332 std::string pipelineLabel =
333 GetPipelineLabel(sharedContext->shaderCodeDictionary(), renderPassDesc, step, paintID);
334 wgpu::RenderPipelineDescriptor descriptor;
335 // Always set the label for pipelines, dawn may need it for tracing.
336 descriptor.label = pipelineLabel.c_str();
337
338 // Fragment state
339 skgpu::BlendEquation equation = blendInfo.fEquation;
340 skgpu::BlendCoeff srcCoeff = blendInfo.fSrcBlend;
341 skgpu::BlendCoeff dstCoeff = blendInfo.fDstBlend;
342 bool blendOn = !skgpu::BlendShouldDisable(equation, srcCoeff, dstCoeff);
343
344 wgpu::BlendState blend;
345 if (blendOn) {
346 blend.color.operation = blend_equation_to_dawn_blend_op(equation);
347 blend.color.srcFactor = blend_coeff_to_dawn_blend(caps, srcCoeff);
348 blend.color.dstFactor = blend_coeff_to_dawn_blend(caps, dstCoeff);
349 blend.alpha.operation = blend_equation_to_dawn_blend_op(equation);
350 blend.alpha.srcFactor = blend_coeff_to_dawn_blend_for_alpha(caps, srcCoeff);
351 blend.alpha.dstFactor = blend_coeff_to_dawn_blend_for_alpha(caps, dstCoeff);
352 }
353
354 wgpu::ColorTargetState colorTarget;
355 colorTarget.format =
356 renderPassDesc.fColorAttachment.fTextureInfo.dawnTextureSpec().getViewFormat();
357 colorTarget.blend = blendOn ? &blend : nullptr;
358 colorTarget.writeMask = blendInfo.fWritesColor && hasFragmentSkSL ? wgpu::ColorWriteMask::All
359 : wgpu::ColorWriteMask::None;
360
361#if !defined(__EMSCRIPTEN__)
362 const bool loadMsaaFromResolve =
363 renderPassDesc.fColorResolveAttachment.fTextureInfo.isValid() &&
364 renderPassDesc.fColorResolveAttachment.fLoadOp == LoadOp::kLoad;
365 // Special case: a render pass loading resolve texture requires additional settings for the
366 // pipeline to make it compatible.
367 wgpu::ColorTargetStateExpandResolveTextureDawn pipelineMSAALoadResolveTextureDesc;
368 if (loadMsaaFromResolve && sharedContext->dawnCaps()->resolveTextureLoadOp().has_value()) {
369 SkASSERT(device.HasFeature(wgpu::FeatureName::DawnLoadResolveTexture));
370 colorTarget.nextInChain = &pipelineMSAALoadResolveTextureDesc;
371 pipelineMSAALoadResolveTextureDesc.enabled = true;
372 }
373#endif
374
375 wgpu::FragmentState fragment;
376 // Dawn doesn't allow having a color attachment but without fragment shader, so have to use a
377 // noop fragment shader, if fragment shader is null.
378 fragment.module = hasFragmentSkSL ? std::move(fsModule) : sharedContext->noopFragment();
379 fragment.entryPoint = "main";
380 fragment.targetCount = 1;
381 fragment.targets = &colorTarget;
382 descriptor.fragment = &fragment;
383
384 // Depth stencil state
385 const auto& depthStencilSettings = step->depthStencilSettings();
386 SkASSERT(depthStencilSettings.fDepthTestEnabled ||
387 depthStencilSettings.fDepthCompareOp == CompareOp::kAlways);
388 wgpu::DepthStencilState depthStencil;
389 if (renderPassDesc.fDepthStencilAttachment.fTextureInfo.isValid()) {
390 wgpu::TextureFormat dsFormat =
391 renderPassDesc.fDepthStencilAttachment.fTextureInfo.dawnTextureSpec()
392 .getViewFormat();
393 depthStencil.format =
394 DawnFormatIsDepthOrStencil(dsFormat) ? dsFormat : wgpu::TextureFormat::Undefined;
395 if (depthStencilSettings.fDepthTestEnabled) {
396 depthStencil.depthWriteEnabled = depthStencilSettings.fDepthWriteEnabled;
397 }
398 depthStencil.depthCompare = compare_op_to_dawn(depthStencilSettings.fDepthCompareOp);
399
400 // Dawn validation fails if the stencil state is non-default and the
401 // format doesn't have the stencil aspect.
402 if (DawnFormatIsStencil(dsFormat) && depthStencilSettings.fStencilTestEnabled) {
403 depthStencil.stencilFront = stencil_face_to_dawn(depthStencilSettings.fFrontStencil);
404 depthStencil.stencilBack = stencil_face_to_dawn(depthStencilSettings.fBackStencil);
405 depthStencil.stencilReadMask = depthStencilSettings.fFrontStencil.fReadMask;
406 depthStencil.stencilWriteMask = depthStencilSettings.fFrontStencil.fWriteMask;
407 }
408
409 descriptor.depthStencil = &depthStencil;
410 }
411
412 // Pipeline layout
413 BindGroupLayouts groupLayouts;
414 {
415 groupLayouts[0] = resourceProvider->getOrCreateUniformBuffersBindGroupLayout();
416 if (!groupLayouts[0]) {
417 return {};
418 }
419
420 bool hasFragmentSamplers = hasFragmentSkSL && numTexturesAndSamplers > 0;
421 if (hasFragmentSamplers) {
422 if (numTexturesAndSamplers == 2) {
423 // Common case: single texture + sampler.
424 groupLayouts[1] =
425 resourceProvider->getOrCreateSingleTextureSamplerBindGroupLayout();
426 } else {
427 std::vector<wgpu::BindGroupLayoutEntry> entries(numTexturesAndSamplers);
428 for (int i = 0; i < numTexturesAndSamplers;) {
429 entries[i].binding = static_cast<uint32_t>(i);
430 entries[i].visibility = wgpu::ShaderStage::Fragment;
431 entries[i].sampler.type = wgpu::SamplerBindingType::Filtering;
432 ++i;
433 entries[i].binding = i;
434 entries[i].visibility = wgpu::ShaderStage::Fragment;
435 entries[i].texture.sampleType = wgpu::TextureSampleType::Float;
436 entries[i].texture.viewDimension = wgpu::TextureViewDimension::e2D;
437 entries[i].texture.multisampled = false;
438 ++i;
439 }
440
441 wgpu::BindGroupLayoutDescriptor groupLayoutDesc;
443 groupLayoutDesc.label = vsSkSLInfo.fLabel.c_str();
444 }
445 groupLayoutDesc.entryCount = entries.size();
446 groupLayoutDesc.entries = entries.data();
447 groupLayouts[1] = device.CreateBindGroupLayout(&groupLayoutDesc);
448 }
449 if (!groupLayouts[1]) {
450 return {};
451 }
452 }
453
454 wgpu::PipelineLayoutDescriptor layoutDesc;
456 layoutDesc.label = fsSkSLInfo.fLabel.c_str();
457 }
458 layoutDesc.bindGroupLayoutCount =
459 hasFragmentSamplers ? groupLayouts.size() : groupLayouts.size() - 1;
460 layoutDesc.bindGroupLayouts = groupLayouts.data();
461 auto layout = device.CreatePipelineLayout(&layoutDesc);
462 if (!layout) {
463 return {};
464 }
465 descriptor.layout = std::move(layout);
466 }
467
468 // Vertex state
469 std::array<wgpu::VertexBufferLayout, kNumVertexBuffers> vertexBufferLayouts;
470 // Vertex buffer layout
471 std::vector<wgpu::VertexAttribute> vertexAttributes;
472 {
473 auto arrayStride = create_vertex_attributes(step->vertexAttributes(),
474 0,
475 &vertexAttributes);
476 auto& layout = vertexBufferLayouts[kVertexBufferIndex];
477 if (arrayStride) {
478 layout.arrayStride = arrayStride;
479 layout.stepMode = wgpu::VertexStepMode::Vertex;
480 layout.attributeCount = vertexAttributes.size();
481 layout.attributes = vertexAttributes.data();
482 } else {
483 layout.arrayStride = 0;
484 layout.stepMode = wgpu::VertexStepMode::VertexBufferNotUsed;
485 layout.attributeCount = 0;
486 layout.attributes = nullptr;
487 }
488 }
489
490 // Instance buffer layout
491 std::vector<wgpu::VertexAttribute> instanceAttributes;
492 {
493 auto arrayStride = create_vertex_attributes(step->instanceAttributes(),
494 step->vertexAttributes().size(),
495 &instanceAttributes);
496 auto& layout = vertexBufferLayouts[kInstanceBufferIndex];
497 if (arrayStride) {
498 layout.arrayStride = arrayStride;
499 layout.stepMode = wgpu::VertexStepMode::Instance;
500 layout.attributeCount = instanceAttributes.size();
501 layout.attributes = instanceAttributes.data();
502 } else {
503 layout.arrayStride = 0;
504 layout.stepMode = wgpu::VertexStepMode::VertexBufferNotUsed;
505 layout.attributeCount = 0;
506 layout.attributes = nullptr;
507 }
508 }
509
510 auto& vertex = descriptor.vertex;
511 vertex.module = std::move(vsModule);
512 vertex.entryPoint = "main";
513 vertex.constantCount = 0;
514 vertex.constants = nullptr;
515 vertex.bufferCount = vertexBufferLayouts.size();
516 vertex.buffers = vertexBufferLayouts.data();
517
518 // Other state
519 descriptor.primitive.frontFace = wgpu::FrontFace::CCW;
520 descriptor.primitive.cullMode = wgpu::CullMode::None;
521 switch (step->primitiveType()) {
523 descriptor.primitive.topology = wgpu::PrimitiveTopology::TriangleList;
524 break;
526 descriptor.primitive.topology = wgpu::PrimitiveTopology::TriangleStrip;
527 descriptor.primitive.stripIndexFormat = wgpu::IndexFormat::Uint16;
528 break;
530 descriptor.primitive.topology = wgpu::PrimitiveTopology::PointList;
531 break;
532 }
533
534 // Multisampled state
535 descriptor.multisample.count = renderPassDesc.fSampleCount;
536 descriptor.multisample.mask = 0xFFFFFFFF;
537 descriptor.multisample.alphaToCoverageEnabled = false;
538
539 auto asyncCreation = std::make_unique<AsyncPipelineCreation>();
540
541 if (caps.useAsyncPipelineCreation()) {
542#if defined(__EMSCRIPTEN__)
543 // We shouldn't use CreateRenderPipelineAsync in wasm.
544 SKGPU_LOG_F("CreateRenderPipelineAsync shouldn't be used in WASM");
545#else
546 asyncCreation->fFuture = device.CreateRenderPipelineAsync(
547 &descriptor,
548 wgpu::CallbackMode::WaitAnyOnly,
549 [asyncCreationPtr = asyncCreation.get()](wgpu::CreatePipelineAsyncStatus status,
550 wgpu::RenderPipeline pipeline,
551 char const* message) {
552 if (status != wgpu::CreatePipelineAsyncStatus::Success) {
553 SKGPU_LOG_E("Failed to create render pipeline (%d): %s",
554 static_cast<int>(status),
555 message);
556 // invalidate AsyncPipelineCreation pointer to signal that this pipeline has
557 // failed.
558 asyncCreationPtr->fRenderPipeline = nullptr;
559 } else {
560 asyncCreationPtr->fRenderPipeline = std::move(pipeline);
561 }
562
563 asyncCreationPtr->fFinished = true;
564 });
565#endif
566 } else {
567 std::optional<DawnErrorChecker> errorChecker;
568 if (sharedContext->dawnCaps()->allowScopedErrorChecks()) {
569 errorChecker.emplace(sharedContext);
570 }
571 asyncCreation->fRenderPipeline = device.CreateRenderPipeline(&descriptor);
572 asyncCreation->fFinished = true;
573
574 if (errorChecker.has_value() && errorChecker->popErrorScopes() != DawnErrorType::kNoError) {
575 asyncCreation->fRenderPipeline = nullptr;
576 }
577 }
578#if defined(GRAPHITE_TEST_UTILS)
579 GraphicsPipeline::PipelineInfo pipelineInfo = {pipelineDesc.renderStepID(),
580 pipelineDesc.paintParamsID(),
581 std::move(vsSkSL),
582 std::move(fsSkSL),
583 std::move(vsCode),
584 std::move(fsCode)};
585 GraphicsPipeline::PipelineInfo* pipelineInfoPtr = &pipelineInfo;
586#else
587 GraphicsPipeline::PipelineInfo* pipelineInfoPtr = nullptr;
588#endif
589
591 new DawnGraphicsPipeline(sharedContext,
592 pipelineInfoPtr,
593 std::move(asyncCreation),
594 std::move(groupLayouts),
595 step->primitiveType(),
596 depthStencilSettings.fStencilReferenceValue,
597 /*hasStepUniforms=*/!step->uniforms().empty(),
598 /*hasPaintUniforms=*/fsSkSLInfo.fNumPaintUniforms > 0,
599 /*hasGradientbuffer=*/fsSkSLInfo.fHasGradientBuffer,
601}
static int step(int x, SkScalar min, SkScalar max)
Definition: BlurTest.cpp:215
GrTriangulator::Vertex Vertex
bool setBackendLabels() const
Definition: Caps.h:297
std::array< wgpu::BindGroupLayout, kBindGroupCount > BindGroupLayouts
static constexpr unsigned int kInstanceBufferIndex
static constexpr unsigned int kVertexBufferIndex
const RenderStep * lookup(uint32_t uniqueID) const
const Caps * caps() const
Definition: SharedContext.h:39
ShaderCodeDictionary * shaderCodeDictionary()
Definition: SharedContext.h:49
const RendererProvider * rendererProvider() const
Definition: SharedContext.h:47
static SkColor blend(SkColor dst, SkColor src, void(*mode)(float, float, float, float *, float *, float *))
Definition: hsl.cpp:142
Win32Message message
VertSkSLInfo BuildVertexSkSL(const ResourceBindingRequirements &bindingReqs, const RenderStep *step, bool useStorageBuffers, bool defineLocalCoordsVarying)
bool DawnFormatIsDepthOrStencil(wgpu::TextureFormat format)
FragSkSLInfo BuildFragmentSkSL(const Caps *caps, const ShaderCodeDictionary *dict, const RuntimeEffectDictionary *rteDict, const RenderStep *step, UniquePaintParamsID paintID, bool useStorageBuffers, skgpu::Swizzle writeSwizzle)
std::string GetPipelineLabel(const ShaderCodeDictionary *dict, const RenderPassDesc &renderPassDesc, const RenderStep *renderStep, UniquePaintParamsID paintID)
bool DawnCompileWGSLShaderModule(const DawnSharedContext *sharedContext, const char *label, const std::string &wgsl, wgpu::ShaderModule *module, ShaderErrorHandler *errorHandler)
bool DawnFormatIsStencil(wgpu::TextureFormat format)
static constexpr bool BlendShouldDisable(BlendEquation equation, BlendCoeff srcCoeff, BlendCoeff dstCoeff)
Definition: Blend.h:145
BlendEquation
Definition: Blend.h:26
BlendCoeff
Definition: Blend.h:60
bool SkSLToWGSL(const SkSL::ShaderCaps *caps, const std::string &sksl, SkSL::ProgramKind programKind, const SkSL::ProgramSettings &settings, std::string *wgsl, SkSL::ProgramInterface *outInterface, ShaderErrorHandler *errorHandler)
Definition: DawnUtilsPriv.h:29

◆ numTexturesAndSamplers()

int skgpu::graphite::DawnGraphicsPipeline::numTexturesAndSamplers ( ) const
inline

Definition at line 69 of file DawnGraphicsPipeline.h.

69{ return fNumFragmentTexturesAndSamplers; }

◆ primitiveType()

PrimitiveType skgpu::graphite::DawnGraphicsPipeline::primitiveType ( ) const
inline

Definition at line 65 of file DawnGraphicsPipeline.h.

65{ return fPrimitiveType; }

◆ stencilReferenceValue()

uint32_t skgpu::graphite::DawnGraphicsPipeline::stencilReferenceValue ( ) const
inline

Definition at line 64 of file DawnGraphicsPipeline.h.

64{ return fStencilReferenceValue; }

Member Data Documentation

◆ kBindGroupCount

constexpr unsigned int skgpu::graphite::DawnGraphicsPipeline::kBindGroupCount = 2
inlinestaticconstexpr

Definition at line 44 of file DawnGraphicsPipeline.h.

◆ kGradientBufferIndex

constexpr unsigned int skgpu::graphite::DawnGraphicsPipeline::kGradientBufferIndex = 3
inlinestaticconstexpr

Definition at line 49 of file DawnGraphicsPipeline.h.

◆ kInstanceBufferIndex

constexpr unsigned int skgpu::graphite::DawnGraphicsPipeline::kInstanceBufferIndex = 1
inlinestaticconstexpr

Definition at line 53 of file DawnGraphicsPipeline.h.

◆ kIntrinsicUniformBufferIndex

constexpr unsigned int skgpu::graphite::DawnGraphicsPipeline::kIntrinsicUniformBufferIndex = 0
inlinestaticconstexpr

Definition at line 46 of file DawnGraphicsPipeline.h.

◆ kNumUniformBuffers

constexpr unsigned int skgpu::graphite::DawnGraphicsPipeline::kNumUniformBuffers = 4
inlinestaticconstexpr

Definition at line 50 of file DawnGraphicsPipeline.h.

◆ kNumVertexBuffers

constexpr unsigned int skgpu::graphite::DawnGraphicsPipeline::kNumVertexBuffers = 2
inlinestaticconstexpr

Definition at line 54 of file DawnGraphicsPipeline.h.

◆ kPaintUniformBufferIndex

constexpr unsigned int skgpu::graphite::DawnGraphicsPipeline::kPaintUniformBufferIndex = 2
inlinestaticconstexpr

Definition at line 48 of file DawnGraphicsPipeline.h.

◆ kRenderStepUniformBufferIndex

constexpr unsigned int skgpu::graphite::DawnGraphicsPipeline::kRenderStepUniformBufferIndex = 1
inlinestaticconstexpr

Definition at line 47 of file DawnGraphicsPipeline.h.

◆ kTextureBindGroupIndex

constexpr unsigned int skgpu::graphite::DawnGraphicsPipeline::kTextureBindGroupIndex = 1
inlinestaticconstexpr

Definition at line 43 of file DawnGraphicsPipeline.h.

◆ kUniformBufferBindGroupIndex

constexpr unsigned int skgpu::graphite::DawnGraphicsPipeline::kUniformBufferBindGroupIndex = 0
inlinestaticconstexpr

Definition at line 42 of file DawnGraphicsPipeline.h.

◆ kVertexBufferIndex

constexpr unsigned int skgpu::graphite::DawnGraphicsPipeline::kVertexBufferIndex = 0
inlinestaticconstexpr

Definition at line 52 of file DawnGraphicsPipeline.h.


The documentation for this class was generated from the following files: