[5/8] d3dx9: Add DDS support in D3DXCreateTextureFromFile functions.

Józef Kucia joseph.kucia at gmail.com
Thu May 10 14:43:13 CDT 2012


On Wed, May 9, 2012 at 11:32 PM, Józef Kucia <joseph.kucia at gmail.com> wrote:
> diff --git a/dlls/d3dx9_36/tests/surface.c b/dlls/d3dx9_36/tests/surface.c
> index ab56593..3d5a50f 100644
> --- a/dlls/d3dx9_36/tests/surface.c
> +++ b/dlls/d3dx9_36/tests/surface.c
> @@ -917,6 +917,20 @@ static void test_D3DXCreateVolumeTexture(IDirect3DDevice9 *device)
>     }
>  }
>
> +static void test_D3DXCreateTextureFromFileInMemory(IDirect3DDevice9 *device)
> +{
> +    HRESULT hr;
> +    IDirect3DTexture9 *texture;
> +
> +    hr = D3DXCreateTextureFromFileInMemory(device, dds_16bit, sizeof(dds_16bit), &texture);
> +    ok(hr == D3D_OK, "D3DCreateTextureFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK);
> +    if (SUCCEEDED(hr)) IDirect3DTexture9_Release(texture);
> +
> +    hr = D3DXCreateTextureFromFileInMemory(device, dds_24bit, sizeof(dds_24bit), &texture);
> +    ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK);
> +    if (SUCCEEDED(hr)) IDirect3DTexture9_Release(texture);
> +}
> +

I noticed that I put more and more texture functions tests in
tests/surface.c, because these tests needs the dds files which are in
tests/surface.c. I wonder if it would be better to copy needed dds
files to tests/texture.c and move texture function tests to their
proper place. I think the dds files could be used to tests other
texture functions, e.g. D3DXCreateTextureFromFileInMemoryEx doesn't
seem to have any tests.



More information about the wine-devel mailing list