Donner SVG main
0.8.0 ยท 382bd0190.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::gpu::shader::wgsl::Module Struct Reference

A complete, immutable-on-success frontend module backed by fixed arenas. More...

#include "donner/gpu/shader/wgsl/Module.h"

Public Member Functions

constexpr bool isValid () const
 Returns true only after the parser completed every validation pass.
constexpr std::string_view name (NameRef reference) const
 Returns a module-owned identifier spelling.
constexpr std::string_view source () const
 Returns the validated WGSL source retained for WGSL projection.
constexpr uint32_t typeAlignment (Type type) const
 Returns natural host-shareable alignment, or zero for an unsupported type.
constexpr uint32_t typeSize (Type type) const
 Returns fixed byte size; runtime arrays and unsupported types have size zero.
constexpr uint32_t arrayStride (Type type) const
 Returns the array element stride, including trailing element padding.

Public Attributes

bool valid = false
 Set only after complete successful parsing and validation.
std::array< char, ModuleLimits::kMaxSourceBytes > sourceBytes
 Retained WGSL source storage.
uint32_t sourceByteCount = 0
 Number of valid bytes in sourceBytes.
std::array< char, ModuleLimits::kMaxIdentifierBytes > identifierBytes
 Module-owned identifier spelling storage.
uint16_t identifierByteCount = 0
 Number of valid bytes in identifierBytes.
std::array< Struct, ModuleLimits::kMaxStructs > structs
 Structure arena; only entries before structCount are valid.
uint16_t structCount = 0
 Number of structure arena entries.
std::array< StructMember, ModuleLimits::kMaxStructMembers > structMembers
 Structure-member arena; only entries before structMemberCount are valid.
uint16_t structMemberCount = 0
 Number of structure-member arena entries.
std::array< Binding, ModuleLimits::kMaxBindings > bindings
 Resource-binding arena; only entries before bindingCount are valid.
uint16_t bindingCount = 0
 Number of resource-binding arena entries.
std::array< Symbol, ModuleLimits::kMaxSymbols > symbols
 Resolved-symbol arena; only entries before symbolCount are valid.
uint16_t symbolCount = 0
 Number of resolved-symbol arena entries.
std::array< Expression, ModuleLimits::kMaxExpressions > expressions
 Typed-expression arena; only entries before expressionCount are valid.
uint16_t expressionCount = 0
 Number of expression arena entries.
std::array< Statement, ModuleLimits::kMaxStatements > statements
 Typed-statement arena; only entries before statementCount are valid.
uint16_t statementCount = 0
 Number of statement arena entries.
std::array< Function, ModuleLimits::kMaxFunctions > functions
 Function arena; only entries before functionCount are valid.
uint16_t functionCount = 0
 Number of function arena entries.
std::array< InterfaceVariable, ModuleLimits::kMaxInterfaceVariables > interfaceVariables
 Flattened entry-interface arena; only entries before interfaceVariableCount are valid.
uint16_t interfaceVariableCount = 0
 Number of flattened entry-interface arena entries.
std::array< FoldedConstant, ModuleLimits::kMaxFoldedConstants > foldedConstants
 Outermost folded expressions in source order, disjoint; only entries before foldedConstantCount are valid.
uint16_t foldedConstantCount = 0
 Number of folded-constant entries.

Detailed Description

A complete, immutable-on-success frontend module backed by fixed arenas.

Member Data Documentation

◆ bindings

std::array<Binding, ModuleLimits::kMaxBindings> donner::gpu::shader::wgsl::Module::bindings
Initial value:
=
{}

Resource-binding arena; only entries before bindingCount are valid.

◆ expressions

std::array<Expression, ModuleLimits::kMaxExpressions> donner::gpu::shader::wgsl::Module::expressions
Initial value:
=
{}

Typed-expression arena; only entries before expressionCount are valid.

◆ foldedConstants

std::array<FoldedConstant, ModuleLimits::kMaxFoldedConstants> donner::gpu::shader::wgsl::Module::foldedConstants
Initial value:
=
{}

Outermost folded expressions in source order, disjoint; only entries before foldedConstantCount are valid.

◆ functions

std::array<Function, ModuleLimits::kMaxFunctions> donner::gpu::shader::wgsl::Module::functions
Initial value:
=
{}

Function arena; only entries before functionCount are valid.

◆ identifierBytes

std::array<char, ModuleLimits::kMaxIdentifierBytes> donner::gpu::shader::wgsl::Module::identifierBytes
Initial value:
=
{}

Module-owned identifier spelling storage.

◆ interfaceVariables

std::array<InterfaceVariable, ModuleLimits::kMaxInterfaceVariables> donner::gpu::shader::wgsl::Module::interfaceVariables
Initial value:
=
{}

Flattened entry-interface arena; only entries before interfaceVariableCount are valid.

◆ sourceBytes

std::array<char, ModuleLimits::kMaxSourceBytes> donner::gpu::shader::wgsl::Module::sourceBytes
Initial value:
=
{}

Retained WGSL source storage.

◆ statements

std::array<Statement, ModuleLimits::kMaxStatements> donner::gpu::shader::wgsl::Module::statements
Initial value:
=
{}

Typed-statement arena; only entries before statementCount are valid.

◆ structMembers

std::array<StructMember, ModuleLimits::kMaxStructMembers> donner::gpu::shader::wgsl::Module::structMembers
Initial value:
=
{}

Structure-member arena; only entries before structMemberCount are valid.

◆ structs

std::array<Struct, ModuleLimits::kMaxStructs> donner::gpu::shader::wgsl::Module::structs
Initial value:
=
{}

Structure arena; only entries before structCount are valid.

◆ symbols

std::array<Symbol, ModuleLimits::kMaxSymbols> donner::gpu::shader::wgsl::Module::symbols
Initial value:
=
{}

Resolved-symbol arena; only entries before symbolCount are valid.


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