Expand description
The reflection (RDEF) and signature (ISGN, OSGN, ISG1, OSG1, OSG5, PCSG, PSG1) parts of a Shader
Model 4 or 5 container, as the records they store: resource bindings, constant buffers with their variables and type
trees, and signature elements, each with D3D’s own numbers (D3D_SHADER_INPUT_TYPE, D3D_NAME, …) and the word
it starts at. What the numbers mean for a graphics API is the caller’s to decide.
Every table is bounded before it is read, every string is checked to end inside its part and be UTF-8, and a type tree is refused where it nests deeper than 32 or refers to itself.
Structs§
- Rdef
- A container’s
RDEFpart as stored: what it says the program binds and the layouts of its buffers. - Rdef
Binding - One resource binding record as stored.
- Rdef
Buffer - One buffer (
D3D11_SHADER_BUFFER_DESC) as stored, with its variables. - Rdef
Member - A struct member: its name, its byte offset in the struct and its type.
- Rdef
Type - A variable’s type record (
D3D11_SHADER_TYPE_DESC) as stored, and its members’ types. - Rdef
Variable - One variable of a buffer as stored: its byte range in the buffer, its type and its default value.
- Signature
Element - One element of a signature as stored.
Functions§
- patch_
signature_ elements - A hull or domain program’s patch-constant signature elements as stored (the
PCSGpart, or thePSG1part where the program uses minimum precision). - program_
type - The type of a container’s program: its code part’s version token names it in the high 16 bits.
- rdef
- A container’s
RDEFpart (Nonewhere it has none): the Shader Model 4 layout where its target is a 4.x one (a 28-byte header, then the tables), the Shader Model 5.0 or 5.1 layout (the record-size directory its tag names) where it is a 5.x one. - rdef_
target - The version token of a container’s first
RDEFpart (Nonewhere it has none), read without the rest of the part: a caller can tell which program model’s layout it holds before it asksrdeffor the records. - signature
- A signature part’s records. Layouts:
ISGN/OSGN/PCSG(name, index, system value, component type, register, masks),ISG1/OSG1/PSG1(a stream and a minimum precision besides) andOSG5(a stream besides).kindis the part’s tag, which says which layoutbyteshas. - signature_
elements - A container’s program type and its input and output signature elements as stored.