DirectX11ShaderInfo
Description
- Derived from
| Full source code is included in the Tinman 3D SDK download. |
Represents the shader metadata that the HLSL compiler writes into the Assembler Output / *.asm files.
The source code produced via ICodeOutput is minimal but parseable Assembler Output / *.asm file that contains the required shader metadata, see Reduce.
Public / Constructors
DirectX11ShaderInfo
Creates a new instance of DirectXShaderInfo.
This is the grammar for parsing the leading comment block of Assembler Output / *.asm files:
asm := (input-signature | buffer-definitions
| structure-definition | resource-bindings | line-break
| skip)* ;
buffer-definitions := 'Buffer Definitions:' line-break (line-break*
buffer-definition)* ;
input-signature := 'Input signature:' ~line-break* line-break+
ignore-line* ;
resource-bindings := 'Resource Bindings:' line-break+
resource-bindings-header? resource-binding* ;
skip := ~line-break+ line-break+ ;
structure-definition := 'Resource' ('bind' 'info' 'for')? identifier '{'
('struct' identifier '{' ]}[* '}' '$Element' ';')?
'// Offset:' '0' 'Size:' number '}' ;
buffer-definition := 'cbuffer' identifier '{' buffer-element* '}' ;
ignore-line := ~line-break+ line-break ;
resource-binding := identifier ('[' number ']')? identifier identifier word
('s' | 't' | 'u' | 'cb') number number ' '* line-break ;
resource-bindings-header := 'Name' 'Type' 'Format' 'Dim' 'HLSL Bind' 'Count'
line-break '-'+[6] line-break ;
buffer-element := matrix-order? identifier identifier ('[' number ']')?
';' '// Offset:' number 'Size:' number '[unused]'?
line-break ;
word := (letter | '/' | digit)+ ;
identifier := letter (letter | digit)* ;
line-break := '\r'? '\n' ;
matrix-order := 'row_major' | 'column_major' ;
number := digit+ ;
digit := '0'..'9' ;
letter := 'a'..'z' | 'A'..'Z' | '_' ;
- ValidatingException
-
The assemblerOutput in is malformed and cannot be parsed.
Public / Methods
Reduce
Reduces the given assemblerOutput in by retaining required metadata only.
- ValidatingException
-
The assemblerOutput in is malformed and cannot be parsed.