Donner SVG 0.8.0-pre
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::gpu::ShaderModuleDescriptor Struct Reference

Descriptor for Device::createShaderModule. Source is trusted generated build output, never runtime input from documents. Exactly one source representation must be populated: text kinds (ShaderSourceKind::Wgsl, ShaderSourceKind::Msl) require nonempty sourceText and empty spirvWords; ShaderSourceKind::Spirv requires nonempty spirvWords and empty sourceText. Device::createShaderModule fails closed on any other combination. More...

#include "donner/gpu/Descriptors.h"

Public Attributes

RcString label
 Debug label.
RcString sourceText
 Shader source text (text kinds only).
ShaderSourceKind sourceKind = ShaderSourceKind::Wgsl
 Source language.
std::vector< uint32_t > spirvWords
 SPIR-V words (ShaderSourceKind::Spirv only). Compute entry points this module contains, with the workgroup size compiled into each. Required to create a compute pipeline against this module; render-only modules leave it empty. donner::gpu::shader::ComputeEntryPointsOf fills it from the IR module the source was emitted from, so the size is never transcribed by hand.
std::vector< ComputeEntryPointInfocomputeEntryPoints

Detailed Description

Descriptor for Device::createShaderModule. Source is trusted generated build output, never runtime input from documents. Exactly one source representation must be populated: text kinds (ShaderSourceKind::Wgsl, ShaderSourceKind::Msl) require nonempty sourceText and empty spirvWords; ShaderSourceKind::Spirv requires nonempty spirvWords and empty sourceText. Device::createShaderModule fails closed on any other combination.

Member Data Documentation

◆ computeEntryPoints

std::vector<ComputeEntryPointInfo> donner::gpu::ShaderModuleDescriptor::computeEntryPoints

◆ label

RcString donner::gpu::ShaderModuleDescriptor::label

Debug label.

◆ sourceKind

ShaderSourceKind donner::gpu::ShaderModuleDescriptor::sourceKind = ShaderSourceKind::Wgsl

Source language.

◆ sourceText

RcString donner::gpu::ShaderModuleDescriptor::sourceText

Shader source text (text kinds only).

◆ spirvWords

std::vector<uint32_t> donner::gpu::ShaderModuleDescriptor::spirvWords

SPIR-V words (ShaderSourceKind::Spirv only). Compute entry points this module contains, with the workgroup size compiled into each. Required to create a compute pipeline against this module; render-only modules leave it empty. donner::gpu::shader::ComputeEntryPointsOf fills it from the IR module the source was emitted from, so the size is never transcribed by hand.


The documentation for this struct was generated from the following file: