From a08bb2f04c4571a2953afca59c69f19a695472ff Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 8 Jul 2008 17:48:50 +0200 Subject: [PATCH] d3d9: Don't depend on the dxerr9 static library in the tests. --- dlls/d3d9/tests/Makefile.in | 2 +- dlls/d3d9/tests/d3d9ex.c | 23 +- dlls/d3d9/tests/device.c | 281 ++++--- dlls/d3d9/tests/query.c | 61 +- dlls/d3d9/tests/surface.c | 5 +- dlls/d3d9/tests/visual.c | 1838 +++++++++++++++++++++---------------------- 6 files changed, 1090 insertions(+), 1120 deletions(-) diff --git a/dlls/d3d9/tests/Makefile.in b/dlls/d3d9/tests/Makefile.in index 85003c3d186..7fa911d0077 100644 --- a/dlls/d3d9/tests/Makefile.in +++ b/dlls/d3d9/tests/Makefile.in @@ -3,7 +3,7 @@ TOPOBJDIR = ../../.. SRCDIR = @srcdir@ VPATH = @srcdir@ TESTDLL = d3d9.dll -IMPORTS = dxerr9 user32 kernel32 +IMPORTS = user32 kernel32 CTESTS = \ d3d9ex.c \ diff --git a/dlls/d3d9/tests/d3d9ex.c b/dlls/d3d9/tests/d3d9ex.c index 60b4a00122b..3917a571bc8 100644 --- a/dlls/d3d9/tests/d3d9ex.c +++ b/dlls/d3d9/tests/d3d9ex.c @@ -23,7 +23,6 @@ #define COBJMACROS #include #include -#include #include "wine/test.h" static HMODULE d3d9_handle = 0; @@ -64,8 +63,8 @@ static void test_qi_base_to_ex(void) hr = IDirect3D9_QueryInterface(d3d9, &IID_IDirect3D9Ex, (void **) &d3d9ex); ok(hr == E_NOINTERFACE, - "IDirect3D9::QueryInterface for IID_IDirect3D9Ex returned %s, expected E_NOINTERFACE\n", - DXGetErrorString9(hr)); + "IDirect3D9::QueryInterface for IID_IDirect3D9Ex returned %08x, expected E_NOINTERFACE\n", + hr); ok(d3d9ex == NULL, "QueryInterface returned interface %p, expected NULL\n", d3d9ex); if(d3d9ex) IDirect3D9Ex_Release(d3d9ex); @@ -85,8 +84,8 @@ static void test_qi_base_to_ex(void) hr = IDirect3DDevice9_QueryInterface(device, &IID_IDirect3DDevice9Ex, (void **) &deviceEx); ok(hr == E_NOINTERFACE, - "IDirect3D9Device::QueryInterface for IID_IDirect3DDevice9Ex returned %s, expected E_NOINTERFACE\n", - DXGetErrorString9(hr)); + "IDirect3D9Device::QueryInterface for IID_IDirect3DDevice9Ex returned %08x, expected E_NOINTERFACE\n", + hr); ok(deviceEx == NULL, "QueryInterface returned interface %p, expected NULL\n", deviceEx); if(deviceEx) IDirect3DDevice9Ex_Release(deviceEx); @@ -109,7 +108,7 @@ static void test_qi_ex_to_base(void) unsigned long ref; hr = pDirect3DCreate9Ex(D3D_SDK_VERSION, &d3d9ex); - ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE, "Direct3DCreate9Ex returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE, "Direct3DCreate9Ex returned %08x\n", hr); if(FAILED(hr)) { skip("Direct3D9Ex is not available\n"); goto out; @@ -117,8 +116,8 @@ static void test_qi_ex_to_base(void) hr = IDirect3D9Ex_QueryInterface(d3d9ex, &IID_IDirect3D9, (void **) &d3d9); ok(hr == D3D_OK, - "IDirect3D9Ex::QueryInterface for IID_IDirect3D9 returned %s, expected D3D_OK\n", - DXGetErrorString9(hr)); + "IDirect3D9Ex::QueryInterface for IID_IDirect3D9 returned %08x, expected D3D_OK\n", + hr); ok(d3d9 != NULL && d3d9 != (void *) 0xdeadbeef, "QueryInterface returned interface %p, expected != NULL && != 0xdeadbeef\n", d3d9); ref = getref((IUnknown *) d3d9ex); @@ -144,8 +143,8 @@ static void test_qi_ex_to_base(void) hr = IDirect3DDevice9_QueryInterface(device, &IID_IDirect3DDevice9Ex, (void **) &deviceEx); ok(hr == D3D_OK, - "IDirect3D9Device::QueryInterface for IID_IDirect3DDevice9Ex returned %s, expected D3D_OK\n", - DXGetErrorString9(hr)); + "IDirect3D9Device::QueryInterface for IID_IDirect3DDevice9Ex returned %08x, expected D3D_OK\n", + hr); ok(deviceEx != NULL && deviceEx != (void *) 0xdeadbeef, "QueryInterface returned interface %p, expected != NULL && != 0xdeadbeef\n", deviceEx); ref = getref((IUnknown *) device); @@ -164,8 +163,8 @@ static void test_qi_ex_to_base(void) hr = IDirect3DDevice9_QueryInterface(device, &IID_IDirect3DDevice9Ex, (void **) &deviceEx); ok(hr == D3D_OK, - "IDirect3D9Device::QueryInterface for IID_IDirect3DDevice9Ex returned %s, expected D3D_OK\n", - DXGetErrorString9(hr)); + "IDirect3D9Device::QueryInterface for IID_IDirect3DDevice9Ex returned %08x, expected D3D_OK\n", + hr); ok(deviceEx != NULL && deviceEx != (void *) 0xdeadbeef, "QueryInterface returned interface %p, expected != NULL && != 0xdeadbeef\n", deviceEx); ref = getref((IUnknown *) device); diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index 3733bf15759..3a562981d8f 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -21,7 +21,6 @@ #define COBJMACROS #include -#include #include "wine/test.h" static IDirect3D9 *(WINAPI *pDirect3DCreate9)(UINT); @@ -38,7 +37,7 @@ static int get_refcount(IUnknown *object) int rc_new = rc; \ ok(tmp1 == rc_new, "Invalid refcount. Expected %d got %d\n", rc_new, tmp1); \ } else {\ - trace("%s failed: %s\n", c, DXGetErrorString9(r)); \ + trace("%s failed: %08x\n", c, r); \ } #define CHECK_RELEASE(obj,d,rc) \ @@ -92,7 +91,7 @@ static void check_mipmap_levels( DWORD levels = IDirect3DBaseTexture9_GetLevelCount(texture); ok(levels == count, "Invalid level count. Expected %d got %u\n", count, levels); } else - trace("CreateTexture failed: %s\n", DXGetErrorString9(hr)); + trace("CreateTexture failed: %08x\n", hr); if (texture) IUnknown_Release( texture ); } @@ -122,7 +121,7 @@ static void test_mipmap_levels(void) hr = IDirect3D9_CreateDevice( pD3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_NULLREF, hwnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &pDevice ); - ok(SUCCEEDED(hr), "Failed to create IDirect3D9Device (%s)\n", DXGetErrorString9(hr)); + ok(SUCCEEDED(hr), "Failed to create IDirect3D9Device (%08x)\n", hr); if (FAILED(hr)) goto cleanup; check_mipmap_levels(pDevice, 32, 32, 6); @@ -167,7 +166,7 @@ static void test_swapchain(void) hr = IDirect3D9_CreateDevice( pD3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hwnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &pDevice ); ok(hr == S_OK || hr == D3DERR_NOTAVAILABLE, - "Failed to create IDirect3D9Device (%s)\n", DXGetErrorString9(hr)); + "Failed to create IDirect3D9Device (%08x)\n", hr); if (FAILED(hr)) goto cleanup; /* Check if the back buffer count was modified */ @@ -175,57 +174,57 @@ static void test_swapchain(void) /* Get the implicit swapchain */ hr = IDirect3DDevice9_GetSwapChain(pDevice, 0, &swapchain0); - ok(SUCCEEDED(hr), "Failed to get the impicit swapchain (%s)\n", DXGetErrorString9(hr)); + ok(SUCCEEDED(hr), "Failed to get the impicit swapchain (%08x)\n", hr); if(swapchain0) IDirect3DSwapChain9_Release(swapchain0); /* Check if there is a back buffer */ hr = IDirect3DSwapChain9_GetBackBuffer(swapchain0, 0, D3DBACKBUFFER_TYPE_MONO, &backbuffer); - ok(SUCCEEDED(hr), "Failed to get the back buffer (%s)\n", DXGetErrorString9(hr)); + ok(SUCCEEDED(hr), "Failed to get the back buffer (%08x)\n", hr); ok(backbuffer != NULL, "The back buffer is NULL\n"); if(backbuffer) IDirect3DSurface9_Release(backbuffer); /* Try to get a nonexistent swapchain */ hr = IDirect3DDevice9_GetSwapChain(pDevice, 1, &swapchainX); - ok(hr == D3DERR_INVALIDCALL, "GetSwapChain on an nonexistent swapchain returned (%s)\n", DXGetErrorString9(hr)); + ok(hr == D3DERR_INVALIDCALL, "GetSwapChain on an nonexistent swapchain returned (%08x)\n", hr); ok(swapchainX == NULL, "Swapchain 1 is %p\n", swapchainX); if(swapchainX) IDirect3DSwapChain9_Release(swapchainX); /* Create a bunch of swapchains */ d3dpp.BackBufferCount = 0; hr = IDirect3DDevice9_CreateAdditionalSwapChain(pDevice, &d3dpp, &swapchain1); - ok(SUCCEEDED(hr), "Failed to create a swapchain (%s)\n", DXGetErrorString9(hr)); + ok(SUCCEEDED(hr), "Failed to create a swapchain (%08x)\n", hr); ok(d3dpp.BackBufferCount == 1, "The back buffer count in the presentparams struct is %d\n", d3dpp.BackBufferCount); d3dpp.BackBufferCount = 1; hr = IDirect3DDevice9_CreateAdditionalSwapChain(pDevice, &d3dpp, &swapchain2); - ok(SUCCEEDED(hr), "Failed to create a swapchain (%s)\n", DXGetErrorString9(hr)); + ok(SUCCEEDED(hr), "Failed to create a swapchain (%08x)\n", hr); d3dpp.BackBufferCount = 2; hr = IDirect3DDevice9_CreateAdditionalSwapChain(pDevice, &d3dpp, &swapchain3); - ok(SUCCEEDED(hr), "Failed to create a swapchain (%s)\n", DXGetErrorString9(hr)); + ok(SUCCEEDED(hr), "Failed to create a swapchain (%08x)\n", hr); if(SUCCEEDED(hr)) { /* Swapchain 3, created with backbuffercount 2 */ backbuffer = (void *) 0xdeadbeef; hr = IDirect3DSwapChain9_GetBackBuffer(swapchain3, 0, 0, &backbuffer); - ok(SUCCEEDED(hr), "Failed to get the 1st back buffer (%s)\n", DXGetErrorString9(hr)); + ok(SUCCEEDED(hr), "Failed to get the 1st back buffer (%08x)\n", hr); ok(backbuffer != NULL && backbuffer != (void *) 0xdeadbeef, "The back buffer is %p\n", backbuffer); if(backbuffer && backbuffer != (void *) 0xdeadbeef) IDirect3DSurface9_Release(backbuffer); backbuffer = (void *) 0xdeadbeef; hr = IDirect3DSwapChain9_GetBackBuffer(swapchain3, 1, 0, &backbuffer); - ok(SUCCEEDED(hr), "Failed to get the 2nd back buffer (%s)\n", DXGetErrorString9(hr)); + ok(SUCCEEDED(hr), "Failed to get the 2nd back buffer (%08x)\n", hr); ok(backbuffer != NULL && backbuffer != (void *) 0xdeadbeef, "The back buffer is %p\n", backbuffer); if(backbuffer && backbuffer != (void *) 0xdeadbeef) IDirect3DSurface9_Release(backbuffer); backbuffer = (void *) 0xdeadbeef; hr = IDirect3DSwapChain9_GetBackBuffer(swapchain3, 2, 0, &backbuffer); - ok(hr == D3DERR_INVALIDCALL, "GetBackBuffer returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3DERR_INVALIDCALL, "GetBackBuffer returned %08x\n", hr); ok(backbuffer == (void *) 0xdeadbeef, "The back buffer pointer was modified (%p)\n", backbuffer); if(backbuffer && backbuffer != (void *) 0xdeadbeef) IDirect3DSurface9_Release(backbuffer); backbuffer = (void *) 0xdeadbeef; hr = IDirect3DSwapChain9_GetBackBuffer(swapchain3, 3, 0, &backbuffer); - ok(FAILED(hr), "Failed to get the back buffer (%s)\n", DXGetErrorString9(hr)); + ok(FAILED(hr), "Failed to get the back buffer (%08x)\n", hr); ok(backbuffer == (void *) 0xdeadbeef, "The back buffer pointer was modified (%p)\n", backbuffer); if(backbuffer && backbuffer != (void *) 0xdeadbeef) IDirect3DSurface9_Release(backbuffer); } @@ -233,32 +232,32 @@ static void test_swapchain(void) /* Check the back buffers of the swapchains */ /* Swapchain 1, created with backbuffercount 0 */ hr = IDirect3DSwapChain9_GetBackBuffer(swapchain1, 0, D3DBACKBUFFER_TYPE_MONO, &backbuffer); - ok(SUCCEEDED(hr), "Failed to get the back buffer (%s)\n", DXGetErrorString9(hr)); - ok(backbuffer != NULL, "The back buffer is NULL (%s)\n", DXGetErrorString9(hr)); + ok(SUCCEEDED(hr), "Failed to get the back buffer (%08x)\n", hr); + ok(backbuffer != NULL, "The back buffer is NULL (%08x)\n", hr); if(backbuffer) IDirect3DSurface9_Release(backbuffer); backbuffer = (void *) 0xdeadbeef; hr = IDirect3DSwapChain9_GetBackBuffer(swapchain1, 1, 0, &backbuffer); - ok(FAILED(hr), "Failed to get the back buffer (%s)\n", DXGetErrorString9(hr)); + ok(FAILED(hr), "Failed to get the back buffer (%08x)\n", hr); ok(backbuffer == (void *) 0xdeadbeef, "The back buffer pointer was modified (%p)\n", backbuffer); if(backbuffer && backbuffer != (void *) 0xdeadbeef) IDirect3DSurface9_Release(backbuffer); /* Swapchain 2 - created with backbuffercount 1 */ backbuffer = (void *) 0xdeadbeef; hr = IDirect3DSwapChain9_GetBackBuffer(swapchain2, 0, 0, &backbuffer); - ok(SUCCEEDED(hr), "Failed to get the back buffer (%s)\n", DXGetErrorString9(hr)); + ok(SUCCEEDED(hr), "Failed to get the back buffer (%08x)\n", hr); ok(backbuffer != NULL && backbuffer != (void *) 0xdeadbeef, "The back buffer is %p\n", backbuffer); if(backbuffer && backbuffer != (void *) 0xdeadbeef) IDirect3DSurface9_Release(backbuffer); backbuffer = (void *) 0xdeadbeef; hr = IDirect3DSwapChain9_GetBackBuffer(swapchain2, 1, 0, &backbuffer); - ok(hr == D3DERR_INVALIDCALL, "GetBackBuffer returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3DERR_INVALIDCALL, "GetBackBuffer returned %08x\n", hr); ok(backbuffer == (void *) 0xdeadbeef, "The back buffer pointer was modified (%p)\n", backbuffer); if(backbuffer && backbuffer != (void *) 0xdeadbeef) IDirect3DSurface9_Release(backbuffer); backbuffer = (void *) 0xdeadbeef; hr = IDirect3DSwapChain9_GetBackBuffer(swapchain2, 2, 0, &backbuffer); - ok(FAILED(hr), "Failed to get the back buffer (%s)\n", DXGetErrorString9(hr)); + ok(FAILED(hr), "Failed to get the back buffer (%08x)\n", hr); ok(backbuffer == (void *) 0xdeadbeef, "The back buffer pointer was modified (%p)\n", backbuffer); if(backbuffer && backbuffer != (void *) 0xdeadbeef) IDirect3DSurface9_Release(backbuffer); @@ -267,7 +266,7 @@ static void test_swapchain(void) */ swapchainX = (void *) 0xdeadbeef; hr = IDirect3DDevice9_GetSwapChain(pDevice, 1, &swapchainX); - ok(hr == D3DERR_INVALIDCALL, "Failed to get the second swapchain (%s)\n", DXGetErrorString9(hr)); + ok(hr == D3DERR_INVALIDCALL, "Failed to get the second swapchain (%08x)\n", hr); ok(swapchainX == NULL, "The swapchain pointer is %p\n", swapchainX); if(swapchainX && swapchainX != (void *) 0xdeadbeef ) IDirect3DSwapChain9_Release(swapchainX); @@ -349,7 +348,7 @@ static void test_refcount(void) hr = IDirect3D9_CreateDevice( pD3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hwnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &pDevice ); ok(hr == S_OK || hr == D3DERR_NOTAVAILABLE, - "Failed to create IDirect3D9Device (%s)\n", DXGetErrorString9(hr)); + "Failed to create IDirect3D9Device (%08x)\n", hr); if (FAILED(hr)) goto cleanup; refcount = get_refcount( (IUnknown *)pDevice ); @@ -660,7 +659,7 @@ static void test_cursor(void) hr = IDirect3D9_CreateDevice( pD3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hwnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &pDevice ); ok(hr == S_OK || hr == D3DERR_NOTAVAILABLE, - "Failed to create IDirect3D9Device (%s)\n", DXGetErrorString9(hr)); + "Failed to create IDirect3D9Device (%08x)\n", hr); if (FAILED(hr)) goto cleanup; IDirect3DDevice9_CreateOffscreenPlainSurface(pDevice, 32, 32, D3DFMT_A8R8G8B8, D3DPOOL_SCRATCH, &cursor, 0); @@ -783,7 +782,7 @@ static void test_reset(void) ok(height == 600, "Screen height is %d\n", height); hr = IDirect3DDevice9_GetViewport(pDevice, &vp); - ok(hr == D3D_OK, "IDirect3DDevice9_GetViewport failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_GetViewport failed with %08x\n", hr); if(SUCCEEDED(hr)) { ok(vp.X == 0, "D3DVIEWPORT->X = %d\n", vp.X); @@ -798,7 +797,7 @@ static void test_reset(void) vp.MinZ = 2; vp.MaxZ = 3; hr = IDirect3DDevice9_SetViewport(pDevice, &vp); - ok(hr == D3D_OK, "IDirect3DDevice9_SetViewport failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetViewport failed with %08x\n", hr); ZeroMemory( &d3dpp, sizeof(d3dpp) ); d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD; @@ -807,13 +806,13 @@ static void test_reset(void) d3dpp.BackBufferHeight = 480; d3dpp.BackBufferFormat = d3ddm.Format; hr = IDirect3DDevice9_Reset(pDevice, &d3dpp); - ok(hr == D3D_OK, "IDirect3DDevice9_Reset failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Reset failed with %08x\n", hr); hr = IDirect3DDevice9_TestCooperativeLevel(pDevice); ok(hr == D3D_OK, "IDirect3DDevice9_TestCooperativeLevel after a successful reset returned %#x\n", hr); ZeroMemory(&vp, sizeof(vp)); hr = IDirect3DDevice9_GetViewport(pDevice, &vp); - ok(hr == D3D_OK, "IDirect3DDevice9_GetViewport failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_GetViewport failed with %08x\n", hr); if(SUCCEEDED(hr)) { ok(vp.X == 0, "D3DVIEWPORT->X = %d\n", vp.X); @@ -830,12 +829,12 @@ static void test_reset(void) ok(height == 480, "Screen height is %d\n", height); hr = IDirect3DDevice9_GetSwapChain(pDevice, 0, &pSwapchain); - ok(hr == D3D_OK, "IDirect3DDevice9_GetSwapChain returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_GetSwapChain returned %08x\n", hr); if(SUCCEEDED(hr)) { ZeroMemory(&d3dpp, sizeof(d3dpp)); hr = IDirect3DSwapChain9_GetPresentParameters(pSwapchain, &d3dpp); - ok(hr == D3D_OK, "IDirect3DSwapChain9_GetPresentParameters returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DSwapChain9_GetPresentParameters returned %08x\n", hr); if(SUCCEEDED(hr)) { ok(d3dpp.BackBufferWidth == 640, "Back buffer width is %d\n", d3dpp.BackBufferWidth); @@ -850,7 +849,7 @@ static void test_reset(void) d3dpp.BackBufferWidth = 400; d3dpp.BackBufferHeight = 300; hr = IDirect3DDevice9_Reset(pDevice, &d3dpp); - ok(hr == D3D_OK, "IDirect3DDevice9_Reset failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Reset failed with %08x\n", hr); hr = IDirect3DDevice9_TestCooperativeLevel(pDevice); ok(hr == D3D_OK, "IDirect3DDevice9_TestCooperativeLevel after a successful reset returned %#x\n", hr); @@ -861,7 +860,7 @@ static void test_reset(void) ZeroMemory(&vp, sizeof(vp)); hr = IDirect3DDevice9_GetViewport(pDevice, &vp); - ok(hr == D3D_OK, "IDirect3DDevice9_GetViewport failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_GetViewport failed with %08x\n", hr); if(SUCCEEDED(hr)) { ok(vp.X == 0, "D3DVIEWPORT->X = %d\n", vp.X); @@ -873,12 +872,12 @@ static void test_reset(void) } hr = IDirect3DDevice9_GetSwapChain(pDevice, 0, &pSwapchain); - ok(hr == D3D_OK, "IDirect3DDevice9_GetSwapChain returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_GetSwapChain returned %08x\n", hr); if(SUCCEEDED(hr)) { ZeroMemory(&d3dpp, sizeof(d3dpp)); hr = IDirect3DSwapChain9_GetPresentParameters(pSwapchain, &d3dpp); - ok(hr == D3D_OK, "IDirect3DSwapChain9_GetPresentParameters returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DSwapChain9_GetPresentParameters returned %08x\n", hr); if(SUCCEEDED(hr)) { ok(d3dpp.BackBufferWidth == 400, "Back buffer width is %d\n", d3dpp.BackBufferWidth); @@ -895,84 +894,84 @@ static void test_reset(void) /* _Reset fails if there is a resource in the default pool */ hr = IDirect3DDevice9_CreateOffscreenPlainSurface(pDevice, 16, 16, D3DFMT_R5G6B5, D3DPOOL_DEFAULT, &surface, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateOffscreenPlainSurface returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateOffscreenPlainSurface returned %08x\n", hr); hr = IDirect3DDevice9_Reset(pDevice, &d3dpp); - ok(hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_Reset failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_Reset failed with %08x\n", hr); hr = IDirect3DDevice9_TestCooperativeLevel(pDevice); ok(hr == D3DERR_DEVICENOTRESET, "IDirect3DDevice9_TestCooperativeLevel after a failed reset returned %#x\n", hr); IDirect3DSurface9_Release(surface); /* Reset again to get the device out of the lost state */ hr = IDirect3DDevice9_Reset(pDevice, &d3dpp); - ok(hr == D3D_OK, "IDirect3DDevice9_Reset failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Reset failed with %08x\n", hr); hr = IDirect3DDevice9_TestCooperativeLevel(pDevice); ok(hr == D3D_OK, "IDirect3DDevice9_TestCooperativeLevel after a successful reset returned %#x\n", hr); /* Scratch, sysmem and managed pools are fine */ hr = IDirect3DDevice9_CreateOffscreenPlainSurface(pDevice, 16, 16, D3DFMT_R5G6B5, D3DPOOL_SCRATCH, &surface, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateOffscreenPlainSurface returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateOffscreenPlainSurface returned %08x\n", hr); hr = IDirect3DDevice9_Reset(pDevice, &d3dpp); - ok(hr == D3D_OK, "IDirect3DDevice9_Reset failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Reset failed with %08x\n", hr); hr = IDirect3DDevice9_TestCooperativeLevel(pDevice); ok(hr == D3D_OK, "IDirect3DDevice9_TestCooperativeLevel after a successful reset returned %#x\n", hr); IDirect3DSurface9_Release(surface); hr = IDirect3DDevice9_CreateOffscreenPlainSurface(pDevice, 16, 16, D3DFMT_R5G6B5, D3DPOOL_SYSTEMMEM, &surface, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateOffscreenPlainSurface returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateOffscreenPlainSurface returned %08x\n", hr); hr = IDirect3DDevice9_Reset(pDevice, &d3dpp); - ok(hr == D3D_OK, "IDirect3DDevice9_Reset failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Reset failed with %08x\n", hr); hr = IDirect3DDevice9_TestCooperativeLevel(pDevice); ok(hr == D3D_OK, "IDirect3DDevice9_TestCooperativeLevel after a successful reset returned %#x\n", hr); IDirect3DSurface9_Release(surface); /* Will a sysmem or scratch survive while locked */ hr = IDirect3DDevice9_CreateOffscreenPlainSurface(pDevice, 16, 16, D3DFMT_R5G6B5, D3DPOOL_SYSTEMMEM, &surface, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateOffscreenPlainSurface returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateOffscreenPlainSurface returned %08x\n", hr); hr = IDirect3DSurface9_LockRect(surface, &lockrect, NULL, D3DLOCK_DISCARD); - ok(hr == D3D_OK, "IDirect3DSurface9_LockRect returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DSurface9_LockRect returned %08x\n", hr); hr = IDirect3DDevice9_Reset(pDevice, &d3dpp); - ok(hr == D3D_OK, "IDirect3DDevice9_Reset failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Reset failed with %08x\n", hr); hr = IDirect3DDevice9_TestCooperativeLevel(pDevice); ok(hr == D3D_OK, "IDirect3DDevice9_TestCooperativeLevel after a successful reset returned %#x\n", hr); IDirect3DSurface9_UnlockRect(surface); IDirect3DSurface9_Release(surface); hr = IDirect3DDevice9_CreateOffscreenPlainSurface(pDevice, 16, 16, D3DFMT_R5G6B5, D3DPOOL_SCRATCH, &surface, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateOffscreenPlainSurface returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateOffscreenPlainSurface returned %08x\n", hr); hr = IDirect3DSurface9_LockRect(surface, &lockrect, NULL, D3DLOCK_DISCARD); - ok(hr == D3D_OK, "IDirect3DSurface9_LockRect returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DSurface9_LockRect returned %08x\n", hr); hr = IDirect3DDevice9_Reset(pDevice, &d3dpp); - ok(hr == D3D_OK, "IDirect3DDevice9_Reset failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Reset failed with %08x\n", hr); hr = IDirect3DDevice9_TestCooperativeLevel(pDevice); ok(hr == D3D_OK, "IDirect3DDevice9_TestCooperativeLevel after a successful reset returned %#x\n", hr); IDirect3DSurface9_UnlockRect(surface); IDirect3DSurface9_Release(surface); hr = IDirect3DDevice9_CreateTexture(pDevice, 16, 16, 0, 0, D3DFMT_R5G6B5, D3DPOOL_MANAGED, &texture, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateTexture returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateTexture returned %08x\n", hr); hr = IDirect3DDevice9_Reset(pDevice, &d3dpp); - ok(hr == D3D_OK, "IDirect3DDevice9_Reset failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Reset failed with %08x\n", hr); hr = IDirect3DDevice9_TestCooperativeLevel(pDevice); ok(hr == D3D_OK, "IDirect3DDevice9_TestCooperativeLevel after a successful reset returned %#x\n", hr); IDirect3DTexture9_Release(texture); /* A reference held to an implicit surface causes failures as well */ hr = IDirect3DDevice9_GetBackBuffer(pDevice, 0, 0, D3DBACKBUFFER_TYPE_MONO, &surface); - ok(hr == D3D_OK, "IDirect3DDevice9_GetBackBuffer returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_GetBackBuffer returned %08x\n", hr); hr = IDirect3DDevice9_Reset(pDevice, &d3dpp); - ok(hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_Reset failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_Reset failed with %08x\n", hr); hr = IDirect3DDevice9_TestCooperativeLevel(pDevice); ok(hr == D3DERR_DEVICENOTRESET, "IDirect3DDevice9_TestCooperativeLevel after a failed reset returned %#x\n", hr); IDirect3DSurface9_Release(surface); hr = IDirect3DDevice9_Reset(pDevice, &d3dpp); - ok(hr == D3D_OK, "IDirect3DDevice9_Reset failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Reset failed with %08x\n", hr); hr = IDirect3DDevice9_TestCooperativeLevel(pDevice); ok(hr == D3D_OK, "IDirect3DDevice9_TestCooperativeLevel after a successful reset returned %#x\n", hr); /* Shaders are fine as well */ hr = IDirect3DDevice9_CreateVertexShader(pDevice, simple_vs, &shader); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %08x\n", hr); hr = IDirect3DDevice9_Reset(pDevice, &d3dpp); - ok(hr == D3D_OK, "IDirect3DDevice9_Reset failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Reset failed with %08x\n", hr); IDirect3DVertexShader9_Release(shader); /* Try setting invalid modes */ @@ -982,7 +981,7 @@ static void test_reset(void) d3dpp.BackBufferWidth = 32; d3dpp.BackBufferHeight = 32; hr = IDirect3DDevice9_Reset(pDevice, &d3dpp); - ok(hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_Reset to w=32, h=32, windowed=FALSE failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_Reset to w=32, h=32, windowed=FALSE failed with %08x\n", hr); hr = IDirect3DDevice9_TestCooperativeLevel(pDevice); ok(hr == D3DERR_DEVICENOTRESET, "IDirect3DDevice9_TestCooperativeLevel after a failed reset returned %#x\n", hr); @@ -992,7 +991,7 @@ static void test_reset(void) d3dpp.BackBufferWidth = 801; d3dpp.BackBufferHeight = 600; hr = IDirect3DDevice9_Reset(pDevice, &d3dpp); - ok(hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_Reset to w=801, h=600, windowed=FALSE failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_Reset to w=801, h=600, windowed=FALSE failed with %08x\n", hr); hr = IDirect3DDevice9_TestCooperativeLevel(pDevice); ok(hr == D3DERR_DEVICENOTRESET, "IDirect3DDevice9_TestCooperativeLevel after a failed reset returned %#x\n", hr); @@ -1013,7 +1012,7 @@ static void test_display_modes(void) #define TEST_FMT(x,r) do { \ HRESULT res = IDirect3D9_EnumAdapterModes(pD3d, 0, (x), 0, &dmode); \ - ok(res==(r), "EnumAdapterModes("#x") did not return "#r" (got %s)!\n", DXGetErrorString9(res)); \ + ok(res==(r), "EnumAdapterModes("#x") did not return "#r" (got %08x)!\n", res); \ } while(0) TEST_FMT(D3DFMT_R8G8B8, D3DERR_INVALIDCALL); @@ -1122,7 +1121,7 @@ static void test_scene(void) hr = IDirect3D9_CreateDevice( pD3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL /* no NULLREF here */, hwnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &pDevice ); - ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE, "IDirect3D9_CreateDevice failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE, "IDirect3D9_CreateDevice failed with %08x\n", hr); if(!pDevice) { skip("Failed to create a d3d device\n"); @@ -1132,66 +1131,66 @@ static void test_scene(void) /* Get the caps, they will be needed to tell if an operation is supposed to be valid */ memset(&caps, 0, sizeof(caps)); hr = IDirect3DDevice9_GetDeviceCaps(pDevice, &caps); - ok(hr == D3D_OK, "IDirect3DDevice9_GetCaps failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_GetCaps failed with %08x\n", hr); if(FAILED(hr)) goto cleanup; /* Test an EndScene without beginscene. Should return an error */ hr = IDirect3DDevice9_EndScene(pDevice); - ok(hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_EndScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_EndScene returned %08x\n", hr); /* Test a normal BeginScene / EndScene pair, this should work */ hr = IDirect3DDevice9_BeginScene(pDevice); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_EndScene(pDevice); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %08x\n", hr); } /* Test another EndScene without having begun a new scene. Should return an error */ hr = IDirect3DDevice9_EndScene(pDevice); - ok(hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_EndScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_EndScene returned %08x\n", hr); /* Two nested BeginScene and EndScene calls */ hr = IDirect3DDevice9_BeginScene(pDevice); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %08x\n", hr); hr = IDirect3DDevice9_BeginScene(pDevice); - ok(hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_BeginScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_BeginScene returned %08x\n", hr); hr = IDirect3DDevice9_EndScene(pDevice); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %08x\n", hr); hr = IDirect3DDevice9_EndScene(pDevice); - ok(hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_EndScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_EndScene returned %08x\n", hr); /* Create some surfaces to test stretchrect between the scenes */ hr = IDirect3DDevice9_CreateOffscreenPlainSurface(pDevice, 128, 128, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &pSurface1, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateOffscreenPlainSurface failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateOffscreenPlainSurface failed with %08x\n", hr); hr = IDirect3DDevice9_CreateOffscreenPlainSurface(pDevice, 128, 128, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &pSurface2, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateOffscreenPlainSurface failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateOffscreenPlainSurface failed with %08x\n", hr); hr = IDirect3DDevice9_CreateDepthStencilSurface(pDevice, 800, 600, D3DFMT_D16, D3DMULTISAMPLE_NONE, 0, FALSE, &pSurface3, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateDepthStencilSurface failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateDepthStencilSurface failed with %08x\n", hr); hr = IDirect3DDevice9_CreateRenderTarget(pDevice, 128, 128, d3ddm.Format, D3DMULTISAMPLE_NONE, 0, FALSE, &pRenderTarget, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateRenderTarget failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateRenderTarget failed with %08x\n", hr); hr = IDirect3DDevice9_GetBackBuffer(pDevice, 0, 0, D3DBACKBUFFER_TYPE_MONO, &pBackBuffer); - ok(hr == D3D_OK, "IDirect3DDevice9_GetBackBuffer failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_GetBackBuffer failed with %08x\n", hr); hr = IDirect3DDevice9_GetDepthStencilSurface(pDevice, &pDepthStencil); - ok(hr == D3D_OK, "IDirect3DDevice9_GetBackBuffer failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_GetBackBuffer failed with %08x\n", hr); /* First make sure a simple StretchRect call works */ if(pSurface1 && pSurface2) { hr = IDirect3DDevice9_StretchRect(pDevice, pSurface1, NULL, pSurface2, NULL, 0); - ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %08x\n", hr); } if(pBackBuffer && pRenderTarget) { hr = IDirect3DDevice9_StretchRect(pDevice, pBackBuffer, &rect, pRenderTarget, NULL, 0); - ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %08x\n", hr); } if(pDepthStencil && pSurface3) { HRESULT expected; if(0) /* Disabled for now because it crashes in wine */ { expected = caps.DevCaps2 & D3DDEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES ? D3D_OK : D3DERR_INVALIDCALL; hr = IDirect3DDevice9_StretchRect(pDevice, pDepthStencil, NULL, pSurface3, NULL, 0); - ok( hr == expected, "IDirect3DDevice9_StretchRect returned %s, expected %s\n", DXGetErrorString9(hr), DXGetErrorString9(expected)); + ok( hr == expected, "IDirect3DDevice9_StretchRect returned %08x, expected %08x\n", hr, expected); } } @@ -1199,40 +1198,40 @@ static void test_scene(void) * width normal surfaces, render targets and depth stencil surfaces. */ hr = IDirect3DDevice9_BeginScene(pDevice); - ok( hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %08x\n", hr); if(pSurface1 && pSurface2) { hr = IDirect3DDevice9_StretchRect(pDevice, pSurface1, NULL, pSurface2, NULL, 0); - ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %08x\n", hr); } if(pBackBuffer && pRenderTarget) { hr = IDirect3DDevice9_StretchRect(pDevice, pBackBuffer, &rect, pRenderTarget, NULL, 0); - ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %08x\n", hr); } if(pDepthStencil && pSurface3) { /* This is supposed to fail inside a BeginScene - EndScene pair. */ hr = IDirect3DDevice9_StretchRect(pDevice, pDepthStencil, NULL, pSurface3, NULL, 0); - ok( hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_StretchRect returned %s, expected D3DERR_INVALIDCALL\n", DXGetErrorString9(hr)); + ok( hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_StretchRect returned %08x, expected D3DERR_INVALIDCALL\n", hr); } hr = IDirect3DDevice9_EndScene(pDevice); - ok( hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %08x\n", hr); /* Does a SetRenderTarget influence BeginScene / EndScene ? * Set a new render target, then see if it started a new scene. Flip the rt back and see if that maybe * ended the scene. Expected result is that the scene is not affected by SetRenderTarget */ hr = IDirect3DDevice9_SetRenderTarget(pDevice, 0, pRenderTarget); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderTarget failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderTarget failed with %08x\n", hr); hr = IDirect3DDevice9_BeginScene(pDevice); - ok( hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %08x\n", hr); hr = IDirect3DDevice9_SetRenderTarget(pDevice, 0, pBackBuffer); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderTarget failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderTarget failed with %08x\n", hr); hr = IDirect3DDevice9_EndScene(pDevice); - ok( hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %08x\n", hr); cleanup: if(pRenderTarget) IDirect3DSurface9_Release(pRenderTarget); @@ -1275,7 +1274,7 @@ static void test_limits(void) hr = IDirect3D9_CreateDevice( pD3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL /* no NULLREF here */, hwnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &pDevice ); - ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE, "IDirect3D9_CreateDevice failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE, "IDirect3D9_CreateDevice failed with %08x\n", hr); if(!pDevice) { skip("Failed to create a d3d device\n"); @@ -1283,23 +1282,23 @@ static void test_limits(void) } hr = IDirect3DDevice9_CreateTexture(pDevice, 16, 16, 1, 0, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, &pTexture, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateTexture failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateTexture failed with %08x\n", hr); if(!pTexture) goto cleanup; /* There are 16 pixel samplers. We should be able to access all of them */ for(i = 0; i < 16; i++) { hr = IDirect3DDevice9_SetTexture(pDevice, i, (IDirect3DBaseTexture9 *) pTexture); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture for sampler %d failed with %s\n", i, DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture for sampler %d failed with %08x\n", i, hr); hr = IDirect3DDevice9_SetTexture(pDevice, i, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture for sampler %d failed with %s\n", i, DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture for sampler %d failed with %08x\n", i, hr); hr = IDirect3DDevice9_SetSamplerState(pDevice, i, D3DSAMP_SRGBTEXTURE, TRUE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState for sampler %d failed with %s\n", i, DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState for sampler %d failed with %08x\n", i, hr); } /* Now test all 8 textures stage states */ for(i = 0; i < 8; i++) { hr = IDirect3DDevice9_SetTextureStageState(pDevice, i, D3DTSS_COLOROP, D3DTOP_ADD); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTextureStageState for texture %d failed with %s\n", i, DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTextureStageState for texture %d failed with %08x\n", i, hr); } /* Investigations show that accessing higher samplers / textures stage states does not return an error either. Writing @@ -1343,7 +1342,7 @@ static void test_depthstenciltest(void) hr = IDirect3D9_CreateDevice( pD3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL /* no NULLREF here */, hwnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &pDevice ); - ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE, "IDirect3D9_CreateDevice failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE, "IDirect3D9_CreateDevice failed with %08x\n", hr); if(!pDevice) { skip("Failed to create a d3d device\n"); @@ -1351,51 +1350,51 @@ static void test_depthstenciltest(void) } hr = IDirect3DDevice9_GetDepthStencilSurface(pDevice, &pDepthStencil); - ok(hr == D3D_OK && pDepthStencil != NULL, "IDirect3DDevice9_GetDepthStencilSurface failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK && pDepthStencil != NULL, "IDirect3DDevice9_GetDepthStencilSurface failed with %08x\n", hr); /* Try to clear */ hr = IDirect3DDevice9_Clear(pDevice, 0, NULL, D3DCLEAR_ZBUFFER, 0x00000000, 1.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %08x\n", hr); hr = IDirect3DDevice9_SetDepthStencilSurface(pDevice, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetDepthStencilSurface failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetDepthStencilSurface failed with %08x\n", hr); /* Check if the set buffer is returned on a get. WineD3D had a bug with that once, prevent it from coming back */ hr = IDirect3DDevice9_GetDepthStencilSurface(pDevice, &pDepthStencil2); - ok(hr == D3DERR_NOTFOUND && pDepthStencil2 == NULL, "IDirect3DDevice9_GetDepthStencilSurface failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3DERR_NOTFOUND && pDepthStencil2 == NULL, "IDirect3DDevice9_GetDepthStencilSurface failed with %08x\n", hr); if(pDepthStencil2) IDirect3DSurface9_Release(pDepthStencil2); /* This left the render states untouched! */ hr = IDirect3DDevice9_GetRenderState(pDevice, D3DRS_ZENABLE, &state); - ok(hr == D3D_OK, "IDirect3DDevice9_GetRenderState failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_GetRenderState failed with %08x\n", hr); ok(state == D3DZB_TRUE, "D3DRS_ZENABLE is %s\n", state == D3DZB_FALSE ? "D3DZB_FALSE" : (state == D3DZB_TRUE ? "D3DZB_TRUE" : "D3DZB_USEW")); hr = IDirect3DDevice9_GetRenderState(pDevice, D3DRS_ZWRITEENABLE, &state); - ok(hr == D3D_OK, "IDirect3DDevice9_GetRenderState failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_GetRenderState failed with %08x\n", hr); ok(state == TRUE, "D3DRS_ZWRITEENABLE is %s\n", state ? "TRUE" : "FALSE"); hr = IDirect3DDevice9_GetRenderState(pDevice, D3DRS_STENCILENABLE, &state); - ok(hr == D3D_OK, "IDirect3DDevice9_GetRenderState failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_GetRenderState failed with %08x\n", hr); ok(state == FALSE, "D3DRS_STENCILENABLE is %s\n", state ? "TRUE" : "FALSE"); hr = IDirect3DDevice9_GetRenderState(pDevice, D3DRS_STENCILWRITEMASK, &state); - ok(hr == D3D_OK, "IDirect3DDevice9_GetRenderState failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_GetRenderState failed with %08x\n", hr); ok(state == 0xffffffff, "D3DRS_STENCILWRITEMASK is 0x%08x\n", state); /* This is supposed to fail now */ hr = IDirect3DDevice9_Clear(pDevice, 0, NULL, D3DCLEAR_ZBUFFER, 0x00000000, 1.0, 0); - ok(hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_Clear failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_Clear failed with %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(pDevice, D3DRS_ZENABLE, D3DZB_FALSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState failed with %08x\n", hr); hr = IDirect3DDevice9_SetDepthStencilSurface(pDevice, pDepthStencil); - ok(hr == D3D_OK, "IDirect3DDevice9_SetDepthStencilSurface failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetDepthStencilSurface failed with %08x\n", hr); hr = IDirect3DDevice9_GetRenderState(pDevice, D3DRS_ZENABLE, &state); - ok(hr == D3D_OK, "IDirect3DDevice9_GetRenderState failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_GetRenderState failed with %08x\n", hr); ok(state == D3DZB_FALSE, "D3DRS_ZENABLE is %s\n", state == D3DZB_FALSE ? "D3DZB_FALSE" : (state == D3DZB_TRUE ? "D3DZB_TRUE" : "D3DZB_USEW")); /* Now it works again */ hr = IDirect3DDevice9_Clear(pDevice, 0, NULL, D3DCLEAR_ZBUFFER, 0x00000000, 1.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %08x\n", hr); if(pDepthStencil) IDirect3DSurface9_Release(pDepthStencil); if(pDevice) IDirect3D9_Release(pDevice); @@ -1412,7 +1411,7 @@ static void test_depthstenciltest(void) hr = IDirect3D9_CreateDevice( pD3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL /* no NULLREF here */, hwnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &pDevice ); - ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE, "IDirect3D9_CreateDevice failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE, "IDirect3D9_CreateDevice failed with %08x\n", hr); if(!pDevice) { skip("Failed to create a d3d device\n"); @@ -1421,7 +1420,7 @@ static void test_depthstenciltest(void) pDepthStencil = NULL; hr = IDirect3DDevice9_GetDepthStencilSurface(pDevice, &pDepthStencil); - ok(hr == D3DERR_NOTFOUND && pDepthStencil == NULL, "IDirect3DDevice9_GetDepthStencilSurface returned %s, surface = %p\n", DXGetErrorString9(hr), pDepthStencil); + ok(hr == D3DERR_NOTFOUND && pDepthStencil == NULL, "IDirect3DDevice9_GetDepthStencilSurface returned %08x, surface = %p\n", hr, pDepthStencil); if(pDepthStencil) { IDirect3DSurface9_Release(pDepthStencil); pDepthStencil = NULL; @@ -1429,7 +1428,7 @@ static void test_depthstenciltest(void) /* Check the depth test state */ hr = IDirect3DDevice9_GetRenderState(pDevice, D3DRS_ZENABLE, &state); - ok(hr == D3D_OK, "IDirect3DDevice9_GetRenderState failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_GetRenderState failed with %08x\n", hr); ok(state == D3DZB_FALSE, "D3DRS_ZENABLE is %s\n", state == D3DZB_FALSE ? "D3DZB_FALSE" : (state == D3DZB_TRUE ? "D3DZB_TRUE" : "D3DZB_USEW")); if(pDevice) IDirect3D9_Release(pDevice); @@ -1446,7 +1445,7 @@ static void test_depthstenciltest(void) hr = IDirect3D9_CreateDevice( pD3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL /* no NULLREF here */, hwnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &pDevice ); - ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE, "IDirect3D9_CreateDevice failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE, "IDirect3D9_CreateDevice failed with %08x\n", hr); if(!pDevice) { skip("Failed to create a d3d device\n"); @@ -1455,14 +1454,14 @@ static void test_depthstenciltest(void) pDepthStencil = NULL; hr = IDirect3DDevice9_GetDepthStencilSurface(pDevice, &pDepthStencil); - ok(hr == D3DERR_NOTFOUND && pDepthStencil == NULL, "IDirect3DDevice9_GetDepthStencilSurface returned %s, surface = %p\n", DXGetErrorString9(hr), pDepthStencil); + ok(hr == D3DERR_NOTFOUND && pDepthStencil == NULL, "IDirect3DDevice9_GetDepthStencilSurface returned %08x, surface = %p\n", hr, pDepthStencil); if(pDepthStencil) { IDirect3DSurface9_Release(pDepthStencil); pDepthStencil = NULL; } hr = IDirect3DDevice9_GetRenderState(pDevice, D3DRS_ZENABLE, &state); - ok(hr == D3D_OK, "IDirect3DDevice9_GetRenderState failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_GetRenderState failed with %08x\n", hr); ok(state == D3DZB_FALSE, "D3DRS_ZENABLE is %s\n", state == D3DZB_FALSE ? "D3DZB_FALSE" : (state == D3DZB_TRUE ? "D3DZB_TRUE" : "D3DZB_USEW")); cleanup: @@ -1631,7 +1630,7 @@ static void test_null_stream(void) hr = IDirect3D9_CreateDevice( d3d9, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL /* no NULLREF here */, hwnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &present_parameters, &device ); - ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE, "IDirect3D9_CreateDevice failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE, "IDirect3D9_CreateDevice failed with %08x\n", hr); if(!device) { skip("Failed to create a d3d device\n"); @@ -1723,7 +1722,7 @@ static void test_vertex_buffer_alignment(void) hr = IDirect3D9_CreateDevice( d3d9, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL /* no NULLREF here */, hwnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &present_parameters, &device ); - ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE, "IDirect3D9_CreateDevice failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE, "IDirect3D9_CreateDevice failed with %08x\n", hr); if(!device) { skip("Failed to create a d3d device\n"); @@ -1781,7 +1780,7 @@ static void test_lights(void) hr = IDirect3D9_CreateDevice( d3d9, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hwnd, D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_PUREDEVICE, &present_parameters, &device ); ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE || hr == D3DERR_INVALIDCALL, - "IDirect3D9_CreateDevice failed with %s\n", DXGetErrorString9(hr)); + "IDirect3D9_CreateDevice failed with %08x\n", hr); if(!device) { skip("Failed to create a d3d device\n"); @@ -1790,28 +1789,28 @@ static void test_lights(void) memset(&caps, 0, sizeof(caps)); hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); - ok(hr == D3D_OK, "IDirect3DDevice9_GetDeviceCaps failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_GetDeviceCaps failed with %08x\n", hr); for(i = 1; i <= caps.MaxActiveLights; i++) { hr = IDirect3DDevice9_LightEnable(device, i, TRUE); - ok(hr == D3D_OK, "Enabling light %u failed with %s\n", i, DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Enabling light %u failed with %08x\n", i, hr); hr = IDirect3DDevice9_GetLightEnable(device, i, &enabled); - ok(hr == D3D_OK, "GetLightEnable on light %u failed with %s\n", i, DXGetErrorString9(hr)); + ok(hr == D3D_OK, "GetLightEnable on light %u failed with %08x\n", i, hr); ok(enabled, "Light %d is %s\n", i, enabled ? "enabled" : "disabled"); } /* TODO: Test the rendering results in this situation */ hr = IDirect3DDevice9_LightEnable(device, i + 1, TRUE); - ok(hr == D3D_OK, "Enabling one light more than supported returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Enabling one light more than supported returned %08x\n", hr); hr = IDirect3DDevice9_GetLightEnable(device, i + 1, &enabled); - ok(hr == D3D_OK, "GetLightEnable on light %u failed with %s\n", i + 1, DXGetErrorString9(hr)); + ok(hr == D3D_OK, "GetLightEnable on light %u failed with %08x\n", i + 1, hr); ok(enabled, "Light %d is %s\n", i + 1, enabled ? "enabled" : "disabled"); hr = IDirect3DDevice9_LightEnable(device, i + 1, FALSE); - ok(hr == D3D_OK, "Disabling the additional returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Disabling the additional returned %08x\n", hr); for(i = 1; i <= caps.MaxActiveLights; i++) { hr = IDirect3DDevice9_LightEnable(device, i, FALSE); - ok(hr == D3D_OK, "Disabling light %u failed with %s\n", i, DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Disabling light %u failed with %08x\n", i, hr); } cleanup: @@ -1842,12 +1841,12 @@ static void test_set_stream_source(void) hr = IDirect3D9_CreateDevice( d3d9, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hwnd, D3DCREATE_HARDWARE_VERTEXPROCESSING, &present_parameters, &device ); ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE || hr == D3DERR_INVALIDCALL, - "IDirect3D9_CreateDevice failed with %s\n", DXGetErrorString9(hr)); + "IDirect3D9_CreateDevice failed with %08x\n", hr); if(!device) { hr = IDirect3D9_CreateDevice( d3d9, D3DADAPTER_DEFAULT, D3DDEVTYPE_REF, hwnd, D3DCREATE_HARDWARE_VERTEXPROCESSING, &present_parameters, &device ); - ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE, "IDirect3D9_CreateDevice failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE, "IDirect3D9_CreateDevice failed with %08x\n", hr); if(!device) { skip("Failed to create a d3d device\n"); @@ -1856,47 +1855,37 @@ static void test_set_stream_source(void) } hr = IDirect3DDevice9_CreateVertexBuffer( device, 512, 0, 0, D3DPOOL_DEFAULT, &pVertexBuffer, NULL ); - ok(hr == D3D_OK, "Failed to create a vertex buffer, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Failed to create a vertex buffer, hr = %08x\n", hr); if (SUCCEEDED(hr)) { /* Some cards(Geforce 7400 at least) accept non-aligned offsets, others(radeon 9000 verified) reject it, * so accept both results. Wine currently rejects this to be able to optimize the vbo conversion, but writes * a WARN */ hr = IDirect3DDevice9_SetStreamSource(device, 0, pVertexBuffer, 0, 32); - ok(hr == D3D_OK, "Failed to set the stream source, offset 0, hr = %s\n", - DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Failed to set the stream source, offset 0, hr = %08x\n", hr); hr = IDirect3DDevice9_SetStreamSource(device, 0, pVertexBuffer, 1, 32); - ok(hr == D3DERR_INVALIDCALL || hr == D3D_OK, "Unexpected result when setting the stream source, offset 1, hr = %s\n", - DXGetErrorString9(hr)); + ok(hr == D3DERR_INVALIDCALL || hr == D3D_OK, "Unexpected result when setting the stream source, offset 1, hr = %08x\n", hr); hr = IDirect3DDevice9_SetStreamSource(device, 0, pVertexBuffer, 2, 32); - ok(hr == D3DERR_INVALIDCALL || hr == D3D_OK, "Unexpected result when setting the stream source, offset 2, hr = %s\n", - DXGetErrorString9(hr)); + ok(hr == D3DERR_INVALIDCALL || hr == D3D_OK, "Unexpected result when setting the stream source, offset 2, hr = %08x\n", hr); hr = IDirect3DDevice9_SetStreamSource(device, 0, pVertexBuffer, 3, 32); - ok(hr == D3DERR_INVALIDCALL || hr == D3D_OK, "Unexpected result when setting the stream source, offset 3, hr = %s\n", - DXGetErrorString9(hr)); + ok(hr == D3DERR_INVALIDCALL || hr == D3D_OK, "Unexpected result when setting the stream source, offset 3, hr = %08x\n", hr); hr = IDirect3DDevice9_SetStreamSource(device, 0, pVertexBuffer, 4, 32); - ok(hr == D3D_OK, "Failed to set the stream source, offset 4, hr = %s\n", - DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Failed to set the stream source, offset 4, hr = %08x\n", hr); } /* Try to set the NULL buffer with an offset and stride 0 */ hr = IDirect3DDevice9_SetStreamSource(device, 0, NULL, 0, 0); - ok(hr == D3D_OK, "Failed to set the stream source, offset 0, hr = %s\n", - DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Failed to set the stream source, offset 0, hr = %08x\n", hr); hr = IDirect3DDevice9_SetStreamSource(device, 0, NULL, 1, 0); - ok(hr == D3DERR_INVALIDCALL || hr == D3D_OK, "Unexpected result when setting the stream source, offset 1, hr = %s\n", - DXGetErrorString9(hr)); + ok(hr == D3DERR_INVALIDCALL || hr == D3D_OK, "Unexpected result when setting the stream source, offset 1, hr = %08x\n", hr); hr = IDirect3DDevice9_SetStreamSource(device, 0, NULL, 2, 0); - ok(hr == D3DERR_INVALIDCALL || hr == D3D_OK, "Unexpected result when setting the stream source, offset 2, hr = %s\n", - DXGetErrorString9(hr)); + ok(hr == D3DERR_INVALIDCALL || hr == D3D_OK, "Unexpected result when setting the stream source, offset 2, hr = %08x\n", hr); hr = IDirect3DDevice9_SetStreamSource(device, 0, NULL, 3, 0); - ok(hr == D3DERR_INVALIDCALL || hr == D3D_OK, "Unexpected result when setting the stream source, offset 3, hr = %s\n", - DXGetErrorString9(hr)); + ok(hr == D3DERR_INVALIDCALL || hr == D3D_OK, "Unexpected result when setting the stream source, offset 3, hr = %08x\n", hr); hr = IDirect3DDevice9_SetStreamSource(device, 0, NULL, 4, 0); - ok(hr == D3D_OK, "Failed to set the stream source, offset 4, hr = %s\n", - DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Failed to set the stream source, offset 4, hr = %08x\n", hr); hr = IDirect3DDevice9_SetStreamSource(device, 0, NULL, 0, 0); - ok(hr == D3D_OK, "Failed to set the stream source, offset 4, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Failed to set the stream source, offset 4, hr = %08x\n", hr); if(pVertexBuffer) IDirect3DDevice9_Release(pVertexBuffer); cleanup: @@ -2055,7 +2044,7 @@ static void test_set_material(void) } hr = IDirect3DDevice9_SetMaterial(device, NULL); - ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %s\n", DXGetErrorString9(hr)); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %08x\n", hr); cleanup: if(device) IDirect3DDevice9_Release(device); diff --git a/dlls/d3d9/tests/query.c b/dlls/d3d9/tests/query.c index 452991da20b..6e8b4c9369c 100644 --- a/dlls/d3d9/tests/query.c +++ b/dlls/d3d9/tests/query.c @@ -18,7 +18,6 @@ #define COBJMACROS #include -#include #include "wine/test.h" static IDirect3D9 *(WINAPI *pDirect3DCreate9)(UINT); @@ -96,7 +95,7 @@ static void test_query_support(IDirect3D9 *pD3d, HWND hwnd) hr = IDirect3D9_CreateDevice( pD3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hwnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &pDevice ); - ok(SUCCEEDED(hr) || hr == D3DERR_NOTAVAILABLE, "Failed to create IDirect3D9Device (%s)\n", DXGetErrorString9(hr)); + ok(SUCCEEDED(hr) || hr == D3DERR_NOTAVAILABLE, "Failed to create IDirect3D9Device (%08x)\n", hr); if (FAILED(hr)) { skip("Failed to create a d3d device\n"); @@ -107,7 +106,7 @@ static void test_query_support(IDirect3D9 *pD3d, HWND hwnd) { hr = IDirect3DDevice9_CreateQuery(pDevice, queries[i].type, NULL); ok(hr == D3D_OK || D3DERR_NOTAVAILABLE, - "IDirect3DDevice9_CreateQuery returned unexpected return value %s for query %s\n", DXGetErrorString9(hr), queryName(queries[i].type)); + "IDirect3DDevice9_CreateQuery returned unexpected return value %08x for query %s\n", hr, queryName(queries[i].type)); supported = (hr == D3D_OK ? TRUE : FALSE); trace("query %s is %s\n", queryName(queries[i].type), supported ? "supported" : "not supported"); @@ -121,7 +120,7 @@ static void test_query_support(IDirect3D9 *pD3d, HWND hwnd) hr = IDirect3DDevice9_CreateQuery(pDevice, queries[i].type, &pQuery); ok(hr == D3D_OK || D3DERR_NOTAVAILABLE, - "IDirect3DDevice9_CreateQuery returned unexpected return value %s for query %s\n", DXGetErrorString9(hr), queryName(queries[i].type)); + "IDirect3DDevice9_CreateQuery returned unexpected return value %08x for query %s\n", hr, queryName(queries[i].type)); ok(!(supported && !pQuery), "Query %s was claimed to be supported, but can't be created\n", queryName(queries[i].type)); ok(!(!supported && pQuery), "Query %s was claimed not to be supported, but can be created\n", queryName(queries[i].type)); if(pQuery) @@ -156,7 +155,7 @@ static void test_occlusion_query_states(IDirect3D9 *pD3d, HWND hwnd) hr = IDirect3D9_CreateDevice( pD3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hwnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &pDevice ); - ok(SUCCEEDED(hr) || hr == D3DERR_NOTAVAILABLE, "Failed to create IDirect3D9Device (%s)\n", DXGetErrorString9(hr)); + ok(SUCCEEDED(hr) || hr == D3DERR_NOTAVAILABLE, "Failed to create IDirect3D9Device (%08x)\n", hr); if (FAILED(hr)) { skip("Failed to create a d3d device\n"); @@ -165,7 +164,7 @@ static void test_occlusion_query_states(IDirect3D9 *pD3d, HWND hwnd) hr = IDirect3DDevice9_CreateQuery(pDevice, D3DQUERYTYPE_OCCLUSION, &pQuery); ok(hr == D3D_OK || D3DERR_NOTAVAILABLE, - "IDirect3DDevice9_CreateQuery returned unexpected return value %s\n", DXGetErrorString9(hr)); + "IDirect3DDevice9_CreateQuery returned unexpected return value %08x\n", hr); if(!pQuery) { skip("Occlusion queries not supported\n"); goto cleanup; @@ -174,72 +173,58 @@ static void test_occlusion_query_states(IDirect3D9 *pD3d, HWND hwnd) data = HeapAlloc(GetProcessHeap(), 0, IDirect3DQuery9_GetDataSize(pQuery)); hr = IDirect3DQuery9_GetData(pQuery, NULL, 0, D3DGETDATA_FLUSH); - ok(hr == S_OK, "IDirect3DQuery9_GetData(NULL) on a new query returned %s\n", - DXGetErrorString9(hr)); + ok(hr == S_OK, "IDirect3DQuery9_GetData(NULL) on a new query returned %08x\n", hr); hr = IDirect3DQuery9_GetData(pQuery, data, IDirect3DQuery9_GetDataSize(pQuery), D3DGETDATA_FLUSH); - ok(hr == S_OK, "IDirect3DQuery9_GetData on a new query returned %s\n", - DXGetErrorString9(hr)); + ok(hr == S_OK, "IDirect3DQuery9_GetData on a new query returned %08x\n", hr); hr = IDirect3DQuery9_Issue(pQuery, D3DISSUE_END); - ok(hr == D3D_OK, "IDirect3DQuery9_Issue(D3DISSUE_END) on a new not yet started query returned %s\n", - DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DQuery9_Issue(D3DISSUE_END) on a new not yet started query returned %08x\n", hr); hr = IDirect3DQuery9_Issue(pQuery, D3DISSUE_BEGIN); - ok(hr == D3D_OK, "IDirect3DQuery9_Issue(D3DISSUE_BEGIN) on a new not yet started query returned %s\n", - DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DQuery9_Issue(D3DISSUE_BEGIN) on a new not yet started query returned %08x\n", hr); hr = IDirect3DQuery9_Issue(pQuery, D3DISSUE_BEGIN); - ok(hr == D3D_OK, "IDirect3DQuery9_Issue(D3DQUERY_BEGIN) on a started query returned %s\n", - DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DQuery9_Issue(D3DQUERY_BEGIN) on a started query returned %08x\n", hr); hr = IDirect3DQuery9_GetData(pQuery, NULL, 0, D3DGETDATA_FLUSH); - ok(hr == S_FALSE, "IDirect3DQuery9_GetData(NULL) on a started query returned %s\n", - DXGetErrorString9(hr)); + ok(hr == S_FALSE, "IDirect3DQuery9_GetData(NULL) on a started query returned %08x\n", hr); hr = IDirect3DQuery9_GetData(pQuery, data, IDirect3DQuery9_GetDataSize(pQuery), D3DGETDATA_FLUSH); - ok(hr == S_FALSE, "IDirect3DQuery9_GetData on a started query returned %s\n", - DXGetErrorString9(hr)); + ok(hr == S_FALSE, "IDirect3DQuery9_GetData on a started query returned %08x\n", hr); hr = IDirect3DDevice9_SetFVF(pDevice, D3DFVF_XYZ); - ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF returned %08x\n", hr); hr = IDirect3DDevice9_BeginScene(pDevice); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_DrawPrimitiveUP(pDevice, D3DPT_POINTLIST, 1, point, 3 * sizeof(float)); - ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP returned %08x\n", hr); hr = IDirect3DDevice9_EndScene(pDevice); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %08x\n", hr); } hr = IDirect3DQuery9_Issue(pQuery, D3DISSUE_END); - ok(hr == D3D_OK, "IDirect3DQuery9_Issue(D3DISSUE_END) on a started query returned %s\n", - DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DQuery9_Issue(D3DISSUE_END) on a started query returned %08x\n", hr); hr = S_FALSE; while(hr == S_FALSE && count < 500) { hr = IDirect3DQuery9_GetData(pQuery, NULL, 0, D3DGETDATA_FLUSH); - ok(hr == S_OK || hr == S_FALSE, "IDirect3DQuery9_GetData on a ended query returned %s\n", - DXGetErrorString9(hr)); + ok(hr == S_OK || hr == S_FALSE, "IDirect3DQuery9_GetData on a ended query returned %08x\n", hr); count++; if(hr == S_FALSE) Sleep(10); } ok(hr == S_OK, "Occlusion query did not finish\n"); hr = IDirect3DQuery9_GetData(pQuery, data, IDirect3DQuery9_GetDataSize(pQuery), D3DGETDATA_FLUSH); - ok(hr == S_OK, "IDirect3DQuery9_GetData on a ended query returned %s\n", - DXGetErrorString9(hr)); + ok(hr == S_OK, "IDirect3DQuery9_GetData on a ended query returned %08x\n", hr); hr = IDirect3DQuery9_GetData(pQuery, data, IDirect3DQuery9_GetDataSize(pQuery), D3DGETDATA_FLUSH); - ok(hr == S_OK, "IDirect3DQuery9_GetData a 2nd time on a ended query returned %s\n", - DXGetErrorString9(hr)); + ok(hr == S_OK, "IDirect3DQuery9_GetData a 2nd time on a ended query returned %08x\n", hr); hr = IDirect3DQuery9_Issue(pQuery, D3DISSUE_BEGIN); - ok(hr == D3D_OK, "IDirect3DQuery9_Issue(D3DISSUE_BEGIN) on a new not yet started query returned %s\n", - DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DQuery9_Issue(D3DISSUE_BEGIN) on a new not yet started query returned %08x\n", hr); hr = IDirect3DQuery9_Issue(pQuery, D3DISSUE_END); - ok(hr == D3D_OK, "IDirect3DQuery9_Issue(D3DISSUE_END) on a started query returned %s\n", - DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DQuery9_Issue(D3DISSUE_END) on a started query returned %08x\n", hr); hr = IDirect3DQuery9_Issue(pQuery, D3DISSUE_END); - ok(hr == D3D_OK, "IDirect3DQuery9_Issue(D3DISSUE_END) on a ended query returned %s\n", - DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DQuery9_Issue(D3DISSUE_END) on a ended query returned %08x\n", hr); cleanup: HeapFree(GetProcessHeap(), 0, data); diff --git a/dlls/d3d9/tests/surface.c b/dlls/d3d9/tests/surface.c index df328bee21d..69016f5a58b 100644 --- a/dlls/d3d9/tests/surface.c +++ b/dlls/d3d9/tests/surface.c @@ -17,7 +17,6 @@ */ #define COBJMACROS #include -#include #include "wine/test.h" static HWND create_window(void) @@ -150,7 +149,7 @@ static void test_surface_alignment(IDirect3DDevice9 *device_ptr) hr = IDirect3DDevice9_CreateTexture(device_ptr, 64, 64, 0, 0, MAKEFOURCC('D', 'X', 'T', '1'+i), D3DPOOL_MANAGED, &pTexture, NULL); - ok(SUCCEEDED(hr) || hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_CreateTexture: %s\n", DXGetErrorString9(hr)); + ok(SUCCEEDED(hr) || hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_CreateTexture: %08x\n", hr); if (FAILED(hr)) { skip("DXT%d surfaces are not supported\n", i + 1); continue; @@ -163,7 +162,7 @@ static void test_surface_alignment(IDirect3DDevice9 *device_ptr) IDirect3DTexture9_GetLevelDesc(pTexture, j, &descr); hr = IDirect3DTexture9_LockRect(pTexture, j, &rc, NULL, 0); - ok(SUCCEEDED(hr), "IDirect3DTexture9_LockRect: %s\n", DXGetErrorString9(hr)); + ok(SUCCEEDED(hr), "IDirect3DTexture9_LockRect: %08x\n", hr); IDirect3DTexture9_UnlockRect(pTexture, j); pitch = ((descr.Width + 3) >> 2) << 3; diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index 611a589963c..152252356ea 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -30,7 +30,6 @@ #define COBJMACROS #include -#include #include "wine/test.h" static HMODULE d3d9_handle = 0; @@ -73,14 +72,14 @@ static DWORD getPixelColorFromSurface(IDirect3DSurface9 *surface, UINT x, UINT y hr = IDirect3DSurface9_GetDesc(surface, &desc); if(FAILED(hr)) /* This is not a test */ { - trace("Can't get the surface description, hr=%s\n", DXGetErrorString9(hr)); + trace("Can't get the surface description, hr=%08x\n", hr); return 0xdeadbeef; } hr = IDirect3DSurface9_LockRect(surface, &lockedRect, &rectToLock, D3DLOCK_READONLY); if(FAILED(hr)) /* This is not a test */ { - trace("Can't lock the surface, hr=%s\n", DXGetErrorString9(hr)); + trace("Can't lock the surface, hr=%08x\n", hr); return 0xdeadbeef; } switch(desc.Format) { @@ -97,7 +96,7 @@ static DWORD getPixelColorFromSurface(IDirect3DSurface9 *surface, UINT x, UINT y hr = IDirect3DSurface9_UnlockRect(surface); if(FAILED(hr)) { - trace("Can't unlock the surface, hr=%s\n", DXGetErrorString9(hr)); + trace("Can't unlock the surface, hr=%08x\n", hr); } return color; } @@ -113,14 +112,14 @@ static DWORD getPixelColor(IDirect3DDevice9 *device, UINT x, UINT y) hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 640, 480, D3DFMT_A8R8G8B8, D3DPOOL_SYSTEMMEM, &surf, NULL); if(FAILED(hr) || !surf ) /* This is not a test */ { - trace("Can't create an offscreen plain surface to read the render target data, hr=%s\n", DXGetErrorString9(hr)); + trace("Can't create an offscreen plain surface to read the render target data, hr=%08x\n", hr); return 0xdeadbeef; } hr = IDirect3DDevice9_GetFrontBufferData(device, 0, surf); if(FAILED(hr)) { - trace("Can't read the front buffer data, hr=%s\n", DXGetErrorString9(hr)); + trace("Can't read the front buffer data, hr=%08x\n", hr); ret = 0xdeadbeed; goto out; } @@ -128,7 +127,7 @@ static DWORD getPixelColor(IDirect3DDevice9 *device, UINT x, UINT y) hr = IDirect3DSurface9_LockRect(surf, &lockedRect, &rectToLock, D3DLOCK_READONLY); if(FAILED(hr)) { - trace("Can't lock the offscreen surface, hr=%s\n", DXGetErrorString9(hr)); + trace("Can't lock the offscreen surface, hr=%08x\n", hr); ret = 0xdeadbeec; goto out; } @@ -140,7 +139,7 @@ static DWORD getPixelColor(IDirect3DDevice9 *device, UINT x, UINT y) hr = IDirect3DSurface9_UnlockRect(surf); if(FAILED(hr)) { - trace("Can't unlock the offscreen surface, hr=%s\n", DXGetErrorString9(hr)); + trace("Can't unlock the offscreen surface, hr=%08x\n", hr); } out: @@ -193,7 +192,7 @@ static IDirect3DDevice9 *init_d3d9(void) hr = IDirect3D9_CreateDevice(d3d9_ptr, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, present_parameters.hDeviceWindow, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &present_parameters, &device_ptr); } } - ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE, "IDirect3D_CreateDevice returned: %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE, "IDirect3D_CreateDevice returned: %08x\n", hr); return device_ptr; } @@ -260,71 +259,71 @@ static void lighting_test(IDirect3DDevice9 *device) WORD Indices[] = {0, 1, 2, 2, 3, 0}; hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %08x\n", hr); /* Setup some states that may cause issues */ hr = IDirect3DDevice9_SetTransform(device, D3DTS_WORLDMATRIX(0), (D3DMATRIX *) mat); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform returned %08x\n", hr); hr = IDirect3DDevice9_SetTransform(device, D3DTS_VIEW, (D3DMATRIX *)mat); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform returned %08x\n", hr); hr = IDirect3DDevice9_SetTransform(device, D3DTS_PROJECTION, (D3DMATRIX *) mat); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_CLIPPING, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZENABLE, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_FOGENABLE, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_STENCILENABLE, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ALPHATESTENABLE, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ALPHABLENDENABLE, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_SCISSORTESTENABLE, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_CULLMODE, D3DCULL_NONE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState failed with %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_COLORWRITEENABLE, D3DCOLORWRITEENABLE_RED | D3DCOLORWRITEENABLE_GREEN | D3DCOLORWRITEENABLE_BLUE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState failed with %08x\n", hr); hr = IDirect3DDevice9_SetFVF(device, fvf); - ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF returned %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %08x\n", hr); if(hr == D3D_OK) { /* No lights are defined... That means, lit vertices should be entirely black */ hr = IDirect3DDevice9_SetRenderState(device, D3DRS_LIGHTING, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0 /* MinIndex */, 4 /* NumVerts */, 2 /*PrimCount */, Indices, D3DFMT_INDEX16, unlitquad, sizeof(unlitquad[0])); - ok(hr == D3D_OK, "IDirect3DDevice9_DrawIndexedPrimitiveUP failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_DrawIndexedPrimitiveUP failed with %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_LIGHTING, TRUE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0 /* MinIndex */, 4 /* NumVerts */, 2 /*PrimCount */, Indices, D3DFMT_INDEX16, litquad, sizeof(litquad[0])); - ok(hr == D3D_OK, "IDirect3DDevice9_DrawIndexedPrimitiveUP failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_DrawIndexedPrimitiveUP failed with %08x\n", hr); hr = IDirect3DDevice9_SetFVF(device, nfvf); - ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_LIGHTING, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0 /* MinIndex */, 4 /* NumVerts */, 2 /*PrimCount */, Indices, D3DFMT_INDEX16, unlitnquad, sizeof(unlitnquad[0])); - ok(hr == D3D_OK, "IDirect3DDevice9_DrawIndexedPrimitiveUP failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_DrawIndexedPrimitiveUP failed with %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_LIGHTING, TRUE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0 /* MinIndex */, 4 /* NumVerts */, 2 /*PrimCount */, Indices, D3DFMT_INDEX16, litnquad, sizeof(litnquad[0])); - ok(hr == D3D_OK, "IDirect3DDevice9_DrawIndexedPrimitiveUP failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_DrawIndexedPrimitiveUP failed with %08x\n", hr); IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %08x\n", hr); } IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); @@ -339,7 +338,7 @@ static void lighting_test(IDirect3DDevice9 *device) ok(color == 0x00000000, "Lit quad with normals has color %08x\n", color); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_LIGHTING, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); } static void clear_test(IDirect3DDevice9 *device) @@ -355,7 +354,7 @@ static void clear_test(IDirect3DDevice9 *device) BOOL invalid_clear_failed = FALSE; hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %08x\n", hr); /* Positive x, negative y */ rect[0].x1 = 0; @@ -372,7 +371,7 @@ static void clear_test(IDirect3DDevice9 *device) * returns D3D_OK, but ignores the rectangle silently */ hr = IDirect3DDevice9_Clear(device, 2, rect, D3DCLEAR_TARGET, 0xffff0000, 0.0, 0); - ok(hr == D3D_OK || hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_Clear failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK || hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_Clear failed with %08x\n", hr); if(hr == D3DERR_INVALIDCALL) invalid_clear_failed = TRUE; /* negative x, negative y */ @@ -381,7 +380,7 @@ static void clear_test(IDirect3DDevice9 *device) rect_negneg.x2 = 320; rect_negneg.y2 = 0; hr = IDirect3DDevice9_Clear(device, 1, &rect_negneg, D3DCLEAR_TARGET, 0xff00ff00, 0.0, 0); - ok(hr == D3D_OK || hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_Clear failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK || hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_Clear failed with %08x\n", hr); if(hr == D3DERR_INVALIDCALL) invalid_clear_failed = TRUE; IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); @@ -403,9 +402,9 @@ static void clear_test(IDirect3DDevice9 *device) /* Test how the viewport affects clears */ hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %08x\n", hr); hr = IDirect3DDevice9_GetViewport(device, &old_vp); - ok(hr == D3D_OK, "IDirect3DDevice9_GetViewport failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_GetViewport failed with %08x\n", hr); vp.X = 160; vp.Y = 120; @@ -414,9 +413,9 @@ static void clear_test(IDirect3DDevice9 *device) vp.MinZ = 0.0; vp.MaxZ = 1.0; hr = IDirect3DDevice9_SetViewport(device, &vp); - ok(hr == D3D_OK, "IDirect3DDevice9_SetViewport failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetViewport failed with %08x\n", hr); hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff0000ff, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %08x\n", hr); vp.X = 320; vp.Y = 240; @@ -425,16 +424,16 @@ static void clear_test(IDirect3DDevice9 *device) vp.MinZ = 0.0; vp.MaxZ = 1.0; hr = IDirect3DDevice9_SetViewport(device, &vp); - ok(hr == D3D_OK, "IDirect3DDevice9_SetViewport failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetViewport failed with %08x\n", hr); rect[0].x1 = 160; rect[0].y1 = 120; rect[0].x2 = 480; rect[0].y2 = 360; hr = IDirect3DDevice9_Clear(device, 1, &rect[0], D3DCLEAR_TARGET, 0xff00ff00, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %08x\n", hr); hr = IDirect3DDevice9_SetViewport(device, &old_vp); - ok(hr == D3D_OK, "IDirect3DDevice9_SetViewport failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetViewport failed with %08x\n", hr); IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); color = getPixelColor(device, 158, 118); @@ -465,24 +464,24 @@ static void clear_test(IDirect3DDevice9 *device) ok(color == 0x00ffffff, "(482,362) has color %08x\n", color); hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %08x\n", hr); scissor.left = 160; scissor.right = 480; scissor.top = 120; scissor.bottom = 360; hr = IDirect3DDevice9_SetScissorRect(device, &scissor); - ok(hr == D3D_OK, "IDirect3DDevice_SetScissorRect failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice_SetScissorRect failed with %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_SCISSORTESTENABLE, TRUE); - ok(hr == D3D_OK, "IDirect3DDevice_SetScissorRect failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice_SetScissorRect failed with %08x\n", hr); hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff00ff00, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %08x\n", hr); hr = IDirect3DDevice9_Clear(device, 1, &rect[1], D3DCLEAR_TARGET, 0xffff0000, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_SCISSORTESTENABLE, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice_SetScissorRect failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice_SetScissorRect failed with %08x\n", hr); IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); color = getPixelColor(device, 158, 118); @@ -531,15 +530,15 @@ static void clear_test(IDirect3DDevice9 *device) ok(color == 0x0000ff00, "Pixel 322/242 has color %08x\n", color); hr = IDirect3DDevice9_GetRenderState(device, D3DRS_COLORWRITEENABLE, &oldColorWrite); - ok(hr == D3D_OK, "IDirect3DDevice9_GetRenderState failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_GetRenderState failed with %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_COLORWRITEENABLE, D3DCOLORWRITEENABLE_RED); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState failed with %08x\n", hr); hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_COLORWRITEENABLE, oldColorWrite); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState failed with %08x\n", hr); IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); @@ -758,62 +757,62 @@ static void fog_test(IDirect3DDevice9 *device) memset(&caps, 0, sizeof(caps)); hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); - ok(hr == D3D_OK, "IDirect3DDevice9_GetDeviceCaps returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_GetDeviceCaps returned %08x\n", hr); hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffff00ff, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %08x\n", hr); /* Setup initial states: No lighting, fog on, fog color */ hr = IDirect3DDevice9_SetRenderState(device, D3DRS_LIGHTING, FALSE); - ok(hr == D3D_OK, "Turning off lighting returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Turning off lighting returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_FOGENABLE, TRUE); - ok(hr == D3D_OK, "Turning on fog calculations returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Turning on fog calculations returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_FOGCOLOR, 0xFF00FF00 /* A nice green */); - ok(hr == D3D_OK, "Turning on fog calculations returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Turning on fog calculations returned %08x\n", hr); /* First test: Both table fog and vertex fog off */ hr = IDirect3DDevice9_SetRenderState(device, D3DRS_FOGTABLEMODE, D3DFOG_NONE); - ok(hr == D3D_OK, "Turning off table fog returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Turning off table fog returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_FOGVERTEXMODE, D3DFOG_NONE); - ok(hr == D3D_OK, "Turning off table fog returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Turning off table fog returned %08x\n", hr); /* Start = 0, end = 1. Should be default, but set them */ hr = IDirect3DDevice9_SetRenderState(device, D3DRS_FOGSTART, *((DWORD *) &start)); - ok(hr == D3D_OK, "Setting fog start returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Setting fog start returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_FOGEND, *((DWORD *) &end)); - ok(hr == D3D_OK, "Setting fog start returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Setting fog start returned %08x\n", hr); if(IDirect3DDevice9_BeginScene(device) == D3D_OK) { hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_SPECULAR); - ok( hr == D3D_OK, "SetFVF returned %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "SetFVF returned %08x\n", hr); /* Untransformed, vertex fog = NONE, table fog = NONE: Read the fog weighting from the specular color */ hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0 /* MinIndex */, 4 /* NumVerts */, 2 /*PrimCount */, Indices, D3DFMT_INDEX16, unstransformed_1, sizeof(unstransformed_1[0])); - ok(hr == D3D_OK, "DrawIndexedPrimitiveUP returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "DrawIndexedPrimitiveUP returned %08x\n", hr); /* That makes it use the Z value */ hr = IDirect3DDevice9_SetRenderState(device, D3DRS_FOGVERTEXMODE, D3DFOG_LINEAR); - ok(hr == D3D_OK, "Turning off table fog returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Turning off table fog returned %08x\n", hr); /* Untransformed, vertex fog != none (or table fog != none): * Use the Z value as input into the equation */ hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0 /* MinIndex */, 4 /* NumVerts */, 2 /*PrimCount */, Indices, D3DFMT_INDEX16, unstransformed_2, sizeof(unstransformed_1[0])); - ok(hr == D3D_OK, "DrawIndexedPrimitiveUP returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "DrawIndexedPrimitiveUP returned %08x\n", hr); /* transformed verts */ hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_SPECULAR); - ok( hr == D3D_OK, "SetFVF returned %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "SetFVF returned %08x\n", hr); /* Transformed, vertex fog != NONE, pixel fog == NONE: Use specular color alpha component */ hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0 /* MinIndex */, 4 /* NumVerts */, 2 /*PrimCount */, Indices, D3DFMT_INDEX16, transformed_1, sizeof(transformed_1[0])); - ok(hr == D3D_OK, "DrawIndexedPrimitiveUP returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "DrawIndexedPrimitiveUP returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_FOGTABLEMODE, D3DFOG_LINEAR); - ok( hr == D3D_OK, "Setting fog table mode to D3DFOG_LINEAR returned %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "Setting fog table mode to D3DFOG_LINEAR returned %08x\n", hr); /* Transformed, table fog != none, vertex anything: Use Z value as input to the fog * equation */ @@ -822,7 +821,7 @@ static void fog_test(IDirect3DDevice9 *device) sizeof(transformed_2[0])); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "EndScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "EndScene returned %08x\n", hr); } else { @@ -853,23 +852,23 @@ static void fog_test(IDirect3DDevice9 *device) /* Now test the special case fogstart == fogend */ hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff0000ff, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %08x\n", hr); if(IDirect3DDevice9_BeginScene(device) == D3D_OK) { start = 512; end = 512; hr = IDirect3DDevice9_SetRenderState(device, D3DRS_FOGSTART, *((DWORD *) &start)); - ok(hr == D3D_OK, "Setting fog start returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Setting fog start returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_FOGEND, *((DWORD *) &end)); - ok(hr == D3D_OK, "Setting fog start returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Setting fog start returned %08x\n", hr); hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_SPECULAR); - ok( hr == D3D_OK, "SetFVF returned %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "SetFVF returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_FOGVERTEXMODE, D3DFOG_LINEAR); - ok( hr == D3D_OK, "IDirect3DDevice9_SetRenderState %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_SetRenderState %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_FOGTABLEMODE, D3DFOG_NONE); - ok( hr == D3D_OK, "Setting fog table mode to D3DFOG_LINEAR returned %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "Setting fog table mode to D3DFOG_LINEAR returned %08x\n", hr); /* Untransformed vertex, z coord = 0.1, fogstart = 512, fogend = 512. Would result in * a completely fog-free primitive because start > zcoord, but because start == end, the primitive @@ -880,22 +879,22 @@ static void fog_test(IDirect3DDevice9 *device) hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0 /* MinIndex */, 4 /* NumVerts */, 2 /*PrimCount */, Indices, D3DFMT_INDEX16, unstransformed_1, sizeof(unstransformed_1[0])); - ok(hr == D3D_OK, "DrawIndexedPrimitiveUP returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "DrawIndexedPrimitiveUP returned %08x\n", hr); hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0 /* MinIndex */, 4 /* NumVerts */, 2 /*PrimCount */, Indices, D3DFMT_INDEX16, unstransformed_2, sizeof(unstransformed_1[0])); - ok(hr == D3D_OK, "DrawIndexedPrimitiveUP returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "DrawIndexedPrimitiveUP returned %08x\n", hr); hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_SPECULAR); - ok( hr == D3D_OK, "SetFVF returned %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "SetFVF returned %08x\n", hr); /* Transformed, vertex fog != NONE, pixel fog == NONE: Use specular color alpha component */ hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0 /* MinIndex */, 4 /* NumVerts */, 2 /*PrimCount */, Indices, D3DFMT_INDEX16, transformed_1, sizeof(transformed_1[0])); - ok(hr == D3D_OK, "DrawIndexedPrimitiveUP returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "DrawIndexedPrimitiveUP returned %08x\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "EndScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "EndScene returned %08x\n", hr); } else { @@ -915,11 +914,11 @@ static void fog_test(IDirect3DDevice9 *device) end = 0.2; start = 0.8; hr = IDirect3DDevice9_SetRenderState(device, D3DRS_FOGSTART, *((DWORD *) &start)); - ok(hr == D3D_OK, "Setting fog start returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Setting fog start returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_FOGEND, *((DWORD *) &end)); - ok(hr == D3D_OK, "Setting fog end returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Setting fog end returned %08x\n", hr); hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_DIFFUSE); - ok( hr == D3D_OK, "IDirect3DDevice9_SetFVF returned %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_SetFVF returned %08x\n", hr); /* Test reversed fog without shaders. ATI cards have problems with reversed fog and shaders, so * it doesn't seem very important for games. ATI cards also have problems with reversed table fog, @@ -928,13 +927,13 @@ static void fog_test(IDirect3DDevice9 *device) for(i = 0; i < 1 /*2 - Table fog test disabled, fails on ATI */; i++) { const char *mode = (i ? "table" : "vertex"); hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffff0000, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_FOGVERTEXMODE, i == 0 ? D3DFOG_LINEAR : D3DFOG_NONE); - ok( hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_FOGTABLEMODE, i == 0 ? D3DFOG_NONE : D3DFOG_LINEAR); - ok( hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok( hr == D3D_OK, "IDirect3DDDevice9_BeginScene returned %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDDevice9_BeginScene returned %08x\n", hr); if(SUCCEEDED(hr)) { WORD Indices2[] = { 0, 1, 2, 2, 3, 0, 4, 5, 6, 6, 7, 4, @@ -946,7 +945,7 @@ static void fog_test(IDirect3DDevice9 *device) sizeof(rev_fog_quads[0])); hr = IDirect3DDevice9_EndScene(device); - ok( hr == D3D_OK, "IDirect3DDDevice9_EndScene returned %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDDevice9_EndScene returned %08x\n", hr); } IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); color = getPixelColor(device, 160, 360); @@ -976,17 +975,17 @@ static void fog_test(IDirect3DDevice9 *device) } /* Turn off the fog master switch to avoid confusing other tests */ hr = IDirect3DDevice9_SetRenderState(device, D3DRS_FOGENABLE, FALSE); - ok(hr == D3D_OK, "Turning off fog calculations returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Turning off fog calculations returned %08x\n", hr); start = 0.0; end = 1.0; hr = IDirect3DDevice9_SetRenderState(device, D3DRS_FOGSTART, *((DWORD *) &start)); - ok(hr == D3D_OK, "Setting fog start returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Setting fog start returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_FOGEND, *((DWORD *) &end)); - ok(hr == D3D_OK, "Setting fog end returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Setting fog end returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_FOGVERTEXMODE, D3DFOG_LINEAR); - ok( hr == D3D_OK, "IDirect3DDevice9_SetRenderState %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_SetRenderState %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_FOGTABLEMODE, D3DFOG_LINEAR); - ok( hr == D3D_OK, "Setting fog table mode to D3DFOG_LINEAR returned %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "Setting fog table mode to D3DFOG_LINEAR returned %08x\n", hr); } /* This test verifies the behaviour of cube maps wrt. texture wrapping. @@ -1083,7 +1082,7 @@ static void test_cube_wrap(IDirect3DDevice9 *device) ok(SUCCEEDED(hr), "SetSamplerState D3DSAMP_BORDERCOLOR failed (0x%08x)\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_LIGHTING, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); for (x = 0; x < (sizeof(address_modes) / sizeof(*address_modes)); ++x) { @@ -1143,14 +1142,14 @@ static void offscreen_test(IDirect3DDevice9 *device) }; hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffff0000, 0.0, 0); - ok(hr == D3D_OK, "Clear failed, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Clear failed, hr = %08x\n", hr); hr = IDirect3DDevice9_CreateTexture(device, 128, 128, 1, D3DUSAGE_RENDERTARGET, D3DFMT_X8R8G8B8, D3DPOOL_DEFAULT, &offscreenTexture, NULL); - ok(hr == D3D_OK || hr == 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 = %08x\n", hr); if(!offscreenTexture) { 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); - ok(hr == D3D_OK || hr == 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 = %08x\n", hr); if(!offscreenTexture) { skip("Cannot create an offscreen render target\n"); goto out; @@ -1158,49 +1157,49 @@ static void offscreen_test(IDirect3DDevice9 *device) } 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 = %08x\n", hr); if(!backbuffer) { goto out; } hr = IDirect3DTexture9_GetSurfaceLevel(offscreenTexture, 0, &offscreen); - ok(hr == D3D_OK, "Can't get offscreen surface, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Can't get offscreen surface, hr = %08x\n", hr); if(!offscreen) { goto out; } hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_TEX1); - ok(hr == D3D_OK, "SetFVF failed, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "SetFVF failed, hr = %08x\n", hr); hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1); - ok(hr == D3D_OK, "SetTextureStageState failed, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "SetTextureStageState failed, hr = %08x\n", hr); hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_COLORARG1, D3DTA_TEXTURE); - ok(hr == D3D_OK, "SetTextureStageState failed, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "SetTextureStageState failed, hr = %08x\n", hr); hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_MINFILTER, D3DTEXF_POINT); ok(SUCCEEDED(hr), "SetSamplerState D3DSAMP_MINFILTER failed (0x%08x)\n", hr); hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_MAGFILTER, D3DTEXF_POINT); ok(SUCCEEDED(hr), "SetSamplerState D3DSAMP_MAGFILTER failed (0x%08x)\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_LIGHTING, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); if(IDirect3DDevice9_BeginScene(device) == D3D_OK) { hr = IDirect3DDevice9_SetRenderTarget(device, 0, offscreen); - ok(hr == D3D_OK, "SetRenderTarget failed, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "SetRenderTarget failed, hr = %08x\n", hr); hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffff00ff, 0.0, 0); - ok(hr == D3D_OK, "Clear failed, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Clear failed, hr = %08x\n", hr); /* Draw without textures - Should result in a white quad */ hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(quad[0])); - ok(hr == D3D_OK, "DrawPrimitiveUP failed, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "DrawPrimitiveUP failed, hr = %08x\n", hr); hr = IDirect3DDevice9_SetRenderTarget(device, 0, backbuffer); - ok(hr == D3D_OK, "SetRenderTarget failed, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "SetRenderTarget failed, hr = %08x\n", hr); hr = IDirect3DDevice9_SetTexture(device, 0, (IDirect3DBaseTexture9 *) offscreenTexture); - ok(hr == D3D_OK, "SetTexture failed, %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "SetTexture failed, %08x\n", hr); /* This time with the texture */ hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(quad[0])); - ok(hr == D3D_OK, "DrawPrimitiveUP failed, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "DrawPrimitiveUP failed, hr = %08x\n", hr); IDirect3DDevice9_EndScene(device); } @@ -1877,46 +1876,46 @@ static void z_range_test(IDirect3DDevice9 *device) * by the depth value. */ hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xffffffff, 0.75, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %08x\n", hr); hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 0.4, 0); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_CLIPPING, TRUE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZENABLE, D3DZB_TRUE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZWRITEENABLE, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZFUNC, D3DCMP_GREATER); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_DIFFUSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF returned %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %08x\n", hr); if(hr == D3D_OK) { /* Test the untransformed vertex path */ hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2 /*PrimCount */, quad, sizeof(quad[0])); - ok(hr == D3D_OK, "IDirect3DDevice9_DrawIndexedPrimitiveUP failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_DrawIndexedPrimitiveUP failed with %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZFUNC, D3DCMP_LESS); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2 /*PrimCount */, quad2, sizeof(quad2[0])); - ok(hr == D3D_OK, "IDirect3DDevice9_DrawIndexedPrimitiveUP failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_DrawIndexedPrimitiveUP failed with %08x\n", hr); /* Test the transformed vertex path */ hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZRHW | D3DFVF_DIFFUSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2 /*PrimCount */, quad4, sizeof(quad4[0])); - ok(hr == D3D_OK, "IDirect3DDevice9_DrawIndexedPrimitiveUP failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_DrawIndexedPrimitiveUP failed with %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZFUNC, D3DCMP_GREATER); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2 /*PrimCount */, quad3, sizeof(quad3[0])); - ok(hr == D3D_OK, "IDirect3DDevice9_DrawIndexedPrimitiveUP failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_DrawIndexedPrimitiveUP failed with %08x\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %08x\n", hr); } hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); @@ -1963,40 +1962,40 @@ static void z_range_test(IDirect3DDevice9 *device) goto out; } hr = IDirect3DDevice9_CreateVertexShader(device, shader_code, &shader); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %08x\n", hr); hr = IDirect3DDevice9_CreateVertexDeclaration(device, decl_elements, &decl); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexDeclaration returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexDeclaration returned %08x\n", hr); hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 0.4, 0); IDirect3DDevice9_SetVertexDeclaration(device, decl); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration returned %08x\n", hr); IDirect3DDevice9_SetVertexShader(device, shader); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %08x\n", hr); if(hr == D3D_OK) { float colorf[] = {1.0, 0.0, 0.0, 1.0}; float colorf2[] = {0.0, 0.0, 1.0, 1.0}; IDirect3DDevice9_SetVertexShaderConstantF(device, 0, colorf, 1); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2 /*PrimCount */, quad, sizeof(quad[0])); - ok(hr == D3D_OK, "IDirect3DDevice9_DrawIndexedPrimitiveUP failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_DrawIndexedPrimitiveUP failed with %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZFUNC, D3DCMP_LESS); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); IDirect3DDevice9_SetVertexShaderConstantF(device, 0, colorf2, 1); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2 /*PrimCount */, quad2, sizeof(quad2[0])); - ok(hr == D3D_OK, "IDirect3DDevice9_DrawIndexedPrimitiveUP failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_DrawIndexedPrimitiveUP failed with %08x\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %08x\n", hr); } IDirect3DDevice9_SetVertexDeclaration(device, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration returned %08x\n", hr); IDirect3DDevice9_SetVertexShader(device, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %08x\n", hr); IDirect3DVertexDeclaration9_Release(decl); IDirect3DVertexShader9_Release(shader); @@ -2025,11 +2024,11 @@ static void z_range_test(IDirect3DDevice9 *device) out: hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZENABLE, D3DZB_FALSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_CLIPPING, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZWRITEENABLE, TRUE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); } static void fill_surface(IDirect3DSurface9 *surface, DWORD color) @@ -2043,9 +2042,9 @@ static void fill_surface(IDirect3DSurface9 *surface, DWORD color) memset(&desc, 0, sizeof(desc)); memset(&l, 0, sizeof(l)); hr = IDirect3DSurface9_GetDesc(surface, &desc); - ok(hr == D3D_OK, "IDirect3DSurface9_GetDesc failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DSurface9_GetDesc failed with %08x\n", hr); hr = IDirect3DSurface9_LockRect(surface, &l, NULL, 0); - ok(hr == D3D_OK, "IDirect3DSurface9_LockRect failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DSurface9_LockRect failed with %08x\n", hr); if(FAILED(hr)) return; for(y = 0; y < desc.Height; y++) @@ -2057,7 +2056,7 @@ static void fill_surface(IDirect3DSurface9 *surface, DWORD color) } } hr = IDirect3DSurface9_UnlockRect(surface); - ok(hr == D3D_OK, "IDirect3DSurface9_UnlockRect failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DSurface9_UnlockRect failed with %08x\n", hr); } /* This tests a variety of possible StretchRect() situations */ @@ -2075,71 +2074,71 @@ static void stretchrect_test(IDirect3DDevice9 *device) DWORD color; hr = IDirect3DDevice9_GetRenderTarget(device, 0, &orig_rt); - ok(hr == D3D_OK, "Can't get render target, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Can't get render target, hr = %08x\n", hr); if(!orig_rt) { goto out; } /* Create our temporary surfaces in system memory */ hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 32, 32, D3DFMT_A8R8G8B8, D3DPOOL_SYSTEMMEM, &surf_temp32, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateOffscreenPlainSurface failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateOffscreenPlainSurface failed with %08x\n", hr); hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 64, 64, D3DFMT_A8R8G8B8, D3DPOOL_SYSTEMMEM, &surf_temp64, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateOffscreenPlainSurface failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateOffscreenPlainSurface failed with %08x\n", hr); /* Create offscreen plain surfaces in D3DPOOL_DEFAULT */ hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 32, 32, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &surf_offscreen32, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateOffscreenPlainSurface failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateOffscreenPlainSurface failed with %08x\n", hr); hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 64, 64, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &surf_offscreen64, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateOffscreenPlainSurface failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateOffscreenPlainSurface failed with %08x\n", hr); hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 64, 64, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &surf_offscreen_dest64, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateOffscreenPlainSurface failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateOffscreenPlainSurface failed with %08x\n", hr); /* Create render target surfaces */ hr = IDirect3DDevice9_CreateRenderTarget(device, 32, 32, D3DFMT_A8R8G8B8, D3DMULTISAMPLE_NONE, 0, TRUE, &surf_rt32, NULL ); - ok(hr == D3D_OK, "Creating the render target surface failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Creating the render target surface failed with %08x\n", hr); hr = IDirect3DDevice9_CreateRenderTarget(device, 64, 64, D3DFMT_A8R8G8B8, D3DMULTISAMPLE_NONE, 0, TRUE, &surf_rt64, NULL ); - ok(hr == D3D_OK, "Creating the render target surface failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Creating the render target surface failed with %08x\n", hr); hr = IDirect3DDevice9_CreateRenderTarget(device, 64, 64, D3DFMT_A8R8G8B8, D3DMULTISAMPLE_NONE, 0, TRUE, &surf_rt_dest64, NULL ); - ok(hr == D3D_OK, "Creating the render target surface failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Creating the render target surface failed with %08x\n", hr); /* Create render target textures */ hr = IDirect3DDevice9_CreateTexture(device, 32, 32, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &tex_rt32, NULL); - ok(hr == D3D_OK, "Creating the render target texture failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Creating the render target texture failed with %08x\n", hr); hr = IDirect3DDevice9_CreateTexture(device, 64, 64, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &tex_rt64, NULL); - ok(hr == D3D_OK, "Creating the render target texture failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Creating the render target texture failed with %08x\n", hr); hr = IDirect3DDevice9_CreateTexture(device, 64, 64, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &tex_rt_dest64, NULL); - ok(hr == D3D_OK, "Creating the render target texture failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Creating the render target texture failed with %08x\n", hr); if (tex_rt32) { hr = IDirect3DTexture9_GetSurfaceLevel(tex_rt32, 0, &surf_tex_rt32); - ok(hr == D3D_OK, "IDirect3DTexture9_GetSurfaceLevel failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DTexture9_GetSurfaceLevel failed with %08x\n", hr); } if (tex_rt64) { hr = IDirect3DTexture9_GetSurfaceLevel(tex_rt64, 0, &surf_tex_rt64); - ok(hr == D3D_OK, "IDirect3DTexture9_GetSurfaceLevel failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DTexture9_GetSurfaceLevel failed with %08x\n", hr); } if (tex_rt_dest64) { hr = IDirect3DTexture9_GetSurfaceLevel(tex_rt_dest64, 0, &surf_tex_rt_dest64); - ok(hr == D3D_OK, "IDirect3DTexture9_GetSurfaceLevel failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DTexture9_GetSurfaceLevel failed with %08x\n", hr); } /* Create regular textures in D3DPOOL_DEFAULT */ hr = IDirect3DDevice9_CreateTexture(device, 32, 32, 1, 0, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &tex32, NULL); - ok(hr == D3D_OK, "Creating the regular texture failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Creating the regular texture failed with %08x\n", hr); hr = IDirect3DDevice9_CreateTexture(device, 64, 64, 1, 0, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &tex64, NULL); - ok(hr == D3D_OK, "Creating the regular texture failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Creating the regular texture failed with %08x\n", hr); hr = IDirect3DDevice9_CreateTexture(device, 64, 64, 1, 0, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &tex_dest64, NULL); - ok(hr == D3D_OK, "Creating the regular texture failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Creating the regular texture failed with %08x\n", hr); if (tex32) { hr = IDirect3DTexture9_GetSurfaceLevel(tex32, 0, &surf_tex32); - ok(hr == D3D_OK, "IDirect3DTexture9_GetSurfaceLevel failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DTexture9_GetSurfaceLevel failed with %08x\n", hr); } if (tex64) { hr = IDirect3DTexture9_GetSurfaceLevel(tex64, 0, &surf_tex64); - ok(hr == D3D_OK, "IDirect3DTexture9_GetSurfaceLevel failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DTexture9_GetSurfaceLevel failed with %08x\n", hr); } if (tex_dest64) { hr = IDirect3DTexture9_GetSurfaceLevel(tex_dest64, 0, &surf_tex_dest64); - ok(hr == D3D_OK, "IDirect3DTexture9_GetSurfaceLevel failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DTexture9_GetSurfaceLevel failed with %08x\n", hr); } /********************************************************************* @@ -2153,7 +2152,7 @@ static void stretchrect_test(IDirect3DDevice9 *device) /* offscreenplain ==> offscreenplain, same size */ if(surf_offscreen64 && surf_offscreen_dest64) { hr = IDirect3DDevice9_StretchRect(device, surf_offscreen64, NULL, surf_offscreen_dest64, NULL, 0); - ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %08x\n", hr); if (hr == D3D_OK) { color = getPixelColorFromSurface(surf_offscreen_dest64, 32, 32); @@ -2164,12 +2163,12 @@ static void stretchrect_test(IDirect3DDevice9 *device) /* offscreenplain ==> rendertarget texture, same size */ if(surf_offscreen64 && surf_tex_rt_dest64 && surf_temp64) { hr = IDirect3DDevice9_StretchRect(device, surf_offscreen64, NULL, surf_tex_rt_dest64, NULL, 0); - ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %08x\n", hr); /* We can't lock rendertarget textures, so copy to our temp surface first */ if (hr == D3D_OK) { hr = IDirect3DDevice9_GetRenderTargetData(device, surf_tex_rt_dest64, surf_temp64); - ok( hr == D3D_OK, "IDirect3DDevice9_GetRenderTargetData failed with %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_GetRenderTargetData failed with %08x\n", hr); } if (hr == D3D_OK) { @@ -2181,7 +2180,7 @@ static void stretchrect_test(IDirect3DDevice9 *device) /* offscreenplain ==> rendertarget surface, same size */ if(surf_offscreen64 && surf_rt_dest64) { hr = IDirect3DDevice9_StretchRect(device, surf_offscreen64, NULL, surf_rt_dest64, NULL, 0); - ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %08x\n", hr); if (hr == D3D_OK) { color = getPixelColorFromSurface(surf_rt_dest64, 32, 32); @@ -2207,12 +2206,12 @@ static void stretchrect_test(IDirect3DDevice9 *device) /* offscreenplain ==> rendertarget texture, scaling */ if(surf_offscreen32 && surf_tex_rt_dest64 && surf_temp64) { hr = IDirect3DDevice9_StretchRect(device, surf_offscreen32, NULL, surf_tex_rt_dest64, NULL, 0); - ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %08x\n", hr); /* We can't lock rendertarget textures, so copy to our temp surface first */ if (hr == D3D_OK) { hr = IDirect3DDevice9_GetRenderTargetData(device, surf_tex_rt_dest64, surf_temp64); - ok( hr == D3D_OK, "IDirect3DDevice9_GetRenderTargetData failed with %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_GetRenderTargetData failed with %08x\n", hr); } if (hr == D3D_OK) { @@ -2224,7 +2223,7 @@ static void stretchrect_test(IDirect3DDevice9 *device) /* offscreenplain ==> rendertarget surface, scaling */ if(surf_offscreen32 && surf_rt_dest64) { hr = IDirect3DDevice9_StretchRect(device, surf_offscreen32, NULL, surf_rt_dest64, NULL, 0); - ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %08x\n", hr); color = getPixelColorFromSurface(surf_rt_dest64, 48, 48); ok(color == 0xffff0000, "StretchRect offscreen ==> rendertarget surface scaling failed: Got color 0x%08x, expected 0xffff0000.\n", color); @@ -2245,7 +2244,7 @@ static void stretchrect_test(IDirect3DDevice9 *device) /* Can't fill the surf_tex directly because it's created in D3DPOOL_DEFAULT */ fill_surface(surf_temp64, 0xff0000ff); hr = IDirect3DDevice9_UpdateSurface(device, surf_temp64, NULL, surf_tex64, NULL); - ok( hr == D3D_OK, "IDirect3DDevice9_UpdateSurface failed with %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_UpdateSurface failed with %08x\n", hr); } /* texture ==> offscreenplain, same size */ @@ -2257,12 +2256,12 @@ static void stretchrect_test(IDirect3DDevice9 *device) /* texture ==> rendertarget texture, same size */ if(surf_tex64 && surf_tex_rt_dest64 && surf_temp64) { hr = IDirect3DDevice9_StretchRect(device, surf_tex64, NULL, surf_tex_rt_dest64, NULL, 0); - ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %08x\n", hr); /* We can't lock rendertarget textures, so copy to our temp surface first */ if (hr == D3D_OK) { hr = IDirect3DDevice9_GetRenderTargetData(device, surf_tex_rt_dest64, surf_temp64); - ok( hr == D3D_OK, "IDirect3DDevice9_GetRenderTargetData failed with %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_GetRenderTargetData failed with %08x\n", hr); } if (hr == D3D_OK) { @@ -2274,7 +2273,7 @@ static void stretchrect_test(IDirect3DDevice9 *device) /* texture ==> rendertarget surface, same size */ if(surf_tex64 && surf_rt_dest64) { hr = IDirect3DDevice9_StretchRect(device, surf_tex64, NULL, surf_rt_dest64, NULL, 0); - ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %08x\n", hr); if (hr == D3D_OK) { color = getPixelColorFromSurface(surf_rt_dest64, 32, 32); @@ -2293,7 +2292,7 @@ static void stretchrect_test(IDirect3DDevice9 *device) /* Can't fill the surf_tex directly because it's created in D3DPOOL_DEFAULT */ fill_surface(surf_temp32, 0xffff0000); hr = IDirect3DDevice9_UpdateSurface(device, surf_temp32, NULL, surf_tex32, NULL); - ok( hr == D3D_OK, "IDirect3DDevice9_UpdateSurface failed with %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_UpdateSurface failed with %08x\n", hr); } /* texture ==> offscreenplain, scaling (should fail) */ @@ -2305,12 +2304,12 @@ static void stretchrect_test(IDirect3DDevice9 *device) /* texture ==> rendertarget texture, scaling */ if(surf_tex32 && surf_tex_rt_dest64 && surf_temp64) { hr = IDirect3DDevice9_StretchRect(device, surf_tex32, NULL, surf_tex_rt_dest64, NULL, 0); - ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %08x\n", hr); /* We can't lock rendertarget textures, so copy to our temp surface first */ if (hr == D3D_OK) { hr = IDirect3DDevice9_GetRenderTargetData(device, surf_tex_rt_dest64, surf_temp64); - ok( hr == D3D_OK, "IDirect3DDevice9_GetRenderTargetData failed with %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_GetRenderTargetData failed with %08x\n", hr); } if (hr == D3D_OK) { @@ -2322,7 +2321,7 @@ static void stretchrect_test(IDirect3DDevice9 *device) /* texture ==> rendertarget surface, scaling */ if(surf_tex32 && surf_rt_dest64) { hr = IDirect3DDevice9_StretchRect(device, surf_tex32, NULL, surf_rt_dest64, NULL, 0); - ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %08x\n", hr); color = getPixelColorFromSurface(surf_rt_dest64, 48, 48); ok(color == 0xffff0000, "StretchRect texture ==> rendertarget surface scaling failed: Got color 0x%08x, expected 0xffff0000.\n", color); @@ -2343,7 +2342,7 @@ static void stretchrect_test(IDirect3DDevice9 *device) /* Can't fill the surf_tex_rt directly because it's created in D3DPOOL_DEFAULT */ fill_surface(surf_temp64, 0xffffffff); hr = IDirect3DDevice9_UpdateSurface(device, surf_temp64, NULL, surf_tex_rt64, NULL); - ok( hr == D3D_OK, "IDirect3DDevice9_UpdateSurface failed with %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_UpdateSurface failed with %08x\n", hr); } /* rendertarget texture ==> offscreenplain, same size */ @@ -2355,12 +2354,12 @@ static void stretchrect_test(IDirect3DDevice9 *device) /* rendertarget texture ==> rendertarget texture, same size */ if(surf_tex_rt64 && surf_tex_rt_dest64 && surf_temp64) { hr = IDirect3DDevice9_StretchRect(device, surf_tex_rt64, NULL, surf_tex_rt_dest64, NULL, 0); - ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %08x\n", hr); /* We can't lock rendertarget textures, so copy to our temp surface first */ if (hr == D3D_OK) { hr = IDirect3DDevice9_GetRenderTargetData(device, surf_tex_rt_dest64, surf_temp64); - ok( hr == D3D_OK, "IDirect3DDevice9_GetRenderTargetData failed with %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_GetRenderTargetData failed with %08x\n", hr); } if (hr == D3D_OK) { @@ -2372,7 +2371,7 @@ static void stretchrect_test(IDirect3DDevice9 *device) /* rendertarget texture ==> rendertarget surface, same size */ if(surf_tex_rt64 && surf_rt_dest64) { hr = IDirect3DDevice9_StretchRect(device, surf_tex_rt64, NULL, surf_rt_dest64, NULL, 0); - ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %08x\n", hr); if (hr == D3D_OK) { color = getPixelColorFromSurface(surf_rt_dest64, 32, 32); @@ -2391,7 +2390,7 @@ static void stretchrect_test(IDirect3DDevice9 *device) /* Can't fill the surf_tex_rt directly because it's created in D3DPOOL_DEFAULT */ fill_surface(surf_temp32, 0xffff0000); hr = IDirect3DDevice9_UpdateSurface(device, surf_temp32, NULL, surf_tex_rt32, NULL); - ok( hr == D3D_OK, "IDirect3DDevice9_UpdateSurface failed with %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_UpdateSurface failed with %08x\n", hr); } /* rendertarget texture ==> offscreenplain, scaling (should fail) */ @@ -2403,12 +2402,12 @@ static void stretchrect_test(IDirect3DDevice9 *device) /* rendertarget texture ==> rendertarget texture, scaling */ if(surf_tex_rt32 && surf_tex_rt_dest64 && surf_temp64) { hr = IDirect3DDevice9_StretchRect(device, surf_tex_rt32, NULL, surf_tex_rt_dest64, NULL, 0); - ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %08x\n", hr); /* We can't lock rendertarget textures, so copy to our temp surface first */ if (hr == D3D_OK) { hr = IDirect3DDevice9_GetRenderTargetData(device, surf_tex_rt_dest64, surf_temp64); - ok( hr == D3D_OK, "IDirect3DDevice9_GetRenderTargetData failed with %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_GetRenderTargetData failed with %08x\n", hr); } if (hr == D3D_OK) { @@ -2420,7 +2419,7 @@ static void stretchrect_test(IDirect3DDevice9 *device) /* rendertarget texture ==> rendertarget surface, scaling */ if(surf_tex_rt32 && surf_rt_dest64) { hr = IDirect3DDevice9_StretchRect(device, surf_tex_rt32, NULL, surf_rt_dest64, NULL, 0); - ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %08x\n", hr); color = getPixelColorFromSurface(surf_rt_dest64, 48, 48); ok(color == 0xffff0000, "StretchRect rendertarget texture ==> rendertarget surface scaling failed: Got color 0x%08x, expected 0xffff0000.\n", color); @@ -2449,12 +2448,12 @@ static void stretchrect_test(IDirect3DDevice9 *device) /* rendertarget surface ==> rendertarget texture, same size */ if(surf_rt64 && surf_tex_rt_dest64 && surf_temp64) { hr = IDirect3DDevice9_StretchRect(device, surf_rt64, NULL, surf_tex_rt_dest64, NULL, 0); - ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %08x\n", hr); /* We can't lock rendertarget textures, so copy to our temp surface first */ if (hr == D3D_OK) { hr = IDirect3DDevice9_GetRenderTargetData(device, surf_tex_rt_dest64, surf_temp64); - ok( hr == D3D_OK, "IDirect3DDevice9_GetRenderTargetData failed with %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_GetRenderTargetData failed with %08x\n", hr); } if (hr == D3D_OK) { @@ -2466,7 +2465,7 @@ static void stretchrect_test(IDirect3DDevice9 *device) /* rendertarget surface ==> rendertarget surface, same size */ if(surf_rt64 && surf_rt_dest64) { hr = IDirect3DDevice9_StretchRect(device, surf_rt64, NULL, surf_rt_dest64, NULL, 0); - ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %08x\n", hr); if (hr == D3D_OK) { color = getPixelColorFromSurface(surf_rt_dest64, 32, 32); @@ -2493,12 +2492,12 @@ static void stretchrect_test(IDirect3DDevice9 *device) /* rendertarget surface ==> rendertarget texture, scaling */ if(surf_rt32 && surf_tex_rt_dest64 && surf_temp64) { hr = IDirect3DDevice9_StretchRect(device, surf_rt32, NULL, surf_tex_rt_dest64, NULL, 0); - ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %08x\n", hr); /* We can't lock rendertarget textures, so copy to our temp surface first */ if (hr == D3D_OK) { hr = IDirect3DDevice9_GetRenderTargetData(device, surf_tex_rt_dest64, surf_temp64); - ok( hr == D3D_OK, "IDirect3DDevice9_GetRenderTargetData failed with %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_GetRenderTargetData failed with %08x\n", hr); } if (hr == D3D_OK) { @@ -2510,7 +2509,7 @@ static void stretchrect_test(IDirect3DDevice9 *device) /* rendertarget surface ==> rendertarget surface, scaling */ if(surf_rt32 && surf_rt_dest64) { hr = IDirect3DDevice9_StretchRect(device, surf_rt32, NULL, surf_rt_dest64, NULL, 0); - ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %s\n", DXGetErrorString9(hr)); + ok( hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %08x\n", hr); color = getPixelColorFromSurface(surf_rt_dest64, 48, 48); ok(color == 0xffff0000, "StretchRect rendertarget surface ==> rendertarget surface scaling failed: Got color 0x%08x, expected 0xffff0000.\n", color); @@ -2578,7 +2577,7 @@ out: if (orig_rt) { hr = IDirect3DDevice9_SetRenderTarget(device, 0, orig_rt); - ok(hr == D3D_OK, "IDirect3DSetRenderTarget failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DSetRenderTarget failed with %08x\n", hr); IDirect3DSurface9_Release(orig_rt); } } @@ -2612,11 +2611,11 @@ static void maxmip_test(IDirect3DDevice9 *device) }; hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xffffffff, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %08x\n", hr); hr = IDirect3DDevice9_CreateTexture(device, 128, 128, 3, 0, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, &texture, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateTexture failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateTexture failed with %08x\n", hr); if(!texture) { skip("Failed to create test texture\n"); @@ -2634,33 +2633,33 @@ static void maxmip_test(IDirect3DDevice9 *device) IDirect3DSurface9_Release(surface); hr = IDirect3DDevice9_SetTexture(device, 0, (IDirect3DBaseTexture9 *) texture); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed with %08x\n", hr); hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_TEX1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %08x\n", hr); hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_MIPFILTER, D3DTEXF_NONE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed with %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_MAXMIPLEVEL, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed with %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, &quads[ 0], 5 * sizeof(float)); ok(SUCCEEDED(hr), "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_MAXMIPLEVEL, 1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed with %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, &quads[20], 5 * sizeof(float)); ok(SUCCEEDED(hr), "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_MAXMIPLEVEL, 2); - ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed with %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, &quads[40], 5 * sizeof(float)); ok(SUCCEEDED(hr), "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_MAXMIPLEVEL, 3); - ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed with %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, &quads[60], 5 * sizeof(float)); ok(SUCCEEDED(hr), "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_EndScene(device); @@ -2679,40 +2678,40 @@ static void maxmip_test(IDirect3DDevice9 *device) ok(color == 0x00FF0000, "MapMip 1, no mipfilter has color %08x\n", color); hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xffffffff, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %08x\n", hr); hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_MIPFILTER, D3DTEXF_POINT); - ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed with %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_MAXMIPLEVEL, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed with %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, &quads[ 0], 5 * sizeof(float)); ok(SUCCEEDED(hr), "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_MAXMIPLEVEL, 1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed with %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, &quads[20], 5 * sizeof(float)); ok(SUCCEEDED(hr), "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_MAXMIPLEVEL, 2); - ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed with %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, &quads[40], 5 * sizeof(float)); ok(SUCCEEDED(hr), "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_MAXMIPLEVEL, 3); - ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed with %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, &quads[60], 5 * sizeof(float)); ok(SUCCEEDED(hr), "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_EndScene(device); } hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_MAXMIPLEVEL, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed with %08x\n", hr); hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_MIPFILTER, D3DTEXF_NONE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed with %08x\n", hr); hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); ok(SUCCEEDED(hr), "Present failed (0x%08x)\n", hr); @@ -2729,9 +2728,9 @@ static void maxmip_test(IDirect3DDevice9 *device) ok(color == 0x0000FF00, "MapMip 1, point mipfilter has color %08x\n", color); hr = IDirect3DDevice9_SetTexture(device, 0, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed with %08x\n", hr); hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_MAXMIPLEVEL, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed with %08x\n", hr); IDirect3DTexture9_Release(texture); } @@ -2757,36 +2756,36 @@ static void release_buffer_test(IDirect3DDevice9 *device) /* Index and vertex buffers should always be creatable */ hr = IDirect3DDevice9_CreateVertexBuffer(device, sizeof(quad), 0, D3DFVF_XYZ | D3DFVF_DIFFUSE, D3DPOOL_MANAGED, &vb, NULL); - ok(hr == D3D_OK, "CreateVertexBuffer failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "CreateVertexBuffer failed with %08x\n", hr); if(!vb) { skip("Failed to create a vertex buffer\n"); return; } hr = IDirect3DDevice9_CreateIndexBuffer(device, sizeof(indices), 0, D3DFMT_INDEX16, D3DPOOL_DEFAULT, &ib, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateIndexBuffer failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateIndexBuffer failed with %08x\n", hr); if(!ib) { skip("Failed to create an index buffer\n"); return; } hr = IDirect3DVertexBuffer9_Lock(vb, 0, sizeof(quad), (void **) &data, 0); - ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Lock failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Lock failed with %08x\n", hr); memcpy(data, quad, sizeof(quad)); hr = IDirect3DVertexBuffer9_Unlock(vb); - ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Unlock failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Unlock failed with %08x\n", hr); hr = IDirect3DIndexBuffer9_Lock(ib, 0, sizeof(indices), (void **) &data, 0); - ok(hr == D3D_OK, "IDirect3DIndexBuffer9_Lock failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DIndexBuffer9_Lock failed with %08x\n", hr); memcpy(data, indices, sizeof(indices)); hr = IDirect3DIndexBuffer9_Unlock(ib); - ok(hr == D3D_OK, "IDirect3DIndexBuffer9_Unlock failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DIndexBuffer9_Unlock failed with %08x\n", hr); hr = IDirect3DDevice9_SetIndices(device, ib); - ok(hr == D3D_OK, "IDirect3DDevice9_SetIndices failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetIndices failed with %08x\n", hr); hr = IDirect3DDevice9_SetStreamSource(device, 0, vb, 0, sizeof(quad[0])); - ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSource failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSource failed with %08x\n", hr); hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_DIFFUSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %08x\n", hr); /* Now destroy the bound index buffer and draw again */ ref = IDirect3DIndexBuffer9_Release(ib); @@ -2845,40 +2844,40 @@ static void float_texture_test(IDirect3DDevice9 *device) hr = IDirect3DDevice9_CreateTexture(device, 1, 1, 1, 0, D3DFMT_R32F, D3DPOOL_MANAGED, &texture, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateTexture failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateTexture failed with %08x\n", hr); if(!texture) { skip("Failed to create R32F texture\n"); goto out; } hr = IDirect3DTexture9_LockRect(texture, 0, &lr, NULL, 0); - ok(hr == D3D_OK, "IDirect3DTexture9_LockRect failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DTexture9_LockRect failed with %08x\n", hr); data = lr.pBits; *data = 0.0; hr = IDirect3DTexture9_UnlockRect(texture, 0); - ok(hr == D3D_OK, "IDirect3DTexture9_UnlockRect failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DTexture9_UnlockRect failed with %08x\n", hr); hr = IDirect3DDevice9_SetTexture(device, 0, (IDirect3DBaseTexture9 *) texture); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed with %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_TEX1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, 5 * sizeof(float)); ok(SUCCEEDED(hr), "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %08x\n", hr); } hr = IDirect3DDevice9_SetTexture(device, 0, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed with %08x\n", hr); hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); color = getPixelColor(device, 240, 320); ok(color == 0x0000FFFF, "R32F with value 0.0 has color %08x, expected 0x0000FFFF\n", color); @@ -2913,40 +2912,40 @@ static void g16r16_texture_test(IDirect3DDevice9 *device) hr = IDirect3DDevice9_CreateTexture(device, 1, 1, 1, 0, D3DFMT_G16R16, D3DPOOL_MANAGED, &texture, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateTexture failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateTexture failed with %08x\n", hr); if(!texture) { skip("Failed to create D3DFMT_G16R16 texture\n"); goto out; } hr = IDirect3DTexture9_LockRect(texture, 0, &lr, NULL, 0); - ok(hr == D3D_OK, "IDirect3DTexture9_LockRect failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DTexture9_LockRect failed with %08x\n", hr); data = lr.pBits; *data = 0x0f00f000; hr = IDirect3DTexture9_UnlockRect(texture, 0); - ok(hr == D3D_OK, "IDirect3DTexture9_UnlockRect failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DTexture9_UnlockRect failed with %08x\n", hr); hr = IDirect3DDevice9_SetTexture(device, 0, (IDirect3DBaseTexture9 *) texture); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed with %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_TEX1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, 5 * sizeof(float)); ok(SUCCEEDED(hr), "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %08x\n", hr); } hr = IDirect3DDevice9_SetTexture(device, 0, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed with %08x\n", hr); hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); color = getPixelColor(device, 240, 320); red = (color & 0x00ff0000) >> 16; @@ -3007,35 +3006,35 @@ static void texture_transform_flags_test(IDirect3DDevice9 *device) IDirect3D9_Release(d3d); hr = IDirect3DDevice9_CreateVertexDeclaration(device, decl_elements, &decl); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexDeclaration returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexDeclaration returned %08x\n", hr); hr = IDirect3DDevice9_CreateVertexDeclaration(device, decl_elements2, &decl2); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexDeclaration returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexDeclaration returned %08x\n", hr); hr = IDirect3DDevice9_CreateVertexDeclaration(device, decl_elements3, &decl3); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexDeclaration returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexDeclaration returned %08x\n", hr); hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_SRGBTEXTURE, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState(D3DSAMP_SRGBTEXTURE) returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState(D3DSAMP_SRGBTEXTURE) returned %08x\n", hr); hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_MAGFILTER, D3DTEXF_POINT); - ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState(D3DSAMP_MAGFILTER) returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState(D3DSAMP_MAGFILTER) returned %08x\n", hr); hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_MINFILTER, D3DTEXF_POINT); - ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState(D3DSAMP_MINFILTER) returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState(D3DSAMP_MINFILTER) returned %08x\n", hr); hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_MIPFILTER, D3DTEXF_NONE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState(D3DSAMP_MIPFILTER) returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState(D3DSAMP_MIPFILTER) returned %08x\n", hr); hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP); - ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState(D3DSAMP_ADDRESSU) returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState(D3DSAMP_ADDRESSU) returned %08x\n", hr); hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_ADDRESSV, D3DTADDRESS_CLAMP); - ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState(D3DSAMP_ADDRESSV) returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState(D3DSAMP_ADDRESSV) returned %08x\n", hr); hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_ADDRESSW, D3DTADDRESS_CLAMP); - ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState(D3DSAMP_ADDRESSW) returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState(D3DSAMP_ADDRESSW) returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_LIGHTING, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState(D3DRS_LIGHTING) returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState(D3DRS_LIGHTING) returned %08x\n", hr); hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff0000ff, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %08x\n", hr); hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); - ok(hr == D3D_OK, "IDirect3DDevice9_GetDeviceCaps returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_GetDeviceCaps returned %08x\n", hr); hr = IDirect3DDevice9_CreateTexture(device, caps.MaxTextureWidth, caps.MaxTextureHeight, 1, 0, fmt, D3DPOOL_MANAGED, &texture, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateTexture returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateTexture returned %08x\n", hr); if(!texture) { skip("Failed to create the test texture\n"); return; @@ -3046,7 +3045,7 @@ static void texture_transform_flags_test(IDirect3DDevice9 *device) * 1.0 in red and green for the x and y coords */ hr = IDirect3DTexture9_LockRect(texture, 0, &lr, NULL, 0); - ok(hr == D3D_OK, "IDirect3DTexture9_LockRect returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DTexture9_LockRect returned %08x\n", hr); for(y = 0; y < caps.MaxTextureHeight; y++) { for(x = 0; x < caps.MaxTextureWidth; x++) { double r_f = (double) y / (double) caps.MaxTextureHeight; @@ -3072,14 +3071,14 @@ static void texture_transform_flags_test(IDirect3DDevice9 *device) } } hr = IDirect3DTexture9_UnlockRect(texture, 0); - ok(hr == D3D_OK, "IDirect3DTexture9_UnlockRect returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DTexture9_UnlockRect returned %08x\n", hr); hr = IDirect3DDevice9_SetTexture(device, 0, (IDirect3DBaseTexture9 *) texture); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture returned %08x\n", hr); hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_TEX1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %08x\n", hr); if(SUCCEEDED(hr)) { float quad1[] = { @@ -3113,7 +3112,7 @@ static void texture_transform_flags_test(IDirect3DDevice9 *device) /* What happens with the texture matrix if D3DTSS_TEXTURETRANSFORMFLAGS is disabled? */ hr = IDirect3DDevice9_SetTransform(device, D3DTS_TEXTURE0, (D3DMATRIX *) &mat); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad1, 5 * sizeof(float)); ok(SUCCEEDED(hr), "DrawPrimitiveUP failed (%08x)\n", hr); @@ -3127,7 +3126,7 @@ static void texture_transform_flags_test(IDirect3DDevice9 *device) mat[8] = 1.0; mat[13] = 1.0; hr = IDirect3DDevice9_SetTransform(device, D3DTS_TEXTURE0, (D3DMATRIX *) &mat); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %08x\n", hr); IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT4); ok(SUCCEEDED(hr), "IDirect3DDevice9_SetTextureStageState failed (%08x)\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad3, 5 * sizeof(float)); @@ -3139,19 +3138,19 @@ static void texture_transform_flags_test(IDirect3DDevice9 *device) */ memset(mat, 0, sizeof(mat)); hr = IDirect3DDevice9_SetTransform(device, D3DTS_TEXTURE0, (D3DMATRIX *) &mat); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %08x\n", hr); hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZRHW | D3DFVF_TEX1); IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT2); ok(SUCCEEDED(hr), "IDirect3DDevice9_SetTextureStageState failed (%08x)\n", hr); - ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad4, 6 * sizeof(float)); ok(SUCCEEDED(hr), "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %08x\n", hr); } hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); color = getPixelColor(device, 160, 360); ok(color == 0x00FFFF00 || color == 0x00FEFE00, "quad 1 has color %08x, expected 0x00FFFF00\n", color); color = getPixelColor(device, 160, 120); @@ -3162,12 +3161,12 @@ static void texture_transform_flags_test(IDirect3DDevice9 *device) ok(color == 0x00FF0000 || 0x00FE0000, "quad 4 has color %08x, expected 0x00FF0000\n", color); hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff0000ff, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %08x\n", hr); hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_TEX1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %08x\n", hr); if(SUCCEEDED(hr)) { float quad1[] = { @@ -3202,7 +3201,7 @@ static void texture_transform_flags_test(IDirect3DDevice9 *device) /* What happens to the default 1 in the 3rd coordinate if it is disabled? */ hr = IDirect3DDevice9_SetTransform(device, D3DTS_TEXTURE0, (D3DMATRIX *) &mat); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %08x\n", hr); IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT2); ok(SUCCEEDED(hr), "IDirect3DDevice9_SetTextureStageState failed (%08x)\n", hr); @@ -3220,7 +3219,7 @@ static void texture_transform_flags_test(IDirect3DDevice9 *device) /* Just to be sure, the same as quad2 above */ memset(mat, 0, sizeof(mat)); hr = IDirect3DDevice9_SetTransform(device, D3DTS_TEXTURE0, (D3DMATRIX *) &mat); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %08x\n", hr); IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT2); ok(SUCCEEDED(hr), "IDirect3DDevice9_SetTextureStageState failed (%08x)\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad2, 5 * sizeof(float)); @@ -3235,10 +3234,10 @@ static void texture_transform_flags_test(IDirect3DDevice9 *device) ok(SUCCEEDED(hr), "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %08x\n", hr); } hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); color = getPixelColor(device, 160, 360); ok(color == 0x00FF0000 || color == 0x00FE0000, "quad 1 has color %08x, expected 0x00FF0000\n", color); color = getPixelColor(device, 160, 120); @@ -3254,26 +3253,26 @@ static void texture_transform_flags_test(IDirect3DDevice9 *device) /* Test projected textures, without any fancy matrices */ hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff203040, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %08x\n", hr); hr = IDirect3DDevice9_CreateTexture(device, 4, 4, 1, 0, D3DFMT_L8, D3DPOOL_MANAGED, &texture, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateTexture returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateTexture returned %08x\n", hr); hr = IDirect3DDevice9_SetTransform(device, D3DTS_TEXTURE0, (D3DMATRIX *) &identity); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %08x\n", hr); hr = IDirect3DDevice9_SetVertexDeclaration(device, decl3); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed with %08x\n", hr); hr = IDirect3DTexture9_LockRect(texture, 0, &lr, NULL, 0); - ok(hr == D3D_OK, "IDirect3DTexture9_LockRect failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DTexture9_LockRect failed with %08x\n", hr); for(x = 0; x < 4; x++) { memcpy(((BYTE *) lr.pBits) + lr.Pitch * x, proj_texdata + 4 * x, 4 * sizeof(proj_texdata[0])); } hr = IDirect3DTexture9_UnlockRect(texture, 0); - ok(hr == D3D_OK, "IDirect3DTexture9_UnlockRect failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DTexture9_UnlockRect failed with %08x\n", hr); hr = IDirect3DDevice9_SetTexture(device, 0, (IDirect3DBaseTexture9 *) texture); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed with %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %08x\n", hr); if(SUCCEEDED(hr)) { const float proj_quads[] = { @@ -3298,15 +3297,15 @@ static void texture_transform_flags_test(IDirect3DDevice9 *device) ok(SUCCEEDED(hr), "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %08x\n", hr); } hr = IDirect3DDevice9_SetTexture(device, 0, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed with %08x\n", hr); IDirect3DTexture9_Release(texture); hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); color = getPixelColor(device, 158, 118); ok(color == 0x00000000, "proj: Pixel 158/118 has color 0x%08x, expected 0x00000000\n", color); color = getPixelColor(device, 162, 118); @@ -3380,20 +3379,20 @@ static void texture_transform_flags_test(IDirect3DDevice9 *device) ok(color == 0x00000000, "proj: Pixel 482/392 has color 0x%08x, expected 0x00000000\n", color); hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff203040, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %08x\n", hr); /* Use a smaller volume texture than the biggest possible size for memory and performance reasons * Thus watch out if sampling from texels between 0 and 1. */ hr = IDirect3DDevice9_CreateVolumeTexture(device, 32, 32, 32, 1, 0, fmt, D3DPOOL_MANAGED, &volume, 0); ok(hr == D3D_OK || hr == D3DERR_INVALIDCALL, - "IDirect3DDevice9_CreateVolumeTexture failed with %s\n", DXGetErrorString9(hr)); + "IDirect3DDevice9_CreateVolumeTexture failed with %08x\n", hr); if(!volume) { skip("Failed to create a volume texture\n"); goto out; } hr = IDirect3DVolumeTexture9_LockBox(volume, 0, &lb, NULL, 0); - ok(hr == D3D_OK, "IDirect3DVolumeTexture9_LockBox failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DVolumeTexture9_LockBox failed with %08x\n", hr); for(z = 0; z < 32; z++) { for(y = 0; y < 32; y++) { for(x = 0; x < 32; x++) { @@ -3420,13 +3419,13 @@ static void texture_transform_flags_test(IDirect3DDevice9 *device) } } hr = IDirect3DVolumeTexture9_UnlockBox(volume, 0); - ok(hr == D3D_OK, "IDirect3DVolumeTexture9_UnlockBox failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DVolumeTexture9_UnlockBox failed with %08x\n", hr); hr = IDirect3DDevice9_SetTexture(device, 0, (IDirect3DBaseTexture9 *) volume); - ok(hr == D3D_OK, "IDirect3DVolumeTexture9_UnlockBox failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DVolumeTexture9_UnlockBox failed with %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %08x\n", hr); if(SUCCEEDED(hr)) { float quad1[] = { @@ -3458,13 +3457,13 @@ static void texture_transform_flags_test(IDirect3DDevice9 *device) 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0}; hr = IDirect3DDevice9_SetVertexDeclaration(device, decl); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed with %08x\n", hr); /* Draw a quad with all 3 coords enabled. Nothing fancy. v and w are swapped, but have the same * values */ hr = IDirect3DDevice9_SetTransform(device, D3DTS_TEXTURE0, (D3DMATRIX *) mat); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %08x\n", hr); IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT3); ok(hr == D3D_OK, "IDirect3DDevice9_SetTextureStageState failed (%08x)\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad1, 6 * sizeof(float)); @@ -3483,11 +3482,11 @@ static void texture_transform_flags_test(IDirect3DDevice9 *device) /* default values? Set up the identity matrix, pass in 2 vertex coords, and enable 4 */ hr = IDirect3DDevice9_SetTransform(device, D3DTS_TEXTURE0, (D3DMATRIX *) identity); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %08x\n", hr); IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT4); ok(hr == D3D_OK, "IDirect3DDevice9_SetTextureStageState failed (%08x)\n", hr); hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_TEX1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad3, 5 * sizeof(float)); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); @@ -3496,19 +3495,19 @@ static void texture_transform_flags_test(IDirect3DDevice9 *device) */ memset(mat, 0, sizeof(mat)); hr = IDirect3DDevice9_SetTransform(device, D3DTS_TEXTURE0, (D3DMATRIX *) mat); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %08x\n", hr); IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT1); ok(hr == D3D_OK, "IDirect3DDevice9_SetTextureStageState failed (%08x)\n", hr); hr = IDirect3DDevice9_SetVertexDeclaration(device, decl); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed with %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad4, 6 * sizeof(float)); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %08x\n", hr); } hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); color = getPixelColor(device, 160, 360); ok(color == 0x00ffffff, "quad 1 has color %08x, expected 0x00ffffff\n", color); @@ -3521,9 +3520,9 @@ static void texture_transform_flags_test(IDirect3DDevice9 *device) ok(color == 0x00ffffff || color == 0x0000ff00, "quad 4 has color %08x, expected 0x00ffffff\n", color); hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff303030, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %08x\n", hr); if(SUCCEEDED(hr)) { float quad1[] = { @@ -3553,12 +3552,12 @@ static void texture_transform_flags_test(IDirect3DDevice9 *device) 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0}; hr = IDirect3DDevice9_SetVertexDeclaration(device, decl); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed with %08x\n", hr); /* Default values? 4 coords used, 3 passed. What happens to the 4th? */ hr = IDirect3DDevice9_SetTransform(device, D3DTS_TEXTURE0, (D3DMATRIX *) mat); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %08x\n", hr); IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT4); ok(hr == D3D_OK, "IDirect3DDevice9_SetTextureStageState failed (%08x)\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad1, 6 * sizeof(float)); @@ -3566,25 +3565,25 @@ static void texture_transform_flags_test(IDirect3DDevice9 *device) /* None passed */ hr = IDirect3DDevice9_SetTransform(device, D3DTS_TEXTURE0, (D3DMATRIX *) identity); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %08x\n", hr); hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ); - ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad2, 3 * sizeof(float)); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); /* 4 used, 1 passed */ hr = IDirect3DDevice9_SetVertexDeclaration(device, decl2); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed with %08x\n", hr); hr = IDirect3DDevice9_SetTransform(device, D3DTS_TEXTURE0, (D3DMATRIX *) mat2); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad3, 4 * sizeof(float)); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %08x\n", hr); } hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); color = getPixelColor(device, 160, 360); ok(color == 0x0000ff00, "quad 1 has color %08x, expected 0x0000ff00\n", color); color = getPixelColor(device, 160, 120); @@ -3597,13 +3596,13 @@ static void texture_transform_flags_test(IDirect3DDevice9 *device) out: hr = IDirect3DDevice9_SetVertexDeclaration(device, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed with %08x\n", hr); IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_DISABLE); ok(SUCCEEDED(hr), "IDirect3DDevice9_SetTextureStageState failed (%08x)\n", hr); hr = IDirect3DDevice9_SetTransform(device, D3DTS_TEXTURE0, (D3DMATRIX *) &identity); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %08x\n", hr); hr = IDirect3DDevice9_SetTexture(device, 0, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture returned %08x\n", hr); IDirect3DVertexDeclaration9_Release(decl); IDirect3DVertexDeclaration9_Release(decl2); IDirect3DVertexDeclaration9_Release(decl3); @@ -3638,52 +3637,52 @@ static void texdepth_test(IDirect3DDevice9 *device) }; hr = IDirect3DDevice9_CreatePixelShader(device, shader_code, &shader); - ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %08x\n", hr); hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xffffff00, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZENABLE, D3DZB_TRUE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZWRITEENABLE, TRUE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZFUNC, D3DCMP_ALWAYS); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ); /* Fill the depth buffer with a gradient */ hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, vertex, 3 * sizeof(float)); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %08x\n", hr); } /* Now perform the actual tests. Same geometry, but with the shader */ hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZFUNC, D3DCMP_GREATER); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZWRITEENABLE, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetPixelShader(device, shader); ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader failed (%08x)\n", hr); hr = IDirect3DDevice9_SetPixelShaderConstantF(device, 0, texdepth_test_data1, 1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShaderConstantF returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShaderConstantF returned %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, vertex, 3 * sizeof(float)); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %08x\n", hr); } hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); color = getPixelColor(device, 158, 240); ok(color == 0x000000ff, "Pixel 158(25%% - 2 pixel) has color %08x, expected 0x000000ff\n", color); color = getPixelColor(device, 162, 240); @@ -3692,20 +3691,20 @@ static void texdepth_test(IDirect3DDevice9 *device) hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffff00, 0.0, 0); hr = IDirect3DDevice9_SetPixelShaderConstantF(device, 0, texdepth_test_data2, 1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShaderConstantF returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShaderConstantF returned %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, vertex, 3 * sizeof(float)); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %08x\n", hr); } hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); color = getPixelColor(device, 318, 240); ok(color == 0x000000ff, "Pixel 318(50%% - 2 pixel) has color %08x, expected 0x000000ff\n", color); color = getPixelColor(device, 322, 240); @@ -3714,19 +3713,19 @@ static void texdepth_test(IDirect3DDevice9 *device) hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffff0000, 0.0, 0); hr = IDirect3DDevice9_SetPixelShaderConstantF(device, 0, texdepth_test_data3, 1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShaderConstantF returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShaderConstantF returned %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, vertex, 3 * sizeof(float)); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %08x\n", hr); } hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); color = getPixelColor(device, 1, 240); ok(color == 0x00ff0000, "Pixel 1(0%% + 2 pixel) has color %08x, expected 0x00ff0000\n", color); @@ -3734,19 +3733,19 @@ static void texdepth_test(IDirect3DDevice9 *device) hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff00ff00, 0.0, 0); hr = IDirect3DDevice9_SetPixelShaderConstantF(device, 0, texdepth_test_data4, 1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShaderConstantF returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShaderConstantF returned %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, vertex, 3 * sizeof(float)); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %08x\n", hr); } hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); color = getPixelColor(device, 318, 240); ok(color == 0x000000ff, "Pixel 318(50%% - 2 pixel) has color %08x, expected 0x000000ff\n", color); color = getPixelColor(device, 322, 240); @@ -3755,19 +3754,19 @@ static void texdepth_test(IDirect3DDevice9 *device) hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffff00, 0.0, 0); hr = IDirect3DDevice9_SetPixelShaderConstantF(device, 0, texdepth_test_data5, 1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShaderConstantF returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShaderConstantF returned %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, vertex, 3 * sizeof(float)); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %08x\n", hr); } hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); color = getPixelColor(device, 1, 240); ok(color == 0x00ffff00, "Pixel 1(0%% + 2 pixel) has color %08x, expected 0x00ffff00\n", color); @@ -3775,19 +3774,19 @@ static void texdepth_test(IDirect3DDevice9 *device) hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff00ff00, 0.0, 0); hr = IDirect3DDevice9_SetPixelShaderConstantF(device, 0, texdepth_test_data6, 1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShaderConstantF returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShaderConstantF returned %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, vertex, 3 * sizeof(float)); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %08x\n", hr); } hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); color = getPixelColor(device, 638, 240); ok(color == 0x000000ff, "Pixel 638(100%% + 2 pixel) has color %08x, expected 0x000000ff\n", color); @@ -3795,19 +3794,19 @@ static void texdepth_test(IDirect3DDevice9 *device) hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffff0000, 0.0, 0); hr = IDirect3DDevice9_SetPixelShaderConstantF(device, 0, texdepth_test_data7, 1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShaderConstantF returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShaderConstantF returned %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, vertex, 3 * sizeof(float)); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %08x\n", hr); } hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); color = getPixelColor(device, 638, 240); ok(color == 0x000000ff, "Pixel 638(100%% + 2 pixel) has color %08x, expected 0x000000ff\n", color); @@ -3818,9 +3817,9 @@ static void texdepth_test(IDirect3DDevice9 *device) IDirect3DPixelShader9_Release(shader); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZENABLE, D3DZB_FALSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZWRITEENABLE, TRUE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); } static void texkill_test(IDirect3DDevice9 *device) @@ -3854,25 +3853,25 @@ static void texkill_test(IDirect3DDevice9 *device) }; hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff00ff00, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %08x\n", hr); hr = IDirect3DDevice9_CreatePixelShader(device, shader_code_11, &shader); - ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %08x\n", hr); hr = IDirect3DDevice9_SetPixelShader(device, shader); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_TEXCOORDSIZE4(0) | D3DFVF_TEX1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, vertex, 7 * sizeof(float)); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %08x\n", hr); } hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); color = getPixelColor(device, 63, 46); ok(color == 0x0000ff00, "Pixel 63/46 has color %08x, expected 0x0000ff00\n", color); color = getPixelColor(device, 66, 46); @@ -3910,11 +3909,11 @@ static void texkill_test(IDirect3DDevice9 *device) ok(color == 0x00ff0000, "Pixel 575/49 has color %08x, expected 0x00ff0000\n", color); hr = IDirect3DDevice9_SetPixelShader(device, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %08x\n", hr); IDirect3DPixelShader9_Release(shader); hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffff00, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %08x\n", hr); hr = IDirect3DDevice9_CreatePixelShader(device, shader_code_20, &shader); if(FAILED(hr)) { skip("Failed to create 2.0 test shader, most likely not supported\n"); @@ -3922,19 +3921,19 @@ static void texkill_test(IDirect3DDevice9 *device) } hr = IDirect3DDevice9_SetPixelShader(device, shader); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, vertex, 7 * sizeof(float)); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %08x\n", hr); } hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); color = getPixelColor(device, 63, 46); ok(color == 0x00ffff00, "Pixel 63/46 has color %08x, expected 0x00ffff00\n", color); color = getPixelColor(device, 66, 46); @@ -4016,7 +4015,7 @@ static void x8l8v8u8_test(IDirect3DDevice9 *device) }; hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffff0000, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %08x\n", hr); hr = IDirect3DDevice9_CreateTexture(device, 1, 1, 1, 0, D3DFMT_X8L8V8U8, D3DPOOL_MANAGED, &texture, NULL); ok(hr == D3D_OK, "IDirect3DDevice9_CreateTexture failed (%08x)\n", hr); @@ -4049,7 +4048,7 @@ static void x8l8v8u8_test(IDirect3DDevice9 *device) ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed (%08x)\n", hr); } hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); color = getPixelColor(device, 578, 430); ok(color == 0x008262ca || color == 0x008363ca || color == 0x008362ca, "D3DFMT_X8L8V8U8 = 0x112131ca returns color %08x, expected 0x008262ca\n", color); @@ -4067,7 +4066,7 @@ static void x8l8v8u8_test(IDirect3DDevice9 *device) ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed (%08x)\n", hr); } hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); color = getPixelColor(device, 578, 430); ok(color == 0x00ffffff, "w component of D3DFMT_X8L8V8U8 = 0x11ca3141 returns color %08x\n", color); @@ -4105,18 +4104,18 @@ static void autogen_mipmap_test(IDirect3DDevice9 *device) IDirect3D9_Release(d3d); hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffff00, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %08x\n", hr); /* Make the mipmap big, so that a smaller mipmap is used */ hr = IDirect3DDevice9_CreateTexture(device, 1024, 1024, 0, D3DUSAGE_AUTOGENMIPMAP, D3DFMT_X8R8G8B8, D3DPOOL_MANAGED, &texture, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateTexture returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateTexture returned %08x\n", hr); hr = IDirect3DTexture9_GetSurfaceLevel(texture, 0, &surface); - ok(hr == D3D_OK, "IDirect3DTexture9_GetSurfaceLevel returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DTexture9_GetSurfaceLevel returned %08x\n", hr); hr = IDirect3DSurface9_LockRect(surface, &lr, NULL, 0); - ok(hr == D3D_OK, "IDirect3DSurface9_LockRect returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DSurface9_LockRect returned %08x\n", hr); for(y = 0; y < 1024; y++) { for(x = 0; x < 1024; x++) { DWORD *dst = (DWORD *) (((BYTE *) lr.pBits) + y * lr.Pitch + x * 4); @@ -4138,16 +4137,16 @@ static void autogen_mipmap_test(IDirect3DDevice9 *device) } } hr = IDirect3DSurface9_UnlockRect(surface); - ok(hr == D3D_OK, "IDirect3DSurface9_UnlockRect returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DSurface9_UnlockRect returned %08x\n", hr); IDirect3DSurface9_Release(surface); hr = IDirect3DDevice9_SetTexture(device, 0, (IDirect3DBaseTexture9 *) texture); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture returned %08x\n", hr); hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_MIPFILTER, D3DTEXF_POINT); - ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed with %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %08x\n", hr); if(SUCCEEDED(hr)) { const float quad[] = { -0.5, -0.5, 0.1, 0.0, 0.0, @@ -4157,20 +4156,20 @@ static void autogen_mipmap_test(IDirect3DDevice9 *device) }; hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_TEX1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, 5 * sizeof(float)); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %08x\n", hr); } hr = IDirect3DDevice9_SetTexture(device, 0, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture returned %08x\n", hr); hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_MIPFILTER, D3DTEXF_NONE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed with %08x\n", hr); IDirect3DTexture9_Release(texture); hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); color = getPixelColor(device, 200, 200); ok(color == 0x00ffffff, "pixel 200/200 has color %08x, expected 0x00ffffff\n", color); color = getPixelColor(device, 280, 200); @@ -4263,64 +4262,64 @@ static void test_constant_clamp_vs(IDirect3DDevice9 *device) float test_data_c2[4] = { -0.50, 1.25, 2.00, 1.0}; hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff00ffff, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %08x\n", hr); hr = IDirect3DDevice9_CreateVertexShader(device, shader_code_11, &shader_11); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %08x\n", hr); hr = IDirect3DDevice9_CreateVertexShader(device, shader_code_11_2, &shader_11_2); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %08x\n", hr); hr = IDirect3DDevice9_CreateVertexShader(device, shader_code_20, &shader_20); if(FAILED(hr)) shader_20 = NULL; hr = IDirect3DDevice9_CreateVertexShader(device, shader_code_20_2, &shader_20_2); if(FAILED(hr)) shader_20_2 = NULL; hr = IDirect3DDevice9_CreateVertexDeclaration(device, decl_elements, &decl); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexDeclaration returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexDeclaration returned %08x\n", hr); hr = IDirect3DDevice9_SetVertexShaderConstantF(device, 1, test_data_c1, 1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShaderConstantF returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShaderConstantF returned %08x\n", hr); hr = IDirect3DDevice9_SetVertexShaderConstantF(device, 2, test_data_c2, 1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShaderConstantF returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShaderConstantF returned %08x\n", hr); hr = IDirect3DDevice9_SetVertexDeclaration(device, decl); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration returned %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_SetVertexShader(device, shader_11); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad1, 3 * sizeof(float)); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_SetVertexShader(device, shader_11_2); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad2, 3 * sizeof(float)); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); if(shader_20) { hr = IDirect3DDevice9_SetVertexShader(device, shader_20); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad3, 3 * sizeof(float)); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); } if(shader_20_2) { hr = IDirect3DDevice9_SetVertexShader(device, shader_20_2); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad4, 3 * sizeof(float)); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); } hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %08x\n", hr); } hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); hr = IDirect3DDevice9_SetVertexShader(device, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %08x\n", hr); hr = IDirect3DDevice9_SetVertexDeclaration(device, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration returned %08x\n", hr); color = getPixelColor(device, 160, 360); ok(color == 0x00bfbf80 || color == 0x00bfbf7f || color == 0x00bfbf81, @@ -4412,58 +4411,58 @@ static void constant_clamp_ps_test(IDirect3DDevice9 *device) float test_data_c2[4] = { -0.50, 1.25, 2.00, 1.0}; hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff00ffff, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %08x\n", hr); hr = IDirect3DDevice9_CreatePixelShader(device, shader_code_11, &shader_11); - ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %08x\n", hr); hr = IDirect3DDevice9_CreatePixelShader(device, shader_code_12, &shader_12); - ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %08x\n", hr); hr = IDirect3DDevice9_CreatePixelShader(device, shader_code_14, &shader_14); - ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %08x\n", hr); hr = IDirect3DDevice9_CreatePixelShader(device, shader_code_20, &shader_20); if(FAILED(hr)) shader_20 = NULL; hr = IDirect3DDevice9_SetPixelShaderConstantF(device, 1, test_data_c1, 1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShaderConstantF returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShaderConstantF returned %08x\n", hr); hr = IDirect3DDevice9_SetPixelShaderConstantF(device, 2, test_data_c2, 1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShaderConstantF returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShaderConstantF returned %08x\n", hr); hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ); - ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF returned %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_SetPixelShader(device, shader_11); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad1, 3 * sizeof(float)); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_SetPixelShader(device, shader_12); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad2, 3 * sizeof(float)); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_SetPixelShader(device, shader_14); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad3, 3 * sizeof(float)); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); if(shader_20) { hr = IDirect3DDevice9_SetPixelShader(device, shader_20); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad4, 3 * sizeof(float)); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); } hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %08x\n", hr); } hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); hr = IDirect3DDevice9_SetPixelShader(device, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %08x\n", hr); color = getPixelColor(device, 160, 360); ok(color == 0x00808000 || color == 0x007f7f00 || color == 0x00818100, @@ -4538,34 +4537,34 @@ static void dp2add_ps_test(IDirect3DDevice9 *device) hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff000000, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %08x\n", hr); hr = IDirect3DDevice9_CreatePixelShader(device, shader_code_dp2add, &shader_dp2add); - ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %08x\n", hr); hr = IDirect3DDevice9_CreatePixelShader(device, shader_code_dp2add_sat, &shader_dp2add_sat); - ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %08x\n", hr); hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ); - ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF returned %08x\n", hr); if (shader_dp2add) { hr = IDirect3DDevice9_SetPixelShader(device, shader_dp2add); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, 3 * sizeof(float)); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %08x\n", hr); } hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); color = getPixelColor(device, 360, 240); ok(color == 0x007f7f7f || color == 0x00808080, "dp2add pixel has color %08x, expected ~0x007f7f7f\n", color); @@ -4578,20 +4577,20 @@ static void dp2add_ps_test(IDirect3DDevice9 *device) if (shader_dp2add_sat) { hr = IDirect3DDevice9_SetPixelShader(device, shader_dp2add_sat); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, 3 * sizeof(float)); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %08x\n", hr); } hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); color = getPixelColor(device, 360, 240); ok(color == 0x007f7f7f || color == 0x00808080, "dp2add pixel has color %08x, expected ~0x007f7f7f\n", color); @@ -4602,7 +4601,7 @@ static void dp2add_ps_test(IDirect3DDevice9 *device) } hr = IDirect3DDevice9_SetPixelShader(device, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %08x\n", hr); } static void cnd_test(IDirect3DDevice9 *device) @@ -4749,64 +4748,64 @@ static void cnd_test(IDirect3DDevice9 *device) float test_data_c2_coi[4] = { 1.0, 0.0, 1.0, 1.0}; hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff00ffff, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %08x\n", hr); hr = IDirect3DDevice9_CreatePixelShader(device, shader_code_11, &shader_11); - ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %08x\n", hr); hr = IDirect3DDevice9_CreatePixelShader(device, shader_code_12, &shader_12); - ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %08x\n", hr); hr = IDirect3DDevice9_CreatePixelShader(device, shader_code_13, &shader_13); - ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %08x\n", hr); hr = IDirect3DDevice9_CreatePixelShader(device, shader_code_14, &shader_14); - ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %08x\n", hr); hr = IDirect3DDevice9_CreatePixelShader(device, shader_code_11_coissue, &shader_11_coissue); - ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %08x\n", hr); hr = IDirect3DDevice9_CreatePixelShader(device, shader_code_12_coissue, &shader_12_coissue); - ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %08x\n", hr); hr = IDirect3DDevice9_CreatePixelShader(device, shader_code_13_coissue, &shader_13_coissue); - ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %08x\n", hr); hr = IDirect3DDevice9_CreatePixelShader(device, shader_code_14_coissue, &shader_14_coissue); - ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %08x\n", hr); hr = IDirect3DDevice9_SetPixelShaderConstantF(device, 1, test_data_c1, 1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShaderConstantF returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShaderConstantF returned %08x\n", hr); hr = IDirect3DDevice9_SetPixelShaderConstantF(device, 2, test_data_c2, 1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShaderConstantF returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShaderConstantF returned %08x\n", hr); hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_TEX1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF returned %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_SetPixelShader(device, shader_11); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad1, 6 * sizeof(float)); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_SetPixelShader(device, shader_12); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad2, 6 * sizeof(float)); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_SetPixelShader(device, shader_13); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad3, 6 * sizeof(float)); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_SetPixelShader(device, shader_14); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad4, 6 * sizeof(float)); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %08x\n", hr); } hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); hr = IDirect3DDevice9_SetPixelShader(device, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %08x\n", hr); /* This is the 1.4 test. Each component(r, g, b) is tested separately against 0.5 */ color = getPixelColor(device, 158, 118); @@ -4855,44 +4854,44 @@ static void cnd_test(IDirect3DDevice9 *device) "pixel 482, 122 has color %08x, expected 0x00000000\n", color); hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff00ffff, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %08x\n", hr); hr = IDirect3DDevice9_SetPixelShaderConstantF(device, 1, test_data_c1_coi, 1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShaderConstantF returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShaderConstantF returned %08x\n", hr); hr = IDirect3DDevice9_SetPixelShaderConstantF(device, 2, test_data_c2_coi, 1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShaderConstantF returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShaderConstantF returned %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_SetPixelShader(device, shader_11_coissue); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad1, 6 * sizeof(float)); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_SetPixelShader(device, shader_12_coissue); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad2, 6 * sizeof(float)); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_SetPixelShader(device, shader_13_coissue); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad3, 6 * sizeof(float)); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_SetPixelShader(device, shader_14_coissue); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad4, 6 * sizeof(float)); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %08x\n", hr); } hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); hr = IDirect3DDevice9_SetPixelShader(device, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %08x\n", hr); /* This is the 1.4 test. The coissue doesn't change the behavior here, but keep in mind * that we swapped the values in c1 and c2 to make the other tests return some color @@ -4984,32 +4983,32 @@ static void nested_loop_test(IDirect3DDevice9 *device) { }; hr = IDirect3DDevice9_CreatePixelShader(device, shader_code, &shader); - ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader failed with %08x\n", hr); hr = IDirect3DDevice9_SetPixelShader(device, shader); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader failed with %08x\n", hr); hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ); - ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %08x\n", hr); hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x0000ff00, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, 3 * sizeof(float)); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %08x\n", hr); } hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); color = getPixelColor(device, 360, 240); ok(color == 0x007f0000 || color == 0x00800000 || color == 0x00810000, "Nested loop test returned color 0x%08x, expected 0x00800000\n", color); hr = IDirect3DDevice9_SetPixelShader(device, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader failed with %08x\n", hr); IDirect3DPixelShader9_Release(shader); } @@ -5214,29 +5213,29 @@ static void fixed_function_varying_test(IDirect3DDevice9 *device) { data2[3].pos_x = 640; data2[3].pos_y = 480; hr = IDirect3DDevice9_CreateVertexDeclaration(device, decl_elements, &decl); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexDeclaration returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexDeclaration returned %08x\n", hr); hr = IDirect3DDevice9_CreateVertexDeclaration(device, decl_elements2, &decl2); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexDeclaration returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexDeclaration returned %08x\n", hr); hr = IDirect3DDevice9_SetVertexDeclaration(device, decl); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration returned %08x\n", hr); for(i = 0; i < sizeof(tests) / sizeof(tests[0]); i++) { hr = IDirect3DDevice9_CreatePixelShader(device, tests[i].shader_code, &tests[i].shader); - ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader failed for shader %s, hr = %s\n", - tests[i].name, DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader failed for shader %s, hr = %08x\n", + tests[i].name, hr); } for(i = 0; i < sizeof(tests) / sizeof(tests[0]); i++) { hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %08x\n", hr); IDirect3DDevice9_SetPixelShader(device, tests[i].shader); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %08x\n", hr); drawok = FALSE; if(SUCCEEDED(hr)) { @@ -5244,10 +5243,10 @@ static void fixed_function_varying_test(IDirect3DDevice9 *device) { ok(hr == D3D_OK || hr == D3DERR_INVALIDCALL, "DrawPrimitiveUP failed (%08x)\n", hr); drawok = SUCCEEDED(hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %08x\n", hr); } hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); /* Some drivers reject the combination of ps_3_0 and fixed function vertex processing. Accept * the failure and do not check the color if it failed @@ -5276,26 +5275,26 @@ static void fixed_function_varying_test(IDirect3DDevice9 *device) { } hr = IDirect3DDevice9_SetVertexDeclaration(device, decl2); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration returned %08x\n", hr); for(i = 0; i < sizeof(tests) / sizeof(tests[0]); i++) { hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %08x\n", hr); IDirect3DDevice9_SetPixelShader(device, tests[i].shader); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, data2, sizeof(data2[0])); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %08x\n", hr); } hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); color = getPixelColor(device, 360, 240); r = color & 0x00ff0000 >> 16; @@ -5437,41 +5436,41 @@ static void vshader_version_varying_test(IDirect3DDevice9 *device) { hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff110000, 0.0, 0); hr = IDirect3DDevice9_CreatePixelShader(device, ps_code, &pixelshader); - ok(hr == D3D_OK, "IDirect3DDevice_CreatePixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice_CreatePixelShader returned %08x\n", hr); hr = IDirect3DDevice9_CreateVertexShader(device, vs_1_code, &vs_1_shader); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %08x\n", hr); hr = IDirect3DDevice9_CreateVertexShader(device, vs_2_code, &vs_2_shader); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %08x\n", hr); hr = IDirect3DDevice9_CreateVertexShader(device, vs_3_code, &vs_3_shader); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %08x\n", hr); hr = IDirect3DDevice9_SetPixelShader(device, pixelshader); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %08x\n", hr); IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_SetVertexShader(device, vs_1_shader); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad1, sizeof(float) * 3); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_SetVertexShader(device, vs_2_shader); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad2, sizeof(float) * 3); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_SetVertexShader(device, vs_3_shader); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad3, sizeof(float) * 3); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %08x\n", hr); } hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); color = getPixelColor(device, 160, 120); ok((color & 0x00ff0000) >= 0x00190000 && (color & 0x00ff0000) <= 0x00210000 && @@ -5491,9 +5490,9 @@ static void vshader_version_varying_test(IDirect3DDevice9 *device) { /* cleanup */ hr = IDirect3DDevice9_SetPixelShader(device, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %08x\n", hr); hr = IDirect3DDevice9_SetVertexShader(device, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %08x\n", hr); if(pixelshader) IDirect3DPixelShader9_Release(pixelshader); if(vs_1_shader) IDirect3DVertexShader9_Release(vs_1_shader); if(vs_2_shader) IDirect3DVertexShader9_Release(vs_2_shader); @@ -5597,9 +5596,9 @@ static void pshader_version_varying_test(IDirect3DDevice9 *device) { hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffff00, 0.0, 0); hr = IDirect3DDevice9_CreateTexture(device, 512, 512, 1, 0, D3DFMT_A16B16G16R16, D3DPOOL_MANAGED, &texture, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateTexture returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateTexture returned %08x\n", hr); hr = IDirect3DTexture9_LockRect(texture, 0, &lr, NULL, 0); - ok(hr == D3D_OK, "IDirect3DTexture9_LockRect returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DTexture9_LockRect returned %08x\n", hr); for(y = 0; y < 512; y++) { for(x = 0; x < 512; x++) { double r_f = (double) x / (double) 512; @@ -5614,43 +5613,43 @@ static void pshader_version_varying_test(IDirect3DDevice9 *device) { } } hr = IDirect3DTexture9_UnlockRect(texture, 0); - ok(hr == D3D_OK, "IDirect3DTexture9_UnlockRect returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DTexture9_UnlockRect returned %08x\n", hr); hr = IDirect3DDevice9_CreateVertexShader(device, vs_code, &vertexshader); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %08x\n", hr); hr = IDirect3DDevice9_CreatePixelShader(device, ps_1_code, &ps_1_shader); - ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %08x\n", hr); hr = IDirect3DDevice9_CreatePixelShader(device, ps_2_code, &ps_2_shader); - ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %08x\n", hr); hr = IDirect3DDevice9_CreatePixelShader(device, ps_3_code, &ps_3_shader); - ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %08x\n", hr); hr = IDirect3DDevice9_SetVertexShader(device, vertexshader); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %08x\n", hr); IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_SetPixelShader(device, ps_1_shader); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad1, sizeof(float) * 3); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_SetPixelShader(device, ps_2_shader); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad2, sizeof(float) * 3); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_SetPixelShader(device, ps_3_shader); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad3, sizeof(float) * 3); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_SetPixelShader(device, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %08x\n", hr); hr = IDirect3DDevice9_SetTexture(device, 0, (IDirect3DBaseTexture9 *) texture); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture returned %08x\n", hr); hr = IDirect3DDevice9_SetTextureStageState(device, 1, D3DTSS_COLOROP, D3DTOP_DISABLE); hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_ADD); hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_COLORARG1, D3DTA_TEXTURE); @@ -5659,10 +5658,10 @@ static void pshader_version_varying_test(IDirect3DDevice9 *device) { ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %08x\n", hr); } hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); color = getPixelColor(device, 160, 120); ok((color & 0x00ff0000) >= 0x00790000 && (color & 0x00ff0000) <= 0x00810000 && @@ -5688,11 +5687,11 @@ static void pshader_version_varying_test(IDirect3DDevice9 *device) { /* cleanup */ hr = IDirect3DDevice9_SetTexture(device, 0, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture returned %08x\n", hr); hr = IDirect3DDevice9_SetPixelShader(device, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %08x\n", hr); hr = IDirect3DDevice9_SetVertexShader(device, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %08x\n", hr); if(vertexshader) IDirect3DVertexShader9_Release(vertexshader); if(ps_1_shader) IDirect3DPixelShader9_Release(ps_1_shader); if(ps_2_shader) IDirect3DPixelShader9_Release(ps_2_shader); @@ -5773,13 +5772,13 @@ void test_compare_instructions(IDirect3DDevice9 *device) hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 0.0, 0); hr = IDirect3DDevice9_CreateVertexShader(device, shader_sge_vec_code, &shader_sge_vec); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %08x\n", hr); hr = IDirect3DDevice9_CreateVertexShader(device, shader_slt_vec_code, &shader_slt_vec); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %08x\n", hr); hr = IDirect3DDevice9_CreateVertexShader(device, shader_sge_scalar_code, &shader_sge_scalar); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %08x\n", hr); hr = IDirect3DDevice9_CreateVertexShader(device, shader_slt_scalar_code, &shader_slt_scalar); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %08x\n", hr); hr = IDirect3DDevice9_SetVertexShaderConstantF(device, 0, const0, 1); ok(SUCCEEDED(hr), "SetVertexShaderConstantF failed (%08x)\n", hr); hr = IDirect3DDevice9_SetVertexShaderConstantF(device, 1, const1, 1); @@ -5788,21 +5787,21 @@ void test_compare_instructions(IDirect3DDevice9 *device) ok(SUCCEEDED(hr), "IDirect3DDevice9_SetFVF failed (%08x)\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_SetVertexShader(device, shader_sge_vec); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad1, sizeof(float) * 3); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_SetVertexShader(device, shader_slt_vec); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad2, sizeof(float) * 3); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_SetVertexShader(device, shader_sge_scalar); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad3, sizeof(float) * 3); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); @@ -5810,16 +5809,16 @@ void test_compare_instructions(IDirect3DDevice9 *device) ok(SUCCEEDED(hr), "SetVertexShaderConstantF failed (%08x)\n", hr); hr = IDirect3DDevice9_SetVertexShader(device, shader_slt_scalar); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad4, sizeof(float) * 3); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %08x\n", hr); } hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); color = getPixelColor(device, 160, 360); ok(color == 0x00FF00FF, "Compare test: Quad 1(sge vec) returned color 0x%08x, expected 0x00FF00FF\n", color); @@ -6024,50 +6023,50 @@ void test_vshader_input(IDirect3DDevice9 *device) }; hr = IDirect3DDevice9_CreateVertexDeclaration(device, decl_elements_twotexcrd, &decl_twotexcrd); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexDeclaration returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexDeclaration returned %08x\n", hr); hr = IDirect3DDevice9_CreateVertexDeclaration(device, decl_elements_onetexcrd, &decl_onetexcrd); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexDeclaration returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexDeclaration returned %08x\n", hr); hr = IDirect3DDevice9_CreateVertexDeclaration(device, decl_elements_twotexcrd_wrongidx, &decl_twotex_wrongidx); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexDeclaration returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexDeclaration returned %08x\n", hr); hr = IDirect3DDevice9_CreateVertexDeclaration(device, decl_elements_twotexcrd_rightorder, &decl_twotexcrd_rightorder); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexDeclaration returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexDeclaration returned %08x\n", hr); hr = IDirect3DDevice9_CreateVertexDeclaration(device, decl_elements_texcoord_color, &decl_texcoord_color); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexDeclaration returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexDeclaration returned %08x\n", hr); hr = IDirect3DDevice9_CreateVertexDeclaration(device, decl_elements_color_color, &decl_color_color); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexDeclaration returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexDeclaration returned %08x\n", hr); hr = IDirect3DDevice9_CreateVertexDeclaration(device, decl_elements_color_ubyte, &decl_color_ubyte); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexDeclaration returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexDeclaration returned %08x\n", hr); hr = IDirect3DDevice9_CreateVertexDeclaration(device, decl_elements_color_float, &decl_color_float); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexDeclaration returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexDeclaration returned %08x\n", hr); for(i = 1; i <= 3; i++) { hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffff0000, 0.0, 0); if(i == 3) { hr = IDirect3DDevice9_CreateVertexShader(device, swapped_shader_code_3, &swapped_shader); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %08x\n", hr); } else if(i == 2){ hr = IDirect3DDevice9_CreateVertexShader(device, swapped_shader_code_2, &swapped_shader); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %08x\n", hr); } else if(i == 1) { hr = IDirect3DDevice9_CreateVertexShader(device, swapped_shader_code_1, &swapped_shader); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %08x\n", hr); } hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_SetVertexShader(device, swapped_shader); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %08x\n", hr); hr = IDirect3DDevice9_SetVertexDeclaration(device, decl_twotexcrd); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad1, sizeof(float) * 11); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_SetVertexDeclaration(device, decl_onetexcrd); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad2, sizeof(float) * 11); if(i == 3 || i == 2) { ok(hr == D3D_OK, "DrawPrimitiveUP returned (%08x) i = %d\n", hr, i); @@ -6077,12 +6076,12 @@ void test_vshader_input(IDirect3DDevice9 *device) } hr = IDirect3DDevice9_SetVertexDeclaration(device, decl_twotexcrd_rightorder); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad4, sizeof(float) * 11); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_SetVertexDeclaration(device, decl_twotex_wrongidx); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad3, sizeof(float) * 11); if(i == 3 || i == 2) { ok(hr == D3D_OK, "DrawPrimitiveUP returned (%08x) i = %d\n", hr, i); @@ -6091,11 +6090,11 @@ void test_vshader_input(IDirect3DDevice9 *device) } hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %08x\n", hr); } hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); if(i == 3 || i == 2) { color = getPixelColor(device, 160, 360); @@ -6128,13 +6127,13 @@ void test_vshader_input(IDirect3DDevice9 *device) } hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff808080, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %08x\n", hr); /* Now find out if the whole streams are re-read, or just the last active value for the * vertices is used. */ hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %08x\n", hr); if(SUCCEEDED(hr)) { float quad1_modified[] = { @@ -6151,15 +6150,15 @@ void test_vshader_input(IDirect3DDevice9 *device) }; hr = IDirect3DDevice9_SetVertexShader(device, swapped_shader); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %08x\n", hr); hr = IDirect3DDevice9_SetVertexDeclaration(device, decl_twotexcrd); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_POINTLIST, 3, quad1_modified, sizeof(float) * 11); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_SetVertexDeclaration(device, decl_onetexcrd); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad2_modified, sizeof(float) * 11); if(i == 3 || i == 2) { ok(hr == D3D_OK, "DrawPrimitiveUP returned (%08x) i = %d\n", hr, i); @@ -6169,10 +6168,10 @@ void test_vshader_input(IDirect3DDevice9 *device) } hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %08x\n", hr); } hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); color = getPixelColor(device, 480, 350); /* vs_1_1 may fail, accept the clear color. Some drivers also set the undefined streams to 0, accept that @@ -6199,62 +6198,62 @@ void test_vshader_input(IDirect3DDevice9 *device) hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff0000ff, 0.0, 0); if(i == 3) { hr = IDirect3DDevice9_CreateVertexShader(device, texcoord_color_shader_code_3, &texcoord_color_shader); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %08x\n", hr); hr = IDirect3DDevice9_CreateVertexShader(device, color_color_shader_code_3, &color_color_shader); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %08x\n", hr); } else if(i == 2){ hr = IDirect3DDevice9_CreateVertexShader(device, texcoord_color_shader_code_2, &texcoord_color_shader); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %08x\n", hr); hr = IDirect3DDevice9_CreateVertexShader(device, color_color_shader_code_2, &color_color_shader); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %08x\n", hr); } else if(i == 1) { hr = IDirect3DDevice9_CreateVertexShader(device, texcoord_color_shader_code_1, &texcoord_color_shader); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %08x\n", hr); hr = IDirect3DDevice9_CreateVertexShader(device, color_color_shader_code_1, &color_color_shader); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %08x\n", hr); } hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_SetVertexShader(device, texcoord_color_shader); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %08x\n", hr); hr = IDirect3DDevice9_SetVertexDeclaration(device, decl_texcoord_color); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad1_color, sizeof(quad1_color[0])); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_SetVertexShader(device, color_color_shader); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %08x\n", hr); hr = IDirect3DDevice9_SetVertexShaderConstantF(device, 0, normalize, 1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %08x\n", hr); hr = IDirect3DDevice9_SetVertexDeclaration(device, decl_color_ubyte); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad2_color, sizeof(quad2_color[0])); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_SetVertexShaderConstantF(device, 0, no_normalize, 1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %08x\n", hr); hr = IDirect3DDevice9_SetVertexDeclaration(device, decl_color_color); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad3_color, sizeof(quad3_color[0])); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_SetVertexDeclaration(device, decl_color_float); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration returned %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad4_color, sizeof(float) * 7); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %08x\n", hr); } IDirect3DDevice9_SetVertexShader(device, NULL); IDirect3DDevice9_SetVertexDeclaration(device, NULL); hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); color = getPixelColor(device, 160, 360); r = (color & 0x00ff0000) >> 16; @@ -6330,47 +6329,47 @@ static void srgbtexture_test(IDirect3DDevice9 *device) hr = IDirect3DDevice9_CreateTexture(device, 16, 16, 1, 0, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, &texture, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateTexture failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateTexture failed with %08x\n", hr); if(!texture) { skip("Failed to create A8R8G8B8 texture with SRGBREAD\n"); goto out; } hr = IDirect3DTexture9_GetSurfaceLevel(texture, 0, &surface); - ok(hr == D3D_OK, "IDirect3DTexture9_GetSurfaceLevel failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DTexture9_GetSurfaceLevel failed with %08x\n", hr); fill_surface(surface, 0xff7f7f7f); IDirect3DSurface9_Release(surface); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_LIGHTING, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetTexture(device, 0, (IDirect3DBaseTexture9 *) texture); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed with %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_SRGBTEXTURE, TRUE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed with %08x\n", hr); hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_TEX1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, 5 * sizeof(float)); - ok(SUCCEEDED(hr), "DrawPrimitiveUP failed with %s\n", DXGetErrorString9(hr)); + ok(SUCCEEDED(hr), "DrawPrimitiveUP failed with %08x\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %08x\n", hr); } hr = IDirect3DDevice9_SetTexture(device, 0, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed with %08x\n", hr); hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_SRGBTEXTURE, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed with %08x\n", hr); hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); color = getPixelColor(device, 320, 240); ok(color == 0x00363636 || color == 0x00373737, "srgb quad has color %08x, expected 0x00363636\n", color); @@ -6432,36 +6431,36 @@ static void shademode_test(IDirect3DDevice9 *device) hr = IDirect3DDevice9_CreateVertexBuffer(device, sizeof(quad_strip), 0, 0, D3DPOOL_MANAGED, &vb_strip, NULL); - ok(hr == D3D_OK, "CreateVertexBuffer failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "CreateVertexBuffer failed with %08x\n", hr); if (FAILED(hr)) goto bail; hr = IDirect3DDevice9_CreateVertexBuffer(device, sizeof(quad_list), 0, 0, D3DPOOL_MANAGED, &vb_list, NULL); - ok(hr == D3D_OK, "CreateVertexBuffer failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "CreateVertexBuffer failed with %08x\n", hr); if (FAILED(hr)) goto bail; hr = IDirect3DDevice9_SetRenderState(device, D3DRS_LIGHTING, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_DIFFUSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %08x\n", hr); hr = IDirect3DVertexBuffer9_Lock(vb_strip, 0, sizeof(quad_strip), (void **) &data, 0); - ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Lock failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Lock failed with %08x\n", hr); memcpy(data, quad_strip, sizeof(quad_strip)); hr = IDirect3DVertexBuffer9_Unlock(vb_strip); - ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Unlock failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Unlock failed with %08x\n", hr); hr = IDirect3DVertexBuffer9_Lock(vb_list, 0, sizeof(quad_list), (void **) &data, 0); - ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Lock failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Lock failed with %08x\n", hr); memcpy(data, quad_list, sizeof(quad_list)); hr = IDirect3DVertexBuffer9_Unlock(vb_list); - ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Unlock failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Unlock failed with %08x\n", hr); /* Try it first with a TRIANGLESTRIP. Do it with different geometry because * the color fixups we have to do for FLAT shading will be dependent on that. */ hr = IDirect3DDevice9_SetStreamSource(device, 0, vb_strip, 0, sizeof(quad_strip[0])); - ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSource failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSource failed with %08x\n", hr); /* First loop uses a TRIANGLESTRIP geometry, 2nd uses a TRIANGLELIST */ for (j=0; j<2; j++) { @@ -6469,24 +6468,24 @@ static void shademode_test(IDirect3DDevice9 *device) /* Inner loop just changes the D3DRS_SHADEMODE */ for (i=0; i<3; i++) { hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_SHADEMODE, shademode); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_DrawPrimitive(device, primtype, 0, 2); - ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitive failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitive failed with %08x\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %08x\n", hr); } hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); /* Sample two spots from the output */ color0 = getPixelColor(device, 100, 100); /* Inside first triangle */ @@ -6527,16 +6526,16 @@ static void shademode_test(IDirect3DDevice9 *device) } /* Now, do it all over again with a TRIANGLELIST */ hr = IDirect3DDevice9_SetStreamSource(device, 0, vb_list, 0, sizeof(quad_list[0])); - ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSource failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSource failed with %08x\n", hr); primtype = D3DPT_TRIANGLELIST; shademode = D3DSHADE_FLAT; } bail: hr = IDirect3DDevice9_SetStreamSource(device, 0, NULL, 0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSource failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSource failed with %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_SHADEMODE, D3DSHADE_GOURAUD); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); if (vb_strip) IDirect3DVertexBuffer9_Release(vb_strip); @@ -6599,54 +6598,54 @@ static void fog_srgbwrite_test(IDirect3DDevice9 *device) IDirect3D9_Release(d3d); hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffff00, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_FOGENABLE, TRUE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_FOGTABLEMODE, D3DFOG_NONE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_FOGVERTEXMODE, D3DFOG_LINEAR); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_FOGCOLOR, 0xffffffff); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_SRGBWRITEENABLE, TRUE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_CreateVertexShader(device, vshader_code, &vshader); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %08x\n", hr); hr = IDirect3DDevice9_CreatePixelShader(device, pshader_code, &pshader); - ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %08x\n", hr); hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ); - ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF returned %08x\n", hr); hr = IDirect3DDevice9_SetVertexShader(device, vshader); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %08x\n", hr); hr = IDirect3DDevice9_SetPixelShader(device, pshader); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(float) * 3); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %08x\n", hr); } hr = IDirect3DDevice9_SetVertexShader(device, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %08x\n", hr); hr = IDirect3DDevice9_SetPixelShader(device, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %08x\n", hr); IDirect3DPixelShader9_Release(pshader); IDirect3DVertexShader9_Release(vshader); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_FOGENABLE, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_SRGBWRITEENABLE, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); color = getPixelColor(device, 160, 360); ok(color == 0x00808080 || color == 0x007f7f7f || color == 0x00818181, "Fog with D3DRS_SRGBWRITEENABLE returned color 0x%08x, expected 0x00808080\n", color); @@ -6688,13 +6687,13 @@ static void alpha_test(IDirect3DDevice9 *device) 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); - ok(hr == D3D_OK, "Can't get back buffer, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Can't get back buffer, hr = %08x\n", hr); if(!backbuffer) { goto out; } hr = IDirect3DTexture9_GetSurfaceLevel(offscreenTexture, 0, &offscreen); - ok(hr == D3D_OK, "Can't get offscreen surface, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Can't get offscreen surface, hr = %08x\n", hr); if(!offscreen) { goto out; } @@ -6703,15 +6702,15 @@ static void alpha_test(IDirect3DDevice9 *device) ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed, hr = %#08x\n", hr); hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1); - ok(hr == D3D_OK, "SetTextureStageState failed, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "SetTextureStageState failed, hr = %08x\n", hr); hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_COLORARG1, D3DTA_TEXTURE); - ok(hr == D3D_OK, "SetTextureStageState failed, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "SetTextureStageState failed, hr = %08x\n", hr); hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_MINFILTER, D3DTEXF_POINT); ok(SUCCEEDED(hr), "SetSamplerState D3DSAMP_MINFILTER failed (0x%08x)\n", hr); hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_MAGFILTER, D3DTEXF_POINT); ok(SUCCEEDED(hr), "SetSamplerState D3DSAMP_MAGFILTER failed (0x%08x)\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_LIGHTING, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ALPHABLENDENABLE, TRUE); ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState failed, hr = %08x\n", hr); @@ -6966,7 +6965,7 @@ static void fixed_function_decl_test(IDirect3DDevice9 *device) size = max(sizeof(quad1), max(sizeof(quad2), max(sizeof(quad3), max(sizeof(quad4), sizeof(quads))))); hr = IDirect3DDevice9_CreateVertexBuffer(device, size, 0, 0, D3DPOOL_MANAGED, &vb, NULL); - ok(hr == D3D_OK, "CreateVertexBuffer failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "CreateVertexBuffer failed with %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed (%08x)\n", hr); @@ -7044,28 +7043,28 @@ static void fixed_function_decl_test(IDirect3DDevice9 *device) if(SUCCEEDED(hr)) { if(dcl_color) { hr = IDirect3DVertexBuffer9_Lock(vb, 0, sizeof(quad1), (void **) &data, 0); - ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Lock failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Lock failed with %08x\n", hr); memcpy(data, quad1, sizeof(quad1)); hr = IDirect3DVertexBuffer9_Unlock(vb); ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Unlock failed (%08x)\n", hr); hr = IDirect3DDevice9_SetVertexDeclaration(device, dcl_color); ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed (%08x)\n", hr); hr = IDirect3DDevice9_SetStreamSource(device, 0, vb, 0, sizeof(quad1[0])); - ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSource failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSource failed with %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, 0, 2); ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitive failed, hr = %#08x\n", hr); } if(dcl_ubyte) { hr = IDirect3DVertexBuffer9_Lock(vb, 0, sizeof(quad2), (void **) &data, 0); - ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Lock failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Lock failed with %08x\n", hr); memcpy(data, quad2, sizeof(quad2)); hr = IDirect3DVertexBuffer9_Unlock(vb); ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Unlock failed (%08x)\n", hr); hr = IDirect3DDevice9_SetVertexDeclaration(device, dcl_ubyte); ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed (%08x)\n", hr); hr = IDirect3DDevice9_SetStreamSource(device, 0, vb, 0, sizeof(quad2[0])); - ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSource failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSource failed with %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, 0, 2); ok(hr == D3D_OK || hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_DrawPrimitive failed, hr = %#08x\n", hr); @@ -7074,14 +7073,14 @@ static void fixed_function_decl_test(IDirect3DDevice9 *device) if(dcl_short) { hr = IDirect3DVertexBuffer9_Lock(vb, 0, sizeof(quad3), (void **) &data, 0); - ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Lock failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Lock failed with %08x\n", hr); memcpy(data, quad3, sizeof(quad3)); hr = IDirect3DVertexBuffer9_Unlock(vb); ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Unlock failed (%08x)\n", hr); hr = IDirect3DDevice9_SetVertexDeclaration(device, dcl_short); ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed (%08x)\n", hr); hr = IDirect3DDevice9_SetStreamSource(device, 0, vb, 0, sizeof(quad3[0])); - ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSource failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSource failed with %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, 0, 2); ok(hr == D3D_OK || hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_DrawPrimitive failed, hr = %#08x\n", hr); @@ -7090,14 +7089,14 @@ static void fixed_function_decl_test(IDirect3DDevice9 *device) if(dcl_float) { hr = IDirect3DVertexBuffer9_Lock(vb, 0, sizeof(quad4), (void **) &data, 0); - ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Lock failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Lock failed with %08x\n", hr); memcpy(data, quad4, sizeof(quad4)); hr = IDirect3DVertexBuffer9_Unlock(vb); ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Unlock failed (%08x)\n", hr); hr = IDirect3DDevice9_SetVertexDeclaration(device, dcl_float); ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed (%08x)\n", hr); hr = IDirect3DDevice9_SetStreamSource(device, 0, vb, 0, sizeof(quad4[0])); - ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSource failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSource failed with %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, 0, 2); ok(hr == D3D_OK || hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_DrawPrimitive failed, hr = %#08x\n", hr); @@ -7109,7 +7108,7 @@ static void fixed_function_decl_test(IDirect3DDevice9 *device) } hr = IDirect3DDevice9_SetStreamSource(device, 0, NULL, 0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSource failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSource failed with %08x\n", hr); hr = IDirect3DDevice9_SetVertexDeclaration(device, NULL); ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed (%08x)\n", hr); @@ -7136,27 +7135,27 @@ static void fixed_function_decl_test(IDirect3DDevice9 *device) } hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff0000ff, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %08x\n", hr); hr = IDirect3DVertexBuffer9_Lock(vb, 0, sizeof(quad_transformed), (void **) &data, 0); - ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Lock failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Lock failed with %08x\n", hr); memcpy(data, quad_transformed, sizeof(quad_transformed)); hr = IDirect3DVertexBuffer9_Unlock(vb); ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Unlock failed (%08x)\n", hr); hr = IDirect3DDevice9_SetVertexDeclaration(device, dcl_positiont); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed with %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed with %08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_SetStreamSource(device, 0, vb, 0, sizeof(quad_transformed[0])); - ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSource failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSource failed with %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, 0, 2); ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitive failed, hr = %#08x\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed with %08x\n", hr); } IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); @@ -7219,57 +7218,57 @@ static void fixed_function_decl_test(IDirect3DDevice9 *device) } hr = IDirect3DVertexBuffer9_Lock(vb, 0, sizeof(quads), (void **) &data, 0); - ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Lock failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Lock failed with %08x\n", hr); memcpy(data, quads, sizeof(quads)); hr = IDirect3DVertexBuffer9_Unlock(vb); ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Unlock failed (%08x)\n", hr); hr = IDirect3DDevice9_CreateVertexBuffer(device, sizeof(colors), 0, 0, D3DPOOL_MANAGED, &vb2, NULL); - ok(hr == D3D_OK, "CreateVertexBuffer failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "CreateVertexBuffer failed with %08x\n", hr); hr = IDirect3DVertexBuffer9_Lock(vb2, 0, sizeof(colors), (void **) &data, 0); - ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Lock failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Lock failed with %08x\n", hr); memcpy(data, colors, sizeof(colors)); hr = IDirect3DVertexBuffer9_Unlock(vb2); ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Unlock failed (%08x)\n", hr); for(i = 0; i < 2; i++) { hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %08x\n", hr); hr = IDirect3DDevice9_SetStreamSource(device, 0, vb, 0, sizeof(float) * 3); - ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSource failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSource failed with %08x\n", hr); if(i == 0) { hr = IDirect3DDevice9_SetStreamSource(device, 1, vb2, 0, sizeof(DWORD) * 4); } else { hr = IDirect3DDevice9_SetStreamSource(device, 1, vb2, 8, sizeof(DWORD) * 4); } - ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSource failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSource failed with %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %08x\n", hr); ub_ok = FALSE; if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_SetVertexDeclaration(device, dcl_ubyte_2); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed with %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, 0, 2); ok(hr == D3D_OK || hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_DrawPrimitive failed, hr = %#08x\n", hr); ub_ok = SUCCEEDED(hr); hr = IDirect3DDevice9_SetVertexDeclaration(device, dcl_color_2); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed with %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, 4, 2); ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitive failed, hr = %#08x\n", hr); hr = IDirect3DDevice9_SetVertexDeclaration(device, dcl_ubyte_2); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed with %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, 8, 2); ok(hr == D3D_OK || hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_DrawPrimitive failed, hr = %#08x\n", hr); ub_ok = (SUCCEEDED(hr) && ub_ok); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %08x\n", hr); } IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); @@ -7303,9 +7302,9 @@ static void fixed_function_decl_test(IDirect3DDevice9 *device) } hr = IDirect3DDevice9_SetStreamSource(device, 0, NULL, 0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSource failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSource failed with %08x\n", hr); hr = IDirect3DDevice9_SetStreamSource(device, 1, NULL, 0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSource failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSource failed with %08x\n", hr); IDirect3DVertexBuffer9_Release(vb2); out: @@ -7365,31 +7364,31 @@ static void test_vshader_float16(IDirect3DDevice9 *device) }; hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff102030, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed, hr=%08x\n", hr); hr = IDirect3DDevice9_CreateVertexDeclaration(device, decl_elements, &vdecl); - ok(SUCCEEDED(hr), "IDirect3DDevice9_CreateVertexDeclaration failed hr=%s\n", DXGetErrorString9(hr)); + ok(SUCCEEDED(hr), "IDirect3DDevice9_CreateVertexDeclaration failed hr=%08x\n", hr); hr = IDirect3DDevice9_CreateVertexShader(device, shader_code, &shader); - ok(SUCCEEDED(hr), "IDirect3DDevice9_CreateVertexShader failed hr=%s\n", DXGetErrorString9(hr)); + ok(SUCCEEDED(hr), "IDirect3DDevice9_CreateVertexShader failed hr=%08x\n", hr); hr = IDirect3DDevice9_SetVertexShader(device, shader); - ok(SUCCEEDED(hr), "IDirect3DDevice9_SetVertexShader failed hr=%s\n", DXGetErrorString9(hr)); + ok(SUCCEEDED(hr), "IDirect3DDevice9_SetVertexShader failed hr=%08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed hr=%08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_SetVertexDeclaration(device, vdecl); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed, hr=%08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad + 0, sizeof(quad[0])); - ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad + 4, sizeof(quad[0])); - ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad + 8, sizeof(quad[0])); - ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad + 12, sizeof(quad[0])); - ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%08x\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed, hr=%08x\n", hr); } IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); color = getPixelColor(device, 480, 360); @@ -7406,18 +7405,18 @@ static void test_vshader_float16(IDirect3DDevice9 *device) "Input 0x00000000, 0x00003c00 returned color %08x, expected 0x000000ff\n", color); hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff102030, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed, hr=%08x\n", hr); hr = IDirect3DDevice9_CreateVertexBuffer(device, sizeof(quad), 0, 0, D3DPOOL_MANAGED, &buffer, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexBuffer failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexBuffer failed, hr=%08x\n", hr); hr = IDirect3DVertexBuffer9_Lock(buffer, 0, sizeof(quad), (void **) &data, 0); - ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Lock failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Lock failed, hr=%08x\n", hr); memcpy(data, quad, sizeof(quad)); hr = IDirect3DVertexBuffer9_Unlock(buffer); - ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Unlock failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Unlock failed, hr=%08x\n", hr); hr = IDirect3DDevice9_SetStreamSource(device, 0, buffer, 0, sizeof(quad[0])); - ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSource failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSource failed, hr=%08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed (%08x)\n", hr); @@ -7432,7 +7431,7 @@ static void test_vshader_float16(IDirect3DDevice9 *device) ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitive failed, hr = %#08x\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed, hr=%08x\n", hr); } IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); @@ -7450,11 +7449,11 @@ static void test_vshader_float16(IDirect3DDevice9 *device) "Input 0x00000000, 0x00003c00 returned color %08x, expected 0x000000ff\n", color); hr = IDirect3DDevice9_SetStreamSource(device, 0, NULL, 0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSource failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSource failed, hr=%08x\n", hr); hr = IDirect3DDevice9_SetVertexDeclaration(device, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed, hr=%08x\n", hr); IDirect3DDevice9_SetVertexShader(device, NULL); - ok(SUCCEEDED(hr), "IDirect3DDevice9_SetVertexShader failed hr=%s\n", DXGetErrorString9(hr)); + ok(SUCCEEDED(hr), "IDirect3DDevice9_SetVertexShader failed hr=%08x\n", hr); IDirect3DVertexDeclaration9_Release(vdecl); IDirect3DVertexShader9_Release(shader); @@ -7478,7 +7477,7 @@ static void conditional_np2_repeat_test(IDirect3DDevice9 *device) memset(&caps, 0, sizeof(caps)); hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); - ok(hr == D3D_OK, "IDirect3DDevice9_GetDeviceCaps failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_GetDeviceCaps failed hr=%08x\n", hr); if(!(caps.TextureCaps & D3DPTEXTURECAPS_POW2)) { /* NP2 conditional requires the POW2 flag. Check that while we're at it */ ok((caps.TextureCaps & D3DPTEXTURECAPS_NONPOW2CONDITIONAL) == 0, @@ -7491,14 +7490,14 @@ static void conditional_np2_repeat_test(IDirect3DDevice9 *device) } hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff000000, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed, hr=%08x\n", hr); hr = IDirect3DDevice9_CreateTexture(device, 10, 10, 1, 0, D3DFMT_X8R8G8B8, D3DPOOL_MANAGED, &texture, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateTexture failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateTexture failed hr=%08x\n", hr); memset(&rect, 0, sizeof(rect)); hr = IDirect3DTexture9_LockRect(texture, 0, &rect, NULL, 0); - ok(hr == D3D_OK, "IDirect3DTexture9_LockRect failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DTexture9_LockRect failed hr=%08x\n", hr); for(y = 0; y < 10; y++) { for(x = 0; x < 10; x++) { dst = (DWORD *) ((BYTE *) rect.pBits + y * rect.Pitch + x * sizeof(DWORD)); @@ -7510,25 +7509,25 @@ static void conditional_np2_repeat_test(IDirect3DDevice9 *device) } } hr = IDirect3DTexture9_UnlockRect(texture, 0); - ok(hr == D3D_OK, "IDirect3DTexture9_UnlockRect failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DTexture9_UnlockRect failed hr=%08x\n", hr); hr = IDirect3DDevice9_SetTexture(device, 0, (IDirect3DBaseTexture9 *) texture); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed hr=%08x\n", hr); hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_ADDRESSU, D3DTADDRESS_WRAP); - ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed hr=%08x\n", hr); hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_ADDRESSV, D3DTADDRESS_WRAP); - ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed hr=%08x\n", hr); hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_TEX1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed, hr=%08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed hr=%08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(float) * 5); - ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%08x\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed hr=%08x\n", hr); } IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); @@ -7575,7 +7574,7 @@ static void conditional_np2_repeat_test(IDirect3DDevice9 *device) ok(color == 0x00ff0000, "NP2: Pixel 504, 380 has color %08x, expected 0x00ff0000\n", color); hr = IDirect3DDevice9_SetTexture(device, 0, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed hr=%08x\n", hr); IDirect3DTexture9_Release(texture); } @@ -7621,53 +7620,53 @@ static void vFace_register_test(IDirect3DDevice9 *device) }; hr = IDirect3DDevice9_CreatePixelShader(device, shader_code, &shader); - ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader failed hr=%08x\n", hr); hr = IDirect3DDevice9_CreateTexture(device, 128, 128, 1, D3DUSAGE_RENDERTARGET, D3DFMT_X8R8G8B8, D3DPOOL_DEFAULT, &texture, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateTexture failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateTexture failed hr=%08x\n", hr); hr = IDirect3DTexture9_GetSurfaceLevel(texture, 0, &surface); - ok(hr == D3D_OK, "IDirect3DTexture9_GetSurfaceLevel failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DTexture9_GetSurfaceLevel failed hr=%08x\n", hr); hr = IDirect3DDevice9_SetPixelShader(device, shader); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader failed hr=%08x\n", hr); hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ); - ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed hr=%08x\n", hr); hr = IDirect3DDevice9_GetBackBuffer(device, 0, 0, D3DBACKBUFFER_TYPE_MONO, &backbuffer); - ok(hr == D3D_OK, "IDirect3DDevice9_GetBackBuffer failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_GetBackBuffer failed hr=%08x\n", hr); hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff0000ff, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed, hr=%08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed hr=%08x\n", hr); if(SUCCEEDED(hr)) { /* First, draw to the texture and the back buffer to test both offscreen and onscreen cases */ hr = IDirect3DDevice9_SetRenderTarget(device, 0, surface); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderTarget failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderTarget failed, hr=%08x\n", hr); hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff0000ff, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed, hr=%08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLELIST, 4, quad, sizeof(float) * 3); - ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%08x\n", hr); hr = IDirect3DDevice9_SetRenderTarget(device, 0, backbuffer); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderTarget failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderTarget failed, hr=%08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLELIST, 4, quad, sizeof(float) * 3); - ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%08x\n", hr); /* Blit the texture onto the back buffer to make it visible */ hr = IDirect3DDevice9_SetPixelShader(device, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader failed, hr=%08x\n", hr); hr = IDirect3DDevice9_SetTexture(device, 0, (IDirect3DBaseTexture9 *) texture); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed, hr=%08x\n", hr); hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTextureStageState failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTextureStageState failed, hr=%08x\n", hr); hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_COLORARG1, D3DTA_TEXTURE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTextureStageState failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTextureStageState failed, hr=%08x\n", hr); hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_TEX1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed hr=%08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, blit, sizeof(float) * 5); - ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%08x\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed hr=%08x\n", hr); } IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); @@ -7680,7 +7679,7 @@ static void vFace_register_test(IDirect3DDevice9 *device) color = getPixelColor(device, 480, 120); ok(color == 0x00ff0000, "vFace: Offscreen rendered front facing quad has color 0x%08x, expected 0x00ff0000\n", color); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader failed hr=%08x\n", hr); IDirect3DDevice9_SetTexture(device, 0, NULL); IDirect3DPixelShader9_Release(shader); IDirect3DSurface9_Release(surface); @@ -7717,7 +7716,7 @@ static void fixed_function_bumpmap_test(IDirect3DDevice9 *device) memset(&caps, 0, sizeof(caps)); hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); - ok(hr == D3D_OK, "IDirect3DDevice9_GetDeviceCaps failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_GetDeviceCaps failed hr=%08x\n", hr); if(!(caps.TextureOpCaps & D3DTEXOPCAPS_BUMPENVMAP)) { skip("D3DTEXOPCAPS_BUMPENVMAP not set, skipping bumpmap tests\n"); return; @@ -7875,7 +7874,7 @@ static void stencil_cull_test(IDirect3DDevice9 *device) { return; } hr = IDirect3DSurface9_GetDesc(depthstencil, &desc); - ok(hr == D3D_OK, "IDirect3DSurface9_GetDesc failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DSurface9_GetDesc failed with %08x\n", hr); IDirect3DSurface9_Release(depthstencil); if(desc.Format != D3DFMT_D24S8 && desc.Format != D3DFMT_D24X4S4) { skip("No 4 or 8 bit stencil surface\n"); @@ -7883,92 +7882,92 @@ static void stencil_cull_test(IDirect3DDevice9 *device) { } hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_STENCIL, 0x00ff0000, 0.0, 0x8); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %08x\n", hr); IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_STENCILFAIL, D3DSTENCILOP_INCR); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_STENCILZFAIL, D3DSTENCILOP_DECR); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_STENCILPASS, D3DSTENCILOP_REPLACE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_STENCILREF, 0x3); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_CCW_STENCILFAIL, D3DSTENCILOP_REPLACE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_CCW_STENCILZFAIL, D3DSTENCILOP_DECR); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_CCW_STENCILPASS, D3DSTENCILOP_INCR); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_STENCILENABLE, TRUE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_TWOSIDEDSTENCILMODE, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); /* First pass: Fill the stencil buffer with some values... */ hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_SetRenderState(device, D3DRS_CULLMODE, D3DCULL_CW); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0 /* MinIndex */, 4 /* NumVerts */, 1 /*PrimCount */, indices_cw, D3DFMT_INDEX16, quad1, sizeof(float) * 3); hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0 /* MinIndex */, 4 /* NumVerts */, 1 /*PrimCount */, indices_ccw, D3DFMT_INDEX16, quad1, sizeof(float) * 3); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_TWOSIDEDSTENCILMODE, TRUE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_CULLMODE, D3DCULL_NONE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0 /* MinIndex */, 4 /* NumVerts */, 1 /*PrimCount */, indices_cw, D3DFMT_INDEX16, quad2, sizeof(float) * 3); hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0 /* MinIndex */, 4 /* NumVerts */, 1 /*PrimCount */, indices_ccw, D3DFMT_INDEX16, quad2, sizeof(float) * 3); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_CULLMODE, D3DCULL_CW); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0 /* MinIndex */, 4 /* NumVerts */, 1 /*PrimCount */, indices_cw, D3DFMT_INDEX16, quad3, sizeof(float) * 3); hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0 /* MinIndex */, 4 /* NumVerts */, 1 /*PrimCount */, indices_ccw, D3DFMT_INDEX16, quad3, sizeof(float) * 3); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_CULLMODE, D3DCULL_CCW); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0 /* MinIndex */, 4 /* NumVerts */, 1 /*PrimCount */, indices_cw, D3DFMT_INDEX16, quad4, sizeof(float) * 3); hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0 /* MinIndex */, 4 /* NumVerts */, 1 /*PrimCount */, indices_ccw, D3DFMT_INDEX16, quad4, sizeof(float) * 3); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %08x\n", hr); } - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_STENCILZFAIL, D3DSTENCILOP_KEEP); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_STENCILPASS, D3DSTENCILOP_KEEP); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_STENCILFAIL, D3DSTENCILOP_KEEP); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_TWOSIDEDSTENCILMODE, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_CULLMODE, D3DCULL_NONE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_STENCILFUNC, D3DCMP_EQUAL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); /* 2nd pass: Make the stencil values visible */ hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %08x\n", hr); if(SUCCEEDED(hr)) { IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_DIFFUSE); for(i = 0; i < 16; i++) { hr = IDirect3DDevice9_SetRenderState(device, D3DRS_STENCILREF, i); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); painter[0].diffuse = (i * 16); /* Creates shades of blue */ painter[1].diffuse = (i * 16); @@ -7978,14 +7977,14 @@ static void stencil_cull_test(IDirect3DDevice9 *device) { ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); } hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %08x\n", hr); } hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_STENCILENABLE, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); color = getPixelColor(device, 160, 420); ok(color == 0x00000030, "CCW triangle, twoside FALSE, cull cw, replace, has color 0x%08x, expected 0x00000030\n", color); @@ -8046,27 +8045,27 @@ static void vpos_register_test(IDirect3DDevice9 *device) DWORD *pos; hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff0000ff, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed, hr=%08x\n", hr); hr = IDirect3DDevice9_CreatePixelShader(device, shader_code, &shader); - ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader failed hr=%08x\n", hr); hr = IDirect3DDevice9_CreatePixelShader(device, shader_frac_code, &shader_frac); - ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader failed hr=%08x\n", hr); hr = IDirect3DDevice9_SetPixelShader(device, shader); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader failed hr=%08x\n", hr); hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ); - ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed hr=%08x\n", hr); hr = IDirect3DDevice9_GetBackBuffer(device, 0, 0, D3DBACKBUFFER_TYPE_MONO, &backbuffer); - ok(hr == D3D_OK, "IDirect3DDevice9_GetBackBuffer failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_GetBackBuffer failed hr=%08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed hr=%08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_SetPixelShaderConstantF(device, 0, constant, 1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShaderConstantF failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShaderConstantF failed hr=%08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(float) * 5); - ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%08x\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed hr=%08x\n", hr); } IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); @@ -8082,22 +8081,22 @@ static void vpos_register_test(IDirect3DDevice9 *device) hr = IDirect3DDevice9_CreateRenderTarget(device, 32, 32, D3DFMT_X8R8G8B8, 0, 0, TRUE, &surface, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateRenderTarget failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateRenderTarget failed hr=%08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed hr=%08x\n", hr); if(SUCCEEDED(hr)) { constant[2] = 16; constant[3] = 16; hr = IDirect3DDevice9_SetPixelShaderConstantF(device, 0, constant, 1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShaderConstantF failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShaderConstantF failed hr=%08x\n", hr); hr = IDirect3DDevice9_SetRenderTarget(device, 0, surface); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderTarget failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderTarget failed, hr=%08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(float) * 5); - ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%08x\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed hr=%08x\n", hr); } hr = IDirect3DSurface9_LockRect(surface, &lr, NULL, D3DLOCK_READONLY); - ok(hr == D3D_OK, "IDirect3DSurface9_LockRect failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DSurface9_LockRect failed, hr=%08x\n", hr); pos = (DWORD *) (((BYTE *) lr.pBits) + 14 * lr.Pitch + 14 * sizeof(DWORD)); color = *pos & 0x00ffffff; @@ -8113,38 +8112,38 @@ static void vpos_register_test(IDirect3DDevice9 *device) ok(color == 0x0000ffff, "Pixel 18/18 has color 0x%08x, expected 0x0000ffff\n", color); hr = IDirect3DSurface9_UnlockRect(surface); - ok(hr == D3D_OK, "IDirect3DSurface9_UnlockRect failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DSurface9_UnlockRect failed, hr=%08x\n", hr); /* Test the fraction value of vPos. This is tested with the offscreen target and not the backbuffer to * have full control over the multisampling setting inside this test */ hr = IDirect3DDevice9_SetPixelShader(device, shader_frac); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader failed hr=%08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed hr=%08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff0000ff, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed, hr=%08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(float) * 5); - ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%08x\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed hr=%08x\n", hr); } hr = IDirect3DDevice9_SetRenderTarget(device, 0, backbuffer); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderTarget failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderTarget failed, hr=%08x\n", hr); hr = IDirect3DSurface9_LockRect(surface, &lr, NULL, D3DLOCK_READONLY); - ok(hr == D3D_OK, "IDirect3DSurface9_LockRect failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DSurface9_LockRect failed, hr=%08x\n", hr); pos = (DWORD *) (((BYTE *) lr.pBits) + 14 * lr.Pitch + 14 * sizeof(DWORD)); color = *pos & 0x00ffffff; ok(color == 0x00000000, "vPos fraction test has color 0x%08x, expected 0x00000000\n", color); hr = IDirect3DSurface9_UnlockRect(surface); - ok(hr == D3D_OK, "IDirect3DSurface9_UnlockRect failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DSurface9_UnlockRect failed, hr=%08x\n", hr); hr = IDirect3DDevice9_SetPixelShader(device, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader failed hr=%08x\n", hr); IDirect3DPixelShader9_Release(shader); IDirect3DPixelShader9_Release(shader_frac); if(surface) IDirect3DSurface9_Release(surface); @@ -8182,64 +8181,64 @@ static void pointsize_test(IDirect3DDevice9 *device) memset(&caps, 0, sizeof(caps)); hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); - ok(hr == D3D_OK, "IDirect3DDevice9_GetDeviceCaps failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_GetDeviceCaps failed hr=%08x\n", hr); if(caps.MaxPointSize < 32.0) { skip("MaxPointSize < 32.0, skipping(MaxPointsize = %f)\n", caps.MaxPointSize); return; } hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xff0000ff, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed, hr=%08x\n", hr); hr = IDirect3DDevice9_SetTransform(device, D3DTS_PROJECTION, &matrix); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed, hr=%08x\n", hr); hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ); - ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed hr=%08x\n", hr); hr = IDirect3DDevice9_GetRenderState(device, D3DRS_POINTSIZE, (DWORD *) &ptsize_orig); - ok(hr == D3D_OK, "IDirect3DDevice9_GetRenderState failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_GetRenderState failed hr=%08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed hr=%08x\n", hr); if(SUCCEEDED(hr)) { ptsize = 16.0; hr = IDirect3DDevice9_SetRenderState(device, D3DRS_POINTSIZE, *((DWORD *) (&ptsize))); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState failed, hr=%08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_POINTLIST, 1, &vertices[0], sizeof(float) * 3); - ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%08x\n", hr); ptsize = 32.0; hr = IDirect3DDevice9_SetRenderState(device, D3DRS_POINTSIZE, *((DWORD *) (&ptsize))); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState failed, hr=%08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_POINTLIST, 1, &vertices[3], sizeof(float) * 3); - ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%08x\n", hr); ptsize = 31.5; hr = IDirect3DDevice9_SetRenderState(device, D3DRS_POINTSIZE, *((DWORD *) (&ptsize))); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState failed, hr=%08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_POINTLIST, 1, &vertices[6], sizeof(float) * 3); - ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%08x\n", hr); if(caps.MaxPointSize >= 64.0) { ptsize = 64.0; hr = IDirect3DDevice9_SetRenderState(device, D3DRS_POINTSIZE, *((DWORD *) (&ptsize))); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState failed, hr=%08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_POINTLIST, 1, &vertices[9], sizeof(float) * 3); - ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%08x\n", hr); ptsize = 63.75; hr = IDirect3DDevice9_SetRenderState(device, D3DRS_POINTSIZE, *((DWORD *) (&ptsize))); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState failed, hr=%08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_POINTLIST, 1, &vertices[15], sizeof(float) * 3); - ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%08x\n", hr); } ptsize = 1.0; hr = IDirect3DDevice9_SetRenderState(device, D3DRS_POINTSIZE, *((DWORD *) (&ptsize))); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState failed, hr=%08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_POINTLIST, 1, &vertices[12], sizeof(float) * 3); - ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%08x\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed hr=%08x\n", hr); } IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); color = getPixelColor(device, 64-9, 64-9); @@ -8317,9 +8316,9 @@ static void pointsize_test(IDirect3DDevice9 *device) ok(color == 0x000000ff, "pSize: Pixel (320+1),(64+1) has color 0x%08x, expected 0x000000ff\n", color); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_POINTSIZE, *((DWORD *) (&ptsize_orig))); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState failed hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState failed hr=%08x\n", hr); hr = IDirect3DDevice9_SetTransform(device, D3DTS_PROJECTION, &identity); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed, hr=%08x\n", hr); } static void multiple_rendertargets_test(IDirect3DDevice9 *device) @@ -8358,68 +8357,68 @@ static void multiple_rendertargets_test(IDirect3DDevice9 *device) memset(&caps, 0, sizeof(caps)); hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); - ok(hr == D3D_OK, "IDirect3DDevice9_GetCaps failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_GetCaps failed, hr=%08x\n", hr); if(caps.NumSimultaneousRTs < 2) { skip("Only 1 simultaneous render target supported, skipping MRT test\n"); return; } hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xffff0000, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed, hr=%08x\n", hr); hr = IDirect3DDevice9_CreateTexture(device, 16, 16, 1, D3DUSAGE_RENDERTARGET, D3DFMT_X8R8G8B8, D3DPOOL_DEFAULT, &tex1, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateTexture failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateTexture failed, hr=%08x\n", hr); hr = IDirect3DDevice9_CreateTexture(device, 16, 16, 1, D3DUSAGE_RENDERTARGET, D3DFMT_X8R8G8B8, D3DPOOL_DEFAULT, &tex2, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateTexture failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateTexture failed, hr=%08x\n", hr); hr = IDirect3DDevice9_CreatePixelShader(device, shader_code, &ps); - ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader failed, hr=%08x\n", hr); hr = IDirect3DDevice9_GetRenderTarget(device, 0, &backbuf); - ok(hr == D3D_OK, "IDirect3DDevice9_GetRenderTarget failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_GetRenderTarget failed, hr=%08x\n", hr); hr = IDirect3DTexture9_GetSurfaceLevel(tex1, 0, &surf1); - ok(hr == D3D_OK, "IDirect3DTexture9_GetSurfaceLevel failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DTexture9_GetSurfaceLevel failed, hr=%08x\n", hr); hr = IDirect3DTexture9_GetSurfaceLevel(tex2, 0, &surf2); - ok(hr == D3D_OK, "IDirect3DTexture9_GetSurfaceLevel failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DTexture9_GetSurfaceLevel failed, hr=%08x\n", hr); hr = IDirect3DDevice9_SetPixelShader(device, ps); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader failed, hr=%08x\n", hr); hr = IDirect3DDevice9_SetRenderTarget(device, 0, surf1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderTarget failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderTarget failed, hr=%08x\n", hr); hr = IDirect3DDevice9_SetRenderTarget(device, 1, surf2); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderTarget failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderTarget failed, hr=%08x\n", hr); hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ); - ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed, hr=%08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed, hr=%08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, 3 * sizeof(float)); - ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%08x\n", hr); hr = IDirect3DDevice9_SetPixelShader(device, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader failed, hr=%08x\n", hr); hr = IDirect3DDevice9_SetRenderTarget(device, 0, backbuf); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderTarget failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderTarget failed, hr=%08x\n", hr); hr = IDirect3DDevice9_SetRenderTarget(device, 1, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderTarget failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderTarget failed, hr=%08x\n", hr); hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_TEX1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed, hr=%08x\n", hr); hr = IDirect3DDevice9_SetTexture(device, 0, (IDirect3DBaseTexture9 *) tex1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed, hr=%08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, &texquad[0], 5 * sizeof(float)); - ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%08x\n", hr); hr = IDirect3DDevice9_SetTexture(device, 0, (IDirect3DBaseTexture9 *) tex2); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed, hr=%08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, &texquad[20], 5 * sizeof(float)); - ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed, hr=%08x\n", hr); hr = IDirect3DDevice9_SetTexture(device, 0, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed, hr=%08x\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed, hr=%s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed, hr=%08x\n", hr); } IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); @@ -8490,7 +8489,7 @@ static void pixelshader_blending_test(IDirect3DDevice9 *device) IDirect3DDevice9_GetDirect3D(device, &d3d); 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 = %08x\n", hr); if(!backbuffer) { goto out; } @@ -8504,42 +8503,42 @@ static void pixelshader_blending_test(IDirect3DDevice9 *device) } hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 0.0, 0); - ok(hr == D3D_OK, "Clear failed, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Clear failed, hr = %08x\n", hr); hr = IDirect3DDevice9_CreateTexture(device, 128, 128, 1, D3DUSAGE_RENDERTARGET, fmt, D3DPOOL_DEFAULT, &offscreenTexture, NULL); - ok(hr == D3D_OK || hr == 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 = %08x\n", hr); if(!offscreenTexture) { continue; } hr = IDirect3DTexture9_GetSurfaceLevel(offscreenTexture, 0, &offscreen); - ok(hr == D3D_OK, "Can't get offscreen surface, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Can't get offscreen surface, hr = %08x\n", hr); if(!offscreen) { continue; } hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_DIFFUSE); - ok(hr == D3D_OK, "SetFVF failed, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "SetFVF failed, hr = %08x\n", hr); hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1); - ok(hr == D3D_OK, "SetTextureStageState failed, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "SetTextureStageState failed, hr = %08x\n", hr); hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_COLORARG1, D3DTA_TEXTURE); - ok(hr == D3D_OK, "SetTextureStageState failed, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "SetTextureStageState failed, hr = %08x\n", hr); hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_MINFILTER, D3DTEXF_POINT); ok(SUCCEEDED(hr), "SetSamplerState D3DSAMP_MINFILTER failed (0x%08x)\n", hr); hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_MAGFILTER, D3DTEXF_POINT); ok(SUCCEEDED(hr), "SetSamplerState D3DSAMP_MAGFILTER failed (0x%08x)\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_LIGHTING, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); /* Below we will draw two quads with different colors and try to blend them together. * The result color is compared with the expected outcome. */ if(IDirect3DDevice9_BeginScene(device) == D3D_OK) { hr = IDirect3DDevice9_SetRenderTarget(device, 0, offscreen); - ok(hr == D3D_OK, "SetRenderTarget failed, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "SetRenderTarget failed, hr = %08x\n", hr); hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x00ffffff, 0.0, 0); - ok(hr == D3D_OK, "Clear failed, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "Clear failed, hr = %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ALPHABLENDENABLE, TRUE); ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState failed, hr = %08x\n", hr); @@ -8566,16 +8565,16 @@ static void pixelshader_blending_test(IDirect3DDevice9 *device) /* Prepare rendering the 'blended' texture quad to the backbuffer */ hr = IDirect3DDevice9_SetRenderTarget(device, 0, backbuffer); - ok(hr == D3D_OK, "SetRenderTarget failed, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "SetRenderTarget failed, hr = %08x\n", hr); hr = IDirect3DDevice9_SetTexture(device, 0, (IDirect3DBaseTexture9 *) offscreenTexture); - ok(hr == D3D_OK, "SetTexture failed, %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "SetTexture failed, %08x\n", hr); hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_TEX1); - ok(hr == D3D_OK, "SetFVF failed, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "SetFVF failed, hr = %08x\n", hr); /* This time with the texture */ hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(quad[0])); - ok(hr == D3D_OK, "DrawPrimitiveUP failed, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "DrawPrimitiveUP failed, hr = %08x\n", hr); IDirect3DDevice9_EndScene(device); } @@ -8636,50 +8635,50 @@ static void tssargtemp_test(IDirect3DDevice9 *device) memset(&caps, 0, sizeof(caps)); hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); - ok(hr == D3D_OK, "IDirect3DDevice9_GetDeviceCaps failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_GetDeviceCaps failed with %08x\n", hr); if(!(caps.PrimitiveMiscCaps & D3DPMISCCAPS_TSSARGTEMP)) { skip("D3DPMISCCAPS_TSSARGTEMP not supported\n"); return; } hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff000000, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %08x\n", hr); hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1); - ok(hr == D3D_OK, "SetTextureStageState failed, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "SetTextureStageState failed, hr = %08x\n", hr); hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_COLORARG1, D3DTA_DIFFUSE); - ok(hr == D3D_OK, "SetTextureStageState failed, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "SetTextureStageState failed, hr = %08x\n", hr); hr = IDirect3DDevice9_SetTextureStageState(device, 1, D3DTSS_COLOROP, D3DTOP_SELECTARG1); - ok(hr == D3D_OK, "SetTextureStageState failed, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "SetTextureStageState failed, hr = %08x\n", hr); hr = IDirect3DDevice9_SetTextureStageState(device, 1, D3DTSS_COLORARG1, D3DTA_TFACTOR); - ok(hr == D3D_OK, "SetTextureStageState failed, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "SetTextureStageState failed, hr = %08x\n", hr); hr = IDirect3DDevice9_SetTextureStageState(device, 1, D3DTSS_RESULTARG, D3DTA_TEMP); - ok(hr == D3D_OK, "SetTextureStageState failed, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "SetTextureStageState failed, hr = %08x\n", hr); hr = IDirect3DDevice9_SetTextureStageState(device, 2, D3DTSS_COLOROP, D3DTOP_ADD); - ok(hr == D3D_OK, "SetTextureStageState failed, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "SetTextureStageState failed, hr = %08x\n", hr); hr = IDirect3DDevice9_SetTextureStageState(device, 2, D3DTSS_COLORARG1, D3DTA_CURRENT); - ok(hr == D3D_OK, "SetTextureStageState failed, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "SetTextureStageState failed, hr = %08x\n", hr); hr = IDirect3DDevice9_SetTextureStageState(device, 2, D3DTSS_COLORARG2, D3DTA_TEMP); - ok(hr == D3D_OK, "SetTextureStageState failed, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "SetTextureStageState failed, hr = %08x\n", hr); hr = IDirect3DDevice9_SetTextureStageState(device, 3, D3DTSS_COLOROP, D3DTOP_DISABLE); - ok(hr == D3D_OK, "SetTextureStageState failed, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "SetTextureStageState failed, hr = %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_TEXTUREFACTOR, 0x0000ff00); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState failed, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState failed, hr = %08x\n", hr); hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_DIFFUSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed, hr = %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed, hr = %08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed, hr = %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(quad[0])); - ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed with %08x\n", hr); } IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); color = getPixelColor(device, 320, 240); @@ -8687,15 +8686,15 @@ static void tssargtemp_test(IDirect3DDevice9 *device) /* Set stage 1 back to default */ hr = IDirect3DDevice9_SetTextureStageState(device, 1, D3DTSS_RESULTARG, D3DTA_CURRENT); - ok(hr == D3D_OK, "SetTextureStageState failed, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "SetTextureStageState failed, hr = %08x\n", hr); hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_DISABLE); - ok(hr == D3D_OK, "SetTextureStageState failed, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "SetTextureStageState failed, hr = %08x\n", hr); hr = IDirect3DDevice9_SetTextureStageState(device, 1, D3DTSS_COLOROP, D3DTOP_DISABLE); - ok(hr == D3D_OK, "SetTextureStageState failed, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "SetTextureStageState failed, hr = %08x\n", hr); hr = IDirect3DDevice9_SetTextureStageState(device, 2, D3DTSS_COLOROP, D3DTOP_DISABLE); - ok(hr == D3D_OK, "SetTextureStageState failed, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "SetTextureStageState failed, hr = %08x\n", hr); hr = IDirect3DDevice9_SetTextureStageState(device, 3, D3DTSS_COLOROP, D3DTOP_DISABLE); - ok(hr == D3D_OK, "SetTextureStageState failed, hr = %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "SetTextureStageState failed, hr = %08x\n", hr); } struct testdata @@ -8799,53 +8798,53 @@ static void stream_test(IDirect3DDevice9 *device) /* set the default value because it isn't done in wine? */ hr = IDirect3DDevice9_SetStreamSourceFreq(device, 1, 1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSourceFreq failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSourceFreq failed with %08x\n", hr); /* check for D3DSTREAMSOURCE_INDEXEDDATA at stream0 */ hr = IDirect3DDevice9_SetStreamSourceFreq(device, 0, (D3DSTREAMSOURCE_INSTANCEDATA | 1)); - ok(hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_SetStreamSourceFreq failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_SetStreamSourceFreq failed with %08x\n", hr); /* check wrong cases */ hr = IDirect3DDevice9_SetStreamSourceFreq(device, 1, 0); - ok(hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_SetStreamSourceFreq failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_SetStreamSourceFreq failed with %08x\n", hr); hr = IDirect3DDevice9_GetStreamSourceFreq(device, 1, &ind); - ok(hr == D3D_OK && ind == 1, "IDirect3DDevice9_GetStreamSourceFreq failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK && ind == 1, "IDirect3DDevice9_GetStreamSourceFreq failed with %08x\n", hr); hr = IDirect3DDevice9_SetStreamSourceFreq(device, 1, 2); - ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSourceFreq failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSourceFreq failed with %08x\n", hr); hr = IDirect3DDevice9_GetStreamSourceFreq(device, 1, &ind); - ok(hr == D3D_OK && ind == 2, "IDirect3DDevice9_GetStreamSourceFreq failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK && ind == 2, "IDirect3DDevice9_GetStreamSourceFreq failed with %08x\n", hr); hr = IDirect3DDevice9_SetStreamSourceFreq(device, 1, (D3DSTREAMSOURCE_INDEXEDDATA | 0)); - ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSourceFreq failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSourceFreq failed with %08x\n", hr); hr = IDirect3DDevice9_GetStreamSourceFreq(device, 1, &ind); - ok(hr == D3D_OK && ind == (D3DSTREAMSOURCE_INDEXEDDATA | 0), "IDirect3DDevice9_GetStreamSourceFreq failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK && ind == (D3DSTREAMSOURCE_INDEXEDDATA | 0), "IDirect3DDevice9_GetStreamSourceFreq failed with %08x\n", hr); hr = IDirect3DDevice9_SetStreamSourceFreq(device, 1, (D3DSTREAMSOURCE_INSTANCEDATA | 0)); - ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSourceFreq failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSourceFreq failed with %08x\n", hr); hr = IDirect3DDevice9_GetStreamSourceFreq(device, 1, &ind); - ok(hr == D3D_OK && ind == (0 | D3DSTREAMSOURCE_INSTANCEDATA), "IDirect3DDevice9_GetStreamSourceFreq failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK && ind == (0 | D3DSTREAMSOURCE_INSTANCEDATA), "IDirect3DDevice9_GetStreamSourceFreq failed with %08x\n", hr); hr = IDirect3DDevice9_SetStreamSourceFreq(device, 1, (D3DSTREAMSOURCE_INSTANCEDATA | D3DSTREAMSOURCE_INDEXEDDATA | 0)); - ok(hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_SetStreamSourceFreq failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_SetStreamSourceFreq failed with %08x\n", hr); hr = IDirect3DDevice9_GetStreamSourceFreq(device, 1, &ind); - ok(hr == D3D_OK && ind == (0 | D3DSTREAMSOURCE_INSTANCEDATA), "IDirect3DDevice9_GetStreamSourceFreq failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK && ind == (0 | D3DSTREAMSOURCE_INSTANCEDATA), "IDirect3DDevice9_GetStreamSourceFreq failed with %08x\n", hr); /* set the default value back */ hr = IDirect3DDevice9_SetStreamSourceFreq(device, 1, 1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSourceFreq failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSourceFreq failed with %08x\n", hr); /* create all VertexBuffers*/ hr = IDirect3DDevice9_CreateVertexBuffer(device, sizeof(quad), 0, 0, D3DPOOL_MANAGED, &vb, NULL); - ok(hr == D3D_OK, "CreateVertexBuffer failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "CreateVertexBuffer failed with %08x\n", hr); if(!vb) { skip("Failed to create a vertex buffer\n"); return; } hr = IDirect3DDevice9_CreateVertexBuffer(device, sizeof(vertcolor), 0, 0, D3DPOOL_MANAGED, &vb2, NULL); - ok(hr == D3D_OK, "CreateVertexBuffer failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "CreateVertexBuffer failed with %08x\n", hr); if(!vb2) { skip("Failed to create a vertex buffer\n"); goto out; } hr = IDirect3DDevice9_CreateVertexBuffer(device, sizeof(instancepos), 0, 0, D3DPOOL_MANAGED, &vb3, NULL); - ok(hr == D3D_OK, "CreateVertexBuffer failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "CreateVertexBuffer failed with %08x\n", hr); if(!vb3) { skip("Failed to create a vertex buffer\n"); goto out; @@ -8853,7 +8852,7 @@ static void stream_test(IDirect3DDevice9 *device) /* create IndexBuffer*/ hr = IDirect3DDevice9_CreateIndexBuffer(device, sizeof(indices), 0, D3DFMT_INDEX16, D3DPOOL_DEFAULT, &ib, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateIndexBuffer failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateIndexBuffer failed with %08x\n", hr); if(!ib) { skip("Failed to create a index buffer\n"); goto out; @@ -8861,39 +8860,39 @@ static void stream_test(IDirect3DDevice9 *device) /* copy all Buffers (Vertex + Index)*/ hr = IDirect3DVertexBuffer9_Lock(vb, 0, sizeof(quad), (void **) &data, 0); - ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Lock failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Lock failed with %08x\n", hr); memcpy(data, quad, sizeof(quad)); hr = IDirect3DVertexBuffer9_Unlock(vb); - ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Unlock failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Unlock failed with %08x\n", hr); hr = IDirect3DVertexBuffer9_Lock(vb2, 0, sizeof(vertcolor), (void **) &data, 0); - ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Lock failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Lock failed with %08x\n", hr); memcpy(data, vertcolor, sizeof(vertcolor)); hr = IDirect3DVertexBuffer9_Unlock(vb2); - ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Unlock failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Unlock failed with %08x\n", hr); hr = IDirect3DVertexBuffer9_Lock(vb3, 0, sizeof(instancepos), (void **) &data, 0); - ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Lock failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Lock failed with %08x\n", hr); memcpy(data, instancepos, sizeof(instancepos)); hr = IDirect3DVertexBuffer9_Unlock(vb3); - ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Unlock failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Unlock failed with %08x\n", hr); hr = IDirect3DIndexBuffer9_Lock(ib, 0, sizeof(indices), (void **) &data, 0); - ok(hr == D3D_OK, "IDirect3DIndexBuffer9_Lock failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DIndexBuffer9_Lock failed with %08x\n", hr); memcpy(data, indices, sizeof(indices)); hr = IDirect3DIndexBuffer9_Unlock(ib); - ok(hr == D3D_OK, "IDirect3DIndexBuffer9_Unlock failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DIndexBuffer9_Unlock failed with %08x\n", hr); /* create VertexShader */ hr = IDirect3DDevice9_CreateVertexShader(device, shader_code, &shader); - ok(SUCCEEDED(hr), "IDirect3DDevice9_CreateVertexShader failed hr=%s\n", DXGetErrorString9(hr)); + ok(SUCCEEDED(hr), "IDirect3DDevice9_CreateVertexShader failed hr=%08x\n", hr); if(!shader) { skip("Failed to create a vetex shader\n"); goto out; } hr = IDirect3DDevice9_SetVertexShader(device, shader); - ok(SUCCEEDED(hr), "IDirect3DDevice9_SetVertexShader failed hr=%s\n", DXGetErrorString9(hr)); + ok(SUCCEEDED(hr), "IDirect3DDevice9_SetVertexShader failed hr=%08x\n", hr); hr = IDirect3DDevice9_SetIndices(device, ib); - ok(hr == D3D_OK, "IDirect3DIndexBuffer9_Unlock failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DIndexBuffer9_Unlock failed with %08x\n", hr); /* run all tests */ for( i = 0; i < sizeof(testcases)/sizeof(testcases[0]); ++i) @@ -8904,7 +8903,7 @@ static void stream_test(IDirect3DDevice9 *device) decl[2].Stream = act.strInstance; /* create VertexDeclarations */ hr = IDirect3DDevice9_CreateVertexDeclaration(device, decl, &pDecl); - ok(SUCCEEDED(hr), "IDirect3DDevice9_CreateVertexDeclaration failed hr=%s (case %i)\n", DXGetErrorString9(hr), i); + ok(SUCCEEDED(hr), "IDirect3DDevice9_CreateVertexDeclaration failed hr=%08x (case %i)\n", hr, i); hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 0.0, 0); ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %08x (case %i)\n", hr, i); @@ -8917,19 +8916,19 @@ static void stream_test(IDirect3DDevice9 *device) ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed with %08x (case %i)\n", hr, i); hr = IDirect3DDevice9_SetStreamSourceFreq(device, act.strVertex, (D3DSTREAMSOURCE_INDEXEDDATA | act.idxVertex)); - ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSourceFreq failed with %s (case %i)\n", DXGetErrorString9(hr), i); + ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSourceFreq failed with %08x (case %i)\n", hr, i); hr = IDirect3DDevice9_SetStreamSource(device, act.strVertex, vb, 0, sizeof(quad[0])); - ok(hr == D3D_OK, "IDirect3DIndexBuffer9_Unlock failed with %s (case %i)\n", DXGetErrorString9(hr), i); + ok(hr == D3D_OK, "IDirect3DIndexBuffer9_Unlock failed with %08x (case %i)\n", hr, i); hr = IDirect3DDevice9_SetStreamSourceFreq(device, act.strColor, (D3DSTREAMSOURCE_INDEXEDDATA | act.idxColor)); - ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSourceFreq failed with %s (case %i)\n", DXGetErrorString9(hr), i); + ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSourceFreq failed with %08x (case %i)\n", hr, i); hr = IDirect3DDevice9_SetStreamSource(device, act.strColor, vb2, 0, sizeof(vertcolor[0])); - ok(hr == D3D_OK, "IDirect3DIndexBuffer9_Unlock failed with %s (case %i)\n", DXGetErrorString9(hr), i); + ok(hr == D3D_OK, "IDirect3DIndexBuffer9_Unlock failed with %08x (case %i)\n", hr, i); hr = IDirect3DDevice9_SetStreamSourceFreq(device, act.strInstance, (D3DSTREAMSOURCE_INSTANCEDATA | act.idxInstance)); - ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSourceFreq failed with %s (case %i)\n", DXGetErrorString9(hr), i); + ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSourceFreq failed with %08x (case %i)\n", hr, i); hr = IDirect3DDevice9_SetStreamSource(device, act.strInstance, vb3, 0, sizeof(instancepos[0])); - ok(hr == D3D_OK, "IDirect3DIndexBuffer9_Unlock failed with %s (case %i)\n", DXGetErrorString9(hr), i); + ok(hr == D3D_OK, "IDirect3DIndexBuffer9_Unlock failed with %08x (case %i)\n", hr, i); /* don't know if this is right (1*3 and 4*1)*/ hr = IDirect3DDevice9_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, 0, 0, 1 * 3 , 0, 4*1); @@ -8939,15 +8938,15 @@ static void stream_test(IDirect3DDevice9 *device) /* set all StreamSource && StreamSourceFreq back to default */ hr = IDirect3DDevice9_SetStreamSourceFreq(device, act.strVertex, 1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSourceFreq failed with %s (case %i)\n", DXGetErrorString9(hr), i); + ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSourceFreq failed with %08x (case %i)\n", hr, i); hr = IDirect3DDevice9_SetStreamSource(device, act.strVertex, NULL, 0, 0); ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSource failed with %08x (case %i)\n", hr, i); hr = IDirect3DDevice9_SetStreamSourceFreq(device, act.idxColor, 1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSourceFreq failed with %s (case %i)\n", DXGetErrorString9(hr), i); + ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSourceFreq failed with %08x (case %i)\n", hr, i); hr = IDirect3DDevice9_SetStreamSource(device, act.idxColor, NULL, 0, 0); ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSource failed with %08x (case %i)\n", hr, i); hr = IDirect3DDevice9_SetStreamSourceFreq(device, act.idxInstance, 1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSourceFreq failed with %s (case %i)\n", DXGetErrorString9(hr), i); + ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSourceFreq failed with %08x (case %i)\n", hr, i); hr = IDirect3DDevice9_SetStreamSource(device, act.idxInstance, NULL, 0, 0); ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSource failed with %08x (case %i)\n", hr, i); } @@ -8996,12 +8995,12 @@ static void np2_stretch_rect_test(IDirect3DDevice9 *device) { }; hr = IDirect3DDevice9_GetBackBuffer(device, 0, 0, D3DBACKBUFFER_TYPE_MONO, &backbuffer); - ok(hr == D3D_OK, "IDirect3DDevice9_GetBackBuffer failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_GetBackBuffer failed with %08x\n", hr); hr = IDirect3DDevice9_CreateRenderTarget(device, 100, 100, D3DFMT_A8R8G8B8, D3DMULTISAMPLE_NONE, 0, TRUE, &src, NULL ); - ok(hr == D3D_OK || hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_CreateRenderTarget failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK || hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_CreateRenderTarget failed with %08x\n", hr); hr = IDirect3DDevice9_CreateTexture(device, 25, 25, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &dsttex, NULL); - ok(hr == D3D_OK || hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_CreateTexture failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK || hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_CreateTexture failed with %08x\n", hr); if(!src || !dsttex) { skip("One or more test resources could not be created\n"); @@ -9009,59 +9008,59 @@ static void np2_stretch_rect_test(IDirect3DDevice9 *device) { } hr = IDirect3DTexture9_GetSurfaceLevel(dsttex, 0, &dst); - ok(hr == D3D_OK, "IDirect3DTexture9_GetSurfaceLevel failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DTexture9_GetSurfaceLevel failed with %08x\n", hr); hr = IDirect3DDevice9_Clear(device, 1, NULL, D3DCLEAR_TARGET, 0xff00ffff, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %08x\n", hr); /* Clear the StretchRect destination for debugging */ hr = IDirect3DDevice9_SetRenderTarget(device, 0, dst); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderTarget failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderTarget failed with %08x\n", hr); hr = IDirect3DDevice9_Clear(device, 1, NULL, D3DCLEAR_TARGET, 0xffff00ff, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %08x\n", hr); hr = IDirect3DDevice9_SetRenderTarget(device, 0, src); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderTarget failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderTarget failed with %08x\n", hr); hr = IDirect3DDevice9_Clear(device, 1, &r1, D3DCLEAR_TARGET, 0xffff0000, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %08x\n", hr); hr = IDirect3DDevice9_Clear(device, 1, &r2, D3DCLEAR_TARGET, 0xff00ff00, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %08x\n", hr); hr = IDirect3DDevice9_Clear(device, 1, &r3, D3DCLEAR_TARGET, 0xff0000ff, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %08x\n", hr); hr = IDirect3DDevice9_Clear(device, 1, &r4, D3DCLEAR_TARGET, 0xff000000, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %08x\n", hr); /* Stretchrect before setting the render target back to the backbuffer. This will make Wine use * the target -> texture GL blit path */ hr = IDirect3DDevice9_StretchRect(device, src, NULL, dst, NULL, D3DTEXF_POINT); - ok(hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %08x\n", hr); IDirect3DSurface9_Release(dst); hr = IDirect3DDevice9_SetRenderTarget(device, 0, backbuffer); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderTarget failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderTarget failed with %08x\n", hr); hr = IDirect3DDevice9_SetTexture(device, 0, (IDirect3DBaseTexture9 *) dsttex); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed with %08x\n", hr); hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_TEX1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %08x\n", hr); hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed with %08x\n", hr); hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_COLORARG1, D3DTA_TEXTURE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed with %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %08x\n", hr); if(SUCCEEDED(hr)) { hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(float) * 5); ok(SUCCEEDED(hr), "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %08x\n", hr); } hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); color = getPixelColor(device, 160, 360); ok(color == 0x00ff0000, "stretchrect: Pixel 160,360 has color 0x%08x, expected 0x00ff0000\n", color); color = getPixelColor(device, 480, 360); @@ -9072,9 +9071,9 @@ static void np2_stretch_rect_test(IDirect3DDevice9 *device) { ok(color == 0x00000000, "stretchrect: Pixel 160,120 has color 0x%08x, expected 0x00000000\n", color); hr = IDirect3DDevice9_SetTexture(device, 0, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed with %08x\n", hr); hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_DISABLE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed with %s\n", DXGetErrorString9(hr)); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed with %08x\n", hr); cleanup: if(src) IDirect3DSurface9_Release(src); @@ -9143,42 +9142,42 @@ static void texop_test(IDirect3DDevice9 *device) memset(&caps, 0, sizeof(caps)); hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); - ok(SUCCEEDED(hr), "GetDeviceCaps failed with 0x%08x (%s)\n", hr, DXGetErrorString9(hr)); + ok(SUCCEEDED(hr), "GetDeviceCaps failed with 0x%08x\n", hr); hr = IDirect3DDevice9_CreateVertexDeclaration(device, decl_elements, &vertex_declaration); - ok(SUCCEEDED(hr), "CreateVertexDeclaration failed with 0x%08x (%s)\n", hr, DXGetErrorString9(hr)); + ok(SUCCEEDED(hr), "CreateVertexDeclaration failed with 0x%08x\n", hr); hr = IDirect3DDevice9_SetVertexDeclaration(device, vertex_declaration); - ok(SUCCEEDED(hr), "SetVertexDeclaration failed with 0x%08x (%s)\n", hr, DXGetErrorString9(hr)); + ok(SUCCEEDED(hr), "SetVertexDeclaration failed with 0x%08x\n", hr); hr = IDirect3DDevice9_CreateTexture(device, 1, 1, 1, 0, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, &texture, NULL); - ok(SUCCEEDED(hr), "IDirect3DDevice9_CreateTexture failed with 0x%08x (%s)\n", hr, DXGetErrorString9(hr)); + ok(SUCCEEDED(hr), "IDirect3DDevice9_CreateTexture failed with 0x%08x\n", hr); hr = IDirect3DTexture9_LockRect(texture, 0, &locked_rect, NULL, 0); - ok(SUCCEEDED(hr), "LockRect failed with 0x%08x (%s)\n", hr, DXGetErrorString9(hr)); + ok(SUCCEEDED(hr), "LockRect failed with 0x%08x\n", hr); *((DWORD *)locked_rect.pBits) = D3DCOLOR_ARGB(0x99, 0x00, 0xff, 0x00); hr = IDirect3DTexture9_UnlockRect(texture, 0); - ok(SUCCEEDED(hr), "LockRect failed with 0x%08x (%s)\n", hr, DXGetErrorString9(hr)); + ok(SUCCEEDED(hr), "LockRect failed with 0x%08x\n", hr); hr = IDirect3DDevice9_SetTexture(device, 0, (IDirect3DBaseTexture9 *)texture); - ok(SUCCEEDED(hr), "SetTexture failed with 0x%08x (%s)\n", hr, DXGetErrorString9(hr)); + ok(SUCCEEDED(hr), "SetTexture failed with 0x%08x\n", hr); hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_COLORARG0, D3DTA_DIFFUSE); - ok(SUCCEEDED(hr), "SetTextureStageState failed with 0x%08x (%s)\n", hr, DXGetErrorString9(hr)); + ok(SUCCEEDED(hr), "SetTextureStageState failed with 0x%08x\n", hr); hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_COLORARG1, D3DTA_TEXTURE); - ok(SUCCEEDED(hr), "SetTextureStageState failed with 0x%08x (%s)\n", hr, DXGetErrorString9(hr)); + ok(SUCCEEDED(hr), "SetTextureStageState failed with 0x%08x\n", hr); hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_COLORARG2, D3DTA_TFACTOR); - ok(SUCCEEDED(hr), "SetTextureStageState failed with 0x%08x (%s)\n", hr, DXGetErrorString9(hr)); + ok(SUCCEEDED(hr), "SetTextureStageState failed with 0x%08x\n", hr); hr = IDirect3DDevice9_SetTextureStageState(device, 1, D3DTSS_COLOROP, D3DTOP_DISABLE); - ok(SUCCEEDED(hr), "SetTextureStageState failed with 0x%08x (%s)\n", hr, DXGetErrorString9(hr)); + ok(SUCCEEDED(hr), "SetTextureStageState failed with 0x%08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_LIGHTING, FALSE); - ok(SUCCEEDED(hr), "SetRenderState failed with 0x%08x (%s)\n", hr, DXGetErrorString9(hr)); + ok(SUCCEEDED(hr), "SetRenderState failed with 0x%08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_TEXTUREFACTOR, 0xdd333333); - ok(SUCCEEDED(hr), "SetRenderState failed with 0x%08x (%s)\n", hr, DXGetErrorString9(hr)); + ok(SUCCEEDED(hr), "SetRenderState failed with 0x%08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_COLORWRITEENABLE, D3DCOLORWRITEENABLE_RED | D3DCOLORWRITEENABLE_GREEN | D3DCOLORWRITEENABLE_BLUE | D3DCOLORWRITEENABLE_ALPHA); - ok(SUCCEEDED(hr), "SetRenderState failed with 0x%08x (%s)\n", hr, DXGetErrorString9(hr)); + ok(SUCCEEDED(hr), "SetRenderState failed with 0x%08x\n", hr); hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0x00000000, 1.0f, 0); - ok(SUCCEEDED(hr), "IDirect3DDevice9_Clear failed with 0x%08x (%s)\n", hr, DXGetErrorString9(hr)); + ok(SUCCEEDED(hr), "IDirect3DDevice9_Clear failed with 0x%08x\n", hr); for (i = 0; i < sizeof(test_data) / sizeof(*test_data); ++i) { @@ -9189,20 +9188,19 @@ static void texop_test(IDirect3DDevice9 *device) } hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_COLOROP, test_data[i].op); - ok(SUCCEEDED(hr), "SetTextureStageState (%s) failed with 0x%08x (%s)\n", - test_data[i].name, hr, DXGetErrorString9(hr)); + ok(SUCCEEDED(hr), "SetTextureStageState (%s) failed with 0x%08x\n", test_data[i].name, hr); hr = IDirect3DDevice9_BeginScene(device); - ok(SUCCEEDED(hr), "BeginScene failed with 0x%08x (%s)\n", hr, DXGetErrorString9(hr)); + ok(SUCCEEDED(hr), "BeginScene failed with 0x%08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(*quad)); - ok(SUCCEEDED(hr), "DrawPrimitiveUP failed with 0x%08x (%s)\n", hr, DXGetErrorString9(hr)); + ok(SUCCEEDED(hr), "DrawPrimitiveUP failed with 0x%08x\n", hr); hr = IDirect3DDevice9_EndScene(device); - ok(SUCCEEDED(hr), "EndScene failed with 0x%08x (%s)\n", hr, DXGetErrorString9(hr)); + ok(SUCCEEDED(hr), "EndScene failed with 0x%08x\n", hr); hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - ok(SUCCEEDED(hr), "Present failed with 0x%08x (%s)\n", hr, DXGetErrorString9(hr)); + ok(SUCCEEDED(hr), "Present failed with 0x%08x\n", hr); color = getPixelColor(device, 320, 240); ok(color_match(color, test_data[i].result, 3), "Operation %s returned color 0x%08x, expected 0x%08x\n", -- 2.11.4.GIT