Emitter class
#include <Utilities/ShaderCompiler/Emit.h>
Emits the generated C++ header and the "--check" reflection dump.
Public static functions
- static auto BuildTypesHeader() -> String
- static auto EmitHeader(const SmallVectorImpl<ProgramReflection>& programs, StringView ns, StringView inputFileName, SpirvCompileFn& compileSpirv, DxbcCompileFn& compileDxbc, String& output, BackendArtifacts& artifacts, Diagnostic& diag) -> bool
- static auto BuildCheckDump(const ShaderDocument& document, const SmallVectorImpl<VariantReflection>& variants) -> String
Function documentation
static String ShaderCompiler:: Emitter:: BuildTypesHeader()
Builds the standalone "ShaderCompilerTypes.h" header with the shared reflection types
static bool ShaderCompiler:: Emitter:: EmitHeader(const SmallVectorImpl<ProgramReflection>& programs,
StringView ns,
StringView inputFileName,
SpirvCompileFn& compileSpirv,
DxbcCompileFn& compileDxbc,
String& output,
BackendArtifacts& artifacts,
Diagnostic& diag)
Emits the complete generated header, returns false and fills diag on error. One input file yields one header, but it may carry multiple programs (a canvas_item document plus its "batched" twin) — all of them are emitted into the same namespace.
The Direct3D 11 and Vulkan stage artifacts do not go into output — they are appended to artifacts instead, for the caller to write into the per-backend aggregates (see BackendArtifacts). output references them by symbol, so it is complete and correct whatever compilers were available when it was produced.
static String ShaderCompiler:: Emitter:: BuildCheckDump(const ShaderDocument& document,
const SmallVectorImpl<VariantReflection>& variants)
Builds the human-readable reflection dump printed by "--check" (called once per program)