Stefan Dösinger : ddraw/tests: Don't rely on the implicit vertex color in test_viewport.
Alexandre Julliard
julliard at winehq.org
Fri Jan 24 16:14:11 CST 2020
Module: wine
Branch: master
Commit: 97ee54e9d631af3a919acd5596e87ab9e11ef27d
URL: https://source.winehq.org/git/wine.git/?a=commit;h=97ee54e9d631af3a919acd5596e87ab9e11ef27d
Author: Stefan Dösinger <stefan at codeweavers.com>
Date: Thu Jan 23 10:45:43 2020 +0100
ddraw/tests: Don't rely on the implicit vertex color in test_viewport.
Signed-off-by: Stefan Dösinger <stefan at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ddraw/tests/ddraw7.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c
index 2f2ac29a08..c34d939486 100644
--- a/dlls/ddraw/tests/ddraw7.c
+++ b/dlls/ddraw/tests/ddraw7.c
@@ -15015,6 +15015,16 @@ static void test_viewport(void)
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ /* Well, by default the vertices without color info should be white, and without any texture
+ * ops this should just show up in the output, but the r200 driver begs to differ and draws a
+ * random color. */
+ hr = IDirect3DDevice7_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ hr = IDirect3DDevice7_SetTextureStageState(device, 0, D3DTSS_COLORARG1, D3DTA_TFACTOR);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_TEXTUREFACTOR, 0x00ffffff);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+
hr = IDirect3DDevice7_SetViewport(device, NULL);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
More information about the wine-cvs
mailing list