Tests the device to see if it supports conversion from one display format to another.
HRESULT CheckDeviceFormatConversion( UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SourceFormat, D3DFORMAT TargetFormat );
If the method succeeds, the return value is D3D_OK. If the method fails, the return value is D3DERR_INVALIDCALL. The method will return D3DERR_NOTAVAILABLE when the hardware does not support conversion between the two formats.
Using IDirect3D9::CheckDeviceType to test for compatibility between a back buffer that differs from the display format will return appropriate values. This means that the call will reflect device capabilities. If the device cannot render to the requested back buffer format, the call will still return D3DERR_NOTAVAILABLE. If the device can render to the format, but cannot perform the color-converting presentation, the return value will also be D3DERR_NOTAVAILABLE. Applications can discover hardware support for the presentation itself by calling IDirect3D9::CheckDeviceFormatConversion. No software emulation for the color-converting presentation itself will be offered.
IDirect3D9::CheckDeviceFormatConversion can also be used to determine which combinations of source surface formats and destination surface formats are permissible in calls to IDirect3DDevice9::StretchRect.
Color conversion is restricted to the following source and target formats.
D3DFMT_X1R5G5B5 | D3DFMT_A1R5G5B5 | D3DFMT_R5G6B5 |
D3DFMT_R8G8B8 | D3DFMT_X8R8G8B8 | D3DFMT_A8R8G8B8 |
D3DFMT_A2R10G10B10 | D3DFMT_A16B16G16R16 | D3DFMT_A2B10G10R10 |
D3DFMT_A8B8G8R8 | D3DFMT_X8B8G8R8 | D3DFMT_A16B16G16R16F |
D3DFMT_A32B32G32R32F |
Header: Declared in D3d9.h.