Enum D3DCompileOptions
These constants specify how the compiler compiles the HLSL code.
Namespace: JeremyAnsel.DirectX.D3DCompiler
Assembly: JeremyAnsel.DirectX.D3DCompiler.dll
Syntax
[Flags]
public enum D3DCompileOptions
Fields
Name | Description |
---|---|
AllResourcesBound | Directs the compiler to ensure all resources are bound. |
AvoidFlowControl | Directs the compiler to not use flow-control constructs where possible. |
Debug | Directs the compiler to insert debug file/line/type/symbol information into the output code. |
EnableBackwardsCompatibility | Directs the compiler to enable older shaders to compile to 5_0 targets. |
EnableStrictness | Forces strict compile, which might not allow for legacy syntax. By default, the compiler disables strictness on deprecated syntax. |
EnableUnboundedDescriptorTables | Directs the compiler to enable unbounded descriptor tables. |
ForcePixelShaderSoftwareNoOptimization | Directs the compiler to compile a pixel shader for the next highest shader profile. This constant also turns debugging on and optimizations off. |
ForceVertexShaderSoftwareNoOptimization | Directs the compiler to compile a vertex shader for the next highest shader profile. This constant turns debugging on and optimizations off. |
IEEEStrictness | Forces the IEEE strict compile. |
NoPreshader | Directs the compiler to disable Preshaders. If you set this constant, the compiler does not pull out static expression for evaluation. |
None | No option. |
OptimizationLevel0 | Directs the compiler to use the lowest optimization level. If you set this constant, the compiler might produce slower code but produces the code more quickly. Set this constant when you develop the shader iteratively. |
OptimizationLevel1 | Directs the compiler to use the second lowest optimization level. |
OptimizationLevel2 | Directs the compiler to use the second highest optimization level. |
OptimizationLevel3 | Directs the compiler to use the highest optimization level. If you set this constant, the compiler produces the best possible code but might take significantly longer to do so. Set this constant for final builds of an application when performance is the most important factor. |
PackMatrixColumnMajor | Directs the compiler to pack matrices in column-major order on input and output from the shader. This type of packing is generally more efficient because a series of dot-products can then perform vector-matrix multiplication. |
PackMatrixRowMajor | Directs the compiler to pack matrices in row-major order on input and output from the shader. |
PartialPrecision | Directs the compiler to perform all computations with partial precision. If you set this constant, the compiled code might run faster on some hardware. |
PreferFlowControl | Directs the compiler to use flow-control constructs where possible. |
ResourcesMayAlias | Directs the compiler to assume that unordered access views (UAVs) and shader resource views (SRVs) may alias for cs_5_0. |
SkipOptimization | Directs the compiler to skip optimization steps during code generation. We recommend that you set this constant for debug purposes only. |
SkipValidation | Directs the compiler not to validate the generated code against known capabilities and constraints. We recommend that you use this constant only with shaders that have been successfully compiled in the past. DirectX always validates shaders before it sets them to a device. |
WarningsAreErrors | Directs the compiler to treat all warnings as errors when it compiles the shader code. We recommend that you use this constant for new shader code, so that you can resolve all warnings and lower the number of hard-to-find code defects. |