Namespace Apogee.Graphics.Shaders¶
Classes¶
The result of compiling one Slang module for one backend: the code of each of its entry points (SPIR-V, or Metal shading language text), what the compiler learned about its parameters, and the files it read.
What compiled shaders assume about the engine: the bindless descriptor layout and the push-constant size every pipeline shares (BindlessHeap's layout changes, on any
backend: version 2 added the Metal code and the shaders' bindless parameter block (argument buffer 1; push constants are buffer 0).
The artifact of a shader module (.ashader): one or more variants, each the module compiled with one set of preprocessor defines (the default one has none), and for each
variant its reflection and the code of every entry point, per backend. A reader takes the code of the backend it runs on and skips the others, so one file serves Vulkan and Metal. The reflection is that of the first backend written (SPIR-V). Specialization constants need no variant: they stay in the SPIR-V and are listed in the reflection.
A shader did not compile;
Compiles Slang to SPIR-V (Vulkan 1.3, SPIR-V 1.6) or to Metal shading language, with row-major matrices and entry points that keep their names. Thread safe: compiles are serialized, across every compiler in the process.
Enums¶
The shader language of a piece of compiled code in a bundle. SPIR-V (Vulkan) and Metal shading language source (Metal) are made; DXIL is reserved so that a bundle can hold every backend of a build.