=?UTF-8?Q?Stefan=20D=C3=B6singer=20?=: d3dx9_36/tests: Account for NP2 limitations in a texture test.

Alexandre Julliard julliard at winehq.org
Wed Sep 21 13:35:13 CDT 2011


Module: wine
Branch: master
Commit: 3b9f88555f222cbded0ce5913f19e6ae5b50e06c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=3b9f88555f222cbded0ce5913f19e6ae5b50e06c

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Tue Sep 20 22:18:28 2011 +0200

d3dx9_36/tests: Account for NP2 limitations in a texture test.

---

 dlls/d3dx9_36/tests/texture.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/dlls/d3dx9_36/tests/texture.c b/dlls/d3dx9_36/tests/texture.c
index c575346..38b87db 100644
--- a/dlls/d3dx9_36/tests/texture.c
+++ b/dlls/d3dx9_36/tests/texture.c
@@ -100,7 +100,10 @@ static void test_D3DXCheckTextureRequirements(IDirect3DDevice9 *device)
     width = caps.MaxTextureWidth-1;
     hr = D3DXCheckTextureRequirements(device, &width, NULL, NULL, 0, NULL, D3DPOOL_DEFAULT);
     ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK);
-    ok(width == caps.MaxTextureWidth-1, "Returned width %d, expected %d\n", width, caps.MaxTextureWidth-1);
+    if (caps.TextureCaps & D3DPTEXTURECAPS_POW2)
+        ok(width == caps.MaxTextureWidth, "Returned width %d, expected %d\n", width, caps.MaxTextureWidth);
+    else
+        ok(width == caps.MaxTextureWidth-1, "Returned width %d, expected %d\n", width, caps.MaxTextureWidth-1);
 
     /* mipmaps */
     width = 64; height = 63;




More information about the wine-cvs mailing list