Commit d0b8fd0a authored by Jason Green's avatar Jason Green Committed by Alexandre Julliard

d3d9: Fix a few ok() comparisons to not always return true in the visual tests.

parent 03da2166
...@@ -1077,11 +1077,11 @@ static void offscreen_test(IDirect3DDevice9 *device) ...@@ -1077,11 +1077,11 @@ static void offscreen_test(IDirect3DDevice9 *device)
ok(hr == D3D_OK, "Clear failed, hr = %s\n", DXGetErrorString9(hr)); ok(hr == D3D_OK, "Clear failed, hr = %s\n", DXGetErrorString9(hr));
hr = IDirect3DDevice9_CreateTexture(device, 128, 128, 1, D3DUSAGE_RENDERTARGET, D3DFMT_X8R8G8B8, D3DPOOL_DEFAULT, &offscreenTexture, NULL); hr = IDirect3DDevice9_CreateTexture(device, 128, 128, 1, D3DUSAGE_RENDERTARGET, D3DFMT_X8R8G8B8, D3DPOOL_DEFAULT, &offscreenTexture, NULL);
ok(hr == D3D_OK || D3DERR_INVALIDCALL, "Creating the offscreen render target failed, hr = %s\n", DXGetErrorString9(hr)); ok(hr == D3D_OK || hr == D3DERR_INVALIDCALL, "Creating the offscreen render target failed, hr = %s\n", DXGetErrorString9(hr));
if(!offscreenTexture) { if(!offscreenTexture) {
trace("Failed to create an X8R8G8B8 offscreen texture, trying R5G6B5\n"); trace("Failed to create an X8R8G8B8 offscreen texture, trying R5G6B5\n");
hr = IDirect3DDevice9_CreateTexture(device, 128, 128, 1, D3DUSAGE_RENDERTARGET, D3DFMT_R5G6B5, D3DPOOL_DEFAULT, &offscreenTexture, NULL); hr = IDirect3DDevice9_CreateTexture(device, 128, 128, 1, D3DUSAGE_RENDERTARGET, D3DFMT_R5G6B5, D3DPOOL_DEFAULT, &offscreenTexture, NULL);
ok(hr == D3D_OK || D3DERR_INVALIDCALL, "Creating the offscreen render target failed, hr = %s\n", DXGetErrorString9(hr)); ok(hr == D3D_OK || hr == D3DERR_INVALIDCALL, "Creating the offscreen render target failed, hr = %s\n", DXGetErrorString9(hr));
if(!offscreenTexture) { if(!offscreenTexture) {
skip("Cannot create an offscreen render target\n"); skip("Cannot create an offscreen render target\n");
goto out; goto out;
...@@ -5547,7 +5547,7 @@ static void alpha_test(IDirect3DDevice9 *device) ...@@ -5547,7 +5547,7 @@ static void alpha_test(IDirect3DDevice9 *device)
ok(hr == D3D_OK, "Clear failed, hr = %08x\n", hr); ok(hr == D3D_OK, "Clear failed, hr = %08x\n", hr);
hr = IDirect3DDevice9_CreateTexture(device, 128, 128, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &offscreenTexture, NULL); hr = IDirect3DDevice9_CreateTexture(device, 128, 128, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &offscreenTexture, NULL);
ok(hr == D3D_OK || D3DERR_INVALIDCALL, "Creating the offscreen render target failed, hr = %#08x\n", hr); ok(hr == D3D_OK || hr == D3DERR_INVALIDCALL, "Creating the offscreen render target failed, hr = %#08x\n", hr);
hr = IDirect3DDevice9_GetBackBuffer(device, 0, 0, D3DBACKBUFFER_TYPE_MONO, &backbuffer); hr = IDirect3DDevice9_GetBackBuffer(device, 0, 0, D3DBACKBUFFER_TYPE_MONO, &backbuffer);
ok(hr == D3D_OK, "Can't get back buffer, hr = %s\n", DXGetErrorString9(hr)); ok(hr == D3D_OK, "Can't get back buffer, hr = %s\n", DXGetErrorString9(hr));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment