Device.ValidateDevice() Method (Microsoft.DirectX.Direct3D)
Reports the device's ability to render the current texture-blending operations and arguments in a single pass.
The Device.ValidateDevice method should be used to validate scenarios only when other capabilities are deficient. For example, in a multistage texturing scenario, the Caps.MaxTextureBlendStages and Caps.MaxSimultaneousTextures properties could be queried to determine whether multistage texturing is possible on the device.
Current hardware does not necessarily implement all possible combinations of operations and arguments. To determine whether a particular blending operation can be performed with given arguments, set the desired blending operation and then call the Device.ValidateDevice method.
The Device.ValidateDevice method uses the current render states, textures, and texture-stage states to perform validation at the time of the call. Changes to these factors after the call invalidate the previous result, and the method must be called again before rendering a scene.
For best performance, call Device.ValidateDevice at initialization time; do not use it within a render loop.
Using diffuse iterated values, either as an argument or as an operation (TextureArgument.Diffuse, TextureOperation.BlendDiffuseAlpha), is rarely supported on current hardware. Most hardware can introduce iterated color data only at the last texture operation stage.
In general, specify the texture TextureArgument.TextureColor for each stage as the first argument rather than the second argument.
Many video cards do not support the use of diffuse or scalar values at arbitrary texture stages. Often, these values are available only at the first or last texture-blending stage.
Many cards do not have a blending unit associated with the first texture that is capable of more than replicating alpha to color channels or inverting the input. Therefore, an application might need to use only the second texture stage, if possible. On such hardware, the first unit is presumed to be in its default state, in which the first color argument is set to TextureArgument.TextureColor with the TextureOperation.SelectArg1 operation.
Operations on the output alpha that are more intricate than or substantially different from the color operations are less likely to be supported.
Many cards do not support simultaneous use of multiple textures and mipmapped trilinear filtering. If trilinear filtering is requested for a texture involved in multitexture blending operations and validation fails, turn off trilinear filtering and revalidate. In this case, performing multipass rendering might be a better alternative.
ConflictingRenderStateException Currently set render states cannot be used together. ConflictingTextureFilterException Current texture filters cannot be used together. DeviceLostException Device has been lost and cannot be reset at this time; therefore, rendering is not possible. DriverInternalErrorException An internal driver error occurred. Generally, an application should shut down when it receives this error. TooManyOperationsException Application is requesting more texture-filtering operations than the device supports. UnsupportedAlphaArgumentException Device does not support a specified texture-blending argument for the alpha channel. UnsupportedAlphaOperationException Device does not support a specified texture-blending operation for the alpha channel. UnsupportedColorArgumentException Device does not support a specified texture-blending argument for color values. UnsupportedColorOperationException Device does not support a specified texture-blending operation for color values. UnsupportedFactorValueException Device does not support the specified texture factor value. UnsupportedTextureFilterException Device does not support the specified texture filter. WrongTextureFormatException Pixel format of the texture surface is not valid.