Zebediah Figura : d3d8/tests: Use a nonzero start index in test_sysmem_draw().

Alexandre Julliard julliard at winehq.org
Wed Jul 13 16:54:56 CDT 2022


Module: wine
Branch: master
Commit: 50b67f98181ecd62bdb69408c72cc5c9a2c984c5
URL:    https://gitlab.winehq.org/wine/wine/-/commit/50b67f98181ecd62bdb69408c72cc5c9a2c984c5

Author: Zebediah Figura <zfigura at codeweavers.com>
Date:   Fri Jul  8 19:04:41 2022 -0500

d3d8/tests: Use a nonzero start index in test_sysmem_draw().

This uncovered a bug in the previous patch.

---

 dlls/d3d8/tests/visual.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/dlls/d3d8/tests/visual.c b/dlls/d3d8/tests/visual.c
index 71f6a8662c8..f77152e1e52 100644
--- a/dlls/d3d8/tests/visual.c
+++ b/dlls/d3d8/tests/visual.c
@@ -10720,7 +10720,7 @@ static void test_sysmem_draw(void)
         0xff443322,
         0xff443322,
     };
-    static const short indices[] = {0, 1, 2, 3};
+    static const short indices[] = {5, 6, 7, 8, 0, 1, 2, 3};
 
     window = create_window();
     ok(!!window, "Failed to create a window.\n");
@@ -10822,7 +10822,7 @@ static void test_sysmem_draw(void)
 
     hr = IDirect3DDevice8_BeginScene(device);
     ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
-    hr = IDirect3DDevice8_DrawIndexedPrimitive(device, D3DPT_TRIANGLESTRIP, 0, 4, 0, 2);
+    hr = IDirect3DDevice8_DrawIndexedPrimitive(device, D3DPT_TRIANGLESTRIP, 0, 4, 4, 2);
     ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
     hr = IDirect3DDevice8_EndScene(device);
     ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
@@ -10860,7 +10860,7 @@ static void test_sysmem_draw(void)
 
     hr = IDirect3DDevice8_BeginScene(device);
     ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
-    hr = IDirect3DDevice8_DrawIndexedPrimitive(device, D3DPT_TRIANGLESTRIP, 0, 4, 0, 2);
+    hr = IDirect3DDevice8_DrawIndexedPrimitive(device, D3DPT_TRIANGLESTRIP, 0, 4, 4, 2);
     ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
     hr = IDirect3DDevice8_EndScene(device);
     ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
@@ -10876,7 +10876,7 @@ static void test_sysmem_draw(void)
 
     hr = IDirect3DDevice8_BeginScene(device);
     ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
-    hr = IDirect3DDevice8_DrawIndexedPrimitive(device, D3DPT_TRIANGLESTRIP, 0, 5, 0, 2);
+    hr = IDirect3DDevice8_DrawIndexedPrimitive(device, D3DPT_TRIANGLESTRIP, 0, 5, 4, 2);
     ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
     hr = IDirect3DDevice8_EndScene(device);
     ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
@@ -10905,7 +10905,7 @@ static void test_sysmem_draw(void)
 
     hr = IDirect3DDevice8_BeginScene(device);
     ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
-    hr = IDirect3DDevice8_DrawIndexedPrimitive(device, D3DPT_TRIANGLESTRIP, 0, 4, 0, 2);
+    hr = IDirect3DDevice8_DrawIndexedPrimitive(device, D3DPT_TRIANGLESTRIP, 0, 4, 4, 2);
     ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
     hr = IDirect3DDevice8_EndScene(device);
     ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
@@ -10923,7 +10923,7 @@ static void test_sysmem_draw(void)
 
     hr = IDirect3DDevice8_BeginScene(device);
     ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
-    hr = IDirect3DDevice8_DrawIndexedPrimitive(device, D3DPT_TRIANGLESTRIP, 0, 4, 0, 2);
+    hr = IDirect3DDevice8_DrawIndexedPrimitive(device, D3DPT_TRIANGLESTRIP, 0, 4, 4, 2);
     ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
     hr = IDirect3DDevice8_EndScene(device);
     ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);




More information about the wine-cvs mailing list