Crate naga[−][src]
Universal shader translator.
The central structure of the crate is Module.
To improve performance and reduce memory usage, most structures are stored
in an Arena, and can be retrieved using the corresponding Handle.
Modules
| back | Functions which export shader modules into binary and text formats. |
| front | Parsers which load shaders into memory. |
| proc | Module processing functionality. |
Structs
| Arena | An arena holding some kind of component (e.g., type, constant, instruction, etc.) that can be referenced. |
| Constant | Constant value. |
| EarlyDepthTest | Early fragment tests. In a standard situation if a driver determines that it is possible to switch on early depth test it will. Typical situations when early depth test is switched off: |
| EntryPoint | Exported function, to be run at a certain stage in the pipeline. |
| Function | A function defined in the module. |
| FunctionArgument | A function argument. |
| GlobalUse | Indicates how a global variable is used. |
| GlobalVariable | Variable defined at module level. |
| Handle | A strongly typed reference to a SPIR-V element. |
| Header | Metadata for a given module. |
| LocalVariable | Variable defined at function level. |
| Module | Shader module. |
| StorageAccess | Flags describing an image. |
| StructMember | Member of a user-defined structure. |
| SwitchCase | A case for a switch statement. |
| Type | A data type declared in the module. |
Enums
| ArraySize | Size of an array. |
| BinaryOperator | Operation that can be applied on two values. |
| Binding | Describes how an input/output variable is to be bound. |
| BuiltIn | Built-in inputs and outputs. |
| ConservativeDepth | Enables adjusting depth without disabling early Z. |
| ConstantInner | Additional information, dependendent on the kind of constant. |
| DerivativeAxis | Axis on which to compute a derivative. |
| Expression | An expression that can be evaluated to obtain a value. |
| ImageClass | Sub-class of the image type. |
| ImageDimension | The number of dimensions an image has. |
| Interpolation | The interpolation qualifier of a binding or struct field. |
| MathFunction | Built-in shader function for math. |
| RelationalFunction | Built-in shader function for testing relation between values. |
| SampleLevel | Sampling modifier to control the level of detail. |
| ScalarKind | Primitive type for a scalar. |
| ScalarValue | A literal scalar value, used in constants. |
| ShaderStage | Stage of the programmable pipeline. |
| Statement | Instructions which make up an executable block. |
| StorageClass | Class of storage for variables. |
| StorageFormat | |
| TypeInner | Enum with additional information, depending on the kind of type. |
| UnaryOperator | Operation that can be applied on a single value. |
| VectorSize | Number of components in a vector. |
Type Definitions
| Block | A code block is just a vector of statements. |
| Bytes | Number of bytes. |
| FastHashMap | Hash map that is faster but not resilient to DoS attacks. |
| FastHashSet | Hash set that is faster but not resilient to DoS attacks. |