From f040f89d278bff1338bbcb9bf004847c575b91dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Fri, 13 Jan 2017 12:53:53 +0100 Subject: [PATCH] d3d8/tests: Remove redundant state setting calls. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Józef Kucia Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/d3d8/tests/visual.c | 50 ---------------------------------------- 1 file changed, 50 deletions(-) diff --git a/dlls/d3d8/tests/visual.c b/dlls/d3d8/tests/visual.c index 20005d0ed8f..c0ecc6a6fa6 100644 --- a/dlls/d3d8/tests/visual.c +++ b/dlls/d3d8/tests/visual.c @@ -9334,13 +9334,6 @@ static void test_edge_antialiasing_blending(void) HWND window; HRESULT hr; - static const D3DMATRIX mat = - {{{ - 1.0f, 0.0f, 0.0f, 0.0f, - 0.0f, 1.0f, 0.0f, 0.0f, - 0.0f, 0.0f, 1.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 1.0f, - }}}; static const struct { struct vec3 position; @@ -9381,22 +9374,10 @@ static void test_edge_antialiasing_blending(void) ok(SUCCEEDED(hr), "Failed to get caps, hr %#x.\n", hr); trace("Edge antialiasing support: %#x.\n", caps.RasterCaps & D3DPRASTERCAPS_ANTIALIASEDGES); - hr = IDirect3DDevice8_SetTransform(device, D3DTS_WORLD, &mat); - ok(SUCCEEDED(hr), "Failed to set world transform, hr %#x.\n", hr); - hr = IDirect3DDevice8_SetTransform(device, D3DTS_VIEW, &mat); - ok(SUCCEEDED(hr), "Failed to set view transform, hr %#x.\n", hr); - hr = IDirect3DDevice8_SetTransform(device, D3DTS_PROJECTION, &mat); - ok(SUCCEEDED(hr), "Failed to set projection transform, hr %#x.\n", hr); hr = IDirect3DDevice8_SetRenderState(device, D3DRS_CLIPPING, FALSE); ok(SUCCEEDED(hr), "Failed to disable clipping, hr %#x.\n", hr); hr = IDirect3DDevice8_SetRenderState(device, D3DRS_ZENABLE, FALSE); ok(SUCCEEDED(hr), "Failed to disable Z test, hr %#x.\n", hr); - hr = IDirect3DDevice8_SetRenderState(device, D3DRS_FOGENABLE, FALSE); - ok(SUCCEEDED(hr), "Failed to disable fog, hr %#x.\n", hr); - hr = IDirect3DDevice8_SetRenderState(device, D3DRS_STENCILENABLE, FALSE); - ok(SUCCEEDED(hr), "Failed to disable stencil test, hr %#x.\n", hr); - hr = IDirect3DDevice8_SetRenderState(device, D3DRS_CULLMODE, D3DCULL_NONE); - ok(SUCCEEDED(hr), "Failed to disable culling, hr %#x.\n", hr); hr = IDirect3DDevice8_SetRenderState(device, D3DRS_LIGHTING, FALSE); ok(SUCCEEDED(hr), "Failed to disable lighting, hr %#x.\n", hr); @@ -9502,13 +9483,6 @@ static void test_edge_antialiasing_blending(void) /* This test shows that 0xffff is valid index in D3D8. */ static void test_max_index16(void) { - static const D3DMATRIX mat = - {{{ - 1.0f, 0.0f, 0.0f, 0.0f, - 0.0f, 1.0f, 0.0f, 0.0f, - 0.0f, 0.0f, 1.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 1.0f, - }}}; static const struct vertex { struct vec3 position; @@ -9573,37 +9547,13 @@ static void test_max_index16(void) D3DFMT_INDEX16, D3DPOOL_MANAGED, &ib); ok(SUCCEEDED(hr), "Failed to create index buffer, hr %#x.\n", hr); - hr = IDirect3DDevice8_SetTransform(device, D3DTS_WORLD, &mat); - ok(SUCCEEDED(hr), "Failed to set world transform, hr %#x.\n", hr); - hr = IDirect3DDevice8_SetTransform(device, D3DTS_VIEW, &mat); - ok(SUCCEEDED(hr), "Failed to set view transform, hr %#x.\n", hr); - hr = IDirect3DDevice8_SetTransform(device, D3DTS_PROJECTION, &mat); - ok(SUCCEEDED(hr), "Failed to set projection transform, hr %#x.\n", hr); hr = IDirect3DDevice8_SetRenderState(device, D3DRS_CLIPPING, FALSE); ok(SUCCEEDED(hr), "Failed to disable clipping, hr %#x.\n", hr); hr = IDirect3DDevice8_SetRenderState(device, D3DRS_ZENABLE, FALSE); ok(SUCCEEDED(hr), "Failed to disable Z test, hr %#x.\n", hr); - hr = IDirect3DDevice8_SetRenderState(device, D3DRS_FOGENABLE, FALSE); - ok(SUCCEEDED(hr), "Failed to disable fog, hr %#x.\n", hr); - hr = IDirect3DDevice8_SetRenderState(device, D3DRS_STENCILENABLE, FALSE); - ok(SUCCEEDED(hr), "Failed to disable stencil test, hr %#x.\n", hr); - hr = IDirect3DDevice8_SetRenderState(device, D3DRS_CULLMODE, D3DCULL_NONE); - ok(SUCCEEDED(hr), "Failed to disable culling, hr %#x.\n", hr); hr = IDirect3DDevice8_SetRenderState(device, D3DRS_LIGHTING, FALSE); ok(SUCCEEDED(hr), "Failed to disable lighting, hr %#x.\n", hr); - hr = IDirect3DDevice8_SetRenderState(device, D3DRS_ALPHABLENDENABLE, FALSE); - ok(SUCCEEDED(hr), "Failed to disable blending, hr %#x.\n", hr); - - hr = IDirect3DDevice8_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1); - ok(SUCCEEDED(hr), "Failed to set color op, hr %#x.\n", hr); - hr = IDirect3DDevice8_SetTextureStageState(device, 0, D3DTSS_COLORARG1, D3DTA_DIFFUSE); - ok(SUCCEEDED(hr), "Failed to set color arg, hr %#x.\n", hr); - hr = IDirect3DDevice8_SetTextureStageState(device, 0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1); - ok(SUCCEEDED(hr), "Failed to set alpha op, hr %#x.\n", hr); - hr = IDirect3DDevice8_SetTextureStageState(device, 0, D3DTSS_ALPHAARG1, D3DTA_DIFFUSE); - ok(SUCCEEDED(hr), "Failed to set alpha arg, hr %#x.\n", hr); - hr = IDirect3DDevice8_SetVertexShader(device, D3DFVF_XYZ | D3DFVF_DIFFUSE); ok(SUCCEEDED(hr), "Failed to set FVF, hr %#x.\n", hr);