From: David Heidelberg david@ixit.cz
Signed-off-by: David Heidelberg david@ixit.cz --- dlls/d3d9/tests/visual.c | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-)
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index 7c0269b93c5..590239ff232 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -1840,10 +1840,11 @@ static void color_fill_test(void) if (SUCCEEDED(hr)) { hr = IDirect3DDevice9_ColorFill(device, surface, &rect2, 0xdeadbeef); - if (formats[i].flags & BLOCKS) + if (formats[i].flags & BLOCKS) { ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx, fmt=%s.\n", hr, formats[i].name); - else + } else { ok(SUCCEEDED(hr), "Failed to color fill, hr %#lx, fmt=%s.\n", hr, formats[i].name); + } }
if (!(formats[i].flags & CHECK_FILL_VALUE)) @@ -3855,10 +3856,11 @@ static void z_range_test(void) color = getPixelColor(device, 28, 238); ok(color_match(color, 0x00ffffff, 0), "Z range failed: Got color 0x%08x, expected 0x00ffffff.\n", color); color = getPixelColor(device, 28, 241); - if (caps.PrimitiveMiscCaps & D3DPMISCCAPS_CLIPTLVERTS) + if (caps.PrimitiveMiscCaps & D3DPMISCCAPS_CLIPTLVERTS) { ok(color_match(color, 0x00ffffff, 0), "Z range failed: Got color 0x%08x, expected 0x00ffffff.\n", color); - else + } else { ok(color_match(color, 0x00ffff00, 0), "Z range failed: Got color 0x%08x, expected 0x00ffff00.\n", color); + }
/* Not clipped, > z buffer clear value(0.75). * @@ -3890,10 +3892,11 @@ static void z_range_test(void) color = getPixelColor(device, 321, 238); ok(color_match(color, 0x00ffffff, 0), "Z range failed: Got color 0x%08x, expected 0x00ffffff.\n", color); color = getPixelColor(device, 321, 241); - if (caps.PrimitiveMiscCaps & D3DPMISCCAPS_CLIPTLVERTS) + if (caps.PrimitiveMiscCaps & D3DPMISCCAPS_CLIPTLVERTS) { ok(color_match(color, 0x00ffffff, 0), "Z range failed: Got color 0x%08x, expected 0x00ffffff.\n", color); - else + } else { ok(color_match(color, 0x0000ff00, 0), "Z range failed: Got color 0x%08x, expected 0x00ffffff.\n", color); + }
hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); ok(SUCCEEDED(hr), "Failed to present, hr %#lx.\n", hr); @@ -8406,17 +8409,18 @@ static void pretransformed_varying_test(void) /* This isn't a weekend's job to fix, ignore the problem for now. * Needs a replacement pipeline. */ color = getPixelColor(device, 360, 240); - if (tests[i].todo) + if (tests[i].todo) { todo_wine ok(color_match(color, tests[i].color, 1) || broken(color_match(color, 0x00000000, 1) && tests[i].shader_code == blendindices_code), "Test %s returned color 0x%08x, expected 0x%08x (todo).\n", tests[i].name, color, tests[i].color); - else + } else { ok(color_match(color, tests[i].color, 1) || broken(color_match(color, tests[i].broken_color, 1) && tests[i].broken), "Test %s returned color 0x%08x, expected 0x%08x.\n", tests[i].name, color, tests[i].color); + }
hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); ok(hr == S_OK, "Got hr %#lx.\n", hr); @@ -8925,7 +8929,7 @@ static void test_vshader_input(void) ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IDirect3DDevice9_SetPixelShader(device, ps); ok(hr == S_OK, "Got hr %#lx.\n", hr); - } else if(i == 2){ + } else if(i == 2) { hr = IDirect3DDevice9_CreateVertexShader(device, swapped_shader_code_2, &swapped_shader); ok(hr == S_OK, "Got hr %#lx.\n", hr); } else if(i == 1) { @@ -8947,11 +8951,12 @@ static void test_vshader_input(void) hr = IDirect3DDevice9_SetVertexDeclaration(device, decl_onetexcrd); ok(SUCCEEDED(hr), "Failed to set vertex declaration, hr %#lx.\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad2, sizeof(float) * 11); - if (i == 3 || i == 2) + if (i == 3 || i == 2) { ok(SUCCEEDED(hr), "Failed to draw, i %u, hr %#lx.\n", i, hr); - else if (i == 1) + } else if (i == 1) { /* Succeeds or fails, depending on SW or HW vertex processing. */ ok(hr == D3DERR_INVALIDCALL || hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); + }
hr = IDirect3DDevice9_SetVertexDeclaration(device, decl_twotexcrd_rightorder); ok(SUCCEEDED(hr), "Failed to set vertex declaration, hr %#lx.\n", hr); @@ -8961,10 +8966,11 @@ static void test_vshader_input(void) hr = IDirect3DDevice9_SetVertexDeclaration(device, decl_twotex_wrongidx); ok(SUCCEEDED(hr), "Failed to set vertex declaration, hr %#lx.\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad3, sizeof(float) * 11); - if (i == 3 || i == 2) + if (i == 3 || i == 2) { ok(SUCCEEDED(hr), "Failed to draw, i %u, hr %#lx.\n", i, hr); - else if (i == 1) + } else if (i == 1) { ok(hr == D3DERR_INVALIDCALL || hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); + }
hr = IDirect3DDevice9_EndScene(device); ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); @@ -9026,11 +9032,12 @@ static void test_vshader_input(void) hr = IDirect3DDevice9_SetVertexDeclaration(device, decl_onetexcrd); ok(SUCCEEDED(hr), "Failed to set vertex declaration, hr %#lx.\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad2_modified, sizeof(float) * 11); - if (i == 3 || i == 2) + if (i == 3 || i == 2) { ok(SUCCEEDED(hr), "Failed to draw, i %u, hr %#lx.\n", i, hr); - else if (i == 1) + } else if (i == 1) { /* Succeeds or fails, depending on SW or HW vertex processing. */ ok(hr == D3DERR_INVALIDCALL || hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); + }
hr = IDirect3DDevice9_EndScene(device); ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); @@ -9070,7 +9077,7 @@ static void test_vshader_input(void) ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IDirect3DDevice9_SetPixelShader(device, ps); ok(hr == S_OK, "Got hr %#lx.\n", hr); - } else if(i == 2){ + } else if(i == 2) { hr = IDirect3DDevice9_CreateVertexShader(device, texcoord_color_shader_code_2, &texcoord_color_shader); ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IDirect3DDevice9_CreateVertexShader(device, color_color_shader_code_2, &color_color_shader);