d3d9/tests: Add test for surface format conversion

Bjørnar Hansen tilbjornar at gmail.com
Tue Jul 6 15:38:08 CDT 2010

On Mon, Jul 5, 2010 at 21:37, Stefan Dösinger <stefandoesinger at gmx.at> wrote:

> The DirectX9 SDK "Blobs" sample needs it. It creates a R32F surface, stretches
> to a R16F and then uses it for drawing. Later on I realized that DirectX9
> cards(at least my GF7400) don't support R16F, so the sample uses the original
> R32F surface for rendering. DirectX10 cards support R16F however, it would be
> interesting to see how this sample reacts to that.

On a Windows XP machine with a ATI HD 4870 graphics card,
D3DERR_INVALIDCALL was returned so I assumed it was an invalid call...

On Mon, Jul 5, 2010 at 21:23, Henri Verbeet <hverbeet at gmail.com> wrote:
> You're supposed to call IDirect3D9_CheckDeviceFormatConversion() to
> determine which conversions are supported.

Currently, that method always returns OK. Seems pointless to use it,
but I've implemented it in my revised patch.

Looking at [1], should we test for all combinations of source/target formats?

The frameranger demo [2] triggers conversions from
D3DFMT_A16B16G16R16F to D3DFMT_A8R8G8B8, which is,  according to the
Microsoft reference, not a valid conversion. I created a test for
this, and it successfully executes on Windows XP. What's with that?

[1] http://doc.51windows.net/Directx9_SDK/?url=/directx9_sdk/graphics/reference/d3d/interfaces/idirect3d9/checkdeviceformatconversion.htm
[2] http://www.pouet.net/prod.php?which=53647

More information about the wine-devel mailing list