Donner SVG 0.8.0
0.8.0 ยท ebf353960.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
CompiledShader.h File Reference

Immutable shader artifacts and reflected resource interfaces, independent of compiler code. More...

#include <array>
#include <cstdint>
#include <span>
#include <string_view>
#include <vector>
#include "donner/base/Utils.h"
#include "donner/gpu/Descriptors.h"
Include dependency graph for CompiledShader.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  donner::gpu::shader::ShaderName
 A small owning identifier in a frozen shader interface. More...
struct  donner::gpu::shader::ShaderBufferMember
 A reflected buffer member, including the layout required by the shader. More...
struct  donner::gpu::shader::ShaderResource
 One resource and the layout of its parameter block, when applicable. More...
struct  donner::gpu::shader::ShaderInterfaceVariable
 A flattened scalar/vector entry-point input or output. More...
struct  donner::gpu::shader::ShaderEntryPoint
 One entry point and its source-derived interface ranges. More...
struct  donner::gpu::shader::CompiledShaderView
 Borrowed views into a shader artifact with static storage in the owning program. More...

Namespaces

namespace  donner
 Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css.

Enumerations

enum class  donner::gpu::shader::ShaderScalarType : uint8_t {
  I32 ,
  U32 ,
  F32 ,
  None
}
 Numeric component format; None denotes a structure-valued member.
enum class  donner::gpu::shader::ShaderBuiltin : uint8_t {
  None ,
  GlobalInvocationId ,
  VertexIndex ,
  Position ,
  InstanceIndex
}
 Builtin reflected by an entry-point interface.

Functions

ShaderModuleDescriptor donner::gpu::shader::MakeShaderDescriptor (const CompiledShaderView &shader, ShaderSourceKind kind, std::string_view label)
 Builds a runtime descriptor from immutable precompiled data. No shader compiler is invoked.
std::vector< BindGroupLayoutEntry > donner::gpu::shader::MakeBindingLayout (const CompiledShaderView &shader)
 Derives a group-zero layout and stage visibility from statically accessed resources.

Detailed Description

Immutable shader artifacts and reflected resource interfaces, independent of compiler code.

Function Documentation

◆ MakeBindingLayout()

std::vector< BindGroupLayoutEntry > donner::gpu::shader::MakeBindingLayout ( const CompiledShaderView & shader)

Derives a group-zero layout and stage visibility from statically accessed resources.

Parameters
shaderStatic artifact views.

◆ MakeShaderDescriptor()

ShaderModuleDescriptor donner::gpu::shader::MakeShaderDescriptor ( const CompiledShaderView & shader,
ShaderSourceKind kind,
std::string_view label )

Builds a runtime descriptor from immutable precompiled data. No shader compiler is invoked.

Parameters
shaderStatic artifact views.
kindDevice-selected projection.
labelDiagnostic shader label.