From: Eric Pouech eric.pouech@gmail.com
Signed-off-by: Eric Pouech eric.pouech@gmail.com --- dlls/d3dx9_36/tests/effect.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/d3dx9_36/tests/effect.c b/dlls/d3dx9_36/tests/effect.c index 12af35cb8d8..7a1109f48b5 100644 --- a/dlls/d3dx9_36/tests/effect.c +++ b/dlls/d3dx9_36/tests/effect.c @@ -5464,7 +5464,8 @@ static void test_effect_commitchanges(IDirect3DDevice9 *device) ID3DXEffect *effect; HRESULT hr; D3DXHANDLE param; - unsigned int i, passes_count, value; + unsigned int i, passes_count; + DWORD value; int ivect[4]; D3DXVECTOR4 fvect; IDirect3DVertexShader9 *vshader;
From: Eric Pouech eric.pouech@gmail.com
Signed-off-by: Eric Pouech eric.pouech@gmail.com --- dlls/d3dx9_36/tests/Makefile.in | 1 - dlls/d3dx9_36/tests/asm.c | 48 +- dlls/d3dx9_36/tests/core.c | 374 +++---- dlls/d3dx9_36/tests/effect.c | 1614 +++++++++++++++---------------- dlls/d3dx9_36/tests/line.c | 34 +- dlls/d3dx9_36/tests/math.c | 88 +- dlls/d3dx9_36/tests/mesh.c | 760 +++++++-------- dlls/d3dx9_36/tests/shader.c | 336 +++---- dlls/d3dx9_36/tests/surface.c | 460 ++++----- dlls/d3dx9_36/tests/texture.c | 544 +++++------ dlls/d3dx9_36/tests/volume.c | 56 +- dlls/d3dx9_36/tests/xfile.c | 110 +-- 12 files changed, 2212 insertions(+), 2213 deletions(-)
diff --git a/dlls/d3dx9_36/tests/Makefile.in b/dlls/d3dx9_36/tests/Makefile.in index ad0bfbe90be..bc5cfc36653 100644 --- a/dlls/d3dx9_36/tests/Makefile.in +++ b/dlls/d3dx9_36/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = d3dx9_36.dll IMPORTS = d3dx9 d3d9 user32 gdi32
diff --git a/dlls/d3dx9_36/tests/asm.c b/dlls/d3dx9_36/tests/asm.c index c8136425882..6db4a6de2c1 100644 --- a/dlls/d3dx9_36/tests/asm.c +++ b/dlls/d3dx9_36/tests/asm.c @@ -217,7 +217,7 @@ static void assembleshader_test(void) hr = D3DXAssembleShader(test1, strlen(test1), defines, NULL, D3DXSHADER_SKIPVALIDATION, &shader, &messages); - ok(hr == D3D_OK, "pDefines test failed with error 0x%x - %d\n", hr, hr & 0x0000FFFF); + ok(hr == D3D_OK, "pDefines test failed with error 0x%lx - %ld\n", hr, hr & 0x0000FFFF); if(messages) { trace("D3DXAssembleShader messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages)); ID3DXBuffer_Release(messages); @@ -229,7 +229,7 @@ static void assembleshader_test(void) hr = D3DXAssembleShader(test1, strlen(test1), defines, NULL, D3DXSHADER_SKIPVALIDATION, &shader, NULL); - ok(hr == D3D_OK, "NULL messages test failed with error 0x%x - %d\n", hr, hr & 0x0000FFFF); + ok(hr == D3D_OK, "NULL messages test failed with error 0x%lx - %ld\n", hr, hr & 0x0000FFFF); if(shader) ID3DXBuffer_Release(shader);
/* NULL shader test */ @@ -237,7 +237,7 @@ static void assembleshader_test(void) hr = D3DXAssembleShader(test1, strlen(test1), defines, NULL, D3DXSHADER_SKIPVALIDATION, NULL, &messages); - ok(hr == D3D_OK, "NULL shader test failed with error 0x%x - %d\n", hr, hr & 0x0000FFFF); + ok(hr == D3D_OK, "NULL shader test failed with error 0x%lx - %ld\n", hr, hr & 0x0000FFFF); if(messages) { trace("D3DXAssembleShader messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages)); ID3DXBuffer_Release(messages); @@ -253,7 +253,7 @@ static void assembleshader_test(void) winetest_push_context(i ? "terminated include data" : "nonterminated include data"); hr = D3DXAssembleShader(testshader, strlen(testshader), NULL, &include.ID3DXInclude_iface, D3DXSHADER_SKIPVALIDATION, &shader, &messages); - ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr); if (messages) { trace("D3DXAssembleShader messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages)); @@ -267,7 +267,7 @@ static void assembleshader_test(void) messages = NULL; hr = D3DXAssembleShader(testshader, strlen(testshader), NULL, NULL, D3DXSHADER_SKIPVALIDATION, &shader, &messages); - ok(hr == D3DXERR_INVALIDDATA, "Unexpected hr %#x.\n", hr); + ok(hr == D3DXERR_INVALIDDATA, "Unexpected hr %#lx.\n", hr); if (messages) { trace("D3DXAssembleShader messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages)); @@ -281,7 +281,7 @@ static void assembleshader_test(void) messages = NULL; hr = D3DXAssembleShader(testshader2, strlen(testshader2), NULL, &include.ID3DXInclude_iface, D3DXSHADER_SKIPVALIDATION, &shader, &messages); - todo_wine_if(i) ok(hr == (i ? D3D_OK : D3DXERR_INVALIDDATA), "Unexpected hr %#x.\n", hr); + todo_wine_if(i) ok(hr == (i ? D3D_OK : D3DXERR_INVALIDDATA), "Unexpected hr %#lx.\n", hr); if (messages) { trace("Recursive D3DXAssembleShader messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages)); @@ -295,7 +295,7 @@ static void assembleshader_test(void) messages = NULL; hr = D3DXAssembleShader(testshader3, strlen(testshader3), NULL, &include.ID3DXInclude_iface, D3DXSHADER_SKIPVALIDATION, &shader, &messages); - ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr); if (messages) { trace("Path search D3DXAssembleShader messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages)); @@ -316,7 +316,7 @@ static void assembleshader_test(void) hr = D3DXAssembleShaderFromFileA(shader_vsh_path, NULL, NULL, D3DXSHADER_SKIPVALIDATION, &shader, &messages); - ok(hr == D3D_OK, "D3DXAssembleShaderFromFile test failed with error 0x%x - %d\n", hr, hr & 0x0000FFFF); + ok(hr == D3D_OK, "D3DXAssembleShaderFromFile test failed with error 0x%lx - %ld\n", hr, hr & 0x0000FFFF); if(messages) { trace("D3DXAssembleShader messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages)); ID3DXBuffer_Release(messages); @@ -328,7 +328,7 @@ static void assembleshader_test(void) messages = NULL; hr = D3DXAssembleShaderFromFileA("shader.vsh", NULL, &include.ID3DXInclude_iface, D3DXSHADER_SKIPVALIDATION, &shader, &messages); - ok(hr == D3D_OK, "D3DXAssembleShaderFromFile + pInclude test failed with error 0x%x - %d\n", hr, hr & 0x0000FFFF); + ok(hr == D3D_OK, "D3DXAssembleShaderFromFile + pInclude test failed with error 0x%lx - %ld\n", hr, hr & 0x0000FFFF); if(messages) { trace("D3DXAssembleShader messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages)); ID3DXBuffer_Release(messages); @@ -348,7 +348,7 @@ static void assembleshader_test(void) hr = D3DXAssembleShaderFromFileA(shader3_vsh_path, NULL, NULL, D3DXSHADER_SKIPVALIDATION, &shader, &messages); - ok(hr == D3D_OK, "D3DXAssembleShaderFromFile path search test failed with error 0x%x - %d\n", hr, hr & 0x0000FFFF); + ok(hr == D3D_OK, "D3DXAssembleShaderFromFile path search test failed with error 0x%lx - %ld\n", hr, hr & 0x0000FFFF); if(messages) { trace("D3DXAssembleShaderFromFile path search messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages)); ID3DXBuffer_Release(messages); @@ -369,7 +369,7 @@ static void assembleshader_test(void) messages = NULL; hr = D3DXAssembleShaderFromFileA("shader.vsh", NULL, &include.ID3DXInclude_iface, D3DXSHADER_SKIPVALIDATION, &shader, &messages); - ok(hr == D3D_OK, "D3DXAssembleShaderFromFile + pInclude main shader test failed with error 0x%x - %d\n", + ok(hr == D3D_OK, "D3DXAssembleShaderFromFile + pInclude main shader test failed with error 0x%lx - %ld\n", hr, hr & 0x0000ffff); if (messages) { @@ -383,7 +383,7 @@ static void assembleshader_test(void) messages = NULL; hr = D3DXAssembleShaderFromFileW(L"shader.vsh", NULL, &include.ID3DXInclude_iface, D3DXSHADER_SKIPVALIDATION, &shader, &messages); - ok(hr == D3D_OK, "D3DXAssembleShaderFromFile + pInclude main shader test failed with error 0x%x - %d\n", + ok(hr == D3D_OK, "D3DXAssembleShaderFromFile + pInclude main shader test failed with error 0x%lx - %ld\n", hr, hr & 0x0000ffff); if (messages) { @@ -400,7 +400,7 @@ static void assembleshader_test(void) hr = D3DXAssembleShader(NULL, 0, NULL, NULL, D3DXSHADER_SKIPVALIDATION, &shader, &messages); - ok(hr == D3DXERR_INVALIDDATA, "NULL shader test failed with error 0x%x - %d\n", hr, hr & 0x0000FFFF); + ok(hr == D3DXERR_INVALIDDATA, "NULL shader test failed with error 0x%lx - %ld\n", hr, hr & 0x0000FFFF); if(messages) { trace("D3DXAssembleShader messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages)); ID3DXBuffer_Release(messages); @@ -413,7 +413,7 @@ static void assembleshader_test(void) NULL, NULL, D3DXSHADER_SKIPVALIDATION, &shader, &messages); ok(hr == D3DXERR_INVALIDDATA || hr == E_FAIL, /* I get this on WinXP */ - "D3DXAssembleShaderFromFile nonexistent file test failed with error 0x%x - %d\n", + "D3DXAssembleShaderFromFile nonexistent file test failed with error 0x%lx - %ld\n", hr, hr & 0x0000FFFF); if(messages) { trace("D3DXAssembleShaderFromFile messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages)); @@ -427,7 +427,7 @@ static void assembleshader_test(void) hr = D3DXAssembleShaderFromResourceA(NULL, MAKEINTRESOURCEA(IDB_ASMSHADER), NULL, NULL, D3DXSHADER_SKIPVALIDATION, &shader, &messages); - ok(hr == D3D_OK, "D3DXAssembleShaderFromResource test failed with error 0x%x - %d\n", hr, hr & 0x0000FFFF); + ok(hr == D3D_OK, "D3DXAssembleShaderFromResource test failed with error 0x%lx - %ld\n", hr, hr & 0x0000FFFF); if(messages) { trace("D3DXAssembleShaderFromResource messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages)); ID3DXBuffer_Release(messages); @@ -440,7 +440,7 @@ static void assembleshader_test(void) hr = D3DXAssembleShaderFromResourceA(NULL, "notexisting", NULL, NULL, D3DXSHADER_SKIPVALIDATION, &shader, &messages); - ok(hr == D3DXERR_INVALIDDATA, "D3DXAssembleShaderFromResource NULL shader test failed with error 0x%x - %d\n", hr, hr & 0x0000FFFF); + ok(hr == D3DXERR_INVALIDDATA, "D3DXAssembleShaderFromResource NULL shader test failed with error 0x%lx - %ld\n", hr, hr & 0x0000FFFF); if(messages) { trace("D3DXAssembleShaderFromResource messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages)); ID3DXBuffer_Release(messages); @@ -486,7 +486,7 @@ static void d3dxpreprocess_test(void) messages = NULL; hr = D3DXPreprocessShaderFromFileA(shader3_vsh_path, NULL, NULL, &shader, &messages); - ok(hr == D3D_OK, "D3DXPreprocessShaderFromFile path search test failed with error 0x%x - %d\n", hr, hr & 0x0000FFFF); + ok(hr == D3D_OK, "D3DXPreprocessShaderFromFile path search test failed with error 0x%lx - %ld\n", hr, hr & 0x0000FFFF); if(messages) { trace("D3DXPreprocessShaderFromFile path search messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages)); ID3DXBuffer_Release(messages); @@ -500,7 +500,7 @@ static void d3dxpreprocess_test(void) hr = D3DXPreprocessShaderFromFileA(shader_vsh_path, NULL, NULL, &shader, &messages); - ok(hr == D3D_OK, "D3DXPreprocessShaderFromFile test failed with error 0x%x - %d\n", hr, hr & 0x0000FFFF); + ok(hr == D3D_OK, "D3DXPreprocessShaderFromFile test failed with error 0x%lx - %ld\n", hr, hr & 0x0000FFFF); if(messages) { trace("D3DXPreprocessShader messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages)); ID3DXBuffer_Release(messages); @@ -512,7 +512,7 @@ static void d3dxpreprocess_test(void) messages = NULL; hr = D3DXPreprocessShaderFromFileA("shader.vsh", NULL, &include.ID3DXInclude_iface, &shader, &messages); - ok(hr == D3D_OK, "D3DXPreprocessShaderFromFile + pInclude test failed with error 0x%x - %d\n", hr, hr & 0x0000FFFF); + ok(hr == D3D_OK, "D3DXPreprocessShaderFromFile + pInclude test failed with error 0x%lx - %ld\n", hr, hr & 0x0000FFFF); if(messages) { trace("D3DXPreprocessShader messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages)); ID3DXBuffer_Release(messages); @@ -532,7 +532,7 @@ static void d3dxpreprocess_test(void) messages = NULL; hr = D3DXPreprocessShaderFromFileA("shader.vsh", NULL, &include.ID3DXInclude_iface, &shader, &messages); - ok(hr == D3D_OK, "D3DXPreprocessShaderFromFile + pInclude main shader test failed with error 0x%x - %d\n", + ok(hr == D3D_OK, "D3DXPreprocessShaderFromFile + pInclude main shader test failed with error 0x%lx - %ld\n", hr, hr & 0x0000ffff); if (messages) { @@ -546,7 +546,7 @@ static void d3dxpreprocess_test(void) messages = NULL; hr = D3DXPreprocessShaderFromFileW(L"shader.vsh", NULL, &include.ID3DXInclude_iface, &shader, &messages); - ok(hr == D3D_OK, "D3DXPreprocessShaderFromFile + pInclude main shader test failed with error 0x%x - %d\n", + ok(hr == D3D_OK, "D3DXPreprocessShaderFromFile + pInclude main shader test failed with error 0x%lx - %ld\n", hr, hr & 0x0000ffff); if (messages) { @@ -564,7 +564,7 @@ static void d3dxpreprocess_test(void) NULL, NULL, &shader, &messages); ok(hr == D3DXERR_INVALIDDATA || hr == E_FAIL, /* I get this on WinXP */ - "D3DXPreprocessShaderFromFile nonexistent file test failed with error 0x%x - %d\n", + "D3DXPreprocessShaderFromFile nonexistent file test failed with error 0x%lx - %ld\n", hr, hr & 0x0000FFFF); if(messages) { trace("D3DXPreprocessShaderFromFile messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages)); @@ -578,7 +578,7 @@ static void d3dxpreprocess_test(void) hr = D3DXPreprocessShaderFromResourceA(NULL, MAKEINTRESOURCEA(IDB_ASMSHADER), NULL, NULL, &shader, &messages); - ok(hr == D3D_OK, "D3DXPreprocessShaderFromResource test failed with error 0x%x - %d\n", hr, hr & 0x0000FFFF); + ok(hr == D3D_OK, "D3DXPreprocessShaderFromResource test failed with error 0x%lx - %ld\n", hr, hr & 0x0000FFFF); if(messages) { trace("D3DXPreprocessShaderFromResource messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages)); ID3DXBuffer_Release(messages); @@ -591,7 +591,7 @@ static void d3dxpreprocess_test(void) hr = D3DXPreprocessShaderFromResourceA(NULL, "notexisting", NULL, NULL, &shader, &messages); - ok(hr == D3DXERR_INVALIDDATA, "D3DXPreprocessShaderFromResource NULL shader test failed with error 0x%x - %d\n", hr, hr & 0x0000FFFF); + ok(hr == D3DXERR_INVALIDDATA, "D3DXPreprocessShaderFromResource NULL shader test failed with error 0x%lx - %ld\n", hr, hr & 0x0000FFFF); if(messages) { trace("D3DXPreprocessShaderFromResource messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages)); ID3DXBuffer_Release(messages); diff --git a/dlls/d3dx9_36/tests/core.c b/dlls/d3dx9_36/tests/core.c index ea2d1e4465b..c8925b2b186 100644 --- a/dlls/d3dx9_36/tests/core.c +++ b/dlls/d3dx9_36/tests/core.c @@ -67,10 +67,10 @@ static inline void check_mat(D3DXMATRIX got, D3DXMATRIX exp) #define check_rect(rect, left, top, right, bottom) _check_rect(__LINE__, rect, left, top, right, bottom) static inline void _check_rect(unsigned int line, const RECT *rect, int left, int top, int right, int bottom) { - ok_(__FILE__, line)(rect->left == left, "Unexpected rect.left %d\n", rect->left); - ok_(__FILE__, line)(rect->top == top, "Unexpected rect.top %d\n", rect->top); - ok_(__FILE__, line)(rect->right == right, "Unexpected rect.right %d\n", rect->right); - ok_(__FILE__, line)(rect->bottom == bottom, "Unexpected rect.bottom %d\n", rect->bottom); + ok_(__FILE__, line)(rect->left == left, "Unexpected rect.left %ld\n", rect->left); + ok_(__FILE__, line)(rect->top == top, "Unexpected rect.top %ld\n", rect->top); + ok_(__FILE__, line)(rect->right == right, "Unexpected rect.right %ld\n", rect->right); + ok_(__FILE__, line)(rect->bottom == bottom, "Unexpected rect.bottom %ld\n", rect->bottom); }
static void test_ID3DXBuffer(void) @@ -81,25 +81,25 @@ static void test_ID3DXBuffer(void) DWORD size;
hr = D3DXCreateBuffer(10, NULL); - ok(hr == D3DERR_INVALIDCALL, "D3DXCreateBuffer failed, got %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXCreateBuffer failed, got %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateBuffer(0, &buffer); - ok(hr == D3D_OK, "D3DXCreateBuffer failed, got %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateBuffer failed, got %#lx, expected %#lx\n", hr, D3D_OK);
size = ID3DXBuffer_GetBufferSize(buffer); - ok(!size, "GetBufferSize failed, got %u, expected %u\n", size, 0); + ok(!size, "GetBufferSize failed, got %lu, expected %u\n", size, 0);
count = ID3DXBuffer_Release(buffer); - ok(!count, "ID3DXBuffer has %u references left\n", count); + ok(!count, "ID3DXBuffer has %lu references left\n", count);
hr = D3DXCreateBuffer(3, &buffer); - ok(hr == D3D_OK, "D3DXCreateBuffer failed, got %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateBuffer failed, got %#lx, expected %#lx\n", hr, D3D_OK);
size = ID3DXBuffer_GetBufferSize(buffer); - ok(size == 3, "GetBufferSize failed, got %u, expected %u\n", size, 3); + ok(size == 3, "GetBufferSize failed, got %lu, expected %u\n", size, 3);
count = ID3DXBuffer_Release(buffer); - ok(!count, "ID3DXBuffer has %u references left\n", count); + ok(!count, "ID3DXBuffer has %lu references left\n", count); }
static void test_ID3DXSprite(IDirect3DDevice9 *device) @@ -121,11 +121,11 @@ static void test_ID3DXSprite(IDirect3DDevice9 *device) if (FAILED(hr)) return;
hr = IDirect3DDevice9_CreateTexture(device, 64, 64, 1, 0, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &tex1, NULL); - ok (hr == D3D_OK, "Failed to create first texture (error code: %#x)\n", hr); + ok (hr == D3D_OK, "Failed to create first texture (error code: %#lx)\n", hr); if (FAILED(hr)) return;
hr = IDirect3DDevice9_CreateTexture(device, 32, 32, 1, 0, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &tex2, NULL); - ok (hr == D3D_OK, "Failed to create second texture (error code: %#x)\n", hr); + ok (hr == D3D_OK, "Failed to create second texture (error code: %#lx)\n", hr); if (FAILED(hr)) { IDirect3DTexture9_Release(tex1); return; @@ -133,24 +133,24 @@ static void test_ID3DXSprite(IDirect3DDevice9 *device)
/* Test D3DXCreateSprite */ hr = D3DXCreateSprite(device, NULL); - ok (hr == D3DERR_INVALIDCALL, "D3DXCreateSprite returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok (hr == D3DERR_INVALIDCALL, "D3DXCreateSprite returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateSprite(NULL, &sprite); - ok (hr == D3DERR_INVALIDCALL, "D3DXCreateSprite returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok (hr == D3DERR_INVALIDCALL, "D3DXCreateSprite returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateSprite(device, &sprite); - ok (hr == D3D_OK, "D3DXCreateSprite returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "D3DXCreateSprite returned %#lx, expected %#lx\n", hr, D3D_OK);
/* Test ID3DXSprite_GetDevice */ hr = ID3DXSprite_GetDevice(sprite, NULL); - ok (hr == D3DERR_INVALIDCALL, "GetDevice returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok (hr == D3DERR_INVALIDCALL, "GetDevice returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = ID3DXSprite_GetDevice(sprite, &cmpdev); /* cmpdev == NULL */ - ok (hr == D3D_OK, "GetDevice returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "GetDevice returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = ID3DXSprite_GetDevice(sprite, &cmpdev); /* cmpdev != NULL */ - ok (hr == D3D_OK, "GetDevice returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "GetDevice returned %#lx, expected %#lx\n", hr, D3D_OK);
IDirect3DDevice9_Release(device); IDirect3DDevice9_Release(device); @@ -158,9 +158,9 @@ static void test_ID3DXSprite(IDirect3DDevice9 *device)
/* Test ID3DXSprite_GetTransform */ hr = ID3DXSprite_GetTransform(sprite, NULL); - ok (hr == D3DERR_INVALIDCALL, "GetTransform returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok (hr == D3DERR_INVALIDCALL, "GetTransform returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL); hr = ID3DXSprite_GetTransform(sprite, &mat); - ok (hr == D3D_OK, "GetTransform returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "GetTransform returned %#lx, expected %#lx\n", hr, D3D_OK); if(SUCCEEDED(hr)) { D3DXMATRIX identity; D3DXMatrixIdentity(&identity); @@ -175,41 +175,41 @@ static void test_ID3DXSprite(IDirect3DDevice9 *device) U(mat).m[3][0]=6.7f; U(mat).m[3][1]=-5.1f; U(mat).m[3][2]=6.1f; U(mat).m[3][3]=2.2f;
hr = ID3DXSprite_SetTransform(sprite, NULL); - ok (hr == D3DERR_INVALIDCALL, "SetTransform returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok (hr == D3DERR_INVALIDCALL, "SetTransform returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = ID3DXSprite_SetTransform(sprite, &mat); - ok (hr == D3D_OK, "SetTransform returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "SetTransform returned %#lx, expected %#lx\n", hr, D3D_OK); if(SUCCEEDED(hr)) { hr=ID3DXSprite_GetTransform(sprite, &cmpmat); if(SUCCEEDED(hr)) check_mat(cmpmat, mat); - else skip("GetTransform returned %#x\n", hr); + else skip("GetTransform returned %#lx\n", hr); }
/* Test ID3DXSprite_SetWorldViewLH/RH */ todo_wine { hr = ID3DXSprite_SetWorldViewLH(sprite, &mat, &mat); - ok (hr == D3D_OK, "SetWorldViewLH returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "SetWorldViewLH returned %#lx, expected %#lx\n", hr, D3D_OK); hr = ID3DXSprite_SetWorldViewLH(sprite, NULL, &mat); - ok (hr == D3D_OK, "SetWorldViewLH returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "SetWorldViewLH returned %#lx, expected %#lx\n", hr, D3D_OK); hr = ID3DXSprite_SetWorldViewLH(sprite, &mat, NULL); - ok (hr == D3D_OK, "SetWorldViewLH returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "SetWorldViewLH returned %#lx, expected %#lx\n", hr, D3D_OK); hr = ID3DXSprite_SetWorldViewLH(sprite, NULL, NULL); - ok (hr == D3D_OK, "SetWorldViewLH returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "SetWorldViewLH returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = ID3DXSprite_SetWorldViewRH(sprite, &mat, &mat); - ok (hr == D3D_OK, "SetWorldViewRH returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "SetWorldViewRH returned %#lx, expected %#lx\n", hr, D3D_OK); hr = ID3DXSprite_SetWorldViewRH(sprite, NULL, &mat); - ok (hr == D3D_OK, "SetWorldViewRH returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "SetWorldViewRH returned %#lx, expected %#lx\n", hr, D3D_OK); hr = ID3DXSprite_SetWorldViewRH(sprite, &mat, NULL); - ok (hr == D3D_OK, "SetWorldViewRH returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "SetWorldViewRH returned %#lx, expected %#lx\n", hr, D3D_OK); hr = ID3DXSprite_SetWorldViewRH(sprite, NULL, NULL); - ok (hr == D3D_OK, "SetWorldViewRH returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "SetWorldViewRH returned %#lx, expected %#lx\n", hr, D3D_OK); } IDirect3DDevice9_BeginScene(device);
/* Test ID3DXSprite_Begin*/ hr = ID3DXSprite_Begin(sprite, 0); - ok (hr == D3D_OK, "Begin returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "Begin returned %#lx, expected %#lx\n", hr, D3D_OK);
IDirect3DDevice9_GetTransform(device, D3DTS_WORLD, &mat); D3DXMatrixIdentity(&cmpmat); @@ -225,19 +225,19 @@ static void test_ID3DXSprite(IDirect3DDevice9 *device)
/* Test ID3DXSprite_Flush and ID3DXSprite_End */ hr = ID3DXSprite_Flush(sprite); - ok (hr == D3D_OK, "Flush returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "Flush returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = ID3DXSprite_End(sprite); - ok (hr == D3D_OK, "End returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "End returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = ID3DXSprite_Flush(sprite); /* May not be called before next Begin */ - ok (hr == D3DERR_INVALIDCALL, "Flush returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok (hr == D3DERR_INVALIDCALL, "Flush returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL); hr = ID3DXSprite_End(sprite); - ok (hr == D3DERR_INVALIDCALL, "End returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok (hr == D3DERR_INVALIDCALL, "End returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
/* Test ID3DXSprite_Draw */ hr = ID3DXSprite_Begin(sprite, 0); - ok (hr == D3D_OK, "Begin returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "Begin returned %#lx, expected %#lx\n", hr, D3D_OK);
if(FAILED(hr)) skip("Couldn't ID3DXSprite_Begin, can't test ID3DXSprite_Draw\n"); else { /* Feed the sprite batch */ @@ -251,76 +251,76 @@ static void test_ID3DXSprite(IDirect3DDevice9 *device) texref2 = get_ref((IUnknown*)tex2);
hr = ID3DXSprite_Draw(sprite, NULL, &rect, ¢er, &pos, D3DCOLOR_XRGB(255, 255, 255)); - ok (hr == D3DERR_INVALIDCALL, "Draw returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok (hr == D3DERR_INVALIDCALL, "Draw returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = ID3DXSprite_Draw(sprite, tex1, &rect, ¢er, &pos, D3DCOLOR_XRGB(255, 255, 255)); - ok (hr == D3D_OK, "Draw returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "Draw returned %#lx, expected %#lx\n", hr, D3D_OK); hr = ID3DXSprite_Draw(sprite, tex2, &rect, ¢er, &pos, D3DCOLOR_XRGB( 3, 45, 66)); - ok (hr == D3D_OK, "Draw returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "Draw returned %#lx, expected %#lx\n", hr, D3D_OK); hr = ID3DXSprite_Draw(sprite, tex1, NULL, ¢er, &pos, D3DCOLOR_XRGB(255, 255, 255)); - ok (hr == D3D_OK, "Draw returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "Draw returned %#lx, expected %#lx\n", hr, D3D_OK); hr = ID3DXSprite_Draw(sprite, tex1, &rect, NULL, &pos, D3DCOLOR_XRGB(255, 255, 255)); - ok (hr == D3D_OK, "Draw returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "Draw returned %#lx, expected %#lx\n", hr, D3D_OK); hr = ID3DXSprite_Draw(sprite, tex1, &rect, ¢er, NULL, D3DCOLOR_XRGB(255, 255, 255)); - ok (hr == D3D_OK, "Draw returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "Draw returned %#lx, expected %#lx\n", hr, D3D_OK); hr = ID3DXSprite_Draw(sprite, tex1, NULL, NULL, NULL, 0); - ok (hr == D3D_OK, "Draw returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "Draw returned %#lx, expected %#lx\n", hr, D3D_OK);
check_ref((IUnknown*)tex1, texref1+5); check_ref((IUnknown*)tex2, texref2+1); hr = ID3DXSprite_Flush(sprite); - ok (hr == D3D_OK, "Flush returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "Flush returned %#lx, expected %#lx\n", hr, D3D_OK); hr = ID3DXSprite_Flush(sprite); /* Flushing twice should work */ - ok (hr == D3D_OK, "Flush returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "Flush returned %#lx, expected %#lx\n", hr, D3D_OK); check_ref((IUnknown*)tex1, texref1); check_ref((IUnknown*)tex2, texref2);
hr = ID3DXSprite_End(sprite); - ok (hr == D3D_OK, "End returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "End returned %#lx, expected %#lx\n", hr, D3D_OK); }
/* Test ID3DXSprite_OnLostDevice and ID3DXSprite_OnResetDevice */ /* Both can be called twice */ hr = ID3DXSprite_OnLostDevice(sprite); - ok (hr == D3D_OK, "OnLostDevice returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "OnLostDevice returned %#lx, expected %#lx\n", hr, D3D_OK); hr = ID3DXSprite_OnLostDevice(sprite); - ok (hr == D3D_OK, "OnLostDevice returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "OnLostDevice returned %#lx, expected %#lx\n", hr, D3D_OK); hr = ID3DXSprite_OnResetDevice(sprite); - ok (hr == D3D_OK, "OnResetDevice returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "OnResetDevice returned %#lx, expected %#lx\n", hr, D3D_OK); hr = ID3DXSprite_OnResetDevice(sprite); - ok (hr == D3D_OK, "OnResetDevice returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "OnResetDevice returned %#lx, expected %#lx\n", hr, D3D_OK);
/* Make sure everything works like before */ hr = ID3DXSprite_Begin(sprite, 0); - ok (hr == D3D_OK, "Begin returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "Begin returned %#lx, expected %#lx\n", hr, D3D_OK); hr = ID3DXSprite_Draw(sprite, tex2, &rect, ¢er, &pos, D3DCOLOR_XRGB(255, 255, 255)); - ok (hr == D3D_OK, "Draw returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "Draw returned %#lx, expected %#lx\n", hr, D3D_OK); hr = ID3DXSprite_Flush(sprite); - ok (hr == D3D_OK, "Flush returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "Flush returned %#lx, expected %#lx\n", hr, D3D_OK); hr = ID3DXSprite_End(sprite); - ok (hr == D3D_OK, "End returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "End returned %#lx, expected %#lx\n", hr, D3D_OK);
/* OnResetDevice makes the interface "forget" the Begin call */ hr = ID3DXSprite_Begin(sprite, 0); - ok (hr == D3D_OK, "Begin returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "Begin returned %#lx, expected %#lx\n", hr, D3D_OK); hr = ID3DXSprite_OnResetDevice(sprite); - ok (hr == D3D_OK, "OnResetDevice returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "OnResetDevice returned %#lx, expected %#lx\n", hr, D3D_OK); hr = ID3DXSprite_End(sprite); - ok (hr == D3DERR_INVALIDCALL, "End returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok (hr == D3DERR_INVALIDCALL, "End returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
/* Test D3DXSPRITE_DO_NOT_ADDREF_TEXTURE */ hr = ID3DXSprite_Begin(sprite, D3DXSPRITE_DO_NOT_ADDREF_TEXTURE); - ok (hr == D3D_OK, "Begin returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "Begin returned %#lx, expected %#lx\n", hr, D3D_OK); hr = ID3DXSprite_Draw(sprite, tex2, &rect, ¢er, &pos, D3DCOLOR_XRGB(255, 255, 255)); - ok (hr == D3D_OK, "Draw returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "Draw returned %#lx, expected %#lx\n", hr, D3D_OK); hr = ID3DXSprite_OnResetDevice(sprite); - ok (hr == D3D_OK, "OnResetDevice returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "OnResetDevice returned %#lx, expected %#lx\n", hr, D3D_OK); check_ref((IUnknown*)tex2, 1);
hr = ID3DXSprite_Begin(sprite, D3DXSPRITE_DO_NOT_ADDREF_TEXTURE); - ok (hr == D3D_OK, "Begin returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "Begin returned %#lx, expected %#lx\n", hr, D3D_OK); hr = ID3DXSprite_Draw(sprite, tex2, &rect, ¢er, &pos, D3DCOLOR_XRGB(255, 255, 255)); - ok (hr == D3D_OK, "Draw returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "Draw returned %#lx, expected %#lx\n", hr, D3D_OK); hr = ID3DXSprite_End(sprite); - ok (hr == D3D_OK, "End returned %#x, expected %#x\n", hr, D3D_OK); + ok (hr == D3D_OK, "End returned %#lx, expected %#lx\n", hr, D3D_OK);
IDirect3DDevice9_EndScene(device); check_release((IUnknown*)sprite, 0); @@ -374,31 +374,31 @@ static void test_ID3DXFont(IDirect3DDevice9 *device) /* D3DXCreateFont */ ref = get_ref((IUnknown*)device); hr = D3DXCreateFontA(device, 12, 0, FW_DONTCARE, 0, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH, "Tahoma", &font); - ok(hr == D3D_OK, "D3DXCreateFont returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateFont returned %#lx, expected %#lx\n", hr, D3D_OK); check_ref((IUnknown*)device, ref + 1); check_release((IUnknown*)font, 0); check_ref((IUnknown*)device, ref);
hr = D3DXCreateFontA(device, 0, 0, FW_DONTCARE, 0, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH, "Tahoma", &font); - ok(hr == D3D_OK, "D3DXCreateFont returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateFont returned %#lx, expected %#lx\n", hr, D3D_OK); ID3DXFont_Release(font);
hr = D3DXCreateFontA(device, 12, 0, FW_DONTCARE, 0, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH, NULL, &font); - ok(hr == D3D_OK, "D3DXCreateFont returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateFont returned %#lx, expected %#lx\n", hr, D3D_OK); ID3DXFont_Release(font);
hr = D3DXCreateFontA(device, 12, 0, FW_DONTCARE, 0, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH, "", &font); - ok(hr == D3D_OK, "D3DXCreateFont returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateFont returned %#lx, expected %#lx\n", hr, D3D_OK); ID3DXFont_Release(font);
hr = D3DXCreateFontA(NULL, 12, 0, FW_DONTCARE, 0, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH, "Tahoma", &font); - ok(hr == D3DERR_INVALIDCALL, "D3DXCreateFont returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXCreateFont returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateFontA(device, 12, 0, FW_DONTCARE, 0, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH, "Tahoma", NULL); - ok(hr == D3DERR_INVALIDCALL, "D3DXCreateFont returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXCreateFont returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateFontA(NULL, 12, 0, FW_DONTCARE, 0, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH, "Tahoma", NULL); - ok(hr == D3DERR_INVALIDCALL, "D3DXCreateFont returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXCreateFont returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
/* D3DXCreateFontIndirect */ @@ -413,30 +413,30 @@ static void test_ID3DXFont(IDirect3DDevice9 *device) desc.PitchAndFamily = DEFAULT_PITCH; strcpy(desc.FaceName, "Tahoma"); hr = D3DXCreateFontIndirectA(device, &desc, &font); - ok(hr == D3D_OK, "D3DXCreateFontIndirect returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateFontIndirect returned %#lx, expected %#lx\n", hr, D3D_OK); ID3DXFont_Release(font);
hr = D3DXCreateFontIndirectA(NULL, &desc, &font); - ok(hr == D3DERR_INVALIDCALL, "D3DXCreateFontIndirect returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXCreateFontIndirect returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateFontIndirectA(device, NULL, &font); - ok(hr == D3DERR_INVALIDCALL, "D3DXCreateFontIndirect returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXCreateFontIndirect returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateFontIndirectA(device, &desc, NULL); - ok(hr == D3DERR_INVALIDCALL, "D3DXCreateFontIndirect returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXCreateFontIndirect returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
/* ID3DXFont_GetDevice */ hr = D3DXCreateFontA(device, 12, 0, FW_DONTCARE, 0, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH, "Tahoma", &font); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3DXFont_GetDevice(font, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr);
ref = get_ref((IUnknown *)device); hr = ID3DXFont_GetDevice(font, &bufdev); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); check_release((IUnknown *)bufdev, ref);
ID3DXFont_Release(font); @@ -445,13 +445,13 @@ static void test_ID3DXFont(IDirect3DDevice9 *device) /* ID3DXFont_GetDesc */ hr = D3DXCreateFontA(device, 12, 8, FW_BOLD, 2, TRUE, ANSI_CHARSET, OUT_RASTER_PRECIS, ANTIALIASED_QUALITY, VARIABLE_PITCH, "Tahoma", &font); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3DXFont_GetDescA(font, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr);
hr = ID3DXFont_GetDescA(font, &desc); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
ok(desc.Height == 12, "Got unexpected height %d.\n", desc.Height); ok(desc.Width == 8, "Got unexpected width %u.\n", desc.Width); @@ -470,7 +470,7 @@ static void test_ID3DXFont(IDirect3DDevice9 *device) /* ID3DXFont_GetDC + ID3DXFont_GetTextMetrics */ hr = D3DXCreateFontA(device, 12, 0, FW_DONTCARE, 0, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH, "Tahoma", &font); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hdc = ID3DXFont_GetDC(font); ok(!!hdc, "Got unexpected hdc %p.\n", hdc); @@ -480,27 +480,27 @@ static void test_ID3DXFont(IDirect3DDevice9 *device) ret = GetTextMetricsA(hdc, &expmetrics); ok(ret, "Got unexpected ret %#x.\n", ret);
- ok(metrics.tmHeight == expmetrics.tmHeight, "Got unexpected height %d, expected %d.\n", + ok(metrics.tmHeight == expmetrics.tmHeight, "Got unexpected height %ld, expected %ld.\n", metrics.tmHeight, expmetrics.tmHeight); - ok(metrics.tmAscent == expmetrics.tmAscent, "Got unexpected ascent %d, expected %d.\n", + ok(metrics.tmAscent == expmetrics.tmAscent, "Got unexpected ascent %ld, expected %ld.\n", metrics.tmAscent, expmetrics.tmAscent); - ok(metrics.tmDescent == expmetrics.tmDescent, "Got unexpected descent %d, expected %d.\n", + ok(metrics.tmDescent == expmetrics.tmDescent, "Got unexpected descent %ld, expected %ld.\n", metrics.tmDescent, expmetrics.tmDescent); - ok(metrics.tmInternalLeading == expmetrics.tmInternalLeading, "Got unexpected internal leading %d, expected %d.\n", + ok(metrics.tmInternalLeading == expmetrics.tmInternalLeading, "Got unexpected internal leading %ld, expected %ld.\n", metrics.tmInternalLeading, expmetrics.tmInternalLeading); - ok(metrics.tmExternalLeading == expmetrics.tmExternalLeading, "Got unexpected external leading %d, expected %d.\n", + ok(metrics.tmExternalLeading == expmetrics.tmExternalLeading, "Got unexpected external leading %ld, expected %ld.\n", metrics.tmExternalLeading, expmetrics.tmExternalLeading); - ok(metrics.tmAveCharWidth == expmetrics.tmAveCharWidth, "Got unexpected average char width %d, expected %d.\n", + ok(metrics.tmAveCharWidth == expmetrics.tmAveCharWidth, "Got unexpected average char width %ld, expected %ld.\n", metrics.tmAveCharWidth, expmetrics.tmAveCharWidth); - ok(metrics.tmMaxCharWidth == expmetrics.tmMaxCharWidth, "Got unexpected maximum char width %d, expected %d.\n", + ok(metrics.tmMaxCharWidth == expmetrics.tmMaxCharWidth, "Got unexpected maximum char width %ld, expected %ld.\n", metrics.tmMaxCharWidth, expmetrics.tmMaxCharWidth); - ok(metrics.tmWeight == expmetrics.tmWeight, "Got unexpected weight %d, expected %d.\n", + ok(metrics.tmWeight == expmetrics.tmWeight, "Got unexpected weight %ld, expected %ld.\n", metrics.tmWeight, expmetrics.tmWeight); - ok(metrics.tmOverhang == expmetrics.tmOverhang, "Got unexpected overhang %d, expected %d.\n", + ok(metrics.tmOverhang == expmetrics.tmOverhang, "Got unexpected overhang %ld, expected %ld.\n", metrics.tmOverhang, expmetrics.tmOverhang); - ok(metrics.tmDigitizedAspectX == expmetrics.tmDigitizedAspectX, "Got unexpected digitized x aspect %d, expected %d.\n", + ok(metrics.tmDigitizedAspectX == expmetrics.tmDigitizedAspectX, "Got unexpected digitized x aspect %ld, expected %ld.\n", metrics.tmDigitizedAspectX, expmetrics.tmDigitizedAspectX); - ok(metrics.tmDigitizedAspectY == expmetrics.tmDigitizedAspectY, "Got unexpected digitized y aspect %d, expected %d.\n", + ok(metrics.tmDigitizedAspectY == expmetrics.tmDigitizedAspectY, "Got unexpected digitized y aspect %ld, expected %ld.\n", metrics.tmDigitizedAspectY, expmetrics.tmDigitizedAspectY); ok(metrics.tmFirstChar == expmetrics.tmFirstChar, "Got unexpected first char %u, expected %u.\n", metrics.tmFirstChar, expmetrics.tmFirstChar); @@ -527,33 +527,33 @@ static void test_ID3DXFont(IDirect3DDevice9 *device) /* ID3DXFont_PreloadText */ hr = D3DXCreateFontA(device, 12, 0, FW_DONTCARE, 0, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH, "Tahoma", &font); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3DXFont_PreloadTextA(font, NULL, -1); - ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr); hr = ID3DXFont_PreloadTextA(font, NULL, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = ID3DXFont_PreloadTextA(font, NULL, 1); - ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr); hr = ID3DXFont_PreloadTextA(font, "test", -1); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = ID3DXFont_PreloadTextA(font, "", 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = ID3DXFont_PreloadTextA(font, "", -1); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3DXFont_PreloadTextW(font, NULL, -1); - ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr); hr = ID3DXFont_PreloadTextW(font, NULL, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = ID3DXFont_PreloadTextW(font, NULL, 1); - ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr); hr = ID3DXFont_PreloadTextW(font, testW, -1); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = ID3DXFont_PreloadTextW(font, L"", 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = ID3DXFont_PreloadTextW(font, L"", -1); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
check_release((IUnknown*)font, 0);
@@ -561,77 +561,77 @@ static void test_ID3DXFont(IDirect3DDevice9 *device) /* ID3DXFont_GetGlyphData, ID3DXFont_PreloadGlyphs, ID3DXFont_PreloadCharacters */ hr = D3DXCreateFontA(device, 12, 0, FW_DONTCARE, 0, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH, "Tahoma", &font); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hdc = ID3DXFont_GetDC(font); ok(!!hdc, "Got unexpected hdc %p.\n", hdc);
hr = ID3DXFont_GetGlyphData(font, 0, NULL, &blackbox, &cellinc); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = ID3DXFont_GetGlyphData(font, 0, &texture, NULL, &cellinc); check_release((IUnknown *)texture, 1); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = ID3DXFont_GetGlyphData(font, 0, &texture, &blackbox, NULL); check_release((IUnknown *)texture, 1); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3DXFont_PreloadCharacters(font, 'b', 'a'); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = ID3DXFont_PreloadGlyphs(font, 1, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3DXFont_PreloadCharacters(font, 'a', 'a'); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
for (c = 'b'; c <= 'z'; ++c) { count = GetGlyphIndicesA(hdc, &c, 1, &glyph, 0); - ok(count != GDI_ERROR, "Got unexpected count %u.\n", count); + ok(count != GDI_ERROR, "Got unexpected count %lu.\n", count);
hr = ID3DXFont_GetGlyphData(font, glyph, &texture, &blackbox, &cellinc); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
levels = IDirect3DTexture9_GetLevelCount(texture); - todo_wine ok(levels == 5, "Character %c: got unexpected levels %u.\n", c, levels); + todo_wine ok(levels == 5, "Character %c: got unexpected levels %lu.\n", c, levels); hr = IDirect3DTexture9_GetLevelDesc(texture, 0, &surf_desc); - ok(hr == D3D_OK, "Character %c: got unexpected hr %#x.\n", c, hr); + ok(hr == D3D_OK, "Character %c: got unexpected hr %#lx.\n", c, hr); ok(surf_desc.Format == D3DFMT_A8R8G8B8, "Character %c: got unexpected format %#x.\n", c, surf_desc.Format); - ok(surf_desc.Usage == 0, "Character %c: got unexpected usage %#x.\n", c, surf_desc.Usage); + ok(surf_desc.Usage == 0, "Character %c: got unexpected usage %#lx.\n", c, surf_desc.Usage); ok(surf_desc.Width == 256, "Character %c: got unexpected width %u.\n", c, surf_desc.Width); ok(surf_desc.Height == 256, "Character %c: got unexpected height %u.\n", c, surf_desc.Height); ok(surf_desc.Pool == D3DPOOL_MANAGED, "Character %c: got unexpected pool %u.\n", c, surf_desc.Pool);
count = GetGlyphOutlineW(hdc, glyph, GGO_GLYPH_INDEX | GGO_METRICS, &glyph_metrics, 0, NULL, &mat); - ok(count != GDI_ERROR, "Got unexpected count %#x.\n", count); + ok(count != GDI_ERROR, "Got unexpected count %#lx.\n", count);
ret = ID3DXFont_GetTextMetricsW(font, &tm); ok(ret, "Got unexpected ret %#x.\n", ret);
- todo_wine ok(blackbox.right - blackbox.left == glyph_metrics.gmBlackBoxX + 2, "Character %c: got %d, expected %d.\n", + todo_wine ok(blackbox.right - blackbox.left == glyph_metrics.gmBlackBoxX + 2, "Character %c: got %ld, expected %d.\n", c, blackbox.right - blackbox.left, glyph_metrics.gmBlackBoxX + 2); - todo_wine ok(blackbox.bottom - blackbox.top == glyph_metrics.gmBlackBoxY + 2, "Character %c: got %d, expected %d.\n", + todo_wine ok(blackbox.bottom - blackbox.top == glyph_metrics.gmBlackBoxY + 2, "Character %c: got %ld, expected %d.\n", c, blackbox.bottom - blackbox.top, glyph_metrics.gmBlackBoxY + 2); - ok(cellinc.x == glyph_metrics.gmptGlyphOrigin.x - 1, "Character %c: got %d, expected %d.\n", + ok(cellinc.x == glyph_metrics.gmptGlyphOrigin.x - 1, "Character %c: got %ld, expected %ld.\n", c, cellinc.x, glyph_metrics.gmptGlyphOrigin.x - 1); - ok(cellinc.y == tm.tmAscent - glyph_metrics.gmptGlyphOrigin.y - 1, "Character %c: got %d, expected %d.\n", + ok(cellinc.y == tm.tmAscent - glyph_metrics.gmptGlyphOrigin.y - 1, "Character %c: got %ld, expected %ld.\n", c, cellinc.y, tm.tmAscent - glyph_metrics.gmptGlyphOrigin.y - 1);
check_release((IUnknown *)texture, 1); }
hr = ID3DXFont_PreloadCharacters(font, 'a', 'z'); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
/* Test multiple textures */ hr = ID3DXFont_PreloadGlyphs(font, 0, 1000); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
/* Test glyphs that are not rendered */ for (glyph = 1; glyph < 4; ++glyph) { texture = (IDirect3DTexture9 *)0xdeadbeef; hr = ID3DXFont_GetGlyphData(font, glyph, &texture, &blackbox, &cellinc); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); ok(!texture, "Got unexpected texture %p.\n", texture); }
@@ -642,25 +642,25 @@ static void test_ID3DXFont(IDirect3DDevice9 *device) { hr = D3DXCreateFontA(device, tests[i].font_height, 0, FW_DONTCARE, 0, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH, "Tahoma", &font); - ok(hr == D3D_OK, "Test %u: got unexpected hr %#x.\n", i, hr); + ok(hr == D3D_OK, "Test %u: got unexpected hr %#lx.\n", i, hr);
hdc = ID3DXFont_GetDC(font); ok(!!hdc, "Test %u: got unexpected hdc %p.\n", i, hdc);
count = GetGlyphIndicesA(hdc, &c, 1, &glyph, 0); - ok(count != GDI_ERROR, "Test %u: got unexpected count %u.\n", i, count); + ok(count != GDI_ERROR, "Test %u: got unexpected count %lu.\n", i, count);
hr = ID3DXFont_GetGlyphData(font, glyph, &texture, NULL, NULL); - ok(hr == D3D_OK, "Test %u: got unexpected hr %#x.\n", i, hr); + ok(hr == D3D_OK, "Test %u: got unexpected hr %#lx.\n", i, hr);
levels = IDirect3DTexture9_GetLevelCount(texture); todo_wine_if(tests[i].expected_levels < 9) - ok(levels == tests[i].expected_levels, "Test %u: got unexpected levels %u.\n", i, levels); + ok(levels == tests[i].expected_levels, "Test %u: got unexpected levels %lu.\n", i, levels);
hr = IDirect3DTexture9_GetLevelDesc(texture, 0, &surf_desc); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); ok(surf_desc.Format == D3DFMT_A8R8G8B8, "Test %u: got unexpected format %#x.\n", i, surf_desc.Format); - ok(surf_desc.Usage == 0, "Test %u: got unexpected usage %#x.\n", i, surf_desc.Usage); + ok(surf_desc.Usage == 0, "Test %u: got unexpected usage %#lx.\n", i, surf_desc.Usage); ok(surf_desc.Width == tests[i].expected_size, "Test %u: got unexpected width %u.\n", i, surf_desc.Width); ok(surf_desc.Height == tests[i].expected_size, "Test %u: got unexpected height %u.\n", i, surf_desc.Height); ok(surf_desc.Pool == D3DPOOL_MANAGED, "Test %u: got unexpected pool %u.\n", i, surf_desc.Pool); @@ -675,7 +675,7 @@ static void test_ID3DXFont(IDirect3DDevice9 *device)
IDirect3DDevice9_BeginScene(device); hr = ID3DXSprite_Begin(sprite, D3DXSPRITE_ALPHABLEND); - ok (hr == D3D_OK, "Test %d: got unexpected hr %#x.\n", i, hr); + ok (hr == D3D_OK, "Test %d: got unexpected hr %#lx.\n", i, hr);
height = ID3DXFont_DrawTextW(font, sprite, testW, -1, &rect, DT_TOP, 0xffffffff); ok(height == tests[i].font_height, "Test %d: got unexpected height %u.\n", i, height); @@ -690,13 +690,13 @@ static void test_ID3DXFont(IDirect3DDevice9 *device) height = ID3DXFont_DrawTextW(font, sprite, testW, size, &rect, DT_LEFT | DT_CALCRECT, 0xffffffff); ok(height == tests[i].font_height, "Test %d: got unexpected height %u.\n", i, height); - ok(!rect.left, "Test %d: got unexpected rect left %d.\n", i, rect.left); - ok(!rect.top, "Test %d: got unexpected rect top %d.\n", i, rect.top); - ok(rect.right, "Test %d: got unexpected rect right %d.\n", i, rect.right); - ok(rect.bottom == tests[i].font_height, "Test %d: got unexpected rect bottom %d.\n", i, rect.bottom); + ok(!rect.left, "Test %d: got unexpected rect left %ld.\n", i, rect.left); + ok(!rect.top, "Test %d: got unexpected rect top %ld.\n", i, rect.top); + ok(rect.right, "Test %d: got unexpected rect right %ld.\n", i, rect.right); + ok(rect.bottom == tests[i].font_height, "Test %d: got unexpected rect bottom %ld.\n", i, rect.bottom);
hr = ID3DXSprite_End(sprite); - ok (hr == D3D_OK, "Test %d: got unexpected hr %#x.\n", i, hr); + ok (hr == D3D_OK, "Test %d: got unexpected hr %#lx.\n", i, hr); IDirect3DDevice9_EndScene(device); ID3DXSprite_Release(sprite);
@@ -707,7 +707,7 @@ static void test_ID3DXFont(IDirect3DDevice9 *device) /* ID3DXFont_DrawTextA, ID3DXFont_DrawTextW */ hr = D3DXCreateFontA(device, 12, 0, FW_DONTCARE, 0, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH, "Tahoma", &font); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
SetRect(&rect, 10, 10, 200, 200);
@@ -1204,21 +1204,21 @@ static void test_D3DXCreateRenderToSurface(IDirect3DDevice9 *device) };
hr = D3DXCreateRenderToSurface(NULL /* device */, 256, 256, D3DFMT_A8R8G8B8, FALSE, D3DFMT_UNKNOWN, &render); - ok(hr == D3DERR_INVALIDCALL, "D3DXCreateRenderToSurface returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXCreateRenderToSurface returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL); ok(render == (void *)0xdeadbeef, "Got %p, expected %p\n", render, (void *)0xdeadbeef);
hr = D3DXCreateRenderToSurface(device, 256, 256, D3DFMT_A8R8G8B8, FALSE, D3DFMT_UNKNOWN, NULL /* out */); - ok(hr == D3DERR_INVALIDCALL, "D3DXCreateRenderToSurface returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXCreateRenderToSurface returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
for (i = 0; i < ARRAY_SIZE(tests); i++) { hr = D3DXCreateRenderToSurface(device, tests[i].Width, tests[i].Height, tests[i].Format, tests[i].DepthStencil, tests[i].DepthStencilFormat, &render); - ok(hr == D3D_OK, "%d: D3DXCreateRenderToSurface returned %#x, expected %#x\n", i, hr, D3D_OK); + ok(hr == D3D_OK, "%d: D3DXCreateRenderToSurface returned %#lx, expected %#lx\n", i, hr, D3D_OK); if (SUCCEEDED(hr)) { hr = ID3DXRenderToSurface_GetDesc(render, &desc); - ok(hr == D3D_OK, "%d: GetDesc failed %#x\n", i, hr); + ok(hr == D3D_OK, "%d: GetDesc failed %#lx\n", i, hr); if (SUCCEEDED(hr)) { ok(desc.Width == tests[i].Width, "%d: Got width %u, expected %u\n", i, desc.Width, tests[i].Width); @@ -1271,24 +1271,24 @@ static void check_ID3DXRenderToSurface(IDirect3DDevice9 *device, UINT width, UIN
/* viewport */ hr = ID3DXRenderToSurface_BeginScene(render, surface, &viewport); - ok(hr == D3D_OK, "ID3DXRenderToSurface::BeginScene returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "ID3DXRenderToSurface::BeginScene returned %#lx, expected %#lx\n", hr, D3D_OK); check_ref((IUnknown *)surface, 2); if (SUCCEEDED(hr)) ID3DXRenderToSurface_EndScene(render, D3DX_FILTER_NONE);
/* invalid viewport */ viewport.Width = 2 * width; hr = ID3DXRenderToSurface_BeginScene(render, surface, &viewport); - ok(hr == D3DERR_INVALIDCALL, "ID3DXRenderToSurface::BeginScene returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "ID3DXRenderToSurface::BeginScene returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
viewport.X = width / 2; viewport.Width = width; hr = ID3DXRenderToSurface_BeginScene(render, surface, &viewport); - ok(hr == D3DERR_INVALIDCALL, "ID3DXRenderToSurface::BeginScene returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "ID3DXRenderToSurface::BeginScene returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
viewport.X = width; viewport.Width = width; hr = ID3DXRenderToSurface_BeginScene(render, surface, &viewport); - ok(hr == D3DERR_INVALIDCALL, "ID3DXRenderToSurface::BeginScene returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "ID3DXRenderToSurface::BeginScene returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
/* rendering to a part of a surface is only allowed for render target surfaces */ expected_value = render_target ? D3D_OK : D3DERR_INVALIDCALL; @@ -1296,13 +1296,13 @@ static void check_ID3DXRenderToSurface(IDirect3DDevice9 *device, UINT width, UIN viewport.X = 0; viewport.Width = width / 2; hr = ID3DXRenderToSurface_BeginScene(render, surface, &viewport); - ok(hr == expected_value, "ID3DXRenderToSurface::BeginScene returned %#x, expected %#x\n", hr, expected_value); + ok(hr == expected_value, "ID3DXRenderToSurface::BeginScene returned %#lx, expected %#lx\n", hr, expected_value); if (SUCCEEDED(hr)) ID3DXRenderToSurface_EndScene(render, D3DX_FILTER_NONE);
viewport.X = width / 2; viewport.Width = width - width / 2; hr = ID3DXRenderToSurface_BeginScene(render, surface, &viewport); - ok(hr == expected_value, "ID3DXRenderToSurface::BeginScene returned %#x, expected %#x\n", hr, expected_value); + ok(hr == expected_value, "ID3DXRenderToSurface::BeginScene returned %#lx, expected %#lx\n", hr, expected_value); if (SUCCEEDED(hr)) ID3DXRenderToSurface_EndScene(render, D3DX_FILTER_NONE);
check_release((IUnknown *)surface, 0); @@ -1316,7 +1316,7 @@ static void check_ID3DXRenderToSurface(IDirect3DDevice9 *device, UINT width, UIN return; } hr = ID3DXRenderToSurface_BeginScene(render, surface, NULL); - ok(hr == D3DERR_INVALIDCALL, "ID3DXRenderToSurface::BeginScene returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "ID3DXRenderToSurface::BeginScene returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL); check_release((IUnknown *)surface, 0);
hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 2 * width, 2 * height, format, D3DPOOL_DEFAULT, &surface, NULL); @@ -1327,13 +1327,13 @@ static void check_ID3DXRenderToSurface(IDirect3DDevice9 *device, UINT width, UIN return; } hr = ID3DXRenderToSurface_BeginScene(render, surface, NULL); - ok(hr == D3DERR_INVALIDCALL, "ID3DXRenderToSurface::BeginScene returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "ID3DXRenderToSurface::BeginScene returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL); viewport.X = 0; viewport.Y = 0; viewport.Width = width; viewport.Height = height; hr = ID3DXRenderToSurface_BeginScene(render, surface, &viewport); - ok(hr == D3DERR_INVALIDCALL, "ID3DXRenderToSurface::BeginScene returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "ID3DXRenderToSurface::BeginScene returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL); check_release((IUnknown *)surface, 0);
/* surfaces with different formats */ @@ -1349,7 +1349,7 @@ static void check_ID3DXRenderToSurface(IDirect3DDevice9 *device, UINT width, UIN }
hr = ID3DXRenderToSurface_BeginScene(render, surface, NULL); - ok(hr == expected_result, "ID3DXRenderToSurface::BeginScene returned %#x, expected %#x\n", hr, expected_result); + ok(hr == expected_result, "ID3DXRenderToSurface::BeginScene returned %#lx, expected %#lx\n", hr, expected_result);
if (SUCCEEDED(hr)) ID3DXRenderToSurface_EndScene(render, D3DX_FILTER_NONE); check_release((IUnknown *)surface, 0); @@ -1425,7 +1425,7 @@ static void compare_device_state(struct device_state *state1, struct device_stat
cmp = state1->viewport.X == state2->viewport.X && state1->viewport.Y == state2->viewport.Y && state1->viewport.Width == state2->viewport.Width && state1->viewport.Height == state2->viewport.Height; - ok(equal ? cmp : !cmp, "Viewport %s (%u, %u, %u, %u), (%u, %u, %u, %u)\n", message, + ok(equal ? cmp : !cmp, "Viewport %s (%lu, %lu, %lu, %lu), (%lu, %lu, %lu, %lu)\n", message, state1->viewport.X, state1->viewport.Y, state1->viewport.Width, state1->viewport.Height, state2->viewport.X, state2->viewport.Y, state2->viewport.Width, state2->viewport.Height); } @@ -1471,11 +1471,11 @@ static void test_ID3DXRenderToSurface_device_state(IDirect3DDevice9 *device) ok(SUCCEEDED(hr), "Failed to retrieve device state\n");
hr = D3DXCreateRenderToSurface(device, 256, 256, D3DFMT_A8R8G8B8, TRUE, D3DFMT_D24X8, &render); - ok(hr == D3D_OK, "D3DXCreateRenderToSurface returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateRenderToSurface returned %#lx, expected %#lx\n", hr, D3D_OK); if (SUCCEEDED(hr)) { hr = ID3DXRenderToSurface_BeginScene(render, surface, NULL); - ok(hr == D3D_OK, "ID3DXRenderToSurface::BeginScene returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "ID3DXRenderToSurface::BeginScene returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = retrieve_device_state(device, ¤t_state); ok(SUCCEEDED(hr), "Failed to retrieve device state\n"); @@ -1483,7 +1483,7 @@ static void test_ID3DXRenderToSurface_device_state(IDirect3DDevice9 *device) release_device_state(¤t_state);
hr = ID3DXRenderToSurface_EndScene(render, D3DX_FILTER_NONE); - ok(hr == D3D_OK, "ID3DXRenderToSurface::EndScene returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "ID3DXRenderToSurface::EndScene returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = retrieve_device_state(device, ¤t_state); ok(SUCCEEDED(hr), "Failed to retrieve device state\n"); @@ -1497,7 +1497,7 @@ static void test_ID3DXRenderToSurface_device_state(IDirect3DDevice9 *device) if (SUCCEEDED(hr)) { hr = ID3DXRenderToSurface_BeginScene(render, surface, NULL); - ok(hr == D3D_OK, "ID3DXRenderToSurface::BeginScene returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "ID3DXRenderToSurface::BeginScene returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = retrieve_device_state(device, ¤t_state); ok(SUCCEEDED(hr), "Failed to retrieve device state\n"); @@ -1505,7 +1505,7 @@ static void test_ID3DXRenderToSurface_device_state(IDirect3DDevice9 *device) release_device_state(¤t_state);
hr = ID3DXRenderToSurface_EndScene(render, D3DX_FILTER_NONE); - ok(hr == D3D_OK, "ID3DXRenderToSurface::EndScene returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "ID3DXRenderToSurface::EndScene returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = retrieve_device_state(device, ¤t_state); ok(SUCCEEDED(hr), "Failed to retrieve device state\n"); @@ -1513,7 +1513,7 @@ static void test_ID3DXRenderToSurface_device_state(IDirect3DDevice9 *device) release_device_state(¤t_state);
hr = ID3DXRenderToSurface_BeginScene(render, surface, NULL); - ok(hr == D3D_OK, "ID3DXRenderToSurface::BeginScene returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "ID3DXRenderToSurface::BeginScene returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = retrieve_device_state(device, ¤t_state); ok(SUCCEEDED(hr), "Failed to retrieve device state\n"); @@ -1564,7 +1564,7 @@ static void test_ID3DXRenderToSurface(IDirect3DDevice9 *device) };
hr = D3DXCreateRenderToSurface(device, 256, 256, D3DFMT_A8R8G8B8, FALSE, D3DFMT_UNKNOWN, &render); - ok(hr == D3D_OK, "D3DXCreateRenderToSurface returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateRenderToSurface returned %#lx, expected %#lx\n", hr, D3D_OK); if (FAILED(hr)) return;
hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 256, 256, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &surface, NULL); @@ -1574,41 +1574,41 @@ static void test_ID3DXRenderToSurface(IDirect3DDevice9 *device)
/* GetDevice */ hr = ID3DXRenderToSurface_GetDevice(render, NULL /* device */); - ok(hr == D3DERR_INVALIDCALL, "ID3DXRenderToSurface::GetDevice returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "ID3DXRenderToSurface::GetDevice returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
ref_count = get_ref((IUnknown *)device); hr = ID3DXRenderToSurface_GetDevice(render, &out_device); - ok(hr == D3D_OK, "ID3DXRenderToSurface::GetDevice returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "ID3DXRenderToSurface::GetDevice returned %#lx, expected %#lx\n", hr, D3D_OK); check_release((IUnknown *)out_device, ref_count);
/* BeginScene and EndScene */ hr = ID3DXRenderToSurface_EndScene(render, D3DX_FILTER_NONE); - ok(hr == D3DERR_INVALIDCALL, "ID3DXRenderToSurface::EndScene returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "ID3DXRenderToSurface::EndScene returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = ID3DXRenderToSurface_BeginScene(render, NULL /* surface */, &viewport); - ok(hr == D3DERR_INVALIDCALL, "ID3DXRenderToSurface::BeginScene returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "ID3DXRenderToSurface::BeginScene returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
ref_count = get_ref((IUnknown *)surface); hr = ID3DXRenderToSurface_BeginScene(render, surface, NULL); - ok(hr == D3D_OK, "ID3DXRenderToSurface::BeginScene returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "ID3DXRenderToSurface::BeginScene returned %#lx, expected %#lx\n", hr, D3D_OK); if (SUCCEEDED(hr)) { check_ref((IUnknown *)surface, ref_count + 1);
hr = ID3DXRenderToSurface_BeginScene(render, surface, NULL); - ok(hr == D3DERR_INVALIDCALL, "ID3DXRenderToSurface::BeginScene returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "ID3DXRenderToSurface::BeginScene returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = ID3DXRenderToSurface_EndScene(render, D3DX_FILTER_NONE); - ok(hr == D3D_OK, "ID3DXRenderToSurface::EndScene returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "ID3DXRenderToSurface::EndScene returned %#lx, expected %#lx\n", hr, D3D_OK);
check_ref((IUnknown *)surface, ref_count); }
/* error handling is deferred to BeginScene */ hr = D3DXCreateRenderToSurface(device, 256, 256, D3DFMT_A8R8G8B8, TRUE, D3DFMT_UNKNOWN, &render_surface); - ok(hr == D3D_OK, "D3DXCreateRenderToSurface returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateRenderToSurface returned %#lx, expected %#lx\n", hr, D3D_OK); hr = ID3DXRenderToSurface_BeginScene(render_surface, surface, NULL); - ok(hr == D3DERR_INVALIDCALL, "ID3DXRenderToSurface::BeginScene returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "ID3DXRenderToSurface::BeginScene returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL); check_release((IUnknown *)render_surface, 0);
check_release((IUnknown *)surface, 0); @@ -1651,11 +1651,11 @@ static void test_D3DXCreateRenderToEnvMap(IDirect3DDevice9 *device) const D3DXRTE_DESC *expected = &tests[i].expected_values; hr = D3DXCreateRenderToEnvMap(device, parameters->Size, parameters->MipLevels, parameters->Format, parameters->DepthStencil, parameters->DepthStencilFormat, &render); - ok(hr == D3D_OK, "%d: D3DXCreateRenderToEnvMap returned %#x, expected %#x\n", i, hr, D3D_OK); + ok(hr == D3D_OK, "%d: D3DXCreateRenderToEnvMap returned %#lx, expected %#lx\n", i, hr, D3D_OK); if (SUCCEEDED(hr)) { hr = ID3DXRenderToEnvMap_GetDesc(render, &desc); - ok(hr == D3D_OK, "%d: GetDesc failed %#x\n", i, hr); + ok(hr == D3D_OK, "%d: GetDesc failed %#lx\n", i, hr); if (SUCCEEDED(hr)) { ok(desc.Size == expected->Size, "%d: Got size %u, expected %u\n", i, desc.Size, expected->Size); @@ -1697,16 +1697,16 @@ static void test_ID3DXRenderToEnvMap_cube_map(IDirect3DDevice9 *device) ok(SUCCEEDED(hr), "Failed to retrieve device state\n");
hr = D3DXCreateRenderToEnvMap(device, 256, 0, D3DFMT_A8R8G8B8, TRUE, D3DFMT_D24X8, &render); - ok(hr == D3D_OK, "D3DCreateRenderToEnvMap returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DCreateRenderToEnvMap returned %#lx, expected %#lx\n", hr, D3D_OK); if (SUCCEEDED(hr)) { DWORD face;
hr = ID3DXRenderToEnvMap_End(render, D3DX_FILTER_NONE); - ok(hr == D3DERR_INVALIDCALL, "ID3DXRenderToEnvMap::End returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "ID3DXRenderToEnvMap::End returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = ID3DXRenderToEnvMap_BeginCube(render, cube_texture); - ok(hr == D3D_OK, "ID3DXRenderToEnvMap::BeginCube returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "ID3DXRenderToEnvMap::BeginCube returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = retrieve_device_state(device, ¤t_state); ok(SUCCEEDED(hr), "Failed to retrieve device state\n"); @@ -1716,7 +1716,7 @@ static void test_ID3DXRenderToEnvMap_cube_map(IDirect3DDevice9 *device) for (face = D3DCUBEMAP_FACE_POSITIVE_X; face <= D3DCUBEMAP_FACE_NEGATIVE_Z; face++) { hr = ID3DXRenderToEnvMap_Face(render, face, D3DX_FILTER_POINT); - ok(hr == D3D_OK, "ID3DXRenderToEnvMap::Face returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "ID3DXRenderToEnvMap::Face returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = retrieve_device_state(device, ¤t_state); ok(SUCCEEDED(hr), "Failed to retrieve device state\n"); @@ -1725,7 +1725,7 @@ static void test_ID3DXRenderToEnvMap_cube_map(IDirect3DDevice9 *device) }
hr = ID3DXRenderToEnvMap_End(render, D3DX_FILTER_POINT); - ok(hr == D3D_OK, "ID3DXRenderToEnvMap::End returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "ID3DXRenderToEnvMap::End returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = retrieve_device_state(device, ¤t_state); ok(SUCCEEDED(hr), "Failed to retrieve device state\n"); @@ -1753,31 +1753,31 @@ static void test_ID3DXRenderToEnvMap(IDirect3DDevice9 *device) IDirect3DDevice9 *out_device;
hr = ID3DXRenderToEnvMap_GetDesc(render, NULL); - ok(hr == D3DERR_INVALIDCALL, "ID3DXRenderToEnvMap::GetDesc returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "ID3DXRenderToEnvMap::GetDesc returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = ID3DXRenderToEnvMap_GetDevice(render, NULL); - ok(hr == D3DERR_INVALIDCALL, "ID3DXRenderToEnvMap::GetDevice returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "ID3DXRenderToEnvMap::GetDevice returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
ref_count = get_ref((IUnknown *)device); hr = ID3DXRenderToEnvMap_GetDevice(render, &out_device); - ok(hr == D3D_OK, "ID3DXRenderToEnvMap::GetDevice returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "ID3DXRenderToEnvMap::GetDevice returned %#lx, expected %#lx\n", hr, D3D_OK); ok(out_device == device, "ID3DXRenderToEnvMap::GetDevice returned different device\n"); check_release((IUnknown *)device, ref_count);
hr = ID3DXRenderToEnvMap_End(render, D3DX_FILTER_NONE); - ok(hr == D3DERR_INVALIDCALL, "ID3DXRenderToEnvMap::End returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3DERR_INVALIDCALL, "ID3DXRenderToEnvMap::End returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = ID3DXRenderToEnvMap_BeginCube(render, NULL); - ok(hr == D3DERR_INVALIDCALL, "ID3DXRenderToEnvMap::BeginCube returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "ID3DXRenderToEnvMap::BeginCube returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = ID3DXRenderToEnvMap_BeginHemisphere(render, NULL, NULL); - todo_wine ok(hr == D3DERR_INVALIDCALL, "ID3DXRenderToEnvMap::BeginHemisphere returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + todo_wine ok(hr == D3DERR_INVALIDCALL, "ID3DXRenderToEnvMap::BeginHemisphere returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = ID3DXRenderToEnvMap_BeginParabolic(render, NULL, NULL); - todo_wine ok(hr == D3DERR_INVALIDCALL, "ID3DXRenderToEnvMap::BeginParabolic returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + todo_wine ok(hr == D3DERR_INVALIDCALL, "ID3DXRenderToEnvMap::BeginParabolic returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = ID3DXRenderToEnvMap_BeginSphere(render, NULL); - todo_wine ok(hr == D3DERR_INVALIDCALL, "ID3DXRenderToEnvMap::BeginSphere returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + todo_wine ok(hr == D3DERR_INVALIDCALL, "ID3DXRenderToEnvMap::BeginSphere returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
check_release((IUnknown *)render, 0); } else skip("Failed to create ID3DXRenderToEnvMap\n"); @@ -1837,7 +1837,7 @@ START_TEST(core) d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD; hr = IDirect3D9_CreateDevice(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, wnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &device); if(FAILED(hr)) { - skip("Failed to create IDirect3DDevice9 object %#x\n", hr); + skip("Failed to create IDirect3DDevice9 object %#lx\n", hr); IDirect3D9_Release(d3d); DestroyWindow(wnd); return; diff --git a/dlls/d3dx9_36/tests/effect.c b/dlls/d3dx9_36/tests/effect.c index 7a1109f48b5..015d7d7e090 100644 --- a/dlls/d3dx9_36/tests/effect.c +++ b/dlls/d3dx9_36/tests/effect.c @@ -159,7 +159,7 @@ static IDirect3DDevice9 *create_device(HWND *window) IDirect3D9_Release(d3d); if (FAILED(hr)) { - skip("Failed to create IDirect3DDevice9 object %#x.\n", hr); + skip("Failed to create IDirect3DDevice9 object %#lx.\n", hr); DestroyWindow(wnd); return NULL; } @@ -241,19 +241,19 @@ static void test_create_effect_and_pool(IDirect3DDevice9 *device) ID3DXEffectPool *pool = (ID3DXEffectPool *)0xdeadbeef, *pool2;
hr = D3DXCreateEffect(NULL, effect_desc, sizeof(effect_desc), NULL, NULL, 0, NULL, NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3D_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3D_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateEffect(device, NULL, 0, NULL, NULL, 0, NULL, NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateEffect(device, effect_desc, 0, NULL, NULL, 0, NULL, NULL, NULL); - ok(hr == E_FAIL, "Got result %x, expected %x (D3DXERR_INVALIDDATA)\n", hr, E_FAIL); + ok(hr == E_FAIL, "Got result %lx, expected %lx (D3DXERR_INVALIDDATA)\n", hr, E_FAIL);
hr = D3DXCreateEffect(device, effect_desc, sizeof(effect_desc), NULL, NULL, 0, NULL, NULL, NULL); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
hr = D3DXCreateEffect(device, effect_desc, sizeof(effect_desc), NULL, NULL, 0, NULL, &effect, NULL); - todo_wine ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + todo_wine ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr); if (FAILED(hr)) { skip("Failed to compile effect, skipping test.\n"); @@ -261,95 +261,95 @@ static void test_create_effect_and_pool(IDirect3DDevice9 *device) }
hr = effect->lpVtbl->QueryInterface(effect, &IID_ID3DXBaseEffect, (void **)&base); - ok(hr == E_NOINTERFACE, "QueryInterface failed, got %x, expected %x (E_NOINTERFACE)\n", hr, E_NOINTERFACE); + ok(hr == E_NOINTERFACE, "QueryInterface failed, got %lx, expected %lx (E_NOINTERFACE)\n", hr, E_NOINTERFACE);
hr = effect->lpVtbl->GetStateManager(effect, NULL); - ok(hr == D3DERR_INVALIDCALL, "GetStateManager failed, got %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "GetStateManager failed, got %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->GetStateManager(effect, &manager); - ok(hr == D3D_OK, "GetStateManager failed, got %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "GetStateManager failed, got %lx, expected 0 (D3D_OK)\n", hr); ok(!manager, "GetStateManager failed, got %p\n", manager);
/* this works, but it is not recommended! */ hr = effect->lpVtbl->SetStateManager(effect, (ID3DXEffectStateManager *)device); - ok(hr == D3D_OK, "SetStateManager failed, got %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "SetStateManager failed, got %lx, expected 0 (D3D_OK)\n", hr);
hr = effect->lpVtbl->GetStateManager(effect, &manager); - ok(hr == D3D_OK, "GetStateManager failed, got %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "GetStateManager failed, got %lx, expected 0 (D3D_OK)\n", hr); ok(manager != NULL, "GetStateManager failed\n");
IDirect3DDevice9_AddRef(device); count = IDirect3DDevice9_Release(device); - ok(count == 4, "Release failed, got %u, expected 4\n", count); + ok(count == 4, "Release failed, got %lu, expected 4\n", count);
count = IUnknown_Release(manager); - ok(count == 3, "Release failed, got %u, expected 3\n", count); + ok(count == 3, "Release failed, got %lu, expected 3\n", count);
hr = effect->lpVtbl->SetStateManager(effect, NULL); - ok(hr == D3D_OK, "SetStateManager failed, got %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "SetStateManager failed, got %lx, expected 0 (D3D_OK)\n", hr);
hr = effect->lpVtbl->GetPool(effect, &pool); - ok(hr == D3D_OK, "GetPool failed, got %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "GetPool failed, got %lx, expected 0 (D3D_OK)\n", hr); ok(!pool, "GetPool failed, got %p\n", pool);
hr = effect->lpVtbl->GetPool(effect, NULL); - ok(hr == D3DERR_INVALIDCALL, "GetPool failed, got %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "GetPool failed, got %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->GetDevice(effect, &device2); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
hr = effect->lpVtbl->GetDevice(effect, NULL); - ok(hr == D3DERR_INVALIDCALL, "GetDevice failed, got %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "GetDevice failed, got %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
count = IDirect3DDevice9_Release(device2); - ok(count == 2, "Release failed, got %u, expected 2\n", count); + ok(count == 2, "Release failed, got %lu, expected 2\n", count);
count = effect->lpVtbl->Release(effect); - ok(count == 0, "Release failed %u\n", count); + ok(count == 0, "Release failed %lu\n", count);
hr = D3DXCreateEffectPool(NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3D_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3D_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateEffectPool(&pool); - ok(hr == S_OK, "Got result %x, expected 0 (S_OK)\n", hr); + ok(hr == S_OK, "Got result %lx, expected 0 (S_OK)\n", hr);
count = pool->lpVtbl->Release(pool); - ok(count == 0, "Release failed %u\n", count); + ok(count == 0, "Release failed %lu\n", count);
hr = D3DXCreateEffectPool(&pool); - ok(hr == S_OK, "Got result %x, expected 0 (S_OK)\n", hr); + ok(hr == S_OK, "Got result %lx, expected 0 (S_OK)\n", hr);
hr = D3DXCreateEffect(device, effect_desc, sizeof(effect_desc), NULL, NULL, 0, pool, NULL, NULL); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
hr = pool->lpVtbl->QueryInterface(pool, &IID_ID3DXEffectPool, (void **)&pool2); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr); ok(pool == pool2, "Got effect pool %p, expected %p.\n", pool2, pool);
count = pool2->lpVtbl->Release(pool2); - ok(count == 1, "Release failed, got %u, expected 1\n", count); + ok(count == 1, "Release failed, got %lu, expected 1\n", count);
hr = IDirect3DDevice9_QueryInterface(device, &IID_IDirect3DDevice9, (void **)&device2); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
count = IDirect3DDevice9_Release(device2); - ok(count == 1, "Release failed, got %u, expected 1\n", count); + ok(count == 1, "Release failed, got %lu, expected 1\n", count);
hr = D3DXCreateEffect(device, effect_desc, sizeof(effect_desc), NULL, NULL, 0, pool, &effect, NULL); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
hr = effect->lpVtbl->GetPool(effect, &pool); - ok(hr == D3D_OK, "GetPool failed, got %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "GetPool failed, got %lx, expected 0 (D3D_OK)\n", hr); ok(pool == pool2, "Got effect pool %p, expected %p.\n", pool2, pool);
count = pool2->lpVtbl->Release(pool2); - ok(count == 2, "Release failed, got %u, expected 2\n", count); + ok(count == 2, "Release failed, got %lu, expected 2\n", count);
count = effect->lpVtbl->Release(effect); - ok(count == 0, "Release failed %u\n", count); + ok(count == 0, "Release failed %lu\n", count);
count = pool->lpVtbl->Release(pool); - ok(count == 0, "Release failed %u\n", count); + ok(count == 0, "Release failed %lu\n", count); }
static void test_create_effect_compiler(void) @@ -361,13 +361,13 @@ static void test_create_effect_compiler(void) ULONG count;
hr = D3DXCreateEffectCompiler(NULL, 0, NULL, NULL, 0, &compiler, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3D_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3D_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateEffectCompiler(NULL, 0, NULL, NULL, 0, NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3D_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3D_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateEffectCompiler(effect_desc, 0, NULL, NULL, 0, &compiler, NULL); - ok(hr == D3D_OK, "Got result %x, expected %x (D3D_OK)\n", hr, D3D_OK); + ok(hr == D3D_OK, "Got result %lx, expected %lx (D3D_OK)\n", hr, D3D_OK); if (FAILED(hr)) { skip("D3DXCreateEffectCompiler failed, skipping test.\n"); @@ -375,40 +375,40 @@ static void test_create_effect_compiler(void) }
count = compiler->lpVtbl->Release(compiler); - ok(count == 0, "Release failed %u\n", count); + ok(count == 0, "Release failed %lu\n", count);
hr = D3DXCreateEffectCompiler(effect_desc, 0, NULL, NULL, 0, NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3D_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3D_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateEffectCompiler(NULL, sizeof(effect_desc), NULL, NULL, 0, &compiler, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3D_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3D_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateEffectCompiler(NULL, sizeof(effect_desc), NULL, NULL, 0, NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3D_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3D_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateEffectCompiler(effect_desc, sizeof(effect_desc), NULL, NULL, 0, NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateEffectCompiler(effect_desc, sizeof(effect_desc), NULL, NULL, 0, &compiler, NULL); - ok(hr == D3D_OK, "Got result %x, expected %x (D3D_OK)\n", hr, D3D_OK); + ok(hr == D3D_OK, "Got result %lx, expected %lx (D3D_OK)\n", hr, D3D_OK);
hr = compiler->lpVtbl->QueryInterface(compiler, &IID_ID3DXBaseEffect, (void **)&base); - ok(hr == E_NOINTERFACE, "QueryInterface failed, got %x, expected %x (E_NOINTERFACE)\n", hr, E_NOINTERFACE); + ok(hr == E_NOINTERFACE, "QueryInterface failed, got %lx, expected %lx (E_NOINTERFACE)\n", hr, E_NOINTERFACE);
hr = compiler->lpVtbl->QueryInterface(compiler, &IID_ID3DXEffectCompiler, (void **)&compiler2); - ok(hr == D3D_OK, "QueryInterface failed, got %x, expected %x (D3D_OK)\n", hr, D3D_OK); + ok(hr == D3D_OK, "QueryInterface failed, got %lx, expected %lx (D3D_OK)\n", hr, D3D_OK);
hr = compiler->lpVtbl->QueryInterface(compiler, &IID_IUnknown, (void **)&unknown); - ok(hr == D3D_OK, "QueryInterface failed, got %x, expected %x (D3D_OK)\n", hr, D3D_OK); + ok(hr == D3D_OK, "QueryInterface failed, got %lx, expected %lx (D3D_OK)\n", hr, D3D_OK);
count = unknown->lpVtbl->Release(unknown); - ok(count == 2, "Release failed, got %u, expected %u\n", count, 2); + ok(count == 2, "Release failed, got %lu, expected %u\n", count, 2);
count = compiler2->lpVtbl->Release(compiler2); - ok(count == 1, "Release failed, got %u, expected %u\n", count, 1); + ok(count == 1, "Release failed, got %lu, expected %u\n", count, 1);
count = compiler->lpVtbl->Release(compiler); - ok(count == 0, "Release failed %u\n", count); + ok(count == 0, "Release failed %lu\n", count); }
/* @@ -1013,17 +1013,17 @@ static void test_effect_parameter_value_GetValue(const struct test_effect_parame || res_desc->Class == D3DXPC_VECTOR || res_desc->Class == D3DXPC_MATRIX_ROWS) { - ok(hr == D3D_OK, "%u - %s: GetValue failed, got %#x, expected %#x\n", i, res_full_name, hr, D3D_OK); + ok(hr == D3D_OK, "%u - %s: GetValue failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3D_OK);
for (l = 0; l < res_desc->Bytes / sizeof(*value); ++l) { - ok(value[l] == res_value[l], "%u - %s: GetValue value[%u] failed, got %#x, expected %#x\n", + ok(value[l] == res_value[l], "%u - %s: GetValue value[%u] failed, got %#lx, expected %#lx\n", i, res_full_name, l, value[l], res_value[l]); }
for (l = res_desc->Bytes / sizeof(*value); l < EFFECT_PARAMETER_VALUE_ARRAY_SIZE; ++l) { - ok(value[l] == 0xabababab, "%u - %s: GetValue value[%u] failed, got %#x, expected %#x\n", + ok(value[l] == 0xabababab, "%u - %s: GetValue value[%u] failed, got %#lx, expected %#x\n", i, res_full_name, l, value[l], 0xabababab); } } @@ -1034,7 +1034,7 @@ static void test_effect_parameter_value_GetValue(const struct test_effect_parame case D3DXPT_PIXELSHADER: case D3DXPT_VERTEXSHADER: case D3DXPT_TEXTURE2D: - ok(hr == D3D_OK, "%u - %s: GetValue failed, got %#x, expected %#x\n", i, res_full_name, hr, D3D_OK); + ok(hr == D3D_OK, "%u - %s: GetValue failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3D_OK);
for (l = 0; l < (res_desc->Elements ? res_desc->Elements : 1); ++l) { @@ -1044,7 +1044,7 @@ static void test_effect_parameter_value_GetValue(const struct test_effect_parame break;
case D3DXPT_STRING: - ok(hr == D3D_OK, "%u - %s: GetValue failed, got %#x, expected %#x\n", i, res_full_name, hr, D3D_OK); + ok(hr == D3D_OK, "%u - %s: GetValue failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3D_OK); break;
default: @@ -1054,12 +1054,12 @@ static void test_effect_parameter_value_GetValue(const struct test_effect_parame } else { - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetValue failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetValue failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
for (l = 0; l < EFFECT_PARAMETER_VALUE_ARRAY_SIZE; ++l) { - ok(value[l] == 0xabababab, "%u - %s: GetValue value[%u] failed, got %#x, expected %#x\n", + ok(value[l] == 0xabababab, "%u - %s: GetValue value[%u] failed, got %#lx, expected %#x\n", i, res_full_name, l, value[l], 0xabababab); } } @@ -1076,13 +1076,13 @@ static void test_effect_parameter_value_GetBool(const struct test_effect_paramet hr = effect->lpVtbl->GetBool(effect, parameter, &bvalue); if (!res_desc->Elements && res_desc->Rows == 1 && res_desc->Columns == 1) { - ok(hr == D3D_OK, "%u - %s: GetBool failed, got %#x, expected %#x\n", i, res_full_name, hr, D3D_OK); + ok(hr == D3D_OK, "%u - %s: GetBool failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3D_OK); ok(bvalue == get_bool(res_value), "%u - %s: GetBool bvalue failed, got %#x, expected %#x\n", i, res_full_name, bvalue, get_bool(res_value)); } else { - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetBool failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetBool failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL); ok(bvalue == 0xabababab, "%u - %s: GetBool bvalue failed, got %#x, expected %#x\n", i, res_full_name, bvalue, 0xabababab); @@ -1104,7 +1104,7 @@ static void test_effect_parameter_value_GetBoolArray(const struct test_effect_pa || res_desc->Class == D3DXPC_VECTOR || res_desc->Class == D3DXPC_MATRIX_ROWS) { - ok(hr == D3D_OK, "%u - %s: GetBoolArray failed, got %#x, expected %#x\n", i, res_full_name, hr, D3D_OK); + ok(hr == D3D_OK, "%u - %s: GetBoolArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3D_OK);
for (l = 0; l < res_desc->Bytes / sizeof(*bavalue); ++l) { @@ -1118,7 +1118,7 @@ static void test_effect_parameter_value_GetBoolArray(const struct test_effect_pa } else { - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetBoolArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetBoolArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
for (l = 0; l < EFFECT_PARAMETER_VALUE_ARRAY_SIZE; ++l) if (bavalue[l] != 0xabababab) ++err; @@ -1137,7 +1137,7 @@ static void test_effect_parameter_value_GetInt(const struct test_effect_paramete hr = effect->lpVtbl->GetInt(effect, parameter, &ivalue); if (!res_desc->Elements && res_desc->Columns == 1 && res_desc->Rows == 1) { - ok(hr == D3D_OK, "%u - %s: GetInt failed, got %#x, expected %#x\n", i, res_full_name, hr, D3D_OK); + ok(hr == D3D_OK, "%u - %s: GetInt failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3D_OK); ok(ivalue == get_int(res_desc->Type, res_value), "%u - %s: GetInt ivalue failed, got %i, expected %i\n", i, res_full_name, ivalue, get_int(res_desc->Type, res_value)); } @@ -1147,7 +1147,7 @@ static void test_effect_parameter_value_GetInt(const struct test_effect_paramete { INT tmp;
- ok(hr == D3D_OK, "%u - %s: GetInt failed, got %#x, expected %#x\n", i, res_full_name, hr, D3D_OK); + ok(hr == D3D_OK, "%u - %s: GetInt failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3D_OK);
tmp = (INT)(min(max(0.0f, *((FLOAT *)res_value + 2)), 1.0f) * INT_FLOAT_MULTI); tmp += ((INT)(min(max(0.0f, *((FLOAT *)res_value + 1)), 1.0f) * INT_FLOAT_MULTI)) << 8; @@ -1162,7 +1162,7 @@ static void test_effect_parameter_value_GetInt(const struct test_effect_paramete } else { - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetInt failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetInt failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL); ok(ivalue == 0xabababab, "%u - %s: GetInt ivalue failed, got %i, expected %i\n", i, res_full_name, ivalue, 0xabababab); @@ -1184,7 +1184,7 @@ static void test_effect_parameter_value_GetIntArray(const struct test_effect_par || res_desc->Class == D3DXPC_VECTOR || res_desc->Class == D3DXPC_MATRIX_ROWS) { - ok(hr == D3D_OK, "%u - %s: GetIntArray failed, got %#x, expected %#x\n", i, res_full_name, hr, D3D_OK); + ok(hr == D3D_OK, "%u - %s: GetIntArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3D_OK);
for (l = 0; l < res_desc->Bytes / sizeof(*iavalue); ++l) { @@ -1198,7 +1198,7 @@ static void test_effect_parameter_value_GetIntArray(const struct test_effect_par } else { - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetIntArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetIntArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
for (l = 0; l < EFFECT_PARAMETER_VALUE_ARRAY_SIZE; ++l) if (iavalue[l] != 0xabababab) ++err; @@ -1218,13 +1218,13 @@ static void test_effect_parameter_value_GetFloat(const struct test_effect_parame hr = effect->lpVtbl->GetFloat(effect, parameter, &fvalue); if (!res_desc->Elements && res_desc->Columns == 1 && res_desc->Rows == 1) { - ok(hr == D3D_OK, "%u - %s: GetFloat failed, got %#x, expected %#x\n", i, res_full_name, hr, D3D_OK); + ok(hr == D3D_OK, "%u - %s: GetFloat failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3D_OK); ok(compare_float(fvalue, get_float(res_desc->Type, res_value), 512), "%u - %s: GetFloat fvalue failed, got %f, expected %f\n", i, res_full_name, fvalue, get_float(res_desc->Type, res_value)); } else { - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetFloat failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetFloat failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL); ok(fvalue == *(FLOAT *)&cmp, "%u - %s: GetFloat fvalue failed, got %f, expected %f\n", i, res_full_name, fvalue, *(FLOAT *)&cmp); @@ -1247,7 +1247,7 @@ static void test_effect_parameter_value_GetFloatArray(const struct test_effect_p || res_desc->Class == D3DXPC_VECTOR || res_desc->Class == D3DXPC_MATRIX_ROWS) { - ok(hr == D3D_OK, "%u - %s: GetFloatArray failed, got %#x, expected %#x\n", i, res_full_name, hr, D3D_OK); + ok(hr == D3D_OK, "%u - %s: GetFloatArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3D_OK);
for (l = 0; l < res_desc->Bytes / sizeof(*favalue); ++l) { @@ -1261,7 +1261,7 @@ static void test_effect_parameter_value_GetFloatArray(const struct test_effect_p } else { - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetFloatArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetFloatArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
for (l = 0; l < EFFECT_PARAMETER_VALUE_ARRAY_SIZE; ++l) if (favalue[l] != *(FLOAT *)&cmp) ++err; @@ -1287,7 +1287,7 @@ static void test_effect_parameter_value_GetVector(const struct test_effect_param { DWORD tmp;
- ok(hr == D3D_OK, "%u - %s: GetVector failed, got %#x, expected %#x\n", i, res_full_name, hr, D3D_OK); + ok(hr == D3D_OK, "%u - %s: GetVector failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3D_OK);
tmp = (DWORD)(*(fvalue + 2) * INT_FLOAT_MULTI); tmp += ((DWORD)(*(fvalue + 1) * INT_FLOAT_MULTI)) << 8; @@ -1298,7 +1298,7 @@ static void test_effect_parameter_value_GetVector(const struct test_effect_param } else if (!res_desc->Elements && (res_desc->Class == D3DXPC_SCALAR || res_desc->Class == D3DXPC_VECTOR)) { - ok(hr == D3D_OK, "%u - %s: GetVector failed, got %#x, expected %#x\n", i, res_full_name, hr, D3D_OK); + ok(hr == D3D_OK, "%u - %s: GetVector failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3D_OK);
for (l = 0; l < res_desc->Columns; ++l) { @@ -1309,7 +1309,7 @@ static void test_effect_parameter_value_GetVector(const struct test_effect_param } else { - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetVector failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetVector failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
for (l = 0; l < 4; ++l) if (fvalue[l] != *(FLOAT *)&cmp) ++err; @@ -1333,13 +1333,13 @@ static void test_effect_parameter_value_GetVectorArray(const struct test_effect_ hr = effect->lpVtbl->GetVectorArray(effect, parameter, (D3DXVECTOR4 *)&fvalue, element); if (!element) { - ok(hr == D3D_OK, "%u - %s[%u]: GetVectorArray failed, got %#x, expected %#x\n", i, res_full_name, element, hr, D3D_OK); + ok(hr == D3D_OK, "%u - %s[%u]: GetVectorArray failed, got %#lx, expected %#lx\n", i, res_full_name, element, hr, D3D_OK);
for (l = 0; l < EFFECT_PARAMETER_VALUE_ARRAY_SIZE; ++l) if (fvalue[l] != *(FLOAT *)&cmp) ++err; } else if (element <= res_desc->Elements && res_desc->Class == D3DXPC_VECTOR) { - ok(hr == D3D_OK, "%u - %s[%u]: GetVectorArray failed, got %#x, expected %#x\n", i, res_full_name, element, hr, D3D_OK); + ok(hr == D3D_OK, "%u - %s[%u]: GetVectorArray failed, got %#lx, expected %#lx\n", i, res_full_name, element, hr, D3D_OK);
for (k = 0; k < element; ++k) { @@ -1357,7 +1357,7 @@ static void test_effect_parameter_value_GetVectorArray(const struct test_effect_ } else { - ok(hr == D3DERR_INVALIDCALL, "%u - %s[%u]: GetVectorArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s[%u]: GetVectorArray failed, got %#lx, expected %#lx\n", i, res_full_name, element, hr, D3DERR_INVALIDCALL);
for (l = 0; l < EFFECT_PARAMETER_VALUE_ARRAY_SIZE; ++l) if (fvalue[l] != *(FLOAT *)&cmp) ++err; @@ -1385,7 +1385,7 @@ static void test_effect_parameter_value_GetMatrix(const struct test_effect_param hr = effect->lpVtbl->GetMatrix(effect, parameter, (D3DXMATRIX *)&fvalue); if (!res_desc->Elements && res_desc->Class == D3DXPC_MATRIX_ROWS) { - ok(hr == D3D_OK, "%u - %s: GetMatrix failed, got %#x, expected %#x.\n", i, res_full_name, hr, D3D_OK); + ok(hr == D3D_OK, "%u - %s: GetMatrix failed, got %#lx, expected %#lx.\n", i, res_full_name, hr, D3D_OK);
for (k = 0; k < 4; ++k) { @@ -1403,7 +1403,7 @@ static void test_effect_parameter_value_GetMatrix(const struct test_effect_param } else { - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetMatrix failed, got %#x, expected %#x.\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetMatrix failed, got %#lx, expected %#lx.\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
for (l = 0; l < ARRAY_SIZE(fvalue); ++l) @@ -1429,13 +1429,13 @@ static void test_effect_parameter_value_GetMatrixArray(const struct test_effect_ hr = effect->lpVtbl->GetMatrixArray(effect, parameter, (D3DXMATRIX *)&fvalue, element); if (!element) { - ok(hr == D3D_OK, "%u - %s[%u]: GetMatrixArray failed, got %#x, expected %#x\n", i, res_full_name, element, hr, D3D_OK); + ok(hr == D3D_OK, "%u - %s[%u]: GetMatrixArray failed, got %#lx, expected %#lx\n", i, res_full_name, element, hr, D3D_OK);
for (l = 0; l < EFFECT_PARAMETER_VALUE_ARRAY_SIZE; ++l) if (fvalue[l] != *(FLOAT *)&cmp) ++err; } else if (element <= res_desc->Elements && res_desc->Class == D3DXPC_MATRIX_ROWS) { - ok(hr == D3D_OK, "%u - %s[%u]: GetMatrixArray failed, got %#x, expected %#x\n", i, res_full_name, element, hr, D3D_OK); + ok(hr == D3D_OK, "%u - %s[%u]: GetMatrixArray failed, got %#lx, expected %#lx\n", i, res_full_name, element, hr, D3D_OK);
for (m = 0; m < element; ++m) { @@ -1458,7 +1458,7 @@ static void test_effect_parameter_value_GetMatrixArray(const struct test_effect_ } else { - ok(hr == D3DERR_INVALIDCALL, "%u - %s[%u]: GetMatrixArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s[%u]: GetMatrixArray failed, got %#lx, expected %#lx\n", i, res_full_name, element, hr, D3DERR_INVALIDCALL);
for (l = 0; l < EFFECT_PARAMETER_VALUE_ARRAY_SIZE; ++l) if (fvalue[l] != *(FLOAT *)&cmp) ++err; @@ -1496,7 +1496,7 @@ static void test_effect_parameter_value_GetMatrixPointerArray(const struct test_ hr = effect->lpVtbl->GetMatrixPointerArray(effect, parameter, matrix_pointer_array, element); if (!element) { - ok(hr == D3D_OK, "%u - %s[%u]: GetMatrixPointerArray failed, got %#x, expected %#x\n", + ok(hr == D3D_OK, "%u - %s[%u]: GetMatrixPointerArray failed, got %#lx, expected %#lx\n", i, res_full_name, element, hr, D3D_OK);
for (m = 0; m < ARRAY_SIZE(fvalue); ++m) @@ -1506,7 +1506,7 @@ static void test_effect_parameter_value_GetMatrixPointerArray(const struct test_ } else if (element <= res_desc->Elements && res_desc->Class == D3DXPC_MATRIX_ROWS) { - ok(hr == D3D_OK, "%u - %s[%u]: GetMatrixPointerArray failed, got %#x, expected %#x\n", + ok(hr == D3D_OK, "%u - %s[%u]: GetMatrixPointerArray failed, got %#lx, expected %#lx\n", i, res_full_name, element, hr, D3D_OK);
for (m = 0; m < element; ++m) @@ -1539,7 +1539,7 @@ static void test_effect_parameter_value_GetMatrixPointerArray(const struct test_ if (fvalue[m].f[l] != cmp.f) ++err;
- ok(hr == D3DERR_INVALIDCALL, "%u - %s[%u]: GetMatrixPointerArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s[%u]: GetMatrixPointerArray failed, got %#lx, expected %#lx\n", i, res_full_name, element, hr, D3DERR_INVALIDCALL); } ok(!err, "%u - %s[%u]: GetMatrixPointerArray failed with %u errors\n", i, res_full_name, element, err); @@ -1565,7 +1565,7 @@ static void test_effect_parameter_value_GetMatrixTranspose(const struct test_eff hr = effect->lpVtbl->GetMatrixTranspose(effect, parameter, (D3DXMATRIX *)&fvalue); if (!res_desc->Elements && res_desc->Class == D3DXPC_MATRIX_ROWS) { - ok(hr == D3D_OK, "%u - %s: GetMatrixTranspose failed, got %#x, expected %#x.\n", i, res_full_name, hr, D3D_OK); + ok(hr == D3D_OK, "%u - %s: GetMatrixTranspose failed, got %#lx, expected %#lx.\n", i, res_full_name, hr, D3D_OK);
for (k = 0; k < 4; ++k) { @@ -1583,7 +1583,7 @@ static void test_effect_parameter_value_GetMatrixTranspose(const struct test_eff } else if (!res_desc->Elements && (res_desc->Class == D3DXPC_VECTOR || res_desc->Class == D3DXPC_SCALAR)) { - ok(hr == D3D_OK, "%u - %s: GetMatrixTranspose failed, got %#x, expected %#x.\n", i, res_full_name, hr, D3D_OK); + ok(hr == D3D_OK, "%u - %s: GetMatrixTranspose failed, got %#lx, expected %#lx.\n", i, res_full_name, hr, D3D_OK);
for (k = 0; k < 4; ++k) { @@ -1601,7 +1601,7 @@ static void test_effect_parameter_value_GetMatrixTranspose(const struct test_eff } else { - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetMatrixTranspose failed, got %#x, expected %#x.\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetMatrixTranspose failed, got %#lx, expected %#lx.\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
for (l = 0; l < ARRAY_SIZE(fvalue); ++l) @@ -1627,14 +1627,14 @@ static void test_effect_parameter_value_GetMatrixTransposeArray(const struct tes hr = effect->lpVtbl->GetMatrixTransposeArray(effect, parameter, (D3DXMATRIX *)&fvalue, element); if (!element) { - ok(hr == D3D_OK, "%u - %s[%u]: GetMatrixTransposeArray failed, got %#x, expected %#x\n", + ok(hr == D3D_OK, "%u - %s[%u]: GetMatrixTransposeArray failed, got %#lx, expected %#lx\n", i, res_full_name, element, hr, D3D_OK);
for (l = 0; l < EFFECT_PARAMETER_VALUE_ARRAY_SIZE; ++l) if (fvalue[l] != *(FLOAT *)&cmp) ++err; } else if (element <= res_desc->Elements && res_desc->Class == D3DXPC_MATRIX_ROWS) { - ok(hr == D3D_OK, "%u - %s[%u]: GetMatrixTransposeArray failed, got %#x, expected %#x\n", + ok(hr == D3D_OK, "%u - %s[%u]: GetMatrixTransposeArray failed, got %#lx, expected %#lx\n", i, res_full_name, element, hr, D3D_OK);
for (m = 0; m < element; ++m) @@ -1658,7 +1658,7 @@ static void test_effect_parameter_value_GetMatrixTransposeArray(const struct tes } else { - ok(hr == D3DERR_INVALIDCALL, "%u - %s[%u]: GetMatrixTransposeArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s[%u]: GetMatrixTransposeArray failed, got %#lx, expected %#lx\n", i, res_full_name, element, hr, D3DERR_INVALIDCALL);
for (l = 0; l < EFFECT_PARAMETER_VALUE_ARRAY_SIZE; ++l) if (fvalue[l] != *(FLOAT *)&cmp) ++err; @@ -1696,7 +1696,7 @@ static void test_effect_parameter_value_GetMatrixTransposePointerArray(const str hr = effect->lpVtbl->GetMatrixTransposePointerArray(effect, parameter, matrix_pointer_array, element); if (!element) { - ok(hr == D3D_OK, "%u - %s[%u]: GetMatrixTransposePointerArray failed, got %#x, expected %#x\n", + ok(hr == D3D_OK, "%u - %s[%u]: GetMatrixTransposePointerArray failed, got %#lx, expected %#lx\n", i, res_full_name, element, hr, D3D_OK);
for (m = 0; m < ARRAY_SIZE(fvalue); ++m) @@ -1706,7 +1706,7 @@ static void test_effect_parameter_value_GetMatrixTransposePointerArray(const str } else if (element <= res_desc->Elements && res_desc->Class == D3DXPC_MATRIX_ROWS) { - ok(hr == D3D_OK, "%u - %s[%u]: GetMatrixTransposePointerArray failed, got %#x, expected %#x\n", + ok(hr == D3D_OK, "%u - %s[%u]: GetMatrixTransposePointerArray failed, got %#lx, expected %#lx\n", i, res_full_name, element, hr, D3D_OK);
for (m = 0; m < element; ++m) @@ -1734,7 +1734,7 @@ static void test_effect_parameter_value_GetMatrixTransposePointerArray(const str } else { - ok(hr == D3DERR_INVALIDCALL, "%u - %s[%u]: GetMatrixTransposePointerArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s[%u]: GetMatrixTransposePointerArray failed, got %#lx, expected %#lx\n", i, res_full_name, element, hr, D3DERR_INVALIDCALL);
for (m = 0; m < ARRAY_SIZE(fvalue); ++m) @@ -1778,7 +1778,7 @@ static void test_effect_parameter_value_ResetValue(const struct test_effect_para || res_desc->Class == D3DXPC_MATRIX_ROWS) { hr = effect->lpVtbl->SetValue(effect, parameter, res_value, res_desc->Bytes); - ok(hr == D3D_OK, "%u - %s: SetValue failed, got %#x, expected %#x\n", i, res_full_name, hr, D3D_OK); + ok(hr == D3D_OK, "%u - %s: SetValue failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3D_OK); } else { @@ -1815,10 +1815,10 @@ static void test_effect_parameter_value(IDirect3DDevice9 *device) UINT k;
hr = D3DXCreateEffect(device, blob, blob_size, NULL, NULL, 0, NULL, &effect, NULL); - ok(hr == D3D_OK, "%u: D3DXCreateEffect failed, got %#x, expected %#x\n", i, hr, D3D_OK); + ok(hr == D3D_OK, "%u: D3DXCreateEffect failed, got %#lx, expected %#lx\n", i, hr, D3D_OK);
hr = effect->lpVtbl->GetDesc(effect, &edesc); - ok(hr == D3D_OK, "%u: GetDesc failed, got %#x, expected %#x\n", i, hr, D3D_OK); + ok(hr == D3D_OK, "%u: GetDesc failed, got %#lx, expected %#lx\n", i, hr, D3D_OK); ok(edesc.Parameters == res_count, "%u: Parameters failed, got %u, expected %u\n", i, edesc.Parameters, res_count);
@@ -1841,7 +1841,7 @@ static void test_effect_parameter_value(IDirect3DDevice9 *device) ok(parameter != NULL, "%u - %s: GetParameterByName failed\n", i, res_full_name);
hr = effect->lpVtbl->GetParameterDesc(effect, parameter, &pdesc); - ok(hr == D3D_OK, "%u - %s: GetParameterDesc failed, got %#x, expected %#x\n", i, res_full_name, hr, D3D_OK); + ok(hr == D3D_OK, "%u - %s: GetParameterDesc failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3D_OK);
ok(res_desc->Name ? !strcmp(pdesc.Name, res_desc->Name) : !pdesc.Name, "%u - %s: GetParameterDesc Name failed, got "%s", expected "%s"\n", @@ -1863,7 +1863,7 @@ static void test_effect_parameter_value(IDirect3DDevice9 *device) i, res_full_name, pdesc.Annotations, res_desc->Annotations); ok(res_desc->StructMembers == pdesc.StructMembers, "%u - %s: GetParameterDesc StructMembers failed, got %u, expected %u\n", i, res_full_name, pdesc.StructMembers, res_desc->StructMembers); - ok(res_desc->Flags == pdesc.Flags, "%u - %s: GetParameterDesc Flags failed, got %u, expected %u\n", + ok(res_desc->Flags == pdesc.Flags, "%u - %s: GetParameterDesc Flags failed, got %lu, expected %lu\n", i, res_full_name, pdesc.Flags, res_desc->Flags); ok(res_desc->Bytes == pdesc.Bytes, "%u - %s: GetParameterDesc Bytes, got %u, expected %u\n", i, res_full_name, pdesc.Bytes, res_desc->Bytes); @@ -1896,199 +1896,199 @@ static void test_effect_parameter_value(IDirect3DDevice9 *device) * effect->lpVtbl->SetValue(effect, parameter, NULL, res_desc->Bytes); */ hr = effect->lpVtbl->SetBool(effect, NULL, bvalue); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetBool failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetBool failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->GetBool(effect, NULL, &bvalue); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetBool failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetBool failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->GetBool(effect, parameter, NULL); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetBool failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetBool failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->SetBoolArray(effect, NULL, (BOOL *)input_value, res_desc->Bytes / sizeof(BOOL)); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetBoolArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetBoolArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->GetBoolArray(effect, NULL, (BOOL *)input_value, res_desc->Bytes / sizeof(BOOL)); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetBoolArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetBoolArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->GetBoolArray(effect, parameter, NULL, res_desc->Bytes / sizeof(BOOL)); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetBoolArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetBoolArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->SetInt(effect, NULL, ivalue); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetInt failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetInt failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->GetInt(effect, NULL, &ivalue); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetInt failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetInt failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->GetInt(effect, parameter, NULL); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetInt failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetInt failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->SetIntArray(effect, NULL, (INT *)input_value, res_desc->Bytes / sizeof(INT)); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetIntArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetIntArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->GetIntArray(effect, NULL, (INT *)input_value, res_desc->Bytes / sizeof(INT)); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetIntArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetIntArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->GetIntArray(effect, parameter, NULL, res_desc->Bytes / sizeof(INT)); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetIntArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetIntArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->SetFloat(effect, NULL, fvalue); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetFloat failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetFloat failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->GetFloat(effect, NULL, &fvalue); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetFloat failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetFloat failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->GetFloat(effect, parameter, NULL); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetFloat failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetFloat failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->SetFloatArray(effect, NULL, (FLOAT *)input_value, res_desc->Bytes / sizeof(FLOAT)); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetFloatArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetFloatArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->GetFloatArray(effect, NULL, (FLOAT *)input_value, res_desc->Bytes / sizeof(FLOAT)); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetFloatArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetFloatArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->GetFloatArray(effect, parameter, NULL, res_desc->Bytes / sizeof(FLOAT)); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetFloatArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetFloatArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->SetVector(effect, NULL, (D3DXVECTOR4 *)input_value); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetVector failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetVector failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->GetVector(effect, NULL, (D3DXVECTOR4 *)input_value); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetVector failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetVector failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->GetVector(effect, parameter, NULL); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetVector failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetVector failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->SetVectorArray(effect, NULL, (D3DXVECTOR4 *)input_value, res_desc->Elements ? res_desc->Elements : 1); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetVectorArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetVectorArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->GetVectorArray(effect, NULL, (D3DXVECTOR4 *)input_value, res_desc->Elements ? res_desc->Elements : 1); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetVectorArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetVectorArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->GetVectorArray(effect, parameter, NULL, res_desc->Elements ? res_desc->Elements : 1); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetVectorArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetVectorArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->SetMatrix(effect, NULL, (D3DXMATRIX *)input_value); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetMatrix failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetMatrix failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->GetMatrix(effect, NULL, (D3DXMATRIX *)input_value); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetMatrix failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetMatrix failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->SetMatrixArray(effect, NULL, (D3DXMATRIX *)input_value, res_desc->Elements ? res_desc->Elements : 1); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetMatrixArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetMatrixArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->GetMatrixArray(effect, NULL, (D3DXMATRIX *)input_value, res_desc->Elements ? res_desc->Elements : 1); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetMatrixArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetMatrixArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->GetMatrixArray(effect, parameter, NULL, res_desc->Elements ? res_desc->Elements : 1); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetMatrixArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetMatrixArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->SetMatrixPointerArray(effect, NULL, matrix_pointer_array, res_desc->Elements ? res_desc->Elements : 1); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetMatrixPointerArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetMatrixPointerArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->SetMatrixPointerArray(effect, NULL, matrix_pointer_array, 0); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetMatrixPointerArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetMatrixPointerArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->GetMatrixPointerArray(effect, NULL, NULL, 0); - ok(hr == D3D_OK, "%u - %s: GetMatrixPointerArray failed, got %#x, expected %#x\n", + ok(hr == D3D_OK, "%u - %s: GetMatrixPointerArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3D_OK);
hr = effect->lpVtbl->GetMatrixPointerArray(effect, NULL, NULL, res_desc->Elements ? res_desc->Elements : 1); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetMatrixPointerArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetMatrixPointerArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->GetMatrixPointerArray(effect, parameter, NULL, res_desc->Elements ? res_desc->Elements : 1); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetMatrixPointerArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetMatrixPointerArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->SetMatrixTranspose(effect, NULL, (D3DXMATRIX *)input_value); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetMatrixTranspose failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetMatrixTranspose failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->GetMatrixTranspose(effect, NULL, (D3DXMATRIX *)input_value); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetMatrixTranspose failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetMatrixTranspose failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->GetMatrixTranspose(effect, parameter, NULL); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetMatrixTranspose failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetMatrixTranspose failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->SetMatrixTransposeArray(effect, NULL, (D3DXMATRIX *)input_value, res_desc->Elements ? res_desc->Elements : 1); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetMatrixTransposeArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetMatrixTransposeArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->GetMatrixTransposeArray(effect, NULL, (D3DXMATRIX *)input_value, res_desc->Elements ? res_desc->Elements : 1); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetMatrixTransposeArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetMatrixTransposeArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->GetMatrixTransposeArray(effect, parameter, NULL, res_desc->Elements ? res_desc->Elements : 1); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetMatrixTransposeArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetMatrixTransposeArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->SetMatrixTransposePointerArray(effect, NULL, matrix_pointer_array, res_desc->Elements ? res_desc->Elements : 1); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetMatrixTransposePointerArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetMatrixTransposePointerArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->SetMatrixTransposePointerArray(effect, NULL, matrix_pointer_array, 0); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetMatrixTransposePointerArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetMatrixTransposePointerArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->GetMatrixTransposePointerArray(effect, NULL, NULL, 0); - ok(hr == D3D_OK, "%u - %s: GetMatrixTransposePointerArray failed, got %#x, expected %#x\n", + ok(hr == D3D_OK, "%u - %s: GetMatrixTransposePointerArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3D_OK);
hr = effect->lpVtbl->GetMatrixTransposePointerArray(effect, NULL, NULL, res_desc->Elements ? res_desc->Elements : 1); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetMatrixTransposePointerArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetMatrixTransposePointerArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->GetMatrixTransposePointerArray(effect, parameter, NULL, res_desc->Elements ? res_desc->Elements : 1); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetMatrixTransposePointerArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetMatrixTransposePointerArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->SetValue(effect, NULL, input_value, res_desc->Bytes); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetValue failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetValue failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->SetValue(effect, parameter, input_value, res_desc->Bytes - 1); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetValue failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetValue failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->GetValue(effect, NULL, input_value, res_desc->Bytes); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetValue failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetValue failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
hr = effect->lpVtbl->GetValue(effect, parameter, input_value, res_desc->Bytes - 1); - ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetValue failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetValue failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL);
test_effect_parameter_value_GetTestGroup(&res[k], effect, &blob[res_value_offset], parameter, i); @@ -2101,11 +2101,11 @@ static void test_effect_parameter_value(IDirect3DDevice9 *device) { bvalue = TRUE; set_number(expected_value, res_desc->Type, &bvalue, D3DXPT_BOOL); - ok(hr == D3D_OK, "%u - %s: SetBool failed, got %#x, expected %#x\n", i, res_full_name, hr, D3D_OK); + ok(hr == D3D_OK, "%u - %s: SetBool failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3D_OK); } else { - ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetBool failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetBool failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL); } test_effect_parameter_value_GetTestGroup(&res[k], effect, expected_value, parameter, i); @@ -2127,11 +2127,11 @@ static void test_effect_parameter_value(IDirect3DDevice9 *device) { set_number(expected_value + l, res_desc->Type, input_value + l, D3DXPT_BOOL); } - ok(hr == D3D_OK, "%u - %s: SetBoolArray failed, got %#x, expected %#x\n", i, res_full_name, hr, D3D_OK); + ok(hr == D3D_OK, "%u - %s: SetBoolArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3D_OK); } else { - ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetBoolArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetBoolArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL); } test_effect_parameter_value_GetTestGroup(&res[k], effect, expected_value, parameter, i); @@ -2144,7 +2144,7 @@ static void test_effect_parameter_value(IDirect3DDevice9 *device) if (!res_desc->Elements && res_desc->Rows == 1 && res_desc->Columns == 1) { set_number(expected_value, res_desc->Type, &ivalue, D3DXPT_INT); - ok(hr == D3D_OK, "%u - %s: SetInt failed, got %#x, expected %#x\n", i, res_full_name, hr, D3D_OK); + ok(hr == D3D_OK, "%u - %s: SetInt failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3D_OK); } else if(!res_desc->Elements && res_desc->Type == D3DXPT_FLOAT && ((res_desc->Class == D3DXPC_VECTOR && res_desc->Columns != 2) || @@ -2159,12 +2159,12 @@ static void test_effect_parameter_value(IDirect3DDevice9 *device) tmp = ((ivalue & 0xff000000) >> 24) * INT_FLOAT_MULTI_INVERSE; set_number(expected_value + 3, res_desc->Type, &tmp, D3DXPT_FLOAT);
- ok(hr == D3D_OK, "%u - %s: SetInt failed, got %#x, expected %#x\n", + ok(hr == D3D_OK, "%u - %s: SetInt failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3D_OK); } else { - ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetInt failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetInt failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL); } test_effect_parameter_value_GetTestGroup(&res[k], effect, expected_value, parameter, i); @@ -2186,11 +2186,11 @@ static void test_effect_parameter_value(IDirect3DDevice9 *device) { set_number(expected_value + l, res_desc->Type, input_value + l, D3DXPT_INT); } - ok(hr == D3D_OK, "%u - %s: SetIntArray failed, got %#x, expected %#x\n", i, res_full_name, hr, D3D_OK); + ok(hr == D3D_OK, "%u - %s: SetIntArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3D_OK); } else { - ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetIntArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetIntArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL); } test_effect_parameter_value_GetTestGroup(&res[k], effect, expected_value, parameter, i); @@ -2203,11 +2203,11 @@ static void test_effect_parameter_value(IDirect3DDevice9 *device) if (!res_desc->Elements && res_desc->Rows == 1 && res_desc->Columns == 1) { set_number(expected_value, res_desc->Type, &fvalue, D3DXPT_FLOAT); - ok(hr == D3D_OK, "%u - %s: SetFloat failed, got %#x, expected %#x\n", i, res_full_name, hr, D3D_OK); + ok(hr == D3D_OK, "%u - %s: SetFloat failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3D_OK); } else { - ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetFloat failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetFloat failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL); } test_effect_parameter_value_GetTestGroup(&res[k], effect, expected_value, parameter, i); @@ -2230,11 +2230,11 @@ static void test_effect_parameter_value(IDirect3DDevice9 *device) { set_number(expected_value + l, res_desc->Type, input_value + l, D3DXPT_FLOAT); } - ok(hr == D3D_OK, "%u - %s: SetFloatArray failed, got %#x, expected %#x\n", i, res_full_name, hr, D3D_OK); + ok(hr == D3D_OK, "%u - %s: SetFloatArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3D_OK); } else { - ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetFloatArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetFloatArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL); } test_effect_parameter_value_GetTestGroup(&res[k], effect, expected_value, parameter, i); @@ -2268,11 +2268,11 @@ static void test_effect_parameter_value(IDirect3DDevice9 *device) set_number(expected_value + l, res_desc->Type, input_value + l, D3DXPT_FLOAT); } } - ok(hr == D3D_OK, "%u - %s: SetVector failed, got %#x, expected %#x\n", i, res_full_name, hr, D3D_OK); + ok(hr == D3D_OK, "%u - %s: SetVector failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3D_OK); } else { - ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetVector failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetVector failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL); } test_effect_parameter_value_GetTestGroup(&res[k], effect, expected_value, parameter, i); @@ -2298,11 +2298,11 @@ static void test_effect_parameter_value(IDirect3DDevice9 *device) set_number(expected_value + m * res_desc->Columns + l, res_desc->Type, input_value + m * 4 + l, D3DXPT_FLOAT); } } - ok(hr == D3D_OK, "%u - %s: SetVectorArray failed, got %#x, expected %#x\n", i, res_full_name, hr, D3D_OK); + ok(hr == D3D_OK, "%u - %s: SetVectorArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3D_OK); } else { - ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetVectorArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetVectorArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL); } test_effect_parameter_value_GetTestGroup(&res[k], effect, expected_value, parameter, i); @@ -2330,11 +2330,11 @@ static void test_effect_parameter_value(IDirect3DDevice9 *device) }
} - ok(hr == D3D_OK, "%u - %s: SetMatrix failed, got %#x, expected %#x\n", i, res_full_name, hr, D3D_OK); + ok(hr == D3D_OK, "%u - %s: SetMatrix failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3D_OK); } else { - ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetMatrix failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetMatrix failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL); } test_effect_parameter_value_GetTestGroup(&res[k], effect, expected_value, parameter, i); @@ -2366,11 +2366,11 @@ static void test_effect_parameter_value(IDirect3DDevice9 *device)
} } - ok(hr == D3D_OK, "%u - %s: SetMatrixArray failed, got %#x, expected %#x\n", i, res_full_name, hr, D3D_OK); + ok(hr == D3D_OK, "%u - %s: SetMatrixArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3D_OK); } else { - ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetMatrixArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetMatrixArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL); } test_effect_parameter_value_GetTestGroup(&res[k], effect, expected_value, parameter, i); @@ -2407,12 +2407,12 @@ static void test_effect_parameter_value(IDirect3DDevice9 *device)
} } - ok(hr == D3D_OK, "%u - %s: SetMatrixPointerArray failed, got %#x, expected %#x\n", + ok(hr == D3D_OK, "%u - %s: SetMatrixPointerArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3D_OK); } else { - ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetMatrixPointerArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetMatrixPointerArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL); } test_effect_parameter_value_GetTestGroup(&res[k], effect, expected_value, parameter, i); @@ -2440,11 +2440,11 @@ static void test_effect_parameter_value(IDirect3DDevice9 *device) }
} - ok(hr == D3D_OK, "%u - %s: SetMatrixTranspose failed, got %#x, expected %#x\n", i, res_full_name, hr, D3D_OK); + ok(hr == D3D_OK, "%u - %s: SetMatrixTranspose failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3D_OK); } else { - ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetMatrixTranspose failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetMatrixTranspose failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL); } test_effect_parameter_value_GetTestGroup(&res[k], effect, expected_value, parameter, i); @@ -2476,11 +2476,11 @@ static void test_effect_parameter_value(IDirect3DDevice9 *device)
} } - ok(hr == D3D_OK, "%u - %s: SetMatrixTransposeArray failed, got %#x, expected %#x\n", i, res_full_name, hr, D3D_OK); + ok(hr == D3D_OK, "%u - %s: SetMatrixTransposeArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3D_OK); } else { - ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetMatrixTransposeArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetMatrixTransposeArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL); } test_effect_parameter_value_GetTestGroup(&res[k], effect, expected_value, parameter, i); @@ -2517,12 +2517,12 @@ static void test_effect_parameter_value(IDirect3DDevice9 *device)
} } - ok(hr == D3D_OK, "%u - %s: SetMatrixTransposePointerArray failed, got %#x, expected %#x\n", + ok(hr == D3D_OK, "%u - %s: SetMatrixTransposePointerArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3D_OK); } else { - ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetMatrixTransposePointerArray failed, got %#x, expected %#x\n", + ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetMatrixTransposePointerArray failed, got %#lx, expected %#lx\n", i, res_full_name, hr, D3DERR_INVALIDCALL); } test_effect_parameter_value_GetTestGroup(&res[k], effect, expected_value, parameter, i); @@ -2531,7 +2531,7 @@ static void test_effect_parameter_value(IDirect3DDevice9 *device) }
count = effect->lpVtbl->Release(effect); - ok(!count, "Release failed %u\n", count); + ok(!count, "Release failed %lu\n", count); } }
@@ -2552,36 +2552,36 @@ static void test_effect_setvalue_object(IDirect3DDevice9 *device)
hr = D3DXCreateEffect(device, test_effect_parameter_value_blob_object, sizeof(test_effect_parameter_value_blob_object), NULL, NULL, 0, NULL, &effect, NULL); - ok(hr == D3D_OK, "Got result %#x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %#lx, expected 0 (D3D_OK).\n", hr);
parameter = effect->lpVtbl->GetParameterByName(effect, NULL, "tex"); ok(parameter != NULL, "GetParameterByName failed, got %p\n", parameter);
texture = NULL; hr = D3DXCreateTexture(device, D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, 0, D3DPOOL_DEFAULT, &texture); - ok(hr == D3D_OK, "Got result %#x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %#lx, expected 0 (D3D_OK).\n", hr); hr = effect->lpVtbl->SetValue(effect, parameter, &texture, sizeof(texture)); - ok(hr == D3D_OK, "Got result %#x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %#lx, expected 0 (D3D_OK).\n", hr); texture_set = NULL; hr = effect->lpVtbl->GetValue(effect, parameter, &texture_set, sizeof(texture_set)); - ok(hr == D3D_OK, "Got result %#x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %#lx, expected 0 (D3D_OK).\n", hr); ok(texture == texture_set, "Texture does not match.\n");
count = IDirect3DTexture9_Release(texture_set); - ok(count == 2, "Got reference count %u, expected 2.\n", count); + ok(count == 2, "Got reference count %lu, expected 2.\n", count); texture_set = NULL; hr = effect->lpVtbl->SetValue(effect, parameter, &texture_set, sizeof(texture_set)); - ok(hr == D3D_OK, "Got result %#x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %#lx, expected 0 (D3D_OK).\n", hr); count = IDirect3DTexture9_Release(texture); - ok(!count, "Got reference count %u, expected 0.\n", count); + ok(!count, "Got reference count %lu, expected 0.\n", count);
hr = effect->lpVtbl->SetString(effect, "s", expected_string); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); string = NULL; hr = effect->lpVtbl->GetString(effect, "s", &string); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->GetString(effect, "s", &string2); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
ok(string != expected_string, "String pointers are the same.\n"); ok(string == string2, "String pointers differ.\n"); @@ -2589,24 +2589,24 @@ static void test_effect_setvalue_object(IDirect3DDevice9 *device)
string = expected_string2; hr = effect->lpVtbl->SetValue(effect, "s", &string, sizeof(string) - 1); - ok(hr == D3DERR_INVALIDCALL, "Got result %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got result %#lx.\n", hr); hr = effect->lpVtbl->SetValue(effect, "s", &string, sizeof(string)); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->SetValue(effect, "s", &string, sizeof(string) * 2); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); string = NULL; hr = effect->lpVtbl->GetValue(effect, "s", &string, sizeof(string)); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
ok(string != expected_string2, "String pointers are the same.\n"); ok(!strcmp(string, expected_string2), "Unexpected string '%s'.\n", string);
hr = effect->lpVtbl->SetValue(effect, "s_2", expected_string_array, sizeof(expected_string_array)); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->GetValue(effect, "s_2", string_array, sizeof(string_array)); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); for (i = 0; i < ARRAY_SIZE(expected_string_array); ++i) { ok(!strcmp(string_array[i], expected_string_array[i]), "Unexpected string '%s', i %u.\n", @@ -2666,7 +2666,7 @@ static void test_effect_variable_names(IDirect3DDevice9 *device)
hr = D3DXCreateEffect(device, test_effect_variable_names_blob, sizeof(test_effect_variable_names_blob), NULL, NULL, 0, NULL, &effect, NULL); - ok(hr == D3D_OK, "D3DXCreateEffect failed, got %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateEffect failed, got %#lx, expected %#lx\n", hr, D3D_OK);
/* * check invalid calls @@ -2895,7 +2895,7 @@ static void test_effect_variable_names(IDirect3DDevice9 *device) ok(parameter != NULL, "GetParameterByName failed, got %p\n", parameter);
count = effect->lpVtbl->Release(effect); - ok(!count, "Release failed %u\n", count); + ok(!count, "Release failed %lu\n", count); }
static void test_effect_compilation_errors(IDirect3DDevice9 *device) @@ -2907,13 +2907,13 @@ static void test_effect_compilation_errors(IDirect3DDevice9 *device) /* Test binary effect */ compilation_errors = (ID3DXBuffer*)0xdeadbeef; hr = D3DXCreateEffect(NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, &compilation_errors); - ok(hr == D3DERR_INVALIDCALL, "D3DXCreateEffect failed, got %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXCreateEffect failed, got %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL); ok(!compilation_errors, "Returned %p\n", compilation_errors);
compilation_errors = (ID3DXBuffer*)0xdeadbeef; hr = D3DXCreateEffect(device, test_effect_variable_names_blob, sizeof(test_effect_variable_names_blob), NULL, NULL, 0, NULL, &effect, &compilation_errors); - ok(hr == D3D_OK, "D3DXCreateEffect failed, got %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateEffect failed, got %#lx, expected %#lx\n", hr, D3D_OK); ok(!compilation_errors, "Returned %p\n", compilation_errors); effect->lpVtbl->Release(effect); } @@ -3037,7 +3037,7 @@ static void test_effect_clear_vconsts(IDirect3DDevice9 *device) for (i = 0; i < 256; ++i) { hr = IDirect3DDevice9_SetVertexShaderConstantF(device, i, &fvect_filler.x, 1); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); } }
@@ -3079,87 +3079,87 @@ static void test_effect_states(IDirect3DDevice9 *device)
hr = D3DXCreateEffect(device, test_effect_states_effect_blob, sizeof(test_effect_states_effect_blob), NULL, NULL, 0, NULL, &effect, NULL); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr);
hr = effect->lpVtbl->End(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->BeginPass(effect, 0); - ok(hr == D3DERR_INVALIDCALL, "Got result %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got result %#lx.\n", hr);
/* State affected in passes saved/restored even if no pass was performed. States not present in passes are not saved & restored */ hr = IDirect3DDevice9_SetRenderState(device, D3DRS_BLENDOP, 1); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ALPHAFUNC, 1); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr);
hr = effect->lpVtbl->Begin(effect, &npasses, 0); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr); ok(npasses == 1, "Expected 1 pass, got %u\n", npasses);
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_BLENDOP, 3); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ALPHAFUNC, 2); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr);
hr = effect->lpVtbl->End(effect); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr);
hr = IDirect3DDevice9_GetRenderState(device, D3DRS_BLENDOP, &value); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); - ok(value == 1, "Got result %u, expected %u.\n", value, 1); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr); + ok(value == 1, "Got result %lu, expected %u.\n", value, 1); hr = IDirect3DDevice9_GetRenderState(device, D3DRS_ALPHAFUNC, &value); - ok(value == 2, "Got result %u, expected %u.\n", value, 2); + ok(value == 2, "Got result %lu, expected %u.\n", value, 2);
/* Test states application in BeginPass. No states are restored on EndPass. */ hr = IDirect3DDevice9_SetSamplerState(device, 1, D3DSAMP_MIPFILTER, 0); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZENABLE, 0); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr);
hr = IDirect3DDevice9_GetLightEnable(device, 2, &bval); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr); if (hr == D3D_OK) ok(!bval, "Got result %u, expected 0.\n", bval);
hr = IDirect3DDevice9_SetTransform(device, D3DTS_WORLDMATRIX(1), &test_mat); hr = effect->lpVtbl->Begin(effect, NULL, 0); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr);
hr = IDirect3DDevice9_GetTransform(device, D3DTS_WORLDMATRIX(1), &mat); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr); ok(!memcmp(mat.m, test_mat.m, sizeof(mat)), "World matrix does not match.\n");
test_effect_clear_vconsts(device);
hr = effect->lpVtbl->BeginPass(effect, 0); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr);
hr = IDirect3DDevice9_GetTransform(device, D3DTS_WORLDMATRIX(1), &mat); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr); ok(!memcmp(mat.m, test_mat_world1.m, sizeof(mat)), "World matrix does not match.\n");
hr = IDirect3DDevice9_GetTransform(device, D3DTS_VIEW, &mat); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr); ok(!memcmp(mat.m, test_mat_camera.m, sizeof(mat)), "View matrix does not match.\n");
hr = IDirect3DDevice9_GetRenderState(device, D3DRS_BLENDOP, &value); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); - ok(value == 2, "Got result %u, expected %u\n", value, 2); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr); + ok(value == 2, "Got result %lu, expected %u\n", value, 2);
hr = IDirect3DDevice9_GetVertexShader(device, &vshader); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr); ok(vshader != NULL, "Got NULL vshader.\n"); if (vshader) { hr = IDirect3DVertexShader9_GetFunction(vshader, NULL, &byte_code_size); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr); byte_code = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, byte_code_size); hr = IDirect3DVertexShader9_GetFunction(vshader, byte_code, &byte_code_size); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr); ok(byte_code_size > 1, "Got unexpected byte code size %u.\n", byte_code_size); ok(!memcmp(byte_code, &test_effect_states_effect_blob[TEST_EFFECT_STATES_VSHADER_POS], byte_code_size), "Incorrect shader selected.\n"); @@ -3168,11 +3168,11 @@ static void test_effect_states(IDirect3DDevice9 *device) }
hr = IDirect3DDevice9_GetLightEnable(device, 2, &bval); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr); if (hr == D3D_OK) ok(bval, "Got result %u, expected TRUE.\n", bval); hr = IDirect3DDevice9_GetLight(device, 2, &light); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr); if (hr == D3D_OK) ok(light.Position.x == 4.0f && light.Position.y == 5.0f && light.Position.z == 6.0f, "Got unexpected light position (%f, %f, %f).\n", light.Position.x, light.Position.y, light.Position.z); @@ -3180,86 +3180,86 @@ static void test_effect_states(IDirect3DDevice9 *device) /* Testing first value only for constants 1, 2 as the rest of the vector seem to * contain garbage data on native. */ hr = IDirect3DDevice9_GetVertexShaderConstantF(device, 1, &fvect.x, 1); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr); ok(fvect.x == 3.0f, "Got unexpected vertex shader constant (%.8e, %.8e, %.8e, %.8e).\n", fvect.x, fvect.y, fvect.z, fvect.w); hr = IDirect3DDevice9_GetVertexShaderConstantF(device, 2, &fvect.x, 1); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr); ok(fvect.x == 1.0f, "Got unexpected vertex shader constant (%.8e, %.8e, %.8e, %.8e).\n", fvect.x, fvect.y, fvect.z, fvect.w);
hr = IDirect3DDevice9_GetVertexShaderConstantF(device, 3, &fvect.x, 1); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr); ok(fvect.x == 2.0f && fvect.y == 2.0f && fvect.z == 2.0f && fvect.w == 2.0f, "Got unexpected vertex shader constant (%.8e, %.8e, %.8e, %.8e).\n", fvect.x, fvect.y, fvect.z, fvect.w);
hr = IDirect3DDevice9_GetVertexShaderConstantF(device, 4, &fvect.x, 1); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr); ok(fvect.x == 4.0f && fvect.y == 4.0f && fvect.z == 4.0f && fvect.w == 4.0f, "Got unexpected vertex shader constant (%.8e, %.8e, %.8e, %.8e).\n", fvect.x, fvect.y, fvect.z, fvect.w); hr = IDirect3DDevice9_GetVertexShaderConstantF(device, 5, &fvect.x, 1); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr); ok(fvect.x == 0.0f && fvect.y == 0.0f && fvect.z == 0.0f && fvect.w == 0.0f, "Got unexpected vertex shader constant (%.8e, %.8e, %.8e, %.8e).\n", fvect.x, fvect.y, fvect.z, fvect.w); hr = IDirect3DDevice9_GetVertexShaderConstantF(device, 6, &fvect.x, 1); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr); ok(fvect.x == 0.0f && fvect.y == 0.0f && fvect.z == 0.0f && fvect.w == 0.0f, "Got unexpected vertex shader constant (%.8e, %.8e, %.8e, %.8e).\n", fvect.x, fvect.y, fvect.z, fvect.w); hr = IDirect3DDevice9_GetVertexShaderConstantF(device, 7, &fvect.x, 1); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr); ok(!memcmp(&fvect, &fvect_filler, sizeof(fvect_filler)), "Got unexpected vertex shader constant (%.8e, %.8e, %.8e, %.8e).\n", fvect.x, fvect.y, fvect.z, fvect.w);
hr = effect->lpVtbl->EndPass(effect); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr); hr = IDirect3DDevice9_GetRenderState(device, D3DRS_BLENDOP, &value); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); - ok(value == 2, "Got result %u, expected %u\n", value, 2); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr); + ok(value == 2, "Got result %lu, expected %u\n", value, 2);
hr = IDirect3DDevice9_GetRenderState(device, D3DRS_ZENABLE, &value); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); - ok(value, "Got result %u, expected TRUE.\n", value); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr); + ok(value, "Got result %lu, expected TRUE.\n", value);
hr = IDirect3DDevice9_GetSamplerState(device, 1, D3DSAMP_MIPFILTER, &value); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); - ok(value == D3DTEXF_LINEAR, "Unexpected sampler 1 mipfilter %u.\n", value); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr); + ok(value == D3DTEXF_LINEAR, "Unexpected sampler 1 mipfilter %lu.\n", value);
hr = IDirect3DDevice9_GetTextureStageState(device, 3, D3DTSS_ALPHAOP, &value); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); - ok(value == 4, "Unexpected texture stage 3 AlphaOp %u.\n", value); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr); + ok(value == 4, "Unexpected texture stage 3 AlphaOp %lu.\n", value);
hr = effect->lpVtbl->End(effect); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr);
hr = IDirect3DDevice9_GetTransform(device, D3DTS_WORLDMATRIX(1), &mat); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr); ok(!memcmp(mat.m, test_mat.m, sizeof(mat)), "World matrix not restored.\n");
hr = IDirect3DDevice9_GetLightEnable(device, 2, &bval); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr); if (hr == D3D_OK) ok(!bval, "Got result %u, expected 0.\n", bval);
/* State is not restored if effect is released without End call */ hr = IDirect3DDevice9_SetRenderState(device, D3DRS_BLENDOP, 1); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr);
hr = effect->lpVtbl->Begin(effect, &npasses, 0); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr);
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_BLENDOP, 3); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr);
effect->lpVtbl->Release(effect);
hr = IDirect3DDevice9_GetRenderState(device, D3DRS_BLENDOP, &value); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); - ok(value == 3, "Got result %u, expected %u.\n", value, 1); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr); + ok(value == 3, "Got result %lu, expected %u.\n", value, 1); }
/* @@ -4344,7 +4344,7 @@ static void test_effect_preshader_compare_shader_(unsigned int line, IDirect3DDe HRESULT hr;
hr = IDirect3DDevice9_GetVertexShader(device, &vshader); - ok_(__FILE__, line)(hr == D3D_OK, "IDirect3DDevice9_GetVertexShader result %#x.\n", hr); + ok_(__FILE__, line)(hr == D3D_OK, "IDirect3DDevice9_GetVertexShader result %#lx.\n", hr);
todo_wine_if(todo) ok_(__FILE__, line)(!!vshader, "Got NULL vshader.\n"); @@ -4352,12 +4352,12 @@ static void test_effect_preshader_compare_shader_(unsigned int line, IDirect3DDe return;
hr = IDirect3DVertexShader9_GetFunction(vshader, NULL, &byte_code_size); - ok_(__FILE__, line)(hr == D3D_OK, "IDirect3DVertexShader9_GetFunction %#x.\n", hr); + ok_(__FILE__, line)(hr == D3D_OK, "IDirect3DVertexShader9_GetFunction %#lx.\n", hr); ok_(__FILE__, line)(byte_code_size > 1, "Got unexpected byte code size %u.\n", byte_code_size);
byte_code = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, byte_code_size); hr = IDirect3DVertexShader9_GetFunction(vshader, byte_code, &byte_code_size); - ok_(__FILE__, line)(hr == D3D_OK, "Got result %#x.\n", hr); + ok_(__FILE__, line)(hr == D3D_OK, "Got result %#lx.\n", hr);
test_effect_preshader_compare_shader_bytecode_(line, byte_code, byte_code_size, expected_shader_index, todo); @@ -4423,7 +4423,7 @@ static void test_effect_preshader_op_results_(unsigned int line, IDirect3DDevice for (i = 0; i < ARRAY_SIZE(test_effect_preshader_op_expected); ++i) { hr = IDirect3DDevice9_GetLight(device, i % 8, &light); - ok_(__FILE__, line)(hr == D3D_OK, "Got result %#x.\n", hr); + ok_(__FILE__, line)(hr == D3D_OK, "Got result %#lx.\n", hr);
v = i < 8 ? &light.Diffuse.r : (i < 16 ? &light.Ambient.r : &light.Specular.r); if (!expected_state || expected_state[i] == EXPECTED_STATE_UPDATED) @@ -4499,7 +4499,7 @@ static void test_effect_preshader_compare_vconsts_(unsigned int line, IDirect3DD
hr = IDirect3DDevice9_GetVertexShaderConstantF(device, 0, &fdata[0].x, ARRAY_SIZE(test_effect_preshader_fvect_v)); - ok_(__FILE__, line)(hr == D3D_OK, "Got result %#x.\n", hr); + ok_(__FILE__, line)(hr == D3D_OK, "Got result %#lx.\n", hr);
if (!const_updated_mask) { @@ -4531,7 +4531,7 @@ static void test_effect_preshader_compare_vconsts_(unsigned int line, IDirect3DD for (i = ARRAY_SIZE(test_effect_preshader_fvect_v); i < 256; ++i) { hr = IDirect3DDevice9_GetVertexShaderConstantF(device, i, &fdata[0].x, 1); - ok_(__FILE__, line)(hr == D3D_OK, "Got result %#x.\n", hr); + ok_(__FILE__, line)(hr == D3D_OK, "Got result %#lx.\n", hr); ok_(__FILE__, line)(!memcmp(fdata, &fvect_filler, sizeof(fvect_filler)), "Vertex shader float constants do not match.\n"); } @@ -4552,7 +4552,7 @@ static void test_effect_preshader_clear_pbool_consts(IDirect3DDevice9 *device) { bval = i < ARRAY_SIZE(test_effect_preshader_bconsts) ? !test_effect_preshader_bconsts[i] : FALSE; hr = IDirect3DDevice9_SetPixelShaderConstantB(device, i, &bval, 1); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); } }
@@ -4566,7 +4566,7 @@ static void test_effect_preshader_compare_pbool_consts_(unsigned int line, IDire HRESULT hr;
hr = IDirect3DDevice9_GetPixelShaderConstantB(device, 0, bdata, ARRAY_SIZE(bdata)); - ok_(__FILE__, line)(hr == D3D_OK, "Got result %#x.\n", hr); + ok_(__FILE__, line)(hr == D3D_OK, "Got result %#lx.\n", hr);
if (!const_updated_mask) { @@ -4602,7 +4602,7 @@ static void test_effect_preshader_compare_pbool_consts_(unsigned int line, IDire
for (; i < 16; ++i) { - ok_(__FILE__, line)(!bdata[i], "Got result %#x, boolean register value %u.\n", hr, bdata[i]); + ok_(__FILE__, line)(!bdata[i], "Got result %#lx, boolean register value %u.\n", hr, bdata[i]); } }
@@ -4644,7 +4644,7 @@ static void test_effect_preshader(IDirect3DDevice9 *device) D3DCAPS9 caps;
hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); - ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#lx.\n", hr); if (caps.VertexShaderVersion < D3DVS_VERSION(3, 0) || caps.PixelShaderVersion < D3DPS_VERSION(3, 0)) { @@ -4654,14 +4654,14 @@ static void test_effect_preshader(IDirect3DDevice9 *device)
hr = D3DXCreateEffect(device, test_effect_preshader_effect_blob, sizeof(test_effect_preshader_effect_blob), NULL, NULL, 0, NULL, &effect, NULL); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
test_effect_clear_vconsts(device);
for (i = 0; i < 224; ++i) { hr = IDirect3DDevice9_SetPixelShaderConstantF(device, i, &fvect_filler.x, 1); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); }
test_effect_preshader_clear_pbool_consts(device); @@ -4669,50 +4669,50 @@ static void test_effect_preshader(IDirect3DDevice9 *device) for (i = 0; i < 16; ++i) { hr = IDirect3DDevice9_SetPixelShaderConstantI(device, i, ivect_empty, 1); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); }
hr = effect->lpVtbl->Begin(effect, &npasses, 0); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
par = effect->lpVtbl->GetParameterByName(effect, NULL, "g_Pos2"); ok(par != NULL, "GetParameterByName failed.\n");
hr = effect->lpVtbl->SetVector(effect, par, &fvect1); - ok(hr == D3D_OK, "SetVector failed, hr %#x.\n", hr); + ok(hr == D3D_OK, "SetVector failed, hr %#lx.\n", hr);
hr = effect->lpVtbl->BeginPass(effect, 0); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->BeginPass(effect, 0); - ok(hr == D3DERR_INVALIDCALL, "Got result %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->BeginPass(effect, 1); - ok(hr == D3DERR_INVALIDCALL, "Got result %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got result %#lx.\n", hr);
test_effect_preshader_compare_vconsts(device, NULL, NULL);
hr = IDirect3DDevice9_GetPixelShaderConstantF(device, 0, &fdata[0].x, ARRAY_SIZE(test_effect_preshader_fvect_p)); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(!memcmp(fdata, test_effect_preshader_fvect_p, sizeof(test_effect_preshader_fvect_p)), "Pixel shader float constants do not match.\n"); for (i = ARRAY_SIZE(test_effect_preshader_fvect_p); i < 224; ++i) { hr = IDirect3DDevice9_GetPixelShaderConstantF(device, i, &fdata[0].x, 1); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(!memcmp(fdata, &fvect_filler, sizeof(fvect_filler)), "Pixel shader float constants do not match.\n"); } hr = IDirect3DDevice9_GetPixelShaderConstantI(device, 0, idata[0], ARRAY_SIZE(test_effect_preshader_iconsts)); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(!memcmp(idata, test_effect_preshader_iconsts, sizeof(test_effect_preshader_iconsts)), "Pixel shader integer constants do not match.\n"); for (i = ARRAY_SIZE(test_effect_preshader_iconsts); i < 16; ++i) { hr = IDirect3DDevice9_GetPixelShaderConstantI(device, i, idata[0], 1); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(!memcmp(idata[0], ivect_empty, sizeof(ivect_empty)), "Pixel shader integer constants do not match.\n"); } @@ -4722,55 +4722,55 @@ static void test_effect_preshader(IDirect3DDevice9 *device) test_effect_preshader_op_results(device, NULL, NULL);
hr = IDirect3DDevice9_GetSamplerState(device, 0, D3DSAMP_MINFILTER, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); - ok(value == 3, "Unexpected sampler 0 minfilter %u.\n", value); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); + ok(value == 3, "Unexpected sampler 0 minfilter %lu.\n", value); hr = IDirect3DDevice9_GetSamplerState(device, 0, D3DSAMP_MAGFILTER, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); - todo_wine ok(value == 3, "Unexpected sampler 0 magfilter %u.\n", value); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); + todo_wine ok(value == 3, "Unexpected sampler 0 magfilter %lu.\n", value);
hr = IDirect3DDevice9_GetSamplerState(device, 1, D3DSAMP_MINFILTER, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); - ok(value == 1, "Unexpected sampler 1 minfilter %u.\n", value); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); + ok(value == 1, "Unexpected sampler 1 minfilter %lu.\n", value); hr = IDirect3DDevice9_GetSamplerState(device, 1, D3DSAMP_MAGFILTER, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); todo_wine - ok(value == 1, "Unexpected sampler 1 magfilter %u.\n", value); + ok(value == 1, "Unexpected sampler 1 magfilter %lu.\n", value);
hr = IDirect3DDevice9_GetSamplerState(device, D3DVERTEXTEXTURESAMPLER0, D3DSAMP_MINFILTER, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); - ok(value == 1, "Unexpected vertex sampler 0 minfilter %u.\n", value); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); + ok(value == 1, "Unexpected vertex sampler 0 minfilter %lu.\n", value); hr = IDirect3DDevice9_GetSamplerState(device, D3DVERTEXTEXTURESAMPLER0, D3DSAMP_MAGFILTER, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); todo_wine - ok(value == 1, "Unexpected vertex sampler 0 magfilter %u.\n", value); + ok(value == 1, "Unexpected vertex sampler 0 magfilter %lu.\n", value);
hr = IDirect3DDevice9_GetSamplerState(device, D3DVERTEXTEXTURESAMPLER1, D3DSAMP_MINFILTER, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); todo_wine - ok(value == 0, "Unexpected vertex sampler 1 minfilter %u.\n", value); + ok(value == 0, "Unexpected vertex sampler 1 minfilter %lu.\n", value); hr = IDirect3DDevice9_GetSamplerState(device, D3DVERTEXTEXTURESAMPLER1, D3DSAMP_MAGFILTER, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); todo_wine - ok(value == 0, "Unexpected vertex sampler 1 magfilter %u.\n", value); + ok(value == 0, "Unexpected vertex sampler 1 magfilter %lu.\n", value);
hr = IDirect3DDevice9_GetSamplerState(device, D3DVERTEXTEXTURESAMPLER2, D3DSAMP_MINFILTER, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); - ok(value == 3, "Unexpected vertex sampler 2 minfilter %u.\n", value); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); + ok(value == 3, "Unexpected vertex sampler 2 minfilter %lu.\n", value); hr = IDirect3DDevice9_GetSamplerState(device, D3DVERTEXTEXTURESAMPLER2, D3DSAMP_MAGFILTER, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); - todo_wine ok(value == 3, "Unexpected vertex sampler 2 magfilter %u.\n", value); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); + todo_wine ok(value == 3, "Unexpected vertex sampler 2 magfilter %lu.\n", value);
hr = IDirect3DDevice9_GetRenderState(device, D3DRS_FOGDENSITY, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(value == 0, "Unexpected fog density %g.\n", *(float *)&value); hr = IDirect3DDevice9_GetRenderState(device, D3DRS_FOGSTART, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(*(float *)&value == 4.0f, "Unexpected fog start %g.\n", *(float *)&value); hr = IDirect3DDevice9_GetRenderState(device, D3DRS_POINTSCALE_A, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(*(float *)&value == 4.0f, "Unexpected point scale A %g.\n", *(float *)&value); hr = IDirect3DDevice9_GetRenderState(device, D3DRS_POINTSCALE_B, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(*(float *)&value == 12.0f, "Unexpected point scale B %g.\n", *(float *)&value);
hr = effect->lpVtbl->EndPass(effect); @@ -4778,84 +4778,84 @@ static void test_effect_preshader(IDirect3DDevice9 *device) par = effect->lpVtbl->GetParameterByName(effect, NULL, "g_iVect"); ok(par != NULL, "GetParameterByName failed.\n"); hr = effect->lpVtbl->SetVector(effect, par, &fvect2); - ok(hr == D3D_OK, "SetVector failed, hr %#x.\n", hr); + ok(hr == D3D_OK, "SetVector failed, hr %#lx.\n", hr); hr = effect->lpVtbl->BeginPass(effect, 1); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
test_effect_preshader_compare_shader(device, 1, FALSE);
hr = IDirect3DDevice9_SetVertexShader(device, NULL); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->SetVector(effect, par, &fvect1); - ok(hr == D3D_OK, "SetVector failed, hr %#x.\n", hr); + ok(hr == D3D_OK, "SetVector failed, hr %#lx.\n", hr); hr = effect->lpVtbl->CommitChanges(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = IDirect3DDevice9_GetVertexShader(device, &vshader); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(!vshader, "Incorrect shader selected.\n");
hr = effect->lpVtbl->EndPass(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->End(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
effect->lpVtbl->Release(effect);
hr = D3DXCreateEffect(device, test_effect_preshader_effect_blob, sizeof(test_effect_preshader_effect_blob), NULL, NULL, 0, NULL, &effect, NULL); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->Begin(effect, &npasses, D3DXFX_DONOTSAVESTATE); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->BeginPass(effect, 0); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = IDirect3DDevice9_GetSamplerState(device, 0, D3DSAMP_MINFILTER, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); - ok(value == 3, "Unexpected sampler 0 minfilter %u.\n", value); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); + ok(value == 3, "Unexpected sampler 0 minfilter %lu.\n", value); hr = IDirect3DDevice9_GetSamplerState(device, 0, D3DSAMP_MAGFILTER, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); - todo_wine ok(value == 3, "Unexpected sampler 0 magfilter %u.\n", value); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); + todo_wine ok(value == 3, "Unexpected sampler 0 magfilter %lu.\n", value);
hr = IDirect3DDevice9_GetSamplerState(device, 1, D3DSAMP_MINFILTER, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); - ok(value == 1, "Unexpected sampler 1 minfilter %u.\n", value); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); + ok(value == 1, "Unexpected sampler 1 minfilter %lu.\n", value); hr = IDirect3DDevice9_GetSamplerState(device, 1, D3DSAMP_MAGFILTER, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); todo_wine - ok(value == 1, "Unexpected sampler 1 magfilter %u.\n", value); + ok(value == 1, "Unexpected sampler 1 magfilter %lu.\n", value);
hr = IDirect3DDevice9_GetSamplerState(device, D3DVERTEXTEXTURESAMPLER0, D3DSAMP_MINFILTER, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); - ok(value == 1, "Unexpected vertex sampler 0 minfilter %u.\n", value); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); + ok(value == 1, "Unexpected vertex sampler 0 minfilter %lu.\n", value); hr = IDirect3DDevice9_GetSamplerState(device, D3DVERTEXTEXTURESAMPLER0, D3DSAMP_MAGFILTER, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); todo_wine - ok(value == 1, "Unexpected vertex sampler 0 magfilter %u.\n", value); + ok(value == 1, "Unexpected vertex sampler 0 magfilter %lu.\n", value);
hr = IDirect3DDevice9_GetSamplerState(device, D3DVERTEXTEXTURESAMPLER1, D3DSAMP_MINFILTER, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); - ok(value == 2, "Unexpected vertex sampler 1 minfilter %u.\n", value); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); + ok(value == 2, "Unexpected vertex sampler 1 minfilter %lu.\n", value); hr = IDirect3DDevice9_GetSamplerState(device, D3DVERTEXTEXTURESAMPLER1, D3DSAMP_MAGFILTER, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); todo_wine - ok(value == 2, "Unexpected vertex sampler 1 magfilter %u.\n", value); + ok(value == 2, "Unexpected vertex sampler 1 magfilter %lu.\n", value);
hr = IDirect3DDevice9_GetSamplerState(device, D3DVERTEXTEXTURESAMPLER2, D3DSAMP_MINFILTER, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); - ok(value == 3, "Unexpected vertex sampler 2 minfilter %u.\n", value); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); + ok(value == 3, "Unexpected vertex sampler 2 minfilter %lu.\n", value); hr = IDirect3DDevice9_GetSamplerState(device, D3DVERTEXTEXTURESAMPLER2, D3DSAMP_MAGFILTER, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); todo_wine - ok(value == 3, "Unexpected vertex sampler 2 magfilter %u.\n", value); + ok(value == 3, "Unexpected vertex sampler 2 magfilter %lu.\n", value);
hr = effect->lpVtbl->EndPass(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->End(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); effect->lpVtbl->Release(effect); }
@@ -5108,11 +5108,11 @@ static void test_effect_preshader_ops(IDirect3DDevice9 *device)
hr = D3DXCreateEffect(device, test_effect_preshader_ops_blob, sizeof(test_effect_preshader_ops_blob), NULL, NULL, 0, NULL, &effect, NULL); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->Begin(effect, &passes_count, 0); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->BeginPass(effect, 0); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(op_tests); ++i) { @@ -5120,16 +5120,16 @@ static void test_effect_preshader_ops(IDirect3DDevice9 *device) const float *expected_float = (float *)op_tests[i].expected_result;
hr = effect->lpVtbl->SetVector(effect, "opvect1", &op_tests[i].opvect1); - ok(hr == D3D_OK, "SetVector failed, hr %#x.\n", hr); + ok(hr == D3D_OK, "SetVector failed, hr %#lx.\n", hr); hr = effect->lpVtbl->SetVector(effect, "opvect2", &op_tests[i].opvect2); - ok(hr == D3D_OK, "SetVector failed, hr %#x.\n", hr); + ok(hr == D3D_OK, "SetVector failed, hr %#lx.\n", hr); hr = effect->lpVtbl->SetVector(effect, "opvect3", &op_tests[i].opvect3); - ok(hr == D3D_OK, "SetVector failed, hr %#x.\n", hr); + ok(hr == D3D_OK, "SetVector failed, hr %#lx.\n", hr); hr = effect->lpVtbl->CommitChanges(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = IDirect3DDevice9_GetLight(device, op_tests[i].result_index, &light); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); for (j = 0; j < 4; ++j) { todo_wine_if(op_tests[i].todo[j]) @@ -5141,7 +5141,7 @@ static void test_effect_preshader_ops(IDirect3DDevice9 *device) }
hr = effect->lpVtbl->End(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); effect->lpVtbl->Release(effect); }
@@ -5154,7 +5154,7 @@ static void test_isparameterused_children(unsigned int line, ID3DXEffect *effect HRESULT hr;
hr = effect->lpVtbl->GetParameterDesc(effect, param, &desc); - ok_(__FILE__, line)(hr == D3D_OK, "GetParameterDesc failed, result %#x.\n", hr); + ok_(__FILE__, line)(hr == D3D_OK, "GetParameterDesc failed, result %#lx.\n", hr); child_count = desc.Elements ? desc.Elements : desc.StructMembers; for (i = 0; i < child_count; ++i) { @@ -5222,7 +5222,7 @@ static void test_effect_isparameterused(IDirect3DDevice9 *device)
hr = D3DXCreateEffect(device, test_effect_preshader_effect_blob, sizeof(test_effect_preshader_effect_blob), NULL, NULL, 0, NULL, &effect, NULL); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
tech = effect->lpVtbl->GetTechniqueByName(effect, "tech0"); ok(!!tech, "GetTechniqueByName failed.\n"); @@ -5233,7 +5233,7 @@ static void test_effect_isparameterused(IDirect3DDevice9 *device)
hr = D3DXCreateEffect(device, test_effect_preshader_effect_blob, sizeof(test_effect_preshader_effect_blob), NULL, NULL, 0, NULL, &effect2, NULL); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(check_parameters); ++i) test_isparameterused_param_with_children(effect, effect2, tech, check_parameters[i].name, @@ -5243,7 +5243,7 @@ static void test_effect_isparameterused(IDirect3DDevice9 *device)
hr = D3DXCreateEffect(device, test_effect_states_effect_blob, sizeof(test_effect_states_effect_blob), NULL, NULL, 0, NULL, &effect2, NULL); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
test_isparameterused_param_with_children(effect, effect2, tech, "sampler1", TRUE); effect2->lpVtbl->Release(effect2); @@ -5264,7 +5264,7 @@ static void test_effect_out_of_bounds_selector(IDirect3DDevice9 *device) NULL, NULL, 0, NULL, &effect, NULL);
hr = effect->lpVtbl->Begin(effect, &passes_count, 0); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
ivect[0] = ivect[1] = ivect[3] = 1;
@@ -5272,130 +5272,130 @@ static void test_effect_out_of_bounds_selector(IDirect3DDevice9 *device) ok(!!param, "GetParameterByName failed.\n"); ivect[2] = 3; hr = effect->lpVtbl->SetValue(effect, param, ivect, sizeof(ivect)); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->BeginPass(effect, 0); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->EndPass(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = IDirect3DDevice9_SetVertexShader(device, NULL); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->BeginPass(effect, 1); - ok(hr == E_FAIL, "Got result %#x.\n", hr); + ok(hr == E_FAIL, "Got result %#lx.\n", hr);
/* Second try reports success and selects array element used previously. * Probably array index is not recomputed and previous index value is used. */ hr = effect->lpVtbl->BeginPass(effect, 1); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); test_effect_preshader_compare_shader(device, 2, FALSE);
/* Confirm that array element selected is the previous good one and does not depend * on computed (out of bound) index value. */ ivect[2] = 1; hr = effect->lpVtbl->SetValue(effect, param, ivect, sizeof(ivect)); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = IDirect3DDevice9_SetVertexShader(device, NULL); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->CommitChanges(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); test_effect_preshader_compare_shader(device, 1, FALSE); hr = effect->lpVtbl->EndPass(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ivect[2] = 3; hr = effect->lpVtbl->SetValue(effect, param, ivect, sizeof(ivect)); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = IDirect3DDevice9_SetVertexShader(device, NULL); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->BeginPass(effect, 1); - ok(hr == E_FAIL, "Got result %#x.\n", hr); + ok(hr == E_FAIL, "Got result %#lx.\n", hr); hr = effect->lpVtbl->BeginPass(effect, 1); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); test_effect_preshader_compare_shader(device, 1, FALSE);
/* End and begin effect again to ensure it will not trigger array * index recompute and error return from BeginPass. */ hr = effect->lpVtbl->EndPass(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->End(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->Begin(effect, &passes_count, 0); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->BeginPass(effect, 1); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); test_effect_preshader_compare_shader(device, 1, FALSE); hr = effect->lpVtbl->EndPass(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = IDirect3DDevice9_SetVertexShader(device, NULL); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
ivect[2] = -2; hr = effect->lpVtbl->SetValue(effect, param, ivect, sizeof(ivect)); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->BeginPass(effect, 1); - ok(hr == E_FAIL, "Got result %#x.\n", hr); + ok(hr == E_FAIL, "Got result %#lx.\n", hr);
hr = IDirect3DDevice9_GetVertexShader(device, &vshader); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(!vshader, "Got non NULL vshader.\n");
hr = effect->lpVtbl->BeginPass(effect, 1); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
test_effect_preshader_compare_shader(device, 1, FALSE);
hr = effect->lpVtbl->EndPass(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
ivect[2] = -1; hr = effect->lpVtbl->SetValue(effect, param, ivect, sizeof(ivect)); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->BeginPass(effect, 1); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
test_effect_preshader_compare_shader(device, 0, FALSE);
hr = IDirect3DDevice9_SetVertexShader(device, NULL); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
ivect[2] = 3; hr = effect->lpVtbl->SetValue(effect, param, ivect, sizeof(ivect)); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->CommitChanges(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = IDirect3DDevice9_GetVertexShader(device, &vshader); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(!vshader, "Got non NULL vshader.\n");
ivect[2] = -1; hr = effect->lpVtbl->SetValue(effect, param, ivect, sizeof(ivect)); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->CommitChanges(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = IDirect3DDevice9_GetVertexShader(device, &vshader); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(!vshader, "Got non NULL vshader.\n");
ivect[2] = 1; hr = effect->lpVtbl->SetValue(effect, param, ivect, sizeof(ivect)); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->CommitChanges(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
test_effect_preshader_compare_shader(device, 1, FALSE);
hr = effect->lpVtbl->EndPass(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->End(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
effect->lpVtbl->Release(effect); } @@ -5474,19 +5474,19 @@ static void test_effect_commitchanges(IDirect3DDevice9 *device)
hr = D3DXCreateEffect(device, test_effect_preshader_effect_blob, sizeof(test_effect_preshader_effect_blob), NULL, NULL, 0, NULL, &effect, NULL); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
param = effect->lpVtbl->GetParameterByName(effect, NULL, "g_iVect"); ok(!!param, "GetParameterByName failed.\n");
hr = effect->lpVtbl->Begin(effect, &passes_count, 0); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = IDirect3DDevice9_SetVertexShader(device, NULL); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->BeginPass(effect, 0); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(check_op_parameters); ++i) { @@ -5495,16 +5495,16 @@ static void test_effect_commitchanges(IDirect3DDevice9 *device) for (j = 0; j < 8; ++j) { hr = IDirect3DDevice9_SetLight(device, j, &light_filler); - ok(hr == D3D_OK, "Got result %#x, i %u, j %u.\n", hr, i, j); + ok(hr == D3D_OK, "Got result %#lx, i %u, j %u.\n", hr, i, j); } param = effect->lpVtbl->GetParameterByName(effect, NULL, check_op_parameters[i].param_name); ok(!!param, "Failed to get parameter (test %u).\n", i); hr = effect->lpVtbl->GetValue(effect, param, &fvect, sizeof(fvect)); - ok(hr == D3D_OK, "Failed to get parameter value, hr %#x (test %u).\n", hr, i); + ok(hr == D3D_OK, "Failed to get parameter value, hr %#lx (test %u).\n", hr, i); hr = effect->lpVtbl->SetValue(effect, param, &fvect, sizeof(fvect)); - ok(hr == D3D_OK, "Failed to set parameter value, hr %#x (test %u).\n", hr, i); + ok(hr == D3D_OK, "Failed to set parameter value, hr %#lx (test %u).\n", hr, i); hr = effect->lpVtbl->CommitChanges(effect); - ok(hr == D3D_OK, "Failed to commit changes, hr %#x (test %u).\n", hr, i); + ok(hr == D3D_OK, "Failed to commit changes, hr %#lx (test %u).\n", hr, i);
test_effect_preshader_op_results(device, check_op_parameters[i].state_updated, check_op_parameters[i].param_name); @@ -5516,11 +5516,11 @@ static void test_effect_commitchanges(IDirect3DDevice9 *device) param = effect->lpVtbl->GetParameterByName(effect, NULL, check_vconsts_parameters[i].param_name); ok(!!param, "GetParameterByName failed.\n"); hr = effect->lpVtbl->GetValue(effect, param, buffer, sizeof(buffer)); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->SetValue(effect, param, buffer, sizeof(buffer)); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->CommitChanges(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
test_effect_preshader_compare_vconsts(device, check_vconsts_parameters[i].const_updated_mask, check_vconsts_parameters[i].param_name); @@ -5532,11 +5532,11 @@ static void test_effect_commitchanges(IDirect3DDevice9 *device) param = effect->lpVtbl->GetParameterByName(effect, NULL, check_bconsts_parameters[i].param_name); ok(!!param, "GetParameterByName failed.\n"); hr = effect->lpVtbl->GetValue(effect, param, buffer, sizeof(buffer)); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->SetValue(effect, param, buffer, sizeof(buffer)); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->CommitChanges(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
test_effect_preshader_compare_pbool_consts(device, check_bconsts_parameters[i].const_updated_mask, check_bconsts_parameters[i].param_name); @@ -5547,9 +5547,9 @@ static void test_effect_commitchanges(IDirect3DDevice9 *device) ok(!!param, "GetParameterByName failed.\n"); fvect.x = fvect.y = fvect.z = fvect.w = 0.0f; hr = effect->lpVtbl->SetVectorArray(effect, param, &fvect, 1); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->CommitChanges(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); test_effect_preshader_compare_vconsts(device, check_vconsts_parameters[0].const_updated_mask, check_vconsts_parameters[0].param_name);
@@ -5559,9 +5559,9 @@ static void test_effect_commitchanges(IDirect3DDevice9 *device) param = effect->lpVtbl->GetParameterElement(effect, param, 0); ok(!!param, "GetParameterElement failed.\n"); hr = effect->lpVtbl->SetFloat(effect, param, 92.0f); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->CommitChanges(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); test_effect_preshader_compare_vconsts(device, const_no_update_mask, check_vconsts_parameters[10].param_name);
@@ -5572,9 +5572,9 @@ static void test_effect_commitchanges(IDirect3DDevice9 *device) ok(!!param, "GetParameterElement failed.\n"); fvect.x = 93.0f; hr = effect->lpVtbl->SetValue(effect, param, &fvect.x, sizeof(fvect.x)); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->CommitChanges(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); test_effect_preshader_compare_vconsts(device, check_vconsts_parameters[10].const_updated_mask, check_vconsts_parameters[10].param_name);
@@ -5583,9 +5583,9 @@ static void test_effect_commitchanges(IDirect3DDevice9 *device) ok(!!param, "GetParameterByName failed.\n"); fvect.x = 92.0f; hr = effect->lpVtbl->SetFloatArray(effect, param, &fvect.x, 1); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->CommitChanges(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); test_effect_preshader_compare_vconsts(device, check_vconsts_parameters[10].const_updated_mask, check_vconsts_parameters[10].param_name);
@@ -5595,9 +5595,9 @@ static void test_effect_commitchanges(IDirect3DDevice9 *device) param = effect->lpVtbl->GetParameterElement(effect, param, 1); ok(!!param, "GetParameterElement failed.\n"); hr = effect->lpVtbl->SetInt(effect, param, 93); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->CommitChanges(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); test_effect_preshader_compare_vconsts(device, const_no_update_mask, check_vconsts_parameters[10].param_name);
@@ -5606,9 +5606,9 @@ static void test_effect_commitchanges(IDirect3DDevice9 *device) ok(!!param, "GetParameterByName failed.\n"); fvect.x = fvect.y = fvect.z = fvect.w = 0.0f; hr = effect->lpVtbl->SetVector(effect, param, &fvect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->CommitChanges(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); test_effect_preshader_compare_vconsts(device, check_vconsts_parameters[1].const_updated_mask, check_vconsts_parameters[1].param_name);
@@ -5621,21 +5621,21 @@ static void test_effect_commitchanges(IDirect3DDevice9 *device) ok(!!param, "GetParameterByName failed.\n"); fvect.x = 12; hr = effect->lpVtbl->SetValue(effect, param, &fvect.x, sizeof(float)); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->CommitChanges(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); test_effect_preshader_compare_vconsts(device, check_vconsts_parameters[7].const_updated_mask, check_vconsts_parameters[7].param_name);
*(float *)&value = 9999.0f; hr = IDirect3DDevice9_SetRenderState(device, D3DRS_FOGDENSITY, value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_FOGSTART, value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_POINTSCALE_A, value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_POINTSCALE_B, value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); test_effect_clear_vconsts(device); param = effect->lpVtbl->GetParameterByName(effect, NULL, "ts2"); ok(!!param, "GetParameterByName failed.\n"); @@ -5644,35 +5644,35 @@ static void test_effect_commitchanges(IDirect3DDevice9 *device) param = effect->lpVtbl->GetParameterByName(effect, param, "v1"); ok(!!param, "GetParameterByName failed.\n"); hr = effect->lpVtbl->GetValue(effect, param, &fvect, sizeof(float) * 3); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->SetValue(effect, param, &fvect, sizeof(float) * 3); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->CommitChanges(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = IDirect3DDevice9_GetRenderState(device, D3DRS_FOGDENSITY, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(value == 0, "Unexpected fog density %g.\n", *(float *)&value); hr = IDirect3DDevice9_GetRenderState(device, D3DRS_FOGSTART, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(*(float *)&value == 4.0f, "Unexpected fog start %g.\n", *(float *)&value); hr = IDirect3DDevice9_GetRenderState(device, D3DRS_POINTSCALE_A, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(*(float *)&value == 9999.0f, "Unexpected point scale A %g.\n", *(float *)&value); hr = IDirect3DDevice9_GetRenderState(device, D3DRS_POINTSCALE_B, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(*(float *)&value == 9999.0f, "Unexpected point scale B %g.\n", *(float *)&value); test_effect_preshader_compare_vconsts(device, check_vconsts_parameters[8].const_updated_mask, check_vconsts_parameters[8].param_name);
*(float *)&value = 9999.0f; hr = IDirect3DDevice9_SetRenderState(device, D3DRS_FOGDENSITY, value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_FOGSTART, value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_POINTSCALE_A, value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_POINTSCALE_B, value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); test_effect_clear_vconsts(device); param = effect->lpVtbl->GetParameterByName(effect, NULL, "ts3"); ok(!!param, "GetParameterByName failed.\n"); @@ -5683,131 +5683,131 @@ static void test_effect_commitchanges(IDirect3DDevice9 *device) param = effect->lpVtbl->GetParameterByName(effect, param, "fv"); ok(!!param, "GetParameterByName failed.\n"); hr = effect->lpVtbl->GetValue(effect, param, &fvect.x, sizeof(float)); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->SetValue(effect, param, &fvect.x, sizeof(float)); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->CommitChanges(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = IDirect3DDevice9_GetRenderState(device, D3DRS_FOGDENSITY, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(*(float *)&value == 9999.0f, "Unexpected fog density %g.\n", *(float *)&value); hr = IDirect3DDevice9_GetRenderState(device, D3DRS_FOGSTART, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(*(float *)&value == 9999.0f, "Unexpected fog start %g.\n", *(float *)&value); hr = IDirect3DDevice9_GetRenderState(device, D3DRS_POINTSCALE_A, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(*(float *)&value == 4.0f, "Unexpected point scale A %g.\n", *(float *)&value); hr = IDirect3DDevice9_GetRenderState(device, D3DRS_POINTSCALE_B, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(*(float *)&value == 12.0f, "Unexpected point scale B %g.\n", *(float *)&value); test_effect_preshader_compare_vconsts(device, check_vconsts_parameters[11].const_updated_mask, check_vconsts_parameters[11].param_name);
hr = IDirect3DDevice9_GetSamplerState(device, D3DVERTEXTEXTURESAMPLER0, D3DSAMP_MINFILTER, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); - ok(value == 1, "Unexpected sampler 0 minfilter %u.\n", value); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); + ok(value == 1, "Unexpected sampler 0 minfilter %lu.\n", value); hr = IDirect3DDevice9_GetSamplerState(device, D3DVERTEXTEXTURESAMPLER1, D3DSAMP_MINFILTER, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); todo_wine - ok(value == 0, "Unexpected sampler 1 minfilter %u.\n", value); + ok(value == 0, "Unexpected sampler 1 minfilter %lu.\n", value); hr = IDirect3DDevice9_GetSamplerState(device, D3DVERTEXTEXTURESAMPLER2, D3DSAMP_MINFILTER, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); - ok(value == 3, "Unexpected sampler 2 minfilter %u.\n", value); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); + ok(value == 3, "Unexpected sampler 2 minfilter %lu.\n", value);
param = effect->lpVtbl->GetParameterByName(effect, NULL, "g_iVect"); ok(!!param, "GetParameterByName failed.\n"); ivect[0] = ivect[1] = ivect[2] = ivect[3] = 1; hr = effect->lpVtbl->SetValue(effect, param, ivect, sizeof(ivect)); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
for (i = 0; i < 3; ++i) { hr = IDirect3DDevice9_SetSamplerState(device, D3DVERTEXTEXTURESAMPLER0 + i, D3DSAMP_MINFILTER, 0); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = IDirect3DDevice9_SetSamplerState(device, D3DVERTEXTEXTURESAMPLER0 + i, D3DSAMP_MAGFILTER, 0); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); }
hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_MINFILTER, 0); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_MAGFILTER, 0); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = IDirect3DDevice9_SetVertexShader(device, NULL); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); test_effect_clear_vconsts(device);
hr = effect->lpVtbl->CommitChanges(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = IDirect3DDevice9_GetVertexShader(device, &vshader); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(!vshader, "Got non NULL vshader.\n"); test_effect_preshader_compare_vconsts(device, const_no_update_mask, "selector g_iVect");
hr = IDirect3DDevice9_GetSamplerState(device, D3DVERTEXTEXTURESAMPLER0, D3DSAMP_MINFILTER, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); - ok(value == 0, "Unexpected sampler 0 minfilter %u.\n", value); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); + ok(value == 0, "Unexpected sampler 0 minfilter %lu.\n", value); hr = IDirect3DDevice9_GetSamplerState(device, D3DVERTEXTEXTURESAMPLER1, D3DSAMP_MINFILTER, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); - ok(value == 0, "Unexpected sampler 1 minfilter %u.\n", value); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); + ok(value == 0, "Unexpected sampler 1 minfilter %lu.\n", value);
hr = IDirect3DDevice9_GetSamplerState(device, D3DVERTEXTEXTURESAMPLER2, D3DSAMP_MINFILTER, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); - ok(value == 1, "Unexpected sampler 2 minfilter %u.\n", value); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); + ok(value == 1, "Unexpected sampler 2 minfilter %lu.\n", value); hr = IDirect3DDevice9_GetSamplerState(device, D3DVERTEXTEXTURESAMPLER2, D3DSAMP_MAGFILTER, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); - ok(value == 0, "Unexpected sampler 2 minfilter %u.\n", value); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); + ok(value == 0, "Unexpected sampler 2 minfilter %lu.\n", value); hr = IDirect3DDevice9_GetSamplerState(device, 0, D3DSAMP_MINFILTER, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); - ok(value == 1, "Unexpected sampler 0 minfilter %u.\n", value); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); + ok(value == 1, "Unexpected sampler 0 minfilter %lu.\n", value); hr = IDirect3DDevice9_GetSamplerState(device, 0, D3DSAMP_MAGFILTER, &value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); - ok(value == 0, "Unexpected sampler 0 minfilter %u.\n", value); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); + ok(value == 0, "Unexpected sampler 0 minfilter %lu.\n", value);
ivect[3] = 2; hr = effect->lpVtbl->SetValue(effect, param, ivect, sizeof(ivect)); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ivect[3] = 1; hr = effect->lpVtbl->SetValue(effect, param, ivect, sizeof(ivect)); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->CommitChanges(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = IDirect3DDevice9_GetVertexShader(device, &vshader); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(!vshader, "Got non NULL vshader.\n"); test_effect_preshader_compare_vconsts(device, const_no_update_mask, "selector g_iVect"); ivect[3] = 2; hr = effect->lpVtbl->SetValue(effect, param, ivect, sizeof(ivect)); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->CommitChanges(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = IDirect3DDevice9_GetVertexShader(device, &vshader); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(!!vshader, "Got NULL vshader.\n"); IDirect3DVertexShader9_Release(vshader); hr = IDirect3DDevice9_GetVertexShaderConstantF(device, 0, &fvect.x, 1); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(fvect.x == 0.0f && fvect.y == 0.0f && fvect.z == 0.0f && fvect.w == 0.0f, "Vertex shader float constants do not match.\n"); hr = IDirect3DDevice9_SetVertexShaderConstantF(device, 0, &fvect_filler.x, 1); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); test_effect_preshader_compare_vconsts(device, const_no_update_mask, "selector g_iVect"); ivect[3] = 1; hr = effect->lpVtbl->SetValue(effect, param, ivect, sizeof(ivect)); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->CommitChanges(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); test_effect_preshader_compare_vconsts(device, NULL, NULL);
hr = effect->lpVtbl->EndPass(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->End(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
effect->lpVtbl->Release(effect); } @@ -5970,41 +5970,41 @@ static void test_effect_preshader_relative_addressing(IDirect3DDevice9 *device)
hr = D3DXCreateEffect(device, test_effect_preshader_effect_blob, sizeof(test_effect_preshader_effect_blob), NULL, NULL, 0, NULL, &effect, NULL); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->Begin(effect, &passes_count, 0); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->BeginPass(effect, 0); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
fvect.x = 1001.0f; fvect.y = 1002.0f; fvect.z = 1003.0f; fvect.w = 1004.0f; hr = effect->lpVtbl->SetVector(effect, "opvect1", &fvect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
fvect.x = 2001.0f; fvect.y = 2002.0f; fvect.z = 2003.0f; fvect.w = 2004.0f; hr = effect->lpVtbl->SetVector(effect, "g_Selector[0]", &fvect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
fvect.x = 3001.0f; fvect.y = 3002.0f; fvect.z = 3003.0f; fvect.w = 3004.0f; hr = effect->lpVtbl->SetVector(effect, "g_Selector[1]", &fvect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
v = &light.Specular.r; for (i = 0; i < ARRAY_SIZE(test_out_of_bounds_index); ++i) { hr = effect->lpVtbl->SetVector(effect, "opvect2", &test_out_of_bounds_index[i].opvect2); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->SetVector(effect, "g_iVect", &test_out_of_bounds_index[i].g_ivect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = IDirect3DDevice9_SetLight(device, 1, &light_filler); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->CommitChanges(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = IDirect3DDevice9_GetLight(device, 1, &light); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
expected = test_out_of_bounds_index[i].expected; expected_float = (const float *)expected; @@ -6018,12 +6018,12 @@ static void test_effect_preshader_relative_addressing(IDirect3DDevice9 *device) }
hr = effect->lpVtbl->SetVector(effect, "opvect2", &test_out_of_bounds_index[7].opvect2); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->SetVector(effect, "g_iVect", &test_out_of_bounds_index[7].g_ivect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = IDirect3DDevice9_SetLight(device, 1, &light_filler); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
fvect = test_out_of_bounds_index[7].g_ivect; v = &light.Specular.b; @@ -6031,12 +6031,12 @@ static void test_effect_preshader_relative_addressing(IDirect3DDevice9 *device) { fvect.w = i; hr = effect->lpVtbl->SetVector(effect, "g_iVect", &fvect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->CommitChanges(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = IDirect3DDevice9_GetLight(device, 1, &light); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
expected = expected_light_specular[(unsigned int)i % ARRAY_SIZE(expected_light_specular)].zw; expected_float = (const float *)expected; @@ -6054,12 +6054,12 @@ static void test_effect_preshader_relative_addressing(IDirect3DDevice9 *device) { fvect.x = fvect.y = fvect.z = fvect.w = test_index_to_immediate_table[i].index_value; hr = effect->lpVtbl->SetVector(effect, "g_iVect", &fvect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->CommitChanges(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = IDirect3DDevice9_GetLight(device, 2, &light); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
expected = test_index_to_immediate_table[i].expected; expected_float = (const float *)expected; @@ -6073,9 +6073,9 @@ static void test_effect_preshader_relative_addressing(IDirect3DDevice9 *device) }
hr = effect->lpVtbl->EndPass(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->End(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
effect->lpVtbl->Release(effect); } @@ -6403,27 +6403,27 @@ static void test_effect_state_manager(IDirect3DDevice9 *device) for (i = 0; i < 8; ++i) { hr = IDirect3DDevice9_SetLight(device, i, &light_filler); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); }
hr = D3DXCreateEffect(device, test_effect_preshader_effect_blob, sizeof(test_effect_preshader_effect_blob), NULL, NULL, 0, NULL, &effect, NULL); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->SetStateManager(effect, &state_manager->ID3DXEffectStateManager_iface); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->Begin(effect, &passes_count, 0); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->BeginPass(effect, 0); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->EndPass(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->End(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
effect->lpVtbl->Release(effect);
@@ -6437,7 +6437,7 @@ static void test_effect_state_manager(IDirect3DDevice9 *device) { ok(!memcmp(&expected_updates[i], &state_manager->update_record[i], sizeof(expected_updates[i])), - "Update record mismatch, expected %s, %u, %u, got %s, %u, %u.\n", + "Update record mismatch, expected %s, %lu, %lu, got %s, %lu, %lu.\n", test_effect_state_manager_state_names[expected_updates[i].state_op], expected_updates[i].param1, expected_updates[i].param2, test_effect_state_manager_state_names[state_manager->update_record[i].state_op], @@ -6449,13 +6449,13 @@ static void test_effect_state_manager(IDirect3DDevice9 *device) D3DLIGHT9 light;
hr = IDirect3DDevice9_GetLight(device, i, &light); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(!memcmp(&light, &light_filler, sizeof(light)), "Light %u mismatch.\n", i); }
refcount = state_manager->ID3DXEffectStateManager_iface.lpVtbl->Release( &state_manager->ID3DXEffectStateManager_iface); - ok(!refcount, "State manager was not properly freed, refcount %u.\n", refcount); + ok(!refcount, "State manager was not properly freed, refcount %lu.\n", refcount); }
static void test_cross_effect_handle(IDirect3DDevice9 *device) @@ -6468,10 +6468,10 @@ static void test_cross_effect_handle(IDirect3DDevice9 *device)
hr = D3DXCreateEffect(device, test_effect_preshader_effect_blob, sizeof(test_effect_preshader_effect_blob), NULL, NULL, 0, NULL, &effect1, NULL); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = D3DXCreateEffect(device, test_effect_preshader_effect_blob, sizeof(test_effect_preshader_effect_blob), NULL, NULL, 0, NULL, &effect2, NULL); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
ok(effect1 != effect2, "Got same effect unexpectedly.\n");
@@ -6484,10 +6484,10 @@ static void test_cross_effect_handle(IDirect3DDevice9 *device) ok(param1 != param2, "Got same parameter handle unexpectedly.\n");
hr = effect2->lpVtbl->SetValue(effect2, param1, expected_ivect, sizeof(expected_ivect)); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect1->lpVtbl->GetValue(effect1, param1, ivect, sizeof(ivect)); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
ok(!memcmp(ivect, expected_ivect, sizeof(expected_ivect)), "Vector value mismatch.\n");
@@ -6606,7 +6606,7 @@ static void test_effect_shared_vs_arr_compare_helper_(unsigned int line, ID3DXEf ok_(__FILE__, line)(!!param_child2, "GetParameterElement failed.\n"); ok_(__FILE__, line)(param_child != param_child2, "Got same parameter handle unexpectedly.\n"); hr = effect->lpVtbl->GetVertexShader(effect, param_child2, &vshader2); - ok_(__FILE__, line)(hr == D3D_OK, "Got result %#x.\n", hr); + ok_(__FILE__, line)(hr == D3D_OK, "Got result %#lx.\n", hr); todo_wine_if(todo) ok_(__FILE__, line)(vshader1 == vshader2, "Shared shader interface pointers differ.\n"); if (vshader2) @@ -6622,7 +6622,7 @@ static void test_effect_shared_parameters_compare_vconst_(unsigned int line, IDi HRESULT hr;
hr = IDirect3DDevice9_GetVertexShaderConstantF(device, index, &fvect.x, 1); - ok_(__FILE__, line)(hr == D3D_OK, "Got result %#x.\n", hr); + ok_(__FILE__, line)(hr == D3D_OK, "Got result %#lx.\n", hr); todo_wine_if(todo) ok_(__FILE__, line)(!memcmp(&fvect, expected_fvect, sizeof(fvect)), "Unexpected constant value %g, %g, %g, %g.\n", fvect.x, fvect.y, fvect.z, fvect.w); @@ -6640,34 +6640,34 @@ static void test_effect_shared_parameters(IDirect3DDevice9 *device) float fval[2];
hr = D3DXCreateEffectPool(&pool); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = D3DXCreateEffect(device, test_effect_preshader_effect_blob, sizeof(test_effect_preshader_effect_blob), NULL, NULL, 0, pool, &effect2, NULL); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); effect2->lpVtbl->SetFloat(effect2, "arr2[0]", 28.0f); effect2->lpVtbl->Release(effect2);
hr = D3DXCreateEffect(device, test_effect_preshader_effect_blob, sizeof(test_effect_preshader_effect_blob), NULL, NULL, 0, pool, &effect2, NULL); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); effect2->lpVtbl->GetFloat(effect2, "arr2[0]", &fvect.x); ok(fvect.x == 92.0f, "Unexpected parameter value %g.\n", fvect.x); effect2->lpVtbl->SetFloat(effect2, "arr2[0]", 28.0f);
hr = D3DXCreateEffect(device, test_effect_preshader_effect_blob, sizeof(test_effect_preshader_effect_blob), NULL, NULL, 0, pool, &effect1, NULL); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
effect1->lpVtbl->GetFloat(effect1, "arr2[0]", &fvect.x); ok(fvect.x == 28.0f, "Unexpected parameter value %g.\n", fvect.x);
hr = D3DXCreateEffect(device, test_effect_shared_parameters_blob, sizeof(test_effect_shared_parameters_blob), NULL, NULL, 0, pool, &effect3, NULL); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = D3DXCreateEffect(device, test_effect_shared_parameters_blob, sizeof(test_effect_shared_parameters_blob), NULL, NULL, 0, pool, &effect4, NULL); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
effect2->lpVtbl->SetFloat(effect2, "arr2[0]", 3.0f); effect2->lpVtbl->SetFloat(effect2, "ts2[0].fv", 3.0f); @@ -6712,42 +6712,42 @@ static void test_effect_shared_parameters(IDirect3DDevice9 *device) "Unexpected IsParameterUsed result.\n");
hr = effect3->lpVtbl->Begin(effect3, &passes_count, 0); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
if (0) { /* Native d3dx crashes in BeginPass(). This is the case of shader array declared shared * but initialized with different shaders using different parameters. */ hr = effect3->lpVtbl->BeginPass(effect3, 0); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect3->lpVtbl->EndPass(effect3); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); }
test_effect_clear_vconsts(device); fvect.x = fvect.y = fvect.z = fvect.w = 28.0f; hr = effect2->lpVtbl->SetVector(effect2, "g_Pos1", &fvect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect1->lpVtbl->SetVector(effect1, "g_Pos1", &fvect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect3->lpVtbl->BeginPass(effect3, 1); todo_wine - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = IDirect3DDevice9_GetVertexShaderConstantF(device, 0, &fvect.x, 1); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); todo_wine ok(fvect.x == 0.0f && fvect.y == 0.0f && fvect.z == 0.0f && fvect.w == 0.0f, "Unexpected vector %g, %g, %g, %g.\n", fvect.x, fvect.y, fvect.z, fvect.w);
hr = effect3->lpVtbl->EndPass(effect3); todo_wine - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect3->lpVtbl->End(effect3); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
for (i = 0; i < 2; ++i) { @@ -6756,7 +6756,7 @@ static void test_effect_shared_parameters(IDirect3DDevice9 *device) param_child = effect1->lpVtbl->GetParameterElement(effect1, "vs_arr2", i); ok(!!param_child, "GetParameterElement failed.\n"); hr = effect1->lpVtbl->GetVertexShader(effect1, param_child, &vshader1); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
test_effect_shared_vs_arr_compare_helper(effect2, param_child, vshader1, i, FALSE); test_effect_shared_vs_arr_compare_helper(effect3, param_child, vshader1, i, FALSE); @@ -6769,10 +6769,10 @@ static void test_effect_shared_parameters(IDirect3DDevice9 *device)
fval[0] = 1.0f; hr = effect1->lpVtbl->SetFloatArray(effect1, "arr1", fval, 1); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); fval[0] = 0.0f; hr = effect2->lpVtbl->GetFloatArray(effect2, "arr1", fval, 1); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(fval[0] == 91.0f, "Unexpected value %g.\n", fval[0]);
param = effect1->lpVtbl->GetParameterByName(effect1, NULL, "arr2"); @@ -6788,31 +6788,31 @@ static void test_effect_shared_parameters(IDirect3DDevice9 *device)
fval[0] = 33.0f; hr = effect1->lpVtbl->SetFloatArray(effect1, "arr2", fval, 1); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); fval[0] = 0.0f; hr = effect1->lpVtbl->GetFloatArray(effect1, "arr2", fval, 2); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(fval[0] == 33.0f && fval[1] == 93.0f, "Unexpected values %g, %g.\n", fval[0], fval[1]); fval[0] = 0.0f; hr = effect2->lpVtbl->GetFloatArray(effect2, "arr2", fval, 2); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(fval[0] == 33.0f && fval[1] == 93.0f, "Unexpected values %g, %g.\n", fval[0], fval[1]);
hr = effect1->lpVtbl->Begin(effect1, &passes_count, 0); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect2->lpVtbl->Begin(effect2, &passes_count, 0); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect1->lpVtbl->BeginPass(effect1, 0); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
fvect.x = 1.0f; fvect.y = fvect.z = fvect.w = 0.0f; test_effect_shared_parameters_compare_vconst(device, 32, &fvect, FALSE);
hr = effect1->lpVtbl->BeginPass(effect2, 0); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
fvect.x = 91.0f; test_effect_shared_parameters_compare_vconst(device, 32, &fvect, FALSE); @@ -6822,12 +6822,12 @@ static void test_effect_shared_parameters(IDirect3DDevice9 *device) fval[0] = 28.0f; fval[1] = -1.0f; hr = effect1->lpVtbl->SetFloatArray(effect1, "arr2", fval, 2); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
test_effect_clear_vconsts(device);
hr = effect1->lpVtbl->CommitChanges(effect1); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
fvect.x = 28.0f; test_effect_shared_parameters_compare_vconst(device, 29, &fvect, FALSE); @@ -6837,13 +6837,13 @@ static void test_effect_shared_parameters(IDirect3DDevice9 *device) test_effect_clear_vconsts(device);
hr = effect1->lpVtbl->CommitChanges(effect1); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
test_effect_shared_parameters_compare_vconst(device, 29, &fvect_filler, FALSE); test_effect_shared_parameters_compare_vconst(device, 30, &fvect_filler, FALSE);
hr = effect2->lpVtbl->CommitChanges(effect2); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
fvect.x = 28.0f; test_effect_shared_parameters_compare_vconst(device, 29, &fvect, FALSE); @@ -6852,9 +6852,9 @@ static void test_effect_shared_parameters(IDirect3DDevice9 *device)
fval[0] = -2.0f; hr = effect2->lpVtbl->SetFloat(effect2, "arr2[0]", fval[0]); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect1->lpVtbl->CommitChanges(effect1); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
fvect.x = -2.0f; test_effect_shared_parameters_compare_vconst(device, 29, &fvect, FALSE); @@ -6863,32 +6863,32 @@ static void test_effect_shared_parameters(IDirect3DDevice9 *device)
fvect.x = fvect.y = fvect.z = fvect.w = 1111.0f; hr = effect2->lpVtbl->SetVector(effect2, "g_Pos1", &fvect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect1->lpVtbl->CommitChanges(effect1); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); test_effect_shared_parameters_compare_vconst(device, 31, &fvect_filler, FALSE);
hr = effect1->lpVtbl->CommitChanges(effect2); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); test_effect_shared_parameters_compare_vconst(device, 31, &fvect, FALSE);
hr = effect1->lpVtbl->End(effect1); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect2->lpVtbl->End(effect2); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
if (0) { refcount = pool->lpVtbl->Release(pool); - ok(refcount == 2, "Unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Unexpected refcount %lu.\n", refcount);
refcount = pool->lpVtbl->Release(pool); - ok(refcount == 1, "Unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Unexpected refcount %lu.\n", refcount);
refcount = pool->lpVtbl->Release(pool); - ok(!refcount, "Unexpected refcount %u.\n", refcount); + ok(!refcount, "Unexpected refcount %lu.\n", refcount);
/* Native d3dx crashes in GetFloat(). */ effect2->lpVtbl->GetFloat(effect2, "arr2[0]", &fvect.x); @@ -6898,7 +6898,7 @@ static void test_effect_shared_parameters(IDirect3DDevice9 *device) effect2->lpVtbl->Release(effect2);
refcount = pool->lpVtbl->Release(pool); - ok(!refcount, "Effect pool was not properly freed, refcount %u.\n", refcount); + ok(!refcount, "Effect pool was not properly freed, refcount %lu.\n", refcount); }
static void test_effect_large_address_aware_flag(IDirect3DDevice9 *device) @@ -6911,16 +6911,16 @@ static void test_effect_large_address_aware_flag(IDirect3DDevice9 *device)
hr = D3DXCreateEffect(device, test_effect_preshader_effect_blob, sizeof(test_effect_preshader_effect_blob), NULL, NULL, D3DXFX_LARGEADDRESSAWARE, NULL, &effect, NULL); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
param = effect->lpVtbl->GetParameterByName(effect, NULL, "g_iVect"); ok(!!param, "GetParameterByName failed.\n");
hr = effect->lpVtbl->SetValue(effect, param, expected_ivect, sizeof(expected_ivect)); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->GetValue(effect, param, ivect, sizeof(ivect)); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
ok(!memcmp(ivect, expected_ivect, sizeof(expected_ivect)), "Vector value mismatch.\n");
@@ -6928,7 +6928,7 @@ static void test_effect_large_address_aware_flag(IDirect3DDevice9 *device) { /* Native d3dx crashes in GetValue(). */ hr = effect->lpVtbl->GetValue(effect, "g_iVect", ivect, sizeof(ivect)); - ok(hr == D3DERR_INVALIDCALL, "Got result %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got result %#lx.\n", hr); }
effect->lpVtbl->Release(effect); @@ -6945,68 +6945,68 @@ static void test_effect_get_pass_desc(IDirect3DDevice9 *device)
hr = D3DXCreateEffect(device, test_effect_preshader_effect_blob, sizeof(test_effect_preshader_effect_blob), NULL, NULL, 0, NULL, &effect, NULL); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
pass = effect->lpVtbl->GetPass(effect, "tech0", 1); ok(!!pass, "GetPass() failed.\n");
hr = effect->lpVtbl->GetPassDesc(effect, pass, &desc); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); test_effect_preshader_compare_shader_bytecode(desc.pVertexShaderFunction, 0, 2, FALSE);
fvect.x = fvect.y = fvect.w = 0.0f; fvect.z = 0.0f; hr = effect->lpVtbl->SetVector(effect, "g_iVect", &fvect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->GetPassDesc(effect, pass, &desc); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(!desc.pPixelShaderFunction, "Unexpected non null desc.pPixelShaderFunction.\n");
test_effect_preshader_compare_shader_bytecode(desc.pVertexShaderFunction, 0, 0, FALSE);
fvect.z = 3.0f; hr = effect->lpVtbl->SetVector(effect, "g_iVect", &fvect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->GetPassDesc(effect, pass, &desc); - ok(hr == E_FAIL, "Got result %#x.\n", hr); + ok(hr == E_FAIL, "Got result %#lx.\n", hr); ok(!desc.pVertexShaderFunction, "Unexpected non null desc.pVertexShaderFunction.\n");
/* Repeating call to confirm GetPassDesc() returns same error on the second call, * as it is not the case sometimes for BeginPass() with out of bound access. */ hr = effect->lpVtbl->GetPassDesc(effect, pass, &desc); - ok(hr == E_FAIL, "Got result %#x.\n", hr); + ok(hr == E_FAIL, "Got result %#lx.\n", hr); ok(!desc.pVertexShaderFunction, "Unexpected non null desc.pVertexShaderFunction.\n");
hr = effect->lpVtbl->Begin(effect, &passes_count, 0); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->BeginPass(effect, 1); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->GetPassDesc(effect, pass, &desc); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
test_effect_preshader_compare_shader_bytecode(desc.pVertexShaderFunction, 0, 0, FALSE);
fvect.z = 2.0f; hr = effect->lpVtbl->SetVector(effect, "g_iVect", &fvect); hr = effect->lpVtbl->GetPassDesc(effect, pass, &desc); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); test_effect_preshader_compare_shader_bytecode(desc.pVertexShaderFunction, 0, 2, FALSE);
effect->lpVtbl->Release(effect);
hr = D3DXCreateEffect(device, test_effect_preshader_effect_blob, sizeof(test_effect_preshader_effect_blob), NULL, NULL, D3DXFX_NOT_CLONEABLE, NULL, &effect, NULL); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
pass = effect->lpVtbl->GetPass(effect, "tech0", 1); ok(!!pass, "GetPass() failed.\n");
hr = effect->lpVtbl->GetPassDesc(effect, pass, &desc); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
ok(!desc.pVertexShaderFunction, "Unexpected non null desc.pVertexShaderFunction.\n"); ok(!desc.pPixelShaderFunction, "Unexpected non null desc.pPixelShaderFunction.\n"); @@ -7097,17 +7097,17 @@ static void test_effect_skip_constants(IDirect3DDevice9 *device)
hr = D3DXCreateEffectEx(device, test_effect_skip_constants_blob, sizeof(test_effect_skip_constants_blob), NULL, NULL, "v3", 0, NULL, &effect, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got result %#lx.\n", hr); hr = D3DXCreateEffectEx(device, test_effect_skip_constants_blob, sizeof(test_effect_skip_constants_blob), NULL, NULL, "v4", 0, NULL, &effect, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got result %#lx.\n", hr); hr = D3DXCreateEffectEx(device, test_effect_skip_constants_blob, sizeof(test_effect_skip_constants_blob), NULL, NULL, "v1;v5;v4", 0, NULL, &effect, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got result %#lx.\n", hr);
hr = D3DXCreateEffectEx(device, test_effect_skip_constants_blob, sizeof(test_effect_skip_constants_blob), NULL, NULL, " v1#,.+-= &\t\nv2*/!"'v5 v6[1]", 0, NULL, &effect, NULL); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
ok(!effect->lpVtbl->IsParameterUsed(effect, "v1", "tech0"), "Unexpected IsParameterUsed result.\n"); @@ -7123,22 +7123,22 @@ static void test_effect_skip_constants(IDirect3DDevice9 *device) "Unexpected IsParameterUsed result.\n");
hr = effect->lpVtbl->SetFloat(effect, "v1", 28.0f); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->SetFloat(effect, "v2", 29.0f); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->SetFloat(effect, "v3", 30.0f); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->SetFloat(effect, "v4", 31.0f); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->SetFloat(effect, "v5", 32.0f); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
test_effect_clear_vconsts(device);
hr = effect->lpVtbl->Begin(effect, &passes_count, 0); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->BeginPass(effect, 0); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
fvect.y = fvect.z = fvect.w = 0.0f; fvect.x = 30.0f; @@ -7151,9 +7151,9 @@ static void test_effect_skip_constants(IDirect3DDevice9 *device) test_effect_shared_parameters_compare_vconst(device, i, &fvect_filler, FALSE);
hr = effect->lpVtbl->EndPass(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->End(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
effect->lpVtbl->Release(effect); } @@ -7242,55 +7242,55 @@ static void test_effect_unsupported_shader(void)
hr = D3DXCreateEffectEx(device, test_effect_unsupported_shader_blob, sizeof(test_effect_unsupported_shader_blob), NULL, NULL, NULL, 0, NULL, &effect, NULL); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->ValidateTechnique(effect, "missing_technique"); - ok(hr == D3DERR_INVALIDCALL, "Got result %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got result %#lx.\n", hr); hr = effect->lpVtbl->ValidateTechnique(effect, "tech0"); - ok(hr == E_FAIL, "Got result %#x.\n", hr); + ok(hr == E_FAIL, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->ValidateTechnique(effect, "tech1"); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->SetInt(effect, "i", 1); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->ValidateTechnique(effect, "tech1"); - ok(hr == E_FAIL, "Got result %#x.\n", hr); + ok(hr == E_FAIL, "Got result %#lx.\n", hr); hr = effect->lpVtbl->SetInt(effect, "i", 0); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->ValidateTechnique(effect, "tech1"); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->SetTechnique(effect, "tech0"); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->Begin(effect, &passes_count, 0); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->BeginPass(effect, 0); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = IDirect3DDevice9_GetVertexShader(device, &vshader); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr); ok(!vshader, "Got non NULL vshader.\n");
hr = effect->lpVtbl->EndPass(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->End(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->SetTechnique(effect, "tech1"); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->Begin(effect, &passes_count, 0); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->BeginPass(effect, 0); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = IDirect3DDevice9_GetVertexShader(device, &vshader); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr); ok(!!vshader, "Got NULL vshader.\n"); hr = IDirect3DVertexShader9_GetFunction(vshader, NULL, &byte_code_size); - ok(hr == D3D_OK, "Got result %x.\n", hr); + ok(hr == D3D_OK, "Got result %lx.\n", hr); byte_code = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, byte_code_size); hr = IDirect3DVertexShader9_GetFunction(vshader, byte_code, &byte_code_size); - ok(hr == D3D_OK, "Got result %x.\n", hr); + ok(hr == D3D_OK, "Got result %lx.\n", hr); ok(byte_code_size == TEST_EFFECT_UNSUPPORTED_SHADER_BYTECODE_VS_3_0_LEN * sizeof(DWORD), "Got unexpected byte code size %u.\n", byte_code_size); ok(!memcmp(byte_code, @@ -7300,17 +7300,17 @@ static void test_effect_unsupported_shader(void) IDirect3DVertexShader9_Release(vshader);
hr = effect->lpVtbl->SetInt(effect, "i", 1); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->CommitChanges(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = IDirect3DDevice9_GetVertexShader(device, &vshader); - ok(hr == D3D_OK, "Got result %x.\n", hr); + ok(hr == D3D_OK, "Got result %lx.\n", hr); ok(!vshader, "Got non NULL vshader.\n");
effect->lpVtbl->Release(effect);
refcount = IDirect3DDevice9_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -7375,40 +7375,40 @@ static void test_effect_null_shader(void)
hr = D3DXCreateEffectEx(device, test_effect_null_shader_blob, sizeof(test_effect_null_shader_blob), NULL, NULL, NULL, 0, NULL, &effect, NULL); - ok(hr == D3D_OK, "Failed to create effect, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to create effect, hr %#lx.\n", hr);
pass = effect->lpVtbl->GetPass(effect, "tech0", 0); ok(!!pass, "GetPass() failed.\n"); hr = effect->lpVtbl->GetPassDesc(effect, pass, &desc); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(!desc.pVertexShaderFunction, "Got non NULL vertex function.\n");
pass = effect->lpVtbl->GetPass(effect, "tech1", 0); ok(!!pass, "GetPass() failed.\n"); hr = effect->lpVtbl->GetPassDesc(effect, pass, &desc); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(!desc.pVertexShaderFunction, "Got non NULL vertex function.\n");
hr = effect->lpVtbl->ValidateTechnique(effect, "tech0"); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->SetInt(effect, "i", 0); - ok(hr == D3D_OK, "Failed to set parameter, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to set parameter, hr %#lx.\n", hr); hr = effect->lpVtbl->ValidateTechnique(effect, "tech1"); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->SetInt(effect, "i", 1); - ok(hr == D3D_OK, "Failed to set parameter, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to set parameter, hr %#lx.\n", hr); hr = effect->lpVtbl->ValidateTechnique(effect, "tech1"); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->SetInt(effect, "i", 2); - ok(hr == D3D_OK, "Failed to set parameter, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to set parameter, hr %#lx.\n", hr); hr = effect->lpVtbl->ValidateTechnique(effect, "tech1"); - ok(hr == E_FAIL, "Got result %#x.\n", hr); + ok(hr == E_FAIL, "Got result %#lx.\n", hr);
effect->lpVtbl->Release(effect);
refcount = IDirect3DDevice9_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -7503,12 +7503,12 @@ static void test_effect_clone(void)
hr = IDirect3DDevice9_CreateTexture(device, 16, 16, 1, 0, D3DFMT_X8R8G8B8, D3DPOOL_DEFAULT, (IDirect3DTexture9 **)&texture, NULL); - ok(hr == D3D_OK, "Failed to create texture, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to create texture, hr %#lx.\n", hr);
/* D3DXFX_NOT_CLONEABLE */ hr = D3DXCreateEffect(device, effect_code, sizeof(effect_code), NULL, NULL, D3DXFX_NOT_CLONEABLE, NULL, &effect, NULL); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
technique = effect->lpVtbl->GetTechniqueByName(effect, "tech0"); ok(!!technique, "Expected a technique.\n"); @@ -7517,88 +7517,88 @@ static void test_effect_clone(void) ok(technique2 == technique, "Got unexpected technique %p.\n", technique2);
hr = effect->lpVtbl->SetTechnique(effect, "tech1"); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->CloneEffect(effect, NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got result %#lx.\n", hr);
cloned = (void *)0xdeadbeef; hr = effect->lpVtbl->CloneEffect(effect, NULL, &cloned); - ok(hr == E_FAIL, "Got result %#x.\n", hr); + ok(hr == E_FAIL, "Got result %#lx.\n", hr); ok(cloned == (void *)0xdeadbeef, "Unexpected effect pointer.\n");
hr = effect->lpVtbl->CloneEffect(effect, device, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got result %#lx.\n", hr);
cloned = (void *)0xdeadbeef; hr = effect->lpVtbl->CloneEffect(effect, device, &cloned); - ok(hr == E_FAIL, "Got result %#x.\n", hr); + ok(hr == E_FAIL, "Got result %#lx.\n", hr); ok(cloned == (void *)0xdeadbeef, "Unexpected effect pointer.\n");
effect->lpVtbl->Release(effect);
hr = D3DXCreateEffectEx(device, effect_code, sizeof(effect_code), NULL, NULL, "skipped", 0, NULL, &effect, NULL); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->SetStateManager(effect, &state_manager->ID3DXEffectStateManager_iface); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->SetTexture(effect, "tex", texture); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->SetFloat(effect, "f", 123.0f); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->SetString(effect, "s", "tiny silver hammers"); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->SetFloat(effect, "f@a", 4.0f); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
annotation = effect->lpVtbl->GetAnnotationByName(effect, "tech0", "a"); ok(!!annotation, "Failed to get annotation.\n"); hr = effect->lpVtbl->SetFloat(effect, annotation, 4.0f); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
parameter = effect->lpVtbl->GetParameterByName(effect, NULL, "tex"); ok(!!parameter, "Failed to get parameter.\n");
hr = effect->lpVtbl->GetVertexShader(effect, "vs", &vs); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
ok(!effect->lpVtbl->IsParameterUsed(effect, "skipped", "tech1"), "Unexpected IsParameterUsed result.\n");
hr = effect->lpVtbl->Begin(effect, &passes_count, 0); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->CloneEffect(effect, NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got result %#lx.\n", hr);
cloned = (void *)0xdeadbeef; hr = effect->lpVtbl->CloneEffect(effect, NULL, &cloned); - ok(hr == D3DERR_INVALIDCALL, "Got result %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got result %#lx.\n", hr); ok(cloned == (void *)0xdeadbeef, "Unexpected effect pointer.\n");
hr = effect->lpVtbl->CloneEffect(effect, device, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->CloneEffect(effect, device, &cloned); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(cloned != effect, "Expected new effect instance.\n");
hr = cloned->lpVtbl->GetStateManager(cloned, &ret_manager); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(!ret_manager, "Unexpected state manager %p.\n", ret_manager);
hr = cloned->lpVtbl->GetTexture(cloned, "tex", &texture2); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(texture2 == texture, "Expected the same texture.\n"); IDirect3DBaseTexture9_Release(texture2);
hr = cloned->lpVtbl->GetVertexShader(cloned, "vs", &vs2); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(vs2 == vs, "Expected the same vertex shader.\n"); IDirect3DVertexShader9_Release(vs2);
@@ -7607,23 +7607,23 @@ static void test_effect_clone(void)
f = 0.0f; hr = cloned->lpVtbl->GetFloat(cloned, "f", &f); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(f == 123.0f, "Got float %.8e.\n", f);
hr = cloned->lpVtbl->GetString(cloned, "s", &string); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(!strcmp(string, "tiny silver hammers"), "Got string %s.\n", debugstr_a(string));
f = 0.0f; hr = cloned->lpVtbl->GetFloat(cloned, "f@a", &f); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(f == 4.0f, "Got float %.8e.\n", f);
annotation = cloned->lpVtbl->GetAnnotationByName(cloned, "tech0", "a"); ok(!!annotation, "Failed to get annotation.\n"); f = 0.0f; hr = cloned->lpVtbl->GetFloat(cloned, annotation, &f); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(f == 4.0f, "Got float %.8e.\n", f);
parameter2 = cloned->lpVtbl->GetParameterByName(cloned, NULL, "tex"); @@ -7631,7 +7631,7 @@ static void test_effect_clone(void) ok(parameter2 != parameter, "Parameters should not match.\n");
hr = cloned->lpVtbl->BeginPass(cloned, 0); - ok(hr == D3DERR_INVALIDCALL, "Got result %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got result %#lx.\n", hr);
technique = cloned->lpVtbl->GetTechniqueByName(cloned, "tech0"); ok(!!technique, "Expected a technique.\n"); @@ -7645,7 +7645,7 @@ static void test_effect_clone(void) device2 = create_device(&window2);
hr = effect->lpVtbl->CloneEffect(effect, device2, &cloned); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(cloned != effect, "Expected new effect instance.\n");
hr = cloned->lpVtbl->GetDevice(cloned, &device3); @@ -7654,33 +7654,33 @@ static void test_effect_clone(void) IDirect3DDevice9_Release(device3);
hr = cloned->lpVtbl->GetTexture(cloned, "tex", &texture2); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(!texture2, "Expected a NULL texture.\n");
hr = cloned->lpVtbl->GetVertexShader(cloned, "vs", &vs2); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(vs2 != vs, "Expected a different vertex shader.\n"); IDirect3DVertexShader9_Release(vs2);
f = 0.0f; hr = cloned->lpVtbl->GetFloat(cloned, "f", &f); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(f == 123.0f, "Got float %.8e.\n", f);
hr = cloned->lpVtbl->GetString(cloned, "s", &string); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(!strcmp(string, "tiny silver hammers"), "Got string %s.\n", debugstr_a(string));
f = 0.0f; hr = cloned->lpVtbl->GetFloat(cloned, "f@a", &f); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(f == 4.0f, "Got float %.8e.\n", f);
annotation = cloned->lpVtbl->GetAnnotationByName(cloned, "tech0", "a"); ok(!!annotation, "Failed to get annotation.\n"); f = 0.0f; hr = cloned->lpVtbl->GetFloat(cloned, annotation, &f); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(f == 4.0f, "Got float %.8e.\n", f);
parameter2 = cloned->lpVtbl->GetParameterByName(cloned, NULL, "tex"); @@ -7688,7 +7688,7 @@ static void test_effect_clone(void) ok(parameter2 != parameter, "Parameters should not match.\n");
hr = cloned->lpVtbl->BeginPass(cloned, 0); - ok(hr == D3DERR_INVALIDCALL, "Got result %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got result %#lx.\n", hr);
technique = cloned->lpVtbl->GetTechniqueByName(cloned, "tech0"); ok(!!technique, "Expected a technique.\n"); @@ -7699,25 +7699,25 @@ static void test_effect_clone(void) cloned->lpVtbl->Release(cloned);
hr = effect->lpVtbl->BeginPass(effect, 0); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->EndPass(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->End(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
/* Test parameter blocks (we can't do this above since we can't record a * parameter block while started). */
hr = effect->lpVtbl->BeginParameterBlock(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->SetFloat(effect, "f", 456.0f); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->CloneEffect(effect, device, &cloned); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); block = cloned->lpVtbl->EndParameterBlock(cloned); ok(!block, "Expected no active parameter block.\n");
@@ -7732,10 +7732,10 @@ static void test_effect_clone(void) effect->lpVtbl->Release(effect); refcount = state_manager->ID3DXEffectStateManager_iface.lpVtbl->Release( &state_manager->ID3DXEffectStateManager_iface); - ok(!refcount, "State manager was not properly freed, refcount %u.\n", refcount); + ok(!refcount, "State manager was not properly freed, refcount %lu.\n", refcount); IDirect3DBaseTexture9_Release(texture); refcount = IDirect3DDevice9_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -7759,21 +7759,21 @@ static void test_refcount(void) return;
hr = IDirect3DDevice9_CreateTexture(device, 16, 16, 1, 0, D3DFMT_X8R8G8B8, D3DPOOL_DEFAULT, &texture, NULL); - ok(hr == D3D_OK, "Failed to create texture, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to create texture, hr %#lx.\n", hr);
hr = D3DXCreateEffect(device, test_effect_preshader_effect_blob, sizeof(test_effect_preshader_effect_blob), NULL, NULL, D3DXFX_DONOTSAVESTATE, NULL, &effect, NULL); - ok(hr == D3D_OK, "Failed to create effect, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to create effect, hr %#lx.\n", hr);
hr = effect->lpVtbl->SetTexture(effect, "tex1", (IDirect3DBaseTexture9 *)texture); - ok(hr == D3D_OK, "Failed to set texture parameter, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to set texture parameter, hr %#lx.\n", hr);
hr = effect->lpVtbl->Begin(effect, &passes_count, D3DXFX_DONOTSAVESTATE); - ok(hr == D3D_OK, "Begin() failed, hr %#x.\n", hr); + ok(hr == D3D_OK, "Begin() failed, hr %#lx.\n", hr);
hr = effect->lpVtbl->BeginPass(effect, 0); - ok(hr == D3D_OK, "BeginPass() failed, hr %#x.\n", hr); + ok(hr == D3D_OK, "BeginPass() failed, hr %#lx.\n", hr);
IDirect3DDevice9_GetTexture(device, 0, (IDirect3DBaseTexture9 **)&cur_texture); ok(cur_texture == texture, "Unexpected current texture %p.\n", cur_texture); @@ -7786,73 +7786,73 @@ static void test_refcount(void) ok(cur_texture == NULL, "Unexpected current texture %p.\n", cur_texture);
hr = effect->lpVtbl->EndPass(effect); - ok(hr == D3D_OK, "EndPass() failed, hr %#x.\n", hr); + ok(hr == D3D_OK, "EndPass() failed, hr %#lx.\n", hr);
hr = effect->lpVtbl->BeginPass(effect, 0); - ok(hr == D3D_OK, "BeginPass() failed, hr %#x.\n", hr); + ok(hr == D3D_OK, "BeginPass() failed, hr %#lx.\n", hr);
IDirect3DDevice9_GetTexture(device, 0, (IDirect3DBaseTexture9 **)&cur_texture); ok(cur_texture == texture, "Unexpected current texture %p.\n", cur_texture); IDirect3DTexture9_Release(cur_texture);
hr = effect->lpVtbl->EndPass(effect); - ok(hr == D3D_OK, "EndPass() failed, hr %#x.\n", hr); + ok(hr == D3D_OK, "EndPass() failed, hr %#lx.\n", hr); hr = effect->lpVtbl->End(effect); - ok(hr == D3D_OK, "End() failed, hr %#x.\n", hr); + ok(hr == D3D_OK, "End() failed, hr %#lx.\n", hr);
IDirect3DDevice9_GetTexture(device, 0, (IDirect3DBaseTexture9 **)&cur_texture); ok(cur_texture == texture, "Unexpected current texture %p.\n", cur_texture); IDirect3DTexture9_Release(cur_texture); refcount = get_texture_refcount(texture); - ok(refcount == 2, "Unexpected texture refcount %u.\n", refcount); + ok(refcount == 2, "Unexpected texture refcount %lu.\n", refcount);
hr = effect->lpVtbl->OnLostDevice(effect); - ok(hr == D3D_OK, "OnLostDevice() failed, hr %#x.\n", hr); + ok(hr == D3D_OK, "OnLostDevice() failed, hr %#lx.\n", hr); refcount = get_texture_refcount(texture); - ok(refcount == 1, "Unexpected texture refcount %u.\n", refcount); + ok(refcount == 1, "Unexpected texture refcount %lu.\n", refcount);
hr = IDirect3DDevice9_CreateTexture(device, 16, 16, 1, 0, D3DFMT_X8R8G8B8, D3DPOOL_MANAGED, &managed_texture, NULL); - ok(hr == D3D_OK, "Failed to create texture, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to create texture, hr %#lx.\n", hr); effect->lpVtbl->SetTexture(effect, "tex1", (IDirect3DBaseTexture9 *)managed_texture);
refcount = get_texture_refcount(managed_texture); - ok(refcount == 2, "Unexpected texture refcount %u.\n", refcount); + ok(refcount == 2, "Unexpected texture refcount %lu.\n", refcount); hr = effect->lpVtbl->OnLostDevice(effect); - ok(hr == D3D_OK, "OnLostDevice() failed, hr %#x.\n", hr); + ok(hr == D3D_OK, "OnLostDevice() failed, hr %#lx.\n", hr); refcount = get_texture_refcount(managed_texture); - ok(refcount == 2, "Unexpected texture refcount %u.\n", refcount); + ok(refcount == 2, "Unexpected texture refcount %lu.\n", refcount);
hr = IDirect3DDevice9_CreateTexture(device, 16, 16, 1, 0, D3DFMT_X8R8G8B8, D3DPOOL_SYSTEMMEM, &sysmem_texture, NULL); - ok(hr == D3D_OK, "Failed to create texture, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to create texture, hr %#lx.\n", hr); effect->lpVtbl->SetTexture(effect, "tex1", (IDirect3DBaseTexture9 *)sysmem_texture);
refcount = get_texture_refcount(managed_texture); - ok(refcount == 1, "Unexpected texture refcount %u.\n", refcount); + ok(refcount == 1, "Unexpected texture refcount %lu.\n", refcount); IDirect3DTexture9_Release(managed_texture); refcount = get_texture_refcount(sysmem_texture); - ok(refcount == 2, "Unexpected texture refcount %u.\n", refcount); + ok(refcount == 2, "Unexpected texture refcount %lu.\n", refcount); hr = effect->lpVtbl->OnLostDevice(effect); - ok(hr == D3D_OK, "OnLostDevice() failed, hr %#x.\n", hr); + ok(hr == D3D_OK, "OnLostDevice() failed, hr %#lx.\n", hr); refcount = get_texture_refcount(sysmem_texture); - ok(refcount == 2, "Unexpected texture refcount %u.\n", refcount); + ok(refcount == 2, "Unexpected texture refcount %lu.\n", refcount);
effect->lpVtbl->Release(effect);
refcount = get_texture_refcount(sysmem_texture); - ok(refcount == 1, "Unexpected texture refcount %u.\n", refcount); + ok(refcount == 1, "Unexpected texture refcount %lu.\n", refcount); IDirect3DTexture9_Release(sysmem_texture);
IDirect3DDevice9_GetTexture(device, 0, (IDirect3DBaseTexture9 **)&cur_texture); ok(cur_texture == texture, "Unexpected current texture %p.\n", cur_texture); IDirect3DTexture9_Release(cur_texture); refcount = get_texture_refcount(texture); - ok(refcount == 1, "Unexpected texture refcount %u.\n", refcount); + ok(refcount == 1, "Unexpected texture refcount %lu.\n", refcount); IDirect3DTexture9_Release(texture);
refcount = IDirect3DDevice9_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(window); }
@@ -8060,7 +8060,7 @@ static void test_create_effect_from_file(void) D3DCREATE_HARDWARE_VERTEXPROCESSING, &present_parameters, &device); if (FAILED(hr)) { - skip("Failed to create IDirect3DDevice9 object, hr %#x.\n", hr); + skip("Failed to create IDirect3DDevice9 object, hr %#lx.\n", hr); IDirect3D9_Release(d3d); DestroyWindow(window); return; @@ -8090,7 +8090,7 @@ static void test_create_effect_from_file(void) messages = NULL; hr = D3DXCreateEffectFromFileExW(device, filename_w, NULL, NULL, NULL, 0, NULL, &effect, &messages); - todo_wine ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr); + todo_wine ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr); if (messages) { trace("D3DXCreateEffectFromFileExW messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages)); @@ -8106,7 +8106,7 @@ static void test_create_effect_from_file(void) /* This is apparently broken on native, it ends up using the wrong include. */ hr = D3DXCreateEffectFromFileExW(device, filename_w, NULL, NULL, NULL, 0, NULL, &effect, &messages); - ok(hr == E_FAIL, "Unexpected error, hr %#x.\n", hr); + ok(hr == E_FAIL, "Unexpected error, hr %#lx.\n", hr); if (messages) { trace("D3DXCreateEffectFromFileExW messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages)); @@ -8131,7 +8131,7 @@ static void test_create_effect_from_file(void) * is "ID3DXEffectCompiler: There were no techniques" */ hr = D3DXCreateEffectFromFileExW(device, filename_w, NULL, &include.ID3DXInclude_iface, NULL, 0, NULL, &effect, &messages); - ok(hr == E_FAIL, "D3DXInclude test failed with error %#x.\n", hr); + ok(hr == E_FAIL, "D3DXInclude test failed with error %#lx.\n", hr); if (messages) { trace("D3DXCreateEffectFromFileExW messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages)); @@ -8139,7 +8139,7 @@ static void test_create_effect_from_file(void) }
refcount = IDirect3DDevice9_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); IDirect3D9_Release(d3d); DestroyWindow(window); } @@ -8206,7 +8206,7 @@ static void test_effect_find_next_valid_technique(void) D3DCREATE_HARDWARE_VERTEXPROCESSING, &present_parameters, &device); if (FAILED(hr)) { - skip("Failed to create IDirect3DDevice9 object, hr %#x.\n", hr); + skip("Failed to create IDirect3DDevice9 object, hr %#lx.\n", hr); IDirect3D9_Release(d3d); DestroyWindow(window); return; @@ -8214,81 +8214,81 @@ static void test_effect_find_next_valid_technique(void)
hr = D3DXCreateEffectEx(device, test_two_techniques_blob, sizeof(test_two_techniques_blob), NULL, NULL, NULL, 0, NULL, &effect, NULL); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->FindNextValidTechnique(effect, NULL, &tech); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->GetTechniqueDesc(effect, tech, &desc); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(!strcmp(desc.Name, "tech0"), "Got unexpected technique %s.\n", desc.Name);
hr = effect->lpVtbl->FindNextValidTechnique(effect, tech, &tech); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->GetTechniqueDesc(effect, tech, &desc); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(!strcmp(desc.Name, "tech1"), "Got unexpected technique %s.\n", desc.Name);
tech2 = tech; hr = effect->lpVtbl->FindNextValidTechnique(effect, tech, &tech2); - ok(hr == S_FALSE, "Got result %#x.\n", hr); + ok(hr == S_FALSE, "Got result %#lx.\n", hr); ok(!tech2, "Unexpected technique handle %p.\n", tech2); /* Test GetTechniqueDesc() with a NULL handle. */ hr = effect->lpVtbl->GetTechniqueDesc(effect, tech2, &desc); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(!strcmp(desc.Name, "tech0"), "Got unexpected technique %s.\n", desc.Name);
effect->lpVtbl->Release(effect);
hr = D3DXCreateEffectEx(device, test_effect_unsupported_shader_blob, sizeof(test_effect_unsupported_shader_blob), NULL, NULL, NULL, 0, NULL, &effect, NULL); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->FindNextValidTechnique(effect, NULL, &tech); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->GetTechniqueDesc(effect, tech, &desc); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(!strcmp(desc.Name, "tech1"), "Got unexpected technique %s.\n", desc.Name);
hr = effect->lpVtbl->FindNextValidTechnique(effect, tech, &tech2); - ok(hr == S_FALSE, "Got result %#x.\n", hr); + ok(hr == S_FALSE, "Got result %#lx.\n", hr); ok(!tech2, "Unexpected technique handle %p.\n", tech2); hr = effect->lpVtbl->GetTechniqueDesc(effect, tech2, &desc); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(!strcmp(desc.Name, "tech0"), "Got unexpected technique %s.\n", desc.Name);
hr = effect->lpVtbl->SetInt(effect, "i", 1); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
tech = (D3DXHANDLE)0xdeadbeef; hr = effect->lpVtbl->FindNextValidTechnique(effect, NULL, &tech); - ok(hr == S_FALSE, "Got result %#x.\n", hr); + ok(hr == S_FALSE, "Got result %#lx.\n", hr); hr = effect->lpVtbl->GetTechniqueDesc(effect, tech, &desc); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(!strcmp(desc.Name, "tech0"), "Got unexpected technique %s.\n", desc.Name);
hr = effect->lpVtbl->FindNextValidTechnique(effect, tech, &tech); - ok(hr == S_FALSE, "Got result %#x.\n", hr); + ok(hr == S_FALSE, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->SetInt(effect, "i", 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = effect->lpVtbl->FindNextValidTechnique(effect, tech, &tech); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->GetTechniqueDesc(effect, tech, &desc); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(!strcmp(desc.Name, "tech1"), "Got unexpected technique %s.\n", desc.Name);
hr = effect->lpVtbl->FindNextValidTechnique(effect, tech, &tech2); - ok(hr == S_FALSE, "Got result %#x.\n", hr); + ok(hr == S_FALSE, "Got result %#lx.\n", hr); ok(!tech2, "Unexpected technique handle %p.\n", tech2);
hr = effect->lpVtbl->FindNextValidTechnique(effect, "nope", &tech); - ok(hr == D3DERR_INVALIDCALL, "Got result %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got result %#lx.\n", hr);
effect->lpVtbl->Release(effect);
refcount = IDirect3DDevice9_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); IDirect3D9_Release(d3d); DestroyWindow(window); } @@ -8372,26 +8372,26 @@ static void test_effect_parameter_block(void) D3DCREATE_HARDWARE_VERTEXPROCESSING, &present_parameters, &device); if (FAILED(hr)) { - skip("Failed to create IDirect3DDevice9 object, hr %#x.\n", hr); + skip("Failed to create IDirect3DDevice9 object, hr %#lx.\n", hr); IDirect3D9_Release(d3d); DestroyWindow(window); return; }
hr = D3DXCreateEffectPool(&pool); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = D3DXCreateEffect(device, test_effect_preshader_effect_blob, sizeof(test_effect_preshader_effect_blob), NULL, NULL, 0, pool, &effect, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = D3DXCreateEffect(device, test_effect_preshader_effect_blob, sizeof(test_effect_preshader_effect_blob), NULL, NULL, 0, pool, &effect2, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = effect->lpVtbl->BeginParameterBlock(effect); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = effect->lpVtbl->BeginParameterBlock(effect); - ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr); block = effect->lpVtbl->EndParameterBlock(effect); ok(!!block, "Got unexpected block %p.\n", block); handle = effect->lpVtbl->EndParameterBlock(effect); @@ -8400,306 +8400,306 @@ static void test_effect_parameter_block(void) /* Block doesn't hold effect reference. */ effect->lpVtbl->AddRef(effect); refcount = effect->lpVtbl->Release(effect); - ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
hr = effect->lpVtbl->ApplyParameterBlock(effect, block); - ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr); hr = effect->lpVtbl->DeleteParameterBlock(effect, block); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->BeginParameterBlock(effect); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = effect->lpVtbl->SetFloat(effect, "vec3[0]", 1001.0f); - ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr); hr = effect->lpVtbl->SetFloat(effect, "arr1[0]", 91.0f); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); block = effect->lpVtbl->EndParameterBlock(effect); ok(!!block, "Got unexpected block %p.\n", block); hr = effect->lpVtbl->ApplyParameterBlock(effect, block); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = effect->lpVtbl->DeleteParameterBlock(effect2, block); - ok(hr == D3DERR_INVALIDCALL, "Got result %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got result %#lx.\n", hr); hr = effect->lpVtbl->DeleteParameterBlock(effect, block); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->ApplyParameterBlock(effect, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr); hr = effect->lpVtbl->ApplyParameterBlock(effect, "parameter_block"); - ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr);
hr = D3DXCreateTexture(device, D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, 0, D3DPOOL_DEFAULT, &texture); - ok(hr == D3D_OK, "Got result %#x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %#lx, expected 0 (D3D_OK).\n", hr);
hr = effect->lpVtbl->BeginParameterBlock(effect); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
/* Effect parameters are not updated during recording. */ hr = effect->lpVtbl->SetTexture(effect, "tex1", (IDirect3DBaseTexture9 *)texture); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = effect->lpVtbl->GetTexture(effect, "tex1", (IDirect3DBaseTexture9 **)&tex_test); - ok(hr == D3D_OK && !tex_test, "Got unexpected hr %#x, tex_test %p.\n", hr, tex_test); + ok(hr == D3D_OK && !tex_test, "Got unexpected hr %#lx, tex_test %p.\n", hr, tex_test);
/* Child parameters and array members are recorded separately (the whole * parameter is not updated when parameter block is applied). */ hr = effect->lpVtbl->SetFloat(effect, "arr2[0]", 92.0f); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = effect->lpVtbl->SetFloat(effect, "ts1[0].fv", 28.0f); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = effect->lpVtbl->GetFloat(effect, "ts1[0].fv", &float_value); - ok(hr == D3D_OK && float_value == 12.0, "Got unexpected hr %#x, float_value %g.\n", hr, float_value); + ok(hr == D3D_OK && float_value == 12.0, "Got unexpected hr %#lx, float_value %g.\n", hr, float_value);
float_array[0] = -29.0f; hr = effect->lpVtbl->SetFloatArray(effect, "ts1[0].v2", float_array, 1); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = effect->lpVtbl->GetFloatArray(effect, "ts1[0].v2", float_array, 1); - ok(hr == D3D_OK && float_array[0] == 13.0, "Got unexpected hr %#x, float_array[0] %g.\n", + ok(hr == D3D_OK && float_array[0] == 13.0, "Got unexpected hr %#lx, float_array[0] %g.\n", hr, float_array[0]);
memset(&mat, 0, sizeof(mat)); hr = effect->lpVtbl->SetMatrix(effect, "m3x2row", &test_mat); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = effect->lpVtbl->GetMatrix(effect, "m3x2row", &mat); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); ok(!memcmp(&mat, &effect_orig_mat, sizeof(mat)), "Got unexpected matrix.\n");
hr = effect->lpVtbl->SetMatrix(effect, "m3x2column", &test_mat); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = effect->lpVtbl->GetMatrix(effect, "m3x2column", &mat); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); ok(!memcmp(&mat, &effect_orig_mat, sizeof(mat)), "Got unexpected matrix.\n");
/* Setting shared parameter through effect2 is not recorded to effect * parameter block. */ hr = effect2->lpVtbl->SetFloat(effect2, "arr2[1]", -1.0f); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = effect->lpVtbl->GetFloat(effect, "arr2[1]", &float_value); ok(float_value == -1.0f, "Unexpected value %g.\n", float_value);
IDirect3DTexture9_AddRef(texture); refcount = IDirect3DTexture9_Release(texture); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount);
block = effect->lpVtbl->EndParameterBlock(effect); ok(!!block, "Got unexpected block %p.\n", block);
IDirect3DTexture9_AddRef(texture); refcount = IDirect3DTexture9_Release(texture); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount);
hr = effect->lpVtbl->DeleteParameterBlock(effect2, block); - ok(hr == D3DERR_INVALIDCALL, "Got result %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got result %#lx.\n", hr);
IDirect3DTexture9_AddRef(texture); refcount = IDirect3DTexture9_Release(texture); - ok(refcount == 2, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 2, "Got unexpected refcount %lu.\n", refcount);
hr = effect->lpVtbl->SetFloat(effect, "arr2[0]", 0.0f); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = effect->lpVtbl->SetFloat(effect, "arr2[1]", 0.0f); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = effect->lpVtbl->SetFloatArray(effect, "ts1[0].v1", float_array_zero, 3); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = effect->lpVtbl->SetFloat(effect, "ts1[0].fv", 0.0f); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = effect->lpVtbl->SetFloatArray(effect, "ts1[0].v2", float_array_zero, 4); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); memset(&mat, 0, sizeof(mat)); hr = effect->lpVtbl->SetMatrix(effect, "m3x2row", &mat); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = effect->lpVtbl->SetMatrix(effect, "m3x2column", &mat); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = effect->lpVtbl->ApplyParameterBlock(effect, block); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
IDirect3DTexture9_AddRef(texture); refcount = IDirect3DTexture9_Release(texture); - ok(refcount == 3, "Got unexpected refcount %u.\n", refcount); + ok(refcount == 3, "Got unexpected refcount %lu.\n", refcount);
hr = effect->lpVtbl->GetFloat(effect, "arr2[0]", &float_value); - ok(hr == D3D_OK && float_value == 92.0f, "Got unexpected hr %#x, float_value %g.\n", hr, float_value); + ok(hr == D3D_OK && float_value == 92.0f, "Got unexpected hr %#lx, float_value %g.\n", hr, float_value); hr = effect->lpVtbl->GetFloat(effect, "arr2[1]", &float_value); - ok(hr == D3D_OK && float_value == 0.0f, "Got unexpected hr %#x, float_value %g.\n", hr, float_value); + ok(hr == D3D_OK && float_value == 0.0f, "Got unexpected hr %#lx, float_value %g.\n", hr, float_value);
hr = effect->lpVtbl->GetFloatArray(effect, "ts1[0].v1", float_array, 3); ok(hr == D3D_OK && !memcmp(float_array, float_array_zero, 3 * sizeof(*float_array)), - "Got unexpected hr %#x, ts1[0].v1 (%g, %g, %g).\n", hr, + "Got unexpected hr %#lx, ts1[0].v1 (%g, %g, %g).\n", hr, float_array[0], float_array[1], float_array[2]);
hr = effect->lpVtbl->GetMatrix(effect, "m3x2row", &mat); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); ok(!memcmp(&mat, &test_mat, sizeof(mat)), "Got unexpected matrix.\n"); hr = effect->lpVtbl->GetMatrix(effect, "m3x2column", &mat); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); ok(!memcmp(&mat, &test_mat, sizeof(mat)), "Got unexpected matrix.\n");
hr = effect->lpVtbl->GetFloat(effect, "ts1[0].fv", &float_value); - ok(hr == D3D_OK && float_value == 28.0f, "Got unexpected hr %#x, float_value %g.\n", hr, float_value); + ok(hr == D3D_OK && float_value == 28.0f, "Got unexpected hr %#lx, float_value %g.\n", hr, float_value);
hr = effect->lpVtbl->GetFloatArray(effect, "ts1[0].v2", float_array, 4); ok(hr == D3D_OK && float_array[0] == -29.0f && !memcmp(float_array + 1, float_array_zero, 3 * sizeof(*float_array)), - "Got unexpected hr %#x, ts1[0].v2 (%g, %g, %g, %g).\n", hr, + "Got unexpected hr %#lx, ts1[0].v2 (%g, %g, %g, %g).\n", hr, float_array[0], float_array[1], float_array[2], float_array[3]);
/* Test applying a parameter block while recording a new one. */ hr = effect->lpVtbl->SetFloat(effect, "arr2[0]", 0.0f); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = effect->lpVtbl->SetFloat(effect, "arr2[1]", 0.0f); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = effect->lpVtbl->SetFloatArray(effect, "ts1[0].v1", float_array_zero, 3); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = effect->lpVtbl->SetFloat(effect, "ts1[0].fv", 0.0f); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = effect->lpVtbl->SetFloatArray(effect, "ts1[0].v2", float_array_zero, 4); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); memset(&mat, 0, sizeof(mat)); hr = effect->lpVtbl->SetMatrix(effect, "m3x2row", &effect_orig_mat); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = effect->lpVtbl->SetMatrix(effect, "m3x2column", &effect_orig_mat); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = effect->lpVtbl->BeginParameterBlock(effect); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = effect->lpVtbl->ApplyParameterBlock(effect, block); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = effect->lpVtbl->GetFloat(effect, "arr2[0]", &float_value); - ok(hr == D3D_OK && float_value == 0.0f, "Got unexpected hr %#x, float_value %g.\n", hr, float_value); + ok(hr == D3D_OK && float_value == 0.0f, "Got unexpected hr %#lx, float_value %g.\n", hr, float_value); hr = effect->lpVtbl->GetFloat(effect, "arr2[1]", &float_value); - ok(hr == D3D_OK && float_value == 0.0f, "Got unexpected hr %#x, float_value %g.\n", hr, float_value); + ok(hr == D3D_OK && float_value == 0.0f, "Got unexpected hr %#lx, float_value %g.\n", hr, float_value);
hr = effect->lpVtbl->GetFloatArray(effect, "ts1[0].v1", float_array, 3); ok(hr == D3D_OK && !memcmp(float_array, float_array_zero, 3 * sizeof(*float_array)), - "Got unexpected hr %#x, ts1[0].v1 (%g, %g, %g).\n", hr, + "Got unexpected hr %#lx, ts1[0].v1 (%g, %g, %g).\n", hr, float_array[0], float_array[1], float_array[2]);
hr = effect->lpVtbl->GetMatrix(effect, "m3x2row", &mat); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); ok(!memcmp(&mat, &effect_orig_mat, sizeof(mat)), "Got unexpected matrix.\n"); hr = effect->lpVtbl->GetMatrix(effect, "m3x2column", &mat); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); ok(!memcmp(&mat, &effect_orig_mat, sizeof(mat)), "Got unexpected matrix.\n");
hr = effect->lpVtbl->GetFloat(effect, "ts1[0].fv", &float_value); - ok(hr == D3D_OK && float_value == 0.0f, "Got unexpected hr %#x, float_value %g.\n", hr, float_value); + ok(hr == D3D_OK && float_value == 0.0f, "Got unexpected hr %#lx, float_value %g.\n", hr, float_value);
hr = effect->lpVtbl->GetFloatArray(effect, "ts1[0].v2", float_array, 4); ok(hr == D3D_OK && float_array[0] == 0.0f && !memcmp(float_array + 1, float_array_zero, 3 * sizeof(*float_array)), - "Got unexpected hr %#x, ts1[0].v2 (%g, %g, %g, %g).\n", hr, + "Got unexpected hr %#lx, ts1[0].v2 (%g, %g, %g, %g).\n", hr, float_array[0], float_array[1], float_array[2], float_array[3]);
block2 = effect->lpVtbl->EndParameterBlock(effect); ok(!!block2, "Got unexpected block %p.\n", block2);
hr = effect->lpVtbl->ApplyParameterBlock(effect, block2); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = effect->lpVtbl->GetFloat(effect, "arr2[0]", &float_value); - ok(hr == D3D_OK && float_value == 92.0f, "Got unexpected hr %#x, float_value %g.\n", hr, float_value); + ok(hr == D3D_OK && float_value == 92.0f, "Got unexpected hr %#lx, float_value %g.\n", hr, float_value); hr = effect->lpVtbl->GetFloat(effect, "arr2[1]", &float_value); - ok(hr == D3D_OK && float_value == 0.0f, "Got unexpected hr %#x, float_value %g.\n", hr, float_value); + ok(hr == D3D_OK && float_value == 0.0f, "Got unexpected hr %#lx, float_value %g.\n", hr, float_value);
hr = effect->lpVtbl->GetFloatArray(effect, "ts1[0].v1", float_array, 3); ok(hr == D3D_OK && !memcmp(float_array, float_array_zero, 3 * sizeof(*float_array)), - "Got unexpected hr %#x, ts1[0].v1 (%g, %g, %g).\n", hr, + "Got unexpected hr %#lx, ts1[0].v1 (%g, %g, %g).\n", hr, float_array[0], float_array[1], float_array[2]);
hr = effect->lpVtbl->GetMatrix(effect, "m3x2row", &mat); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); ok(!memcmp(&mat, &test_mat, sizeof(mat)), "Got unexpected matrix.\n"); hr = effect->lpVtbl->GetMatrix(effect, "m3x2column", &mat); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); ok(!memcmp(&mat, &test_mat, sizeof(mat)), "Got unexpected matrix.\n");
hr = effect->lpVtbl->GetFloat(effect, "ts1[0].fv", &float_value); - ok(hr == D3D_OK && float_value == 28.0f, "Got unexpected hr %#x, float_value %g.\n", hr, float_value); + ok(hr == D3D_OK && float_value == 28.0f, "Got unexpected hr %#lx, float_value %g.\n", hr, float_value);
hr = effect->lpVtbl->GetFloatArray(effect, "ts1[0].v2", float_array, 4); ok(hr == D3D_OK && float_array[0] == -29.0f && !memcmp(float_array + 1, float_array_zero, 3 * sizeof(*float_array)), - "Got unexpected hr %#x, ts1[0].v2 (%g, %g, %g, %g).\n", hr, + "Got unexpected hr %#lx, ts1[0].v2 (%g, %g, %g, %g).\n", hr, float_array[0], float_array[1], float_array[2], float_array[3]);
hr = effect->lpVtbl->DeleteParameterBlock(effect, block); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->DeleteParameterBlock(effect, block2); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->SetTexture(effect, "tex1", NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); refcount = IDirect3DTexture9_Release(texture); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
refcount = effect->lpVtbl->Release(effect); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
refcount = effect2->lpVtbl->Release(effect2); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
refcount = pool->lpVtbl->Release(pool); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
hr = D3DXCreateEffect(device, test_effect_parameter_value_blob_float, sizeof(test_effect_parameter_value_blob_float), NULL, NULL, 0, NULL, &effect, NULL); hr = effect->lpVtbl->BeginParameterBlock(effect); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); mat_arr[0] = mat_arr[1] = test_mat; hr = effect->lpVtbl->SetMatrixArray(effect, "f33_2", mat_arr, 2); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); block = effect->lpVtbl->EndParameterBlock(effect); ok(!!block, "Got unexpected block %p.\n", block);
memset(mat_arr, 0, sizeof(mat_arr)); hr = effect->lpVtbl->SetMatrixArray(effect, "f33_2", mat_arr, 2); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = effect->lpVtbl->ApplyParameterBlock(effect, block); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->GetMatrixArray(effect, "f33_2", mat_arr, 2); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); ok(!memcmp(&mat_arr[0], &test_mat, sizeof(test_mat)) && !memcmp(&mat_arr[1], &test_mat, sizeof(test_mat)), "Got unexpected matrix array.\n");
refcount = effect->lpVtbl->Release(effect); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
hr = D3DXCreateEffect(device, annotation_code, sizeof(annotation_code), NULL, NULL, 0, NULL, &effect, NULL); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr);
hr = effect->lpVtbl->GetFloat(effect, "f@a", &float_value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(float_value == 1.0f, "Got float %.8e.\n", float_value); hr = effect->lpVtbl->SetFloat(effect, "f@a", 2.0f); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->GetFloat(effect, "f@a", &float_value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(float_value == 2.0f, "Got float %.8e.\n", float_value);
hr = effect->lpVtbl->BeginParameterBlock(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->SetFloat(effect, "f@a", 3.0f); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->GetFloat(effect, "f@a", &float_value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(float_value == 2.0f, "Got float %.8e.\n", float_value); block = effect->lpVtbl->EndParameterBlock(effect); ok(!!block, "Got unexpected block %p.\n", block); hr = effect->lpVtbl->ApplyParameterBlock(effect, block); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); hr = effect->lpVtbl->GetFloat(effect, "f@a", &float_value); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Got result %#lx.\n", hr); ok(float_value == 3.0f, "Got float %.8e.\n", float_value);
refcount = effect->lpVtbl->Release(effect); - ok(!refcount, "Got unexpected refcount %u.\n", refcount); + ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
refcount = IDirect3DDevice9_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); IDirect3D9_Release(d3d); DestroyWindow(window); } @@ -8734,7 +8734,7 @@ START_TEST(effect) test_effect_skip_constants(device);
refcount = IDirect3DDevice9_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(wnd);
test_effect_unsupported_shader(); diff --git a/dlls/d3dx9_36/tests/line.c b/dlls/d3dx9_36/tests/line.c index d89ae160ba5..9eaa0c04ea9 100644 --- a/dlls/d3dx9_36/tests/line.c +++ b/dlls/d3dx9_36/tests/line.c @@ -68,13 +68,13 @@ static void test_create_line(IDirect3DDevice9* device) r11 = 0.1421; r12 = 0.2114; r13 = 0.8027; r14 = 0.4587;
hr = D3DXCreateLine(NULL, &line); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3D_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3D_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateLine(device, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3D_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3D_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateLine(device, &line); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
if (FAILED(hr)) { @@ -82,10 +82,10 @@ static void test_create_line(IDirect3DDevice9* device) }
hr = ID3DXLine_GetDevice(line, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3D_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3D_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = ID3DXLine_GetDevice(line, &return_device); - ok(hr == D3D_OK, "Got result %x, expected %x (D3D_OK)\n", hr, D3D_OK); + ok(hr == D3D_OK, "Got result %lx, expected %lx (D3D_OK)\n", hr, D3D_OK); ok(return_device == device, "Expected line device %p, got %p\n", device, return_device);
D3DXMatrixIdentity(&world); @@ -93,26 +93,26 @@ static void test_create_line(IDirect3DDevice9* device) S(U(world))._11 = r11; S(U(world))._12 = r12; S(U(world))._13 = r13; S(U(world))._14 = r14;
hr = IDirect3DDevice9_SetTransform(device, D3DTS_WORLD, &world); - ok(hr == D3D_OK, "Got result %x, expected %x (D3D_OK)\n", hr, D3D_OK); + ok(hr == D3D_OK, "Got result %lx, expected %lx (D3D_OK)\n", hr, D3D_OK);
hr = ID3DXLine_Begin(line); - ok(hr == D3D_OK, "Got result %x, expected %x (D3D_OK)\n", hr, D3D_OK); + ok(hr == D3D_OK, "Got result %lx, expected %lx (D3D_OK)\n", hr, D3D_OK);
hr = IDirect3DDevice9_GetTransform(device, D3DTS_WORLD, &result); - ok(hr == D3D_OK, "Got result %x, expected %x (D3D_OK)\n", hr, D3D_OK); + ok(hr == D3D_OK, "Got result %lx, expected %lx (D3D_OK)\n", hr, D3D_OK); expect_mat(&identity, &result);
hr = ID3DXLine_End(line); - ok(hr == D3D_OK, "Got result %x, expected %x (D3D_OK)\n", hr, D3D_OK); + ok(hr == D3D_OK, "Got result %lx, expected %lx (D3D_OK)\n", hr, D3D_OK);
hr = IDirect3DDevice9_GetTransform(device, D3DTS_WORLD, &result); - ok(hr == D3D_OK, "Got result %x, expected %x (D3D_OK)\n", hr, D3D_OK); + ok(hr == D3D_OK, "Got result %lx, expected %lx (D3D_OK)\n", hr, D3D_OK); expect_mat(&world, &result);
IDirect3DDevice9_Release(return_device);
ref = ID3DXLine_Release(line); - ok(ref == 0, "Got %x references to line %p, expected 0\n", ref, line); + ok(ref == 0, "Got %lx references to line %p, expected 0\n", ref, line); }
static void test_line_width(IDirect3DDevice9* device) @@ -123,28 +123,28 @@ static void test_line_width(IDirect3DDevice9* device) HRESULT hr;
hr = D3DXCreateLine(device, &line); - ok(hr == D3D_OK, "Failed to create a line, hr %#x.\n", hr); + ok(hr == D3D_OK, "Failed to create a line, hr %#lx.\n", hr);
width = ID3DXLine_GetWidth(line); ok(width == 1.0f, "Unexpected line width %.8e.\n", width);
hr = ID3DXLine_SetWidth(line, 0.0f); - ok(hr == D3DERR_INVALIDCALL, "Unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Unexpected hr %#lx.\n", hr); width = ID3DXLine_GetWidth(line); ok(width == 1.0f, "Unexpected line width %.8e.\n", width);
hr = ID3DXLine_SetWidth(line, -1.0f); - ok(hr == D3DERR_INVALIDCALL, "Unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Unexpected hr %#lx.\n", hr); width = ID3DXLine_GetWidth(line); ok(width == 1.0f, "Unexpected line width %.8e.\n", width);
hr = ID3DXLine_SetWidth(line, 10.0f); - ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr); width = ID3DXLine_GetWidth(line); ok(width == 10.0f, "Unexpected line width %.8e.\n", width);
refcount = ID3DXLine_Release(line); - ok(!refcount, "Got %u references to line.\n", refcount); + ok(!refcount, "Got %lu references to line.\n", refcount); }
START_TEST(line) @@ -173,7 +173,7 @@ START_TEST(line) d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD; hr = IDirect3D9_CreateDevice(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, wnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &device); if (FAILED(hr)) { - skip("Failed to create IDirect3DDevice9 object %#x\n", hr); + skip("Failed to create IDirect3DDevice9 object %#lx\n", hr); IDirect3D9_Release(d3d); DestroyWindow(wnd); return; diff --git a/dlls/d3dx9_36/tests/math.c b/dlls/d3dx9_36/tests/math.c index 564e61040e7..8f4af067bc7 100644 --- a/dlls/d3dx9_36/tests/math.c +++ b/dlls/d3dx9_36/tests/math.c @@ -2492,60 +2492,60 @@ static void test_matrix_stack(void) }}};
hr = D3DXCreateMatrixStack(0, &stack); - ok(SUCCEEDED(hr), "Failed to create a matrix stack, hr %#x\n", hr); + ok(SUCCEEDED(hr), "Failed to create a matrix stack, hr %#lx\n", hr); if (FAILED(hr)) return;
ok(D3DXMatrixIsIdentity(ID3DXMatrixStack_GetTop(stack)), "The top of an empty matrix stack should be an identity matrix\n");
hr = ID3DXMatrixStack_Pop(stack); - ok(SUCCEEDED(hr), "Pop failed, hr %#x\n", hr); + ok(SUCCEEDED(hr), "Pop failed, hr %#lx\n", hr);
hr = ID3DXMatrixStack_Push(stack); - ok(SUCCEEDED(hr), "Push failed, hr %#x\n", hr); + ok(SUCCEEDED(hr), "Push failed, hr %#lx\n", hr); ok(D3DXMatrixIsIdentity(ID3DXMatrixStack_GetTop(stack)), "The top should be an identity matrix\n");
hr = ID3DXMatrixStack_Push(stack); - ok(SUCCEEDED(hr), "Push failed, hr %#x\n", hr); + ok(SUCCEEDED(hr), "Push failed, hr %#lx\n", hr);
hr = ID3DXMatrixStack_LoadMatrix(stack, &mat1); - ok(SUCCEEDED(hr), "LoadMatrix failed, hr %#x\n", hr); + ok(SUCCEEDED(hr), "LoadMatrix failed, hr %#lx\n", hr); expect_matrix(&mat1, ID3DXMatrixStack_GetTop(stack), 0);
hr = ID3DXMatrixStack_Push(stack); - ok(SUCCEEDED(hr), "Push failed, hr %#x\n", hr); + ok(SUCCEEDED(hr), "Push failed, hr %#lx\n", hr); expect_matrix(&mat1, ID3DXMatrixStack_GetTop(stack), 0);
hr = ID3DXMatrixStack_LoadMatrix(stack, &mat2); - ok(SUCCEEDED(hr), "LoadMatrix failed, hr %#x\n", hr); + ok(SUCCEEDED(hr), "LoadMatrix failed, hr %#lx\n", hr); expect_matrix(&mat2, ID3DXMatrixStack_GetTop(stack), 0);
hr = ID3DXMatrixStack_Push(stack); - ok(SUCCEEDED(hr), "Push failed, hr %#x\n", hr); + ok(SUCCEEDED(hr), "Push failed, hr %#lx\n", hr); expect_matrix(&mat2, ID3DXMatrixStack_GetTop(stack), 0);
hr = ID3DXMatrixStack_LoadIdentity(stack); - ok(SUCCEEDED(hr), "LoadIdentity failed, hr %#x\n", hr); + ok(SUCCEEDED(hr), "LoadIdentity failed, hr %#lx\n", hr); ok(D3DXMatrixIsIdentity(ID3DXMatrixStack_GetTop(stack)), "The top should be an identity matrix\n");
hr = ID3DXMatrixStack_Pop(stack); - ok(SUCCEEDED(hr), "Pop failed, hr %#x\n", hr); + ok(SUCCEEDED(hr), "Pop failed, hr %#lx\n", hr); expect_matrix(&mat2, ID3DXMatrixStack_GetTop(stack), 0);
hr = ID3DXMatrixStack_Pop(stack); - ok(SUCCEEDED(hr), "Pop failed, hr %#x\n", hr); + ok(SUCCEEDED(hr), "Pop failed, hr %#lx\n", hr); expect_matrix(&mat1, ID3DXMatrixStack_GetTop(stack), 0);
hr = ID3DXMatrixStack_Pop(stack); - ok(SUCCEEDED(hr), "Pop failed, hr %#x\n", hr); + ok(SUCCEEDED(hr), "Pop failed, hr %#lx\n", hr); ok(D3DXMatrixIsIdentity(ID3DXMatrixStack_GetTop(stack)), "The top should be an identity matrix\n");
hr = ID3DXMatrixStack_Pop(stack); - ok(SUCCEEDED(hr), "Pop failed, hr %#x\n", hr); + ok(SUCCEEDED(hr), "Pop failed, hr %#lx\n", hr); ok(D3DXMatrixIsIdentity(ID3DXMatrixStack_GetTop(stack)), "The top should be an identity matrix\n");
refcount = ID3DXMatrixStack_Release(stack); - ok(!refcount, "Matrix stack has %u references left.\n", refcount); + ok(!refcount, "Matrix stack has %lu references left.\n", refcount); }
static void test_Matrix_AffineTransformation2D(void) @@ -2997,7 +2997,7 @@ static void test_Matrix_Decompose(void) U(pm).m[3][3] = 1.0f;
hr = D3DXMatrixDecompose(&got_scale, &got_rotation, &got_translation, &pm); - ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %x\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %lx\n", hr); }
static void test_Matrix_Transformation2D(void) @@ -3327,12 +3327,12 @@ static void test_D3DXFloat_Array(void) out = D3DXFloat16To32Array(&single.f, (D3DXFLOAT16 *)&testdata[i].half_ver1, 1); ok(out == &single.f, "Got %p, expected %p.\n", out, &single.f); equal = compare_float(single.f, testdata[i].single_out_ver1.f, 0); - ok(equal, "Got %#x, expected %#x at index %u.\n", single.d, testdata[i].single_out_ver1.d, i); + ok(equal, "Got %#lx, expected %#lx at index %u.\n", single.d, testdata[i].single_out_ver1.d, i);
out = D3DXFloat16To32Array(&single.f, (D3DXFLOAT16 *)&testdata[i].half_ver2, 1); ok(out == &single.f, "Got %p, expected %p.\n", out, &single.f); equal = compare_float(single.f, testdata[i].single_out_ver2.f, 0); - ok(equal, "Got %#x, expected %#x at index %u.\n", single.d, testdata[i].single_out_ver2.d, i); + ok(equal, "Got %#lx, expected %#lx at index %u.\n", single.d, testdata[i].single_out_ver2.d, i); } }
@@ -3497,7 +3497,7 @@ static void test_D3DXSHEvalConeLight(void) }
hr = D3DXSHEvalConeLight(order, &dir, test[l].radius, 1.7f, 2.6f, 3.5f, test[l].red_received, test[l].green_received, test[l].blue_received); - ok(hr == D3D_OK, "Expected %#x, got %#x\n", D3D_OK, hr); + ok(hr == D3D_OK, "Expected %#lx, got %#lx\n", D3D_OK, hr);
for (j = 0; j < 49; j++) { @@ -3550,7 +3550,7 @@ static void test_D3DXSHEvalConeLight(void) }
hr = D3DXSHEvalConeLight(order, &dir, -0.1f, 1.7f, 2.6f, 3.5f, rout, gout, bout); - ok(hr == D3D_OK, "Expected %#x, got %#x\n", D3D_OK, hr); + ok(hr == D3D_OK, "Expected %#lx, got %#lx\n", D3D_OK, hr); D3DXSHEvalDirectionalLight(order, &dir, 1.7f, 2.6f, 3.5f, red, green, blue);
for (j = 0; j < 49; j++) @@ -3571,11 +3571,11 @@ static void test_D3DXSHEvalConeLight(void)
/* D3DXSHEvalConeLight accepts order < D3DXSH_MINORDER or order > D3DXSH_MAXORDER. But tests in native windows show that the colour outputs are not set */ hr = D3DXSHEvalConeLight(7, &dir, 0.5f, 1.0f, 2.0f, 3.0f, rout, gout, bout); - ok(hr == D3D_OK, "Expected %#x, got %#x\n", D3D_OK, hr); + ok(hr == D3D_OK, "Expected %#lx, got %#lx\n", D3D_OK, hr); hr = D3DXSHEvalConeLight(0, &dir, 0.5f, 1.0f, 2.0f, 3.0f, rout, gout, bout); - ok(hr == D3D_OK, "Expected %#x, got %#x\n", D3D_OK, hr); + ok(hr == D3D_OK, "Expected %#lx, got %#lx\n", D3D_OK, hr); hr = D3DXSHEvalConeLight(1, &dir, 0.5f, 1.0f, 2.0f, 3.0f, rout, gout, bout); - ok(hr == D3D_OK, "Expected %#x, got %#x\n", D3D_OK, hr); + ok(hr == D3D_OK, "Expected %#lx, got %#lx\n", D3D_OK, hr); }
static void test_D3DXSHEvalDirection(void) @@ -3721,7 +3721,7 @@ static void test_D3DXSHEvalDirectionalLight(void) }
hr = D3DXSHEvalDirectionalLight(order, &dir, 1.7f, 2.6f, 3.5f, red_out, green_out, blue_out); - ok(hr == D3D_OK, "Expected %#x, got %#x\n", D3D_OK, hr); + ok(hr == D3D_OK, "Expected %#lx, got %#lx\n", D3D_OK, hr);
for (j = 0; j < ARRAY_SIZE(rout); ++j) { @@ -3762,11 +3762,11 @@ static void test_D3DXSHEvalDirectionalLight(void)
/* D3DXSHEvalDirectionalLight accepts order < D3DXSH_MINORDER or order > D3DXSH_MAXORDER. But tests in native windows show that the colour outputs are not set*/ hr = D3DXSHEvalDirectionalLight(7, &dir, 1.0f, 2.0f, 3.0f, rout, gout, bout); - ok(hr == D3D_OK, "Expected %#x, got %#x\n", D3D_OK, hr); + ok(hr == D3D_OK, "Expected %#lx, got %#lx\n", D3D_OK, hr); hr = D3DXSHEvalDirectionalLight(0, &dir, 1.0f, 2.0f, 3.0f, rout, gout, bout); - ok(hr == D3D_OK, "Expected %#x, got %#x\n", D3D_OK, hr); + ok(hr == D3D_OK, "Expected %#lx, got %#lx\n", D3D_OK, hr); hr = D3DXSHEvalDirectionalLight(1, &dir, 1.0f, 2.0f, 3.0f, rout, gout, bout); - ok(hr == D3D_OK, "Expected %#x, got %#x\n", D3D_OK, hr); + ok(hr == D3D_OK, "Expected %#lx, got %#lx\n", D3D_OK, hr); }
static void test_D3DXSHEvalHemisphereLight(void) @@ -3823,7 +3823,7 @@ static void test_D3DXSHEvalHemisphereLight(void) }
hr = D3DXSHEvalHemisphereLight(order, &dir, top, bottom, test[l].red_received, test[l].green_received, test[l].blue_received); - ok(hr == D3D_OK, "Expected %#x, got %#x\n", D3D_OK, hr); + ok(hr == D3D_OK, "Expected %#lx, got %#lx\n", D3D_OK, hr);
for (j = 0; j < 49; j++) { @@ -3977,7 +3977,7 @@ static void test_D3DXSHEvalSphericalLight(void) }
hr = D3DXSHEvalSphericalLight(order, &dir, test[l].radius, 1.7f, 2.6f, 3.5f, test[l].red_received, test[l].green_received, test[l].blue_received); - ok(hr == D3D_OK, "Expected %#x, got %#x\n", D3D_OK, hr); + ok(hr == D3D_OK, "Expected %#lx, got %#lx\n", D3D_OK, hr);
for (j = 0; j < 49; j++) { @@ -4019,11 +4019,11 @@ static void test_D3DXSHEvalSphericalLight(void)
/* D3DXSHEvalSphericalLight accepts order < D3DXSH_MINORDER or order > D3DXSH_MAXORDER. But tests in native windows show that the colour outputs are not set */ hr = D3DXSHEvalSphericalLight(7, &dir, 17.4f, 1.0f, 2.0f, 3.0f, rout, gout, bout); - ok(hr == D3D_OK, "Expected %#x, got %#x\n", D3D_OK, hr); + ok(hr == D3D_OK, "Expected %#lx, got %#lx\n", D3D_OK, hr); hr = D3DXSHEvalSphericalLight(0, &dir, 17.4f, 1.0f, 2.0f, 3.0f, rout, gout, bout); - ok(hr == D3D_OK, "Expected %#x, got %#x\n", D3D_OK, hr); + ok(hr == D3D_OK, "Expected %#lx, got %#lx\n", D3D_OK, hr); hr = D3DXSHEvalSphericalLight(1, &dir, 17.4f, 1.0f, 2.0f, 3.0f, rout, gout, bout); - ok(hr == D3D_OK, "Expected %#x, got %#x\n", D3D_OK, hr); + ok(hr == D3D_OK, "Expected %#lx, got %#lx\n", D3D_OK, hr); }
static void test_D3DXSHMultiply2(void) @@ -4499,12 +4499,12 @@ static void test_D3DXSHProjectCubeMap(void) winetest_pop_context(); continue; } - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
for (face = 0; face < 6; ++face) { hr = IDirect3DCubeTexture9_LockRect(texture, face, 0, &map_desc, NULL, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
for (y = 0; y < 8; ++y) { @@ -4515,32 +4515,32 @@ static void test_D3DXSHProjectCubeMap(void) }
hr = IDirect3DCubeTexture9_UnlockRect(texture, face, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
for (level = 1; level < 4; ++level) { hr = IDirect3DCubeTexture9_LockRect(texture, face, level, &map_desc, NULL, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); memset(map_desc.pBits, 0xcc, (8 >> level) * map_desc.Pitch); hr = IDirect3DCubeTexture9_UnlockRect(texture, face, level); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); } }
hr = D3DXSHProjectCubeMap(1, texture, red, green, blue); - ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr);
hr = D3DXSHProjectCubeMap(7, texture, red, green, blue); - ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr);
hr = D3DXSHProjectCubeMap(2, NULL, red, green, blue); - ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr);
memset(red, 0, sizeof(red)); memset(green, 0, sizeof(green)); memset(blue, 0, sizeof(blue)); hr = D3DXSHProjectCubeMap(2, texture, red, green, blue); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
for (j = 0; j < 4; ++j) { @@ -4553,13 +4553,13 @@ static void test_D3DXSHProjectCubeMap(void) }
hr = D3DXSHProjectCubeMap(2, texture, red, NULL, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = D3DXSHProjectCubeMap(2, texture, NULL, green, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr);
hr = D3DXSHProjectCubeMap(2, texture, NULL, NULL, blue); - ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr);
IDirect3DCubeTexture9_Release(texture);
@@ -4567,7 +4567,7 @@ static void test_D3DXSHProjectCubeMap(void) }
refcount = IDirect3DDevice9_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); IDirect3D9_Release(d3d); DestroyWindow(window); } diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c index 3274b2d38bc..ff182c8ba99 100644 --- a/dlls/d3dx9_36/tests/mesh.c +++ b/dlls/d3dx9_36/tests/mesh.c @@ -138,7 +138,7 @@ static struct test_context *new_test_context(void) D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &device); if (FAILED(hr)) { - skip("Couldn't create IDirect3DDevice9 object %#x\n", hr); + skip("Couldn't create IDirect3DDevice9 object %#lx\n", hr); goto error; }
@@ -235,16 +235,16 @@ static void compare_mesh(const char *name, ID3DXMesh *d3dxmesh, struct mesh *mes int expected, i;
number_of_vertices = d3dxmesh->lpVtbl->GetNumVertices(d3dxmesh); - ok(number_of_vertices == mesh->number_of_vertices, "Test %s, result %u, expected %d\n", + ok(number_of_vertices == mesh->number_of_vertices, "Test %s, result %lu, expected %ld\n", name, number_of_vertices, mesh->number_of_vertices);
number_of_faces = d3dxmesh->lpVtbl->GetNumFaces(d3dxmesh); - ok(number_of_faces == mesh->number_of_faces, "Test %s, result %u, expected %d\n", + ok(number_of_faces == mesh->number_of_faces, "Test %s, result %lu, expected %ld\n", name, number_of_faces, mesh->number_of_faces);
/* vertex buffer */ hr = d3dxmesh->lpVtbl->GetVertexBuffer(d3dxmesh, &vertex_buffer); - ok(hr == D3D_OK, "Test %s, result %x, expected 0 (D3D_OK)\n", name, hr); + ok(hr == D3D_OK, "Test %s, result %lx, expected 0 (D3D_OK)\n", name, hr);
if (hr != D3D_OK) { @@ -253,7 +253,7 @@ static void compare_mesh(const char *name, ID3DXMesh *d3dxmesh, struct mesh *mes else { hr = IDirect3DVertexBuffer9_GetDesc(vertex_buffer, &vertex_buffer_description); - ok(hr == D3D_OK, "Test %s, result %x, expected 0 (D3D_OK)\n", name, hr); + ok(hr == D3D_OK, "Test %s, result %lx, expected 0 (D3D_OK)\n", name, hr);
if (hr != D3D_OK) { @@ -265,10 +265,10 @@ static void compare_mesh(const char *name, ID3DXMesh *d3dxmesh, struct mesh *mes name, vertex_buffer_description.Format, D3DFMT_VERTEXDATA); ok(vertex_buffer_description.Type == D3DRTYPE_VERTEXBUFFER, "Test %s, result %x, expected %x (D3DRTYPE_VERTEXBUFFER)\n", name, vertex_buffer_description.Type, D3DRTYPE_VERTEXBUFFER); - ok(vertex_buffer_description.Usage == 0, "Test %s, result %x, expected %x\n", name, vertex_buffer_description.Usage, 0); + ok(vertex_buffer_description.Usage == 0, "Test %s, result %lx, expected %x\n", name, vertex_buffer_description.Usage, 0); ok(vertex_buffer_description.Pool == D3DPOOL_MANAGED, "Test %s, result %x, expected %x (D3DPOOL_MANAGED)\n", name, vertex_buffer_description.Pool, D3DPOOL_MANAGED); - ok(vertex_buffer_description.FVF == mesh->fvf, "Test %s, result %x, expected %x\n", + ok(vertex_buffer_description.FVF == mesh->fvf, "Test %s, result %lx, expected %lx\n", name, vertex_buffer_description.FVF, mesh->fvf); if (mesh->fvf == 0) { @@ -285,7 +285,7 @@ static void compare_mesh(const char *name, ID3DXMesh *d3dxmesh, struct mesh *mes /* specify offset and size to avoid potential overruns */ hr = IDirect3DVertexBuffer9_Lock(vertex_buffer, 0, number_of_vertices * sizeof(D3DXVECTOR3) * 2, (void **)&vertices, D3DLOCK_DISCARD); - ok(hr == D3D_OK, "Test %s, result %x, expected 0 (D3D_OK)\n", name, hr); + ok(hr == D3D_OK, "Test %s, result %lx, expected 0 (D3D_OK)\n", name, hr);
if (hr != D3D_OK) { @@ -313,7 +313,7 @@ static void compare_mesh(const char *name, ID3DXMesh *d3dxmesh, struct mesh *mes
/* index buffer */ hr = d3dxmesh->lpVtbl->GetIndexBuffer(d3dxmesh, &index_buffer); - ok(hr == D3D_OK, "Test %s, result %x, expected 0 (D3D_OK)\n", name, hr); + ok(hr == D3D_OK, "Test %s, result %lx, expected 0 (D3D_OK)\n", name, hr);
if (!index_buffer) { @@ -322,7 +322,7 @@ static void compare_mesh(const char *name, ID3DXMesh *d3dxmesh, struct mesh *mes else { hr = IDirect3DIndexBuffer9_GetDesc(index_buffer, &index_buffer_description); - ok(hr == D3D_OK, "Test %s, result %x, expected 0 (D3D_OK)\n", name, hr); + ok(hr == D3D_OK, "Test %s, result %lx, expected 0 (D3D_OK)\n", name, hr);
if (hr != D3D_OK) { @@ -334,7 +334,7 @@ static void compare_mesh(const char *name, ID3DXMesh *d3dxmesh, struct mesh *mes name, index_buffer_description.Format, D3DFMT_INDEX16); ok(index_buffer_description.Type == D3DRTYPE_INDEXBUFFER, "Test %s, result %x, expected %x (D3DRTYPE_INDEXBUFFER)\n", name, index_buffer_description.Type, D3DRTYPE_INDEXBUFFER); - ok(index_buffer_description.Usage == 0, "Test %s, result %#x, expected %#x.\n", + ok(index_buffer_description.Usage == 0, "Test %s, result %#lx, expected %#x.\n", name, index_buffer_description.Usage, 0); ok(index_buffer_description.Pool == D3DPOOL_MANAGED, "Test %s, result %x, expected %x (D3DPOOL_MANAGED)\n", name, index_buffer_description.Pool, D3DPOOL_MANAGED); @@ -346,7 +346,7 @@ static void compare_mesh(const char *name, ID3DXMesh *d3dxmesh, struct mesh *mes /* specify offset and size to avoid potential overruns */ hr = IDirect3DIndexBuffer9_Lock(index_buffer, 0, number_of_faces * sizeof(WORD) * 3, (void **)&faces, D3DLOCK_DISCARD); - ok(hr == D3D_OK, "Test %s, result %x, expected 0 (D3D_OK)\n", name, hr); + ok(hr == D3D_OK, "Test %s, result %lx, expected 0 (D3D_OK)\n", name, hr);
if (hr != D3D_OK) { @@ -479,7 +479,7 @@ static void D3DXComputeBoundingBoxTest(void)
hr = D3DXComputeBoundingBox(&vertex[3],2,D3DXGetFVFVertexSize(D3DFVF_XYZ),&got_min,&got_max);
- ok( hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); + ok( hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr); ok( compare_vec3(exp_min,got_min), "Expected min: (%f, %f, %f), got: (%f, %f, %f)\n", exp_min.x,exp_min.y,exp_min.z,got_min.x,got_min.y,got_min.z); ok( compare_vec3(exp_max,got_max), "Expected max: (%f, %f, %f), got: (%f, %f, %f)\n", exp_max.x,exp_max.y,exp_max.z,got_max.x,got_max.y,got_max.z);
@@ -496,7 +496,7 @@ static void D3DXComputeBoundingBoxTest(void)
hr = D3DXComputeBoundingBox(&vertex[0],5,D3DXGetFVFVertexSize(D3DFVF_XYZ),&got_min,&got_max);
- ok( hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); + ok( hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr); ok( compare_vec3(exp_min,got_min), "Expected min: (%f, %f, %f), got: (%f, %f, %f)\n", exp_min.x,exp_min.y,exp_min.z,got_min.x,got_min.y,got_min.z); ok( compare_vec3(exp_max,got_max), "Expected max: (%f, %f, %f), got: (%f, %f, %f)\n", exp_max.x,exp_max.y,exp_max.z,got_max.x,got_max.y,got_max.z);
@@ -513,21 +513,21 @@ static void D3DXComputeBoundingBoxTest(void)
hr = D3DXComputeBoundingBox(&vertex[0],4,D3DXGetFVFVertexSize(D3DFVF_XYZ),&got_min,&got_max);
- ok( hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); + ok( hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr); ok( compare_vec3(exp_min,got_min), "Expected min: (%f, %f, %f), got: (%f, %f, %f)\n", exp_min.x,exp_min.y,exp_min.z,got_min.x,got_min.y,got_min.z); ok( compare_vec3(exp_max,got_max), "Expected max: (%f, %f, %f), got: (%f, %f, %f)\n", exp_max.x,exp_max.y,exp_max.z,got_max.x,got_max.y,got_max.z);
/*________________________*/ hr = D3DXComputeBoundingBox(NULL,5,D3DXGetFVFVertexSize(D3DFVF_XYZ),&got_min,&got_max); - ok( hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#x\n", hr); + ok( hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#lx\n", hr);
/*________________________*/ hr = D3DXComputeBoundingBox(&vertex[3],5,D3DXGetFVFVertexSize(D3DFVF_XYZ),NULL,&got_max); - ok( hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#x\n", hr); + ok( hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#lx\n", hr);
/*________________________*/ hr = D3DXComputeBoundingBox(&vertex[3],5,D3DXGetFVFVertexSize(D3DFVF_XYZ),&got_min,NULL); - ok( hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#x\n", hr); + ok( hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#lx\n", hr); }
static void D3DXComputeBoundingSphereTest(void) @@ -547,7 +547,7 @@ static void D3DXComputeBoundingSphereTest(void)
hr = D3DXComputeBoundingSphere(&vertex[3],2,D3DXGetFVFVertexSize(D3DFVF_XYZ),&got_cen,&got_rad);
- ok( hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); + ok( hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr); ok( compare(exp_rad, got_rad), "Expected radius: %f, got radius: %f\n", exp_rad, got_rad); ok( compare_vec3(exp_cen,got_cen), "Expected center: (%f, %f, %f), got center: (%f, %f, %f)\n", exp_cen.x,exp_cen.y,exp_cen.z,got_cen.x,got_cen.y,got_cen.z);
@@ -564,21 +564,21 @@ static void D3DXComputeBoundingSphereTest(void)
hr = D3DXComputeBoundingSphere(&vertex[0],5,D3DXGetFVFVertexSize(D3DFVF_XYZ),&got_cen,&got_rad);
- ok( hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); + ok( hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr); ok( compare(exp_rad, got_rad), "Expected radius: %f, got radius: %f\n", exp_rad, got_rad); ok( compare_vec3(exp_cen,got_cen), "Expected center: (%f, %f, %f), got center: (%f, %f, %f)\n", exp_cen.x,exp_cen.y,exp_cen.z,got_cen.x,got_cen.y,got_cen.z);
/*________________________*/ hr = D3DXComputeBoundingSphere(NULL,5,D3DXGetFVFVertexSize(D3DFVF_XYZ),&got_cen,&got_rad); - ok( hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#x\n", hr); + ok( hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#lx\n", hr);
/*________________________*/ hr = D3DXComputeBoundingSphere(&vertex[3],5,D3DXGetFVFVertexSize(D3DFVF_XYZ),NULL,&got_rad); - ok( hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#x\n", hr); + ok( hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#lx\n", hr);
/*________________________*/ hr = D3DXComputeBoundingSphere(&vertex[3],5,D3DXGetFVFVertexSize(D3DFVF_XYZ),&got_cen,NULL); - ok( hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#x\n", hr); + ok( hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#lx\n", hr); }
static void print_elements(const D3DVERTEXELEMENT9 *elements) @@ -638,7 +638,7 @@ static void test_fvf_to_decl(DWORD test_fvf, const D3DVERTEXELEMENT9 expected_el
hr = D3DXDeclaratorFromFVF(test_fvf, decl); ok(hr == expected_hr, - "Line %u, test %u: D3DXDeclaratorFromFVF returned %#x, expected %#x.\n", + "Line %u, test %u: D3DXDeclaratorFromFVF returned %#lx, expected %#lx.\n", line, test_id, hr, expected_hr); if (SUCCEEDED(hr)) compare_elements(decl, expected_elements, line, test_id); } @@ -651,11 +651,11 @@ static void test_decl_to_fvf(const D3DVERTEXELEMENT9 *decl, DWORD expected_fvf,
hr = D3DXFVFFromDeclarator(decl, &result_fvf); ok(hr == expected_hr, - "Line %u, test %u: D3DXFVFFromDeclarator returned %#x, expected %#x.\n", + "Line %u, test %u: D3DXFVFFromDeclarator returned %#lx, expected %#lx.\n", line, test_id, hr, expected_hr); if (SUCCEEDED(hr)) { - ok(expected_fvf == result_fvf, "Line %u, test %u: Got FVF %#x, expected %#x.\n", + ok(expected_fvf == result_fvf, "Line %u, test %u: Got FVF %#lx, expected %#lx.\n", line, test_id, result_fvf, expected_fvf); } } @@ -1227,10 +1227,10 @@ static void D3DXCreateMeshTest(void) };
hr = D3DXCreateMesh(0, 0, 0, NULL, NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateMesh(1, 3, D3DXMESH_MANAGED, decl1, NULL, &d3dxmesh); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
test_context = new_test_context(); if (!test_context) @@ -1241,13 +1241,13 @@ static void D3DXCreateMeshTest(void) device = test_context->device;
hr = D3DXCreateMesh(0, 3, D3DXMESH_MANAGED, decl1, device, &d3dxmesh); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateMesh(1, 0, D3DXMESH_MANAGED, decl1, device, &d3dxmesh); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateMesh(1, 3, 0, decl1, device, &d3dxmesh); - ok(hr == D3D_OK, "Got result %x, expected %x (D3D_OK)\n", hr, D3D_OK); + ok(hr == D3D_OK, "Got result %lx, expected %lx (D3D_OK)\n", hr, D3D_OK);
if (hr == D3D_OK) { @@ -1255,22 +1255,22 @@ static void D3DXCreateMeshTest(void) }
hr = D3DXCreateMesh(1, 3, D3DXMESH_MANAGED, 0, device, &d3dxmesh); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateMesh(1, 3, D3DXMESH_MANAGED, decl1, device, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateMesh(1, 3, D3DXMESH_MANAGED, decl1, device, &d3dxmesh); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
if (hr == D3D_OK) { /* device */ hr = d3dxmesh->lpVtbl->GetDevice(d3dxmesh, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = d3dxmesh->lpVtbl->GetDevice(d3dxmesh, &test_device); - ok(hr == D3D_OK, "Got result %x, expected %x (D3D_OK)\n", hr, D3D_OK); + ok(hr == D3D_OK, "Got result %lx, expected %lx (D3D_OK)\n", hr, D3D_OK); ok(test_device == device, "Got result %p, expected %p\n", test_device, device);
if (hr == D3D_OK) @@ -1280,10 +1280,10 @@ static void D3DXCreateMeshTest(void)
/* declaration */ hr = d3dxmesh->lpVtbl->GetDeclaration(d3dxmesh, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = d3dxmesh->lpVtbl->GetDeclaration(d3dxmesh, test_decl); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
if (hr == D3D_OK) { @@ -1302,7 +1302,7 @@ static void D3DXCreateMeshTest(void)
/* options */ options = d3dxmesh->lpVtbl->GetOptions(d3dxmesh); - ok(options == D3DXMESH_MANAGED, "Got result %x, expected %x (D3DXMESH_MANAGED)\n", options, D3DXMESH_MANAGED); + ok(options == D3DXMESH_MANAGED, "Got result %lx, expected %x (D3DXMESH_MANAGED)\n", options, D3DXMESH_MANAGED);
/* rest */ if (!new_mesh(&mesh, 3, 1)) @@ -1325,16 +1325,16 @@ static void D3DXCreateMeshTest(void)
/* Test a declaration that can't be converted to an FVF. */ hr = D3DXCreateMesh(1, 3, D3DXMESH_MANAGED, decl2, device, &d3dxmesh); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
if (hr == D3D_OK) { /* device */ hr = d3dxmesh->lpVtbl->GetDevice(d3dxmesh, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = d3dxmesh->lpVtbl->GetDevice(d3dxmesh, &test_device); - ok(hr == D3D_OK, "Got result %x, expected %x (D3D_OK)\n", hr, D3D_OK); + ok(hr == D3D_OK, "Got result %lx, expected %lx (D3D_OK)\n", hr, D3D_OK); ok(test_device == device, "Got result %p, expected %p\n", test_device, device);
if (hr == D3D_OK) @@ -1344,7 +1344,7 @@ static void D3DXCreateMeshTest(void)
/* declaration */ hr = d3dxmesh->lpVtbl->GetDeclaration(d3dxmesh, test_decl); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
if (hr == D3D_OK) { @@ -1363,7 +1363,7 @@ static void D3DXCreateMeshTest(void)
/* options */ options = d3dxmesh->lpVtbl->GetOptions(d3dxmesh); - ok(options == D3DXMESH_MANAGED, "Got result %x, expected %x (D3DXMESH_MANAGED)\n", options, D3DXMESH_MANAGED); + ok(options == D3DXMESH_MANAGED, "Got result %lx, expected %x (D3DXMESH_MANAGED)\n", options, D3DXMESH_MANAGED);
/* rest */ if (!new_mesh(&mesh, 3, 1)) @@ -1390,7 +1390,7 @@ static void D3DXCreateMeshTest(void)
/* Test a declaration with multiple streams. */ hr = D3DXCreateMesh(1, 3, D3DXMESH_MANAGED, decl3, device, &d3dxmesh); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
free_test_context(test_context); } @@ -1414,10 +1414,10 @@ static void D3DXCreateMeshFVFTest(void) };
hr = D3DXCreateMeshFVF(0, 0, 0, 0, NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateMeshFVF(1, 3, D3DXMESH_MANAGED, D3DFVF_XYZ | D3DFVF_NORMAL, NULL, &d3dxmesh); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
test_context = new_test_context(); if (!test_context) @@ -1428,13 +1428,13 @@ static void D3DXCreateMeshFVFTest(void) device = test_context->device;
hr = D3DXCreateMeshFVF(0, 3, D3DXMESH_MANAGED, D3DFVF_XYZ | D3DFVF_NORMAL, device, &d3dxmesh); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateMeshFVF(1, 0, D3DXMESH_MANAGED, D3DFVF_XYZ | D3DFVF_NORMAL, device, &d3dxmesh); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateMeshFVF(1, 3, 0, D3DFVF_XYZ | D3DFVF_NORMAL, device, &d3dxmesh); - ok(hr == D3D_OK, "Got result %x, expected %x (D3D_OK)\n", hr, D3D_OK); + ok(hr == D3D_OK, "Got result %lx, expected %lx (D3D_OK)\n", hr, D3D_OK);
if (hr == D3D_OK) { @@ -1442,22 +1442,22 @@ static void D3DXCreateMeshFVFTest(void) }
hr = D3DXCreateMeshFVF(1, 3, D3DXMESH_MANAGED, 0xdeadbeef, device, &d3dxmesh); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateMeshFVF(1, 3, D3DXMESH_MANAGED, D3DFVF_XYZ | D3DFVF_NORMAL, device, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateMeshFVF(1, 3, D3DXMESH_MANAGED, D3DFVF_XYZ | D3DFVF_NORMAL, device, &d3dxmesh); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
if (hr == D3D_OK) { /* device */ hr = d3dxmesh->lpVtbl->GetDevice(d3dxmesh, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = d3dxmesh->lpVtbl->GetDevice(d3dxmesh, &test_device); - ok(hr == D3D_OK, "Got result %x, expected %x (D3D_OK)\n", hr, D3D_OK); + ok(hr == D3D_OK, "Got result %lx, expected %lx (D3D_OK)\n", hr, D3D_OK); ok(test_device == device, "Got result %p, expected %p\n", test_device, device);
if (hr == D3D_OK) @@ -1467,10 +1467,10 @@ static void D3DXCreateMeshFVFTest(void)
/* declaration */ hr = d3dxmesh->lpVtbl->GetDeclaration(d3dxmesh, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = d3dxmesh->lpVtbl->GetDeclaration(d3dxmesh, test_decl); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
if (hr == D3D_OK) { @@ -1490,7 +1490,7 @@ static void D3DXCreateMeshFVFTest(void)
/* options */ options = d3dxmesh->lpVtbl->GetOptions(d3dxmesh); - ok(options == D3DXMESH_MANAGED, "Got result %x, expected %x (D3DXMESH_MANAGED)\n", options, D3DXMESH_MANAGED); + ok(options == D3DXMESH_MANAGED, "Got result %lx, expected %x (D3DXMESH_MANAGED)\n", options, D3DXMESH_MANAGED);
/* rest */ if (!new_mesh(&mesh, 3, 1)) @@ -1523,12 +1523,12 @@ static void check_vertex_buffer_(int line, ID3DXMesh *mesh, const void *vertices const void *mesh_vertices; HRESULT hr;
- ok_(__FILE__,line)(fvf == mesh_fvf, "expected FVF %x, got %x\n", fvf, mesh_fvf); + ok_(__FILE__,line)(fvf == mesh_fvf, "expected FVF %lx, got %lx\n", fvf, mesh_fvf); ok_(__FILE__,line)(num_vertices == mesh_num_vertices, - "Expected %u vertices, got %u\n", num_vertices, mesh_num_vertices); + "Expected %lu vertices, got %lu\n", num_vertices, mesh_num_vertices);
hr = mesh->lpVtbl->LockVertexBuffer(mesh, D3DLOCK_READONLY, (void**)&mesh_vertices); - ok_(__FILE__,line)(hr == D3D_OK, "LockVertexBuffer returned %x, expected %x (D3D_OK)\n", hr, D3D_OK); + ok_(__FILE__,line)(hr == D3D_OK, "LockVertexBuffer returned %lx, expected %lx (D3D_OK)\n", hr, D3D_OK); if (FAILED(hr)) return;
@@ -1562,39 +1562,39 @@ static void check_vertex_buffer_(int line, ID3DXMesh *mesh, const void *vertices break; case D3DFVF_XYZW: pos_dim = 4; break; } - sprintf(prefix, "vertex[%u] position, ", i); + sprintf(prefix, "vertex[%lu] position, ", i); check_floats_(line, prefix, got_float, exp_float, pos_dim); exp_float += pos_dim; got_float += pos_dim;
if (last_beta_dword) { ok_(__FILE__,line)(*(DWORD*)exp_float == *(DWORD*)got_float, - "Vertex[%u]: Expected last beta %08x, got %08x\n", i, *(DWORD*)exp_float, *(DWORD*)got_float); + "Vertex[%lu]: Expected last beta %08lx, got %08lx\n", i, *(DWORD*)exp_float, *(DWORD*)got_float); exp_float++; got_float++; }
if (fvf & D3DFVF_NORMAL) { - sprintf(prefix, "vertex[%u] normal, ", i); + sprintf(prefix, "vertex[%lu] normal, ", i); check_floats_(line, prefix, got_float, exp_float, 3); exp_float += 3; got_float += 3; } if (fvf & D3DFVF_PSIZE) { ok_(__FILE__,line)(compare(*exp_float, *got_float), - "Vertex[%u]: Expected psize %g, got %g\n", i, *exp_float, *got_float); + "Vertex[%lu]: Expected psize %g, got %g\n", i, *exp_float, *got_float); exp_float++; got_float++; } if (fvf & D3DFVF_DIFFUSE) { ok_(__FILE__,line)(*(DWORD*)exp_float == *(DWORD*)got_float, - "Vertex[%u]: Expected diffuse %08x, got %08x\n", i, *(DWORD*)exp_float, *(DWORD*)got_float); + "Vertex[%lu]: Expected diffuse %08lx, got %08lx\n", i, *(DWORD*)exp_float, *(DWORD*)got_float); exp_float++; got_float++; } if (fvf & D3DFVF_SPECULAR) { ok_(__FILE__,line)(*(DWORD*)exp_float == *(DWORD*)got_float, - "Vertex[%u]: Expected specular %08x, got %08x\n", i, *(DWORD*)exp_float, *(DWORD*)got_float); + "Vertex[%lu]: Expected specular %08lx, got %08lx\n", i, *(DWORD*)exp_float, *(DWORD*)got_float); exp_float++; got_float++; } @@ -1602,7 +1602,7 @@ static void check_vertex_buffer_(int line, ID3DXMesh *mesh, const void *vertices texcount = (fvf & D3DFVF_TEXCOUNT_MASK) >> D3DFVF_TEXCOUNT_SHIFT; for (j = 0; j < texcount; j++) { DWORD dim = (((fvf >> (16 + 2 * j)) + 1) & 0x03) + 1; - sprintf(prefix, "vertex[%u] texture, ", i); + sprintf(prefix, "vertex[%lu] texture, ", i); check_floats_(line, prefix, got_float, exp_float, dim); exp_float += dim; got_float += dim; @@ -1627,12 +1627,12 @@ static void check_index_buffer_(int line, ID3DXMesh *mesh, const void *indices, DWORD i;
ok_(__FILE__,line)(index_size == mesh_index_size, - "Expected index size %u, got %u\n", index_size, mesh_index_size); + "Expected index size %lu, got %lu\n", index_size, mesh_index_size); ok_(__FILE__,line)(num_indices == mesh_num_indices, - "Expected %u indices, got %u\n", num_indices, mesh_num_indices); + "Expected %lu indices, got %lu\n", num_indices, mesh_num_indices);
hr = mesh->lpVtbl->LockIndexBuffer(mesh, D3DLOCK_READONLY, (void**)&mesh_indices); - ok_(__FILE__,line)(hr == D3D_OK, "LockIndexBuffer returned %x, expected %x (D3D_OK)\n", hr, D3D_OK); + ok_(__FILE__,line)(hr == D3D_OK, "LockIndexBuffer returned %lx, expected %lx (D3D_OK)\n", hr, D3D_OK); if (FAILED(hr)) return;
@@ -1641,10 +1641,10 @@ static void check_index_buffer_(int line, ID3DXMesh *mesh, const void *indices, { if (index_size == 4) ok_(__FILE__,line)(*(DWORD*)indices == *(DWORD*)mesh_indices, - "Index[%u]: expected %u, got %u\n", i, *(DWORD*)indices, *(DWORD*)mesh_indices); + "Index[%lu]: expected %lu, got %lu\n", i, *(DWORD*)indices, *(DWORD*)mesh_indices); else ok_(__FILE__,line)(*(WORD*)indices == *(WORD*)mesh_indices, - "Index[%u]: expected %u, got %u\n", i, *(WORD*)indices, *(WORD*)mesh_indices); + "Index[%lu]: expected %u, got %u\n", i, *(WORD*)indices, *(WORD*)mesh_indices); indices = (BYTE*)indices + index_size; mesh_indices = (BYTE*)mesh_indices + index_size; } @@ -1677,7 +1677,7 @@ static void check_colorvalue_(int line, const char *prefix, const D3DCOLORVALUE static void check_materials_(int line, const D3DXMATERIAL *got, DWORD got_count, const D3DXMATERIAL *expected, DWORD expected_count) { int i; - ok_(__FILE__,line)(expected_count == got_count, "Expected %u materials, got %u\n", expected_count, got_count); + ok_(__FILE__,line)(expected_count == got_count, "Expected %lu materials, got %lu\n", expected_count, got_count); if (!expected) { ok_(__FILE__,line)(got == NULL, "Expected NULL material ptr, got %p\n", got); return; @@ -1712,7 +1712,7 @@ static void check_generated_adjacency_(int line, ID3DXMesh *mesh, const DWORD *g return; } hr = mesh->lpVtbl->GenerateAdjacency(mesh, epsilon, expected); - ok_(__FILE__, line)(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); + ok_(__FILE__, line)(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr); if (SUCCEEDED(hr)) { int i; @@ -1721,7 +1721,7 @@ static void check_generated_adjacency_(int line, ID3DXMesh *mesh, const DWORD *g ok_(__FILE__, line)(expected[i * 3] == got[i * 3] && expected[i * 3 + 1] == got[i * 3 + 1] && expected[i * 3 + 2] == got[i * 3 + 2], - "Face %u adjacencies: Expected (%u, %u, %u), got (%u, %u, %u)\n", i, + "Face %u adjacencies: Expected (%lu, %lu, %lu), got (%lu, %lu, %lu)\n", i, expected[i * 3], expected[i * 3 + 1], expected[i * 3 + 2], got[i * 3], got[i * 3 + 1], got[i * 3 + 2]); } @@ -1760,7 +1760,7 @@ static void check_generated_effects_(int line, const D3DXMATERIAL *materials, DW DWORD expected_num_defaults = ARRAY_SIZE(params) + (materials[i].pTextureFilename ? 1 : 0);
ok_(__FILE__,line)(expected_num_defaults == effects[i].NumDefaults, - "effect[%u] NumDefaults: Expected %u, got %u\n", i, + "effect[%u] NumDefaults: Expected %lu, got %lu\n", i, expected_num_defaults, effects[i].NumDefaults); for (j = 0; j < min(ARRAY_SIZE(params), effects[i].NumDefaults); j++) { @@ -1773,7 +1773,7 @@ static void check_generated_effects_(int line, const D3DXMATERIAL *materials, DW "effect[%u].pDefaults[%u].Type: Expected %u, got %u\n", i, j, D3DXEDT_FLOATS, got_param->Type); ok_(__FILE__,line)(params[j].num_bytes == got_param->NumBytes, - "effect[%u].pDefaults[%u].NumBytes: Expected %u, got %u\n", i, j, + "effect[%u].pDefaults[%u].NumBytes: Expected %lu, got %lu\n", i, j, params[j].num_bytes, got_param->NumBytes); for (k = 0; k < min(params[j].num_bytes, got_param->NumBytes) / 4; k++) { @@ -1795,7 +1795,7 @@ static void check_generated_effects_(int line, const D3DXMATERIAL *materials, DW D3DXEDT_STRING, got_param->Type); if (materials[i].pTextureFilename) { ok_(__FILE__,line)(strlen(materials[i].pTextureFilename) + 1 == got_param->NumBytes, - "effect[%u] texture filename length: Expected %u, got %u\n", i, + "effect[%u] texture filename length: Expected %lu, got %lu\n", i, (DWORD)strlen(materials[i].pTextureFilename) + 1, got_param->NumBytes); ok_(__FILE__,line)(!strcmp(materials[i].pTextureFilename, got_param->pValue), "effect[%u] texture filename: Expected '%s', got '%s'\n", i, @@ -1893,7 +1893,7 @@ static HRESULT CALLBACK ID3DXAllocateHierarchyImpl_CreateMeshContainer(ID3DXAllo LPD3DXMESHCONTAINER mesh_container = NULL; int i;
- TRACECALLBACK("ID3DXAllocateHierarchyImpl_CreateMeshContainer(%p, '%s', %u, %p, %p, %p, %d, %p, %p, %p)\n", + TRACECALLBACK("ID3DXAllocateHierarchyImpl_CreateMeshContainer(%p, '%s', %u, %p, %p, %p, %ld, %p, %p, %p)\n", iface, name, mesh_data->Type, U(*mesh_data).pMesh, materials, effects, num_materials, adjacency, skin_info, *new_mesh_container);
@@ -2020,7 +2020,7 @@ static void test_LoadMeshFromX_(int line, IDirect3DDevice9 *device, const char * * the adjacency data. */ hr = D3DXLoadMeshFromXInMemory(xfile_str, xfile_strlen, D3DXMESH_MANAGED, device, check_adjacency ? &adjacency : NULL, &materials, &effects, &num_materials, &mesh); - ok_(__FILE__,line)(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); + ok_(__FILE__,line)(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr); if (SUCCEEDED(hr)) { D3DXMATERIAL *materials_ptr = materials ? ID3DXBuffer_GetBufferPointer(materials) : NULL; D3DXEFFECTINSTANCE *effects_ptr = effects ? ID3DXBuffer_GetBufferPointer(effects) : NULL; @@ -2403,31 +2403,31 @@ static void D3DXLoadMeshTest(void)
hr = D3DXLoadMeshHierarchyFromXInMemory(NULL, sizeof(simple_xfile) - 1, D3DXMESH_MANAGED, device, &alloc_hier, NULL, &frame_hier, NULL); - ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#x\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#lx\n", hr);
hr = D3DXLoadMeshHierarchyFromXInMemory(simple_xfile, 0, D3DXMESH_MANAGED, device, &alloc_hier, NULL, &frame_hier, NULL); - ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#x\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#lx\n", hr);
hr = D3DXLoadMeshHierarchyFromXInMemory(simple_xfile, sizeof(simple_xfile) - 1, D3DXMESH_MANAGED, NULL, &alloc_hier, NULL, &frame_hier, NULL); - ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#x\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#lx\n", hr);
hr = D3DXLoadMeshHierarchyFromXInMemory(simple_xfile, sizeof(simple_xfile) - 1, D3DXMESH_MANAGED, device, NULL, NULL, &frame_hier, NULL); - ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#x\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#lx\n", hr);
hr = D3DXLoadMeshHierarchyFromXInMemory(empty_xfile, sizeof(empty_xfile) - 1, D3DXMESH_MANAGED, device, &alloc_hier, NULL, &frame_hier, NULL); - ok(hr == E_FAIL, "Expected E_FAIL, got %#x\n", hr); + ok(hr == E_FAIL, "Expected E_FAIL, got %#lx\n", hr);
hr = D3DXLoadMeshHierarchyFromXInMemory(simple_xfile, sizeof(simple_xfile) - 1, D3DXMESH_MANAGED, device, &alloc_hier, NULL, NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#x\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#lx\n", hr);
hr = D3DXLoadMeshHierarchyFromXInMemory(simple_xfile, sizeof(simple_xfile) - 1, D3DXMESH_MANAGED, device, &alloc_hier, NULL, &frame_hier, NULL); - ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); + ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr); if (SUCCEEDED(hr)) { D3DXMESHCONTAINER *container = frame_hier->pMeshContainer;
@@ -2445,20 +2445,20 @@ static void D3DXLoadMeshTest(void) check_generated_effects(container->pMaterials, container->NumMaterials, container->pEffects); check_generated_adjacency(mesh, container->pAdjacency, 0.0f); hr = D3DXFrameDestroy(frame_hier, &alloc_hier); - ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); + ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr); frame_hier = NULL; }
controller = (ID3DXAnimationController *)0xdeadbeef; hr = D3DXLoadMeshHierarchyFromXInMemory(box_anim_xfile, sizeof(box_anim_xfile) - 1, D3DXMESH_MANAGED, device, &alloc_hier, NULL, &frame_hier, &controller); - todo_wine ok(hr == D3D_OK, "Expected D3D_OK, got %#x.\n", hr); + todo_wine ok(hr == D3D_OK, "Expected D3D_OK, got %#lx.\n", hr); if (SUCCEEDED(hr)) { ok(controller != NULL, "Animation Controller NULL.\n");
hr = D3DXFrameDestroy(frame_hier, &alloc_hier); - ok(hr == D3D_OK, "Expected D3D_OK, got %#x.\n", hr); + ok(hr == D3D_OK, "Expected D3D_OK, got %#lx.\n", hr); if (controller) controller->lpVtbl->Release(controller);
@@ -2468,7 +2468,7 @@ static void D3DXLoadMeshTest(void) controller = (ID3DXAnimationController *)0xdeadbeef; hr = D3DXLoadMeshHierarchyFromXInMemory(box_xfile, sizeof(box_xfile) - 1, D3DXMESH_MANAGED, device, &alloc_hier, NULL, &frame_hier, &controller); - ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); + ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr); if (SUCCEEDED(hr)) { D3DXMESHCONTAINER *container = frame_hier->pMeshContainer; @@ -2488,13 +2488,13 @@ static void D3DXLoadMeshTest(void) check_generated_effects(container->pMaterials, container->NumMaterials, container->pEffects); check_generated_adjacency(mesh, container->pAdjacency, 0.0f); hr = D3DXFrameDestroy(frame_hier, &alloc_hier); - ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); + ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr); frame_hier = NULL; }
hr = D3DXLoadMeshHierarchyFromXInMemory(framed_xfile, sizeof(framed_xfile) - 1, D3DXMESH_MANAGED, device, &alloc_hier, NULL, &frame_hier, NULL); - ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); + ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr); if (SUCCEEDED(hr)) { D3DXMESHCONTAINER *container = frame_hier->pMeshContainer; int i; @@ -2519,38 +2519,38 @@ static void D3DXLoadMeshTest(void) } ok(container == NULL, "Expected NULL, got %p\n", container); hr = D3DXFrameDestroy(frame_hier, &alloc_hier); - ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); + ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr); frame_hier = NULL; }
hr = D3DXLoadMeshFromXInMemory(NULL, 0, D3DXMESH_MANAGED, device, NULL, NULL, NULL, NULL, &mesh); - ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#x\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#lx\n", hr);
hr = D3DXLoadMeshFromXInMemory(NULL, sizeof(simple_xfile) - 1, D3DXMESH_MANAGED, device, NULL, NULL, NULL, NULL, &mesh); - ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#x\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#lx\n", hr);
hr = D3DXLoadMeshFromXInMemory(simple_xfile, 0, D3DXMESH_MANAGED, device, NULL, NULL, NULL, NULL, &mesh); - ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#x\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#lx\n", hr);
hr = D3DXLoadMeshFromXInMemory(simple_xfile, sizeof(simple_xfile) - 1, D3DXMESH_MANAGED, device, NULL, NULL, NULL, NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#x\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#lx\n", hr);
hr = D3DXLoadMeshFromXInMemory(simple_xfile, sizeof(simple_xfile) - 1, D3DXMESH_MANAGED, NULL, NULL, NULL, NULL, NULL, &mesh); - ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#x\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#lx\n", hr);
hr = D3DXLoadMeshFromXInMemory(empty_xfile, sizeof(empty_xfile) - 1, D3DXMESH_MANAGED, device, NULL, NULL, NULL, NULL, &mesh); - ok(hr == E_FAIL, "Expected E_FAIL, got %#x\n", hr); + ok(hr == E_FAIL, "Expected E_FAIL, got %#lx\n", hr);
hr = D3DXLoadMeshFromXInMemory(simple_xfile, sizeof(simple_xfile) - 1, D3DXMESH_MANAGED, device, NULL, NULL, NULL, NULL, &mesh); - ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); + ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr); if (SUCCEEDED(hr)) IUnknown_Release(mesh);
@@ -2617,7 +2617,7 @@ static void test_box(IDirect3DDevice9 *device, float width, float height, float char name[256];
hr = D3DXCreateBox(device, width, height, depth, &box, NULL); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr); if (hr != D3D_OK) { skip("Couldn't create box\n"); @@ -2665,27 +2665,27 @@ static void D3DXCreateBoxTest(void) device = test_context->device;
hr = D3DXCreateBox(device,2.0f,20.0f,4.9f,NULL, &ppBuffer); - ok(hr==D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, received %#x\n", hr); + ok(hr==D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, received %#lx\n", hr);
hr = D3DXCreateBox(NULL,22.0f,20.0f,4.9f,&box, &ppBuffer); - ok(hr==D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, received %#x\n", hr); + ok(hr==D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, received %#lx\n", hr);
hr = D3DXCreateBox(device,-2.0f,20.0f,4.9f,&box, &ppBuffer); - ok(hr==D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, received %#x\n", hr); + ok(hr==D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, received %#lx\n", hr);
hr = D3DXCreateBox(device,22.0f,-20.0f,4.9f,&box, &ppBuffer); - ok(hr==D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, received %#x\n", hr); + ok(hr==D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, received %#lx\n", hr);
hr = D3DXCreateBox(device,22.0f,20.0f,-4.9f,&box, &ppBuffer); - ok(hr==D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, received %#x\n", hr); + ok(hr==D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, received %#lx\n", hr);
ppBuffer = NULL; hr = D3DXCreateBox(device,10.9f,20.0f,4.9f,&box, &ppBuffer); - ok(hr==D3D_OK, "Expected D3D_OK, received %#x\n", hr); + ok(hr==D3D_OK, "Expected D3D_OK, received %#lx\n", hr);
buffer = ID3DXBuffer_GetBufferPointer(ppBuffer); for(i=0; i<36; i++) - ok(adjacency[i]==buffer[i], "expected adjacency %d: %#x, received %#x\n",i,adjacency[i], buffer[i]); + ok(adjacency[i]==buffer[i], "expected adjacency %d: %#lx, received %#lx\n",i,adjacency[i], buffer[i]);
box->lpVtbl->Release(box); ID3DXBuffer_Release(ppBuffer); @@ -2741,7 +2741,7 @@ static void test_polygon(IDirect3DDevice9 *device, float length, unsigned int si char name[64];
hr = D3DXCreatePolygon(device, length, sides, &polygon, NULL); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr); if (hr != D3D_OK) { skip("Couldn't create polygon\n"); @@ -2783,37 +2783,37 @@ static void D3DXCreatePolygonTest(void) device = test_context->device;
hr = D3DXCreatePolygon(device, 2.0f, 11, NULL, &adjacency); - ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, received %#x\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, received %#lx\n", hr);
hr = D3DXCreatePolygon(NULL, 2.0f, 11, &polygon, &adjacency); - ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, received %#x\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, received %#lx\n", hr);
hr = D3DXCreatePolygon(device, -2.0f, 11, &polygon, &adjacency); - ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, received %#x\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, received %#lx\n", hr);
polygon = (void *)0xdeadbeef; adjacency = (void *)0xdeadbeef; hr = D3DXCreatePolygon(device, 2.0f, 0, &polygon, &adjacency); - ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, received %#x\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, received %#lx\n", hr); ok(polygon == (void *)0xdeadbeef, "Polygon was changed to %p\n", polygon); ok(adjacency == (void *)0xdeadbeef, "Adjacency was changed to %p\n", adjacency);
hr = D3DXCreatePolygon(device, 2.0f, 2, &polygon, &adjacency); - ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, received %#x\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, received %#lx\n", hr);
adjacency = NULL; hr = D3DXCreatePolygon(device, 3.0f, 11, &polygon, &adjacency); - ok(hr == D3D_OK, "Expected D3D_OK, received %#x\n", hr); + ok(hr == D3D_OK, "Expected D3D_OK, received %#lx\n", hr);
buffer_size = ID3DXBuffer_GetBufferSize(adjacency); - ok(buffer_size == 33 * sizeof(DWORD), "Wrong adjacency buffer size %u\n", buffer_size); + ok(buffer_size == 33 * sizeof(DWORD), "Wrong adjacency buffer size %lu\n", buffer_size);
buffer = ID3DXBuffer_GetBufferPointer(adjacency); for (i = 0; i < 11; ++i) { - ok(buffer[i][0] == (i + 10) % 11, "Wrong adjacency[%d][0] = %u\n", i, buffer[i][0]); - ok(buffer[i][1] == ~0U, "Wrong adjacency[%d][1] = %u\n", i, buffer[i][1]); - ok(buffer[i][2] == (i + 1) % 11, "Wrong adjacency[%d][2] = %u\n", i, buffer[i][2]); + ok(buffer[i][0] == (i + 10) % 11, "Wrong adjacency[%d][0] = %lu\n", i, buffer[i][0]); + ok(buffer[i][1] == ~0U, "Wrong adjacency[%d][1] = %lu\n", i, buffer[i][1]); + ok(buffer[i][2] == (i + 1) % 11, "Wrong adjacency[%d][2] = %lu\n", i, buffer[i][2]); }
polygon->lpVtbl->Release(polygon); @@ -3018,7 +3018,7 @@ static void test_sphere(IDirect3DDevice9 *device, FLOAT radius, UINT slices, UIN char name[256];
hr = D3DXCreateSphere(device, radius, slices, stacks, &sphere, NULL); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr); if (hr != D3D_OK) { skip("Couldn't create sphere\n"); @@ -3050,16 +3050,16 @@ static void D3DXCreateSphereTest(void) struct test_context *test_context;
hr = D3DXCreateSphere(NULL, 0.0f, 0, 0, NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n",hr,D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n",hr,D3DERR_INVALIDCALL);
hr = D3DXCreateSphere(NULL, 0.1f, 0, 0, NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n",hr,D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n",hr,D3DERR_INVALIDCALL);
hr = D3DXCreateSphere(NULL, 0.0f, 1, 0, NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n",hr,D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n",hr,D3DERR_INVALIDCALL);
hr = D3DXCreateSphere(NULL, 0.0f, 0, 1, NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n",hr,D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n",hr,D3DERR_INVALIDCALL);
if (!(test_context = new_test_context())) { @@ -3069,16 +3069,16 @@ static void D3DXCreateSphereTest(void) device = test_context->device;
hr = D3DXCreateSphere(device, 1.0f, 1, 1, &sphere, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n",hr,D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n",hr,D3DERR_INVALIDCALL);
hr = D3DXCreateSphere(device, 1.0f, 2, 1, &sphere, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateSphere(device, 1.0f, 1, 2, &sphere, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateSphere(device, -0.1f, 1, 2, &sphere, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
test_sphere(device, 0.0f, 2, 2); test_sphere(device, 1.0f, 2, 2); @@ -3245,7 +3245,7 @@ static void test_cylinder(IDirect3DDevice9 *device, FLOAT radius1, FLOAT radius2 char name[256];
hr = D3DXCreateCylinder(device, radius1, radius2, length, slices, stacks, &cylinder, NULL); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr); if (hr != D3D_OK) { skip("Couldn't create cylinder\n"); @@ -3277,10 +3277,10 @@ static void D3DXCreateCylinderTest(void) struct test_context *test_context;
hr = D3DXCreateCylinder(NULL, 0.0f, 0.0f, 0.0f, 0, 0, NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n",hr,D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n",hr,D3DERR_INVALIDCALL);
hr = D3DXCreateCylinder(NULL, 1.0f, 1.0f, 1.0f, 2, 1, &cylinder, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n",hr,D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n",hr,D3DERR_INVALIDCALL);
if (!(test_context = new_test_context())) { @@ -3290,10 +3290,10 @@ static void D3DXCreateCylinderTest(void) device = test_context->device;
hr = D3DXCreateCylinder(device, -0.1f, 1.0f, 1.0f, 2, 1, &cylinder, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n",hr,D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n",hr,D3DERR_INVALIDCALL);
hr = D3DXCreateCylinder(device, 0.0f, 1.0f, 1.0f, 2, 1, &cylinder, NULL); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n",hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n",hr);
if (SUCCEEDED(hr) && cylinder) { @@ -3301,10 +3301,10 @@ static void D3DXCreateCylinderTest(void) }
hr = D3DXCreateCylinder(device, 1.0f, -0.1f, 1.0f, 2, 1, &cylinder, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n",hr,D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n",hr,D3DERR_INVALIDCALL);
hr = D3DXCreateCylinder(device, 1.0f, 0.0f, 1.0f, 2, 1, &cylinder, NULL); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n",hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n",hr);
if (SUCCEEDED(hr) && cylinder) { @@ -3312,11 +3312,11 @@ static void D3DXCreateCylinderTest(void) }
hr = D3DXCreateCylinder(device, 1.0f, 1.0f, -0.1f, 2, 1, &cylinder, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n",hr,D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n",hr,D3DERR_INVALIDCALL);
/* Test with length == 0.0f succeeds */ hr = D3DXCreateCylinder(device, 1.0f, 1.0f, 0.0f, 2, 1, &cylinder, NULL); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n",hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n",hr);
if (SUCCEEDED(hr) && cylinder) { @@ -3324,13 +3324,13 @@ static void D3DXCreateCylinderTest(void) }
hr = D3DXCreateCylinder(device, 1.0f, 1.0f, 1.0f, 1, 1, &cylinder, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n",hr,D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n",hr,D3DERR_INVALIDCALL);
hr = D3DXCreateCylinder(device, 1.0f, 1.0f, 1.0f, 2, 0, &cylinder, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n",hr,D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n",hr,D3DERR_INVALIDCALL);
hr = D3DXCreateCylinder(device, 1.0f, 1.0f, 1.0f, 2, 1, NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n",hr,D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n",hr,D3DERR_INVALIDCALL);
test_cylinder(device, 0.0f, 0.0f, 0.0f, 2, 1); test_cylinder(device, 1.0f, 1.0f, 1.0f, 2, 1); @@ -3409,7 +3409,7 @@ static void test_torus(IDirect3DDevice9 *device, float innerradius, float outerr char name[256];
hr = D3DXCreateTorus(device, innerradius, outerradius, sides, rings, &torus, NULL); - ok(hr == D3D_OK, "Got result %#x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "Got result %#lx, expected 0 (D3D_OK)\n", hr); if (hr != D3D_OK) { skip("Couldn't create torus\n"); @@ -3448,22 +3448,22 @@ static void D3DXCreateTorusTest(void) device = test_context->device;
hr = D3DXCreateTorus(NULL, 0.0f, 0.0f, 3, 3, &torus, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %#x, expected %#x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %#lx, expected %#lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateTorus(device, -1.0f, 0.0f, 3, 3, &torus, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %#x, expected %#x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %#lx, expected %#lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateTorus(device, 0.0f, -1.0f, 3, 3, &torus, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %#x, expected %#x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %#lx, expected %#lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateTorus(device, 0.0f, 0.0f, 2, 3, &torus, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %#x, expected %#x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %#lx, expected %#lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateTorus(device, 0.0f, 0.0f, 3, 2, &torus, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %#x, expected %#x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %#lx, expected %#lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateTorus(device, 0.0f, 0.0f, 3, 3, NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %#x, expected %#x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %#lx, expected %#lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
test_torus(device, 0.0f, 0.0f, 3, 3); test_torus(device, 1.0f, 1.0f, 3, 3); @@ -3685,7 +3685,7 @@ static HRESULT create_outline(struct glyphinfo *glyph, void *raw_outline, int da pt->corner = POINTTYPE_CORNER;
if (header->dwType != TT_POLYGON_TYPE) - trace("Unknown header type %d\n", header->dwType); + trace("Unknown header type %ld\n", header->dwType);
while ((char *)curve < (char *)header + header->cb) { @@ -3982,17 +3982,17 @@ static void compare_text_outline_mesh(const char *name, ID3DXMesh *d3dxmesh, str number_of_faces = d3dxmesh->lpVtbl->GetNumFaces(d3dxmesh);
hr = d3dxmesh->lpVtbl->GetVertexBuffer(d3dxmesh, &vertex_buffer); - ok(hr == D3D_OK, "Test %s, unexpected hr %#x.\n", name, hr); + ok(hr == D3D_OK, "Test %s, unexpected hr %#lx.\n", name, hr); hr = IDirect3DVertexBuffer9_GetDesc(vertex_buffer, &vertex_buffer_description); - ok(hr == D3D_OK, "Test %s, unexpected hr %#x.\n", name, hr); + ok(hr == D3D_OK, "Test %s, unexpected hr %#lx.\n", name, hr); ok(vertex_buffer_description.Format == D3DFMT_VERTEXDATA, "Test %s, unexpected format %u.\n", name, vertex_buffer_description.Format); ok(vertex_buffer_description.Type == D3DRTYPE_VERTEXBUFFER, "Test %s, unexpected resource type %u.\n", name, vertex_buffer_description.Type); - ok(!vertex_buffer_description.Usage, "Test %s, unexpected usage %#x.\n", name, vertex_buffer_description.Usage); + ok(!vertex_buffer_description.Usage, "Test %s, unexpected usage %#lx.\n", name, vertex_buffer_description.Usage); ok(vertex_buffer_description.Pool == D3DPOOL_MANAGED, "Test %s, unexpected pool %u.\n", name, vertex_buffer_description.Pool); - ok(vertex_buffer_description.FVF == mesh->fvf, "Test %s, unexpected FVF %#x (expected %#x).\n", + ok(vertex_buffer_description.FVF == mesh->fvf, "Test %s, unexpected FVF %#lx (expected %#lx).\n", name, vertex_buffer_description.FVF, mesh->fvf); if (!mesh->fvf) expected = number_of_vertices * mesh->vertex_size; @@ -4002,14 +4002,14 @@ static void compare_text_outline_mesh(const char *name, ID3DXMesh *d3dxmesh, str name, vertex_buffer_description.Size, expected);
hr = d3dxmesh->lpVtbl->GetIndexBuffer(d3dxmesh, &index_buffer); - ok(hr == D3D_OK, "Test %s, unexpected hr %#x.\n", name, hr); + ok(hr == D3D_OK, "Test %s, unexpected hr %#lx.\n", name, hr); hr = IDirect3DIndexBuffer9_GetDesc(index_buffer, &index_buffer_description); - ok(hr == D3D_OK, "Test %s, unexpected hr %#x.\n", name, hr); + ok(hr == D3D_OK, "Test %s, unexpected hr %#lx.\n", name, hr); ok(index_buffer_description.Format == D3DFMT_INDEX16, "Test %s, unexpected format %u.\n", name, index_buffer_description.Format); ok(index_buffer_description.Type == D3DRTYPE_INDEXBUFFER, "Test %s, unexpected resource type %u.\n", name, index_buffer_description.Type); - ok(!index_buffer_description.Usage, "Test %s, unexpected usage %#x.\n", + ok(!index_buffer_description.Usage, "Test %s, unexpected usage %#lx.\n", name, index_buffer_description.Usage); ok(index_buffer_description.Pool == D3DPOOL_MANAGED, "Test %s, unexpected pool %u.\n", name, index_buffer_description.Pool); @@ -4019,10 +4019,10 @@ static void compare_text_outline_mesh(const char *name, ID3DXMesh *d3dxmesh, str
hr = IDirect3DVertexBuffer9_Lock(vertex_buffer, 0, number_of_vertices * sizeof(D3DXVECTOR3) * 2, (void **)&vertices, D3DLOCK_DISCARD); - ok(hr == D3D_OK, "Test %s, unexpected hr %#x.\n", name, hr); + ok(hr == D3D_OK, "Test %s, unexpected hr %#lx.\n", name, hr); hr = IDirect3DIndexBuffer9_Lock(index_buffer, 0, number_of_faces * sizeof(WORD) * 3, (void **)&faces, D3DLOCK_DISCARD); - ok(hr == D3D_OK, "Test %s, unexpected hr %#x.\n", name, hr); + ok(hr == D3D_OK, "Test %s, unexpected hr %#lx.\n", name, hr); face_idx1 = 0; vtx_idx2 = 0; face_idx2 = 0; @@ -4250,7 +4250,7 @@ static void test_createtext(IDirect3DDevice9 *device, HDC hdc, const char *text, sprintf(name, "text ('%s', %f, %f)", text, deviation, extrusion);
hr = D3DXCreateTextA(device, hdc, text, deviation, extrusion, &d3dxmesh, NULL, glyphmetrics_float); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
/* must select a modified font having lfHeight = otm.otmEMSquare before * calling GetGlyphOutline to get the expected values */ @@ -4340,45 +4340,45 @@ static void D3DXCreateTextTest(void) GetOutlineTextMetricsA(hdc, sizeof(otm), &otm);
hr = D3DXCreateTextA(device, hdc, "wine", 0.001f, 0.4f, NULL, NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
/* D3DXCreateTextA page faults from passing NULL text */
hr = D3DXCreateTextW(device, hdc, NULL, 0.001f, 0.4f, &d3dxmesh, NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateTextA(device, hdc, "", 0.001f, 0.4f, &d3dxmesh, NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateTextA(device, hdc, " ", 0.001f, 0.4f, &d3dxmesh, NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateTextA(NULL, hdc, "wine", 0.001f, 0.4f, &d3dxmesh, NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateTextA(device, NULL, "wine", 0.001f, 0.4f, &d3dxmesh, NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateTextA(device, hdc, "wine", -FLT_MIN, 0.4f, &d3dxmesh, NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateTextA(device, hdc, "wine", 0.001f, -FLT_MIN, &d3dxmesh, NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
/* deviation = 0.0f treated as if deviation = 1.0f / otm.otmEMSquare */ hr = D3DXCreateTextA(device, hdc, "wine", 1.0f / otm.otmEMSquare, 0.4f, &d3dxmesh, NULL, NULL); - ok(hr == D3D_OK, "Got result %x, expected %x (D3D_OK)\n", hr, D3D_OK); + ok(hr == D3D_OK, "Got result %lx, expected %lx (D3D_OK)\n", hr, D3D_OK); number_of_vertices = d3dxmesh->lpVtbl->GetNumVertices(d3dxmesh); number_of_faces = d3dxmesh->lpVtbl->GetNumFaces(d3dxmesh); d3dxmesh->lpVtbl->Release(d3dxmesh);
hr = D3DXCreateTextA(device, hdc, "wine", 0.0f, 0.4f, &d3dxmesh, NULL, NULL); - ok(hr == D3D_OK, "Got result %x, expected %x (D3D_OK)\n", hr, D3D_OK); + ok(hr == D3D_OK, "Got result %lx, expected %lx (D3D_OK)\n", hr, D3D_OK); ok(number_of_vertices == d3dxmesh->lpVtbl->GetNumVertices(d3dxmesh), - "Got %d vertices, expected %d\n", + "Got %ld vertices, expected %d\n", d3dxmesh->lpVtbl->GetNumVertices(d3dxmesh), number_of_vertices); ok(number_of_faces == d3dxmesh->lpVtbl->GetNumFaces(d3dxmesh), - "Got %d faces, expected %d\n", + "Got %ld faces, expected %d\n", d3dxmesh->lpVtbl->GetNumVertices(d3dxmesh), number_of_faces); d3dxmesh->lpVtbl->Release(d3dxmesh);
@@ -4387,13 +4387,13 @@ if (0) /* too much detail requested, so will appear to hang */ trace("Waiting for D3DXCreateText to finish with deviation = FLT_MIN ...\n"); hr = D3DXCreateTextA(device, hdc, "wine", FLT_MIN, 0.4f, &d3dxmesh, NULL, NULL); - ok(hr == D3D_OK, "Got result %x, expected %x (D3D_OK)\n", hr, D3D_OK); + ok(hr == D3D_OK, "Got result %lx, expected %lx (D3D_OK)\n", hr, D3D_OK); if (SUCCEEDED(hr) && d3dxmesh) d3dxmesh->lpVtbl->Release(d3dxmesh); trace("D3DXCreateText finish with deviation = FLT_MIN\n"); }
hr = D3DXCreateTextA(device, hdc, "wine", 0.001f, 0.4f, &d3dxmesh, NULL, NULL); - ok(hr == D3D_OK, "Got result %x, expected %x (D3D_OK)\n", hr, D3D_OK); + ok(hr == D3D_OK, "Got result %lx, expected %lx (D3D_OK)\n", hr, D3D_OK); if (SUCCEEDED(hr) && d3dxmesh) d3dxmesh->lpVtbl->Release(d3dxmesh);
test_createtext(device, hdc, "wine", FLT_MAX, 0.4f); @@ -4616,32 +4616,32 @@ static void D3DXGenerateAdjacencyTest(void) d3dxmesh = NULL;
hr = D3DXCreateMeshFVF(test_data[i].num_faces, test_data[i].num_vertices, 0, D3DFVF_XYZ, device, &d3dxmesh); - ok(hr == D3D_OK, "Got result %x, expected %x (D3D_OK)\n", hr, D3D_OK); + ok(hr == D3D_OK, "Got result %lx, expected %lx (D3D_OK)\n", hr, D3D_OK);
hr = d3dxmesh->lpVtbl->LockVertexBuffer(d3dxmesh, D3DLOCK_DISCARD, (void**)&vertices); - ok(hr == D3D_OK, "test %d: Got result %x, expected %x (D3D_OK)\n", i, hr, D3D_OK); + ok(hr == D3D_OK, "test %d: Got result %lx, expected %lx (D3D_OK)\n", i, hr, D3D_OK); if (FAILED(hr)) continue; CopyMemory(vertices, test_data[i].vertices, test_data[i].num_vertices * sizeof(test_data[0].vertices[0])); d3dxmesh->lpVtbl->UnlockVertexBuffer(d3dxmesh);
hr = d3dxmesh->lpVtbl->LockIndexBuffer(d3dxmesh, D3DLOCK_DISCARD, (void**)&indices); - ok(hr == D3D_OK, "test %d: Got result %x, expected %x (D3D_OK)\n", i, hr, D3D_OK); + ok(hr == D3D_OK, "test %d: Got result %lx, expected %lx (D3D_OK)\n", i, hr, D3D_OK); if (FAILED(hr)) continue; CopyMemory(indices, test_data[i].indices, test_data[i].num_faces * 3 * sizeof(test_data[0].indices[0])); d3dxmesh->lpVtbl->UnlockIndexBuffer(d3dxmesh);
if (i == 0) { hr = d3dxmesh->lpVtbl->GenerateAdjacency(d3dxmesh, 0.0f, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); }
hr = d3dxmesh->lpVtbl->GenerateAdjacency(d3dxmesh, test_data[i].epsilon, adjacency); - ok(hr == D3D_OK, "Got result %x, expected %x (D3D_OK)\n", hr, D3D_OK); + ok(hr == D3D_OK, "Got result %lx, expected %lx (D3D_OK)\n", hr, D3D_OK); if (FAILED(hr)) continue;
for (j = 0; j < test_data[i].num_faces * 3; j++) ok(adjacency[j] == test_data[i].adjacency[j], - "Test %d adjacency %d: Got result %u, expected %u\n", i, j, + "Test %d adjacency %d: Got result %lu, expected %lu\n", i, j, adjacency[j], test_data[i].adjacency[j]); } if (d3dxmesh) d3dxmesh->lpVtbl->Release(d3dxmesh); @@ -4754,7 +4754,7 @@ static void test_update_semantics(void) test_context->device, &mesh); if (FAILED(hr)) { - skip("Couldn't create test mesh %#x\n", hr); + skip("Couldn't create test mesh %#lx\n", hr); goto cleanup; }
@@ -4774,7 +4774,7 @@ static void test_update_semantics(void) hr = mesh->lpVtbl->GetDeclaration(mesh, declaration); if (FAILED(hr)) { - skip("Couldn't get vertex declaration %#x\n", hr); + skip("Couldn't get vertex declaration %#lx\n", hr); goto cleanup; } equal = memcmp(declaration, declaration0, sizeof(declaration0)); @@ -4790,14 +4790,14 @@ static void test_update_semantics(void) }
hr = mesh->lpVtbl->UpdateSemantics(mesh, declaration); - ok(hr == D3D_OK, "Test UpdateSemantics, got %#x expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "Test UpdateSemantics, got %#lx expected %#lx\n", hr, D3D_OK);
/* Check that declaration was written by getting it again */ memset(declaration, 0, sizeof(declaration)); hr = mesh->lpVtbl->GetDeclaration(mesh, declaration); if (FAILED(hr)) { - skip("Couldn't get vertex declaration %#x\n", hr); + skip("Couldn't get vertex declaration %#lx\n", hr); goto cleanup; }
@@ -4817,10 +4817,10 @@ static void test_update_semantics(void) memcpy(declaration, declaration0, sizeof(declaration0)); hr = mesh->lpVtbl->UpdateSemantics(mesh, declaration); ok(hr == D3D_OK, "Test UpdateSemantics, " - "got %#x expected D3D_OK\n", hr); + "got %#lx expected D3D_OK\n", hr); memset(declaration, 0xbb, sizeof(declaration)); hr = mesh->lpVtbl->GetDeclaration(mesh, declaration); - ok(hr == D3D_OK, "Couldn't get vertex declaration. Got %#x, expected D3D_OK\n", hr); + ok(hr == D3D_OK, "Couldn't get vertex declaration. Got %#lx, expected D3D_OK\n", hr); decl_mem = (BYTE *)declaration; for (i = sizeof(declaration0); i < sizeof(declaration); ++i) { @@ -4834,7 +4834,7 @@ static void test_update_semantics(void) hr = mesh->lpVtbl->GetDeclaration(mesh, declaration); if (FAILED(hr)) { - skip("Couldn't get vertex declaration %#x\n", hr); + skip("Couldn't get vertex declaration %#lx\n", hr); goto cleanup; }
@@ -4848,12 +4848,12 @@ static void test_update_semantics(void)
hr = mesh->lpVtbl->UpdateSemantics(mesh, declaration); ok(hr == D3D_OK, "Test UpdateSemantics for overlapping fields, " - "got %#x expected D3D_OK\n", hr); + "got %#lx expected D3D_OK\n", hr);
/* Set the position type to color instead of float3 */ hr = mesh->lpVtbl->UpdateSemantics(mesh, declaration_pos_type_color); ok(hr == D3D_OK, "Test UpdateSemantics position type color, " - "got %#x expected D3D_OK\n", hr); + "got %#lx expected D3D_OK\n", hr);
/* The following test cases show that NULL, smaller or larger declarations, * and declarations with non-zero Stream values are not accepted. @@ -4866,13 +4866,13 @@ static void test_update_semantics(void) mesh->lpVtbl->UpdateSemantics(mesh, declaration0); /* Set a valid declaration */ hr = mesh->lpVtbl->UpdateSemantics(mesh, NULL); ok(hr == D3DERR_INVALIDCALL, "Test UpdateSemantics null pointer declaration, " - "got %#x expected D3DERR_INVALIDCALL\n", hr); + "got %#lx expected D3DERR_INVALIDCALL\n", hr); vertex_size = mesh->lpVtbl->GetNumBytesPerVertex(mesh); - ok(vertex_size == exp_vertex_size, "Got vertex declaration size %u, expected %u\n", + ok(vertex_size == exp_vertex_size, "Got vertex declaration size %lu, expected %lu\n", vertex_size, exp_vertex_size); memset(declaration, 0, sizeof(declaration)); hr = mesh->lpVtbl->GetDeclaration(mesh, declaration); - ok(hr == D3D_OK, "Couldn't get vertex declaration. Got %#x, expected D3D_OK\n", hr); + ok(hr == D3D_OK, "Couldn't get vertex declaration. Got %#lx, expected D3D_OK\n", hr); equal = memcmp(declaration, declaration0, sizeof(declaration0)); ok(equal == 0, "Vertex declarations were not equal\n");
@@ -4880,13 +4880,13 @@ static void test_update_semantics(void) mesh->lpVtbl->UpdateSemantics(mesh, declaration0); /* Set a valid declaration */ hr = mesh->lpVtbl->UpdateSemantics(mesh, declaration_smaller); ok(hr == D3DERR_INVALIDCALL, "Test UpdateSemantics for smaller vertex declaration, " - "got %#x expected D3DERR_INVALIDCALL\n", hr); + "got %#lx expected D3DERR_INVALIDCALL\n", hr); vertex_size = mesh->lpVtbl->GetNumBytesPerVertex(mesh); - ok(vertex_size == exp_vertex_size, "Got vertex declaration size %u, expected %u\n", + ok(vertex_size == exp_vertex_size, "Got vertex declaration size %lu, expected %lu\n", vertex_size, exp_vertex_size); memset(declaration, 0, sizeof(declaration)); hr = mesh->lpVtbl->GetDeclaration(mesh, declaration); - ok(hr == D3D_OK, "Couldn't get vertex declaration. Got %#x, expected D3D_OK\n", hr); + ok(hr == D3D_OK, "Couldn't get vertex declaration. Got %#lx, expected D3D_OK\n", hr); equal = memcmp(declaration, declaration0, sizeof(declaration0)); ok(equal == 0, "Vertex declarations were not equal\n");
@@ -4894,13 +4894,13 @@ static void test_update_semantics(void) mesh->lpVtbl->UpdateSemantics(mesh, declaration0); /* Set a valid declaration */ hr = mesh->lpVtbl->UpdateSemantics(mesh, declaration_larger); ok(hr == D3DERR_INVALIDCALL, "Test UpdateSemantics for larger vertex declaration, " - "got %#x expected D3DERR_INVALIDCALL\n", hr); + "got %#lx expected D3DERR_INVALIDCALL\n", hr); vertex_size = mesh->lpVtbl->GetNumBytesPerVertex(mesh); - ok(vertex_size == exp_vertex_size, "Got vertex declaration size %u, expected %u\n", + ok(vertex_size == exp_vertex_size, "Got vertex declaration size %lu, expected %lu\n", vertex_size, exp_vertex_size); memset(declaration, 0, sizeof(declaration)); hr = mesh->lpVtbl->GetDeclaration(mesh, declaration); - ok(hr == D3D_OK, "Couldn't get vertex declaration. Got %#x, expected D3D_OK\n", hr); + ok(hr == D3D_OK, "Couldn't get vertex declaration. Got %#lx, expected D3D_OK\n", hr); equal = memcmp(declaration, declaration0, sizeof(declaration0)); ok(equal == 0, "Vertex declarations were not equal\n");
@@ -4908,13 +4908,13 @@ static void test_update_semantics(void) mesh->lpVtbl->UpdateSemantics(mesh, declaration0); /* Set a valid declaration */ hr = mesh->lpVtbl->UpdateSemantics(mesh, declaration_multiple_streams); ok(hr == D3DERR_INVALIDCALL, "Test UpdateSemantics using multiple streams, " - "got %#x expected D3DERR_INVALIDCALL\n", hr); + "got %#lx expected D3DERR_INVALIDCALL\n", hr); vertex_size = mesh->lpVtbl->GetNumBytesPerVertex(mesh); - ok(vertex_size == exp_vertex_size, "Got vertex declaration size %u, expected %u\n", + ok(vertex_size == exp_vertex_size, "Got vertex declaration size %lu, expected %lu\n", vertex_size, exp_vertex_size); memset(declaration, 0, sizeof(declaration)); hr = mesh->lpVtbl->GetDeclaration(mesh, declaration); - ok(hr == D3D_OK, "Couldn't get vertex declaration. Got %#x, expected D3D_OK\n", hr); + ok(hr == D3D_OK, "Couldn't get vertex declaration. Got %#lx, expected D3D_OK\n", hr); equal = memcmp(declaration, declaration0, sizeof(declaration0)); ok(equal == 0, "Vertex declarations were not equal\n");
@@ -4928,13 +4928,13 @@ static void test_update_semantics(void) mesh->lpVtbl->UpdateSemantics(mesh, declaration0); /* Set a valid declaration */ hr = mesh->lpVtbl->UpdateSemantics(mesh, declaration_double_usage); ok(hr == D3D_OK, "Test UpdateSemantics double usage, " - "got %#x expected D3D_OK\n", hr); + "got %#lx expected D3D_OK\n", hr); vertex_size = mesh->lpVtbl->GetNumBytesPerVertex(mesh); - ok(vertex_size == exp_vertex_size, "Got vertex declaration size %u, expected %u\n", + ok(vertex_size == exp_vertex_size, "Got vertex declaration size %lu, expected %lu\n", vertex_size, exp_vertex_size); memset(declaration, 0, sizeof(declaration)); hr = mesh->lpVtbl->GetDeclaration(mesh, declaration); - ok(hr == D3D_OK, "Couldn't get vertex declaration. Got %#x, expected D3D_OK\n", hr); + ok(hr == D3D_OK, "Couldn't get vertex declaration. Got %#lx, expected D3D_OK\n", hr); equal = memcmp(declaration, declaration_double_usage, sizeof(declaration_double_usage)); ok(equal == 0, "Vertex declarations were not equal\n");
@@ -4942,13 +4942,13 @@ static void test_update_semantics(void) mesh->lpVtbl->UpdateSemantics(mesh, declaration0); /* Set a valid declaration */ hr = mesh->lpVtbl->UpdateSemantics(mesh, declaration_undefined_type); ok(hr == D3D_OK, "Test UpdateSemantics undefined type, " - "got %#x expected D3D_OK\n", hr); + "got %#lx expected D3D_OK\n", hr); vertex_size = mesh->lpVtbl->GetNumBytesPerVertex(mesh); - ok(vertex_size == exp_vertex_size, "Got vertex declaration size %u, expected %u\n", + ok(vertex_size == exp_vertex_size, "Got vertex declaration size %lu, expected %lu\n", vertex_size, exp_vertex_size); memset(declaration, 0, sizeof(declaration)); hr = mesh->lpVtbl->GetDeclaration(mesh, declaration); - ok(hr == D3D_OK, "Couldn't get vertex declaration. Got %#x, expected D3D_OK\n", hr); + ok(hr == D3D_OK, "Couldn't get vertex declaration. Got %#lx, expected D3D_OK\n", hr); equal = memcmp(declaration, declaration_undefined_type, sizeof(declaration_undefined_type)); ok(equal == 0, "Vertex declarations were not equal\n");
@@ -4956,13 +4956,13 @@ static void test_update_semantics(void) mesh->lpVtbl->UpdateSemantics(mesh, declaration0); /* Set a valid declaration */ hr = mesh->lpVtbl->UpdateSemantics(mesh, declaration_not_4_byte_aligned_offset); ok(hr == D3D_OK, "Test UpdateSemantics not 4 byte aligned offset, " - "got %#x expected D3D_OK\n", hr); + "got %#lx expected D3D_OK\n", hr); vertex_size = mesh->lpVtbl->GetNumBytesPerVertex(mesh); - ok(vertex_size == exp_vertex_size, "Got vertex declaration size %u, expected %u\n", + ok(vertex_size == exp_vertex_size, "Got vertex declaration size %lu, expected %lu\n", vertex_size, exp_vertex_size); memset(declaration, 0, sizeof(declaration)); hr = mesh->lpVtbl->GetDeclaration(mesh, declaration); - ok(hr == D3D_OK, "Couldn't get vertex declaration. Got %#x, expected D3D_OK\n", hr); + ok(hr == D3D_OK, "Couldn't get vertex declaration. Got %#lx, expected D3D_OK\n", hr); equal = memcmp(declaration, declaration_not_4_byte_aligned_offset, sizeof(declaration_not_4_byte_aligned_offset)); ok(equal == 0, "Vertex declarations were not equal\n"); @@ -4992,18 +4992,18 @@ static void test_create_skin_info(void) HRESULT hr;
hr = D3DXCreateSkinInfo(0, empty_declaration, 0, &skininfo); - ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); + ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr); if (skininfo) IUnknown_Release(skininfo); skininfo = NULL;
hr = D3DXCreateSkinInfo(1, NULL, 1, &skininfo); - ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#x\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#lx\n", hr);
hr = D3DXCreateSkinInfo(1, declaration_with_nonzero_stream, 1, &skininfo); - ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#x\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#lx\n", hr);
hr = D3DXCreateSkinInfoFVF(1, 0, 1, &skininfo); - ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); + ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr); if (skininfo) { ID3DXSkinInfo *clone = NULL; @@ -5015,12 +5015,12 @@ static void test_create_skin_info(void)
/* test initial values */ hr = skininfo->lpVtbl->GetDeclaration(skininfo, declaration_out); - ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); + ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr); if (SUCCEEDED(hr)) compare_elements(declaration_out, empty_declaration, __LINE__, 0);
dword_result = skininfo->lpVtbl->GetNumBones(skininfo); - ok(dword_result == 1, "Expected 1, got %u\n", dword_result); + ok(dword_result == 1, "Expected 1, got %lu\n", dword_result);
flt_result = skininfo->lpVtbl->GetMinBoneInfluence(skininfo); ok(flt_result == 0.0f, "Expected 0.0, got %g\n", flt_result); @@ -5029,32 +5029,32 @@ static void test_create_skin_info(void) ok(string_result == NULL, "Expected NULL, got %p\n", string_result);
dword_result = skininfo->lpVtbl->GetFVF(skininfo); - ok(dword_result == 0, "Expected 0, got %u\n", dword_result); + ok(dword_result == 0, "Expected 0, got %lu\n", dword_result);
dword_result = skininfo->lpVtbl->GetNumBoneInfluences(skininfo, 0); - ok(dword_result == 0, "Expected 0, got %u\n", dword_result); + ok(dword_result == 0, "Expected 0, got %lu\n", dword_result);
dword_result = skininfo->lpVtbl->GetNumBoneInfluences(skininfo, 1); - ok(dword_result == 0, "Expected 0, got %u\n", dword_result); + ok(dword_result == 0, "Expected 0, got %lu\n", dword_result);
transform = skininfo->lpVtbl->GetBoneOffsetMatrix(skininfo, -1); ok(transform == NULL, "Expected NULL, got %p\n", transform);
hr = skininfo->lpVtbl->Clone(skininfo, &clone); - ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); + ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr); IUnknown_Release(clone);
{ /* test [GS]etBoneOffsetMatrix */ hr = skininfo->lpVtbl->SetBoneOffsetMatrix(skininfo, 1, &identity_matrix); - ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#x\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#lx\n", hr);
hr = skininfo->lpVtbl->SetBoneOffsetMatrix(skininfo, 0, NULL); - ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#x\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#lx\n", hr);
D3DXMatrixIdentity(&identity_matrix); hr = skininfo->lpVtbl->SetBoneOffsetMatrix(skininfo, 0, &identity_matrix); - ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); + ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr);
transform = skininfo->lpVtbl->GetBoneOffsetMatrix(skininfo, 0); check_matrix(transform, &identity_matrix); @@ -5066,13 +5066,13 @@ static void test_create_skin_info(void) const char *string_result2;
hr = skininfo->lpVtbl->SetBoneName(skininfo, 1, name_in); - ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#x\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#lx\n", hr);
hr = skininfo->lpVtbl->SetBoneName(skininfo, 0, NULL); - ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#x\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#lx\n", hr);
hr = skininfo->lpVtbl->SetBoneName(skininfo, 0, name_in); - ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); + ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr);
string_result = skininfo->lpVtbl->GetBoneName(skininfo, 0); ok(string_result != NULL, "Expected non-NULL string, got %p\n", string_result); @@ -5093,21 +5093,21 @@ static void test_create_skin_info(void) vertices[0] = 0xdeadbeef; weights[0] = FLT_MAX; hr = skininfo->lpVtbl->GetBoneInfluence(skininfo, 0, vertices, weights); - ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); - ok(vertices[0] == 0xdeadbeef, "expected 0xdeadbeef, got %#x\n", vertices[0]); + ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr); + ok(vertices[0] == 0xdeadbeef, "expected 0xdeadbeef, got %#lx\n", vertices[0]); ok(weights[0] == FLT_MAX, "expected %g, got %g\n", FLT_MAX, weights[0]);
hr = skininfo->lpVtbl->GetBoneInfluence(skininfo, 1, vertices, weights); - ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#x\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#lx\n", hr);
hr = skininfo->lpVtbl->GetBoneInfluence(skininfo, 0, NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#x\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#lx\n", hr);
hr = skininfo->lpVtbl->GetBoneInfluence(skininfo, 0, vertices, NULL); - ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); + ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr);
hr = skininfo->lpVtbl->GetBoneInfluence(skininfo, 0, NULL, weights); - ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#x\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#lx\n", hr);
/* no vertex or weight value checking */ @@ -5118,27 +5118,27 @@ static void test_create_skin_info(void) num_influences = 2;
hr = skininfo->lpVtbl->SetBoneInfluence(skininfo, 1, num_influences, vertices, weights); - ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#x\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#lx\n", hr);
hr = skininfo->lpVtbl->SetBoneInfluence(skininfo, 0, num_influences, NULL, weights); - ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#x\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#lx\n", hr);
hr = skininfo->lpVtbl->SetBoneInfluence(skininfo, 0, num_influences, vertices, NULL); - ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#x\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#lx\n", hr);
hr = skininfo->lpVtbl->SetBoneInfluence(skininfo, 0, num_influences, NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#x\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#lx\n", hr);
hr = skininfo->lpVtbl->SetBoneInfluence(skininfo, 0, num_influences, exp_vertices, exp_weights); - ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); + ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr);
memset(vertices, 0, sizeof(vertices)); memset(weights, 0, sizeof(weights)); hr = skininfo->lpVtbl->GetBoneInfluence(skininfo, 0, vertices, weights); - ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); + ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr); for (i = 0; i < num_influences; i++) { ok(exp_vertices[i] == vertices[i], - "influence[%d]: expected vertex %u, got %u\n", i, exp_vertices[i], vertices[i]); + "influence[%d]: expected vertex %lu, got %lu\n", i, exp_vertices[i], vertices[i]); ok((isnan(exp_weights[i]) && isnan(weights[i])) || exp_weights[i] == weights[i], "influence[%d]: expected weights %g, got %g\n", i, exp_weights[i], weights[i]); } @@ -5147,17 +5147,17 @@ static void test_create_skin_info(void) memset(vertices, 0, sizeof(vertices)); memset(weights, 0, sizeof(weights)); hr = skininfo->lpVtbl->SetBoneInfluence(skininfo, 0, 0, vertices, weights); - ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); + ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr);
vertices[0] = 0xdeadbeef; weights[0] = FLT_MAX; hr = skininfo->lpVtbl->GetBoneInfluence(skininfo, 0, vertices, weights); - ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); - ok(vertices[0] == 0xdeadbeef, "expected vertex 0xdeadbeef, got %u\n", vertices[0]); + ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr); + ok(vertices[0] == 0xdeadbeef, "expected vertex 0xdeadbeef, got %lu\n", vertices[0]); ok(weights[0] == FLT_MAX, "expected weight %g, got %g\n", FLT_MAX, weights[0]);
hr = skininfo->lpVtbl->SetBoneInfluence(skininfo, 0, num_influences, exp_vertices, exp_weights); - ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); + ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr); }
{ @@ -5167,57 +5167,57 @@ static void test_create_skin_info(void)
fvf = D3DFVF_XYZ; hr = skininfo->lpVtbl->SetDeclaration(skininfo, NULL); - ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#x\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#lx\n", hr);
hr = skininfo->lpVtbl->SetDeclaration(skininfo, declaration_with_nonzero_stream); - ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#x\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#lx\n", hr);
hr = skininfo->lpVtbl->SetFVF(skininfo, 0); - ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); + ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr);
hr = D3DXDeclaratorFromFVF(fvf, declaration_in); - ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); + ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr); hr = skininfo->lpVtbl->SetDeclaration(skininfo, declaration_in); - ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); + ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr); got_fvf = skininfo->lpVtbl->GetFVF(skininfo); - ok(fvf == got_fvf, "Expected %#x, got %#x\n", fvf, got_fvf); + ok(fvf == got_fvf, "Expected %#lx, got %#lx\n", fvf, got_fvf); hr = skininfo->lpVtbl->GetDeclaration(skininfo, declaration_out); - ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); + ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr); compare_elements(declaration_out, declaration_in, __LINE__, 0);
hr = skininfo->lpVtbl->SetDeclaration(skininfo, empty_declaration); - ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); + ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr); got_fvf = skininfo->lpVtbl->GetFVF(skininfo); - ok(got_fvf == 0, "Expected 0, got %#x\n", got_fvf); + ok(got_fvf == 0, "Expected 0, got %#lx\n", got_fvf); hr = skininfo->lpVtbl->GetDeclaration(skininfo, declaration_out); - ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); + ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr); compare_elements(declaration_out, empty_declaration, __LINE__, 0);
hr = skininfo->lpVtbl->SetFVF(skininfo, fvf); - ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); + ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr); got_fvf = skininfo->lpVtbl->GetFVF(skininfo); - ok(fvf == got_fvf, "Expected %#x, got %#x\n", fvf, got_fvf); + ok(fvf == got_fvf, "Expected %#lx, got %#lx\n", fvf, got_fvf); hr = skininfo->lpVtbl->GetDeclaration(skininfo, declaration_out); - ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); + ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr); compare_elements(declaration_out, declaration_in, __LINE__, 0); }
/* Test Clone() */ hr = skininfo->lpVtbl->Clone(skininfo, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr);
clone = NULL; hr = skininfo->lpVtbl->Clone(skininfo, &clone); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = clone->lpVtbl->GetDeclaration(clone, declaration); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); compare_elements(declaration, declaration_out, __LINE__, 0);
hr = D3DXFVFFromDeclarator(declaration_out, &exp_fvf); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); fvf = clone->lpVtbl->GetFVF(clone); - ok(fvf == exp_fvf, "Got unexpected fvf %#x.\n", fvf); + ok(fvf == exp_fvf, "Got unexpected fvf %#lx.\n", fvf);
exp_string = skininfo->lpVtbl->GetBoneName(skininfo, 0); string = clone->lpVtbl->GetBoneName(clone, 0); @@ -5227,13 +5227,13 @@ static void test_create_skin_info(void) check_matrix(transform, &identity_matrix);
hr = skininfo->lpVtbl->GetBoneInfluence(skininfo, 0, exp_vertices, exp_weights); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = clone->lpVtbl->GetBoneInfluence(clone, 0, vertices, weights); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(vertices); ++i) { - ok(vertices[i] == exp_vertices[i], "influence[%u]: got unexpected vertex %u, expected %u.\n", + ok(vertices[i] == exp_vertices[i], "influence[%u]: got unexpected vertex %lu, expected %lu.\n", i, vertices[i], exp_vertices[i]); ok(((DWORD *)weights)[i] == ((DWORD *)exp_weights)[i], "influence[%u]: got unexpected weight %.8e, expected %.8e.\n", i, weights[i], exp_weights[i]); @@ -5245,10 +5245,10 @@ static void test_create_skin_info(void) skininfo = NULL;
hr = D3DXCreateSkinInfoFVF(1, D3DFVF_XYZ, 1, NULL); - ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#x\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#lx\n", hr);
hr = D3DXCreateSkinInfo(1, NULL, 1, &skininfo); - ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#x\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#lx\n", hr); }
static void test_convert_adjacency_to_point_reps(void) @@ -5668,7 +5668,7 @@ static void test_convert_adjacency_to_point_reps(void) test_context->device, &mesh); if (FAILED(hr)) { - skip("Couldn't create mesh %d. Got %x expected D3D_OK\n", i, hr); + skip("Couldn't create mesh %d. Got %lx expected D3D_OK\n", i, hr); goto cleanup; }
@@ -5734,14 +5734,14 @@ static void test_convert_adjacency_to_point_reps(void) for (j = 0; j < tc[i].num_vertices; j++) point_reps[j] = -1; hr = mesh->lpVtbl->ConvertAdjacencyToPointReps(mesh, tc[i].adjacency, point_reps); ok(hr == D3D_OK, "ConvertAdjacencyToPointReps failed case %d. " - "Got %x expected D3D_OK\n", i, hr); + "Got %lx expected D3D_OK\n", i, hr);
/* Check point representation */ for (j = 0; j < tc[i].num_vertices; j++) { ok(point_reps[j] == tc[i].exp_point_reps[j], "Unexpected point representation at (%d, %d)." - " Got %d expected %d\n", + " Got %ld expected %ld\n", i, j, point_reps[j], tc[i].exp_point_reps[j]); }
@@ -5755,10 +5755,10 @@ static void test_convert_adjacency_to_point_reps(void) /* NULL checks */ hr = mesh_null_check->lpVtbl->ConvertAdjacencyToPointReps(mesh_null_check, tc[0].adjacency, NULL); ok(hr == D3DERR_INVALIDCALL, "ConvertAdjacencyToPointReps point_reps NULL. " - "Got %x expected D3DERR_INVALIDCALL\n", hr); + "Got %lx expected D3DERR_INVALIDCALL\n", hr); hr = mesh_null_check->lpVtbl->ConvertAdjacencyToPointReps(mesh_null_check, NULL, NULL); ok(hr == D3DERR_INVALIDCALL, "ConvertAdjacencyToPointReps adjacency and point_reps NULL. " - "Got %x expected D3DERR_INVALIDCALL\n", hr); + "Got %lx expected D3DERR_INVALIDCALL\n", hr);
cleanup: if (mesh_null_check) @@ -6206,7 +6206,7 @@ static void test_convert_point_reps_to_adjacency(void) declaration, test_context->device, &mesh); if (FAILED(hr)) { - skip("Couldn't create mesh %d. Got %x expected D3D_OK\n", i, hr); + skip("Couldn't create mesh %d. Got %lx expected D3D_OK\n", i, hr); goto cleanup; }
@@ -6272,13 +6272,13 @@ static void test_convert_point_reps_to_adjacency(void)
hr = mesh->lpVtbl->ConvertPointRepsToAdjacency(mesh, tc[i].point_reps, adjacency); ok(hr == D3D_OK, "ConvertPointRepsToAdjacency failed case %d. " - "Got %x expected D3D_OK\n", i, hr); + "Got %lx expected D3D_OK\n", i, hr); /* Check adjacency */ for (j = 0; j < VERTS_PER_FACE * tc[i].num_faces; j++) { ok(adjacency[j] == tc[i].exp_adjacency[j], "Unexpected adjacency information at (%d, %d)." - " Got %d expected %d\n", + " Got %ld expected %ld\n", i, j, adjacency[j], tc[i].exp_adjacency[j]); }
@@ -6286,12 +6286,12 @@ static void test_convert_point_reps_to_adjacency(void) for (j = 0; j < VERTS_PER_FACE * tc[i].num_faces; j++) adjacency[j] = -2; hr = mesh_null_check->lpVtbl->ConvertPointRepsToAdjacency(mesh, NULL, adjacency); ok(hr == D3D_OK, "ConvertPointRepsToAdjacency NULL point_reps. " - "Got %x expected D3D_OK\n", hr); + "Got %lx expected D3D_OK\n", hr); for (j = 0; j < VERTS_PER_FACE * tc[i].num_faces; j++) { ok(adjacency[j] == tc[i].exp_id_adjacency[j], "Unexpected adjacency information (id) at (%d, %d)." - " Got %d expected %d\n", + " Got %ld expected %ld\n", i, j, adjacency[j], tc[i].exp_id_adjacency[j]); }
@@ -6304,10 +6304,10 @@ static void test_convert_point_reps_to_adjacency(void) /* NULL checks */ hr = mesh_null_check->lpVtbl->ConvertPointRepsToAdjacency(mesh_null_check, tc[0].point_reps, NULL); ok(hr == D3DERR_INVALIDCALL, "ConvertPointRepsToAdjacency NULL adjacency. " - "Got %x expected D3DERR_INVALIDCALL\n", hr); + "Got %lx expected D3DERR_INVALIDCALL\n", hr); hr = mesh_null_check->lpVtbl->ConvertPointRepsToAdjacency(mesh_null_check, NULL, NULL); ok(hr == D3DERR_INVALIDCALL, "ConvertPointRepsToAdjacency NULL point_reps and adjacency. " - "Got %x expected D3DERR_INVALIDCALL\n", hr); + "Got %lx expected D3DERR_INVALIDCALL\n", hr);
cleanup: if (mesh_null_check) @@ -6332,7 +6332,7 @@ static HRESULT init_test_mesh(const DWORD num_faces, const DWORD num_vertices, hr = D3DXCreateMesh(num_faces, num_vertices, options, declaration, device, mesh_ptr); if (FAILED(hr)) { - skip("Couldn't create mesh. Got %x expected D3D_OK\n", hr); + skip("Couldn't create mesh. Got %lx expected D3D_OK\n", hr); goto cleanup; } mesh = *mesh_ptr; @@ -8388,7 +8388,7 @@ static void test_weld_vertices(void) tc[i].indices, tc[i].attributes); if (FAILED(hr)) { - skip("Couldn't initialize test mesh %d.\n", i); + skip("Couldn't initialize test mesh %ld.\n", i); goto cleanup; }
@@ -8408,11 +8408,11 @@ static void test_weld_vertices(void)
hr = D3DXWeldVertices(mesh, tc[i].flags, tc[i].epsilons, tc[i].adjacency, adjacency_out, face_remap, &vertex_remap); - ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); + ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr); /* Check number of vertices*/ new_num_vertices = mesh->lpVtbl->GetNumVertices(mesh); ok(new_num_vertices == tc[i].exp_new_num_vertices, - "Mesh %d: new_num_vertices == %d, expected %d.\n", + "Mesh %ld: new_num_vertices == %ld, expected %ld.\n", i, new_num_vertices, tc[i].exp_new_num_vertices); /* Check index buffer */ if (tc[i].options & D3DXMESH_32BIT) @@ -8426,7 +8426,7 @@ static void test_weld_vertices(void) for (j = 0; j < VERTS_PER_FACE * tc[i].num_faces; j++) { ok(indices[j] == tc[i].exp_indices[j], - "Mesh %d: indices[%d] == %d, expected %d\n", + "Mesh %ld: indices[%ld] == %ld, expected %ld\n", i, j, indices[j], tc[i].exp_indices[j]); } } @@ -8441,7 +8441,7 @@ static void test_weld_vertices(void) for (j = 0; j < VERTS_PER_FACE * tc[i].num_faces; j++) { ok(indices_16bit[j] == tc[i].exp_indices[j], - "Mesh %d: indices_16bit[%d] == %d, expected %d\n", + "Mesh %ld: indices_16bit[%ld] == %d, expected %ld\n", i, j, indices_16bit[j], tc[i].exp_indices[j]); } } @@ -8452,14 +8452,14 @@ static void test_weld_vertices(void) for (j = 0; j < VERTS_PER_FACE * tc[i].num_faces; j++) { ok(adjacency_out[j] == tc[i].adjacency[j], - "Mesh %d: adjacency_out[%d] == %d, expected %d\n", + "Mesh %ld: adjacency_out[%ld] == %ld, expected %ld\n", i, j, adjacency_out[j], tc[i].adjacency[j]); } /* Check face_remap */ for (j = 0; j < tc[i].num_faces; j++) { ok(face_remap[j] == tc[i].exp_face_remap[j], - "Mesh %d: face_remap[%d] == %d, expected %d\n", + "Mesh %ld: face_remap[%ld] == %ld, expected %ld\n", i, j, face_remap[j], tc[i].exp_face_remap[j]); } /* Check vertex_remap */ @@ -8467,7 +8467,7 @@ static void test_weld_vertices(void) for (j = 0; j < VERTS_PER_FACE * tc[i].num_faces; j++) { ok(vertex_remap_ptr[j] == tc[i].exp_vertex_remap[j], - "Mesh %d: vertex_remap_ptr[%d] == %d, expected %d\n", + "Mesh %ld: vertex_remap_ptr[%ld] == %ld, expected %ld\n", i, j, vertex_remap_ptr[j], tc[i].exp_vertex_remap[j]); } /* Check vertex buffer */ @@ -10178,16 +10178,16 @@ static void test_clone_mesh(void) tc[i].indices, tc[i].attributes); if (FAILED(hr)) { - skip("Couldn't initialize test mesh %d. Got %x expected D3D_OK\n", i, hr); + skip("Couldn't initialize test mesh %d. Got %lx expected D3D_OK\n", i, hr); goto cleanup; }
hr = mesh->lpVtbl->CloneMesh(mesh, tc[i].clone_options, tc[i].new_declaration, test_context->device, &mesh_clone); - ok(hr == D3D_OK, "Test %u, got unexpected hr %#x.\n", i, hr); + ok(hr == D3D_OK, "Test %u, got unexpected hr %#lx.\n", i, hr);
hr = mesh_clone->lpVtbl->GetDeclaration(mesh_clone, new_declaration); - ok(hr == D3D_OK, "Test %u, got unexpected hr %#x.\n", i, hr); + ok(hr == D3D_OK, "Test %u, got unexpected hr %#lx.\n", i, hr); /* Check declaration elements */ for (j = 0; tc[i].new_declaration[j].Stream != 0xFF; j++) { @@ -10247,7 +10247,7 @@ static void test_clone_mesh(void) if (FAILED(hr)) { skip("Couldn't initialize test mesh for D3DXMESH_VB_SHARE case." - " Got %x expected D3D_OK\n", hr); + " Got %lx expected D3D_OK\n", hr); goto cleanup; }
@@ -10255,7 +10255,7 @@ static void test_clone_mesh(void) tc[2].new_declaration, test_context->device, &mesh_clone); ok(hr == D3DERR_INVALIDCALL, "CloneMesh D3DXMESH_VB_SHARE with new" - " declaration. Got %x, expected D3DERR_INVALIDCALL\n", + " declaration. Got %lx, expected D3DERR_INVALIDCALL\n", hr); mesh->lpVtbl->Release(mesh); mesh = NULL; @@ -10368,12 +10368,12 @@ static void test_valid_mesh(void) tc[i].indices, NULL); if (FAILED(hr)) { - skip("Couldn't initialize test mesh %d. Got %x expected D3D_OK\n", i, hr); + skip("Couldn't initialize test mesh %d. Got %lx expected D3D_OK\n", i, hr); goto cleanup; }
hr = D3DXValidMesh(mesh, tc[i].adjacency, &errors_and_warnings); - todo_wine ok(hr == tc[i].exp_hr, "Test %u, got unexpected hr %#x, expected %#x.\n", i, hr, tc[i].exp_hr); + todo_wine ok(hr == tc[i].exp_hr, "Test %u, got unexpected hr %#lx, expected %#lx.\n", i, hr, tc[i].exp_hr);
/* Note errors_and_warnings is deliberately not checked because that * would require copying wast amounts of the text output. */ @@ -10516,13 +10516,13 @@ static void test_optimize_faces(void) hr = D3DXOptimizeFaces(tc[i].indices, tc[i].num_faces, tc[i].num_vertices, tc[i].indices_are_32bit, face_remap); - ok(hr == D3D_OK, "Test %u, got unexpected hr %#x.\n", i, hr); + ok(hr == D3D_OK, "Test %u, got unexpected hr %#lx.\n", i, hr);
/* Compare face remap with expected face remap */ for (j = 0; j < tc[i].num_faces; j++) { ok(tc[i].exp_face_remap[j] == face_remap[j], - "Test case %d: Got face %d at %d, expected %d\n", i, + "Test case %d: Got face %ld at %ld, expected %ld\n", i, face_remap[j], j, tc[i].exp_face_remap[j]); }
@@ -10533,13 +10533,13 @@ static void test_optimize_faces(void) hr = D3DXOptimizeFaces(tc[0].indices, tc[0].num_faces, tc[0].num_vertices, tc[0].indices_are_32bit, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr);
/* Number of faces must be smaller than 2^15 */ hr = D3DXOptimizeFaces(tc[0].indices, 2 << 15, tc[0].num_vertices, FALSE, &smallest_face_remap); - ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr); }
static HRESULT clear_normals(ID3DXMesh *mesh) @@ -10634,7 +10634,7 @@ static void compare_normals(unsigned int line, const char *test_name, num_vertices = mesh->lpVtbl->GetNumVertices(mesh); vertex_stride = mesh->lpVtbl->GetNumBytesPerVertex(mesh);
- ok_(__FILE__, line)(num_vertices == num_normals, "%s: Expected %u vertices, got %u\n", test_name, + ok_(__FILE__, line)(num_vertices == num_normals, "%s: Expected %u vertices, got %lu\n", test_name, num_normals, num_vertices);
if (FAILED(mesh->lpVtbl->LockVertexBuffer(mesh, 0, (void **)&vertices))) @@ -10849,7 +10849,7 @@ static void test_compute_normals(void) for (i = 0; i < ARRAY_SIZE(compute_normals_funcs); i++) { hr = compute_normals_funcs[i].apply(NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "%s returned %#x, expected D3DERR_INVALIDCALL\n", compute_normals_funcs[i].name, hr); + ok(hr == D3DERR_INVALIDCALL, "%s returned %#lx, expected D3DERR_INVALIDCALL\n", compute_normals_funcs[i].name, hr); }
if (!(test_context = new_test_context())) @@ -10860,36 +10860,36 @@ static void test_compute_normals(void) device = test_context->device;
hr = D3DXCreateBox(device, 1.0f, 1.0f, 1.0f, &mesh, &adjacency); - ok(SUCCEEDED(hr), "D3DXCreateBox failed %#x\n", hr); + ok(SUCCEEDED(hr), "D3DXCreateBox failed %#lx\n", hr);
/* Check wrong input */ hr = D3DXComputeTangentFrameEx(mesh, D3DX_DEFAULT, 0, D3DX_DEFAULT, 0, D3DX_DEFAULT, 0, D3DDECLUSAGE_NORMAL, 0, D3DXTANGENT_GENERATE_IN_PLACE, NULL, -1.01f, -0.01f, -1.01f, NULL, NULL); - todo_wine ok(hr == D3DERR_INVALIDCALL, "D3DXComputeTangentFrameEx returned %#x, expected D3DERR_INVALIDCALL\n", hr); + todo_wine ok(hr == D3DERR_INVALIDCALL, "D3DXComputeTangentFrameEx returned %#lx, expected D3DERR_INVALIDCALL\n", hr);
hr = D3DXComputeTangentFrameEx(mesh, D3DX_DEFAULT, 0, D3DX_DEFAULT, 0, D3DX_DEFAULT, 0, D3DDECLUSAGE_NORMAL, 0, D3DXTANGENT_GENERATE_IN_PLACE | D3DXTANGENT_CALCULATE_NORMALS | D3DXTANGENT_WEIGHT_BY_AREA | D3DXTANGENT_WEIGHT_EQUAL, NULL, -1.01f, -0.01f, -1.01f, NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "D3DXComputeTangentFrameEx returned %#x, expected D3DERR_INVALIDCALL\n", hr); + ok(hr == D3DERR_INVALIDCALL, "D3DXComputeTangentFrameEx returned %#lx, expected D3DERR_INVALIDCALL\n", hr);
hr = D3DXComputeTangentFrameEx(mesh, D3DX_DEFAULT, 0, D3DX_DEFAULT, 0, D3DX_DEFAULT, 0, D3DDECLUSAGE_NORMAL, 0, 0, NULL, -1.01f, -0.01f, -1.01f, NULL, NULL); - todo_wine ok(hr == D3DERR_INVALIDCALL, "D3DXComputeTangentFrameEx returned %#x, expected D3DERR_INVALIDCALL\n", hr); + todo_wine ok(hr == D3DERR_INVALIDCALL, "D3DXComputeTangentFrameEx returned %#lx, expected D3DERR_INVALIDCALL\n", hr);
hr = D3DXComputeTangentFrameEx(mesh, D3DX_DEFAULT, 0, D3DX_DEFAULT, 0, D3DX_DEFAULT, 0, D3DDECLUSAGE_NORMAL, 1, D3DXTANGENT_GENERATE_IN_PLACE | D3DXTANGENT_CALCULATE_NORMALS, NULL, -1.01f, -0.01f, -1.01f, NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "D3DXComputeTangentFrameEx returned %#x, expected D3DERR_INVALIDCALL\n", hr); + ok(hr == D3DERR_INVALIDCALL, "D3DXComputeTangentFrameEx returned %#lx, expected D3DERR_INVALIDCALL\n", hr);
hr = D3DXComputeTangentFrameEx(mesh, D3DX_DEFAULT, 0, D3DX_DEFAULT, 0, D3DX_DEFAULT, 0, D3DX_DEFAULT, 0, D3DXTANGENT_GENERATE_IN_PLACE | D3DXTANGENT_CALCULATE_NORMALS, NULL, -1.01f, -0.01f, -1.01f, NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "D3DXComputeTangentFrameEx returned %#x, expected D3DERR_INVALIDCALL\n", hr); + ok(hr == D3DERR_INVALIDCALL, "D3DXComputeTangentFrameEx returned %#lx, expected D3DERR_INVALIDCALL\n", hr);
hr = D3DXComputeTangentFrameEx(mesh, D3DX_DEFAULT, 0, D3DX_DEFAULT, 0, D3DX_DEFAULT, 0, D3DDECLUSAGE_NORMAL, 0, D3DXTANGENT_CALCULATE_NORMALS, NULL, -1.01f, -0.01f, -1.01f, NULL, NULL); - todo_wine ok(hr == D3DERR_INVALIDCALL, "D3DXComputeTangentFrameEx returned %#x, expected D3DERR_INVALIDCALL\n", hr); + todo_wine ok(hr == D3DERR_INVALIDCALL, "D3DXComputeTangentFrameEx returned %#lx, expected D3DERR_INVALIDCALL\n", hr);
for (i = 0; i < ARRAY_SIZE(compute_normals_funcs); i++) { @@ -10897,158 +10897,158 @@ static void test_compute_normals(void)
/* Mesh without normals */ hr = mesh->lpVtbl->CloneMeshFVF(mesh, 0, D3DFVF_XYZ, device, &cloned_mesh); - ok(SUCCEEDED(hr), "CloneMeshFVF failed %#x\n", hr); + ok(SUCCEEDED(hr), "CloneMeshFVF failed %#lx\n", hr);
hr = func->apply(cloned_mesh, NULL); - ok(hr == D3DERR_INVALIDCALL, "%s returned %#x, expected D3DERR_INVALIDCALL\n", func->name, hr); + ok(hr == D3DERR_INVALIDCALL, "%s returned %#lx, expected D3DERR_INVALIDCALL\n", func->name, hr);
refcount = cloned_mesh->lpVtbl->Release(cloned_mesh); - ok(!refcount, "Mesh has %u references left\n", refcount); + ok(!refcount, "Mesh has %lu references left\n", refcount);
/* Mesh without positions */ hr = mesh->lpVtbl->CloneMeshFVF(mesh, 0, D3DFVF_NORMAL, device, &cloned_mesh); - ok(SUCCEEDED(hr), "CloneMeshFVF failed %#x\n", hr); + ok(SUCCEEDED(hr), "CloneMeshFVF failed %#lx\n", hr);
hr = func->apply(cloned_mesh, NULL); - ok(hr == D3DERR_INVALIDCALL, "%s returned %#x, expected D3DERR_INVALIDCALL\n", func->name, hr); + ok(hr == D3DERR_INVALIDCALL, "%s returned %#lx, expected D3DERR_INVALIDCALL\n", func->name, hr);
refcount = cloned_mesh->lpVtbl->Release(cloned_mesh); - ok(!refcount, "Mesh has %u references left\n", refcount); + ok(!refcount, "Mesh has %lu references left\n", refcount);
/* Mesh with D3DDECLTYPE_FLOAT1 normals */ hr = mesh->lpVtbl->CloneMesh(mesh, 0, position3f_normal1f_declaration, device, &cloned_mesh); - ok(SUCCEEDED(hr), "CloneMesh failed %#x\n", hr); + ok(SUCCEEDED(hr), "CloneMesh failed %#lx\n", hr);
hr = func->apply(cloned_mesh, NULL); - ok(hr == D3DERR_INVALIDCALL, "%s returned %#x, expected D3DERR_INVALIDCALL\n", func->name, hr); + ok(hr == D3DERR_INVALIDCALL, "%s returned %#lx, expected D3DERR_INVALIDCALL\n", func->name, hr);
refcount = cloned_mesh->lpVtbl->Release(cloned_mesh); - ok(!refcount, "Mesh has %u references left\n", refcount); + ok(!refcount, "Mesh has %lu references left\n", refcount);
/* Mesh with D3DDECLTYPE_FLOAT2 normals */ hr = mesh->lpVtbl->CloneMesh(mesh, 0, position3f_normal2f_declaration, device, &cloned_mesh); - ok(SUCCEEDED(hr), "CloneMesh failed %#x\n", hr); + ok(SUCCEEDED(hr), "CloneMesh failed %#lx\n", hr);
hr = func->apply(cloned_mesh, NULL); - ok(hr == D3DERR_INVALIDCALL, "%s returned %#x, expected D3DERR_INVALIDCALL\n", func->name, hr); + ok(hr == D3DERR_INVALIDCALL, "%s returned %#lx, expected D3DERR_INVALIDCALL\n", func->name, hr);
refcount = cloned_mesh->lpVtbl->Release(cloned_mesh); - ok(!refcount, "Mesh has %u references left\n", refcount); + ok(!refcount, "Mesh has %lu references left\n", refcount);
/* Mesh without adjacency data */ hr = clear_normals(mesh); - ok(SUCCEEDED(hr), "Failed to clear normals, returned %#x\n", hr); + ok(SUCCEEDED(hr), "Failed to clear normals, returned %#lx\n", hr);
hr = func->apply(mesh, NULL); - ok(hr == D3D_OK, "%s returned %#x, expected D3D_OK\n", func->name, hr); + ok(hr == D3D_OK, "%s returned %#lx, expected D3D_OK\n", func->name, hr);
compare_normals(__LINE__, func->name, mesh, box_normals, ARRAY_SIZE(box_normals));
/* Mesh with adjacency data */ hr = clear_normals(mesh); - ok(SUCCEEDED(hr), "Failed to clear normals, returned %#x\n", hr); + ok(SUCCEEDED(hr), "Failed to clear normals, returned %#lx\n", hr);
hr = func->apply(mesh, ID3DXBuffer_GetBufferPointer(adjacency)); - ok(hr == D3D_OK, "%s returned %#x, expected D3D_OK\n", func->name, hr); + ok(hr == D3D_OK, "%s returned %#lx, expected D3D_OK\n", func->name, hr);
compare_normals(__LINE__, func->name, mesh, box_normals_adjacency, ARRAY_SIZE(box_normals_adjacency));
/* Mesh with custom vertex format, D3DDECLTYPE_FLOAT4 normals and adjacency */ hr = mesh->lpVtbl->CloneMesh(mesh, 0, normal4f_position3f_declaration, device, &cloned_mesh); - ok(SUCCEEDED(hr), "CloneMesh failed %#x\n", hr); + ok(SUCCEEDED(hr), "CloneMesh failed %#lx\n", hr);
hr = clear_normals(cloned_mesh); - ok(SUCCEEDED(hr), "Failed to clear normals, returned %#x\n", hr); + ok(SUCCEEDED(hr), "Failed to clear normals, returned %#lx\n", hr);
hr = func->apply(cloned_mesh, ID3DXBuffer_GetBufferPointer(adjacency)); - ok(hr == D3D_OK, "%s returned %#x, expected D3D_OK\n", func->name, hr); + ok(hr == D3D_OK, "%s returned %#lx, expected D3D_OK\n", func->name, hr);
compare_normals(__LINE__, func->name, cloned_mesh, box_normals_adjacency, ARRAY_SIZE(box_normals_adjacency));
refcount = cloned_mesh->lpVtbl->Release(cloned_mesh); - ok(!refcount, "Mesh has %u references left\n", refcount); + ok(!refcount, "Mesh has %lu references left\n", refcount);
/* Mesh with D3DDECLTYPE_FLOAT1 positions and D3DDECLTYPE_FLOAT3 normals */ hr = mesh->lpVtbl->CloneMesh(mesh, 0, position1f_normal3f_declaration, device, &cloned_mesh); - ok(SUCCEEDED(hr), "CloneMesh failed %#x\n", hr); + ok(SUCCEEDED(hr), "CloneMesh failed %#lx\n", hr);
hr = clear_normals(cloned_mesh); - ok(SUCCEEDED(hr), "Failed to clear normals, returned %#x\n", hr); + ok(SUCCEEDED(hr), "Failed to clear normals, returned %#lx\n", hr);
hr = func->apply(cloned_mesh, ID3DXBuffer_GetBufferPointer(adjacency)); - ok(hr == D3D_OK, "%s returned %#x, expected D3D_OK\n", func->name, hr); + ok(hr == D3D_OK, "%s returned %#lx, expected D3D_OK\n", func->name, hr);
compare_normals(__LINE__, func->name, cloned_mesh, box_normals_position1f, ARRAY_SIZE(box_normals_position1f));
refcount = cloned_mesh->lpVtbl->Release(cloned_mesh); - ok(!refcount, "Mesh has %u references left\n", refcount); + ok(!refcount, "Mesh has %lu references left\n", refcount);
/* Mesh with D3DDECLTYPE_FLOAT2 positions and D3DDECLTYPE_FLOAT3 normals */ hr = mesh->lpVtbl->CloneMesh(mesh, 0, position2f_normal3f_declaration, device, &cloned_mesh); - ok(SUCCEEDED(hr), "CloneMesh failed %#x\n", hr); + ok(SUCCEEDED(hr), "CloneMesh failed %#lx\n", hr);
hr = clear_normals(cloned_mesh); - ok(SUCCEEDED(hr), "Failed to clear normals, returned %#x\n", hr); + ok(SUCCEEDED(hr), "Failed to clear normals, returned %#lx\n", hr);
hr = func->apply(cloned_mesh, ID3DXBuffer_GetBufferPointer(adjacency)); - ok(hr == D3D_OK, "%s returned %#x, expected D3D_OK\n", func->name, hr); + ok(hr == D3D_OK, "%s returned %#lx, expected D3D_OK\n", func->name, hr);
compare_normals(__LINE__, func->name, cloned_mesh, box_normals_position2f, ARRAY_SIZE(box_normals_position2f));
refcount = cloned_mesh->lpVtbl->Release(cloned_mesh); - ok(!refcount, "Mesh has %u references left\n", refcount); + ok(!refcount, "Mesh has %lu references left\n", refcount);
/* Mesh with D3DDECLTYPE_FLOAT4 positions and D3DDECLTYPE_FLOAT3 normals */ hr = mesh->lpVtbl->CloneMesh(mesh, 0, position4f_normal3f_declaration, device, &cloned_mesh); - ok(SUCCEEDED(hr), "CloneMesh failed %#x\n", hr); + ok(SUCCEEDED(hr), "CloneMesh failed %#lx\n", hr);
hr = clear_normals(cloned_mesh); - ok(SUCCEEDED(hr), "Failed to clear normals, returned %#x\n", hr); + ok(SUCCEEDED(hr), "Failed to clear normals, returned %#lx\n", hr);
hr = func->apply(cloned_mesh, ID3DXBuffer_GetBufferPointer(adjacency)); - ok(hr == D3D_OK, "%s returned %#x, expected D3D_OK\n", func->name, hr); + ok(hr == D3D_OK, "%s returned %#lx, expected D3D_OK\n", func->name, hr);
compare_normals(__LINE__, func->name, cloned_mesh, box_normals_adjacency, ARRAY_SIZE(box_normals_adjacency));
refcount = cloned_mesh->lpVtbl->Release(cloned_mesh); - ok(!refcount, "Mesh has %u references left\n", refcount); + ok(!refcount, "Mesh has %lu references left\n", refcount); }
hr = D3DXComputeTangentFrameEx(mesh, D3DX_DEFAULT, 0, D3DX_DEFAULT, 0, D3DX_DEFAULT, 0, D3DDECLUSAGE_NORMAL, 0, D3DXTANGENT_GENERATE_IN_PLACE | D3DXTANGENT_CALCULATE_NORMALS | D3DXTANGENT_WEIGHT_BY_AREA, NULL, -1.01f, -0.01f, -1.01f, NULL, NULL); - ok(hr == D3D_OK, "D3DXComputeTangentFrameEx returned %#x, expected D3D_OK\n", hr); + ok(hr == D3D_OK, "D3DXComputeTangentFrameEx returned %#lx, expected D3D_OK\n", hr);
compare_normals(__LINE__, "D3DXComputeTangentFrameEx", mesh, box_normals, ARRAY_SIZE(box_normals));
hr = D3DXComputeTangentFrameEx(mesh, D3DX_DEFAULT, 0, D3DX_DEFAULT, 0, D3DX_DEFAULT, 0, D3DDECLUSAGE_NORMAL, 0, D3DXTANGENT_GENERATE_IN_PLACE | D3DXTANGENT_CALCULATE_NORMALS | D3DXTANGENT_WEIGHT_BY_AREA, ID3DXBuffer_GetBufferPointer(adjacency), -1.01f, -0.01f, -1.01f, NULL, NULL); - ok(hr == D3D_OK, "D3DXComputeTangentFrameEx returned %#x, expected D3D_OK\n", hr); + ok(hr == D3D_OK, "D3DXComputeTangentFrameEx returned %#lx, expected D3D_OK\n", hr);
compare_normals(__LINE__, "D3DXComputeTangentFrameEx", mesh, box_normals_adjacency_area, ARRAY_SIZE(box_normals_adjacency_area));
hr = D3DXComputeTangentFrameEx(mesh, D3DX_DEFAULT, 0, D3DX_DEFAULT, 0, D3DX_DEFAULT, 0, D3DDECLUSAGE_NORMAL, 0, D3DXTANGENT_GENERATE_IN_PLACE | D3DXTANGENT_CALCULATE_NORMALS | D3DXTANGENT_WEIGHT_EQUAL, NULL, -1.01f, -0.01f, -1.01f, NULL, NULL); - ok(hr == D3D_OK, "D3DXComputeTangentFrameEx returned %#x, expected D3D_OK\n", hr); + ok(hr == D3D_OK, "D3DXComputeTangentFrameEx returned %#lx, expected D3D_OK\n", hr);
compare_normals(__LINE__, "D3DXComputeTangentFrameEx", mesh, box_normals, ARRAY_SIZE(box_normals));
hr = D3DXComputeTangentFrameEx(mesh, D3DX_DEFAULT, 0, D3DX_DEFAULT, 0, D3DX_DEFAULT, 0, D3DDECLUSAGE_NORMAL, 0, D3DXTANGENT_GENERATE_IN_PLACE | D3DXTANGENT_CALCULATE_NORMALS | D3DXTANGENT_WEIGHT_EQUAL, ID3DXBuffer_GetBufferPointer(adjacency), -1.01f, -0.01f, -1.01f, NULL, NULL); - ok(hr == D3D_OK, "D3DXComputeTangentFrameEx returned %#x, expected D3D_OK\n", hr); + ok(hr == D3D_OK, "D3DXComputeTangentFrameEx returned %#lx, expected D3D_OK\n", hr);
compare_normals(__LINE__, "D3DXComputeTangentFrameEx", mesh, box_normals_adjacency_area, ARRAY_SIZE(box_normals_adjacency_area));
refcount = mesh->lpVtbl->Release(mesh); - ok(!refcount, "Mesh has %u references left\n", refcount); + ok(!refcount, "Mesh has %lu references left\n", refcount); refcount = ID3DXBuffer_Release(adjacency); - ok(!refcount, "Buffer has %u references left\n", refcount); + ok(!refcount, "Buffer has %lu references left\n", refcount);
hr = D3DXCreateSphere(device, 1.0f, 4, 6, &mesh, &adjacency); - ok(SUCCEEDED(hr), "D3DXCreateSphere failed %#x\n", hr); + ok(SUCCEEDED(hr), "D3DXCreateSphere failed %#lx\n", hr);
for (i = 0; i < ARRAY_SIZE(compute_normals_funcs); i++) { @@ -11056,19 +11056,19 @@ static void test_compute_normals(void)
/* Sphere without adjacency data */ hr = clear_normals(mesh); - ok(SUCCEEDED(hr), "Failed to clear normals, returned %#x\n", hr); + ok(SUCCEEDED(hr), "Failed to clear normals, returned %#lx\n", hr);
hr = func->apply(mesh, NULL); - ok(hr == D3D_OK, "%s returned %#x, expected D3D_OK\n", func->name, hr); + ok(hr == D3D_OK, "%s returned %#lx, expected D3D_OK\n", func->name, hr);
compare_normals(__LINE__, func->name, mesh, sphere_normals, ARRAY_SIZE(sphere_normals));
/* Sphere with adjacency data */ hr = clear_normals(mesh); - ok(SUCCEEDED(hr), "Failed to clear normals, returned %#x\n", hr); + ok(SUCCEEDED(hr), "Failed to clear normals, returned %#lx\n", hr);
hr = func->apply(mesh, ID3DXBuffer_GetBufferPointer(adjacency)); - ok(hr == D3D_OK, "%s returned %#x, expected D3D_OK\n", func->name, hr); + ok(hr == D3D_OK, "%s returned %#lx, expected D3D_OK\n", func->name, hr);
compare_normals(__LINE__, func->name, mesh, sphere_normals, ARRAY_SIZE(sphere_normals)); } @@ -11076,35 +11076,35 @@ static void test_compute_normals(void) hr = D3DXComputeTangentFrameEx(mesh, D3DX_DEFAULT, 0, D3DX_DEFAULT, 0, D3DX_DEFAULT, 0, D3DDECLUSAGE_NORMAL, 0, D3DXTANGENT_GENERATE_IN_PLACE | D3DXTANGENT_CALCULATE_NORMALS | D3DXTANGENT_WEIGHT_BY_AREA, NULL, -1.01f, -0.01f, -1.01f, NULL, NULL); - ok(hr == D3D_OK, "D3DXComputeTangentFrameEx returned %#x, expected D3D_OK\n", hr); + ok(hr == D3D_OK, "D3DXComputeTangentFrameEx returned %#lx, expected D3D_OK\n", hr);
compare_normals(__LINE__, "D3DXComputeTangentFrameEx", mesh, sphere_normals_area, ARRAY_SIZE(sphere_normals_area));
hr = D3DXComputeTangentFrameEx(mesh, D3DX_DEFAULT, 0, D3DX_DEFAULT, 0, D3DX_DEFAULT, 0, D3DDECLUSAGE_NORMAL, 0, D3DXTANGENT_GENERATE_IN_PLACE | D3DXTANGENT_CALCULATE_NORMALS | D3DXTANGENT_WEIGHT_BY_AREA, ID3DXBuffer_GetBufferPointer(adjacency), -1.01f, -0.01f, -1.01f, NULL, NULL); - ok(hr == D3D_OK, "D3DXComputeTangentFrameEx returned %#x, expected D3D_OK\n", hr); + ok(hr == D3D_OK, "D3DXComputeTangentFrameEx returned %#lx, expected D3D_OK\n", hr);
compare_normals(__LINE__, "D3DXComputeTangentFrameEx", mesh, sphere_normals_area, ARRAY_SIZE(sphere_normals_area));
hr = D3DXComputeTangentFrameEx(mesh, D3DX_DEFAULT, 0, D3DX_DEFAULT, 0, D3DX_DEFAULT, 0, D3DDECLUSAGE_NORMAL, 0, D3DXTANGENT_GENERATE_IN_PLACE | D3DXTANGENT_CALCULATE_NORMALS | D3DXTANGENT_WEIGHT_EQUAL, NULL, -1.01f, -0.01f, -1.01f, NULL, NULL); - ok(hr == D3D_OK, "D3DXComputeTangentFrameEx returned %#x, expected D3D_OK\n", hr); + ok(hr == D3D_OK, "D3DXComputeTangentFrameEx returned %#lx, expected D3D_OK\n", hr);
compare_normals(__LINE__, "D3DXComputeTangentFrameEx", mesh, sphere_normals_equal, ARRAY_SIZE(sphere_normals_equal));
hr = D3DXComputeTangentFrameEx(mesh, D3DX_DEFAULT, 0, D3DX_DEFAULT, 0, D3DX_DEFAULT, 0, D3DDECLUSAGE_NORMAL, 0, D3DXTANGENT_GENERATE_IN_PLACE | D3DXTANGENT_CALCULATE_NORMALS | D3DXTANGENT_WEIGHT_EQUAL, ID3DXBuffer_GetBufferPointer(adjacency), -1.01f, -0.01f, -1.01f, NULL, NULL); - ok(hr == D3D_OK, "D3DXComputeTangentFrameEx returned %#x, expected D3D_OK\n", hr); + ok(hr == D3D_OK, "D3DXComputeTangentFrameEx returned %#lx, expected D3D_OK\n", hr);
compare_normals(__LINE__, "D3DXComputeTangentFrameEx", mesh, sphere_normals_equal, ARRAY_SIZE(sphere_normals_equal));
refcount = mesh->lpVtbl->Release(mesh); - ok(!refcount, "Mesh has %u references left\n", refcount); + ok(!refcount, "Mesh has %lu references left\n", refcount); refcount = ID3DXBuffer_Release(adjacency); - ok(!refcount, "Buffer has %u references left\n", refcount); + ok(!refcount, "Buffer has %lu references left\n", refcount);
free_test_context(test_context); } @@ -11116,30 +11116,30 @@ static void D3DXCreateAnimationControllerTest(void) UINT value;
hr = D3DXCreateAnimationController(0, 0, 0, 0, NULL); - ok(hr == D3D_OK, "Got unexpected hr returned %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr returned %#lx.\n", hr);
animation = (void*)0xdeadbeef; hr = D3DXCreateAnimationController(0, 1, 1, 1, &animation); - ok(hr == D3D_OK, "Got unexpected hr returned %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr returned %#lx.\n", hr); ok(animation == (void*)0xdeadbeef, "Got unexpected animation %p.\n", animation);
animation = (void*)0xdeadbeef; hr = D3DXCreateAnimationController(1, 0, 1, 1, &animation); - ok(hr == D3D_OK, "Got unexpected hr returned %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr returned %#lx.\n", hr); ok(animation == (void*)0xdeadbeef, "Got unexpected animation %p.\n", animation);
animation = (void*)0xdeadbeef; hr = D3DXCreateAnimationController(1, 1, 0, 1, &animation); - ok(hr == D3D_OK, "Got unexpected hr returned %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr returned %#lx.\n", hr); ok(animation == (void*)0xdeadbeef, "Got unexpected animation %p.\n", animation);
animation = (void*)0xdeadbeef; hr = D3DXCreateAnimationController(1, 1, 1, 0, &animation); - ok(hr == D3D_OK, "Got unexpected hr returned %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr returned %#lx.\n", hr); ok(animation == (void*)0xdeadbeef, "Got unexpected animation %p.\n", animation);
hr = D3DXCreateAnimationController(1, 1, 1, 1, &animation); - ok(hr == D3D_OK, "Got unexpected hr returned %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr returned %#lx.\n", hr);
value = animation->lpVtbl->GetMaxNumAnimationOutputs(animation); ok(value == 1, "Got unexpected value %u.\n", value); @@ -11156,7 +11156,7 @@ static void D3DXCreateAnimationControllerTest(void) animation->lpVtbl->Release(animation);
hr = D3DXCreateAnimationController(100, 101, 102, 103, &animation); - ok(hr == D3D_OK, "Got unexpected hr returned %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr returned %#lx.\n", hr);
value = animation->lpVtbl->GetMaxNumAnimationOutputs(animation); ok(value == 100, "Got unexpected value %u.\n", value); @@ -11182,10 +11182,10 @@ static void D3DXCreateKeyframedAnimationSetTest(void) HRESULT hr;
hr = D3DXCreateKeyframedAnimationSet("wine_bottle", 5.0, D3DXPLAY_LOOP, 0, 0, NULL, &set); - ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr);
hr = D3DXCreateKeyframedAnimationSet("wine_bottle", 5.0, D3DXPLAY_LOOP, 10, 0, NULL, &set); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
name = set->lpVtbl->GetName(set); ok(!strcmp(name, "wine_bottle"), "Got unexpected name %s.\n", debugstr_a(name)); @@ -11379,7 +11379,7 @@ static void test_load_skin_mesh_from_xof(void) IDirect3D9_Release(d3d); if (FAILED(hr)) { - skip("Failed to create device, hr %#x.\n", hr); + skip("Failed to create device, hr %#lx.\n", hr); DestroyWindow(hwnd); return; } @@ -11394,46 +11394,46 @@ static void test_load_skin_mesh_from_xof(void)
hr = D3DXLoadSkinMeshFromXof(file_data, 0, device, &adjacency, &materials, &effects, &count, &skin_info, &mesh); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); ok(!!adjacency, "Got unexpected value %p.\n", adjacency); ok(!materials, "Got unexpected value %p.\n", materials); ok(!effects, "Got unexpected value %p.\n", effects); - ok(!count, "Got unexpected value %u.\n", count); + ok(!count, "Got unexpected value %lu.\n", count); ok(!!skin_info, "Got unexpected value %p.\n", skin_info); ok(!!mesh, "Got unexpected value %p.\n", mesh); count = mesh->lpVtbl->GetNumVertices(mesh); - ok(count == 3, "Got unexpected value %u.\n", count); + ok(count == 3, "Got unexpected value %lu.\n", count); count = mesh->lpVtbl->GetNumFaces(mesh); - ok(count == 1, "Got unexpected value %u.\n", count); + ok(count == 1, "Got unexpected value %lu.\n", count);
hr = skin_info->lpVtbl->GetDeclaration(skin_info, declaration); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); compare_elements(declaration, expected_declaration, __LINE__, 0);
fvf = skin_info->lpVtbl->GetFVF(skin_info); - ok(fvf == D3DFVF_XYZ, "Got unexpected value %u.\n", fvf); + ok(fvf == D3DFVF_XYZ, "Got unexpected value %lu.\n", fvf);
count = skin_info->lpVtbl->GetNumBones(skin_info); - ok(!count, "Got unexpected value %u.\n", count); + ok(!count, "Got unexpected value %lu.\n", count);
influence = skin_info->lpVtbl->GetMinBoneInfluence(skin_info); ok(!influence, "Got unexpected value %.8e.\n", influence);
memset(max_influences, 0x55, sizeof(max_influences)); hr = skin_info->lpVtbl->GetMaxVertexInfluences(skin_info, max_influences); - todo_wine ok(hr == D3D_OK, "Got unexpected value %#x.\n", hr); - todo_wine ok(!max_influences[0], "Got unexpected value %u.\n", max_influences[0]); - ok(max_influences[1] == 0x55555555, "Got unexpected value %u.\n", max_influences[1]); - ok(max_influences[2] == 0x55555555, "Got unexpected value %u.\n", max_influences[2]); + todo_wine ok(hr == D3D_OK, "Got unexpected value %#lx.\n", hr); + todo_wine ok(!max_influences[0], "Got unexpected value %lu.\n", max_influences[0]); + ok(max_influences[1] == 0x55555555, "Got unexpected value %lu.\n", max_influences[1]); + ok(max_influences[2] == 0x55555555, "Got unexpected value %lu.\n", max_influences[2]);
bone_name = skin_info->lpVtbl->GetBoneName(skin_info, 0); ok(!bone_name, "Got unexpected value %p.\n", bone_name);
count = skin_info->lpVtbl->GetNumBoneInfluences(skin_info, 0); - ok(!count, "Got unexpected value %u.\n", count); + ok(!count, "Got unexpected value %lu.\n", count);
count = skin_info->lpVtbl->GetNumBoneInfluences(skin_info, 1); - ok(!count, "Got unexpected value %u.\n", count); + ok(!count, "Got unexpected value %lu.\n", count);
matrix = skin_info->lpVtbl->GetBoneOffsetMatrix(skin_info, -1); ok(!matrix, "Got unexpected value %p.\n", matrix); @@ -11446,7 +11446,7 @@ static void test_load_skin_mesh_from_xof(void) adjacency->lpVtbl->Release(adjacency); file_data->lpVtbl->Release(file_data); refcount = IDirect3DDevice9_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); DestroyWindow(hwnd); }
diff --git a/dlls/d3dx9_36/tests/shader.c b/dlls/d3dx9_36/tests/shader.c index fe3dfde9001..bbeb58bdfca 100644 --- a/dlls/d3dx9_36/tests/shader.c +++ b/dlls/d3dx9_36/tests/shader.c @@ -320,15 +320,15 @@ static void test_get_shader_version(void) DWORD shader_version;
shader_version = D3DXGetShaderVersion(simple_vs); - ok(shader_version == D3DVS_VERSION(1, 1), "Got shader version 0x%08x, expected 0x%08x\n", + ok(shader_version == D3DVS_VERSION(1, 1), "Got shader version 0x%08lx, expected 0x%08x\n", shader_version, D3DVS_VERSION(1, 1));
shader_version = D3DXGetShaderVersion(simple_ps); - ok(shader_version == D3DPS_VERSION(1, 1), "Got shader version 0x%08x, expected 0x%08x\n", + ok(shader_version == D3DPS_VERSION(1, 1), "Got shader version 0x%08lx, expected 0x%08x\n", shader_version, D3DPS_VERSION(1, 1));
shader_version = D3DXGetShaderVersion(NULL); - ok(shader_version == 0, "Got shader version 0x%08x, expected 0\n", shader_version); + ok(shader_version == 0, "Got shader version 0x%08lx, expected 0\n", shader_version); }
static void test_find_shader_comment(void) @@ -338,65 +338,65 @@ static void test_find_shader_comment(void) UINT size = 100;
hr = D3DXFindShaderComment(NULL, MAKEFOURCC('C','T','A','B'), &data, &size); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); ok(!data, "Got %p, expected NULL\n", data); ok(!size, "Got %u, expected 0\n", size);
hr = D3DXFindShaderComment(shader_with_ctab, MAKEFOURCC('C','T','A','B'), NULL, &size); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr); ok(size == 28, "Got %u, expected 28\n", size);
hr = D3DXFindShaderComment(shader_with_ctab, MAKEFOURCC('C','T','A','B'), &data, NULL); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr); ok(data == shader_with_ctab + 6, "Got result %p, expected %p\n", data, shader_with_ctab + 6);
hr = D3DXFindShaderComment(shader_with_ctab, 0, &data, &size); - ok(hr == S_FALSE, "Got result %x, expected 1 (S_FALSE)\n", hr); + ok(hr == S_FALSE, "Got result %lx, expected 1 (S_FALSE)\n", hr); ok(!data, "Got %p, expected NULL\n", data); ok(!size, "Got %u, expected 0\n", size);
hr = D3DXFindShaderComment(shader_with_ctab, MAKEFOURCC('X','X','X','X'), &data, &size); - ok(hr == S_FALSE, "Got result %x, expected 1 (S_FALSE)\n", hr); + ok(hr == S_FALSE, "Got result %lx, expected 1 (S_FALSE)\n", hr); ok(!data, "Got %p, expected NULL\n", data); ok(!size, "Got %u, expected 0\n", size);
hr = D3DXFindShaderComment(shader_with_ctab, MAKEFOURCC('C','T','A','B'), &data, &size); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr); ok(data == shader_with_ctab + 6, "Got result %p, expected %p\n", data, shader_with_ctab + 6); ok(size == 28, "Got result %u, expected 28\n", size);
hr = D3DXFindShaderComment(shader_zero, MAKEFOURCC('C','T','A','B'), &data, &size); - ok(hr == D3DXERR_INVALIDDATA, "Got result %x, expected %x (D3DXERR_INVALIDDATA)\n", hr, D3DXERR_INVALIDDATA); + ok(hr == D3DXERR_INVALIDDATA, "Got result %lx, expected %x (D3DXERR_INVALIDDATA)\n", hr, D3DXERR_INVALIDDATA); ok(!data, "Got %p, expected NULL\n", data); ok(!size, "Got %u, expected 0\n", size);
hr = D3DXFindShaderComment(shader_invalid, MAKEFOURCC('C','T','A','B'), &data, &size); - ok(hr == D3DXERR_INVALIDDATA, "Got result %x, expected %x (D3DXERR_INVALIDDATA)\n", hr, D3DXERR_INVALIDDATA); + ok(hr == D3DXERR_INVALIDDATA, "Got result %lx, expected %x (D3DXERR_INVALIDDATA)\n", hr, D3DXERR_INVALIDDATA); ok(!data, "Got %p, expected NULL\n", data); ok(!size, "Got %u, expected 0\n", size);
hr = D3DXFindShaderComment(shader_empty, MAKEFOURCC('C','T','A','B'), &data, &size); - ok(hr == S_FALSE, "Got result %x, expected %x (S_FALSE)\n", hr, S_FALSE); + ok(hr == S_FALSE, "Got result %lx, expected %lx (S_FALSE)\n", hr, S_FALSE); ok(!data, "Got %p, expected NULL\n", data); ok(!size, "Got %u, expected 0\n", size);
hr = D3DXFindShaderComment(simple_fx, FCC_TEXT, &data, &size); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr); ok(data == simple_fx + 3, "Got result %p, expected %p\n", data, simple_fx + 3); ok(size == 4, "Got result %u, expected 4\n", size);
hr = D3DXFindShaderComment(simple_tx, FCC_TEXT, &data, &size); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr); ok(data == simple_tx + 3, "Got result %p, expected %p\n", data, simple_tx + 3); ok(size == 4, "Got result %u, expected 4\n", size);
hr = D3DXFindShaderComment(simple_7ffe, FCC_TEXT, &data, &size); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr); ok(data == simple_7ffe + 3, "Got result %p, expected %p\n", data, simple_7ffe + 3); ok(size == 4, "Got result %u, expected 4\n", size);
hr = D3DXFindShaderComment(simple_7fff, FCC_TEXT, &data, &size); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr); ok(data == simple_7fff + 3, "Got result %p, expected %p\n", data, simple_7fff + 3); ok(size == 4, "Got result %u, expected 4\n", size); } @@ -415,82 +415,82 @@ static void test_get_shader_constant_table_ex(void)
constant_table = (ID3DXConstantTable *)0xdeadbeef; hr = D3DXGetShaderConstantTableEx(NULL, 0, &constant_table); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); ok(constant_table == NULL, "D3DXGetShaderConstantTableEx() failed, got %p\n", constant_table);
constant_table = (ID3DXConstantTable *)0xdeadbeef; hr = D3DXGetShaderConstantTableEx(shader_zero, 0, &constant_table); - ok(hr == D3D_OK, "Got result %x, expected %x (D3D_OK)\n", hr, D3D_OK); + ok(hr == D3D_OK, "Got result %lx, expected %lx (D3D_OK)\n", hr, D3D_OK); ok(constant_table == NULL, "D3DXGetShaderConstantTableEx() failed, got %p\n", constant_table);
constant_table = (ID3DXConstantTable *)0xdeadbeef; hr = D3DXGetShaderConstantTableEx(shader_invalid, 0, &constant_table); - ok(hr == D3D_OK, "Got result %x, expected %x (D3D_OK)\n", hr, D3D_OK); + ok(hr == D3D_OK, "Got result %lx, expected %lx (D3D_OK)\n", hr, D3D_OK); ok(constant_table == NULL, "D3DXGetShaderConstantTableEx() failed, got %p\n", constant_table);
constant_table = (ID3DXConstantTable *)0xdeadbeef; hr = D3DXGetShaderConstantTableEx(shader_empty, 0, &constant_table); - ok(hr == D3DXERR_INVALIDDATA, "Got result %x, expected %x (D3DXERR_INVALIDDATA)\n", hr, D3DXERR_INVALIDDATA); + ok(hr == D3DXERR_INVALIDDATA, "Got result %lx, expected %x (D3DXERR_INVALIDDATA)\n", hr, D3DXERR_INVALIDDATA); ok(constant_table == NULL, "D3DXGetShaderConstantTableEx() failed, got %p\n", constant_table);
/* No CTAB data */ constant_table = (ID3DXConstantTable *)0xdeadbeef; hr = D3DXGetShaderConstantTableEx(simple_ps, 0, &constant_table); - ok(hr == D3DXERR_INVALIDDATA, "Got result %x, expected %x (D3DXERR_INVALIDDATA)\n", hr, D3DXERR_INVALIDDATA); + ok(hr == D3DXERR_INVALIDDATA, "Got result %lx, expected %x (D3DXERR_INVALIDDATA)\n", hr, D3DXERR_INVALIDDATA); ok(constant_table == NULL, "D3DXGetShaderConstantTableEx() failed, got %p\n", constant_table);
/* With invalid CTAB data */ hr = D3DXGetShaderConstantTableEx(shader_with_invalid_ctab, 0, &constant_table); ok(hr == D3DXERR_INVALIDDATA || broken(hr == D3D_OK), /* winxp 64-bit, w2k3 64-bit */ - "Got result %x, expected %x (D3DXERR_INVALIDDATA)\n", hr, D3DXERR_INVALIDDATA); + "Got result %lx, expected %x (D3DXERR_INVALIDDATA)\n", hr, D3DXERR_INVALIDDATA); if (constant_table) ID3DXConstantTable_Release(constant_table);
hr = D3DXGetShaderConstantTableEx(simple_fx, 0, &constant_table); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr); ok(!constant_table, "D3DXGetShaderConstantTableEx() returned a non-NULL constant table.\n");
hr = D3DXGetShaderConstantTableEx(simple_tx, 0, &constant_table); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr); ok(!constant_table, "D3DXGetShaderConstantTableEx() returned a non-NULL constant table.\n");
hr = D3DXGetShaderConstantTableEx(shader_with_ctab, 0, &constant_table); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr); ok(constant_table != NULL, "D3DXGetShaderConstantTableEx() failed, got NULL\n");
size = ID3DXConstantTable_GetBufferSize(constant_table); - ok(size == 28, "Got result %x, expected 28\n", size); + ok(size == 28, "Got result %lx, expected 28\n", size);
data = ID3DXConstantTable_GetBufferPointer(constant_table); ok(!memcmp(data, shader_with_ctab + 6, size), "Retrieved wrong CTAB data\n");
hr = ID3DXConstantTable_GetDesc(constant_table, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
hr = ID3DXConstantTable_GetDesc(constant_table, &desc); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr); ok(desc.Creator == (const char *)data + 0x10, "Got result %p, expected %p\n", desc.Creator, (const char *)data + 0x10); - ok(desc.Version == D3DVS_VERSION(3, 0), "Got result %x, expected %x\n", desc.Version, D3DVS_VERSION(3, 0)); + ok(desc.Version == D3DVS_VERSION(3, 0), "Got result %lx, expected %x\n", desc.Version, D3DVS_VERSION(3, 0)); ok(desc.Constants == 0, "Got result %x, expected 0\n", desc.Constants);
ID3DXConstantTable_Release(constant_table);
hr = D3DXGetShaderConstantTableEx(shader_with_ctab_constants, 0, &constant_table); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr); ok(constant_table != NULL, "D3DXGetShaderConstantTableEx() failed, got NULL\n");
/* Test GetDesc */ hr = ID3DXConstantTable_GetDesc(constant_table, &desc); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr); ok(!strcmp(desc.Creator, "Wine project"), "Got result '%s', expected 'Wine project'\n", desc.Creator); - ok(desc.Version == D3DVS_VERSION(3, 0), "Got result %x, expected %x\n", desc.Version, D3DVS_VERSION(3, 0)); + ok(desc.Version == D3DVS_VERSION(3, 0), "Got result %lx, expected %x\n", desc.Version, D3DVS_VERSION(3, 0)); ok(desc.Constants == 3, "Got result %x, expected 3\n", desc.Constants);
/* Test GetConstant */ constant = ID3DXConstantTable_GetConstant(constant_table, NULL, 0); ok(constant != NULL, "No constant found\n"); hr = ID3DXConstantTable_GetConstantDesc(constant_table, constant, &constant_desc, &nb); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr); ok(!strcmp(constant_desc.Name, "Constant1"), "Got result '%s', expected 'Constant1'\n", constant_desc.Name); ok(constant_desc.Class == D3DXPC_VECTOR, "Got result %x, expected %u (D3DXPC_VECTOR)\n", @@ -503,7 +503,7 @@ static void test_get_shader_constant_table_ex(void) constant = ID3DXConstantTable_GetConstant(constant_table, NULL, 1); ok(constant != NULL, "No constant found\n"); hr = ID3DXConstantTable_GetConstantDesc(constant_table, constant, &constant_desc, &nb); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr); ok(!strcmp(constant_desc.Name, "Constant2"), "Got result '%s', expected 'Constant2'\n", constant_desc.Name); ok(constant_desc.Class == D3DXPC_MATRIX_COLUMNS, "Got result %x, expected %u (D3DXPC_MATRIX_COLUMNS)\n", @@ -516,7 +516,7 @@ static void test_get_shader_constant_table_ex(void) constant = ID3DXConstantTable_GetConstant(constant_table, NULL, 2); ok(constant != NULL, "No constant found\n"); hr = ID3DXConstantTable_GetConstantDesc(constant_table, constant, &constant_desc, &nb); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr); ok(!strcmp(constant_desc.Name, "Constant3"), "Got result '%s', expected 'Constant3'\n", constant_desc.Name); ok(constant_desc.Class == D3DXPC_MATRIX_COLUMNS, "Got result %x, expected %u (D3DXPC_MATRIX_COLUMNS)\n", @@ -536,40 +536,40 @@ static void test_get_shader_constant_table_ex(void) constant = ID3DXConstantTable_GetConstantByName(constant_table, NULL, "Constant3"); ok(constant != NULL, "No constant found\n"); hr = ID3DXConstantTable_GetConstantDesc(constant_table, constant, &constant_desc, &nb); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr); ok(!memcmp(&constant_desc, &constant_desc_save, sizeof(D3DXCONSTANT_DESC)), "Got different constant data\n");
/* Test GetConstantDesc */ constant = ID3DXConstantTable_GetConstant(constant_table, NULL, 0); ok(constant != NULL, "No constant found\n"); hr = ID3DXConstantTable_GetConstantDesc(constant_table, NULL, &constant_desc, &nb); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); hr = ID3DXConstantTable_GetConstantDesc(constant_table, constant, NULL, &nb); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr); hr = ID3DXConstantTable_GetConstantDesc(constant_table, constant, &constant_desc, NULL); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr); hr = ID3DXConstantTable_GetConstantDesc(constant_table, "Constant unknown", &constant_desc, &nb); - ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); hr = ID3DXConstantTable_GetConstantDesc(constant_table, "Constant3", &constant_desc, &nb); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr); ok(!memcmp(&constant_desc, &constant_desc_save, sizeof(D3DXCONSTANT_DESC)), "Got different constant data\n");
ID3DXConstantTable_Release(constant_table);
hr = D3DXGetShaderConstantTableEx(shader_with_ctab_constants, D3DXCONSTTABLE_LARGEADDRESSAWARE, &constant_table); - ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr); ok(!!constant_table, "Unexpected constant table %p.\n", constant_table);
hr = ID3DXConstantTable_GetDesc(constant_table, &desc); - ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr); ok(!strcmp(desc.Creator, "Wine project"), "Unexpected Creator %s.\n", debugstr_a(desc.Creator)); - ok(desc.Version == D3DVS_VERSION(3, 0), "Unexpected Version %#x.\n", desc.Version); + ok(desc.Version == D3DVS_VERSION(3, 0), "Unexpected Version %#lx.\n", desc.Version); ok(desc.Constants == 3, "Unexpected Constants %u.\n", desc.Constants);
constant = ID3DXConstantTable_GetConstant(constant_table, NULL, 0); ok(!!constant, "No constant found.\n"); hr = ID3DXConstantTable_GetConstantDesc(constant_table, constant, &constant_desc, &nb); - ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr); ok(!strcmp(constant_desc.Name, "Constant1"), "Unexpected Name %s.\n", debugstr_a(constant_desc.Name)); ok(constant_desc.Class == D3DXPC_VECTOR, "Unexpected Class %u.\n", constant_desc.Class); ok(constant_desc.Type == D3DXPT_FLOAT, "Unexpected Type %u.\n", constant_desc.Type); @@ -585,7 +585,7 @@ static void test_get_shader_constant_table_ex(void) ID3DXConstantTable_Release(constant_table);
hr = D3DXGetShaderConstantTableEx(fx_shader_with_ctab, 0, &constant_table); - ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr); ok(!constant_table, "D3DXGetShaderConstantTableEx() returned a non-NULL constant table.\n"); }
@@ -599,7 +599,7 @@ static void test_constant_table(const char *test_name, const DWORD *ctable_fn,
/* Get the constant table from the shader itself */ res = D3DXGetShaderConstantTable(ctable_fn, &ctable); - ok(res == D3D_OK, "D3DXGetShaderConstantTable failed on %s: got %08x\n", test_name, res); + ok(res == D3D_OK, "D3DXGetShaderConstantTable failed on %s: got %08lx\n", test_name, res);
for (i = 0; i < count; i++) { @@ -611,7 +611,7 @@ static void test_constant_table(const char *test_name, const DWORD *ctable_fn, const_handle = ID3DXConstantTable_GetConstantByName(ctable, NULL, expected->Name);
res = ID3DXConstantTable_GetConstantDesc(ctable, const_handle, &actual, &pCount); - ok(SUCCEEDED(res), "%s in %s: ID3DXConstantTable_GetConstantDesc returned %08x\n", expected->Name, + ok(SUCCEEDED(res), "%s in %s: ID3DXConstantTable_GetConstantDesc returned %08lx\n", expected->Name, test_name, res); ok(pCount == 1, "%s in %s: Got more or less descriptions: %d\n", expected->Name, test_name, pCount);
@@ -703,24 +703,24 @@ static void test_setting_basic_table(IDirect3DDevice9 *device)
/* Get the constant table from the shader itself */ res = D3DXGetShaderConstantTable(ctab_basic, &ctable); - ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got 0x%08x\n", res); + ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got 0x%08lx\n", res);
/* Set constants */ res = ID3DXConstantTable_SetMatrix(ctable, device, "mvp", &mvp); - ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable mvp: got 0x%08x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable mvp: got 0x%08lx\n", res);
res = ID3DXConstantTable_SetInt(ctable, device, "i", i + 1); - ok(res == D3D_OK, "ID3DXConstantTable_SetInt failed on variable i: got 0x%08x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetInt failed on variable i: got 0x%08lx\n", res);
/* Check that setting i again will overwrite the previous value */ res = ID3DXConstantTable_SetInt(ctable, device, "i", i); - ok(res == D3D_OK, "ID3DXConstantTable_SetInt failed on variable i: got 0x%08x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetInt failed on variable i: got 0x%08lx\n", res);
res = ID3DXConstantTable_SetFloat(ctable, device, "f", f); - ok(res == D3D_OK, "ID3DXConstantTable_SetFloat failed on variable f: got 0x%08x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetFloat failed on variable f: got 0x%08lx\n", res);
res = ID3DXConstantTable_SetVector(ctable, device, "f4", &f4); - ok(res == D3D_OK, "ID3DXConstantTable_SetVector failed on variable f4: got 0x%08x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetVector failed on variable f4: got 0x%08lx\n", res);
/* Get constants back and validate */ IDirect3DDevice9_GetVertexShaderConstantF(device, 0, out, 4); @@ -754,7 +754,7 @@ static void test_setting_basic_table(IDirect3DDevice9 *device)
/* Finally test using a set* function for one type to set a variable of another type (should succeed) */ res = ID3DXConstantTable_SetVector(ctable, device, "f", &f4); - ok(res == D3D_OK, "ID3DXConstantTable_SetVector failed on variable f: 0x%08x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetVector failed on variable f: 0x%08lx\n", res);
IDirect3DDevice9_GetVertexShaderConstantF(device, 6, out, 1); ok(out[0] == f4.x && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f, @@ -764,7 +764,7 @@ static void test_setting_basic_table(IDirect3DDevice9 *device) memset(out, 0, sizeof(out)); IDirect3DDevice9_SetVertexShaderConstantF(device, 6, out, 1); res = ID3DXConstantTable_SetMatrix(ctable, device, "f", &mvp); - ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable f: 0x%08x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable f: 0x%08lx\n", res);
IDirect3DDevice9_GetVertexShaderConstantF(device, 6, out, 1); ok(out[0] == S(U(mvp))._11 && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f, @@ -779,7 +779,7 @@ static void test_setting_basic_table(IDirect3DDevice9 *device)
/* SetVector shouldn't change the value of a matrix constant */ res = ID3DXConstantTable_SetVector(ctable, device, "mvp", &f4); - ok(res == D3D_OK, "ID3DXConstantTable_SetVector failed on variable f: 0x%08x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetVector failed on variable f: 0x%08lx\n", res);
IDirect3DDevice9_GetVertexShaderConstantF(device, 0, out, 4); ok(out[0] == 0.0f && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f @@ -795,7 +795,7 @@ static void test_setting_basic_table(IDirect3DDevice9 *device) out[12], out[13], out[14], out[15]);
res = ID3DXConstantTable_SetFloat(ctable, device, "mvp", f); - ok(res == D3D_OK, "ID3DXConstantTable_SetFloat failed on variable mvp: 0x%08x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetFloat failed on variable mvp: 0x%08lx\n", res);
IDirect3DDevice9_GetVertexShaderConstantF(device, 0, out, 4); ok(out[0] == 0.0f && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f @@ -811,7 +811,7 @@ static void test_setting_basic_table(IDirect3DDevice9 *device) out[12], out[13], out[14], out[15]);
res = ID3DXConstantTable_SetFloat(ctable, device, "f4", f); - ok(res == D3D_OK, "ID3DXConstantTable_SetFloat failed on variable f4: 0x%08x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetFloat failed on variable f4: 0x%08lx\n", res);
IDirect3DDevice9_GetVertexShaderConstantF(device, 7, out, 1); ok(out[0] == 0.0f && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f, @@ -820,7 +820,7 @@ static void test_setting_basic_table(IDirect3DDevice9 *device) out[0], out[1], out[2], out[3]);
res = ID3DXConstantTable_SetMatrixTranspose(ctable, device, "f", &mvp); - ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTranspose failed on variable f: 0x%08x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTranspose failed on variable f: 0x%08lx\n", res);
IDirect3DDevice9_GetVertexShaderConstantF(device, 6, out, 1); ok(out[0] == S(U(mvp))._11 && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f, @@ -828,7 +828,7 @@ static void test_setting_basic_table(IDirect3DDevice9 *device) out[0], S(U(mvp))._11);
res = ID3DXConstantTable_SetMatrixTranspose(ctable, device, "f4", &mvp); - ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTranspose failed on variable f4: 0x%08x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTranspose failed on variable f4: 0x%08lx\n", res);
IDirect3DDevice9_GetVertexShaderConstantF(device, 7, out, 1); ok(out[0] == S(U(mvp))._11 && out[1] == S(U(mvp))._21 && out[2] == S(U(mvp))._31 && out[3] == S(U(mvp))._41, @@ -840,7 +840,7 @@ static void test_setting_basic_table(IDirect3DDevice9 *device) memset(out, 0, sizeof(out)); IDirect3DDevice9_SetVertexShaderConstantF(device, 6, out, 1); res = ID3DXConstantTable_SetMatrixPointerArray(ctable, device, "f", matrix_pointer, 1); - ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixPointerArray failed on variable f: got %#x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixPointerArray failed on variable f: got %#lx\n", res);
IDirect3DDevice9_GetVertexShaderConstantF(device, 6, out, 1); ok(out[0] == S(U(mvp))._11 && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f, @@ -849,7 +849,7 @@ static void test_setting_basic_table(IDirect3DDevice9 *device) out[0], S(U(mvp))._11);
res = ID3DXConstantTable_SetMatrixPointerArray(ctable, device, "f4", matrix_pointer, 1); - ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixPointerArray failed on variable f4: got %#x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixPointerArray failed on variable f4: got %#lx\n", res);
IDirect3DDevice9_GetVertexShaderConstantF(device, 7, out, 1); ok(out[0] == S(U(mvp))._11 && out[1] == S(U(mvp))._12 && out[2] == S(U(mvp))._13 && out[3] == S(U(mvp))._14, @@ -861,7 +861,7 @@ static void test_setting_basic_table(IDirect3DDevice9 *device) memset(out, 0, sizeof(out)); IDirect3DDevice9_SetVertexShaderConstantF(device, 6, out, 1); res = ID3DXConstantTable_SetMatrixTransposePointerArray(ctable, device, "f", matrix_pointer, 1); - ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTransposePointerArray failed on variable f: got %#x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTransposePointerArray failed on variable f: got %#lx\n", res);
IDirect3DDevice9_GetVertexShaderConstantF(device, 6, out, 1); ok(out[0] == S(U(mvp))._11 && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f, @@ -870,7 +870,7 @@ static void test_setting_basic_table(IDirect3DDevice9 *device) out[0], S(U(mvp))._11);
res = ID3DXConstantTable_SetMatrixTransposePointerArray(ctable, device, "f4", matrix_pointer, 1); - ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTransposePointerArray failed on variable f4: got %#x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTransposePointerArray failed on variable f4: got %#lx\n", res);
IDirect3DDevice9_GetVertexShaderConstantF(device, 7, out, 1); ok(out[0] == S(U(mvp))._11 && out[1] == S(U(mvp))._21 && out[2] == S(U(mvp))._31 && out[3] == S(U(mvp))._41, @@ -880,7 +880,7 @@ static void test_setting_basic_table(IDirect3DDevice9 *device) S(U(mvp))._11, S(U(mvp))._21, S(U(mvp))._31, S(U(mvp))._41);
refcnt = ID3DXConstantTable_Release(ctable); - ok(refcnt == 0, "The constant table reference count was %u, should be 0\n", refcnt); + ok(refcnt == 0, "The constant table reference count was %lu, should be 0\n", refcnt); }
static void test_setting_matrices_table(IDirect3DDevice9 *device) @@ -898,13 +898,13 @@ static void test_setting_matrices_table(IDirect3DDevice9 *device) float out[32];
res = D3DXGetShaderConstantTable(ctab_matrices, &ctable); - ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %#x\n", res); + ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %#lx\n", res);
res = ID3DXConstantTable_SetMatrix(ctable, device, "imatrix2x3", &fmatrix); - ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable imatrix2x3: got %#x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable imatrix2x3: got %#lx\n", res);
res = ID3DXConstantTable_SetMatrix(ctable, device, "fmatrix3x1", &fmatrix); - ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable fmatrix3x1: got %#x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable fmatrix3x1: got %#lx\n", res);
IDirect3DDevice9_GetVertexShaderConstantF(device, 4, out, 2); ok(out[0] == (int)S(U(fmatrix))._11 && out[1] == (int)S(U(fmatrix))._12 && out[2] == (int)S(U(fmatrix))._13 @@ -926,23 +926,23 @@ static void test_setting_matrices_table(IDirect3DDevice9 *device) ID3DXConstantTable_Release(ctable);
res = D3DXGetShaderConstantTable(ctab_matrices2, &ctable); - ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %#x\n", res); + ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %#lx\n", res);
/* SetMatrix */ res = ID3DXConstantTable_SetMatrix(ctable, device, "c2x3", &fmatrix); - ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable c2x3: got %#x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable c2x3: got %#lx\n", res);
res = ID3DXConstantTable_SetMatrix(ctable, device, "r2x3", &fmatrix); - ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable r2x3: got %#x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable r2x3: got %#lx\n", res);
res = ID3DXConstantTable_SetMatrix(ctable, device, "c3x2", &fmatrix); - ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable c3x2: got %#x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable c3x2: got %#lx\n", res);
res = ID3DXConstantTable_SetMatrix(ctable, device, "r3x2", &fmatrix); - ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable r3x2: got %#x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable r3x2: got %#lx\n", res);
res = ID3DXConstantTable_SetMatrix(ctable, device, "c3x3", &fmatrix); - ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable c3x3: got %#x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable c3x3: got %#lx\n", res);
IDirect3DDevice9_GetVertexShaderConstantF(device, 7, out, 3); ok(out[0] == S(U(fmatrix))._11 && out[1] == S(U(fmatrix))._21 && out[2] == 0.0f && out[3] == 0.0f @@ -958,7 +958,7 @@ static void test_setting_matrices_table(IDirect3DDevice9 *device) S(U(fmatrix))._13, S(U(fmatrix))._23, 0.0f, 0.0f);
res = ID3DXConstantTable_SetMatrix(ctable, device, "r4x4", &fmatrix); - ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable r4x4: got %#x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable r4x4: got %#lx\n", res);
IDirect3DDevice9_GetVertexShaderConstantF(device, 15, out, 2); ok(out[0] == S(U(fmatrix))._11 && out[1] == S(U(fmatrix))._12 && out[2] == S(U(fmatrix))._13 && out[3] == 0.0f @@ -1016,10 +1016,10 @@ static void test_setting_matrices_table(IDirect3DDevice9 *device)
/* SetMatrixTranspose */ res = ID3DXConstantTable_SetMatrixTranspose(ctable, device, "c2x3", &fmatrix); - ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTranspose failed on variable c2x3: got %#x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTranspose failed on variable c2x3: got %#lx\n", res);
res = ID3DXConstantTable_SetMatrixTranspose(ctable, device, "r2x3", &fmatrix); - ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTranspose failed on variable r2x3: got %#x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTranspose failed on variable r2x3: got %#lx\n", res);
IDirect3DDevice9_GetVertexShaderConstantF(device, 7, out, 3); ok(out[0] == S(U(fmatrix))._11 && out[1] == S(U(fmatrix))._12 && out[2] == 0.0f && out[3] == 0.0f @@ -1045,10 +1045,10 @@ static void test_setting_matrices_table(IDirect3DDevice9 *device)
/* SetMatrixPointerArray */ res = ID3DXConstantTable_SetMatrixPointerArray(ctable, device, "c2x3", matrix_pointer, 1); - ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixPointerArray failed on variable c2x3: got %#x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixPointerArray failed on variable c2x3: got %#lx\n", res);
res = ID3DXConstantTable_SetMatrixPointerArray(ctable, device, "r2x3", matrix_pointer, 1); - ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixPointerArray failed on variable r2x3: got %#x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixPointerArray failed on variable r2x3: got %#lx\n", res);
IDirect3DDevice9_GetVertexShaderConstantF(device, 7, out, 3); ok(out[0] == S(U(fmatrix))._11 && out[1] == S(U(fmatrix))._21 && out[2] == 0.0f && out[3] == 0.0f @@ -1074,10 +1074,10 @@ static void test_setting_matrices_table(IDirect3DDevice9 *device)
/* SetMatrixTransposePointerArray */ res = ID3DXConstantTable_SetMatrixTransposePointerArray(ctable, device, "c2x3", matrix_pointer, 1); - ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTransposePointerArray failed on variable c2x3: got %#x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTransposePointerArray failed on variable c2x3: got %#lx\n", res);
res = ID3DXConstantTable_SetMatrixTransposePointerArray(ctable, device, "r2x3", matrix_pointer, 1); - ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTransposePointerArray failed on variable r2x3: got %#x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTransposePointerArray failed on variable r2x3: got %#lx\n", res);
IDirect3DDevice9_GetVertexShaderConstantF(device, 7, out, 3); ok(out[0] == S(U(fmatrix))._11 && out[1] == S(U(fmatrix))._12 && out[2] == 0.0f && out[3] == 0.0f @@ -1137,13 +1137,13 @@ static void test_setting_arrays_table(IDirect3DDevice9 *device)
/* Get the constant table from the shader */ res = D3DXGetShaderConstantTable(ctab_arrays, &ctable); - ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got 0x%08x\n", res); + ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got 0x%08lx\n", res);
/* Set constants */
/* Make sure that we cannot set registers that do not belong to this constant */ res = ID3DXConstantTable_SetFloatArray(ctable, device, "farray", farray, 8); - ok(res == D3D_OK, "ID3DXConstantTable_SetFloatArray failed: got 0x%08x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetFloatArray failed: got 0x%08lx\n", res);
IDirect3DDevice9_GetVertexShaderConstantF(device, 8, out, 8); ok(out[0] == farray[0] && out[4] == farray[1] && out[8] == farray[2] && out[12] == farray[3], @@ -1155,7 +1155,7 @@ static void test_setting_arrays_table(IDirect3DDevice9 *device)
/* ivecarray takes up only 1 register, but a matrix takes up 4, so no elements should be set */ res = ID3DXConstantTable_SetMatrix(ctable, device, "ivecarray", &fmtxarray[0]); - ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed: got 0x%08x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed: got 0x%08lx\n", res);
IDirect3DDevice9_GetVertexShaderConstantF(device, 18, out, 4); ok(out[0] == 0.0f && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f, @@ -1163,7 +1163,7 @@ static void test_setting_arrays_table(IDirect3DDevice9 *device)
/* Try setting an integer array to an array declared as a float array */ res = ID3DXConstantTable_SetIntArray(ctable, device, "farray", iarray, 4); - ok(res == D3D_OK, "ID3DXConstantTable_SetIntArray failed: got 0x%08x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetIntArray failed: got 0x%08lx\n", res);
IDirect3DDevice9_GetVertexShaderConstantF(device, 8, out, 4); ok(out[0] == iarray[0] && out[4] == iarray[1] && out[8] == iarray[2] && out[12] == iarray[3], @@ -1171,16 +1171,16 @@ static void test_setting_arrays_table(IDirect3DDevice9 *device) out[0], out[4], out[8], out[12], iarray[0], iarray[1], iarray[2], iarray[3]);
res = ID3DXConstantTable_SetFloatArray(ctable, device, "farray", farray, 4); - ok(res == D3D_OK, "ID3DXConstantTable_SetFloatArray failed: got x0%08x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetFloatArray failed: got x0%08lx\n", res);
res = ID3DXConstantTable_SetVectorArray(ctable, device, "fvecarray", fvecarray, 2); - ok(res == D3D_OK, "ID3DXConstantTable_SetVectorArray failed: got 0x%08x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetVectorArray failed: got 0x%08lx\n", res);
res = ID3DXConstantTable_SetMatrixArray(ctable, device, "fmtxarray", fmtxarray, 2); - ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixArray failed: got 0x%08x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixArray failed: got 0x%08lx\n", res);
res = ID3DXConstantTable_SetBoolArray(ctable, device, "barray", barray, 2); - ok(res == D3D_OK, "ID3DXConstantTable_SetBoolArray failed: got 0x%08x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetBoolArray failed: got 0x%08lx\n", res);
/* Read back constants */ IDirect3DDevice9_GetVertexShaderConstantF(device, 8, out, 4); @@ -1213,7 +1213,7 @@ static void test_setting_arrays_table(IDirect3DDevice9 *device) out[16], out[17], out[18], out[19], S(U(fmtxarray[1]))._11, S(U(fmtxarray[1]))._12, S(U(fmtxarray[1]))._13, S(U(fmtxarray[1]))._14);
refcnt = ID3DXConstantTable_Release(ctable); - ok(refcnt == 0, "The constant table reference count was %u, should be 0\n", refcnt); + ok(refcnt == 0, "The constant table reference count was %lu, should be 0\n", refcnt); }
static void test_SetDefaults(IDirect3DDevice9 *device) @@ -1231,16 +1231,16 @@ static void test_SetDefaults(IDirect3DDevice9 *device) ID3DXConstantTable *ctable;
res = D3DXGetShaderConstantTable(ctab_basic, &ctable); - ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %08x\n", res); + ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %08lx\n", res);
res = ID3DXConstantTable_SetVector(ctable, device, "f4", &f4); - ok(res == D3D_OK, "ID3DXConstantTable_SetVector failed: got %08x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetVector failed: got %08lx\n", res);
res = ID3DXConstantTable_SetMatrix(ctable, device, "mvp", &mvp); - ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed: got %08x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed: got %08lx\n", res);
res = ID3DXConstantTable_SetDefaults(ctable, device); - ok(res == D3D_OK, "ID3dXConstantTable_SetDefaults failed: got %08x\n", res); + ok(res == D3D_OK, "ID3dXConstantTable_SetDefaults failed: got %08lx\n", res);
/* SetDefaults doesn't change constants without default values */ IDirect3DDevice9_GetVertexShaderConstantF(device, 0, out, 4); @@ -1265,10 +1265,10 @@ static void test_SetDefaults(IDirect3DDevice9 *device) ID3DXConstantTable_Release(ctable);
res = D3DXGetShaderConstantTable(ctab_with_default_values, &ctable); - ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %08x\n", res); + ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %08lx\n", res);
res = ID3DXConstantTable_SetDefaults(ctable, device); - ok(res == D3D_OK, "ID3DXConstantTable_SetDefaults failed: got %08x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetDefaults failed: got %08lx\n", res);
IDirect3DDevice9_GetVertexShaderConstantF(device, 0, out, 4); ok(memcmp(out, mat4_default_value, sizeof(mat4_default_value)) == 0, @@ -1320,13 +1320,13 @@ static void test_SetValue(IDirect3DDevice9 *device) ID3DXConstantTable *ctable;
res = D3DXGetShaderConstantTable(ctab_basic, &ctable); - ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %08x\n", res); + ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %08lx\n", res);
IDirect3DDevice9_SetVertexShaderConstantF(device, 7, def, 1);
/* SetValue called with 0 bytes size doesn't change value */ res = ID3DXConstantTable_SetValue(ctable, device, "f4", &f4, 0); - ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08lx\n", res);
IDirect3DDevice9_GetVertexShaderConstantF(device, 7, out, 1); ok(memcmp(out, def, sizeof(f4)) == 0, @@ -1334,7 +1334,7 @@ static void test_SetValue(IDirect3DDevice9 *device) out[0], out[1], out[2], out[3], def[0], def[1], def[2], def[3]);
res = ID3DXConstantTable_SetValue(ctable, device, "f4", &f4, sizeof(f4)); - ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08lx\n", res);
IDirect3DDevice9_GetVertexShaderConstantF(device, 7, out, 1); ok(memcmp(out, &f4, sizeof(f4)) == 0, @@ -1345,7 +1345,7 @@ static void test_SetValue(IDirect3DDevice9 *device)
/* SetValue called with size smaller than constant size doesn't change value */ res = ID3DXConstantTable_SetValue(ctable, device, "mvp", &mvp, sizeof(mvp) / 2); - ok(res == D3D_OK, "ID3DXConstantTable_SetValue returned %08x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetValue returned %08lx\n", res);
IDirect3DDevice9_GetVertexShaderConstantF(device, 0, out, 4); ok(memcmp(out, def, sizeof(def)) == 0, @@ -1361,7 +1361,7 @@ static void test_SetValue(IDirect3DDevice9 *device) def[3], def[7], def[11], def[15]);
res = ID3DXConstantTable_SetValue(ctable, device, "mvp", &mvp, sizeof(mvp)); - ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08lx\n", res);
IDirect3DDevice9_GetVertexShaderConstantF(device, 0, out, 4); ok(out[0] == S(U(mvp))._11 && out[4] == S(U(mvp))._12 && out[8] == S(U(mvp))._13 && out[12] == S(U(mvp))._14, @@ -1380,10 +1380,10 @@ static void test_SetValue(IDirect3DDevice9 *device) ID3DXConstantTable_Release(ctable);
res = D3DXGetShaderConstantTable(ctab_with_default_values, &ctable); - ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %08x\n", res); + ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %08lx\n", res);
res = ID3DXConstantTable_SetValue(ctable, device, "arr", arr, sizeof(arr)); - ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08lx\n", res);
IDirect3DDevice9_GetVertexShaderConstantF(device, 8, out, 3); ok(out[0] == arr[0] && out[4] == arr[1] && out[8] == arr[2] @@ -1396,13 +1396,13 @@ static void test_SetValue(IDirect3DDevice9 *device) ID3DXConstantTable_Release(ctable);
res = D3DXGetShaderConstantTable(ctab_matrices, &ctable); - ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %08x\n", res); + ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %08lx\n", res);
res = ID3DXConstantTable_SetValue(ctable, device, "fmatrix3x1", fmatrix, sizeof(fmatrix)); - ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08lx\n", res);
res = ID3DXConstantTable_SetValue(ctable, device, "imatrix2x3", imatrix, sizeof(imatrix)); - ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08lx\n", res);
IDirect3DDevice9_GetVertexShaderConstantF(device, 4, out, 2); ok(out[0] == imatrix[0] && out[1] == imatrix[1] && out[2] == imatrix[2] && out[3] == 0.0f @@ -1421,17 +1421,17 @@ static void test_SetValue(IDirect3DDevice9 *device) ID3DXConstantTable_Release(ctable);
res = D3DXGetShaderConstantTable(ctab_arrays, &ctable); - ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %08x\n", res); + ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %08lx\n", res);
res = ID3DXConstantTable_SetValue(ctable, device, "barray", barray, sizeof(barray)); - ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08lx\n", res);
res = ID3DXConstantTable_SetValue(ctable, device, "fvecarray", fvecarray, sizeof(fvecarray)); - ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08lx\n", res);
IDirect3DDevice9_SetVertexShaderConstantF(device, 8, def, 4); res = ID3DXConstantTable_SetValue(ctable, device, "farray", farray, sizeof(farray)); - ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08x\n", res); + ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08lx\n", res);
/* 2 elements of farray were set */ IDirect3DDevice9_GetVertexShaderConstantF(device, 8, out, 4); @@ -1495,7 +1495,7 @@ static void test_setting_constants(void) hr = IDirect3D9_CreateDevice(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, wnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &device); if (FAILED(hr)) { - skip("Failed to create IDirect3DDevice9 object %#x\n", hr); + skip("Failed to create IDirect3DDevice9 object %#lx\n", hr); IDirect3D9_Release(d3d); DestroyWindow(wnd); return; @@ -1509,10 +1509,10 @@ static void test_setting_constants(void)
/* Release resources */ refcnt = IDirect3DDevice9_Release(device); - ok(refcnt == 0, "The Direct3D device reference count was %u, should be 0\n", refcnt); + ok(refcnt == 0, "The Direct3D device reference count was %lu, should be 0\n", refcnt);
refcnt = IDirect3D9_Release(d3d); - ok(refcnt == 0, "The Direct3D object reference count was %u, should be 0\n", refcnt); + ok(refcnt == 0, "The Direct3D object reference count was %lu, should be 0\n", refcnt);
if (wnd) DestroyWindow(wnd); } @@ -1527,7 +1527,7 @@ static void test_get_sampler_index(void) ULONG refcnt;
res = D3DXGetShaderConstantTable(ctab_samplers, &ctable); - ok(res == D3D_OK, "D3DXGetShaderConstantTable failed on ctab_samplers: got %08x\n", res); + ok(res == D3D_OK, "D3DXGetShaderConstantTable failed on ctab_samplers: got %08lx\n", res);
index = ID3DXConstantTable_GetSamplerIndex(ctable, "sampler1"); ok(index == 0, "ID3DXConstantTable_GetSamplerIndex returned wrong index: Got %d, expected 0\n", index); @@ -1544,7 +1544,7 @@ static void test_get_sampler_index(void) index);
refcnt = ID3DXConstantTable_Release(ctable); - ok(refcnt == 0, "The ID3DXConstantTable reference count was %u, should be 0\n", refcnt); + ok(refcnt == 0, "The ID3DXConstantTable reference count was %lu, should be 0\n", refcnt); }
/* @@ -1621,16 +1621,16 @@ if (0) { /* crashes if bytecode is NULL */ hr = D3DXGetShaderSamplers(NULL, NULL, &count); - ok(hr == D3D_OK, "D3DXGetShaderSamplers failed, got %x, expected %x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXGetShaderSamplers failed, got %lx, expected %lx\n", hr, D3D_OK); }
hr = D3DXGetShaderSamplers(get_shader_samplers_blob, NULL, NULL); - ok(hr == D3D_OK, "D3DXGetShaderSamplers failed, got %x, expected %x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXGetShaderSamplers failed, got %lx, expected %lx\n", hr, D3D_OK);
samplers[5] = "dummy";
hr = D3DXGetShaderSamplers(get_shader_samplers_blob, samplers, NULL); - ok(hr == D3D_OK, "D3DXGetShaderSamplers failed, got %x, expected %x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXGetShaderSamplers failed, got %lx, expected %lx\n", hr, D3D_OK);
/* check that sampler points to shader blob */ sampler_orig = (const char *)&get_shader_samplers_blob[0x2e]; @@ -1655,11 +1655,11 @@ if (0) samplers[5] = "dummy";
hr = D3DXGetShaderSamplers(get_shader_samplers_blob, NULL, &count); - ok(hr == D3D_OK, "D3DXGetShaderSamplers failed, got %x, expected %x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXGetShaderSamplers failed, got %lx, expected %lx\n", hr, D3D_OK); ok(count == 5, "D3DXGetShaderSamplers failed, got %u, expected %u\n", count, 5);
hr = D3DXGetShaderSamplers(get_shader_samplers_blob, samplers, &count); - ok(hr == D3D_OK, "D3DXGetShaderSamplers failed, got %x, expected %x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXGetShaderSamplers failed, got %lx, expected %lx\n", hr, D3D_OK); ok(count == 5, "D3DXGetShaderSamplers failed, got %u, expected %u\n", count, 5);
/* check that sampler points to shader blob */ @@ -1682,12 +1682,12 @@ if (0)
/* check without ctab */ hr = D3DXGetShaderSamplers(simple_vs, samplers, &count); - ok(hr == D3D_OK, "D3DXGetShaderSamplers failed, got %x, expected %x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXGetShaderSamplers failed, got %lx, expected %lx\n", hr, D3D_OK); ok(count == 0, "D3DXGetShaderSamplers failed, got %u, expected %u\n", count, 0);
/* check invalid ctab */ hr = D3DXGetShaderSamplers(shader_with_invalid_ctab, samplers, &count); - ok(hr == D3D_OK, "D3DXGetShaderSamplers failed, got %x, expected %x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXGetShaderSamplers failed, got %lx, expected %lx\n", hr, D3D_OK); ok(count == 0, "D3DXGetShaderSamplers failed, got %u, expected %u\n", count, 0); }
@@ -1860,7 +1860,7 @@ static void test_get_shader_constant_variables(void) DWORD *ctab;
hr = D3DXGetShaderConstantTable(test_get_shader_constant_variables_blob, &ctable); - ok(hr == D3D_OK, "D3DXGetShaderConstantTable failed, got %08x, expected %08x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXGetShaderConstantTable failed, got %08lx, expected %08lx\n", hr, D3D_OK);
ctab = ID3DXConstantTable_GetBufferPointer(ctable); ok(ctab[0] == test_get_shader_constant_variables_blob[3], "ID3DXConstantTable_GetBufferPointer failed\n"); @@ -1875,7 +1875,7 @@ static void test_get_shader_constant_variables(void) ok(constant != NULL, "GetConstantByName "%s" failed\n", fullname);
hr = ID3DXConstantTable_GetConstantDesc(ctable, constant, &desc, &nr); - ok(hr == D3D_OK, "GetConstantDesc "%s" failed, got %08x, expected %08x\n", fullname, hr, D3D_OK); + ok(hr == D3D_OK, "GetConstantDesc "%s" failed, got %08lx, expected %08lx\n", fullname, hr, D3D_OK);
ok(!strcmp(expected_desc->Name, desc.Name), "GetConstantDesc "%s" failed, got "%s", expected "%s"\n", fullname, desc.Name, expected_desc->Name); @@ -1979,7 +1979,7 @@ static void test_get_shader_constant_variables(void) ok(constant == element, "GetConstantByName failed, got %p, expected %p\n", element, constant);
count = ID3DXConstantTable_Release(ctable); - ok(count == 0, "Release failed, got %u, expected %u\n", count, 0); + ok(count == 0, "Release failed, got %lu, expected %u\n", count, 0); }
#define REGISTER_OUTPUT_SIZE 48 @@ -5890,22 +5890,22 @@ static void registerset_clear(IDirect3DDevice9 *device) memset(zero, 0xde, 4096);
hr = IDirect3DDevice9_SetVertexShaderConstantF(device, 0, (FLOAT*)zero, 256); - ok(hr == D3D_OK, "Clear failed, got %08x, expected %08x\n", hr, D3D_OK); + ok(hr == D3D_OK, "Clear failed, got %08lx, expected %08lx\n", hr, D3D_OK);
hr = IDirect3DDevice9_SetPixelShaderConstantF(device, 0, (FLOAT*)zero, 224); - ok(hr == D3D_OK, "Clear failed, got %08x, expected %08x\n", hr, D3D_OK); + ok(hr == D3D_OK, "Clear failed, got %08lx, expected %08lx\n", hr, D3D_OK);
hr = IDirect3DDevice9_SetVertexShaderConstantB(device, 0, (BOOL*)zero, 16); - ok(hr == D3D_OK, "Clear failed, got %08x, expected %08x\n", hr, D3D_OK); + ok(hr == D3D_OK, "Clear failed, got %08lx, expected %08lx\n", hr, D3D_OK);
hr = IDirect3DDevice9_SetPixelShaderConstantB(device, 0, (BOOL*)zero, 16); - ok(hr == D3D_OK, "Clear failed, got %08x, expected %08x\n", hr, D3D_OK); + ok(hr == D3D_OK, "Clear failed, got %08lx, expected %08lx\n", hr, D3D_OK);
hr = IDirect3DDevice9_SetVertexShaderConstantI(device, 0, (INT*)zero, 16); - ok(hr == D3D_OK, "Clear failed, got %08x, expected %08x\n", hr, D3D_OK); + ok(hr == D3D_OK, "Clear failed, got %08lx, expected %08lx\n", hr, D3D_OK);
hr = IDirect3DDevice9_SetPixelShaderConstantI(device, 0, (INT*)zero, 16); - ok(hr == D3D_OK, "Clear failed, got %08x, expected %08x\n", hr, D3D_OK); + ok(hr == D3D_OK, "Clear failed, got %08lx, expected %08lx\n", hr, D3D_OK); }
static UINT registerset_compare(IDirect3DDevice9 *device, BOOL is_vs, D3DXREGISTER_SET regset, @@ -5924,14 +5924,14 @@ static UINT registerset_compare(IDirect3DDevice9 *device, BOOL is_vs, D3DXREGIST count = 16; if (is_vs) hr = IDirect3DDevice9_GetVertexShaderConstantB(device, 0, (BOOL*)ret, 16); else hr = IDirect3DDevice9_GetPixelShaderConstantB(device, 0, (BOOL*)ret, 16); - ok(hr == D3D_OK, "Get*ShaderConstantB failed, got %08x\n", hr); + ok(hr == D3D_OK, "Get*ShaderConstantB failed, got %08lx\n", hr); break;
case D3DXRS_INT4: count = 256; if (is_vs) hr = IDirect3DDevice9_GetVertexShaderConstantI(device, 0, (INT*)ret, 16); else hr = IDirect3DDevice9_GetPixelShaderConstantI(device, 0, (INT*)ret, 16); - ok(hr == D3D_OK, "Get*ShaderConstantI failed, got %08x\n", hr); + ok(hr == D3D_OK, "Get*ShaderConstantI failed, got %08lx\n", hr); break;
case D3DXRS_FLOAT4: @@ -5941,7 +5941,7 @@ static UINT registerset_compare(IDirect3DDevice9 *device, BOOL is_vs, D3DXREGIST count = 896; hr = IDirect3DDevice9_GetPixelShaderConstantF(device, 0, (FLOAT*)ret, 224); } - ok(hr == D3D_OK, "Get*ShaderConstantF failed, got %08x\n", hr); + ok(hr == D3D_OK, "Get*ShaderConstantF failed, got %08lx\n", hr); break;
default: @@ -5955,7 +5955,7 @@ static UINT registerset_compare(IDirect3DDevice9 *device, BOOL is_vs, D3DXREGIST DWORD value = 0xdededede; if (i >= start && i < start + in_count) value = expected[i - start];
- ok(ret[i] == value, "Get*ShaderConstant failed, %u got 0x%x(%f) expected 0x%x(%f)\n", i, + ok(ret[i] == value, "Get*ShaderConstant failed, %u got 0x%lx(%f) expected 0x%lx(%f)\n", i, ret[i], ((FLOAT *)ret)[i], value, *((FLOAT *)&value)); if (ret[i] != value) err++; } @@ -6063,14 +6063,14 @@ static void test_registerset(void) hr = IDirect3D9_CreateDevice(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, wnd, D3DCREATE_MIXED_VERTEXPROCESSING, &d3dpp, &device); if (FAILED(hr)) { - skip("Failed to create IDirect3DDevice9 object %#x\n", hr); + skip("Failed to create IDirect3DDevice9 object %#lx\n", hr); IDirect3D9_Release(d3d); DestroyWindow(wnd); return; }
hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); - ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#lx.\n", hr); if (caps.VertexShaderVersion < D3DVS_VERSION(3, 0) || caps.PixelShaderVersion < D3DPS_VERSION(3, 0)) { @@ -6093,10 +6093,10 @@ static void test_registerset(void) DWORD *ctab;
hr = D3DXGetShaderConstantTable(registerset_data[k].blob, &ctable); - ok(hr == D3D_OK, "D3DXGetShaderConstantTable "%s" failed, got %08x, expected %08x\n", tablename, hr, D3D_OK); + ok(hr == D3D_OK, "D3DXGetShaderConstantTable "%s" failed, got %08lx, expected %08lx\n", tablename, hr, D3D_OK);
hr = ID3DXConstantTable_GetDesc(ctable, &tdesc); - ok(hr == D3D_OK, "GetDesc "%s" failed, got %08x, expected %08x\n", tablename, hr, D3D_OK); + ok(hr == D3D_OK, "GetDesc "%s" failed, got %08lx, expected %08lx\n", tablename, hr, D3D_OK);
ctab = ID3DXConstantTable_GetBufferPointer(ctable); ok(ctab[0] == registerset_data[k].blob[3], "ID3DXConstantTable_GetBufferPointer failed\n"); @@ -6115,7 +6115,7 @@ static void test_registerset(void) ok(constant != NULL, "GetConstantByName "%s" failed\n", fullname);
hr = ID3DXConstantTable_GetConstantDesc(ctable, constant, &desc, &nr); - ok(hr == D3D_OK, "GetConstantDesc "%s" failed, got %08x, expected %08x\n", fullname, hr, D3D_OK); + ok(hr == D3D_OK, "GetConstantDesc "%s" failed, got %08lx, expected %08lx\n", fullname, hr, D3D_OK);
ok(!strcmp(expected_desc->Name, desc.Name), "GetConstantDesc "%s" failed, got "%s", expected "%s"\n", fullname, desc.Name, expected_desc->Name); @@ -6161,7 +6161,7 @@ static void test_registerset(void) registerset_clear(device);
hr = registerset_apply(ctable, device, constant, test->in_index, test->in_count_min, test->type); - ok(hr == D3D_OK, "Set* "%s" index %u, count %u failed, got %x, expected %x\n", tablename, i, + ok(hr == D3D_OK, "Set* "%s" index %u, count %u failed, got %lx, expected %lx\n", tablename, i, test->in_count_min, hr, D3D_OK);
ret = registerset_compare_all(device, is_vs, registerset_data[k].regset, @@ -6173,7 +6173,7 @@ static void test_registerset(void) registerset_clear(device);
hr = registerset_apply(ctable, device, constant, test->in_index, test->in_count_max, test->type); - ok(hr == D3D_OK, "Set* "%s" index %u, count %u failed, got %x, expected %x\n", tablename, i, + ok(hr == D3D_OK, "Set* "%s" index %u, count %u failed, got %lx, expected %lx\n", tablename, i, test->in_count_max, hr, D3D_OK);
ret = registerset_compare_all(device, is_vs, registerset_data[k].regset, @@ -6183,15 +6183,15 @@ static void test_registerset(void) }
count = ID3DXConstantTable_Release(ctable); - ok(count == 0, "Release "%s" failed, got %u, expected %u\n", tablename, count, 0); + ok(count == 0, "Release "%s" failed, got %lu, expected %u\n", tablename, count, 0); }
/* Release resources */ count = IDirect3DDevice9_Release(device); - ok(count == 0, "The Direct3D device reference count was %u, should be 0\n", count); + ok(count == 0, "The Direct3D device reference count was %lu, should be 0\n", count);
count = IDirect3D9_Release(d3d); - ok(count == 0, "The Direct3D object reference count was %u, should be 0\n", count); + ok(count == 0, "The Direct3D object reference count was %lu, should be 0\n", count);
if (wnd) DestroyWindow(wnd); } @@ -6368,14 +6368,14 @@ static void test_registerset_defaults(void) hr = IDirect3D9_CreateDevice(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, wnd, D3DCREATE_MIXED_VERTEXPROCESSING, &d3dpp, &device); if (FAILED(hr)) { - skip("Failed to create IDirect3DDevice9 object %#x\n", hr); + skip("Failed to create IDirect3DDevice9 object %#lx\n", hr); IDirect3D9_Release(d3d); DestroyWindow(wnd); return; }
hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); - ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#lx.\n", hr); if (caps.VertexShaderVersion < D3DVS_VERSION(3, 0) || caps.PixelShaderVersion < D3DPS_VERSION(3, 0)) { @@ -6395,17 +6395,17 @@ static void test_registerset_defaults(void) UINT ret;
hr = D3DXGetShaderConstantTable(registerset_defaults_data[k].blob, &ctable); - ok(hr == D3D_OK, "D3DXGetShaderConstantTable "%s" failed, got %08x, expected %08x\n", tablename, hr, D3D_OK); + ok(hr == D3D_OK, "D3DXGetShaderConstantTable "%s" failed, got %08lx, expected %08lx\n", tablename, hr, D3D_OK);
hr = ID3DXConstantTable_GetDesc(ctable, &tdesc); - ok(hr == D3D_OK, "GetDesc "%s" failed, got %08x, expected %08x\n", tablename, hr, D3D_OK); + ok(hr == D3D_OK, "GetDesc "%s" failed, got %08lx, expected %08lx\n", tablename, hr, D3D_OK);
is_vs = (tdesc.Version & 0xFFFF0000) == 0xFFFE0000;
registerset_clear(device);
hr = ID3DXConstantTable_SetDefaults(ctable, device); - ok(hr == D3D_OK, "SetDefaults "%s" failed, got %08x, expected %08x\n", tablename, hr, D3D_OK); + ok(hr == D3D_OK, "SetDefaults "%s" failed, got %08lx, expected %08lx\n", tablename, hr, D3D_OK);
ret = registerset_compare(device, is_vs, D3DXRS_FLOAT4, 0, registerset_defaults_data[k].float_count, registerset_defaults_data[k].floats); @@ -6420,15 +6420,15 @@ static void test_registerset_defaults(void) ok(ret == 0, "Get*ShaderConstantB "%s" failed\n", tablename);
count = ID3DXConstantTable_Release(ctable); - ok(count == 0, "Release "%s" failed, got %u, expected %u\n", tablename, count, 0); + ok(count == 0, "Release "%s" failed, got %lu, expected %u\n", tablename, count, 0); }
/* Release resources */ count = IDirect3DDevice9_Release(device); - ok(count == 0, "The Direct3D device reference count was %u, should be 0\n", count); + ok(count == 0, "The Direct3D device reference count was %lu, should be 0\n", count);
count = IDirect3D9_Release(d3d); - ok(count == 0, "The Direct3D object reference count was %u, should be 0\n", count); + ok(count == 0, "The Direct3D object reference count was %lu, should be 0\n", count);
if (wnd) DestroyWindow(wnd); } @@ -6550,25 +6550,25 @@ static void test_shader_semantics(void) HRESULT hr;
hr = D3DXGetShaderInputSemantics(invalid_1, NULL, NULL); - ok(hr == D3DXERR_INVALIDDATA, "Unexpected hr %#x.\n", hr); + ok(hr == D3DXERR_INVALIDDATA, "Unexpected hr %#lx.\n", hr); hr = D3DXGetShaderInputSemantics(invalid_2, NULL, NULL); - ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr); hr = D3DXGetShaderInputSemantics(invalid_3, NULL, NULL); - ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
hr = D3DXGetShaderInputSemantics(vs_1_1, NULL, NULL); - ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr); hr = D3DXGetShaderInputSemantics(vs_1_1, semantics, NULL); - ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(tests); ++i) { const DWORD *shader = tests[i].shader;
hr = D3DXGetShaderInputSemantics(shader, NULL, &count); - ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr); hr = D3DXGetShaderInputSemantics(shader, semantics, &count2); - ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr); ok(count == count2, "Semantics count %u differs from previous count %u.\n", count2, count); for (j = 0; j < count; ++j) { @@ -6580,9 +6580,9 @@ static void test_shader_semantics(void) ok(tests[i].expected_input[j].Usage == ~0 && tests[i].expected_input[j].UsageIndex == ~0, "Unexpected semantics count %u.\n", count); hr = D3DXGetShaderOutputSemantics(shader, NULL, &count); - ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr); hr = D3DXGetShaderOutputSemantics(shader, semantics, &count2); - ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr); ok(count == count2, "Semantics count %u differs from previous count %u.\n", count2, count); for (j = 0; j < count; ++j) { @@ -6621,26 +6621,26 @@ static void test_fragment_linker(void) D3DCREATE_MIXED_VERTEXPROCESSING, &d3dpp, &device); if (FAILED(hr)) { - skip("Failed to create a D3D device, hr %#x.\n", hr); + skip("Failed to create a D3D device, hr %#lx.\n", hr); IDirect3D9_Release(d3d); DestroyWindow(window); return; }
hr = D3DXCreateFragmentLinker(device, 1024, &linker); - ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr); ok(!!linker, "Unexpected linker %p.\n", linker); linker->lpVtbl->Release(linker);
hr = D3DXCreateFragmentLinkerEx(device, 1024, 0, &linker); - ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr); ok(!!linker, "Unexpected linker %p.\n", linker); linker->lpVtbl->Release(linker);
refcount = IDirect3DDevice9_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + ok(!refcount, "Device has %lu references left.\n", refcount); refcount = IDirect3D9_Release(d3d); - ok(!refcount, "The D3D object has %u references left.\n", refcount); + ok(!refcount, "The D3D object has %lu references left.\n", refcount); DestroyWindow(window); }
diff --git a/dlls/d3dx9_36/tests/surface.c b/dlls/d3dx9_36/tests/surface.c index 1d32b68c3a6..c3ac4ba74b3 100644 --- a/dlls/d3dx9_36/tests/surface.c +++ b/dlls/d3dx9_36/tests/surface.c @@ -398,7 +398,7 @@ static void check_dds_pixel_format_(unsigned int line, memset(dds.data, 0, sizeof(dds.data));
hr = D3DXGetImageInfoFromFileInMemory(&dds, sizeof(dds), &info); - ok_(__FILE__, line)(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#x for pixel format %#x, expected %#x\n", + ok_(__FILE__, line)(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#lx for pixel format %#x, expected %#lx\n", hr, expected_format, D3D_OK); if (SUCCEEDED(hr)) { @@ -546,7 +546,7 @@ static void test_dds_header_handling(void) dds->header.pixel_format = tests[i].pixel_format;
hr = D3DXGetImageInfoFromFileInMemory(dds, file_size, &info); - ok(hr == tests[i].expected.hr, "%d: D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", + ok(hr == tests[i].expected.hr, "%d: D3DXGetImageInfoFromFileInMemory returned %#lx, expected %#lx\n", i, hr, tests[i].expected.hr); if (SUCCEEDED(hr)) { @@ -573,142 +573,142 @@ static void test_D3DXGetImageInfo(void) /* D3DXGetImageInfoFromFile */ if(testbitmap_ok) { hr = D3DXGetImageInfoFromFileA("testbitmap.bmp", &info); - ok(hr == D3D_OK, "D3DXGetImageInfoFromFile returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXGetImageInfoFromFile returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = D3DXGetImageInfoFromFileA("testbitmap.bmp", NULL); /* valid image, second parameter is NULL */ - ok(hr == D3D_OK, "D3DXGetImageInfoFromFile returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXGetImageInfoFromFile returned %#lx, expected %#lx\n", hr, D3D_OK); } else skip("Couldn't create "testbitmap.bmp"\n");
if(testdummy_ok) { hr = D3DXGetImageInfoFromFileA("testdummy.bmp", NULL); /* invalid image, second parameter is NULL */ - ok(hr == D3D_OK, "D3DXGetImageInfoFromFile returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXGetImageInfoFromFile returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = D3DXGetImageInfoFromFileA("testdummy.bmp", &info); - ok(hr == D3DXERR_INVALIDDATA, "D3DXGetImageInfoFromFile returned %#x, expected %#x\n", hr, D3DXERR_INVALIDDATA); + ok(hr == D3DXERR_INVALIDDATA, "D3DXGetImageInfoFromFile returned %#lx, expected %#x\n", hr, D3DXERR_INVALIDDATA); } else skip("Couldn't create "testdummy.bmp"\n");
hr = D3DXGetImageInfoFromFileA("filedoesnotexist.bmp", &info); - ok(hr == D3DXERR_INVALIDDATA, "D3DXGetImageInfoFromFile returned %#x, expected %#x\n", hr, D3DXERR_INVALIDDATA); + ok(hr == D3DXERR_INVALIDDATA, "D3DXGetImageInfoFromFile returned %#lx, expected %#x\n", hr, D3DXERR_INVALIDDATA);
hr = D3DXGetImageInfoFromFileA("filedoesnotexist.bmp", NULL); - ok(hr == D3DXERR_INVALIDDATA, "D3DXGetImageInfoFromFile returned %#x, expected %#x\n", hr, D3DXERR_INVALIDDATA); + ok(hr == D3DXERR_INVALIDDATA, "D3DXGetImageInfoFromFile returned %#lx, expected %#x\n", hr, D3DXERR_INVALIDDATA);
hr = D3DXGetImageInfoFromFileA("", &info); - ok(hr == D3DXERR_INVALIDDATA, "D3DXGetImageInfoFromFile returned %#x, expected %#x\n", hr, D3DXERR_INVALIDDATA); + ok(hr == D3DXERR_INVALIDDATA, "D3DXGetImageInfoFromFile returned %#lx, expected %#x\n", hr, D3DXERR_INVALIDDATA);
hr = D3DXGetImageInfoFromFileA(NULL, &info); - ok(hr == D3DERR_INVALIDCALL, "D3DXGetImageInfoFromFile returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXGetImageInfoFromFile returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXGetImageInfoFromFileA(NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "D3DXGetImageInfoFromFile returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXGetImageInfoFromFile returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
/* D3DXGetImageInfoFromResource */ hr = D3DXGetImageInfoFromResourceA(NULL, MAKEINTRESOURCEA(IDB_BITMAP_1x1), &info); /* RT_BITMAP */ - ok(hr == D3D_OK, "D3DXGetImageInfoFromResource returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXGetImageInfoFromResource returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = D3DXGetImageInfoFromResourceA(NULL, MAKEINTRESOURCEA(IDB_BITMAP_1x1), NULL); - ok(hr == D3D_OK, "D3DXGetImageInfoFromResource returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXGetImageInfoFromResource returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = D3DXGetImageInfoFromResourceA(NULL, MAKEINTRESOURCEA(IDD_BITMAPDATA_1x1), &info); /* RT_RCDATA */ - ok(hr == D3D_OK, "D3DXGetImageInfoFromResource returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXGetImageInfoFromResource returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = D3DXGetImageInfoFromResourceA(NULL, MAKEINTRESOURCEA(IDS_STRING), &info); - ok(hr == D3DXERR_INVALIDDATA, "D3DXGetImageInfoFromResource returned %#x, expected %#x\n", hr, D3DXERR_INVALIDDATA); + ok(hr == D3DXERR_INVALIDDATA, "D3DXGetImageInfoFromResource returned %#lx, expected %#x\n", hr, D3DXERR_INVALIDDATA);
hr = D3DXGetImageInfoFromResourceA(NULL, MAKEINTRESOURCEA(IDS_STRING), NULL); - ok(hr == D3DXERR_INVALIDDATA, "D3DXGetImageInfoFromResource returned %#x, expected %#x\n", hr, D3DXERR_INVALIDDATA); + ok(hr == D3DXERR_INVALIDDATA, "D3DXGetImageInfoFromResource returned %#lx, expected %#x\n", hr, D3DXERR_INVALIDDATA);
hr = D3DXGetImageInfoFromResourceA(NULL, "resourcedoesnotexist", &info); - ok(hr == D3DXERR_INVALIDDATA, "D3DXGetImageInfoFromResource returned %#x, expected %#x\n", hr, D3DXERR_INVALIDDATA); + ok(hr == D3DXERR_INVALIDDATA, "D3DXGetImageInfoFromResource returned %#lx, expected %#x\n", hr, D3DXERR_INVALIDDATA);
hr = D3DXGetImageInfoFromResourceA(NULL, "resourcedoesnotexist", NULL); - ok(hr == D3DXERR_INVALIDDATA, "D3DXGetImageInfoFromResource returned %#x, expected %#x\n", hr, D3DXERR_INVALIDDATA); + ok(hr == D3DXERR_INVALIDDATA, "D3DXGetImageInfoFromResource returned %#lx, expected %#x\n", hr, D3DXERR_INVALIDDATA);
hr = D3DXGetImageInfoFromResourceA(NULL, NULL, NULL); - ok(hr == D3DXERR_INVALIDDATA, "D3DXGetImageInfoFromResource returned %#x, expected %#x\n", hr, D3DXERR_INVALIDDATA); + ok(hr == D3DXERR_INVALIDDATA, "D3DXGetImageInfoFromResource returned %#lx, expected %#x\n", hr, D3DXERR_INVALIDDATA);
/* D3DXGetImageInfoFromFileInMemory */ hr = D3DXGetImageInfoFromFileInMemory(bmp_1bpp, sizeof(bmp_1bpp), &info); - ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = D3DXGetImageInfoFromFileInMemory(bmp_1bpp, sizeof(bmp_1bpp)+5, &info); /* too large size */ - ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = D3DXGetImageInfoFromFileInMemory(bmp_1bpp, sizeof(bmp_1bpp), NULL); - ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = D3DXGetImageInfoFromFileInMemory(noimage, sizeof(noimage), NULL); - ok(hr == D3D_OK, "D3DXGetImageInfoFromResource returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXGetImageInfoFromResource returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = D3DXGetImageInfoFromFileInMemory(noimage, sizeof(noimage), &info); - ok(hr == D3DXERR_INVALIDDATA, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3DXERR_INVALIDDATA); + ok(hr == D3DXERR_INVALIDDATA, "D3DXGetImageInfoFromFileInMemory returned %#lx, expected %#x\n", hr, D3DXERR_INVALIDDATA);
todo_wine { hr = D3DXGetImageInfoFromFileInMemory(bmp_1bpp, sizeof(bmp_1bpp)-1, &info); - ok(hr == D3DXERR_INVALIDDATA, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3DXERR_INVALIDDATA); + ok(hr == D3DXERR_INVALIDDATA, "D3DXGetImageInfoFromFileInMemory returned %#lx, expected %#x\n", hr, D3DXERR_INVALIDDATA); }
hr = D3DXGetImageInfoFromFileInMemory(bmp_1bpp+1, sizeof(bmp_1bpp)-1, &info); - ok(hr == D3DXERR_INVALIDDATA, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3DXERR_INVALIDDATA); + ok(hr == D3DXERR_INVALIDDATA, "D3DXGetImageInfoFromFileInMemory returned %#lx, expected %#x\n", hr, D3DXERR_INVALIDDATA);
hr = D3DXGetImageInfoFromFileInMemory(bmp_1bpp, 0, &info); - ok(hr == D3DERR_INVALIDCALL, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXGetImageInfoFromFileInMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXGetImageInfoFromFileInMemory(bmp_1bpp, 0, NULL); - ok(hr == D3DERR_INVALIDCALL, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXGetImageInfoFromFileInMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXGetImageInfoFromFileInMemory(noimage, 0, &info); - ok(hr == D3DERR_INVALIDCALL, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXGetImageInfoFromFileInMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXGetImageInfoFromFileInMemory(noimage, 0, NULL); - ok(hr == D3DERR_INVALIDCALL, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXGetImageInfoFromFileInMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXGetImageInfoFromFileInMemory(NULL, 0, &info); - ok(hr == D3DERR_INVALIDCALL, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXGetImageInfoFromFileInMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXGetImageInfoFromFileInMemory(NULL, 4, NULL); - ok(hr == D3DERR_INVALIDCALL, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXGetImageInfoFromFileInMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXGetImageInfoFromFileInMemory(NULL, 4, &info); - ok(hr == D3DERR_INVALIDCALL, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXGetImageInfoFromFileInMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXGetImageInfoFromFileInMemory(NULL, 0, NULL); - ok(hr == D3DERR_INVALIDCALL, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXGetImageInfoFromFileInMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
/* test BMP support */ hr = D3DXGetImageInfoFromFileInMemory(bmp_1bpp, sizeof(bmp_1bpp), &info); - ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#lx, expected %#lx\n", hr, D3D_OK); ok(info.Depth == 1, "Got depth %u, expected 1\n", info.Depth); ok(info.Format == D3DFMT_P8, "Got format %u, expected %u\n", info.Format, D3DFMT_P8); hr = D3DXGetImageInfoFromFileInMemory(bmp_2bpp, sizeof(bmp_2bpp), &info); - ok(hr == D3DXERR_INVALIDDATA, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3DXERR_INVALIDDATA); + ok(hr == D3DXERR_INVALIDDATA, "D3DXGetImageInfoFromFileInMemory returned %#lx, expected %#x\n", hr, D3DXERR_INVALIDDATA); hr = D3DXGetImageInfoFromFileInMemory(bmp_4bpp, sizeof(bmp_4bpp), &info); - ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#lx, expected %#lx\n", hr, D3D_OK); ok(info.Depth == 1, "Got depth %u, expected 1\n", info.Depth); ok(info.Format == D3DFMT_P8, "Got format %u, expected %u\n", info.Format, D3DFMT_P8); hr = D3DXGetImageInfoFromFileInMemory(bmp_8bpp, sizeof(bmp_8bpp), &info); - ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#lx, expected %#lx\n", hr, D3D_OK); ok(info.Depth == 1, "Got depth %u, expected 1\n", info.Depth); ok(info.Format == D3DFMT_P8, "Got format %u, expected %u\n", info.Format, D3DFMT_P8);
hr = D3DXGetImageInfoFromFileInMemory(bmp_32bpp_xrgb, sizeof(bmp_32bpp_xrgb), &info); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); ok(info.Format == D3DFMT_X8R8G8B8, "Got unexpected format %u.\n", info.Format); hr = D3DXGetImageInfoFromFileInMemory(bmp_32bpp_argb, sizeof(bmp_32bpp_argb), &info); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); ok(info.Format == D3DFMT_A8R8G8B8, "Got unexpected format %u.\n", info.Format);
/* Grayscale PNG */ hr = D3DXGetImageInfoFromFileInMemory(png_grayscale, sizeof(png_grayscale), &info); - ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#lx, expected %#lx\n", hr, D3D_OK); ok(info.Depth == 1, "Got depth %u, expected 1\n", info.Depth); ok(info.Format == D3DFMT_L8, "Got format %u, expected %u\n", info.Format, D3DFMT_L8);
/* test DDS support */ hr = D3DXGetImageInfoFromFileInMemory(dds_24bit, sizeof(dds_24bit), &info); - ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#lx, expected %#lx\n", hr, D3D_OK); if (hr == D3D_OK) { ok(info.Width == 2, "Got width %u, expected 2\n", info.Width); ok(info.Height == 2, "Got height %u, expected 2\n", info.Height); @@ -720,7 +720,7 @@ static void test_D3DXGetImageInfo(void) } else skip("Couldn't get image info from 24-bit DDS file in memory\n");
hr = D3DXGetImageInfoFromFileInMemory(dds_16bit, sizeof(dds_16bit), &info); - ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#lx, expected %#lx\n", hr, D3D_OK); if (hr == D3D_OK) { ok(info.Width == 2, "Got width %u, expected 2\n", info.Width); ok(info.Height == 2, "Got height %u, expected 2\n", info.Height); @@ -733,7 +733,7 @@ static void test_D3DXGetImageInfo(void)
memset(&info, 0, sizeof(info)); hr = D3DXGetImageInfoFromFileInMemory(dds_8bit, sizeof(dds_8bit), &info); - ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#x\n", hr); + ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#lx\n", hr); ok(info.Width == 16, "Got width %u.\n", info.Width); ok(info.Height == 4, "Got height %u.\n", info.Height); ok(info.Depth == 1, "Got depth %u.\n", info.Depth); @@ -743,7 +743,7 @@ static void test_D3DXGetImageInfo(void) ok(info.ImageFileFormat == D3DXIFF_DDS, "Got image file format %#x.\n", info.ImageFileFormat);
hr = D3DXGetImageInfoFromFileInMemory(dds_cube_map, sizeof(dds_cube_map), &info); - ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#lx, expected %#lx\n", hr, D3D_OK); if (hr == D3D_OK) { ok(info.Width == 4, "Got width %u, expected 4\n", info.Width); ok(info.Height == 4, "Got height %u, expected 4\n", info.Height); @@ -755,7 +755,7 @@ static void test_D3DXGetImageInfo(void) } else skip("Couldn't get image info from cube map in memory\n");
hr = D3DXGetImageInfoFromFileInMemory(dds_volume_map, sizeof(dds_volume_map), &info); - ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#lx, expected %#lx\n", hr, D3D_OK); if (hr == D3D_OK) { ok(info.Width == 4, "Got width %u, expected 4\n", info.Width); ok(info.Height == 4, "Got height %u, expected 4\n", info.Height); @@ -801,16 +801,16 @@ static void test_D3DXGetImageInfo(void) test_dds_header_handling();
hr = D3DXGetImageInfoFromFileInMemory(dds_16bit, sizeof(dds_16bit) - 1, &info); - ok(hr == D3DXERR_INVALIDDATA, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3DXERR_INVALIDDATA); + ok(hr == D3DXERR_INVALIDDATA, "D3DXGetImageInfoFromFileInMemory returned %#lx, expected %#x\n", hr, D3DXERR_INVALIDDATA);
hr = D3DXGetImageInfoFromFileInMemory(dds_24bit, sizeof(dds_24bit) - 1, &info); - ok(hr == D3DXERR_INVALIDDATA, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3DXERR_INVALIDDATA); + ok(hr == D3DXERR_INVALIDDATA, "D3DXGetImageInfoFromFileInMemory returned %#lx, expected %#x\n", hr, D3DXERR_INVALIDDATA);
hr = D3DXGetImageInfoFromFileInMemory(dds_cube_map, sizeof(dds_cube_map) - 1, &info); - ok(hr == D3DXERR_INVALIDDATA, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3DXERR_INVALIDDATA); + ok(hr == D3DXERR_INVALIDDATA, "D3DXGetImageInfoFromFileInMemory returned %#lx, expected %#x\n", hr, D3DXERR_INVALIDDATA);
hr = D3DXGetImageInfoFromFileInMemory(dds_volume_map, sizeof(dds_volume_map) - 1, &info); - ok(hr == D3DXERR_INVALIDDATA, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3DXERR_INVALIDDATA); + ok(hr == D3DXERR_INVALIDDATA, "D3DXGetImageInfoFromFileInMemory returned %#lx, expected %#x\n", hr, D3DXERR_INVALIDDATA);
/* cleanup */ @@ -829,7 +829,7 @@ static inline void _check_pixel_2bpp(unsigned int line, const D3DLOCKED_RECT *lo static inline void _check_pixel_4bpp(unsigned int line, const D3DLOCKED_RECT *lockrect, int x, int y, DWORD expected_color) { DWORD color = ((DWORD*)lockrect->pBits)[x + y * lockrect->Pitch / 4]; - ok_(__FILE__, line)(color == expected_color, "Got color 0x%08x, expected 0x%08x\n", color, expected_color); + ok_(__FILE__, line)(color == expected_color, "Got color 0x%08lx, expected 0x%08lx\n", color, expected_color); }
static void test_D3DXLoadSurface(IDirect3DDevice9 *device) @@ -856,7 +856,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 256, 256, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &surf, NULL); if(FAILED(hr)) { - skip("Failed to create a surface (%#x)\n", hr); + skip("Failed to create a surface (%#lx)\n", hr); if(testdummy_ok) DeleteFileA("testdummy.bmp"); if(testbitmap_ok) DeleteFileA("testbitmap.bmp"); return; @@ -865,122 +865,122 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device) /* D3DXLoadSurfaceFromFile */ if(testbitmap_ok) { hr = D3DXLoadSurfaceFromFileA(surf, NULL, NULL, "testbitmap.bmp", NULL, D3DX_DEFAULT, 0, NULL); - ok(hr == D3D_OK, "D3DXLoadSurfaceFromFile returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromFile returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = D3DXLoadSurfaceFromFileA(NULL, NULL, NULL, "testbitmap.bmp", NULL, D3DX_DEFAULT, 0, NULL); - ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromFile returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromFile returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL); } else skip("Couldn't create "testbitmap.bmp"\n");
if(testdummy_ok) { hr = D3DXLoadSurfaceFromFileA(surf, NULL, NULL, "testdummy.bmp", NULL, D3DX_DEFAULT, 0, NULL); - ok(hr == D3DXERR_INVALIDDATA, "D3DXLoadSurfaceFromFile returned %#x, expected %#x\n", hr, D3DXERR_INVALIDDATA); + ok(hr == D3DXERR_INVALIDDATA, "D3DXLoadSurfaceFromFile returned %#lx, expected %#x\n", hr, D3DXERR_INVALIDDATA); } else skip("Couldn't create "testdummy.bmp"\n");
hr = D3DXLoadSurfaceFromFileA(surf, NULL, NULL, NULL, NULL, D3DX_DEFAULT, 0, NULL); - ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromFile returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromFile returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXLoadSurfaceFromFileA(surf, NULL, NULL, "", NULL, D3DX_DEFAULT, 0, NULL); - ok(hr == D3DXERR_INVALIDDATA, "D3DXLoadSurfaceFromFile returned %#x, expected %#x\n", hr, D3DXERR_INVALIDDATA); + ok(hr == D3DXERR_INVALIDDATA, "D3DXLoadSurfaceFromFile returned %#lx, expected %#x\n", hr, D3DXERR_INVALIDDATA);
/* D3DXLoadSurfaceFromResource */ hr = D3DXLoadSurfaceFromResourceA(surf, NULL, NULL, NULL, MAKEINTRESOURCEA(IDB_BITMAP_1x1), NULL, D3DX_DEFAULT, 0, NULL); - ok(hr == D3D_OK, "D3DXLoadSurfaceFromResource returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromResource returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = D3DXLoadSurfaceFromResourceA(surf, NULL, NULL, NULL, MAKEINTRESOURCEA(IDD_BITMAPDATA_1x1), NULL, D3DX_DEFAULT, 0, NULL); - ok(hr == D3D_OK, "D3DXLoadSurfaceFromResource returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromResource returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = D3DXLoadSurfaceFromResourceA(surf, NULL, NULL, NULL, NULL, NULL, D3DX_DEFAULT, 0, NULL); - ok(hr == D3DXERR_INVALIDDATA, "D3DXLoadSurfaceFromResource returned %#x, expected %#x\n", hr, D3DXERR_INVALIDDATA); + ok(hr == D3DXERR_INVALIDDATA, "D3DXLoadSurfaceFromResource returned %#lx, expected %#x\n", hr, D3DXERR_INVALIDDATA);
hr = D3DXLoadSurfaceFromResourceA(NULL, NULL, NULL, NULL, MAKEINTRESOURCEA(IDB_BITMAP_1x1), NULL, D3DX_DEFAULT, 0, NULL); - ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromResource returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromResource returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXLoadSurfaceFromResourceA(surf, NULL, NULL, NULL, MAKEINTRESOURCEA(IDS_STRING), NULL, D3DX_DEFAULT, 0, NULL); - ok(hr == D3DXERR_INVALIDDATA, "D3DXLoadSurfaceFromResource returned %#x, expected %#x\n", hr, D3DXERR_INVALIDDATA); + ok(hr == D3DXERR_INVALIDDATA, "D3DXLoadSurfaceFromResource returned %#lx, expected %#x\n", hr, D3DXERR_INVALIDDATA);
/* D3DXLoadSurfaceFromFileInMemory */ hr = D3DXLoadSurfaceFromFileInMemory(surf, NULL, NULL, bmp_1bpp, sizeof(bmp_1bpp), NULL, D3DX_DEFAULT, 0, NULL); - ok(hr == D3D_OK, "D3DXLoadSurfaceFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromFileInMemory returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = D3DXLoadSurfaceFromFileInMemory(surf, NULL, NULL, noimage, sizeof(noimage), NULL, D3DX_DEFAULT, 0, NULL); - ok(hr == D3DXERR_INVALIDDATA, "D3DXLoadSurfaceFromFileInMemory returned %#x, expected %#x\n", hr, D3DXERR_INVALIDDATA); + ok(hr == D3DXERR_INVALIDDATA, "D3DXLoadSurfaceFromFileInMemory returned %#lx, expected %#x\n", hr, D3DXERR_INVALIDDATA);
hr = D3DXLoadSurfaceFromFileInMemory(surf, NULL, NULL, bmp_1bpp, 0, NULL, D3DX_DEFAULT, 0, NULL); - ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromFileInMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromFileInMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXLoadSurfaceFromFileInMemory(NULL, NULL, NULL, bmp_1bpp, sizeof(bmp_1bpp), NULL, D3DX_DEFAULT, 0, NULL); - ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromFileInMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromFileInMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXLoadSurfaceFromFileInMemory(surf, NULL, NULL, NULL, 8, NULL, D3DX_DEFAULT, 0, NULL); - ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromFileInMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromFileInMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXLoadSurfaceFromFileInMemory(surf, NULL, NULL, NULL, 0, NULL, D3DX_DEFAULT, 0, NULL); - ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromFileInMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromFileInMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXLoadSurfaceFromFileInMemory(NULL, NULL, NULL, NULL, 0, NULL, D3DX_DEFAULT, 0, NULL); - ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromFileInMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromFileInMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
/* D3DXLoadSurfaceFromMemory */ SetRect(&rect, 0, 0, 2, 2);
hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, pixdata, D3DFMT_A8R8G8B8, sizeof(pixdata), NULL, &rect, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "D3DXLoadSurfaceFromMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromMemory returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, pixdata, D3DFMT_A8R8G8B8, 0, NULL, &rect, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "D3DXLoadSurfaceFromMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromMemory returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, NULL, D3DFMT_A8R8G8B8, sizeof(pixdata), NULL, &rect, D3DX_DEFAULT, 0); - ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXLoadSurfaceFromMemory(NULL, NULL, NULL, pixdata, D3DFMT_A8R8G8B8, sizeof(pixdata), NULL, &rect, D3DX_DEFAULT, 0); - ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, pixdata, D3DFMT_A8R8G8B8, sizeof(pixdata), NULL, NULL, D3DX_DEFAULT, 0); - ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, pixdata, D3DFMT_UNKNOWN, sizeof(pixdata), NULL, &rect, D3DX_DEFAULT, 0); - ok(hr == E_FAIL, "D3DXLoadSurfaceFromMemory returned %#x, expected %#x\n", hr, E_FAIL); + ok(hr == E_FAIL, "D3DXLoadSurfaceFromMemory returned %#lx, expected %#lx\n", hr, E_FAIL);
SetRect(&destrect, -1, -1, 1, 1); /* destination rect is partially outside texture boundaries */ hr = D3DXLoadSurfaceFromMemory(surf, NULL, &destrect, pixdata, D3DFMT_A8R8G8B8, sizeof(pixdata), NULL, &rect, D3DX_FILTER_NONE, 0); - ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
SetRect(&destrect, 255, 255, 257, 257); /* destination rect is partially outside texture boundaries */ hr = D3DXLoadSurfaceFromMemory(surf, NULL, &destrect, pixdata, D3DFMT_A8R8G8B8, sizeof(pixdata), NULL, &rect, D3DX_FILTER_NONE, 0); - ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
SetRect(&destrect, 1, 1, 0, 0); /* left > right, top > bottom */ hr = D3DXLoadSurfaceFromMemory(surf, NULL, &destrect, pixdata, D3DFMT_A8R8G8B8, sizeof(pixdata), NULL, &rect, D3DX_FILTER_NONE, 0); - ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
SetRect(&destrect, 1, 2, 1, 2); /* left = right, top = bottom */ hr = D3DXLoadSurfaceFromMemory(surf, NULL, &destrect, pixdata, D3DFMT_A8R8G8B8, sizeof(pixdata), NULL, &rect, D3DX_FILTER_NONE, 0); /* fails when debug version of d3d9 is used */ - ok(hr == D3D_OK || broken(hr == D3DERR_INVALIDCALL), "D3DXLoadSurfaceFromMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK || broken(hr == D3DERR_INVALIDCALL), "D3DXLoadSurfaceFromMemory returned %#lx, expected %#lx\n", hr, D3D_OK);
SetRect(&destrect, 257, 257, 257, 257); /* left = right, top = bottom, but invalid values */ hr = D3DXLoadSurfaceFromMemory(surf, NULL, &destrect, pixdata, D3DFMT_A8R8G8B8, sizeof(pixdata), NULL, &rect, D3DX_FILTER_NONE, 0); - ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
/* D3DXLoadSurfaceFromSurface */ hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 256, 256, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &newsurf, NULL); if(SUCCEEDED(hr)) { hr = D3DXLoadSurfaceFromSurface(newsurf, NULL, NULL, surf, NULL, NULL, D3DX_DEFAULT, 0); - ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = D3DXLoadSurfaceFromSurface(NULL, NULL, NULL, surf, NULL, NULL, D3DX_DEFAULT, 0); - ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromSurface returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXLoadSurfaceFromSurface(newsurf, NULL, NULL, NULL, NULL, NULL, D3DX_DEFAULT, 0); - ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromSurface returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
check_release((IUnknown*)newsurf, 0); } else skip("Failed to create a second surface\n"); @@ -991,7 +991,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device) IDirect3DTexture9_GetSurfaceLevel(tex, 0, &newsurf);
hr = D3DXLoadSurfaceFromSurface(newsurf, NULL, NULL, surf, NULL, NULL, D3DX_DEFAULT, 0); - ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#lx, expected %#lx\n", hr, D3D_OK);
IDirect3DSurface9_Release(newsurf); IDirect3DTexture9_Release(tex); @@ -999,9 +999,9 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
/* non-lockable render target */ hr = IDirect3DDevice9_CreateRenderTarget(device, 256, 256, D3DFMT_A8R8G8B8, D3DMULTISAMPLE_NONE, 0, FALSE, &newsurf, NULL); - ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr); hr = D3DXLoadSurfaceFromSurface(surf, NULL, NULL, newsurf, NULL, NULL, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr); IDirect3DSurface9_Release(newsurf);
/* non-lockable multisampled render target */ @@ -1009,7 +1009,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device) if (SUCCEEDED(hr)) { hr = D3DXLoadSurfaceFromSurface(surf, NULL, NULL, newsurf, NULL, NULL, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
IDirect3DSurface9_Release(newsurf); } @@ -1019,55 +1019,55 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device) }
hr = IDirect3DDevice9_GetRenderTarget(device, 0, &newsurf); - ok(hr == D3D_OK, "IDirect3DDevice9_GetRenderTarget returned %#x, expected %#x.\n", hr, D3D_OK); + ok(hr == D3D_OK, "IDirect3DDevice9_GetRenderTarget returned %#lx, expected %#lx.\n", hr, D3D_OK);
hr = D3DXLoadSurfaceFromSurface(newsurf, NULL, NULL, surf, NULL, NULL, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#lx, expected %#lx.\n", hr, D3D_OK); hr = D3DXLoadSurfaceFromSurface(surf, NULL, NULL, newsurf, NULL, NULL, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#lx, expected %#lx.\n", hr, D3D_OK); hr = D3DXLoadSurfaceFromSurface(surf, NULL, NULL, newsurf, NULL, NULL, D3DX_FILTER_NONE, 0xff000000); - ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#lx, expected %#lx.\n", hr, D3D_OK); hr = D3DXLoadSurfaceFromSurface(surf, NULL, NULL, newsurf, NULL, NULL, D3DX_FILTER_TRIANGLE | D3DX_FILTER_MIRROR, 0); - ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#lx, expected %#lx.\n", hr, D3D_OK); hr = D3DXLoadSurfaceFromSurface(surf, NULL, NULL, newsurf, NULL, NULL, D3DX_FILTER_LINEAR, 0); - ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#lx, expected %#lx.\n", hr, D3D_OK);
/* rects */ SetRect(&rect, 2, 2, 1, 1); hr = D3DXLoadSurfaceFromSurface(surf, NULL, NULL, newsurf, NULL, &rect, D3DX_FILTER_NONE, 0); - ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromSurface returned %#lx, expected %#lx.\n", hr, D3DERR_INVALIDCALL); hr = D3DXLoadSurfaceFromSurface(surf, NULL, NULL, newsurf, NULL, &rect, D3DX_DEFAULT, 0); - ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromSurface returned %#lx, expected %#lx.\n", hr, D3DERR_INVALIDCALL); hr = D3DXLoadSurfaceFromSurface(surf, NULL, &rect, newsurf, NULL, NULL, D3DX_FILTER_NONE, 0); - ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromSurface returned %#lx, expected %#lx.\n", hr, D3DERR_INVALIDCALL); hr = D3DXLoadSurfaceFromSurface(surf, NULL, &rect, newsurf, NULL, NULL, D3DX_DEFAULT, 0); - ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromSurface returned %#lx, expected %#lx.\n", hr, D3DERR_INVALIDCALL); hr = D3DXLoadSurfaceFromSurface(surf, NULL, &rect, newsurf, NULL, NULL, D3DX_FILTER_POINT, 0); - ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromSurface returned %#lx, expected %#lx.\n", hr, D3DERR_INVALIDCALL); SetRect(&rect, 1, 1, 1, 1); hr = D3DXLoadSurfaceFromSurface(surf, NULL, NULL, newsurf, NULL, &rect, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#lx, expected %#lx.\n", hr, D3D_OK); hr = D3DXLoadSurfaceFromSurface(surf, NULL, &rect, newsurf, NULL, NULL, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#lx, expected %#lx.\n", hr, D3D_OK); hr = D3DXLoadSurfaceFromSurface(surf, NULL, NULL, newsurf, NULL, &rect, D3DX_DEFAULT, 0); - ok(hr == E_FAIL, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, E_FAIL); + ok(hr == E_FAIL, "D3DXLoadSurfaceFromSurface returned %#lx, expected %#lx.\n", hr, E_FAIL); hr = D3DXLoadSurfaceFromSurface(surf, NULL, &rect, newsurf, NULL, NULL, D3DX_DEFAULT, 0); - ok(hr == E_FAIL, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, E_FAIL); + ok(hr == E_FAIL, "D3DXLoadSurfaceFromSurface returned %#lx, expected %#lx.\n", hr, E_FAIL); if (0) { /* Somehow it crashes with a STATUS_INTEGER_DIVIDE_BY_ZERO exception * on Windows. */ hr = D3DXLoadSurfaceFromSurface(surf, NULL, &rect, newsurf, NULL, NULL, D3DX_FILTER_POINT, 0); - ok(hr == E_FAIL, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, E_FAIL); + ok(hr == E_FAIL, "D3DXLoadSurfaceFromSurface returned %#lx, expected %#lx.\n", hr, E_FAIL); } SetRect(&rect, 1, 1, 2, 2); SetRect(&destrect, 1, 1, 2, 2); hr = D3DXLoadSurfaceFromSurface(surf, NULL, &rect, newsurf, NULL, &destrect, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#lx, expected %#lx.\n", hr, D3D_OK); hr = D3DXLoadSurfaceFromSurface(surf, NULL, &rect, newsurf, NULL, NULL, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#lx, expected %#lx.\n", hr, D3D_OK); hr = D3DXLoadSurfaceFromSurface(surf, NULL, NULL, newsurf, NULL, &destrect, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#lx, expected %#lx.\n", hr, D3D_OK);
IDirect3DSurface9_Release(newsurf);
@@ -1075,10 +1075,10 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
SetRect(&rect, 1, 1, 2, 2); hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 1, 1, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &surf, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, pixdata_a8b8g8r8, D3DFMT_A8R8G8B8, 8, NULL, &rect, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); IDirect3DSurface9_LockRect(surf, &lockrect, NULL, D3DLOCK_READONLY); check_pixel_4bpp(&lockrect, 0, 0, 0x8dc32bf6); IDirect3DSurface9_UnlockRect(surf); @@ -1088,13 +1088,13 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device) SetRect(&rect, 0, 0, 2, 2); /* A8R8G8B8 */ hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 2, 2, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &surf, NULL); - if(FAILED(hr)) skip("Failed to create a surface (%#x)\n", hr); + if(FAILED(hr)) skip("Failed to create a surface (%#lx)\n", hr); else { PALETTEENTRY palette;
hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, pixdata_a8r3g3b2, D3DFMT_A8R3G3B2, 4, NULL, &rect, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "D3DXLoadSurfaceFromMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromMemory returned %#lx, expected %#lx\n", hr, D3D_OK); IDirect3DSurface9_LockRect(surf, &lockrect, NULL, D3DLOCK_READONLY); check_pixel_4bpp(&lockrect, 0, 0, 0x57dbffff); check_pixel_4bpp(&lockrect, 1, 0, 0x98ffff00); @@ -1104,7 +1104,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, pixdata_a1r5g5b5, D3DFMT_A1R5G5B5, 4, NULL, &rect, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "D3DXLoadSurfaceFromMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromMemory returned %#lx, expected %#lx\n", hr, D3D_OK); IDirect3DSurface9_LockRect(surf, &lockrect, NULL, D3DLOCK_READONLY); check_pixel_4bpp(&lockrect, 0, 0, 0x008cadad); check_pixel_4bpp(&lockrect, 1, 0, 0xff317342); @@ -1114,7 +1114,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, pixdata_r5g6b5, D3DFMT_R5G6B5, 4, NULL, &rect, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "D3DXLoadSurfaceFromMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromMemory returned %#lx, expected %#lx\n", hr, D3D_OK); IDirect3DSurface9_LockRect(surf, &lockrect, NULL, D3DLOCK_READONLY); check_pixel_4bpp(&lockrect, 0, 0, 0xff9cdfb5); check_pixel_4bpp(&lockrect, 1, 0, 0xff63b26b); @@ -1124,7 +1124,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, pixdata_g16r16, D3DFMT_G16R16, 8, NULL, &rect, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "D3DXLoadSurfaceFromMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromMemory returned %#lx, expected %#lx\n", hr, D3D_OK); IDirect3DSurface9_LockRect(surf, &lockrect, NULL, D3DLOCK_READONLY); todo_wine { check_pixel_4bpp(&lockrect, 0, 0, 0xff3f08ff); @@ -1136,9 +1136,9 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, pixdata_a8b8g8r8, D3DFMT_A8B8G8R8, 8, NULL, &rect, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DSurface9_LockRect(surf, &lockrect, NULL, D3DLOCK_READONLY); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); check_pixel_4bpp(&lockrect, 0, 0, 0xc3f04c39); check_pixel_4bpp(&lockrect, 1, 0, 0x2392e85a); check_pixel_4bpp(&lockrect, 0, 1, 0x09fd97b1); @@ -1149,7 +1149,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device) SetRect(&destrect, 1, 1, 2, 2); hr = D3DXLoadSurfaceFromMemory(surf, NULL, &destrect, pixdata_a8b8g8r8, D3DFMT_A8B8G8R8, 8, NULL, &rect, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); IDirect3DSurface9_LockRect(surf, &lockrect, NULL, D3DLOCK_READONLY); check_pixel_4bpp(&lockrect, 0, 0, 0xc3f04c39); check_pixel_4bpp(&lockrect, 1, 0, 0x2392e85a); @@ -1161,7 +1161,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, pixdata_a2r10g10b10, D3DFMT_A2R10G10B10, 8, NULL, &rect, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); IDirect3DSurface9_LockRect(surf, &lockrect, NULL, D3DLOCK_READONLY); check_pixel_4bpp(&lockrect, 0, 0, 0x555c95bf); check_pixel_4bpp(&lockrect, 1, 0, 0x556d663f); @@ -1173,15 +1173,15 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, pixdata_a8l8, D3DFMT_A8L8, 4, NULL, &rect, D3DX_FILTER_NONE, 0); - ok(SUCCEEDED(hr), "Failed to load surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to load surface, hr %#lx.\n", hr); hr = IDirect3DSurface9_LockRect(surf, &lockrect, NULL, D3DLOCK_READONLY); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); check_pixel_4bpp(&lockrect, 0, 0, 0xff000000); check_pixel_4bpp(&lockrect, 1, 0, 0x00ffffff); check_pixel_4bpp(&lockrect, 0, 1, 0xff303030); check_pixel_4bpp(&lockrect, 1, 1, 0x7f7f7f7f); hr = IDirect3DSurface9_UnlockRect(surf); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
/* Test D3DXLoadSurfaceFromMemory with indexed color image */ if (0) @@ -1193,34 +1193,34 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device) palette.peFlags = bmp_1bpp[57]; /* peFlags is the alpha component in DX8 and higher */ hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, &bmp_1bpp[62], D3DFMT_P8, 1, (const PALETTEENTRY *)&palette, &rect, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "D3DXLoadSurfaceFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromFileInMemory returned %#lx, expected %#lx\n", hr, D3D_OK); hr = IDirect3DSurface9_LockRect(surf, &lockrect, NULL, D3DLOCK_READONLY); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx\n", hr); ok(*(DWORD*)lockrect.pBits == 0x80f3f2f1, - "Pixel color mismatch: got %#x, expected 0x80f3f2f1\n", *(DWORD*)lockrect.pBits); + "Pixel color mismatch: got %#lx, expected 0x80f3f2f1\n", *(DWORD*)lockrect.pBits); hr = IDirect3DSurface9_UnlockRect(surf); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx\n", hr); }
/* Test D3DXLoadSurfaceFromFileInMemory with indexed color image (alpha is not taken into account for bmp file) */ hr = D3DXLoadSurfaceFromFileInMemory(surf, NULL, NULL, bmp_1bpp, sizeof(bmp_1bpp), NULL, D3DX_FILTER_NONE, 0, NULL); - ok(hr == D3D_OK, "D3DXLoadSurfaceFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromFileInMemory returned %#lx, expected %#lx\n", hr, D3D_OK); hr = IDirect3DSurface9_LockRect(surf, &lockrect, NULL, D3DLOCK_READONLY); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x\n", hr); - ok(*(DWORD*)lockrect.pBits == 0xfff3f2f1, "Pixel color mismatch: got %#x, expected 0xfff3f2f1\n", *(DWORD*)lockrect.pBits); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx\n", hr); + ok(*(DWORD*)lockrect.pBits == 0xfff3f2f1, "Pixel color mismatch: got %#lx, expected 0xfff3f2f1\n", *(DWORD*)lockrect.pBits); hr = IDirect3DSurface9_UnlockRect(surf); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx\n", hr);
check_release((IUnknown*)surf, 0); }
/* A1R5G5B5 */ hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 2, 2, D3DFMT_A1R5G5B5, D3DPOOL_DEFAULT, &surf, NULL); - if(FAILED(hr)) skip("Failed to create a surface (%#x)\n", hr); + if(FAILED(hr)) skip("Failed to create a surface (%#lx)\n", hr); else { hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, pixdata_a8r3g3b2, D3DFMT_A8R3G3B2, 4, NULL, &rect, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "D3DXLoadSurfaceFromMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromMemory returned %#lx, expected %#lx\n", hr, D3D_OK); IDirect3DSurface9_LockRect(surf, &lockrect, NULL, D3DLOCK_READONLY); check_pixel_2bpp(&lockrect, 0, 0, 0x6fff); check_pixel_2bpp(&lockrect, 1, 0, 0xffe0); @@ -1230,7 +1230,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, pixdata_a1r5g5b5, D3DFMT_A1R5G5B5, 4, NULL, &rect, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "D3DXLoadSurfaceFromMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromMemory returned %#lx, expected %#lx\n", hr, D3D_OK); IDirect3DSurface9_LockRect(surf, &lockrect, NULL, D3DLOCK_READONLY); check_pixel_2bpp(&lockrect, 0, 0, 0x46b5); check_pixel_2bpp(&lockrect, 1, 0, 0x99c8); @@ -1240,7 +1240,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, pixdata_r5g6b5, D3DFMT_R5G6B5, 4, NULL, &rect, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "D3DXLoadSurfaceFromMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromMemory returned %#lx, expected %#lx\n", hr, D3D_OK); IDirect3DSurface9_LockRect(surf, &lockrect, NULL, D3DLOCK_READONLY); check_pixel_2bpp(&lockrect, 0, 0, 0xcf76); check_pixel_2bpp(&lockrect, 1, 0, 0xb2cd); @@ -1250,7 +1250,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, pixdata_g16r16, D3DFMT_G16R16, 8, NULL, &rect, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "D3DXLoadSurfaceFromMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromMemory returned %#lx, expected %#lx\n", hr, D3D_OK); IDirect3DSurface9_LockRect(surf, &lockrect, NULL, D3DLOCK_READONLY); todo_wine { check_pixel_2bpp(&lockrect, 0, 0, 0xa03f); @@ -1262,7 +1262,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, pixdata_a8b8g8r8, D3DFMT_A8B8G8R8, 8, NULL, &rect, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "D3DXLoadSurfaceFromMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromMemory returned %#lx, expected %#lx\n", hr, D3D_OK); IDirect3DSurface9_LockRect(surf, &lockrect, NULL, D3DLOCK_READONLY); todo_wine { check_pixel_2bpp(&lockrect, 0, 0, 0xf527); @@ -1274,7 +1274,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, pixdata_a2r10g10b10, D3DFMT_A2R10G10B10, 8, NULL, &rect, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "D3DXLoadSurfaceFromMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromMemory returned %#lx, expected %#lx\n", hr, D3D_OK); IDirect3DSurface9_LockRect(surf, &lockrect, NULL, D3DLOCK_READONLY); check_pixel_2bpp(&lockrect, 0, 0, 0x2e57); todo_wine { @@ -1286,15 +1286,15 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, pixdata_a8l8, D3DFMT_A8L8, 4, NULL, &rect, D3DX_FILTER_NONE, 0); - ok(SUCCEEDED(hr), "Failed to load surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to load surface, hr %#lx.\n", hr); hr = IDirect3DSurface9_LockRect(surf, &lockrect, NULL, D3DLOCK_READONLY); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); check_pixel_2bpp(&lockrect, 0, 0, 0x8000); check_pixel_2bpp(&lockrect, 1, 0, 0x7fff); check_pixel_2bpp(&lockrect, 0, 1, 0x98c6); check_pixel_2bpp(&lockrect, 1, 1, 0x3def); hr = IDirect3DSurface9_UnlockRect(surf); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
check_release((IUnknown*)surf, 0); } @@ -1302,95 +1302,95 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device) /* A8L8 */ hr = IDirect3DDevice9_CreateTexture(device, 2, 2, 1, 0, D3DFMT_A8L8, D3DPOOL_MANAGED, &tex, NULL); if (FAILED(hr)) - skip("Failed to create A8L8 texture, hr %#x.\n", hr); + skip("Failed to create A8L8 texture, hr %#lx.\n", hr); else { hr = IDirect3DTexture9_GetSurfaceLevel(tex, 0, &surf); - ok(SUCCEEDED(hr), "Failed to get the surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get the surface, hr %#lx.\n", hr);
hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, pixdata_a8r3g3b2, D3DFMT_A8R3G3B2, 4, NULL, &rect, D3DX_FILTER_NONE, 0); - ok(SUCCEEDED(hr), "Failed to load surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to load surface, hr %#lx.\n", hr); hr = IDirect3DSurface9_LockRect(surf, &lockrect, NULL, D3DLOCK_READONLY); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); check_pixel_2bpp(&lockrect, 0, 0, 0x57f7); check_pixel_2bpp(&lockrect, 1, 0, 0x98ed); check_pixel_2bpp(&lockrect, 0, 1, 0xaceb); check_pixel_2bpp(&lockrect, 1, 1, 0xc88d); hr = IDirect3DSurface9_UnlockRect(surf); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, pixdata_a1r5g5b5, D3DFMT_A1R5G5B5, 4, NULL, &rect, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "D3DXLoadSurfaceFromMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromMemory returned %#lx, expected %#lx\n", hr, D3D_OK); hr = IDirect3DSurface9_LockRect(surf, &lockrect, NULL, D3DLOCK_READONLY); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); check_pixel_2bpp(&lockrect, 0, 0, 0x00a6); check_pixel_2bpp(&lockrect, 1, 0, 0xff62); check_pixel_2bpp(&lockrect, 0, 1, 0x007f); check_pixel_2bpp(&lockrect, 1, 1, 0xff19); hr = IDirect3DSurface9_UnlockRect(surf); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, pixdata_r5g6b5, D3DFMT_R5G6B5, 4, NULL, &rect, D3DX_FILTER_NONE, 0); - ok(SUCCEEDED(hr), "Failed to load surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to load surface, hr %#lx.\n", hr); hr = IDirect3DSurface9_LockRect(surf, &lockrect, NULL, D3DLOCK_READONLY); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); check_pixel_2bpp(&lockrect, 0, 0, 0xffce); check_pixel_2bpp(&lockrect, 1, 0, 0xff9c); check_pixel_2bpp(&lockrect, 0, 1, 0xff4d); check_pixel_2bpp(&lockrect, 1, 1, 0xff59); hr = IDirect3DSurface9_UnlockRect(surf); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, pixdata_g16r16, D3DFMT_G16R16, 8, NULL, &rect, D3DX_FILTER_NONE, 0); - ok(SUCCEEDED(hr), "Failed to load surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to load surface, hr %#lx.\n", hr); hr = IDirect3DSurface9_LockRect(surf, &lockrect, NULL, D3DLOCK_READONLY); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); check_pixel_2bpp(&lockrect, 0, 0, 0xff25); check_pixel_2bpp(&lockrect, 1, 0, 0xffbe); check_pixel_2bpp(&lockrect, 0, 1, 0xffd6); check_pixel_2bpp(&lockrect, 1, 1, 0xffb6); hr = IDirect3DSurface9_UnlockRect(surf); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, pixdata_a8b8g8r8, D3DFMT_A8B8G8R8, 8, NULL, &rect, D3DX_FILTER_NONE, 0); - ok(SUCCEEDED(hr), "Failed to load surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to load surface, hr %#lx.\n", hr); hr = IDirect3DSurface9_LockRect(surf, &lockrect, NULL, D3DLOCK_READONLY); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); check_pixel_2bpp(&lockrect, 0, 0, 0xc36d); check_pixel_2bpp(&lockrect, 1, 0, 0x23cb); check_pixel_2bpp(&lockrect, 0, 1, 0x09af); check_pixel_2bpp(&lockrect, 1, 1, 0x8d61); hr = IDirect3DSurface9_UnlockRect(surf); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, pixdata_a2r10g10b10, D3DFMT_A2R10G10B10, 8, NULL, &rect, D3DX_FILTER_NONE, 0); - ok(SUCCEEDED(hr), "Failed to load surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to load surface, hr %#lx.\n", hr); hr = IDirect3DSurface9_LockRect(surf, &lockrect, NULL, D3DLOCK_READONLY); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); check_pixel_2bpp(&lockrect, 0, 0, 0x558c); check_pixel_2bpp(&lockrect, 1, 0, 0x5565); check_pixel_2bpp(&lockrect, 0, 1, 0xaa95); check_pixel_2bpp(&lockrect, 1, 1, 0xffcb); hr = IDirect3DSurface9_UnlockRect(surf); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, pixdata_a8l8, D3DFMT_A8L8, 4, NULL, &rect, D3DX_FILTER_NONE, 0); - ok(SUCCEEDED(hr), "Failed to load surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to load surface, hr %#lx.\n", hr); hr = IDirect3DSurface9_LockRect(surf, &lockrect, NULL, D3DLOCK_READONLY); - ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#lx.\n", hr); check_pixel_2bpp(&lockrect, 0, 0, 0xff00); check_pixel_2bpp(&lockrect, 1, 0, 0x00ff); check_pixel_2bpp(&lockrect, 0, 1, 0xff30); check_pixel_2bpp(&lockrect, 1, 1, 0x7f7f); hr = IDirect3DSurface9_UnlockRect(surf); - ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#lx.\n", hr);
check_release((IUnknown*)surf, 1); check_release((IUnknown*)tex, 0); @@ -1399,19 +1399,19 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device) /* DXT1, DXT2, DXT3, DXT4, DXT5 */ hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 4, 4, D3DFMT_A8R8G8B8, D3DPOOL_SYSTEMMEM, &surf, NULL); if (FAILED(hr)) - skip("Failed to create A8R8G8B8 surface, hr %#x.\n", hr); + skip("Failed to create A8R8G8B8 surface, hr %#lx.\n", hr); else { hr = D3DXLoadSurfaceFromFileInMemory(surf, NULL, NULL, dds_24bit, sizeof(dds_24bit), NULL, D3DX_FILTER_NONE, 0, NULL); - ok(SUCCEEDED(hr), "Failed to load surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to load surface, hr %#lx.\n", hr);
hr = IDirect3DDevice9_CreateTexture(device, 4, 4, 1, 0, D3DFMT_DXT2, D3DPOOL_SYSTEMMEM, &tex, NULL); if (FAILED(hr)) - skip("Failed to create DXT2 texture, hr %#x.\n", hr); + skip("Failed to create DXT2 texture, hr %#lx.\n", hr); else { hr = IDirect3DTexture9_GetSurfaceLevel(tex, 0, &newsurf); - ok(SUCCEEDED(hr), "Failed to get the surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get the surface, hr %#lx.\n", hr); hr = D3DXLoadSurfaceFromSurface(newsurf, NULL, NULL, surf, NULL, NULL, D3DX_FILTER_NONE, 0); ok(SUCCEEDED(hr), "Failed to convert pixels to DXT2 format.\n"); check_release((IUnknown*)newsurf, 1); @@ -1420,11 +1420,11 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
hr = IDirect3DDevice9_CreateTexture(device, 4, 4, 1, 0, D3DFMT_DXT3, D3DPOOL_SYSTEMMEM, &tex, NULL); if (FAILED(hr)) - skip("Failed to create DXT3 texture, hr %#x.\n", hr); + skip("Failed to create DXT3 texture, hr %#lx.\n", hr); else { hr = IDirect3DTexture9_GetSurfaceLevel(tex, 0, &newsurf); - ok(SUCCEEDED(hr), "Failed to get the surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get the surface, hr %#lx.\n", hr); hr = D3DXLoadSurfaceFromSurface(newsurf, NULL, NULL, surf, NULL, NULL, D3DX_FILTER_NONE, 0); ok(SUCCEEDED(hr), "Failed to convert pixels to DXT3 format.\n"); check_release((IUnknown*)newsurf, 1); @@ -1433,11 +1433,11 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
hr = IDirect3DDevice9_CreateTexture(device, 4, 4, 1, 0, D3DFMT_DXT4, D3DPOOL_SYSTEMMEM, &tex, NULL); if (FAILED(hr)) - skip("Failed to create DXT4 texture, hr %#x.\n", hr); + skip("Failed to create DXT4 texture, hr %#lx.\n", hr); else { hr = IDirect3DTexture9_GetSurfaceLevel(tex, 0, &newsurf); - ok(SUCCEEDED(hr), "Failed to get the surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get the surface, hr %#lx.\n", hr); hr = D3DXLoadSurfaceFromSurface(newsurf, NULL, NULL, surf, NULL, NULL, D3DX_FILTER_NONE, 0); ok(SUCCEEDED(hr), "Failed to convert pixels to DXT4 format.\n"); check_release((IUnknown*)newsurf, 1); @@ -1446,54 +1446,54 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
hr = IDirect3DDevice9_CreateTexture(device, 4, 4, 1, 0, D3DFMT_DXT5, D3DPOOL_SYSTEMMEM, &tex, NULL); if (FAILED(hr)) - skip("Failed to create DXT5 texture, hr %#x.\n", hr); + skip("Failed to create DXT5 texture, hr %#lx.\n", hr); else { hr = IDirect3DTexture9_GetSurfaceLevel(tex, 0, &newsurf); - ok(SUCCEEDED(hr), "Failed to get the surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get the surface, hr %#lx.\n", hr); hr = D3DXLoadSurfaceFromSurface(newsurf, NULL, NULL, surf, NULL, NULL, D3DX_FILTER_NONE, 0); ok(SUCCEEDED(hr), "Failed to convert pixels to DXT5 format.\n");
SetRect(&rect, 0, 0, 4, 2); hr = D3DXLoadSurfaceFromSurface(newsurf, NULL, &rect, surf, NULL, &rect, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = D3DXLoadSurfaceFromMemory(newsurf, NULL, &rect, &dds_dxt5[128], D3DFMT_DXT5, 16, NULL, &rect, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); check_release((IUnknown *)newsurf, 1); check_release((IUnknown *)tex, 0);
/* Test a rect larger than but not an integer multiple of the block size. */ hr = IDirect3DDevice9_CreateTexture(device, 4, 8, 1, 0, D3DFMT_DXT5, D3DPOOL_SYSTEMMEM, &tex, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DTexture9_GetSurfaceLevel(tex, 0, &newsurf); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); SetRect(&rect, 0, 0, 4, 6); hr = D3DXLoadSurfaceFromMemory(newsurf, NULL, &rect, &dds_dxt5[112], D3DFMT_DXT5, 16, NULL, &rect, D3DX_FILTER_POINT, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
check_release((IUnknown *)newsurf, 1); check_release((IUnknown *)tex, 0);
/* More misalignment tests. */ hr = IDirect3DDevice9_CreateTexture(device, 8, 8, 1, 0, D3DFMT_DXT5, D3DPOOL_SYSTEMMEM, &tex, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DTexture9_GetSurfaceLevel(tex, 0, &newsurf); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
SetRect(&rect, 2, 2, 6, 6); hr = D3DXLoadSurfaceFromMemory(newsurf, NULL, NULL, &dds_dxt5_8_8[128], D3DFMT_DXT5, 16 * 2, NULL, &rect, D3DX_FILTER_POINT, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = D3DXLoadSurfaceFromMemory(newsurf, NULL, &rect, &dds_dxt5_8_8[128], D3DFMT_DXT5, 16 * 2, NULL, NULL, D3DX_FILTER_POINT, 0); - ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr);
hr = D3DXLoadSurfaceFromMemory(newsurf, NULL, &rect, &dds_dxt5_8_8[128], D3DFMT_DXT5, 16 * 2, NULL, &rect, D3DX_FILTER_POINT, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
check_release((IUnknown *)newsurf, 1); check_release((IUnknown *)tex, 0); @@ -1501,11 +1501,11 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
hr = IDirect3DDevice9_CreateTexture(device, 4, 4, 1, 0, D3DFMT_DXT1, D3DPOOL_SYSTEMMEM, &tex, NULL); if (FAILED(hr)) - skip("Failed to create DXT1 texture, hr %#x.\n", hr); + skip("Failed to create DXT1 texture, hr %#lx.\n", hr); else { hr = IDirect3DTexture9_GetSurfaceLevel(tex, 0, &newsurf); - ok(SUCCEEDED(hr), "Failed to get the surface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get the surface, hr %#lx.\n", hr); hr = D3DXLoadSurfaceFromSurface(newsurf, NULL, NULL, surf, NULL, NULL, D3DX_FILTER_NONE, 0); ok(SUCCEEDED(hr), "Failed to convert pixels to DXT1 format.\n");
@@ -1560,47 +1560,47 @@ static void test_D3DXSaveSurfaceToFileInMemory(IDirect3DDevice9 *device) SetRectEmpty(&rect); hr = D3DXSaveSurfaceToFileInMemory(&buffer, D3DXIFF_BMP, surface, NULL, &rect); /* fails with the debug version of d3d9 */ - ok(hr == D3D_OK || broken(hr == D3DERR_INVALIDCALL), "D3DXSaveSurfaceToFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK || broken(hr == D3DERR_INVALIDCALL), "D3DXSaveSurfaceToFileInMemory returned %#lx, expected %#lx\n", hr, D3D_OK); if (SUCCEEDED(hr)) { DWORD size = ID3DXBuffer_GetBufferSize(buffer); - ok(size > 0, "ID3DXBuffer_GetBufferSize returned %u, expected > 0\n", size); + ok(size > 0, "ID3DXBuffer_GetBufferSize returned %lu, expected > 0\n", size); ID3DXBuffer_Release(buffer); }
SetRectEmpty(&rect); hr = D3DXSaveSurfaceToFileInMemory(&buffer, D3DXIFF_DDS, surface, NULL, &rect); - todo_wine ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); if (SUCCEEDED(hr)) { dds = ID3DXBuffer_GetBufferPointer(buffer);
- ok(dds->magic == MAKEFOURCC('D','D','S',' '), "Got unexpected DDS signature %#x.\n", dds->magic); - ok(dds->header.size == sizeof(dds->header), "Got unexpected DDS size %u.\n", dds->header.size); - ok(!dds->header.height, "Got unexpected height %u.\n", dds->header.height); - ok(!dds->header.width, "Got unexpected width %u.\n", dds->header.width); - ok(!dds->header.depth, "Got unexpected depth %u.\n", dds->header.depth); - ok(!dds->header.miplevels, "Got unexpected miplevels %u.\n", dds->header.miplevels); - ok(!dds->header.pitch_or_linear_size, "Got unexpected pitch_or_linear_size %u.\n", dds->header.pitch_or_linear_size); - ok(dds->header.caps == (DDS_CAPS_TEXTURE | DDSCAPS_ALPHA), "Got unexpected caps %#x.\n", dds->header.caps); + ok(dds->magic == MAKEFOURCC('D','D','S',' '), "Got unexpected DDS signature %#lx.\n", dds->magic); + ok(dds->header.size == sizeof(dds->header), "Got unexpected DDS size %lu.\n", dds->header.size); + ok(!dds->header.height, "Got unexpected height %lu.\n", dds->header.height); + ok(!dds->header.width, "Got unexpected width %lu.\n", dds->header.width); + ok(!dds->header.depth, "Got unexpected depth %lu.\n", dds->header.depth); + ok(!dds->header.miplevels, "Got unexpected miplevels %lu.\n", dds->header.miplevels); + ok(!dds->header.pitch_or_linear_size, "Got unexpected pitch_or_linear_size %lu.\n", dds->header.pitch_or_linear_size); + ok(dds->header.caps == (DDS_CAPS_TEXTURE | DDSCAPS_ALPHA), "Got unexpected caps %#lx.\n", dds->header.caps); ok(dds->header.flags == (DDS_CAPS | DDS_HEIGHT | DDS_WIDTH | DDS_PIXELFORMAT), - "Got unexpected flags %#x.\n", dds->header.flags); + "Got unexpected flags %#lx.\n", dds->header.flags); ID3DXBuffer_Release(buffer); }
hr = D3DXSaveSurfaceToFileInMemory(&buffer, D3DXIFF_DDS, surface, NULL, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
dds = ID3DXBuffer_GetBufferPointer(buffer); - ok(dds->magic == MAKEFOURCC('D','D','S',' '), "Got unexpected DDS signature %#x.\n", dds->magic); - ok(dds->header.size == sizeof(dds->header), "Got unexpected DDS size %u.\n", dds->header.size); - ok(dds->header.height == 4, "Got unexpected height %u.\n", dds->header.height); - ok(dds->header.width == 4, "Got unexpected width %u.\n", dds->header.width); - ok(!dds->header.depth, "Got unexpected depth %u.\n", dds->header.depth); - ok(!dds->header.miplevels, "Got unexpected miplevels %u.\n", dds->header.miplevels); - ok(!dds->header.pitch_or_linear_size, "Got unexpected pitch_or_linear_size %u.\n", dds->header.pitch_or_linear_size); - todo_wine ok(dds->header.caps == (DDS_CAPS_TEXTURE | DDSCAPS_ALPHA), "Got unexpected caps %#x.\n", dds->header.caps); + ok(dds->magic == MAKEFOURCC('D','D','S',' '), "Got unexpected DDS signature %#lx.\n", dds->magic); + ok(dds->header.size == sizeof(dds->header), "Got unexpected DDS size %lu.\n", dds->header.size); + ok(dds->header.height == 4, "Got unexpected height %lu.\n", dds->header.height); + ok(dds->header.width == 4, "Got unexpected width %lu.\n", dds->header.width); + ok(!dds->header.depth, "Got unexpected depth %lu.\n", dds->header.depth); + ok(!dds->header.miplevels, "Got unexpected miplevels %lu.\n", dds->header.miplevels); + ok(!dds->header.pitch_or_linear_size, "Got unexpected pitch_or_linear_size %lu.\n", dds->header.pitch_or_linear_size); + todo_wine ok(dds->header.caps == (DDS_CAPS_TEXTURE | DDSCAPS_ALPHA), "Got unexpected caps %#lx.\n", dds->header.caps); ok(dds->header.flags == (DDS_CAPS | DDS_HEIGHT | DDS_WIDTH | DDS_PIXELFORMAT), - "Got unexpected flags %#x.\n", dds->header.flags); + "Got unexpected flags %#lx.\n", dds->header.flags); ID3DXBuffer_Release(buffer);
IDirect3DSurface9_Release(surface); @@ -1609,17 +1609,17 @@ static void test_D3DXSaveSurfaceToFileInMemory(IDirect3DDevice9 *device) { hr = IDirect3DDevice9_CreateTexture(device, 4, 4, 0, test_access_types[i].usage, D3DFMT_A8R8G8B8, test_access_types[i].pool, &texture, NULL); - ok(hr == D3D_OK, "Unexpected hr %#x, i %u.\n", hr, i); + ok(hr == D3D_OK, "Unexpected hr %#lx, i %u.\n", hr, i);
hr = IDirect3DTexture9_GetSurfaceLevel(texture, 0, &surface); - ok(hr == D3D_OK, "Unexpected hr %#x, i %u.\n", hr, i); + ok(hr == D3D_OK, "Unexpected hr %#lx, i %u.\n", hr, i);
hr = D3DXSaveSurfaceToFileInMemory(&buffer, D3DXIFF_DDS, surface, NULL, NULL); - ok(hr == D3D_OK, "Unexpected hr %#x, i %u.\n", hr, i); + ok(hr == D3D_OK, "Unexpected hr %#lx, i %u.\n", hr, i); ID3DXBuffer_Release(buffer);
hr = D3DXSaveSurfaceToFileInMemory(&buffer, D3DXIFF_BMP, surface, NULL, NULL); - ok(hr == D3D_OK, "Unexpected hr %#x, i %u.\n", hr, i); + ok(hr == D3D_OK, "Unexpected hr %#lx, i %u.\n", hr, i); ID3DXBuffer_Release(buffer);
IDirect3DSurface9_Release(surface); @@ -1649,14 +1649,14 @@ static void test_D3DXSaveSurfaceToFile(IDirect3DDevice9 *device) SetRect(&rect, 0, 0, 2, 2); hr = D3DXLoadSurfaceFromMemory(surface, NULL, NULL, pixels, D3DFMT_R8G8B8, pitch, NULL, &rect, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = D3DXSaveSurfaceToFileA("saved_surface.bmp", D3DXIFF_BMP, surface, NULL, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = D3DXLoadSurfaceFromFileA(surface, NULL, NULL, "saved_surface.bmp", NULL, D3DX_FILTER_NONE, 0, &image_info); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
ok(image_info.Width == 2, "Wrong width %u.\n", image_info.Width); ok(image_info.Height == 2, "Wrong height %u.\n", image_info.Height); @@ -1664,7 +1664,7 @@ static void test_D3DXSaveSurfaceToFile(IDirect3DDevice9 *device) ok(image_info.ImageFileFormat == D3DXIFF_BMP, "Wrong file format %u.\n", image_info.ImageFileFormat);
hr = IDirect3DSurface9_LockRect(surface, &lock_rect, NULL, D3DLOCK_READONLY); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
ok(!memcmp(lock_rect.pBits, pixels, pitch), "Pixel data mismatch in the first row.\n"); @@ -1675,14 +1675,14 @@ static void test_D3DXSaveSurfaceToFile(IDirect3DDevice9 *device)
SetRect(&rect, 0, 1, 2, 2); hr = D3DXSaveSurfaceToFileA("saved_surface.bmp", D3DXIFF_BMP, surface, NULL, &rect); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); SetRect(&rect, 0, 0, 2, 1); hr = D3DXLoadSurfaceFromFileA(surface, NULL, &rect, "saved_surface.bmp", NULL, D3DX_FILTER_NONE, 0, &image_info); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DSurface9_LockRect(surface, &lock_rect, NULL, D3DLOCK_READONLY); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); ok(!memcmp(lock_rect.pBits, pixels + pitch, pitch), "Pixel data mismatch in the first row.\n"); ok(!memcmp((BYTE *)lock_rect.pBits + lock_rect.Pitch, pixels + pitch, pitch), @@ -1692,33 +1692,33 @@ static void test_D3DXSaveSurfaceToFile(IDirect3DDevice9 *device) SetRect(&rect, 0, 0, 2, 2); hr = D3DXLoadSurfaceFromMemory(surface, NULL, NULL, pixels, D3DFMT_R8G8B8, pitch, NULL, &rect, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = D3DXSaveSurfaceToFileA(NULL, D3DXIFF_BMP, surface, NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr);
/* PPM and TGA are supported, even though MSDN claims they aren't */ todo_wine { hr = D3DXSaveSurfaceToFileA("saved_surface.ppm", D3DXIFF_PPM, surface, NULL, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = D3DXSaveSurfaceToFileA("saved_surface.tga", D3DXIFF_TGA, surface, NULL, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); }
hr = D3DXSaveSurfaceToFileA("saved_surface.dds", D3DXIFF_DDS, surface, NULL, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = D3DXLoadSurfaceFromFileA(surface, NULL, NULL, "saved_surface.dds", NULL, D3DX_FILTER_NONE, 0, &image_info); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
ok(image_info.Width == 2, "Wrong width %u.\n", image_info.Width); ok(image_info.Format == D3DFMT_R8G8B8, "Wrong format %#x.\n", image_info.Format); ok(image_info.ImageFileFormat == D3DXIFF_DDS, "Wrong file format %u.\n", image_info.ImageFileFormat);
hr = IDirect3DSurface9_LockRect(surface, &lock_rect, NULL, D3DLOCK_READONLY); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); ok(!memcmp(lock_rect.pBits, pixels, pitch), "Pixel data mismatch in the first row.\n"); ok(!memcmp((BYTE *)lock_rect.pBits + lock_rect.Pitch, pixels + pitch, pitch), @@ -1726,24 +1726,24 @@ static void test_D3DXSaveSurfaceToFile(IDirect3DDevice9 *device) IDirect3DSurface9_UnlockRect(surface);
hr = D3DXSaveSurfaceToFileA("saved_surface", D3DXIFF_PFM + 1, surface, NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr);
SetRect(&rect, 0, 0, 4, 4); hr = D3DXSaveSurfaceToFileA("saved_surface.bmp", D3DXIFF_BMP, surface, NULL, &rect); - ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr); SetRect(&rect, 2, 0, 1, 4); hr = D3DXSaveSurfaceToFileA("saved_surface.bmp", D3DXIFF_BMP, surface, NULL, &rect); - ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr); SetRect(&rect, 0, 2, 4, 1); hr = D3DXSaveSurfaceToFileA("saved_surface.bmp", D3DXIFF_BMP, surface, NULL, &rect); - ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr); SetRect(&rect, -1, -1, 2, 2); hr = D3DXSaveSurfaceToFileA("saved_surface.bmp", D3DXIFF_BMP, surface, NULL, &rect); - ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr); SetRectEmpty(&rect); hr = D3DXSaveSurfaceToFileA("saved_surface.bmp", D3DXIFF_BMP, surface, NULL, &rect); /* fails when debug version of d3d9 is used */ - ok(hr == D3D_OK || broken(hr == D3DERR_INVALIDCALL), "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK || broken(hr == D3DERR_INVALIDCALL), "Got unexpected hr %#lx.\n", hr);
DeleteFileA("saved_surface.bmp"); DeleteFileA("saved_surface.ppm"); @@ -1779,7 +1779,7 @@ START_TEST(surface) d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD; hr = IDirect3D9_CreateDevice(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, wnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &device); if(FAILED(hr)) { - skip("Failed to create IDirect3DDevice9 object %#x\n", hr); + skip("Failed to create IDirect3DDevice9 object %#lx\n", hr); IDirect3D9_Release(d3d); DestroyWindow(wnd); return; diff --git a/dlls/d3dx9_36/tests/texture.c b/dlls/d3dx9_36/tests/texture.c index e8a57fc609e..20970a93dcd 100644 --- a/dlls/d3dx9_36/tests/texture.c +++ b/dlls/d3dx9_36/tests/texture.c @@ -198,24 +198,24 @@ static void test_D3DXCheckTextureRequirements(IDirect3DDevice9 *device)
/* general tests */ hr = D3DXCheckTextureRequirements(device, NULL, NULL, NULL, 0, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = D3DXCheckTextureRequirements(device, NULL, NULL, NULL, D3DX_DEFAULT, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = D3DXCheckTextureRequirements(NULL, NULL, NULL, NULL, D3DX_DEFAULT, NULL, D3DPOOL_DEFAULT); - ok(hr == D3DERR_INVALIDCALL, "D3DXCheckTextureRequirements returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXCheckTextureRequirements returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
/* width & height */ width = height = D3DX_DEFAULT; hr = D3DXCheckTextureRequirements(device, &width, &height, NULL, 0, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(width == 256, "Returned width %d, expected %d\n", width, 256); ok(height == 256, "Returned height %d, expected %d\n", height, 256);
width = D3DX_DEFAULT; hr = D3DXCheckTextureRequirements(device, &width, NULL, NULL, 0, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(width == 256, "Returned width %d, expected %d\n", width, 256);
if (caps.TextureCaps & D3DPTEXTURECAPS_POW2) @@ -224,51 +224,51 @@ static void test_D3DXCheckTextureRequirements(IDirect3DDevice9 *device) { width = 62; hr = D3DXCheckTextureRequirements(device, &width, NULL, NULL, 0, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(width == 62, "Returned width %d, expected %d\n", width, 62);
width = D3DX_DEFAULT; height = 63; hr = D3DXCheckTextureRequirements(device, &width, &height, NULL, 0, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(width == height, "Returned width %d, expected %d\n", width, height); ok(height == 63, "Returned height %d, expected %d\n", height, 63); }
width = D3DX_DEFAULT; height = 0; hr = D3DXCheckTextureRequirements(device, &width, &height, NULL, 0, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(width == 1, "Returned width %d, expected %d\n", width, 1); ok(height == 1, "Returned height %d, expected %d\n", height, 1);
width = 0; height = 0; hr = D3DXCheckTextureRequirements(device, &width, &height, NULL, 0, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(width == 1, "Returned width %d, expected %d\n", width, 1); ok(height == 1, "Returned height %d, expected %d\n", height, 1);
width = 0; hr = D3DXCheckTextureRequirements(device, &width, NULL, NULL, 0, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(width == 1, "Returned width %d, expected %d\n", width, 1);
width = 0xFFFFFFFE; hr = D3DXCheckTextureRequirements(device, &width, NULL, NULL, 0, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); - ok(width == caps.MaxTextureWidth, "Returned width %d, expected %d\n", width, caps.MaxTextureWidth); + ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); + ok(width == caps.MaxTextureWidth, "Returned width %d, expected %ld\n", width, caps.MaxTextureWidth);
width = caps.MaxTextureWidth-1; hr = D3DXCheckTextureRequirements(device, &width, NULL, NULL, 0, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); if (caps.TextureCaps & D3DPTEXTURECAPS_POW2) - ok(width == caps.MaxTextureWidth, "Returned width %d, expected %d\n", width, caps.MaxTextureWidth); + ok(width == caps.MaxTextureWidth, "Returned width %d, expected %ld\n", width, caps.MaxTextureWidth); else - ok(width == caps.MaxTextureWidth-1, "Returned width %d, expected %d\n", width, caps.MaxTextureWidth-1); + ok(width == caps.MaxTextureWidth-1, "Returned width %d, expected %ld\n", width, caps.MaxTextureWidth-1);
/* mipmaps */ width = 64; height = 63; mipmaps = 9; hr = D3DXCheckTextureRequirements(device, &width, &height, &mipmaps, 0, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(mipmaps == 7, "Returned mipmaps %d, expected %d\n", mipmaps, 7);
if (!(caps.TextureCaps & D3DPTEXTURECAPS_POW2)) @@ -276,13 +276,13 @@ static void test_D3DXCheckTextureRequirements(IDirect3DDevice9 *device) width = 284; height = 137; mipmaps = 20; hr = D3DXCheckTextureRequirements(device, &width, &height, &mipmaps, 0, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(mipmaps == 9, "Returned mipmaps %d, expected %d\n", mipmaps, 9);
width = height = 63; mipmaps = 9; hr = D3DXCheckTextureRequirements(device, &width, &height, &mipmaps, 0, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(mipmaps == 6, "Returned mipmaps %d, expected %d\n", mipmaps, 6); } else @@ -290,12 +290,12 @@ static void test_D3DXCheckTextureRequirements(IDirect3DDevice9 *device)
mipmaps = 20; hr = D3DXCheckTextureRequirements(device, NULL, NULL, &mipmaps, 0, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(mipmaps == 9, "Returned mipmaps %d, expected %d\n", mipmaps, 9);
mipmaps = 0; hr = D3DXCheckTextureRequirements(device, NULL, NULL, &mipmaps, 0, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(mipmaps == 9, "Returned mipmaps %d, expected %d\n", mipmaps, 9);
/* mipmaps when D3DUSAGE_AUTOGENMIPMAP is set */ @@ -303,19 +303,19 @@ static void test_D3DXCheckTextureRequirements(IDirect3DDevice9 *device) { mipmaps = 0; hr = D3DXCheckTextureRequirements(device, NULL, NULL, &mipmaps, D3DUSAGE_AUTOGENMIPMAP, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(mipmaps == 0, "Returned mipmaps %d, expected %d\n", mipmaps, 0); mipmaps = 1; hr = D3DXCheckTextureRequirements(device, NULL, NULL, &mipmaps, D3DUSAGE_AUTOGENMIPMAP, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(mipmaps == 1, "Returned mipmaps %d, expected %d\n", mipmaps, 1); mipmaps = 2; hr = D3DXCheckTextureRequirements(device, NULL, NULL, &mipmaps, D3DUSAGE_AUTOGENMIPMAP, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(mipmaps == 0, "Returned mipmaps %d, expected %d\n", mipmaps, 0); mipmaps = 6; hr = D3DXCheckTextureRequirements(device, NULL, NULL, &mipmaps, D3DUSAGE_AUTOGENMIPMAP, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(mipmaps == 0, "Returned mipmaps %d, expected %d\n", mipmaps, 0); } else @@ -335,21 +335,21 @@ static void test_D3DXCheckTextureRequirements(IDirect3DDevice9 *device)
/* format */ hr = D3DXCheckTextureRequirements(device, NULL, NULL, NULL, 0, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK);
format = D3DFMT_UNKNOWN; hr = D3DXCheckTextureRequirements(device, NULL, NULL, NULL, 0, &format, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(format == D3DFMT_A8R8G8B8, "Returned format %u, expected %u\n", format, D3DFMT_A8R8G8B8);
format = D3DX_DEFAULT; hr = D3DXCheckTextureRequirements(device, NULL, NULL, NULL, 0, &format, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(format == D3DFMT_A8R8G8B8, "Returned format %u, expected %u\n", format, D3DFMT_A8R8G8B8);
format = D3DFMT_R8G8B8; hr = D3DXCheckTextureRequirements(device, NULL, NULL, NULL, 0, &format, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(format == D3DFMT_X8R8G8B8, "Returned format %u, expected %u\n", format, D3DFMT_X8R8G8B8);
IDirect3DDevice9_GetDirect3D(device, &d3d); @@ -370,7 +370,7 @@ static void test_D3DXCheckTextureRequirements(IDirect3DDevice9 *device)
format = D3DFMT_R3G3B2; hr = D3DXCheckTextureRequirements(device, NULL, NULL, NULL, 0, &format, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(format == expected, "Returned format %u, expected %u\n", format, expected);
if(SUCCEEDED(IDirect3D9_CheckDeviceFormat(d3d, params.AdapterOrdinal, params.DeviceType, @@ -381,7 +381,7 @@ static void test_D3DXCheckTextureRequirements(IDirect3DDevice9 *device)
format = D3DFMT_A8R3G3B2; hr = D3DXCheckTextureRequirements(device, NULL, NULL, NULL, 0, &format, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(format == expected, "Returned format %u, expected %u\n", format, expected);
if(SUCCEEDED(IDirect3D9_CheckDeviceFormat(d3d, params.AdapterOrdinal, params.DeviceType, @@ -392,7 +392,7 @@ static void test_D3DXCheckTextureRequirements(IDirect3DDevice9 *device)
format = D3DFMT_P8; hr = D3DXCheckTextureRequirements(device, NULL, NULL, NULL, 0, &format, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(format == expected, "Returned format %u, expected %u\n", format, expected);
if(SUCCEEDED(IDirect3D9_CheckDeviceFormat(d3d, params.AdapterOrdinal, params.DeviceType, @@ -403,7 +403,7 @@ static void test_D3DXCheckTextureRequirements(IDirect3DDevice9 *device)
format = D3DFMT_L8; hr = D3DXCheckTextureRequirements(device, NULL, NULL, NULL, D3DUSAGE_RENDERTARGET, &format, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(format == expected, "Returned format %u, expected %u\n", format, expected);
if(SUCCEEDED(IDirect3D9_CheckDeviceFormat(d3d, params.AdapterOrdinal, params.DeviceType, @@ -414,7 +414,7 @@ static void test_D3DXCheckTextureRequirements(IDirect3DDevice9 *device)
format = D3DFMT_L16; hr = D3DXCheckTextureRequirements(device, NULL, NULL, NULL, D3DUSAGE_RENDERTARGET, &format, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(format == expected, "Returned format %u, expected %u\n", format, expected);
/* Block-based texture formats and size < block size. */ @@ -422,7 +422,7 @@ static void test_D3DXCheckTextureRequirements(IDirect3DDevice9 *device) width = 2; height = 2; mipmaps = 1; hr = D3DXCheckTextureRequirements(device, &width, &height, &mipmaps, 0, &format, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); ok(mipmaps == 1, "Got unexpected level count %u.\n", mipmaps); if (has_2d_dxt1) { @@ -440,7 +440,7 @@ static void test_D3DXCheckTextureRequirements(IDirect3DDevice9 *device) format = D3DFMT_DXT5; width = 2; height = 2; hr = D3DXCheckTextureRequirements(device, &width, &height, &mipmaps, 0, &format, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); ok(mipmaps == 1, "Got unexpected level count %u.\n", mipmaps); if (has_2d_dxt5) { @@ -451,7 +451,7 @@ static void test_D3DXCheckTextureRequirements(IDirect3DDevice9 *device) width = 9; height = 9; hr = D3DXCheckTextureRequirements(device, &width, &height, &mipmaps, 0, &format, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); ok(width == 12, "Got unexpected width %u.\n", width); ok(height == 12, "Got unexpected height %u.\n", height); ok(mipmaps == 1, "Got unexpected level count %u.\n", mipmaps); @@ -466,7 +466,7 @@ static void test_D3DXCheckTextureRequirements(IDirect3DDevice9 *device) width = 4; height = 2; hr = D3DXCheckTextureRequirements(device, &width, &height, &mipmaps, 0, &format, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); ok(width == 4, "Got unexpected width %u.\n", width); ok(mipmaps == 1, "Got unexpected level count %u.\n", mipmaps); if (has_2d_dxt5) @@ -500,25 +500,25 @@ static void test_D3DXCheckCubeTextureRequirements(IDirect3DDevice9 *device)
/* general tests */ hr = D3DXCheckCubeTextureRequirements(device, NULL, NULL, 0, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckCubeTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckCubeTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = D3DXCheckCubeTextureRequirements(device, NULL, NULL, D3DX_DEFAULT, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckCubeTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckCubeTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = D3DXCheckCubeTextureRequirements(NULL, NULL, NULL, D3DX_DEFAULT, NULL, D3DPOOL_DEFAULT); - ok(hr == D3DERR_INVALIDCALL, "D3DXCheckCubeTextureRequirements returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXCheckCubeTextureRequirements returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
/* size */ size = D3DX_DEFAULT; hr = D3DXCheckCubeTextureRequirements(device, &size, NULL, 0, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckCubeTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckCubeTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(size == 256, "Returned size %d, expected %d\n", size, 256);
/* mipmaps */ size = 64; mipmaps = 9; hr = D3DXCheckCubeTextureRequirements(device, &size, &mipmaps, 0, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckCubeTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckCubeTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(mipmaps == 7, "Returned mipmaps %d, expected %d\n", mipmaps, 7);
size = 284; @@ -526,7 +526,7 @@ static void test_D3DXCheckCubeTextureRequirements(IDirect3DDevice9 *device) expected = caps.TextureCaps & D3DPTEXTURECAPS_CUBEMAP_POW2 ? 10 : 9; expected = caps.TextureCaps & D3DPTEXTURECAPS_MIPCUBEMAP ? expected : 1; hr = D3DXCheckCubeTextureRequirements(device, &size, &mipmaps, 0, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckCubeTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckCubeTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(mipmaps == expected, "Returned mipmaps %d, expected %d\n", mipmaps, expected);
size = 63; @@ -534,19 +534,19 @@ static void test_D3DXCheckCubeTextureRequirements(IDirect3DDevice9 *device) expected = caps.TextureCaps & D3DPTEXTURECAPS_CUBEMAP_POW2 ? 7 : 6; expected = caps.TextureCaps & D3DPTEXTURECAPS_MIPCUBEMAP ? expected : 1; hr = D3DXCheckCubeTextureRequirements(device, &size, &mipmaps, 0, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckCubeTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckCubeTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(mipmaps == expected, "Returned mipmaps %d, expected %d\n", mipmaps, expected);
mipmaps = 0; hr = D3DXCheckCubeTextureRequirements(device, NULL, &mipmaps, 0, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckCubeTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckCubeTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(mipmaps == 9, "Returned mipmaps %d, expected %d\n", mipmaps, 9);
if (is_autogenmipmap_supported(device, D3DRTYPE_CUBETEXTURE)) { mipmaps = 3; hr = D3DXCheckCubeTextureRequirements(device, NULL, &mipmaps, D3DUSAGE_AUTOGENMIPMAP, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckCubeTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckCubeTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(mipmaps == 0, "Returned mipmaps %d, expected %d\n", mipmaps, 0); } else @@ -566,21 +566,21 @@ static void test_D3DXCheckCubeTextureRequirements(IDirect3DDevice9 *device)
/* format */ hr = D3DXCheckCubeTextureRequirements(device, NULL, NULL, 0, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckCubeTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckCubeTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK);
format = D3DFMT_UNKNOWN; hr = D3DXCheckCubeTextureRequirements(device, NULL, NULL, 0, &format, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckCubeTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckCubeTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(format == D3DFMT_A8R8G8B8, "Returned format %u, expected %u\n", format, D3DFMT_A8R8G8B8);
format = D3DX_DEFAULT; hr = D3DXCheckCubeTextureRequirements(device, NULL, NULL, 0, &format, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckCubeTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckCubeTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(format == D3DFMT_A8R8G8B8, "Returned format %u, expected %u\n", format, D3DFMT_A8R8G8B8);
format = D3DFMT_R8G8B8; hr = D3DXCheckCubeTextureRequirements(device, NULL, NULL, 0, &format, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckCubeTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckCubeTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(format == D3DFMT_X8R8G8B8, "Returned format %u, expected %u\n", format, D3DFMT_X8R8G8B8); }
@@ -601,73 +601,73 @@ static void test_D3DXCheckVolumeTextureRequirements(IDirect3DDevice9 *device)
/* general tests */ hr = D3DXCheckVolumeTextureRequirements(device, NULL, NULL, NULL, NULL, 0, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckVolumeTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckVolumeTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = D3DXCheckVolumeTextureRequirements(device, NULL, NULL, NULL, NULL, D3DX_DEFAULT, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckVolumeTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckVolumeTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = D3DXCheckVolumeTextureRequirements(NULL, NULL, NULL, NULL, NULL, D3DX_DEFAULT, NULL, D3DPOOL_DEFAULT); - ok(hr == D3DERR_INVALIDCALL, "D3DXCheckVolumeTextureRequirements returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXCheckVolumeTextureRequirements returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
/* width, height, depth */ width = height = depth = D3DX_DEFAULT; hr = D3DXCheckVolumeTextureRequirements(device, &width, &height, &depth, NULL, 0, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckVolumeTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckVolumeTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(width == 256, "Returned width %d, expected %d\n", width, 256); ok(height == 256, "Returned height %d, expected %d\n", height, 256); ok(depth == 1, "Returned depth %d, expected %d\n", depth, 1);
width = D3DX_DEFAULT; hr = D3DXCheckVolumeTextureRequirements(device, &width, NULL, NULL, NULL, 0, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckVolumeTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckVolumeTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(width == 256, "Returned width %d, expected %d\n", width, 256);
width = D3DX_DEFAULT; height = 0; depth = 0; hr = D3DXCheckVolumeTextureRequirements(device, &width, &height, &depth, NULL, 0, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckVolumeTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckVolumeTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(width == 1, "Returned width %d, expected %d\n", width, 1); ok(height == 1, "Returned height %d, expected %d\n", height, 1); ok(depth == 1, "Returned height %d, expected %d\n", depth, 1);
width = 0; height = 0; depth = 0; hr = D3DXCheckVolumeTextureRequirements(device, &width, &height, &depth, NULL, 0, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckVolumeTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckVolumeTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(width == 1, "Returned width %d, expected %d\n", width, 1); ok(height == 1, "Returned height %d, expected %d\n", height, 1); ok(depth == 1, "Returned height %d, expected %d\n", depth, 1);
width = 0; hr = D3DXCheckVolumeTextureRequirements(device, &width, NULL, NULL, NULL, 0, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckVolumeTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckVolumeTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(width == 1, "Returned width %d, expected %d\n", width, 1);
width = 0xFFFFFFFE; hr = D3DXCheckVolumeTextureRequirements(device, &width, NULL, NULL, NULL, 0, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckVolumeTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); - ok(width == caps.MaxVolumeExtent, "Returned width %d, expected %d\n", width, caps.MaxVolumeExtent); + ok(hr == D3D_OK, "D3DXCheckVolumeTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); + ok(width == caps.MaxVolumeExtent, "Returned width %d, expected %ld\n", width, caps.MaxVolumeExtent);
/* format */ hr = D3DXCheckVolumeTextureRequirements(device, NULL, NULL, NULL, NULL, 0, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckVolumeTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckVolumeTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK);
format = D3DFMT_UNKNOWN; hr = D3DXCheckVolumeTextureRequirements(device, NULL, NULL, NULL, NULL, 0, &format, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckVolumeTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckVolumeTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(format == D3DFMT_A8R8G8B8, "Returned format %u, expected %u\n", format, D3DFMT_A8R8G8B8);
format = D3DX_DEFAULT; hr = D3DXCheckVolumeTextureRequirements(device, NULL, NULL, NULL, NULL, 0, &format, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckVolumeTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckVolumeTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(format == D3DFMT_A8R8G8B8, "Returned format %u, expected %u\n", format, D3DFMT_A8R8G8B8);
format = D3DFMT_R8G8B8; hr = D3DXCheckVolumeTextureRequirements(device, NULL, NULL, NULL, NULL, 0, &format, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckVolumeTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckVolumeTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(format == D3DFMT_X8R8G8B8, "Returned format %u, expected %u\n", format, D3DFMT_X8R8G8B8);
format = D3DFMT_DXT3; hr = D3DXCheckVolumeTextureRequirements(device, NULL, NULL, NULL, NULL, 0, &format, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckVolumeTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckVolumeTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); if (has_3d_dxt3) ok(format == D3DFMT_DXT3, "Returned format %u, expected %u\n", format, D3DFMT_DXT3); else @@ -683,7 +683,7 @@ static void test_D3DXCheckVolumeTextureRequirements(IDirect3DDevice9 *device) width = height = depth = 64; mipmaps = 9; hr = D3DXCheckVolumeTextureRequirements(device, &width, &height, &depth, &mipmaps, 0, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckVolumeTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckVolumeTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(mipmaps == 7, "Returned mipmaps %d, expected %d\n", mipmaps, 7);
width = 284; @@ -692,12 +692,12 @@ static void test_D3DXCheckVolumeTextureRequirements(IDirect3DDevice9 *device) mipmaps = 20; expected = (caps.TextureCaps & D3DPTEXTURECAPS_VOLUMEMAP_POW2 && caps.MaxVolumeExtent >= 512) ? 10 : 9; hr = D3DXCheckVolumeTextureRequirements(device, &width, &height, &depth, &mipmaps, 0, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckVolumeTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckVolumeTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(mipmaps == expected, "Returned mipmaps %d, expected %d\n", mipmaps, expected);
mipmaps = 0; hr = D3DXCheckVolumeTextureRequirements(device, NULL, NULL, NULL, &mipmaps, 0, NULL, D3DPOOL_DEFAULT); - ok(hr == D3D_OK, "D3DXCheckVolumeTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCheckVolumeTextureRequirements returned %#lx, expected %#lx\n", hr, D3D_OK); ok(mipmaps == 9, "Returned mipmaps %d, expected %d\n", mipmaps, 9);
/* D3DUSAGE_AUTOGENMIPMAP is never supported for volume textures. */ @@ -716,17 +716,17 @@ static void test_D3DXCreateTexture(IDirect3DDevice9 *device) IDirect3DDevice9_GetDeviceCaps(device, &caps);
hr = D3DXCreateTexture(NULL, 0, 0, 0, 0, D3DX_DEFAULT, D3DPOOL_DEFAULT, NULL); - ok(hr == D3DERR_INVALIDCALL, "D3DXCreateTexture returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXCreateTexture returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
/* width and height tests */
hr = D3DXCreateTexture(device, D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, 0, D3DPOOL_DEFAULT, &texture); - ok(hr == D3D_OK, "D3DXCreateTexture returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateTexture returned %#lx, expected %#lx\n", hr, D3D_OK);
if (texture) { hr = IDirect3DTexture9_GetLevelDesc(texture, 0, &desc); - ok(hr == D3D_OK, "GetLevelDesc returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "GetLevelDesc returned %#lx, expected %#lx\n", hr, D3D_OK); ok(desc.Format == D3DFMT_A8R8G8B8, "Returned format %u, expected %u\n", desc.Format, D3DFMT_A8R8G8B8);
ok(desc.Width == 256, "Returned width %d, expected %d\n", desc.Width, 256); @@ -737,12 +737,12 @@ static void test_D3DXCreateTexture(IDirect3DDevice9 *device)
hr = D3DXCreateTexture(device, 0, 0, 0, 0, 0, D3DPOOL_DEFAULT, &texture); - ok(hr == D3D_OK, "D3DXCreateTexture returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateTexture returned %#lx, expected %#lx\n", hr, D3D_OK);
if (texture) { hr = IDirect3DTexture9_GetLevelDesc(texture, 0, &desc); - ok(hr == D3D_OK, "GetLevelDesc returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "GetLevelDesc returned %#lx, expected %#lx\n", hr, D3D_OK); ok(desc.Format == D3DFMT_A8R8G8B8, "Returned format %u, expected %u\n", desc.Format, D3DFMT_A8R8G8B8);
ok(desc.Width == 1, "Returned width %d, expected %d\n", desc.Width, 1); @@ -760,12 +760,12 @@ static void test_D3DXCreateTexture(IDirect3DDevice9 *device) ok((hr == D3D_OK) || /* may not work with conditional NPOT */ ((hr != D3D_OK) && (caps.TextureCaps & D3DPTEXTURECAPS_NONPOW2CONDITIONAL)), - "D3DXCreateTexture returned %#x, expected %#x\n", hr, D3D_OK); + "D3DXCreateTexture returned %#lx, expected %#lx\n", hr, D3D_OK);
if (texture) { hr = IDirect3DTexture9_GetLevelDesc(texture, 0, &desc); - ok(hr == D3D_OK, "GetLevelDesc returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "GetLevelDesc returned %#lx, expected %#lx\n", hr, D3D_OK); ok(desc.Format == D3DFMT_A8R8G8B8, "Returned format %u, expected %u\n", desc.Format, D3DFMT_A8R8G8B8);
/* Conditional NPOT may create a texture with different dimensions, so allow those @@ -786,7 +786,7 @@ static void test_D3DXCreateTexture(IDirect3DDevice9 *device) /* mipmaps */
hr = D3DXCreateTexture(device, 64, 63, 9, 0, 0, D3DPOOL_DEFAULT, &texture); - ok(hr == D3D_OK, "D3DXCreateTexture returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateTexture returned %#lx, expected %#lx\n", hr, D3D_OK);
if (texture) { @@ -798,7 +798,7 @@ static void test_D3DXCreateTexture(IDirect3DDevice9 *device)
hr = D3DXCreateTexture(device, 284, 137, 9, 0, 0, D3DPOOL_DEFAULT, &texture); - ok(hr == D3D_OK, "D3DXCreateTexture returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateTexture returned %#lx, expected %#lx\n", hr, D3D_OK);
if (texture) { @@ -810,7 +810,7 @@ static void test_D3DXCreateTexture(IDirect3DDevice9 *device)
hr = D3DXCreateTexture(device, 0, 0, 20, 0, 0, D3DPOOL_DEFAULT, &texture); - ok(hr == D3D_OK, "D3DXCreateTexture returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateTexture returned %#lx, expected %#lx\n", hr, D3D_OK);
if (texture) { @@ -822,7 +822,7 @@ static void test_D3DXCreateTexture(IDirect3DDevice9 *device)
hr = D3DXCreateTexture(device, 64, 64, 1, 0, 0, D3DPOOL_DEFAULT, &texture); - ok(hr == D3D_OK, "D3DXCreateTexture returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateTexture returned %#lx, expected %#lx\n", hr, D3D_OK);
if (texture) { @@ -848,12 +848,12 @@ static void test_D3DXCreateTexture(IDirect3DDevice9 *device) /* format */
hr = D3DXCreateTexture(device, 0, 0, 0, 0, D3DFMT_UNKNOWN, D3DPOOL_DEFAULT, &texture); - ok(hr == D3D_OK, "D3DXCreateTexture returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateTexture returned %#lx, expected %#lx\n", hr, D3D_OK);
if (texture) { hr = IDirect3DTexture9_GetLevelDesc(texture, 0, &desc); - ok(hr == D3D_OK, "GetLevelDesc returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "GetLevelDesc returned %#lx, expected %#lx\n", hr, D3D_OK); ok(desc.Format == D3DFMT_A8R8G8B8, "Returned format %u, expected %u\n", desc.Format, D3DFMT_A8R8G8B8);
IDirect3DTexture9_Release(texture); @@ -861,12 +861,12 @@ static void test_D3DXCreateTexture(IDirect3DDevice9 *device)
hr = D3DXCreateTexture(device, 0, 0, 0, 0, 0, D3DPOOL_DEFAULT, &texture); - ok(hr == D3D_OK, "D3DXCreateTexture returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateTexture returned %#lx, expected %#lx\n", hr, D3D_OK);
if (texture) { hr = IDirect3DTexture9_GetLevelDesc(texture, 0, &desc); - ok(hr == D3D_OK, "GetLevelDesc returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "GetLevelDesc returned %#lx, expected %#lx\n", hr, D3D_OK); ok(desc.Format == D3DFMT_A8R8G8B8, "Returned format %u, expected %u\n", desc.Format, D3DFMT_A8R8G8B8);
IDirect3DTexture9_Release(texture); @@ -874,42 +874,42 @@ static void test_D3DXCreateTexture(IDirect3DDevice9 *device)
/* D3DXCreateTextureFromResource */ hr = D3DXCreateTextureFromResourceA(device, NULL, MAKEINTRESOURCEA(IDB_BITMAP_1x1), &texture); - ok(hr == D3D_OK, "D3DXCreateTextureFromResource returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateTextureFromResource returned %#lx, expected %#lx\n", hr, D3D_OK); if (SUCCEEDED(hr)) IDirect3DTexture9_Release(texture);
hr = D3DXCreateTextureFromResourceA(device, NULL, MAKEINTRESOURCEA(IDD_BITMAPDATA_1x1), &texture); - ok(hr == D3D_OK, "D3DXCreateTextureFromResource returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateTextureFromResource returned %#lx, expected %#lx\n", hr, D3D_OK); if (SUCCEEDED(hr)) IDirect3DTexture9_Release(texture);
hr = D3DXCreateTextureFromResourceA(device, NULL, MAKEINTRESOURCEA(IDS_STRING), &texture); - ok(hr == D3DXERR_INVALIDDATA, "D3DXCreateTextureFromResource returned %#x, expected %#x\n", hr, D3DXERR_INVALIDDATA); + ok(hr == D3DXERR_INVALIDDATA, "D3DXCreateTextureFromResource returned %#lx, expected %#x\n", hr, D3DXERR_INVALIDDATA);
hr = D3DXCreateTextureFromResourceA(NULL, NULL, MAKEINTRESOURCEA(IDD_BITMAPDATA_1x1), &texture); - ok(hr == D3DERR_INVALIDCALL, "D3DXCreateTextureFromResource returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXCreateTextureFromResource returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateTextureFromResourceA(device, NULL, NULL, &texture); - ok(hr == D3DXERR_INVALIDDATA, "D3DXCreateTextureFromResource returned %#x, expected %#x\n", hr, D3DXERR_INVALIDDATA); + ok(hr == D3DXERR_INVALIDDATA, "D3DXCreateTextureFromResource returned %#lx, expected %#x\n", hr, D3DXERR_INVALIDDATA);
hr = D3DXCreateTextureFromResourceA(device, NULL, MAKEINTRESOURCEA(IDD_BITMAPDATA_1x1), NULL); - ok(hr == D3DERR_INVALIDCALL, "D3DXCreateTextureFromResource returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXCreateTextureFromResource returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
/* D3DXCreateTextureFromResourceEx */ hr = D3DXCreateTextureFromResourceExA(device, NULL, MAKEINTRESOURCEA(IDD_BITMAPDATA_1x1), D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_UNKNOWN, D3DPOOL_MANAGED, D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, &texture); - ok(hr == D3D_OK, "D3DXCreateTextureFromResourceEx returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateTextureFromResourceEx returned %#lx, expected %#lx\n", hr, D3D_OK); if (SUCCEEDED(hr)) IDirect3DTexture9_Release(texture);
hr = D3DXCreateTextureFromResourceExA(device, NULL, MAKEINTRESOURCEA(IDS_STRING), D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_UNKNOWN, D3DPOOL_MANAGED, D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, &texture); - ok(hr == D3DXERR_INVALIDDATA, "D3DXCreateTextureFromResourceEx returned %#x, expected %#x\n", hr, D3DXERR_INVALIDDATA); + ok(hr == D3DXERR_INVALIDDATA, "D3DXCreateTextureFromResourceEx returned %#lx, expected %#x\n", hr, D3DXERR_INVALIDDATA);
hr = D3DXCreateTextureFromResourceExA(NULL, NULL, MAKEINTRESOURCEA(IDD_BITMAPDATA_1x1), D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_UNKNOWN, D3DPOOL_MANAGED, D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, &texture); - ok(hr == D3DERR_INVALIDCALL, "D3DXCreateTextureFromResourceEx returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXCreateTextureFromResourceEx returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateTextureFromResourceExA(device, NULL, NULL, D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_UNKNOWN, D3DPOOL_MANAGED, D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, &texture); - ok(hr == D3DXERR_INVALIDDATA, "D3DXCreateTextureFromResourceEx returned %#x, expected %#x\n", hr, D3DXERR_INVALIDDATA); + ok(hr == D3DXERR_INVALIDDATA, "D3DXCreateTextureFromResourceEx returned %#lx, expected %#x\n", hr, D3DXERR_INVALIDDATA);
hr = D3DXCreateTextureFromResourceExA(device, NULL, MAKEINTRESOURCEA(IDD_BITMAPDATA_1x1), D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_UNKNOWN, D3DPOOL_MANAGED, D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "D3DXCreateTextureFromResourceEx returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXCreateTextureFromResourceEx returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL); }
static void test_D3DXFilterTexture(IDirect3DDevice9 *device) @@ -924,16 +924,16 @@ static void test_D3DXFilterTexture(IDirect3DDevice9 *device) if (SUCCEEDED(hr)) { hr = D3DXFilterTexture((IDirect3DBaseTexture9*) tex, NULL, D3DX_DEFAULT, D3DX_FILTER_NONE); - ok(hr == D3D_OK, "D3DXFilterTexture returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXFilterTexture returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = D3DXFilterTexture((IDirect3DBaseTexture9*) tex, NULL, 0, D3DX_FILTER_NONE); - ok(hr == D3D_OK, "D3DXFilterTexture returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXFilterTexture returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = D3DXFilterTexture((IDirect3DBaseTexture9*) tex, NULL, 0, D3DX_FILTER_BOX + 1); /* Invalid filter */ - ok(hr == D3DERR_INVALIDCALL, "D3DXFilterTexture returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXFilterTexture returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXFilterTexture((IDirect3DBaseTexture9*) tex, NULL, 5, D3DX_FILTER_NONE); /* Invalid miplevel */ - ok(hr == D3DERR_INVALIDCALL, "D3DXFilterTexture returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXFilterTexture returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
IDirect3DTexture9_Release(tex); } @@ -941,7 +941,7 @@ static void test_D3DXFilterTexture(IDirect3DDevice9 *device) skip("Failed to create texture\n");
hr = D3DXFilterTexture(NULL, NULL, 0, D3DX_FILTER_NONE); - ok(hr == D3DERR_INVALIDCALL, "D3DXFilterTexture returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXFilterTexture returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
/* Test different pools */ hr = IDirect3DDevice9_CreateTexture(device, 256, 256, 0, 0, D3DFMT_A8R8G8B8, D3DPOOL_SYSTEMMEM, &tex, NULL); @@ -949,7 +949,7 @@ static void test_D3DXFilterTexture(IDirect3DDevice9 *device) if (SUCCEEDED(hr)) { hr = D3DXFilterTexture((IDirect3DBaseTexture9*) tex, NULL, 0, D3DX_FILTER_NONE); - ok(hr == D3D_OK, "D3DXFilterTexture returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXFilterTexture returned %#lx, expected %#lx\n", hr, D3D_OK); IDirect3DTexture9_Release(tex); } else @@ -960,7 +960,7 @@ static void test_D3DXFilterTexture(IDirect3DDevice9 *device) if (SUCCEEDED(hr)) { hr = D3DXFilterTexture((IDirect3DBaseTexture9*) tex, NULL, 0, D3DX_FILTER_NONE); - ok(hr == D3D_OK, "D3DXFilterTexture returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXFilterTexture returned %#lx, expected %#lx\n", hr, D3D_OK); IDirect3DTexture9_Release(tex); } else @@ -970,7 +970,7 @@ static void test_D3DXFilterTexture(IDirect3DDevice9 *device) if (SUCCEEDED(hr)) { hr = D3DXFilterTexture((IDirect3DBaseTexture9*) tex, NULL, 0, D3DX_FILTER_POINT); - ok(hr == D3D_OK, "D3DXFilterTexture returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXFilterTexture returned %#lx, expected %#lx\n", hr, D3D_OK); IDirect3DTexture9_Release(tex); } else @@ -980,7 +980,7 @@ static void test_D3DXFilterTexture(IDirect3DDevice9 *device) if (SUCCEEDED(hr)) { hr = D3DXFilterTexture((IDirect3DBaseTexture9*) tex, NULL, 0, D3DX_FILTER_POINT); - ok(hr == D3D_OK, "D3DXFilterTexture returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXFilterTexture returned %#lx, expected %#lx\n", hr, D3D_OK); IDirect3DTexture9_Release(tex); } else @@ -992,13 +992,13 @@ static void test_D3DXFilterTexture(IDirect3DDevice9 *device) if (SUCCEEDED(hr)) { hr = D3DXFilterTexture((IDirect3DBaseTexture9*) cubetex, NULL, 0, D3DX_FILTER_NONE); - ok(hr == D3D_OK, "D3DXFilterTexture returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXFilterTexture returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = D3DXFilterTexture((IDirect3DBaseTexture9*) cubetex, NULL, 0, D3DX_FILTER_BOX + 1); /* Invalid filter */ - ok(hr == D3DERR_INVALIDCALL, "D3DXFilterTexture returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXFilterTexture returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXFilterTexture((IDirect3DBaseTexture9*) cubetex, NULL, 5, D3DX_FILTER_NONE); /* Invalid miplevel */ - ok(hr == D3DERR_INVALIDCALL, "D3DXFilterTexture returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXFilterTexture returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL); IDirect3DCubeTexture9_Release(cubetex); } else @@ -1011,19 +1011,19 @@ static void test_D3DXFilterTexture(IDirect3DDevice9 *device) DWORD level_count = IDirect3DVolumeTexture9_GetLevelCount(voltex);
hr = D3DXFilterTexture((IDirect3DBaseTexture9*) voltex, NULL, 0, D3DX_FILTER_NONE); - ok(hr == D3D_OK, "D3DXFilterTexture returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXFilterTexture returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = D3DXFilterTexture((IDirect3DBaseTexture9*) voltex, NULL, 0, D3DX_DEFAULT); - ok(hr == D3D_OK, "D3DXFilterTexture returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXFilterTexture returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = D3DXFilterTexture((IDirect3DBaseTexture9*) voltex, NULL, 0, D3DX_FILTER_BOX); - ok(hr == D3D_OK, "D3DXFilterTexture returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXFilterTexture returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = D3DXFilterTexture((IDirect3DBaseTexture9*) voltex, NULL, level_count - 1, D3DX_DEFAULT); - ok(hr == D3D_OK, "D3DXFilterTexture returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXFilterTexture returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = D3DXFilterTexture((IDirect3DBaseTexture9*) voltex, NULL, level_count, D3DX_DEFAULT); - ok(hr == D3DERR_INVALIDCALL, "D3DXFilterTexture returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXFilterTexture returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
IDirect3DVolumeTexture9_Release(voltex); } @@ -1041,7 +1041,7 @@ static void test_D3DXFilterTexture(IDirect3DDevice9 *device) if (SUCCEEDED(hr)) { hr = D3DXFilterTexture((IDirect3DBaseTexture9*) tex, NULL, 0, D3DX_FILTER_NONE); - ok(hr == D3D_OK, "D3dXFilteTexture returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3dXFilteTexture returned %#lx, expected %#lx\n", hr, D3D_OK); IDirect3DTexture9_Release(tex); } else @@ -1051,7 +1051,7 @@ static void test_D3DXFilterTexture(IDirect3DDevice9 *device) if (SUCCEEDED(hr)) { hr = D3DXFilterTexture((IDirect3DBaseTexture9*) tex, NULL, 0, D3DX_FILTER_NONE); - ok(hr == D3D_OK, "D3dXFilteTexture returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3dXFilteTexture returned %#lx, expected %#lx\n", hr, D3D_OK); IDirect3DTexture9_Release(tex); } else @@ -1106,28 +1106,28 @@ static void test_D3DXFillTexture(IDirect3DDevice9 *device) size = 4; hr = IDirect3DDevice9_CreateTexture(device, size, size, 0, test_access_types[i].usage, D3DFMT_A8R8G8B8, test_access_types[i].pool, &tex, NULL); - ok(hr == D3D_OK, "Unexpected hr %#x, i %u.\n", hr, i); + ok(hr == D3D_OK, "Unexpected hr %#lx, i %u.\n", hr, i);
hr = D3DXFillTexture(tex, fillfunc, NULL); - ok(hr == D3D_OK, "Unexpected hr %#x, i %u.\n", hr, i); + ok(hr == D3D_OK, "Unexpected hr %#lx, i %u.\n", hr, i);
for (m = 0; m < 3; m++) { IDirect3DSurface9 *src_surface, *temp_surface;
hr = IDirect3DTexture9_GetSurfaceLevel(tex, m, &src_surface); - ok(hr == D3D_OK, "Unexpected hr %#x, i %u, m %u.\n", hr, i, m); + ok(hr == D3D_OK, "Unexpected hr %#lx, i %u, m %lu.\n", hr, i, m); temp_surface = src_surface;
if (FAILED(hr = IDirect3DSurface9_LockRect(src_surface, &lock_rect, NULL, D3DLOCK_READONLY))) { hr = IDirect3DDevice9_CreateRenderTarget(device, size, size, D3DFMT_A8R8G8B8, D3DMULTISAMPLE_NONE, 0, TRUE, &temp_surface, NULL); - ok(hr == D3D_OK, "Unexpected hr %#x, i %u, m %u.\n", hr, i, m); + ok(hr == D3D_OK, "Unexpected hr %#lx, i %u, m %lu.\n", hr, i, m); hr = IDirect3DDevice9_StretchRect(device, src_surface, NULL, temp_surface, NULL, D3DTEXF_NONE); - ok(hr == D3D_OK, "Unexpected hr %#x, i %u, m %u.\n", hr, i, m); + ok(hr == D3D_OK, "Unexpected hr %#lx, i %u, m %lu.\n", hr, i, m); hr = IDirect3DSurface9_LockRect(temp_surface, &lock_rect, NULL, D3DLOCK_READONLY); - ok(hr == D3D_OK, "Unexpected hr %#x, i %u, m %u.\n", hr, i, m); + ok(hr == D3D_OK, "Unexpected hr %#lx, i %u, m %lu.\n", hr, i, m); }
pitch = lock_rect.Pitch / sizeof(DWORD); @@ -1148,7 +1148,7 @@ static void test_D3DXFillTexture(IDirect3DDevice9 *device) expected = e[0] << 24 | e[1] << 16 | e[2] << 8 | e[3];
ok(color_match(v, e), - "Texel at (%u, %u) doesn't match: %#x, expected %#x, i %u, m %u.\n", + "Texel at (%lu, %lu) doesn't match: %#lx, expected %#lx, i %u, m %lu.\n", x, y, value, expected, i, m); } } @@ -1166,7 +1166,7 @@ static void test_D3DXFillTexture(IDirect3DDevice9 *device) if (hr == D3D_OK) { hr = D3DXFillTexture(tex, fillfunc, NULL); - todo_wine ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr); + todo_wine ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr); IDirect3DTexture9_Release(tex); }
@@ -1175,7 +1175,7 @@ static void test_D3DXFillTexture(IDirect3DDevice9 *device) if (hr == D3D_OK) { hr = D3DXFillTexture(tex, fillfunc, NULL); - ok(hr == D3DERR_INVALIDCALL, "Unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Unexpected hr %#lx.\n", hr); IDirect3DTexture9_Release(tex); }
@@ -1185,10 +1185,10 @@ static void test_D3DXFillTexture(IDirect3DDevice9 *device) if (SUCCEEDED(hr)) { hr = D3DXFillTexture(tex, fillfunc, NULL); - ok(hr == D3D_OK, "D3DXFillTexture returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXFillTexture returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = IDirect3DTexture9_LockRect(tex, 0, &lock_rect, NULL, D3DLOCK_READONLY); - ok(hr == D3D_OK, "Couldn't lock the texture, error %#x\n", hr); + ok(hr == D3D_OK, "Couldn't lock the texture, error %#lx\n", hr); if (SUCCEEDED(hr)) { pitch = lock_rect.Pitch / sizeof(WORD); @@ -1209,7 +1209,7 @@ static void test_D3DXFillTexture(IDirect3DDevice9 *device) expected = e[0] << 15 | e[1] << 10 | e[2] << 5 | e[3];
ok(color_match(v, e), - "Texel at (%u, %u) doesn't match: %#x, expected %#x\n", + "Texel at (%lu, %lu) doesn't match: %#lx, expected %#lx\n", x, y, value, expected); } } @@ -1228,7 +1228,7 @@ static void test_D3DXFillTexture(IDirect3DDevice9 *device) if (SUCCEEDED(hr)) { hr = D3DXFillTexture(tex, fillfunc, NULL); - ok(hr == D3D_OK, "D3DXFillTexture returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXFillTexture returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = IDirect3DTexture9_LockRect(tex, 0, &lock_rect, NULL, D3DLOCK_READONLY); if (SUCCEEDED(hr)) @@ -1269,7 +1269,7 @@ static void test_D3DXFillTexture(IDirect3DDevice9 *device) if (SUCCEEDED(hr)) { hr = D3DXFillTexture(tex, fillfunc, NULL); - ok(hr == D3D_OK, "D3DXFillTexture returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXFillTexture returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = IDirect3DTexture9_LockRect(tex, 0, &lock_rect, NULL, D3DLOCK_READONLY); if (SUCCEEDED(hr)) @@ -1313,7 +1313,7 @@ static void test_D3DXFillTexture(IDirect3DDevice9 *device) if (SUCCEEDED(hr)) { hr = D3DXFillTexture(tex, fillfunc, NULL); - todo_wine ok(hr == D3D_OK, "D3DXFillTexture returned %#x, expected %#x\n", hr, D3D_OK); + todo_wine ok(hr == D3D_OK, "D3DXFillTexture returned %#lx, expected %#lx\n", hr, D3D_OK);
IDirect3DTexture9_Release(tex); } @@ -1387,14 +1387,14 @@ static void test_D3DXFillCubeTexture(IDirect3DDevice9 *device) if (SUCCEEDED(hr)) { hr = D3DXFillCubeTexture(tex, fillfunc_cube, NULL); - ok(hr == D3D_OK, "D3DXFillCubeTexture returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXFillCubeTexture returned %#lx, expected %#lx\n", hr, D3D_OK);
for (m = 0; m < 3; m++) { for (f = 0; f < 6; f++) { hr = IDirect3DCubeTexture9_LockRect(tex, f, m, &lock_rect, NULL, D3DLOCK_READONLY); - ok(hr == D3D_OK, "Couldn't lock the texture, error %#x\n", hr); + ok(hr == D3D_OK, "Couldn't lock the texture, error %#lx\n", hr); if (SUCCEEDED(hr)) { pitch = lock_rect.Pitch / sizeof(DWORD); @@ -1416,7 +1416,7 @@ static void test_D3DXFillCubeTexture(IDirect3DDevice9 *device) expected = e[0] << 24 | e[1] << 16 | e[2] << 8 | e[3];
ok(color_match(v, e), - "Texel at face %u (%u, %u) doesn't match: %#x, expected %#x\n", + "Texel at face %lu (%lu, %lu) doesn't match: %#lx, expected %#lx\n", f, x, y, value, expected); } } @@ -1437,11 +1437,11 @@ static void test_D3DXFillCubeTexture(IDirect3DDevice9 *device) if (SUCCEEDED(hr)) { hr = D3DXFillCubeTexture(tex, fillfunc_cube, NULL); - ok(hr == D3D_OK, "D3DXFillTexture returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXFillTexture returned %#lx, expected %#lx\n", hr, D3D_OK); for (f = 0; f < 6; f++) { hr = IDirect3DCubeTexture9_LockRect(tex, f, 0, &lock_rect, NULL, D3DLOCK_READONLY); - ok(hr == D3D_OK, "Couldn't lock the texture, error %#x\n", hr); + ok(hr == D3D_OK, "Couldn't lock the texture, error %#lx\n", hr); if (SUCCEEDED(hr)) { pitch = lock_rect.Pitch / sizeof(WORD); @@ -1463,7 +1463,7 @@ static void test_D3DXFillCubeTexture(IDirect3DDevice9 *device) expected = e[0] << 15 | e[1] << 10 | e[2] << 5 | e[3];
ok(color_match(v, e), - "Texel at face %u (%u, %u) doesn't match: %#x, expected %#x\n", + "Texel at face %lu (%lu, %lu) doesn't match: %#lx, expected %#lx\n", f, x, y, value, expected); } } @@ -1498,9 +1498,9 @@ static void test_D3DXFillVolumeTexture(IDirect3DDevice9 *device) size = 4; hr = IDirect3DDevice9_CreateVolumeTexture(device, size, size, size, 0, 0, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &tex, NULL); - ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr); hr = D3DXFillVolumeTexture(tex, fillfunc_volume, NULL); - ok(hr == D3DERR_INVALIDCALL, "Unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Unexpected hr %#lx.\n", hr); IDirect3DVolumeTexture9_Release(tex);
hr = IDirect3DDevice9_CreateVolumeTexture(device, size, size, size, 0, 0, D3DFMT_A8R8G8B8, @@ -1508,12 +1508,12 @@ static void test_D3DXFillVolumeTexture(IDirect3DDevice9 *device) if (SUCCEEDED(hr)) { hr = D3DXFillVolumeTexture(tex, fillfunc_volume, NULL); - ok(hr == D3D_OK, "D3DXFillVolumeTexture returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXFillVolumeTexture returned %#lx, expected %#lx\n", hr, D3D_OK);
for (m = 0; m < 3; m++) { hr = IDirect3DVolumeTexture9_LockBox(tex, m, &lock_box, NULL, D3DLOCK_READONLY); - ok(hr == D3D_OK, "Couldn't lock the texture, error %#x\n", hr); + ok(hr == D3D_OK, "Couldn't lock the texture, error %#lx\n", hr); if (SUCCEEDED(hr)) { row_pitch = lock_box.RowPitch / sizeof(DWORD); @@ -1537,7 +1537,7 @@ static void test_D3DXFillVolumeTexture(IDirect3DDevice9 *device) expected = e[0] << 24 | e[1] << 16 | e[2] << 8 | e[3];
ok(color_match(v, e), - "Texel at (%u, %u, %u) doesn't match: %#x, expected %#x\n", + "Texel at (%lu, %lu, %lu) doesn't match: %#lx, expected %#lx\n", x, y, z, value, expected); } } @@ -1558,9 +1558,9 @@ static void test_D3DXFillVolumeTexture(IDirect3DDevice9 *device) if (SUCCEEDED(hr)) { hr = D3DXFillVolumeTexture(tex, fillfunc_volume, NULL); - ok(hr == D3D_OK, "D3DXFillTexture returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXFillTexture returned %#lx, expected %#lx\n", hr, D3D_OK); hr = IDirect3DVolumeTexture9_LockBox(tex, 0, &lock_box, NULL, D3DLOCK_READONLY); - ok(hr == D3D_OK, "Couldn't lock the texture, error %#x\n", hr); + ok(hr == D3D_OK, "Couldn't lock the texture, error %#lx\n", hr); if (SUCCEEDED(hr)) { row_pitch = lock_box.RowPitch / sizeof(WORD); @@ -1584,7 +1584,7 @@ static void test_D3DXFillVolumeTexture(IDirect3DDevice9 *device) expected = e[0] << 15 | e[1] << 10 | e[2] << 5 | e[3];
ok(color_match(v, e), - "Texel at (%u, %u, %u) doesn't match: %#x, expected %#x\n", + "Texel at (%lu, %lu, %lu) doesn't match: %#lx, expected %#lx\n", x, y, z, value, expected); } } @@ -1651,30 +1651,30 @@ static void test_D3DXCreateTextureFromFileInMemory(IDirect3DDevice9 *device) RECT rect;
hr = D3DXCreateTextureFromFileInMemory(device, dds_16bit, sizeof(dds_16bit), &texture); - ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemory returned %#lx, expected %#lx\n", hr, D3D_OK); if (SUCCEEDED(hr)) IDirect3DTexture9_Release(texture);
hr = D3DXCreateTextureFromFileInMemory(device, dds_24bit, sizeof(dds_24bit), &texture); - ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemory returned %#lx, expected %#lx\n", hr, D3D_OK); if (SUCCEEDED(hr)) IDirect3DTexture9_Release(texture);
hr = D3DXCreateTextureFromFileInMemory(device, dds_24bit, sizeof(dds_24bit) - 1, &texture); - ok(hr == D3DXERR_INVALIDDATA, "D3DXCreateTextureFromFileInMemory returned %#x, expected %#x\n", hr, D3DXERR_INVALIDDATA); + ok(hr == D3DXERR_INVALIDDATA, "D3DXCreateTextureFromFileInMemory returned %#lx, expected %#x\n", hr, D3DXERR_INVALIDDATA);
/* Check that D3DXCreateTextureFromFileInMemory accepts cube texture dds file (only first face texture is loaded) */ hr = D3DXCreateTextureFromFileInMemory(device, dds_cube_map, sizeof(dds_cube_map), &texture); - ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemory returned %#x, expected %#x.\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemory returned %#lx, expected %#lx.\n", hr, D3D_OK); type = IDirect3DTexture9_GetType(texture); ok(type == D3DRTYPE_TEXTURE, "IDirect3DTexture9_GetType returned %u, expected %u.\n", type, D3DRTYPE_TEXTURE); hr = IDirect3DTexture9_GetLevelDesc(texture, 0, &desc); - ok(hr == D3D_OK, "IDirect3DTexture9_GetLevelDesc returned %#x, expected %#x.\n", hr, D3D_OK); + ok(hr == D3D_OK, "IDirect3DTexture9_GetLevelDesc returned %#lx, expected %#lx.\n", hr, D3D_OK); ok(desc.Width == 4, "Width is %u, expected 4.\n", desc.Width); ok(desc.Height == 4, "Height is %u, expected 4.\n", desc.Height); if (has_cube_dxt5) { ok(desc.Format == D3DFMT_DXT5, "Unexpected texture format %#x.\n", desc.Format); hr = IDirect3DTexture9_LockRect(texture, 0, &lock_rect, NULL, D3DLOCK_READONLY); - ok(hr == D3D_OK, "IDirect3DTexture9_LockRect returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "IDirect3DTexture9_LockRect returned %#lx, expected %#lx\n", hr, D3D_OK); if (SUCCEEDED(hr)) { for (i = 0; i < 16; i++) @@ -1693,24 +1693,24 @@ static void test_D3DXCreateTextureFromFileInMemory(IDirect3DDevice9 *device)
/* Test with a DXT5 texture smaller than the block size. */ hr = D3DXCreateTextureFromFileInMemory(device, dds_dxt5, sizeof(dds_dxt5), &texture); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); if (SUCCEEDED(hr) && has_2d_dxt5) { type = IDirect3DTexture9_GetType(texture); ok(type == D3DRTYPE_TEXTURE, "Got unexpected type %u.\n", type); hr = IDirect3DTexture9_GetLevelDesc(texture, 0, &desc); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); ok(desc.Width == 4, "Got unexpected width %u.\n", desc.Width); ok(desc.Height == 4, "Got unexpected height %u.\n", desc.Height);
IDirect3DTexture9_GetSurfaceLevel(texture, 0, &surface); hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 4, 4, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &uncompressed_surface, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = D3DXLoadSurfaceFromSurface(uncompressed_surface, NULL, NULL, surface, NULL, NULL, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DSurface9_LockRect(uncompressed_surface, &lock_rect, NULL, D3DLOCK_READONLY); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); for (y = 0; y < 4; ++y) { for (x = 0; x < 4; ++x) @@ -1720,13 +1720,13 @@ static void test_D3DXCreateTextureFromFileInMemory(IDirect3DDevice9 *device) * precision loss. */ ok(compare_color(((DWORD *)lock_rect.pBits)[lock_rect.Pitch / 4 * y + x], dds_dxt5_expected[y * 4 + x], 32), - "Color at position %u, %u is 0x%08x, expected 0x%08x.\n", + "Color at position %u, %u is 0x%08lx, expected 0x%08lx.\n", x, y, ((DWORD *)lock_rect.pBits)[lock_rect.Pitch / 4 * y + x], dds_dxt5_expected[y * 4 + x]); } } hr = IDirect3DSurface9_UnlockRect(uncompressed_surface); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
IDirect3DSurface9_Release(uncompressed_surface); IDirect3DSurface9_Release(surface); @@ -1736,123 +1736,123 @@ static void test_D3DXCreateTextureFromFileInMemory(IDirect3DDevice9 *device)
/* Test with a larger DXT5 texture. */ hr = D3DXCreateTextureFromFileInMemory(device, dds_dxt5_8_8, sizeof(dds_dxt5_8_8), &texture); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); type = IDirect3DTexture9_GetType(texture); ok(type == D3DRTYPE_TEXTURE, "Got unexpected type %u.\n", type); hr = IDirect3DTexture9_GetLevelDesc(texture, 0, &desc); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); ok(desc.Width == 8, "Got unexpected width %u.\n", desc.Width); ok(desc.Height == 8, "Got unexpected height %u.\n", desc.Height); IDirect3DTexture9_GetSurfaceLevel(texture, 0, &surface);
hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 8, 8, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &uncompressed_surface, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = D3DXLoadSurfaceFromSurface(uncompressed_surface, NULL, NULL, surface, NULL, NULL, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); if (SUCCEEDED(hr)) { hr = IDirect3DSurface9_LockRect(uncompressed_surface, &lock_rect, NULL, D3DLOCK_READONLY); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); for (y = 0; y < 8; ++y) { for (x = 0; x < 8; ++x) { ok(compare_color(((DWORD *)lock_rect.pBits)[lock_rect.Pitch / 4 * y + x], dds_dxt5_8_8_expected[y * 8 + x], 0), - "Color at position %u, %u is 0x%08x, expected 0x%08x.\n", + "Color at position %u, %u is 0x%08lx, expected 0x%08lx.\n", x, y, ((DWORD *)lock_rect.pBits)[lock_rect.Pitch / 4 * y + x], dds_dxt5_8_8_expected[y * 8 + x]); } } hr = IDirect3DSurface9_UnlockRect(uncompressed_surface); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); }
hr = IDirect3DSurface9_LockRect(surface, &lock_rect, NULL, D3DLOCK_READONLY); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); for (y = 0; y < 2; ++y) memset(&((BYTE *)lock_rect.pBits)[y * lock_rect.Pitch], 0, 16 * 2); hr = IDirect3DSurface9_UnlockRect(surface); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
SetRect(&rect, 2, 2, 6, 6); hr = D3DXLoadSurfaceFromMemory(surface, NULL, NULL, &dds_dxt5_8_8[128], D3DFMT_DXT5, 16 * 2, NULL, &rect, D3DX_FILTER_POINT, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = D3DXLoadSurfaceFromSurface(uncompressed_surface, NULL, NULL, surface, NULL, NULL, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DSurface9_LockRect(uncompressed_surface, &lock_rect, NULL, D3DLOCK_READONLY); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); for (y = 0; y < 8; ++y) { for (x = 0; x < 8; ++x) { ok(compare_color(((DWORD *)lock_rect.pBits)[lock_rect.Pitch / 4 * y + x], dds_dxt5_8_8_expected_misaligned_1[y * 8 + x], 0), - "Color at position %u, %u is 0x%08x, expected 0x%08x.\n", + "Color at position %u, %u is 0x%08lx, expected 0x%08lx.\n", x, y, ((DWORD *)lock_rect.pBits)[lock_rect.Pitch / 4 * y + x], dds_dxt5_8_8_expected_misaligned_1[y * 8 + x]); } } hr = IDirect3DSurface9_UnlockRect(uncompressed_surface); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DSurface9_LockRect(surface, &lock_rect, NULL, D3DLOCK_READONLY); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); for (y = 0; y < 2; ++y) memset(&((BYTE *)lock_rect.pBits)[y * lock_rect.Pitch], 0, 16 * 2); hr = IDirect3DSurface9_UnlockRect(surface); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = D3DXLoadSurfaceFromMemory(surface, NULL, &rect, &dds_dxt5_8_8[128], D3DFMT_DXT5, 16 * 2, NULL, NULL, D3DX_FILTER_POINT, 0); - ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr);
hr = D3DXLoadSurfaceFromMemory(surface, NULL, &rect, &dds_dxt5_8_8[128], D3DFMT_DXT5, 16 * 2, NULL, &rect, D3DX_FILTER_POINT, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = D3DXLoadSurfaceFromSurface(uncompressed_surface, NULL, NULL, surface, NULL, NULL, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DSurface9_LockRect(uncompressed_surface, &lock_rect, NULL, D3DLOCK_READONLY); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); for (y = 0; y < 8; ++y) { for (x = 0; x < 8; ++x) { ok(compare_color(((DWORD *)lock_rect.pBits)[lock_rect.Pitch / 4 * y + x], dds_dxt5_8_8_expected_misaligned_3[y * 8 + x], 0), - "Color at position %u, %u is 0x%08x, expected 0x%08x.\n", + "Color at position %u, %u is 0x%08lx, expected 0x%08lx.\n", x, y, ((DWORD *)lock_rect.pBits)[lock_rect.Pitch / 4 * y + x], dds_dxt5_8_8_expected_misaligned_3[y * 8 + x]); } } hr = IDirect3DSurface9_UnlockRect(uncompressed_surface); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = D3DXLoadSurfaceFromFileInMemory(surface, NULL, &rect, dds_dxt5_8_8, sizeof(dds_dxt5_8_8), &rect, D3DX_FILTER_POINT, 0, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = D3DXLoadSurfaceFromSurface(uncompressed_surface, NULL, NULL, surface, NULL, NULL, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DSurface9_LockRect(uncompressed_surface, &lock_rect, NULL, D3DLOCK_READONLY); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); for (y = 0; y < 8; ++y) { for (x = 0; x < 8; ++x) { ok(compare_color(((DWORD *)lock_rect.pBits)[lock_rect.Pitch / 4 * y + x], dds_dxt5_8_8_expected_misaligned_3[y * 8 + x], 0), - "Color at position %u, %u is 0x%08x, expected 0x%08x.\n", + "Color at position %u, %u is 0x%08lx, expected 0x%08lx.\n", x, y, ((DWORD *)lock_rect.pBits)[lock_rect.Pitch / 4 * y + x], dds_dxt5_8_8_expected_misaligned_3[y * 8 + x]); } } hr = IDirect3DSurface9_UnlockRect(uncompressed_surface); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
IDirect3DSurface9_Release(uncompressed_surface); IDirect3DSurface9_Release(surface); @@ -1860,13 +1860,13 @@ static void test_D3DXCreateTextureFromFileInMemory(IDirect3DDevice9 *device)
/* Volume textures work too. */ hr = D3DXCreateTextureFromFileInMemory(device, dds_volume_map, sizeof(dds_volume_map), &texture); - ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemory returned %#x, expected %#x.\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemory returned %#lx, expected %#lx.\n", hr, D3D_OK); type = IDirect3DTexture9_GetType(texture); ok(type == D3DRTYPE_TEXTURE, "IDirect3DTexture9_GetType returned %u, expected %u.\n", type, D3DRTYPE_TEXTURE); level_count = IDirect3DBaseTexture9_GetLevelCount((IDirect3DBaseTexture9 *)texture); - todo_wine ok(level_count == 3, "Texture has %u mip levels, 3 expected.\n", level_count); + todo_wine ok(level_count == 3, "Texture has %lu mip levels, 3 expected.\n", level_count); hr = IDirect3DTexture9_GetLevelDesc(texture, 0, &desc); - ok(hr == D3D_OK, "IDirect3DTexture9_GetLevelDesc returned %#x, expected %#x.\n", hr, D3D_OK); + ok(hr == D3D_OK, "IDirect3DTexture9_GetLevelDesc returned %#lx, expected %#lx.\n", hr, D3D_OK); ok(desc.Width == 4, "Width is %u, expected 4.\n", desc.Width); ok(desc.Height == 4, "Height is %u, expected 4.\n", desc.Height);
@@ -1874,7 +1874,7 @@ static void test_D3DXCreateTextureFromFileInMemory(IDirect3DDevice9 *device) { ok(desc.Format == D3DFMT_DXT3, "Unexpected texture format %#x.\n", desc.Format); hr = IDirect3DTexture9_LockRect(texture, 0, &lock_rect, NULL, D3DLOCK_READONLY); - ok(hr == D3D_OK, "IDirect3DTexture9_LockRect returned %#x, expected %#x.\n", hr, D3D_OK); + ok(hr == D3D_OK, "IDirect3DTexture9_LockRect returned %#lx, expected %#lx.\n", hr, D3D_OK); if (SUCCEEDED(hr)) { for (i = 0; i < 16; ++i) @@ -1904,18 +1904,18 @@ static void test_D3DXCreateTextureFromFileInMemoryEx(IDirect3DDevice9 *device)
hr = D3DXCreateTextureFromFileInMemoryEx(device, dds_16bit, sizeof(dds_16bit), D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_UNKNOWN, D3DPOOL_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, &texture); - ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemoryEx returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemoryEx returned %#lx, expected %#lx\n", hr, D3D_OK); IDirect3DTexture9_Release(texture);
hr = D3DXCreateTextureFromFileInMemoryEx(device, dds_16bit, sizeof(dds_16bit), D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, D3DUSAGE_DYNAMIC, D3DFMT_UNKNOWN, D3DPOOL_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, &texture); - ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemoryEx returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemoryEx returned %#lx, expected %#lx\n", hr, D3D_OK); IDirect3DTexture9_Release(texture);
hr = D3DXCreateTextureFromFileInMemoryEx(device, dds_24bit, sizeof(dds_24bit), D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, D3DUSAGE_DYNAMIC, D3DFMT_UNKNOWN, D3DPOOL_DEFAULT, D3DX_DEFAULT, D3DX_SKIP_DDS_MIP_LEVELS(1, D3DX_FILTER_POINT), 0, NULL, NULL, &texture); - ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemoryEx returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemoryEx returned %#lx, expected %#lx\n", hr, D3D_OK); miplevels = IDirect3DTexture9_GetLevelCount(texture); ok(miplevels == 1, "Got miplevels %u, expected %u.\n", miplevels, 1); IDirect3DTexture9_GetSurfaceLevel(texture, 0, &surface); @@ -1933,14 +1933,14 @@ static void test_D3DXCreateTextureFromFileInMemoryEx(IDirect3DDevice9 *device)
hr = D3DXCreateTextureFromFileInMemoryEx(device, dds_16bit, sizeof(dds_16bit), D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, D3DUSAGE_DYNAMIC | D3DUSAGE_AUTOGENMIPMAP, D3DFMT_UNKNOWN, D3DPOOL_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, &texture); - ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemoryEx returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemoryEx returned %#lx, expected %#lx\n", hr, D3D_OK); IDirect3DTexture9_Release(texture);
/* Checking for color key format overrides. */ hr = D3DXCreateTextureFromFileInMemoryEx(device, dds_16bit, sizeof(dds_16bit), D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_UNKNOWN, D3DPOOL_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, &texture); - ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemoryEx returned %#x, expected %#x.\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemoryEx returned %#lx, expected %#lx.\n", hr, D3D_OK); IDirect3DTexture9_GetSurfaceLevel(texture, 0, &surface); IDirect3DSurface9_GetDesc(surface, &desc); ok(desc.Format == D3DFMT_X1R5G5B5, "Returned format %u, expected %u.\n", desc.Format, D3DFMT_X1R5G5B5); @@ -1949,7 +1949,7 @@ static void test_D3DXCreateTextureFromFileInMemoryEx(IDirect3DDevice9 *device) hr = D3DXCreateTextureFromFileInMemoryEx(device, dds_16bit, sizeof(dds_16bit), D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_UNKNOWN, D3DPOOL_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0xff000000, NULL, NULL, &texture); - ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemoryEx returned %#x, expected %#x.\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemoryEx returned %#lx, expected %#lx.\n", hr, D3D_OK); IDirect3DTexture9_GetSurfaceLevel(texture, 0, &surface); IDirect3DSurface9_GetDesc(surface, &desc); ok(desc.Format == D3DFMT_A1R5G5B5, "Returned format %u, expected %u.\n", desc.Format, D3DFMT_A1R5G5B5); @@ -1958,7 +1958,7 @@ static void test_D3DXCreateTextureFromFileInMemoryEx(IDirect3DDevice9 *device) hr = D3DXCreateTextureFromFileInMemoryEx(device, dds_16bit, sizeof(dds_16bit), D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_X1R5G5B5, D3DPOOL_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0xff000000, NULL, NULL, &texture); - ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemoryEx returned %#x, expected %#x.\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemoryEx returned %#lx, expected %#lx.\n", hr, D3D_OK); IDirect3DTexture9_GetSurfaceLevel(texture, 0, &surface); IDirect3DSurface9_GetDesc(surface, &desc); ok(desc.Format == D3DFMT_X1R5G5B5, "Returned format %u, expected %u.\n", desc.Format, D3DFMT_X1R5G5B5); @@ -1968,7 +1968,7 @@ static void test_D3DXCreateTextureFromFileInMemoryEx(IDirect3DDevice9 *device) hr = D3DXCreateTextureFromFileInMemoryEx(device, dds_24bit, sizeof(dds_24bit), D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_UNKNOWN, D3DPOOL_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, &texture); - ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemoryEx returned %#x, expected %#x.\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemoryEx returned %#lx, expected %#lx.\n", hr, D3D_OK); IDirect3DTexture9_GetSurfaceLevel(texture, 0, &surface); IDirect3DSurface9_GetDesc(surface, &desc); ok(desc.Format == D3DFMT_X8R8G8B8, "Returned format %u, expected %u.\n", desc.Format, D3DFMT_X8R8G8B8); @@ -1977,7 +1977,7 @@ static void test_D3DXCreateTextureFromFileInMemoryEx(IDirect3DDevice9 *device) hr = D3DXCreateTextureFromFileInMemoryEx(device, dds_24bit, sizeof(dds_24bit), D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_UNKNOWN, D3DPOOL_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0xff000000, NULL, NULL, &texture); - ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemoryEx returned %#x, expected %#x.\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemoryEx returned %#lx, expected %#lx.\n", hr, D3D_OK); IDirect3DTexture9_GetSurfaceLevel(texture, 0, &surface); IDirect3DSurface9_GetDesc(surface, &desc); ok(desc.Format == D3DFMT_A8R8G8B8, "Returned format %u, expected %u.\n", desc.Format, D3DFMT_A8R8G8B8); @@ -1986,7 +1986,7 @@ static void test_D3DXCreateTextureFromFileInMemoryEx(IDirect3DDevice9 *device) hr = D3DXCreateTextureFromFileInMemoryEx(device, dds_24bit, sizeof(dds_24bit), D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_X8R8G8B8, D3DPOOL_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0xff000000, NULL, NULL, &texture); - ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemoryEx returned %#x, expected %#x.\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemoryEx returned %#lx, expected %#lx.\n", hr, D3D_OK); IDirect3DTexture9_GetSurfaceLevel(texture, 0, &surface); IDirect3DSurface9_GetDesc(surface, &desc); ok(desc.Format == D3DFMT_X8R8G8B8, "Returned format %u, expected %u.\n", desc.Format, D3DFMT_X8R8G8B8); @@ -1996,7 +1996,7 @@ static void test_D3DXCreateTextureFromFileInMemoryEx(IDirect3DDevice9 *device) hr = D3DXCreateTextureFromFileInMemoryEx(device, png_grayscale, sizeof(png_grayscale), D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_UNKNOWN, D3DPOOL_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, &texture); - ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemoryEx returned %#x, expected %#x.\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemoryEx returned %#lx, expected %#lx.\n", hr, D3D_OK); IDirect3DTexture9_GetSurfaceLevel(texture, 0, &surface); IDirect3DSurface9_GetDesc(surface, &desc); ok(desc.Format == D3DFMT_L8, "Returned format %u, expected %u.\n", desc.Format, D3DFMT_L8); @@ -2005,7 +2005,7 @@ static void test_D3DXCreateTextureFromFileInMemoryEx(IDirect3DDevice9 *device) hr = D3DXCreateTextureFromFileInMemoryEx(device, png_grayscale, sizeof(png_grayscale), D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_UNKNOWN, D3DPOOL_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0xff000000, NULL, NULL, &texture); - ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemoryEx returned %#x, expected %#x.\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemoryEx returned %#lx, expected %#lx.\n", hr, D3D_OK); IDirect3DTexture9_GetSurfaceLevel(texture, 0, &surface); IDirect3DSurface9_GetDesc(surface, &desc); ok(desc.Format == D3DFMT_A8L8, "Returned format %u, expected %u.\n", desc.Format, D3DFMT_A8L8); @@ -2014,7 +2014,7 @@ static void test_D3DXCreateTextureFromFileInMemoryEx(IDirect3DDevice9 *device) hr = D3DXCreateTextureFromFileInMemoryEx(device, png_grayscale, sizeof(png_grayscale), D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_L8, D3DPOOL_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0xff000000, NULL, NULL, &texture); - ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemoryEx returned %#x, expected %#x.\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemoryEx returned %#lx, expected %#lx.\n", hr, D3D_OK); IDirect3DTexture9_GetSurfaceLevel(texture, 0, &surface); IDirect3DSurface9_GetDesc(surface, &desc); ok(desc.Format == D3DFMT_L8, "Returned format %u, expected %u.\n", desc.Format, D3DFMT_L8); @@ -2031,30 +2031,30 @@ static void test_D3DXCreateCubeTextureFromFileInMemory(IDirect3DDevice9 *device) D3DSURFACE_DESC surface_desc;
hr = D3DXCreateCubeTextureFromFileInMemory(NULL, dds_cube_map, sizeof(dds_cube_map), &cube_texture); - ok(hr == D3DERR_INVALIDCALL, "D3DXCreateCubeTextureFromFileInMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXCreateCubeTextureFromFileInMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateCubeTextureFromFileInMemory(device, NULL, sizeof(dds_cube_map), &cube_texture); - ok(hr == D3DERR_INVALIDCALL, "D3DXCreateCubeTextureFromFileInMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXCreateCubeTextureFromFileInMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateCubeTextureFromFileInMemory(device, dds_cube_map, 0, &cube_texture); - ok(hr == D3DERR_INVALIDCALL, "D3DXCreateCubeTextureFromFileInMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXCreateCubeTextureFromFileInMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateCubeTextureFromFileInMemory(device, dds_cube_map, sizeof(dds_cube_map), NULL); - ok(hr == D3DERR_INVALIDCALL, "D3DXCreateCubeTextureFromFileInMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXCreateCubeTextureFromFileInMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateCubeTextureFromFileInMemory(device, dds_cube_map, sizeof(dds_cube_map), &cube_texture); if (SUCCEEDED(hr)) { levelcount = IDirect3DCubeTexture9_GetLevelCount(cube_texture); - ok(levelcount == 3, "GetLevelCount returned %u, expected 3\n", levelcount); + ok(levelcount == 3, "GetLevelCount returned %lu, expected 3\n", levelcount);
hr = IDirect3DCubeTexture9_GetLevelDesc(cube_texture, 0, &surface_desc); - ok(hr == D3D_OK, "GetLevelDesc returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "GetLevelDesc returned %#lx, expected %#lx\n", hr, D3D_OK); ok(surface_desc.Width == 4, "Got width %u, expected 4\n", surface_desc.Width); ok(surface_desc.Height == 4, "Got height %u, expected 4\n", surface_desc.Height);
ref = IDirect3DCubeTexture9_Release(cube_texture); - ok(ref == 0, "Invalid reference count. Got %u, expected 0\n", ref); + ok(ref == 0, "Invalid reference count. Got %lu, expected 0\n", ref); } else skip("Couldn't create cube texture\n"); }
@@ -2066,7 +2066,7 @@ static void test_D3DXCreateCubeTextureFromFileInMemoryEx(IDirect3DDevice9 *devic hr = D3DXCreateCubeTextureFromFileInMemoryEx(device, dds_cube_map, sizeof(dds_cube_map), D3DX_DEFAULT, D3DX_DEFAULT, D3DUSAGE_RENDERTARGET, D3DFMT_UNKNOWN, D3DPOOL_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, &cube_texture); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); IDirect3DCubeTexture9_Release(cube_texture);
if (!is_autogenmipmap_supported(device, D3DRTYPE_CUBETEXTURE)) @@ -2078,7 +2078,7 @@ static void test_D3DXCreateCubeTextureFromFileInMemoryEx(IDirect3DDevice9 *devic hr = D3DXCreateCubeTextureFromFileInMemoryEx(device, dds_cube_map, sizeof(dds_cube_map), D3DX_DEFAULT, D3DX_DEFAULT, D3DUSAGE_DYNAMIC | D3DUSAGE_AUTOGENMIPMAP, D3DFMT_UNKNOWN, D3DPOOL_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, &cube_texture); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); IDirect3DCubeTexture9_Release(cube_texture); }
@@ -2091,37 +2091,37 @@ static void test_D3DXCreateVolumeTextureFromFileInMemory(IDirect3DDevice9 *devic D3DVOLUME_DESC volume_desc;
hr = D3DXCreateVolumeTextureFromFileInMemory(NULL, dds_volume_map, sizeof(dds_volume_map), &volume_texture); - ok(hr == D3DERR_INVALIDCALL, "D3DXCreateVolumeTextureFromFileInMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXCreateVolumeTextureFromFileInMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateVolumeTextureFromFileInMemory(device, NULL, sizeof(dds_volume_map), &volume_texture); - ok(hr == D3DERR_INVALIDCALL, "D3DXCreateVolumeTextureFromFileInMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXCreateVolumeTextureFromFileInMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateVolumeTextureFromFileInMemory(device, dds_volume_map, 0, &volume_texture); - ok(hr == D3DERR_INVALIDCALL, "D3DXCreateVolumeTextureFromFileInMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXCreateVolumeTextureFromFileInMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateVolumeTextureFromFileInMemory(device, dds_volume_map, sizeof(dds_volume_map), NULL); - ok(hr == D3DERR_INVALIDCALL, "D3DXCreateVolumeTextureFromFileInMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXCreateVolumeTextureFromFileInMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXCreateVolumeTextureFromFileInMemory(device, dds_volume_map, sizeof(dds_volume_map), &volume_texture); - ok(hr == D3D_OK, "D3DXCreateVolumeTextureFromFileInMemory returned %#x, expected %#x.\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXCreateVolumeTextureFromFileInMemory returned %#lx, expected %#lx.\n", hr, D3D_OK); levelcount = IDirect3DVolumeTexture9_GetLevelCount(volume_texture); - ok(levelcount == 3, "GetLevelCount returned %u, expected 3.\n", levelcount); + ok(levelcount == 3, "GetLevelCount returned %lu, expected 3.\n", levelcount);
hr = IDirect3DVolumeTexture9_GetLevelDesc(volume_texture, 0, &volume_desc); - ok(hr == D3D_OK, "GetLevelDesc returned %#x, expected %#x.\n", hr, D3D_OK); + ok(hr == D3D_OK, "GetLevelDesc returned %#lx, expected %#lx.\n", hr, D3D_OK); ok(volume_desc.Width == 4, "Got width %u, expected 4.\n", volume_desc.Width); ok(volume_desc.Height == 4, "Got height %u, expected 4.\n", volume_desc.Height); ok(volume_desc.Depth == 2, "Got depth %u, expected 2.\n", volume_desc.Depth); ok(volume_desc.Pool == D3DPOOL_MANAGED, "Got pool %u, expected D3DPOOL_MANAGED.\n", volume_desc.Pool);
hr = IDirect3DVolumeTexture9_GetLevelDesc(volume_texture, 1, &volume_desc); - ok(hr == D3D_OK, "GetLevelDesc returned %#x, expected %#x.\n", hr, D3D_OK); + ok(hr == D3D_OK, "GetLevelDesc returned %#lx, expected %#lx.\n", hr, D3D_OK); ok(volume_desc.Width == 2, "Got width %u, expected 2.\n", volume_desc.Width); ok(volume_desc.Height == 2, "Got height %u, expected 2.\n", volume_desc.Height); ok(volume_desc.Depth == 1, "Got depth %u, expected 1.\n", volume_desc.Depth);
ref = IDirect3DVolumeTexture9_Release(volume_texture); - ok(ref == 0, "Invalid reference count. Got %u, expected 0.\n", ref); + ok(ref == 0, "Invalid reference count. Got %lu, expected 0.\n", ref); }
static void test_D3DXCreateVolumeTextureFromFileInMemoryEx(IDirect3DDevice9 *device) @@ -2132,12 +2132,12 @@ static void test_D3DXCreateVolumeTextureFromFileInMemoryEx(IDirect3DDevice9 *dev hr = D3DXCreateVolumeTextureFromFileInMemoryEx(device, dds_volume_map, sizeof(dds_volume_map), D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 1, D3DUSAGE_RENDERTARGET, D3DFMT_UNKNOWN, D3DPOOL_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, &volume_texture); - ok(hr == D3DERR_NOTAVAILABLE, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_NOTAVAILABLE, "Got unexpected hr %#lx.\n", hr);
hr = D3DXCreateVolumeTextureFromFileInMemoryEx(device, dds_volume_map, sizeof(dds_volume_map), D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 1, D3DUSAGE_DEPTHSTENCIL, D3DFMT_UNKNOWN, D3DPOOL_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, &volume_texture); - ok(hr == D3DERR_NOTAVAILABLE, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_NOTAVAILABLE, "Got unexpected hr %#lx.\n", hr); }
/* fills positive x face with red color */ @@ -2171,13 +2171,13 @@ static void test_D3DXSaveTextureToFileInMemory(IDirect3DDevice9 *device) for (file_format = D3DXIFF_BMP; file_format <= D3DXIFF_JPG; file_format++) { hr = D3DXSaveTextureToFileInMemory(&buffer, file_format, (IDirect3DBaseTexture9 *)texture, NULL); - ok(hr == D3D_OK, "D3DXSaveTextureToFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXSaveTextureToFileInMemory returned %#lx, expected %#lx\n", hr, D3D_OK); if (SUCCEEDED(hr)) { buffer_pointer = ID3DXBuffer_GetBufferPointer(buffer); buffer_size = ID3DXBuffer_GetBufferSize(buffer); hr = D3DXGetImageInfoFromFileInMemory(buffer_pointer, buffer_size, &info); - ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#lx, expected %#lx\n", hr, D3D_OK);
ok(info.Width == 256, "Got width %u, expected %u\n", info.Width, 256); ok(info.Height == 256, "Got height %u, expected %u\n", info.Height, 256); @@ -2190,13 +2190,13 @@ static void test_D3DXSaveTextureToFileInMemory(IDirect3DDevice9 *device)
todo_wine { hr = D3DXSaveTextureToFileInMemory(&buffer, D3DXIFF_DDS, (IDirect3DBaseTexture9 *)texture, NULL); - ok(hr == D3D_OK, "D3DXSaveTextureToFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXSaveTextureToFileInMemory returned %#lx, expected %#lx\n", hr, D3D_OK); if (SUCCEEDED(hr)) { buffer_pointer = ID3DXBuffer_GetBufferPointer(buffer); buffer_size = ID3DXBuffer_GetBufferSize(buffer); hr = D3DXGetImageInfoFromFileInMemory(buffer_pointer, buffer_size, &info); - ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#lx, expected %#lx\n", hr, D3D_OK);
ok(info.Width == 256, "Got width %u, expected %u\n", info.Width, 256); ok(info.Height == 256, "Got height %u, expected %u\n", info.Height, 256); @@ -2218,10 +2218,10 @@ static void test_D3DXSaveTextureToFileInMemory(IDirect3DDevice9 *device) }
hr = D3DXFillCubeTexture(cube_texture, fill_cube_positive_x, NULL); - ok(hr == D3D_OK, "D3DXFillCubeTexture returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXFillCubeTexture returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = D3DXSaveTextureToFileInMemory(&buffer, D3DXIFF_BMP, (IDirect3DBaseTexture9 *)cube_texture, NULL); - ok(hr == D3D_OK, "D3DXSaveTextureToFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXSaveTextureToFileInMemory returned %#lx, expected %#lx\n", hr, D3D_OK); if (SUCCEEDED(hr)) { IDirect3DSurface9 *surface; @@ -2229,7 +2229,7 @@ static void test_D3DXSaveTextureToFileInMemory(IDirect3DDevice9 *device) buffer_pointer = ID3DXBuffer_GetBufferPointer(buffer); buffer_size = ID3DXBuffer_GetBufferSize(buffer); hr = D3DXGetImageInfoFromFileInMemory(buffer_pointer, buffer_size, &info); - ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#lx, expected %#lx\n", hr, D3D_OK);
ok(info.Width == 256, "Got width %u, expected %u\n", info.Width, 256); ok(info.Height == 256, "Got height %u, expected %u\n", info.Height, 256); @@ -2244,13 +2244,13 @@ static void test_D3DXSaveTextureToFileInMemory(IDirect3DDevice9 *device) D3DLOCKED_RECT locked_rect;
hr = D3DXLoadSurfaceFromFileInMemory(surface, NULL, NULL, buffer_pointer, buffer_size, NULL, D3DX_FILTER_NONE, 0, NULL); - ok(hr == D3D_OK, "D3DXLoadSurfaceFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromFileInMemory returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = IDirect3DSurface9_LockRect(surface, &locked_rect, NULL, D3DLOCK_READONLY); if (SUCCEEDED(hr)) { DWORD *color = locked_rect.pBits; - ok(*color == 0x00ff0000, "Got color %#x, expected %#x\n", *color, 0x00ff0000); + ok(*color == 0x00ff0000, "Got color %#lx, expected %#x\n", *color, 0x00ff0000); IDirect3DSurface9_UnlockRect(surface); }
@@ -2262,13 +2262,13 @@ static void test_D3DXSaveTextureToFileInMemory(IDirect3DDevice9 *device)
todo_wine { hr = D3DXSaveTextureToFileInMemory(&buffer, D3DXIFF_DDS, (IDirect3DBaseTexture9 *)cube_texture, NULL); - ok(hr == D3D_OK, "D3DXSaveTextureToFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXSaveTextureToFileInMemory returned %#lx, expected %#lx\n", hr, D3D_OK); if (SUCCEEDED(hr)) { buffer_pointer = ID3DXBuffer_GetBufferPointer(buffer); buffer_size = ID3DXBuffer_GetBufferSize(buffer); hr = D3DXGetImageInfoFromFileInMemory(buffer_pointer, buffer_size, &info); - ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#lx, expected %#lx\n", hr, D3D_OK);
ok(info.Width == 256, "Got width %u, expected %u\n", info.Width, 256); ok(info.Height == 256, "Got height %u, expected %u\n", info.Height, 256); @@ -2291,13 +2291,13 @@ static void test_D3DXSaveTextureToFileInMemory(IDirect3DDevice9 *device)
todo_wine { hr = D3DXSaveTextureToFileInMemory(&buffer, D3DXIFF_BMP, (IDirect3DBaseTexture9 *)volume_texture, NULL); - ok(hr == D3D_OK, "D3DXSaveTextureToFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXSaveTextureToFileInMemory returned %#lx, expected %#lx\n", hr, D3D_OK); if (SUCCEEDED(hr)) { buffer_pointer = ID3DXBuffer_GetBufferPointer(buffer); buffer_size = ID3DXBuffer_GetBufferSize(buffer); hr = D3DXGetImageInfoFromFileInMemory(buffer_pointer, buffer_size, &info); - ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#lx, expected %#lx\n", hr, D3D_OK);
ok(info.Width == 256, "Got width %u, expected %u\n", info.Width, 256); ok(info.Height == 256, "Got height %u, expected %u\n", info.Height, 256); @@ -2309,13 +2309,13 @@ static void test_D3DXSaveTextureToFileInMemory(IDirect3DDevice9 *device) }
hr = D3DXSaveTextureToFileInMemory(&buffer, D3DXIFF_DDS, (IDirect3DBaseTexture9 *)volume_texture, NULL); - ok(hr == D3D_OK, "D3DXSaveTextureToFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXSaveTextureToFileInMemory returned %#lx, expected %#lx\n", hr, D3D_OK); if (SUCCEEDED(hr)) { buffer_pointer = ID3DXBuffer_GetBufferPointer(buffer); buffer_size = ID3DXBuffer_GetBufferSize(buffer); hr = D3DXGetImageInfoFromFileInMemory(buffer_pointer, buffer_size, &info); - ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#lx, expected %#lx\n", hr, D3D_OK);
ok(info.Width == 256, "Got width %u, expected %u\n", info.Width, 256); ok(info.Height == 256, "Got height %u, expected %u\n", info.Height, 256); @@ -2437,33 +2437,33 @@ float4 main(float3 pos : POSITION, float3 size : PSIZE) : COLOR HWND wnd;
hr = D3DXCreateTextureShader(NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr);
hr = D3DXCreateTextureShader(NULL, &tx); - ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr);
hr = D3DXCreateTextureShader(shader_invalid, &tx); - todo_wine ok(hr == D3DXERR_INVALIDDATA, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == D3DXERR_INVALIDDATA, "Got unexpected hr %#lx.\n", hr);
hr = D3DXCreateTextureShader(shader_zero, &tx); - todo_wine ok(hr == D3DXERR_INVALIDDATA, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == D3DXERR_INVALIDDATA, "Got unexpected hr %#lx.\n", hr);
hr = D3DXCreateTextureShader(shader_empty, &tx); - todo_wine ok(hr == D3DXERR_INVALIDDATA, "Got unexpected hr %#x.\n", hr); + todo_wine ok(hr == D3DXERR_INVALIDDATA, "Got unexpected hr %#lx.\n", hr);
hr = D3DXCreateTextureShader(shader_code, &tx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr);
hr = tx->lpVtbl->GetFunction(tx, &buffer); - ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
hr = tx->lpVtbl->GetFunction(tx, &buffer2); - ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr); ok(buffer2 == buffer, "Unexpected buffer object.\n"); ID3DXBuffer_Release(buffer2);
size = ID3DXBuffer_GetBufferSize(buffer); - ok(size == 224, "Unexpected buffer size %u.\n", size); + ok(size == 224, "Unexpected buffer size %lu.\n", size);
ID3DXBuffer_Release(buffer);
@@ -2479,12 +2479,12 @@ float4 main(float3 pos : POSITION, float3 size : PSIZE) : COLOR }
size = ID3DXBuffer_GetBufferSize(buffer); - ok(!size, "Unexpected buffer size %u.\n", size); + ok(!size, "Unexpected buffer size %lu.\n", size);
ID3DXBuffer_Release(buffer);
hr = tx->lpVtbl->GetDesc(tx, &ctab_desc); - ok(hr == S_OK, "Failed to get constant description, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get constant description, hr %#lx.\n", hr); ok(!ctab_desc.Constants, "Unexpected number of constants %u.\n", ctab_desc.Constants);
/* Constant table access calls, without constant table. */ @@ -2514,7 +2514,7 @@ float4 main(float3 pos : POSITION, float3 size : PSIZE) : COLOR D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &device); if (FAILED(hr)) { - skip("Failed to create IDirect3DDevice9 object, hr %#x.\n", hr); + skip("Failed to create IDirect3DDevice9 object, hr %#lx.\n", hr); IDirect3D9_Release(d3d); DestroyWindow(wnd); IUnknown_Release(tx); @@ -2525,13 +2525,13 @@ float4 main(float3 pos : POSITION, float3 size : PSIZE) : COLOR
hr = IDirect3DDevice9_CreateTexture(device, 256, 256, 1, 0, D3DFMT_A8R8G8B8, D3DPOOL_SYSTEMMEM, &texture, NULL); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr);
hr = D3DXFillTextureTX(texture, tx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DTexture9_LockRect(texture, 0, &lr, NULL, D3DLOCK_READONLY); - ok(SUCCEEDED(hr), "Locking texture failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Locking texture failed, hr %#lx.\n", hr); data = lr.pBits; for (y = 0; y < 256; ++y) { @@ -2545,7 +2545,7 @@ float4 main(float3 pos : POSITION, float3 size : PSIZE) : COLOR } } hr = IDirect3DTexture9_UnlockRect(texture, 0); - ok(SUCCEEDED(hr), "Unlocking texture failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Unlocking texture failed, hr %#lx.\n", hr);
IDirect3DTexture9_Release(texture);
@@ -2557,10 +2557,10 @@ float4 main(float3 pos : POSITION, float3 size : PSIZE) : COLOR
hr = IDirect3DDevice9_CreateCubeTexture(device, 256, 1, 0, D3DFMT_A8R8G8B8, D3DPOOL_SYSTEMMEM, &cube_texture, NULL); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr);
hr = D3DXFillCubeTextureTX(cube_texture, tx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr);
for (z = 0; z < 6; ++z) { @@ -2575,7 +2575,7 @@ float4 main(float3 pos : POSITION, float3 size : PSIZE) : COLOR };
hr = IDirect3DCubeTexture9_LockRect(cube_texture, z, 0, &lr, NULL, D3DLOCK_READONLY); - ok(SUCCEEDED(hr), "Locking texture failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Locking texture failed, hr %#lx.\n", hr); data = lr.pBits; for (y = 0; y < 256; ++y) { @@ -2604,7 +2604,7 @@ float4 main(float3 pos : POSITION, float3 size : PSIZE) : COLOR } } hr = IDirect3DCubeTexture9_UnlockRect(cube_texture, z, 0); - ok(SUCCEEDED(hr), "Unlocking texture failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Unlocking texture failed, hr %#lx.\n", hr); }
IDirect3DCubeTexture9_Release(cube_texture); @@ -2616,13 +2616,13 @@ float4 main(float3 pos : POSITION, float3 size : PSIZE) : COLOR } hr = IDirect3DDevice9_CreateVolumeTexture(device, 64, 64, 64, 1, 0, D3DFMT_A8R8G8B8, D3DPOOL_SYSTEMMEM, &volume_texture, NULL); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr);
hr = D3DXFillVolumeTextureTX(volume_texture, tx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DVolumeTexture9_LockBox(volume_texture, 0, &lb, NULL, D3DLOCK_READONLY); - ok(SUCCEEDED(hr), "Locking texture failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Locking texture failed, hr %#lx.\n", hr); data = lb.pBits; for (z = 0; z < 64; ++z) { @@ -2639,7 +2639,7 @@ float4 main(float3 pos : POSITION, float3 size : PSIZE) : COLOR } } hr = IDirect3DVolumeTexture9_UnlockBox(volume_texture, 0); - ok(SUCCEEDED(hr), "Unlocking texture failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Unlocking texture failed, hr %#lx.\n", hr);
IDirect3DVolumeTexture9_Release(volume_texture);
@@ -2647,7 +2647,7 @@ float4 main(float3 pos : POSITION, float3 size : PSIZE) : COLOR
/* With constant table */ hr = D3DXCreateTextureShader(shader_code2, &tx); - ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr);
hr = tx->lpVtbl->GetConstantBuffer(tx, &buffer); todo_wine @@ -2660,16 +2660,16 @@ float4 main(float3 pos : POSITION, float3 size : PSIZE) : COLOR }
size = ID3DXBuffer_GetBufferSize(buffer); - ok(size == 176, "Unexpected buffer size %u.\n", size); + ok(size == 176, "Unexpected buffer size %lu.\n", size);
hr = tx->lpVtbl->GetDesc(tx, &ctab_desc); - ok(hr == S_OK, "Failed to get constant description, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get constant description, hr %#lx.\n", hr); ok(ctab_desc.Constants == 5, "Unexpected number of constants %u.\n", ctab_desc.Constants);
h = tx->lpVtbl->GetConstant(tx, NULL, 0); ok(!!h, "Unexpected handle %p.\n", h); hr = tx->lpVtbl->GetConstantDesc(tx, h, &const_desc, &count); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!strcmp(const_desc.Name, "b1"), "Unexpected name %s.\n", const_desc.Name); ok(const_desc.RegisterSet == D3DXRS_FLOAT4, "Unexpected register set %u.\n", const_desc.RegisterSet); ok(const_desc.RegisterIndex == 9, "Unexpected register index %u.\n", const_desc.RegisterIndex); @@ -2678,7 +2678,7 @@ float4 main(float3 pos : POSITION, float3 size : PSIZE) : COLOR h = tx->lpVtbl->GetConstant(tx, NULL, 1); ok(!!h, "Unexpected handle %p.\n", h); hr = tx->lpVtbl->GetConstantDesc(tx, h, &const_desc, &count); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!strcmp(const_desc.Name, "b2"), "Unexpected name %s.\n", const_desc.Name); ok(const_desc.RegisterSet == D3DXRS_FLOAT4, "Unexpected register set %u.\n", const_desc.RegisterSet); ok(const_desc.RegisterIndex == 7, "Unexpected register index %u.\n", const_desc.RegisterIndex); @@ -2687,7 +2687,7 @@ float4 main(float3 pos : POSITION, float3 size : PSIZE) : COLOR h = tx->lpVtbl->GetConstant(tx, NULL, 2); ok(!!h, "Unexpected handle %p.\n", h); hr = tx->lpVtbl->GetConstantDesc(tx, h, &const_desc, &count); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!strcmp(const_desc.Name, "f1"), "Unexpected name %s.\n", const_desc.Name); ok(const_desc.RegisterSet == D3DXRS_FLOAT4, "Unexpected register set %u.\n", const_desc.RegisterSet); ok(const_desc.RegisterIndex == 5, "Unexpected register index %u.\n", const_desc.RegisterIndex); @@ -2698,7 +2698,7 @@ float4 main(float3 pos : POSITION, float3 size : PSIZE) : COLOR h2 = tx->lpVtbl->GetConstantElement(tx, h, 0); ok(!!h2, "Unexpected handle %p.\n", h); hr = tx->lpVtbl->GetConstantDesc(tx, h2, &const_desc, &count); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!strcmp(const_desc.Name, "f1"), "Unexpected name %s.\n", const_desc.Name); ok(const_desc.RegisterSet == D3DXRS_FLOAT4, "Unexpected register set %u.\n", const_desc.RegisterSet); ok(const_desc.RegisterIndex == 5, "Unexpected register index %u.\n", const_desc.RegisterIndex); @@ -2708,7 +2708,7 @@ float4 main(float3 pos : POSITION, float3 size : PSIZE) : COLOR h2 = tx->lpVtbl->GetConstantElement(tx, h, 1); ok(!!h2, "Unexpected handle %p.\n", h); hr = tx->lpVtbl->GetConstantDesc(tx, h2, &const_desc, &count); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!strcmp(const_desc.Name, "f1"), "Unexpected name %s.\n", const_desc.Name); ok(const_desc.RegisterSet == D3DXRS_FLOAT4, "Unexpected register set %u.\n", const_desc.RegisterSet); ok(const_desc.RegisterIndex == 6, "Unexpected register index %u.\n", const_desc.RegisterIndex); @@ -2721,7 +2721,7 @@ float4 main(float3 pos : POSITION, float3 size : PSIZE) : COLOR h = tx->lpVtbl->GetConstant(tx, NULL, 3); ok(!!h, "Unexpected handle %p.\n", h); hr = tx->lpVtbl->GetConstantDesc(tx, h, &const_desc, &count); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!strcmp(const_desc.Name, "f2"), "Unexpected name %s.\n", const_desc.Name); ok(const_desc.RegisterSet == D3DXRS_FLOAT4, "Unexpected register set %u.\n", const_desc.RegisterSet); ok(const_desc.RegisterIndex == 10, "Unexpected register index %u.\n", const_desc.RegisterIndex); @@ -2731,7 +2731,7 @@ float4 main(float3 pos : POSITION, float3 size : PSIZE) : COLOR h = tx->lpVtbl->GetConstant(tx, NULL, 4); ok(!!h, "Unexpected handle %p.\n", h); hr = tx->lpVtbl->GetConstantDesc(tx, h, &const_desc, &count); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!strcmp(const_desc.Name, "s1"), "Unexpected name %s.\n", const_desc.Name); ok(const_desc.RegisterSet == D3DXRS_FLOAT4, "Unexpected register set %u.\n", const_desc.RegisterSet); ok(const_desc.RegisterIndex == 0, "Unexpected register index %u.\n", const_desc.RegisterIndex); @@ -2742,7 +2742,7 @@ float4 main(float3 pos : POSITION, float3 size : PSIZE) : COLOR h2 = tx->lpVtbl->GetConstant(tx, h, 0); ok(!!h2, "Unexpected handle %p.\n", h); hr = tx->lpVtbl->GetConstantDesc(tx, h2, &const_desc, &count); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!strcmp(const_desc.Name, "b3"), "Unexpected name %s.\n", const_desc.Name); ok(const_desc.RegisterSet == D3DXRS_FLOAT4, "Unexpected register set %u.\n", const_desc.RegisterSet); ok(const_desc.RegisterIndex == 0, "Unexpected register index %u.\n", const_desc.RegisterIndex); @@ -2752,7 +2752,7 @@ float4 main(float3 pos : POSITION, float3 size : PSIZE) : COLOR h2 = tx->lpVtbl->GetConstant(tx, h, 1); ok(!!h2, "Unexpected handle %p.\n", h); hr = tx->lpVtbl->GetConstantDesc(tx, h2, &const_desc, &count); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!strcmp(const_desc.Name, "f3"), "Unexpected name %s.\n", const_desc.Name); ok(const_desc.RegisterSet == D3DXRS_FLOAT4, "Unexpected register set %u.\n", const_desc.RegisterSet); ok(const_desc.RegisterIndex == 1, "Unexpected register index %u.\n", const_desc.RegisterIndex); @@ -2798,7 +2798,7 @@ START_TEST(texture) d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD; hr = IDirect3D9_CreateDevice(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, wnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &device); if (FAILED(hr)) { - skip("Failed to create IDirect3DDevice9 object %#x\n", hr); + skip("Failed to create IDirect3DDevice9 object %#lx\n", hr); IDirect3D9_Release(d3d); DestroyWindow(wnd); return; @@ -2835,7 +2835,7 @@ START_TEST(texture) test_D3DXSaveTextureToFileInMemory(device);
ref = IDirect3DDevice9_Release(device); - ok(!ref, "Device has %u references left.\n", ref); + ok(!ref, "Device has %lu references left.\n", ref);
IDirect3D9_Release(d3d); DestroyWindow(wnd); diff --git a/dlls/d3dx9_36/tests/volume.c b/dlls/d3dx9_36/tests/volume.c index 53260c15a67..52075aa6314 100644 --- a/dlls/d3dx9_36/tests/volume.c +++ b/dlls/d3dx9_36/tests/volume.c @@ -43,7 +43,7 @@ static const unsigned char dds_volume_map[] = static inline void _check_pixel_4bpp(unsigned int line, const D3DLOCKED_BOX *box, int x, int y, int z, DWORD expected_color) { DWORD color = ((DWORD *)box->pBits)[x + (y * box->RowPitch + z * box->SlicePitch) / 4]; - ok_(__FILE__, line)(color == expected_color, "Got color 0x%08x, expected 0x%08x\n", color, expected_color); + ok_(__FILE__, line)(color == expected_color, "Got color 0x%08lx, expected 0x%08lx\n", color, expected_color); }
static inline void set_box(D3DBOX *box, UINT left, UINT top, UINT right, UINT bottom, UINT front, UINT back) @@ -85,7 +85,7 @@ static void test_D3DXLoadVolumeFromMemory(IDirect3DDevice9 *device) hr = D3DXLoadVolumeFromMemory(volume, NULL, &dst_box, pixels, D3DFMT_A8R8G8B8, 16, 16, NULL, &src_box, D3DX_DEFAULT, 0); if (FAILED(hr)) { - win_skip("D3DXLoadVolumeFromMemory failed with error %#x, skipping some tests.\n", hr); + win_skip("D3DXLoadVolumeFromMemory failed with error %#lx, skipping some tests.\n", hr); return; }
@@ -94,28 +94,28 @@ static void test_D3DXLoadVolumeFromMemory(IDirect3DDevice9 *device) IDirect3DVolume9_UnlockBox(volume);
hr = D3DXLoadVolumeFromMemory(volume, NULL, &dst_box, pixels, D3DFMT_UNKNOWN, 16, 16, NULL, &src_box, D3DX_DEFAULT, 0); - ok(hr == E_FAIL, "D3DXLoadVolumeFromMemory returned %#x, expected %#x\n", hr, E_FAIL); + ok(hr == E_FAIL, "D3DXLoadVolumeFromMemory returned %#lx, expected %#lx\n", hr, E_FAIL);
hr = D3DXLoadVolumeFromMemory(volume, NULL, NULL, pixels, D3DFMT_A8R8G8B8, 16, 16, NULL, &src_box, D3DX_DEFAULT, 0); - ok(hr == D3D_OK, "D3DXLoadVolumeFromMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadVolumeFromMemory returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = D3DXLoadVolumeFromMemory(volume, NULL, &dst_box, NULL, D3DFMT_A8R8G8B8, 16, 16, NULL, &src_box, D3DX_DEFAULT, 0); - ok(hr == D3DERR_INVALIDCALL, "D3DXLoadVolumeFromMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadVolumeFromMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXLoadVolumeFromMemory(volume, NULL, &dst_box, pixels, D3DFMT_A8R8G8B8, 16, 16, NULL, NULL, D3DX_DEFAULT, 0); - ok(hr == D3DERR_INVALIDCALL, "D3DXLoadVolumeFromMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadVolumeFromMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
set_box(&src_box, 0, 0, 4, 4, 0, 1); set_box(&dst_box, 0, 0, 4, 4, 0, 1); hr = D3DXLoadVolumeFromMemory(volume, NULL, &dst_box, pixels, D3DFMT_A8R8G8B8, 16, sizeof(pixels), NULL, &src_box, D3DX_DEFAULT, 0); - ok(hr == D3D_OK, "D3DXLoadVolumeFromMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadVolumeFromMemory returned %#lx, expected %#lx\n", hr, D3D_OK);
IDirect3DVolume9_LockBox(volume, &locked_box, &dst_box, D3DLOCK_READONLY); for (i = 0; i < 16; i++) check_pixel_4bpp(&locked_box, i % 4, i / 4, 0, pixels[i]); IDirect3DVolume9_UnlockBox(volume);
hr = D3DXLoadVolumeFromMemory(volume, NULL, NULL, pixels, D3DFMT_A8R8G8B8, 16, sizeof(pixels), NULL, &src_box, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "D3DXLoadVolumeFromMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadVolumeFromMemory returned %#lx, expected %#lx\n", hr, D3D_OK);
IDirect3DVolume9_LockBox(volume, &locked_box, NULL, D3DLOCK_READONLY); for (i = 0; i < 16; i++) check_pixel_4bpp(&locked_box, i % 4, i / 4, 0, pixels[i]); @@ -132,7 +132,7 @@ static void test_D3DXLoadVolumeFromMemory(IDirect3DDevice9 *device) set_box(&src_box, 0, 0, 2, 2, 1, 2); set_box(&dst_box, 0, 0, 2, 2, 0, 1); hr = D3DXLoadVolumeFromMemory(volume, NULL, &dst_box, pixels, D3DFMT_A8R8G8B8, 8, 16, NULL, &src_box, D3DX_DEFAULT, 0); - ok(hr == D3D_OK, "D3DXLoadVolumeFromMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadVolumeFromMemory returned %#lx, expected %#lx\n", hr, D3D_OK);
IDirect3DVolume9_LockBox(volume, &locked_box, &dst_box, D3DLOCK_READONLY); for (i = 0; i < 4; i++) check_pixel_4bpp(&locked_box, i % 2, i / 2, 0, pixels[i + 4]); @@ -141,7 +141,7 @@ static void test_D3DXLoadVolumeFromMemory(IDirect3DDevice9 *device) set_box(&src_box, 0, 0, 2, 2, 2, 3); set_box(&dst_box, 0, 0, 2, 2, 1, 2); hr = D3DXLoadVolumeFromMemory(volume, NULL, &dst_box, pixels, D3DFMT_A8R8G8B8, 8, 16, NULL, &src_box, D3DX_DEFAULT, 0); - ok(hr == D3D_OK, "D3DXLoadVolumeFromMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadVolumeFromMemory returned %#lx, expected %#lx\n", hr, D3D_OK);
IDirect3DVolume9_LockBox(volume, &locked_box, &dst_box, D3DLOCK_READONLY); for (i = 0; i < 4; i++) check_pixel_4bpp(&locked_box, i % 2, i / 2, 0, pixels[i + 8]); @@ -151,27 +151,27 @@ static void test_D3DXLoadVolumeFromMemory(IDirect3DDevice9 *device)
set_box(&dst_box, -1, -1, 3, 0, 0, 4); hr = D3DXLoadVolumeFromMemory(volume, NULL, &dst_box, pixels, D3DFMT_A8R8G8B8, 16, 16, NULL, &src_box, D3DX_DEFAULT, 0); - ok(hr == D3DERR_INVALIDCALL, "D3DXLoadVolumeFromMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadVolumeFromMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
set_box(&dst_box, 254, 254, 258, 255, 0, 4); hr = D3DXLoadVolumeFromMemory(volume, NULL, &dst_box, pixels, D3DFMT_A8R8G8B8, 16, 16, NULL, &src_box, D3DX_DEFAULT, 0); - ok(hr == D3DERR_INVALIDCALL, "D3DXLoadVolumeFromMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadVolumeFromMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
set_box(&dst_box, 4, 1, 0, 0, 0, 4); hr = D3DXLoadVolumeFromMemory(volume, NULL, &dst_box, pixels, D3DFMT_A8R8G8B8, 16, 16, NULL, &src_box, D3DX_DEFAULT, 0); - ok(hr == D3DERR_INVALIDCALL, "D3DXLoadVolumeFromMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadVolumeFromMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
set_box(&dst_box, 0, 0, 0, 0, 0, 0); hr = D3DXLoadVolumeFromMemory(volume, NULL, &dst_box, pixels, D3DFMT_A8R8G8B8, 16, 16, NULL, &src_box, D3DX_DEFAULT, 0); - ok(hr == D3DERR_INVALIDCALL, "D3DXLoadVolumeFromMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadVolumeFromMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
set_box(&dst_box, 0, 0, 0, 0, 0, 1); hr = D3DXLoadVolumeFromMemory(volume, NULL, &dst_box, pixels, D3DFMT_A8R8G8B8, 16, 16, NULL, &src_box, D3DX_DEFAULT, 0); - ok(hr == D3DERR_INVALIDCALL, "D3DXLoadVolumeFromMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadVolumeFromMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
set_box(&dst_box, 300, 300, 300, 300, 0, 0); hr = D3DXLoadVolumeFromMemory(volume, NULL, &dst_box, pixels, D3DFMT_A8R8G8B8, 16, 16, NULL, &src_box, D3DX_DEFAULT, 0); - ok(hr == D3DERR_INVALIDCALL, "D3DXLoadVolumeFromMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadVolumeFromMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
IDirect3DVolume9_Release(volume); IDirect3DVolumeTexture9_Release(volume_texture); @@ -188,7 +188,7 @@ static void test_D3DXLoadVolumeFromMemory(IDirect3DDevice9 *device) set_box(&src_box, 0, 0, 4, 1, 0, 4); set_box(&dst_box, 0, 0, 4, 1, 0, 4); hr = D3DXLoadVolumeFromMemory(volume, NULL, &dst_box, pixels, D3DFMT_A8R8G8B8, 16, 16, NULL, &src_box, D3DX_DEFAULT, 0); - ok(hr == D3DERR_INVALIDCALL, "D3DXLoadVolumeFromMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadVolumeFromMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
IDirect3DVolume9_Release(volume); IDirect3DVolumeTexture9_Release(volume_texture); @@ -205,7 +205,7 @@ static void test_D3DXLoadVolumeFromMemory(IDirect3DDevice9 *device) set_box(&src_box, 1, 1, 7, 7, 0, 1); set_box(&dst_box, 1, 1, 7, 7, 0, 1); hr = D3DXLoadVolumeFromMemory(volume, NULL, &dst_box, pixels, D3DFMT_A8R8G8B8, 16, 32, NULL, &src_box, D3DX_DEFAULT, 0); - todo_wine ok(hr == D3D_OK, "D3DXLoadVolumeFromMemory returned %#x, expected %#x\n", hr, D3D_OK); + todo_wine ok(hr == D3D_OK, "D3DXLoadVolumeFromMemory returned %#lx, expected %#lx\n", hr, D3D_OK);
IDirect3DVolume9_Release(volume); IDirect3DVolumeTexture9_Release(volume_texture); @@ -229,35 +229,35 @@ static void test_D3DXLoadVolumeFromFileInMemory(IDirect3DDevice9 *device) IDirect3DVolumeTexture9_GetVolumeLevel(volume_texture, 0, &volume);
hr = D3DXLoadVolumeFromFileInMemory(volume, NULL, NULL, dds_volume_map, sizeof(dds_volume_map), NULL, D3DX_DEFAULT, 0, NULL); - ok(hr == D3D_OK, "D3DXLoadVolumeFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadVolumeFromFileInMemory returned %#lx, expected %#lx\n", hr, D3D_OK);
hr = D3DXLoadVolumeFromFileInMemory(volume, NULL, NULL, NULL, sizeof(dds_volume_map), NULL, D3DX_DEFAULT, 0, NULL); - ok(hr == D3DERR_INVALIDCALL, "D3DXLoadVolumeFromFileInMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadVolumeFromFileInMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXLoadVolumeFromFileInMemory(volume, NULL, NULL, NULL, 0, NULL, D3DX_DEFAULT, 0, NULL); - ok(hr == D3DERR_INVALIDCALL, "D3DXLoadVolumeFromFileInMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadVolumeFromFileInMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXLoadVolumeFromFileInMemory(volume, NULL, NULL, dds_volume_map, 0, NULL, D3DX_DEFAULT, 0, NULL); - ok(hr == D3DERR_INVALIDCALL, "D3DXLoadVolumeFromFileInMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadVolumeFromFileInMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
hr = D3DXLoadVolumeFromFileInMemory(NULL, NULL, NULL, dds_volume_map, sizeof(dds_volume_map), NULL, D3DX_DEFAULT, 0, NULL); - ok(hr == D3DERR_INVALIDCALL, "D3DXLoadVolumeFromFileInMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadVolumeFromFileInMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
set_box(&src_box, 0, 0, 4, 4, 0, 2); hr = D3DXLoadVolumeFromFileInMemory(volume, NULL, NULL, dds_volume_map, sizeof(dds_volume_map), &src_box, D3DX_DEFAULT, 0, NULL); - ok(hr == D3D_OK, "D3DXLoadVolumeFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK, "D3DXLoadVolumeFromFileInMemory returned %#lx, expected %#lx\n", hr, D3D_OK);
set_box(&src_box, 0, 0, 0, 0, 0, 0); hr = D3DXLoadVolumeFromFileInMemory(volume, NULL, NULL, dds_volume_map, sizeof(dds_volume_map), &src_box, D3DX_DEFAULT, 0, NULL); - ok(hr == E_FAIL, "D3DXLoadVolumeFromFileInMemory returned %#x, expected %#x\n", hr, E_FAIL); + ok(hr == E_FAIL, "D3DXLoadVolumeFromFileInMemory returned %#lx, expected %#lx\n", hr, E_FAIL);
set_box(&src_box, 0, 0, 5, 4, 0, 2); hr = D3DXLoadVolumeFromFileInMemory(volume, NULL, NULL, dds_volume_map, sizeof(dds_volume_map), &src_box, D3DX_DEFAULT, 0, NULL); - ok(hr == D3DERR_INVALIDCALL, "D3DXLoadVolumeFromFileInMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadVolumeFromFileInMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
set_box(&src_box, 0, 0, 4, 4, 0, 3); hr = D3DXLoadVolumeFromFileInMemory(volume, NULL, NULL, dds_volume_map, sizeof(dds_volume_map), &src_box, D3DX_DEFAULT, 0, NULL); - ok(hr == D3DERR_INVALIDCALL, "D3DXLoadVolumeFromFileInMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadVolumeFromFileInMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
IDirect3DVolume9_Release(volume); IDirect3DVolumeTexture9_Release(volume_texture); @@ -291,7 +291,7 @@ START_TEST(volume) hr = IDirect3D9_CreateDevice(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, wnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &device); if(FAILED(hr)) { - skip("Failed to create IDirect3DDevice9 object %#x\n", hr); + skip("Failed to create IDirect3DDevice9 object %#lx\n", hr); IDirect3D9_Release(d3d); DestroyWindow(wnd); return; diff --git a/dlls/d3dx9_36/tests/xfile.c b/dlls/d3dx9_36/tests/xfile.c index 46b4ee26564..5830d3fd203 100644 --- a/dlls/d3dx9_36/tests/xfile.c +++ b/dlls/d3dx9_36/tests/xfile.c @@ -86,28 +86,28 @@ static void test_templates(void) HRESULT ret;
ret = D3DXFileCreate(NULL); - ok(ret == E_POINTER, "D3DXCreateFile returned %#x, expected %#x\n", ret, E_POINTER); + ok(ret == E_POINTER, "D3DXCreateFile returned %#lx, expected %#lx\n", ret, E_POINTER);
ret = D3DXFileCreate(&d3dxfile); - ok(ret == S_OK, "D3DXCreateFile failed with %#x\n", ret); + ok(ret == S_OK, "D3DXCreateFile failed with %#lx\n", ret);
ret = d3dxfile->lpVtbl->RegisterTemplates(d3dxfile, templates_bad_file_type1, sizeof(templates_bad_file_type1) - 1); - ok(ret == D3DXFERR_BADFILETYPE, "RegisterTemplates returned %#x, expected %#x\n", ret, D3DXFERR_BADFILETYPE); + ok(ret == D3DXFERR_BADFILETYPE, "RegisterTemplates returned %#lx, expected %#lx\n", ret, D3DXFERR_BADFILETYPE);
ret = d3dxfile->lpVtbl->RegisterTemplates(d3dxfile, templates_bad_file_version, sizeof(templates_bad_file_version) - 1); - ok(ret == D3DXFERR_BADFILEVERSION, "RegisterTemplates returned %#x, expected %#x\n", ret, D3DXFERR_BADFILEVERSION); + ok(ret == D3DXFERR_BADFILEVERSION, "RegisterTemplates returned %#lx, expected %#lx\n", ret, D3DXFERR_BADFILEVERSION);
ret = d3dxfile->lpVtbl->RegisterTemplates(d3dxfile, templates_bad_file_type2, sizeof(templates_bad_file_type2) - 1); - ok(ret == D3DXFERR_BADFILETYPE, "RegisterTemplates returned %#x, expected %#x\n", ret, D3DXFERR_BADFILETYPE); + ok(ret == D3DXFERR_BADFILETYPE, "RegisterTemplates returned %#lx, expected %#lx\n", ret, D3DXFERR_BADFILETYPE);
ret = d3dxfile->lpVtbl->RegisterTemplates(d3dxfile, templates_bad_file_float_size, sizeof(templates_bad_file_float_size) - 1); - ok(ret == D3DXFERR_BADFILEFLOATSIZE, "RegisterTemplates returned %#x, expected %#x\n", ret, D3DXFERR_BADFILEFLOATSIZE); + ok(ret == D3DXFERR_BADFILEFLOATSIZE, "RegisterTemplates returned %#lx, expected %#lx\n", ret, D3DXFERR_BADFILEFLOATSIZE);
ret = d3dxfile->lpVtbl->RegisterTemplates(d3dxfile, templates_parse_error, sizeof(templates_parse_error) - 1); - ok(ret == D3DXFERR_PARSEERROR, "RegisterTemplates returned %#x, expected %#x\n", ret, D3DXFERR_PARSEERROR); + ok(ret == D3DXFERR_PARSEERROR, "RegisterTemplates returned %#lx, expected %#lx\n", ret, D3DXFERR_PARSEERROR);
ret = d3dxfile->lpVtbl->RegisterTemplates(d3dxfile, templates, sizeof(templates) - 1); - ok(ret == S_OK, "RegisterTemplates failed with %#x\n", ret); + ok(ret == S_OK, "RegisterTemplates failed with %#lx\n", ret);
d3dxfile->lpVtbl->Release(d3dxfile); } @@ -123,30 +123,30 @@ static void test_lock_unlock(void) HRESULT ret;
ret = D3DXFileCreate(&d3dxfile); - ok(ret == S_OK, "D3DXCreateFile failed with %#x\n", ret); + ok(ret == S_OK, "D3DXCreateFile failed with %#lx\n", ret);
ret = d3dxfile->lpVtbl->RegisterTemplates(d3dxfile, templates, sizeof(templates) - 1); - ok(ret == S_OK, "RegisterTemplates failed with %#x\n", ret); + ok(ret == S_OK, "RegisterTemplates failed with %#lx\n", ret);
memory.lpMemory = objects; memory.dSize = sizeof(objects) - 1;
ret = d3dxfile->lpVtbl->CreateEnumObject(d3dxfile, &memory, D3DXF_FILELOAD_FROMMEMORY, &enum_object); - ok(ret == S_OK, "CreateEnumObject failed with %#x\n", ret); + ok(ret == S_OK, "CreateEnumObject failed with %#lx\n", ret);
ret = enum_object->lpVtbl->GetChild(enum_object, 0, &data_object); - ok(ret == S_OK, "GetChild failed with %#x\n", ret); + ok(ret == S_OK, "GetChild failed with %#lx\n", ret);
ret = data_object->lpVtbl->Unlock(data_object); - ok(ret == S_OK, "Unlock failed with %#x\n", ret); + ok(ret == S_OK, "Unlock failed with %#lx\n", ret); ret = data_object->lpVtbl->Lock(data_object, &size, &data); - ok(ret == S_OK, "Lock failed with %#x\n", ret); + ok(ret == S_OK, "Lock failed with %#lx\n", ret); ret = data_object->lpVtbl->Lock(data_object, &size, &data); - ok(ret == S_OK, "Lock failed with %#x\n", ret); + ok(ret == S_OK, "Lock failed with %#lx\n", ret); ret = data_object->lpVtbl->Unlock(data_object); - ok(ret == S_OK, "Unlock failed with %#x\n", ret); + ok(ret == S_OK, "Unlock failed with %#lx\n", ret); ret = data_object->lpVtbl->Unlock(data_object); - ok(ret == S_OK, "Unlock failed with %#x\n", ret); + ok(ret == S_OK, "Unlock failed with %#lx\n", ret);
data_object->lpVtbl->Release(data_object); enum_object->lpVtbl->Release(enum_object); @@ -164,34 +164,34 @@ static void test_getname(void) HRESULT ret;
ret = D3DXFileCreate(&d3dxfile); - ok(ret == S_OK, "D3DXCreateFile failed with %#x\n", ret); + ok(ret == S_OK, "D3DXCreateFile failed with %#lx\n", ret);
ret = d3dxfile->lpVtbl->RegisterTemplates(d3dxfile, templates, sizeof(templates) - 1); - ok(ret == S_OK, "RegisterTemplates failed with %#x\n", ret); + ok(ret == S_OK, "RegisterTemplates failed with %#lx\n", ret);
/* Check object with name */ memory.lpMemory = objects; memory.dSize = sizeof(objects) - 1; ret = d3dxfile->lpVtbl->CreateEnumObject(d3dxfile, &memory, D3DXF_FILELOAD_FROMMEMORY, &enum_object); - ok(ret == S_OK, "CreateEnumObject failed with %#x\n", ret); + ok(ret == S_OK, "CreateEnumObject failed with %#lx\n", ret); ret = enum_object->lpVtbl->GetChild(enum_object, 0, &data_object); - ok(ret == S_OK, "GetChild failed with %#x\n", ret); + ok(ret == S_OK, "GetChild failed with %#lx\n", ret);
ret = data_object->lpVtbl->GetName(data_object, NULL, NULL); - ok(ret == D3DXFERR_BADVALUE, "GetName returned %#x, expected %#x\n", ret, D3DXFERR_BADVALUE); + ok(ret == D3DXFERR_BADVALUE, "GetName returned %#lx, expected %#lx\n", ret, D3DXFERR_BADVALUE); ret = data_object->lpVtbl->GetName(data_object, name, NULL); - ok(ret == D3DXFERR_BADVALUE, "GetName returned %#x, expected %#x\n", ret, D3DXFERR_BADVALUE); + ok(ret == D3DXFERR_BADVALUE, "GetName returned %#lx, expected %#lx\n", ret, D3DXFERR_BADVALUE); ret = data_object->lpVtbl->GetName(data_object, NULL, &length); - ok(ret == S_OK, "GetName failed with %#x\n", ret); - ok(length == 7, "Returned length should be 7 instead of %ld\n", length); + ok(ret == S_OK, "GetName failed with %#lx\n", ret); + ok(length == 7, "Returned length should be 7 instead of %Id\n", length); length = sizeof(name); ret = data_object->lpVtbl->GetName(data_object, name, &length); - ok(ret == S_OK, "GetName failed with %#x\n", ret); - ok(length == 7, "Returned length should be 7 instead of %ld\n", length); + ok(ret == S_OK, "GetName failed with %#lx\n", ret); + ok(length == 7, "Returned length should be 7 instead of %Id\n", length); ok(!strcmp(name, "Object"), "Returned string should be 'Object' instead of '%s'\n", name); length = 3; ret = data_object->lpVtbl->GetName(data_object, name, &length); - ok(ret== D3DXFERR_BADVALUE, "GetName returned %#x, expected %#x\n", ret, D3DXFERR_BADVALUE); + ok(ret== D3DXFERR_BADVALUE, "GetName returned %#lx, expected %#lx\n", ret, D3DXFERR_BADVALUE);
data_object->lpVtbl->Release(data_object); enum_object->lpVtbl->Release(enum_object); @@ -200,26 +200,26 @@ static void test_getname(void) memory.lpMemory = object_noname; memory.dSize = sizeof(object_noname) - 1; ret = d3dxfile->lpVtbl->CreateEnumObject(d3dxfile, &memory, D3DXF_FILELOAD_FROMMEMORY, &enum_object); - ok(ret == S_OK, "CreateEnumObject failed with %#x\n", ret); + ok(ret == S_OK, "CreateEnumObject failed with %#lx\n", ret); ret = enum_object->lpVtbl->GetChild(enum_object, 0, &data_object); - ok(ret == S_OK, "GetChild failed with %#x\n", ret); + ok(ret == S_OK, "GetChild failed with %#lx\n", ret);
/* Contrary to d3dxof, d3dx9_36 returns an empty string with a null byte when no name is available. * If the input size is 0, it returns a length of 1 without touching the buffer */ ret = data_object->lpVtbl->GetName(data_object, NULL, &length); - ok(ret == S_OK, "GetName failed with %#x\n", ret); - ok(length == 1, "Returned length should be 1 instead of %ld\n", length); + ok(ret == S_OK, "GetName failed with %#lx\n", ret); + ok(length == 1, "Returned length should be 1 instead of %Id\n", length); length = 0; name[0] = 0x7f; ret = data_object->lpVtbl->GetName(data_object, name, &length); - ok(ret == S_OK, "GetName failed with %#x\n", ret); - ok(length == 1, "Returned length should be 1 instead of %ld\n", length); + ok(ret == S_OK, "GetName failed with %#lx\n", ret); + ok(length == 1, "Returned length should be 1 instead of %Id\n", length); ok(name[0] == 0x7f, "First character is %#x instead of 0x7f\n", name[0]); length = sizeof(name); name[0] = 0x7f; ret = data_object->lpVtbl->GetName(data_object, name, &length); - ok(ret == S_OK, "GetName failed with %#x\n", ret); - ok(length == 1, "Returned length should be 1 instead of %ld\n", length); + ok(ret == S_OK, "GetName failed with %#lx\n", ret); + ok(length == 1, "Returned length should be 1 instead of %Id\n", length); ok(name[0] == 0, "First character is %#x instead of 0x00\n", name[0]);
data_object->lpVtbl->Release(data_object); @@ -233,13 +233,13 @@ static void test_type_index_color(void) HRESULT ret;
ret = D3DXFileCreate(&d3dxfile); - ok(ret == S_OK, "D3DXCreateFile failed with %#x\n", ret); + ok(ret == S_OK, "D3DXCreateFile failed with %#lx\n", ret);
/* Test that 'indexColor' can be used (same as IndexedColor in standard templates) and is case sensitive */ ret = d3dxfile->lpVtbl->RegisterTemplates(d3dxfile, template_using_index_color_lower, sizeof(template_using_index_color_lower) - 1); - ok(ret == S_OK, "RegisterTemplates failed with %#x\n", ret); + ok(ret == S_OK, "RegisterTemplates failed with %#lx\n", ret); ret = d3dxfile->lpVtbl->RegisterTemplates(d3dxfile, template_using_index_color_upper, sizeof(template_using_index_color_upper) - 1); - ok(ret == D3DXFERR_PARSEERROR, "RegisterTemplates returned %#x instead of %#x\n", ret, D3DXFERR_PARSEERROR); + ok(ret == D3DXFERR_PARSEERROR, "RegisterTemplates returned %#lx instead of %#lx\n", ret, D3DXFERR_PARSEERROR);
d3dxfile->lpVtbl->Release(d3dxfile); } @@ -257,18 +257,18 @@ static void process_data(ID3DXFileData *xfile_data, int level) SIZE_T children;
ret = xfile_data->lpVtbl->GetId(xfile_data, &clsid); - ok(ret == S_OK, "ID3DXFileData_GetId failed with %#x\n", ret); + ok(ret == S_OK, "ID3DXFileData_GetId failed with %#lx\n", ret); ret = xfile_data->lpVtbl->GetName(xfile_data, name, &len); - ok(ret == S_OK, "ID3DXFileData_GetName failed with %#x\n", ret); + ok(ret == S_OK, "ID3DXFileData_GetName failed with %#lx\n", ret); ret = xfile_data->lpVtbl->GetType(xfile_data, &clsid_type); - ok(ret == S_OK, "IDirectXFileData_GetType failed with %#x\n", ret); + ok(ret == S_OK, "IDirectXFileData_GetType failed with %#lx\n", ret); ret = xfile_data->lpVtbl->Lock(xfile_data, &size, (const void**)&data); - ok(ret == S_OK, "IDirectXFileData_Lock failed with %#x\n", ret); + ok(ret == S_OK, "IDirectXFileData_Lock failed with %#lx\n", ret);
for (i = 0; i < level; i++) printf(" ");
- printf("Found object '%s' - %s - %s - %lu\n", + printf("Found object '%s' - %s - %s - %Iu\n", len ? name : "", wine_dbgstr_guid(&clsid), wine_dbgstr_guid(&clsid_type), size);
if (size) @@ -284,10 +284,10 @@ static void process_data(ID3DXFileData *xfile_data, int level) }
ret = xfile_data->lpVtbl->Unlock(xfile_data); - ok(ret == S_OK, "ID3DXFileData_Unlock failed with %#x\n", ret); + ok(ret == S_OK, "ID3DXFileData_Unlock failed with %#lx\n", ret);
ret = xfile_data->lpVtbl->GetChildren(xfile_data, &children); - ok(ret == S_OK, "ID3DXFileData_GetChildren failed with %#x\n", ret); + ok(ret == S_OK, "ID3DXFileData_GetChildren failed with %#lx\n", ret);
level++;
@@ -297,7 +297,7 @@ static void process_data(ID3DXFileData *xfile_data, int level) int j;
ret = xfile_data->lpVtbl->GetChild(xfile_data, i, &child); - ok(ret == S_OK, "ID3DXFileData_GetChild failed with %#x\n", ret); + ok(ret == S_OK, "ID3DXFileData_GetChild failed with %#lx\n", ret); for (j = 0; j < level; j++) printf(" "); if (child->lpVtbl->IsReference(child)) @@ -343,35 +343,35 @@ static void test_dump(void) goto exit; }
- printf("Load templates file (%u bytes)\n", size); + printf("Load templates file (%lu bytes)\n", size);
ret = D3DXFileCreate(&xfile); - ok(ret == S_OK, "D3DXCreateFile failed with %#x\n", ret); + ok(ret == S_OK, "D3DXCreateFile failed with %#lx\n", ret);
ret = xfile->lpVtbl->RegisterTemplates(xfile, data, size); - ok(ret == S_OK, "ID3DXFileImpl_RegisterTemplates failed with %#x\n", ret); + ok(ret == S_OK, "ID3DXFileImpl_RegisterTemplates failed with %#lx\n", ret);
ret = xfile->lpVtbl->CreateEnumObject(xfile, (void*)"objects.x", D3DXF_FILELOAD_FROMFILE, &xfile_enum_object); - ok(ret == S_OK, "ID3DXFile_CreateEnumObject failed with %#x\n", ret); + ok(ret == S_OK, "ID3DXFile_CreateEnumObject failed with %#lx\n", ret);
ret = xfile_enum_object->lpVtbl->GetChildren(xfile_enum_object, &children); - ok(ret == S_OK, "ID3DXFileEnumObject_GetChildren failed with %#x\n", ret); + ok(ret == S_OK, "ID3DXFileEnumObject_GetChildren failed with %#lx\n", ret);
for (i = 0; i < children; i++) { ID3DXFileData *child; ret = xfile_enum_object->lpVtbl->GetChild(xfile_enum_object, i, &child); - ok(ret == S_OK, "ID3DXFileEnumObject_GetChild failed with %#x\n", ret); + ok(ret == S_OK, "ID3DXFileEnumObject_GetChild failed with %#lx\n", ret); printf("\n"); process_data(child, 0); child->lpVtbl->Release(child); }
ref = xfile_enum_object->lpVtbl->Release(xfile_enum_object); - ok(ref == 0, "Got refcount %u, expected 0\n", ref); + ok(ref == 0, "Got refcount %lu, expected 0\n", ref);
ref = xfile->lpVtbl->Release(xfile); - ok(ref == 0, "Got refcount %u, expected 0\n", ref); + ok(ref == 0, "Got refcount %lu, expected 0\n", ref);
exit:
Matteo Bruni (@Mystral) commented about dlls/d3dx9_36/tests/effect.c:
ID3DXEffect *effect; HRESULT hr; D3DXHANDLE param;
- unsigned int i, passes_count, value;
- unsigned int i, passes_count;
- DWORD value;
It's probably better to introduce a union like: <pre> union { DWORD d; float f; } value; </pre> and then use the appropriate member in the following code as necessary. It might also make sense to split out a separate DWORD variable for the cases where the variable is only used as DWORD (e.g. the GetSamplerState() part).
For the second patch I feel like it's a bit of a wasted opportunity not to fix up the ok() messages and such, to fit better our current style. I'll probably have a shot at it myself.