ShaderCompiler::GlslReflector class

Parses global-scope GLSL declarations and computes std140 layouts.

Public static functions

static auto ReflectStage(const std::vector<SourceLine>& lines, bool vertexStage, StageReflection& result, Diagnostic& diag) -> bool
static auto MergeStages(const StageReflection& vertex, const StageReflection& fragment, StageReflection& merged, Diagnostic& diag) -> bool

Function documentation

static bool ShaderCompiler::GlslReflector::ReflectStage(const std::vector<SourceLine>& lines, bool vertexStage, StageReflection& result, Diagnostic& diag)

Reflects one preprocessed stage, returns false and fills diag on error

static bool ShaderCompiler::GlslReflector::MergeStages(const StageReflection& vertex, const StageReflection& fragment, StageReflection& merged, Diagnostic& diag)

Merges vertex and fragment reflection into a program-level view (GL-style, deduplicated by name)