LPD3DHAL_VALIDATETEXTURESTAGESTATECB - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// d3dhal.h

LPD3DHAL_VALIDATETEXTURESTAGESTATECB Lpd3dhalValidatetexturestagestatecb;

DWORD Lpd3dhalValidatetexturestagestatecb(
  LPD3DHAL_VALIDATETEXTURESTAGESTATEDATA unnamedParam1
)
{...}
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nc-d3dhal-lpd3dhal_validatetexturestagestatecb)

LPD3DHAL_VALIDATETEXTURESTAGESTATECB callback function

Description

The D3dValidateTextureStageState function returns the number of passes where the hardware can perform the blending operations specified in the current state.

Parameters

unnamedParam1

pvtssd [in]

Points to a D3DHAL_VALIDATETEXTURESTAGESTATEDATA structure that contains the information required for the driver to determine and return the number of passes required to perform the blending operations.

Return value

D3dValidateTextureStageState returns one of the following callback codes:

Remarks

Microsoft Direct3D drivers that support texturing must implement D3dValidateTextureStageState.

The driver's implementation of this function must evaluate the current texture state for all texture stages associated with the context. If the driver's hardware can perform the specified blending operations, then the driver should return the number of passes on the state data that its hardware requires. If the hardware cannot perform the specified blending operations, then the driver should return one of the following error codes in the ddrval member of the D3DHAL_VALIDATETEXTURESTAGESTATEDATA structure at pvtssd:

Error Code Meaning
D3DERR_CONFLICTINGTEXTUREFILTER The hardware cannot do both trilinear filtering and multitexturing at the same time.
D3DERR_TOOMANYOPERATIONS The hardware cannot handle the specified number of operations.
D3DERR_UNSUPPORTEDALPHAARG The hardware does not support a specified alpha argument.
D3DERR_UNSUPPORTEDALPHAOPERATION The hardware does not support a specified alpha operation.
D3DERR_UNSUPPORTEDCOLORARG The hardware does not support a specified color argument.
D3DERR_UNSUPPORTEDCOLOROPERATION The hardware does not support a specified color operation.
D3DERR_UNSUPPORTEDFACTORVALUE The hardware does not support a D3DTA_TFACTOR greater than 1.0.
D3DERR_WRONGTEXTUREFORMAT The hardware does not support the current state in the selected texture format.

Direct3D calls D3dValidateTextureStageState in response to an application request through a call to IDirect3DDevice7::ValidateDevice. The number of passes returned by the driver is propagated back to the application, which can then decide whether it will proceed with rendering using the current state or if it must change the blending operations to render faster or to render at all. There are no limits to the number of passes that a driver can return.

A driver that returns more than one pass is responsible for properly executing the passes on all state and primitive data when rendering.

Requests that are likely to fail D3dValidateTextureStageState:

     dev.SetTextureStageState( n, D3DTSS_COLORARG1, D3DTA_TEXTURE );   *
     dev.SetTextureStageState( n, D3DTSS_COLOROP, D3DTOP_SELECTARG1 ); *
    

See also

D3DHAL_VALIDATETEXTURESTAGESTATEDATA

D3dDrawPrimitives2