ShaderCompiler::BackendArtifacts struct

The stage artifacts only a platform-specific compiler can produce.

Direct3D 11 bytecode needs D3DCompile, which exists on Windows alone, and SPIR-V needs a glslang binary; neither is available on most machines that build this project. They are therefore kept OUT of the per-shader header and written to one aggregate per backend, exactly as the console targets already are - so a regeneration on a machine that cannot rebuild them leaves the committed ones alone instead of replacing them with nulls.

That mattered more than it looks: an absent SPIR-V module does not degrade, it makes VulkanShaderProgram skip every draw that uses the program.

Each string is a complete namespace body defining, for every variant, the stage arrays and a size constant beside each one. The sizes travel WITH the arrays rather than being baked into the per-shader table, so an aggregate that is a generation behind stays self-consistent - it describes the blobs it actually holds.

Public variables

String D3d11
Direct3D 11 stage artifacts: the DXBC blobs, or the HLSL sources when no DXBC compiler ran.
String Vulkan
Vulkan stage modules: the SPIR-V words.
String Metal
Metal stage sources: the MSL text of both stages.

Variable documentation

String ShaderCompiler::BackendArtifacts::Metal

Metal stage sources: the MSL text of both stages.

Needs no compiler at all (the Metal backend compiles the text on the Mac at load time, there being no MSL compiler outside Xcode), so this aggregate is rebuilt by every regeneration. It still lives beside the other two rather than in the per-shader headers so the whole of a backend's shader text stays out of every other backend's binary the same way.