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). | |
| std::vector< ComputeEntryPointInfo > | computeEntryPoints |
| Compute entry points with their compiled workgroup sizes. | |
| std::optional< std::vector< ShaderBufferBindingInfo > > | bufferBindings |
| Buffer requirements derived from shader IR. | |
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.
| std::optional<std::vector<ShaderBufferBindingInfo> > donner::gpu::ShaderModuleDescriptor::bufferBindings |
Buffer requirements derived from shader IR.
An engaged empty list means no entry point uses a buffer; absence means requirements were not supplied. Native Metal requires these facts for every MSL module before compilation, including an explicitly empty list for modules without buffer bindings. They let pipeline creation reject binding-type and stage-visibility mismatches before shader use.
| std::vector<ComputeEntryPointInfo> donner::gpu::ShaderModuleDescriptor::computeEntryPoints |
Compute entry points with their compiled workgroup sizes.
Required for compute pipelines; render-only modules leave it empty. donner::gpu::shader::ComputeEntryPointsOf fills it from the emitted IR module.
| RcString donner::gpu::ShaderModuleDescriptor::label |
Debug label.
| ShaderSourceKind donner::gpu::ShaderModuleDescriptor::sourceKind = ShaderSourceKind::Wgsl |
Source language.
| RcString donner::gpu::ShaderModuleDescriptor::sourceText |
Shader source text (text kinds only).
| std::vector<uint32_t> donner::gpu::ShaderModuleDescriptor::spirvWords |
SPIR-V words (ShaderSourceKind::Spirv only).