Note: This documentation is preliminary and is subject to change.
Defines the compiler options to use during a shader compilation.
Definition
Visual Basic .NET
Public Enum ShaderFlags
C#
public enum ShaderFlags
Managed C++
__value public enum ShaderFlags
JScript .NET
public enum ShaderFlags
Members
Member
Value
Description
Debug
1
Inserts debug file name and line number information during compilation.
None
0
Instructs the compiler to use no options during compilation. Value resolves to 0.
PreferFlowControl
1024
Instructs the compiler to prefer using flow-control instructions.
AvoidFlowControl
512
Instructs the compiler to avoid using flow-control instructions.
NoPreShader
256
Disables preshaders; that is, the compiler will not pull out static expressions for evaluation on the host CPU.
ForcePixelShaderSoftwareNoOptimizations
128
Instructs the compiler to use software pixel shaders.
ForceVertexShaderSoftwareNoOptimizations
64
Instructs the compiler to use software vertex shaders.
PartialPrecision
32
Indicates to the device that the operation can be performed and the result stored at a lower precision (at least s10e5).
PackMatrixColumnMajor
16
Instructs the compiler to pack matrices in column major order (that is, each vector in a single column).
PackMatrixRowMajor
8
Instructs the compiler to pack matrices in row major order (that is, each vector in a single row).
SkipOptimization
4
Instructs the compiler to skip optimization steps during code generation. This option is valid only when calling ShaderLoader.CompileShader; it is not recommended unless you are trying to isolate a code problem that you suspect originates in the compiler.
SkipValidation
2
Prevents the compiler from validating the generated code against known capabilities and constraints. This option is recommended only when compiling shaders that are known to work (that is, those that have compiled before without this option). Shaders are always validated before they are set to the device.