Export (0) Print
Expand All
Expand Minimize

CompilerOptions Enumeration

Defines optimization options that may be chosen for shader and effect code compilation.

Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

[FlagsAttribute]
public enum CompilerOptions

 Member nameDescription
AvoidFlowControlHints to the compiler to avoid using flow-control instructions.
DebugInserts debug file name, line numbers, and type and symbol information during shader compile.
ForcePixelShaderSoftwareNoOptimizationsForces the compiler to compile against the next highest available software target for pixel shaders. This flag also turns optimizations off and debugging on.
ForceVertexShaderSoftwareNoOptimizationsForces the compiler to compile against the next highest available software target for vertex shaders. This flag also turns optimizations off and debugging on.
NoneNo options specified.
NoPreShaderDisables preshaders. The compiler will not pull out static expressions for evaluation on the host CPU. Additionally, the compiler will not loft any expressions when compiling stand-alone functions.
NotCloneableIndicates the effect will be non-cloneable and will not contain any shader binary data. Setting this flag reduces effect memory usage by about 50 percent because it eliminates the need for the effect system to keep a copy of the shaders in memory.
PackMatrixColumnMajorUnless explicitly specified, matrices will be packed in column major order (each vector will be in a single column) when passed to and from the shader. This is generally more efficient because it allows vector-matrix multiplication to be performed using a series of dot products.
PackMatrixRowMajorUnless explicitly specified, matrices will be packed in row major order (each vector will be in a single row) when passed to or from the shader.
PartialPrecisionForces all computations in the resulting shader to occur at partial precision. This may result in faster evaluation of shaders on some hardware.
PreferFlowControlHints to the compiler to prefer using flow-control instructions.
SkipOptimizationInstructs the compiler to skip optimization steps during code generation. Unless you are trying to isolate a problem in your code and you suspect the compiler, using this option is not recommended.
SkipValidationDo not validate the generated code against known capabilities and constraints. This option is recommended only when compiling shaders that are known to work (that is, shaders that have compiled before without this option). Shaders are always validated by the runtime before they are set to the device.

Xbox 360, Windows XP SP2, Windows Vista

Show:
© 2014 Microsoft