The IDirect3DDevice3::ValidateDevice method reports the device's ability to render the currently set texture blending operations and arguments in a single pass.
HRESULT ValidateDevice(
LPDWORD lpdwPasses
);
If the method succeeds, the return value is D3D_OK.
If the method fails, the return value may be one of the following values:
Current hardware does not necessarily implement all possible combinations of operations and arguments. You can determine whether a particular blending operation can be performed with given arguments by setting-up the desired blending operation, then calling the ValidateDevice method.
The ValidateDevice method uses the currently set render states, textures, and, texture stage states to perform validation at the time of the call. Any changes to these factors after the call invalidate the previous result, and the method must be called again before rendering a scene.
Using diffuse iterated values, either as an argument or as an operation (D3DTA_DIFFUSE or D3DTOP_BLENDDIFFUSEALPHA) is sparsely supported on current hardware. Most hardware can only introduce iterated color data at the last texture operation stage.
Try to specify the texture (D3DTA_TEXTURE) for each stage as the first argument, in preference to the second argument.
Many cards do not support use of diffuse or scalar values at arbitrary texture stages. Often, these are only available at the first or last texture blending stage.
Many cards do not actually have a blending unit associated with the first texture that is capable of more than replicating alpha to color channels, or inverting the input. As a result, your 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, which has the first color argument set to D3DTA_TEXTURE with the D3DTOP_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.
Some hardware does not support simultaneous use of both D3DTA_TFACTOR and D3DTA_DIFFUSE.
Many cards do not support simultaneous use of multiple textures and mipmapped trilinear filtering. If trilinear filtering has been requested for a texture involved in multi-texture blending operations and validation fails, turn off trilinear filtering and revalidate. In this case, it might be best to perform multipass rendering instead.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Header: Declared in d3d.h.
Import Library: Use ddraw.lib.
IDirect3DDevice3::GetTextureStageState, IDirect3DDevice3::SetTextureStageState