Matteo Bruni : d3d9/tests: Add more tests for D3DUSAGE_AUTOGENMIPMAP expected failures.

Alexandre Julliard julliard at winehq.org
Wed Mar 6 15:29:41 CST 2019


Module: wine
Branch: master
Commit: cc3d8ec63f23ce8d8d4441b9f04d008acebc4f88
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=cc3d8ec63f23ce8d8d4441b9f04d008acebc4f88

Author: Matteo Bruni <mbruni at codeweavers.com>
Date:   Tue Mar  5 18:47:22 2019 +0100

d3d9/tests: Add more tests for D3DUSAGE_AUTOGENMIPMAP expected failures.

Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/d3d9/tests/device.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
index 7d8b4fd..b7e34b0 100644
--- a/dlls/d3d9/tests/device.c
+++ b/dlls/d3d9/tests/device.c
@@ -7319,6 +7319,10 @@ static void test_mipmap_gen(void)
 
     for (i = 0; i < ARRAY_SIZE(formats); ++i)
     {
+        hr = IDirect3D9_CheckDeviceFormat(d3d, 0, D3DDEVTYPE_HAL, D3DFMT_A8R8G8B8,
+                D3DUSAGE_DYNAMIC | D3DUSAGE_AUTOGENMIPMAP, D3DRTYPE_TEXTURE, formats[i]);
+        ok(hr == D3DERR_NOTAVAILABLE, "Got unexpected hr %#x.\n", hr);
+
         hr = IDirect3D9_CheckDeviceFormat(d3d, 0, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8,
                 D3DUSAGE_AUTOGENMIPMAP, D3DRTYPE_TEXTURE, formats[i]);
         if (SUCCEEDED(hr))
@@ -7326,6 +7330,10 @@ static void test_mipmap_gen(void)
             /* i.e. there is no difference between the D3D_OK and the
              * D3DOK_NOAUTOGEN cases. */
             hr = IDirect3DDevice9_CreateTexture(device, 64, 64, 0, D3DUSAGE_AUTOGENMIPMAP,
+                    formats[i], D3DPOOL_SYSTEMMEM, &texture, 0);
+            ok(hr == D3DERR_INVALIDCALL, "Unexpected hr %#x.\n", hr);
+
+            hr = IDirect3DDevice9_CreateTexture(device, 64, 64, 0, D3DUSAGE_AUTOGENMIPMAP,
                     formats[i], D3DPOOL_DEFAULT, &texture, 0);
             ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr);
             count = IDirect3DTexture9_GetLevelCount(texture);




More information about the wine-cvs mailing list