D3DXSHADER Compile Options
Microsoft DirectX 9.0 SDK Update (October 2004)

D3DXSHADER Compile Options


Control the compile options during a shader compile.

#defineDescription
D3DXSHADER_AVOID_FLOW_CONTROLThis is a hint to the compiler to avoid using flow-control instructions.
D3DXSHADER_DEBUGInsert debug filename, line numbers, and type and symbol information during shader compile.
D3DXSHADER_FORCE_PS_SOFTWARE_NOOPTForce the compiler to compile against the next highest available software target for pixel shaders. This flag also turns optimizations off and debugging on.
D3DXSHADER_FORCE_VS_SOFTWARE_NOOPTForce the compiler to compile against the next highest available software target for vertex shaders. This flag also turns optimizations off and debugging on.
D3DXSHADER_NO_PRESHADERDisables 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.
D3DXSHADER_PACKMATRIX_COLUMNMAJORUnless 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.
D3DXSHADER_PACKMATRIX_ROWMAJORUnless 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.
D3DXSHADER_PARTIALPRECISIONForce all computations in the resulting shader to occur at partial precision. This may result in faster evaluation of shaders on some hardware.
D3DXSHADER_PREFER_FLOW_CONTROLThis is a hint to the compiler to prefer using flow-control instructions.
D3DXSHADER_SKIPOPTIMIZATIONInstruct 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.
D3DXSHADER_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.

Constant Information

Headerd3dx9shader.h
Minimum operating systemWindows 98

Related Topics



© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.