=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: d3d8/tests: Add test for base vertex index with sysmem vertex buffers.
Alexandre Julliard
julliard at winehq.org
Mon Jan 7 16:23:01 CST 2019
Module: wine
Branch: master
Commit: 02222e406f547cd042fc8b9c7567ced0120a4c69
URL: https://source.winehq.org/git/wine.git/?a=commit;h=02222e406f547cd042fc8b9c7567ced0120a4c69
Author: Józef Kucia <jkucia at codeweavers.com>
Date: Mon Jan 7 14:17:46 2019 +0100
d3d8/tests: Add test for base vertex index with sysmem vertex buffers.
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/d3d8/tests/visual.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/dlls/d3d8/tests/visual.c b/dlls/d3d8/tests/visual.c
index 25f96fd..cdb4670 100644
--- a/dlls/d3d8/tests/visual.c
+++ b/dlls/d3d8/tests/visual.c
@@ -10485,6 +10485,11 @@ static void test_sysmem_draw(void)
{-1.0f, 1.0f, 0.0f},
{ 1.0f, -1.0f, 0.0f},
{ 1.0f, 1.0f, 0.0f},
+
+ {-1.0f, -1.0f, 0.0f},
+ {-1.0f, 1.0f, 0.0f},
+ { 1.0f, -1.0f, 0.0f},
+ { 1.0f, 1.0f, 0.0f},
};
static const DWORD quad_s1[] =
{
@@ -10492,6 +10497,11 @@ static void test_sysmem_draw(void)
0xff00ff00,
0xff0000ff,
0xffffffff,
+
+ 0xff443322,
+ 0xff443322,
+ 0xff443322,
+ 0xff443322,
};
static const short indices[] = {0, 1, 2, 3};
@@ -10600,6 +10610,22 @@ static void test_sysmem_draw(void)
colour = getPixelColor(device, 320, 240);
ok(color_match(colour, 0x00007f7f, 1), "Got unexpected colour 0x%08x.\n", colour);
+ hr = IDirect3DDevice8_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x77777777, 0.0f, 0);
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
+
+ hr = IDirect3DDevice8_SetIndices(device, ib, 4);
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
+
+ hr = IDirect3DDevice8_BeginScene(device);
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
+ hr = IDirect3DDevice8_DrawIndexedPrimitive(device, D3DPT_TRIANGLESTRIP, 0, 4, 0, 2);
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
+ hr = IDirect3DDevice8_EndScene(device);
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
+
+ colour = getPixelColor(device, 320, 240);
+ ok(color_match(colour, 0x00443322, 1), "Got unexpected colour 0x%08x.\n", colour);
+
hr = IDirect3DDevice8_Present(device, NULL, NULL, NULL, NULL);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
More information about the wine-cvs
mailing list