Module: wine Branch: master Commit: 89ded2a95645149d801a0904417b4a59c87c1884 URL: https://source.winehq.org/git/wine.git/?a=commit;h=89ded2a95645149d801a09044...
Author: Paul Gofman gofmanp@gmail.com Date: Mon Jun 10 13:40:12 2019 +0300
ddraw/tests: Fix test failures in test_lighting() on some of WARP drivers for ddraw7.
Currently fails on w1064v1507 test machine.
Signed-off-by: Paul Gofman gofmanp@gmail.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/ddraw/tests/ddraw7.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index e1e3330..e8c36dc 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -3842,6 +3842,7 @@ static void test_lighting(void) ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); hr = IDirect3DVertexBuffer7_ProcessVertices(dst_vb, D3DVOP_TRANSFORM, 2, 1, src_vb2, 0, device, 0); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); hr = IDirect3DDevice7_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, nfvf, unlitnquad, 4, indices, 6, 0); ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); @@ -3850,6 +3851,7 @@ static void test_lighting(void) ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); hr = IDirect3DVertexBuffer7_ProcessVertices(dst_vb, D3DVOP_TRANSFORM | D3DVOP_LIGHT, 3, 1, src_vb2, 1, device, 0); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); hr = IDirect3DDevice7_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, nfvf, litnquad, 4, indices, 6, 0); ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); @@ -3868,7 +3870,7 @@ static void test_lighting(void) "Unexpected specular color 0x%08x.\n", dst_data[0].specular); color = get_surface_color(rt, 160, 120); /* Broken on some of WARP drivers. */ - ok(color == 0x00000000 || broken(is_warp && color == 0x000000ff), + ok(color == 0x00000000 || broken(is_warp && (color == 0x000000ff || color == 0x00ff00ff)), "Lit quad without normals has color 0x%08x, expected 0x00000000.\n", color); ok(dst_data[1].diffuse == 0xff000000, "Lit quad without normals has color 0x%08x, expected 0xff000000.\n", dst_data[1].diffuse); @@ -3881,7 +3883,7 @@ static void test_lighting(void) ok(!dst_data[2].specular, "Unexpected specular color 0x%08x.\n", dst_data[2].specular); color = get_surface_color(rt, 480, 120); - ok(color == 0x00000000 || broken(is_warp && color == 0x000000ff), + ok(color == 0x00000000 || broken(is_warp && (color == 0x000000ff || color == 0x00ff00ff)), "Lit quad with normals has color 0x%08x, expected 0x00000000.\n", color); ok(dst_data[3].diffuse == 0xff000000, "Lit quad with normals has color 0x%08x, expected 0xff000000.\n", dst_data[3].diffuse); @@ -3926,7 +3928,7 @@ static void test_lighting(void) ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
color = get_surface_color(rt, 320, 240); - ok(color == tests[i].expected || broken(is_warp && color == 0x000000ff), + ok(color == tests[i].expected || broken(is_warp && (color == 0x000000ff || color == 0x00ff00ff)), "%s has color 0x%08x.\n", tests[i].message, color); todo_wine_if(tests[i].process_vertices_todo) ok(dst_data[0].diffuse == tests[i].expected_process_vertices,