Matteo Bruni : d3dx9/tests: Fix initialization of texture levels > 0 in test_D3DXSHProjectCubeMap().

Alexandre Julliard julliard at winehq.org
Fri Feb 18 15:15:00 CST 2022


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

Author: Matteo Bruni <mbruni at codeweavers.com>
Date:   Fri Feb 18 11:14:25 2022 +0100

d3dx9/tests: Fix initialization of texture levels > 0 in test_D3DXSHProjectCubeMap().

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52561
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/d3dx9_36/tests/math.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/d3dx9_36/tests/math.c b/dlls/d3dx9_36/tests/math.c
index 62f4eaec124..2ed9131d788 100644
--- a/dlls/d3dx9_36/tests/math.c
+++ b/dlls/d3dx9_36/tests/math.c
@@ -4520,7 +4520,7 @@ static void test_D3DXSHProjectCubeMap(void)
             {
                 hr = IDirect3DCubeTexture9_LockRect(texture, face, level, &map_desc, NULL, 0);
                 ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
-                memset(map_desc.pBits, 0xcc, 4 * map_desc.Pitch);
+                memset(map_desc.pBits, 0xcc, (8 >> level) * map_desc.Pitch);
                 hr = IDirect3DCubeTexture9_UnlockRect(texture, face, level);
                 ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
             }




More information about the wine-cvs mailing list