Toast Engine
Loading...
Searching...
No Matches
shader_reflection.hpp File Reference
#include <cstdint>
#include <nlohmann/json.hpp>
#include <optional>
#include <slang.h>
#include <string>
#include <toast/export.hpp>
#include <vector>
Include dependency graph for shader_reflection.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  renderer::ShaderInspectorMeta
struct  renderer::ShaderBlockMember
struct  renderer::ShaderBinding
struct  renderer::ShaderPushConstants
struct  renderer::ShaderEntryPoint
struct  renderer::ShaderReflection

Enumerations

enum class  ShaderMemberType : uint8_t {
  unknown , bool_t , int_t , uint_t ,
  float_t , vec2 , vec3 , vec4 ,
  mat3 , mat4
}
enum class  ShaderBindingKind : uint8_t {
  uniform_buffer , storage_buffer , combined_image_sampler , sampled_image ,
  sampler , storage_image , acceleration_structure
}

Functions

auto renderer::extractReflection (slang::ProgramLayout *layout) -> ShaderReflection
void renderer::extractModuleEntryPoints (slang::IModule *module, ShaderReflection &reflection)
 Must come from the IModule since ProgramLayout reports 0 entry points for a module only composite.
auto renderer::toString (ShaderMemberType type) -> std::string_view
auto renderer::toString (ShaderBindingKind kind) -> std::string_view
auto renderer::memberTypeFromString (std::string_view str) -> ShaderMemberType
auto renderer::bindingKindFromString (std::string_view str) -> ShaderBindingKind

Detailed Description

Author
Xein
Date
17/07/2026

Function Documentation

◆ toString()

auto renderer::toString ( ShaderBindingKind kind) -> std::string_view
Warning
Every ShaderBindingKind must appear here and in bindingKindFromString()