Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- dlls/d3dx9_36/tests/math.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/d3dx9_36/tests/math.c b/dlls/d3dx9_36/tests/math.c index becd55dedf6..3b7acfc2696 100644 --- a/dlls/d3dx9_36/tests/math.c +++ b/dlls/d3dx9_36/tests/math.c @@ -414,7 +414,8 @@ static void D3DXMatrixTest(void) ret = D3DXMatrixInverse(&gotmat, &determinant, &mat2); ok(!ret, "Unexpected return value %p.\n", ret); expect_matrix(&expectedmat, &gotmat, 1); - ok(compare_float(determinant, 5.0f, 0), "Unexpected determinant %.8e.\n", determinant); + ok(compare_float(determinant, 5.0f, 0) || broken(!determinant), /* Vista 64 bit testbot */ + "Unexpected determinant %.8e.\n", determinant);
/*____________D3DXMatrixIsIdentity______________*/ expected = FALSE;
From: Christian Costa titan.costa@gmail.com
Signed-off-by: Vijay Kiran Kamuju infyquest@gmail.com Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- It would have been nice to know if this affects any actual application.
dlls/d3dx9_36/tests/surface.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+)
diff --git a/dlls/d3dx9_36/tests/surface.c b/dlls/d3dx9_36/tests/surface.c index b7c52a28b0f..56b79d80cb2 100644 --- a/dlls/d3dx9_36/tests/surface.c +++ b/dlls/d3dx9_36/tests/surface.c @@ -67,6 +67,26 @@ static const unsigned char bmp_8bpp[] = { 0x00,0x00 };
+/* 2x2 bmp (32 bpp XRGB) */ +static const unsigned char bmp_32bpp_xrgb[] = +{ + 0x42,0x4d,0x46,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x28,0x00, + 0x00,0x00,0x02,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x01,0x00,0x20,0x00,0x00,0x00, + 0x00,0x00,0x10,0x00,0x00,0x00,0x12,0x0b,0x00,0x00,0x12,0x0b,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0xb0,0xc0,0x00,0xa1,0xb1,0xc1,0x00,0xa2,0xb2, + 0xc2,0x00,0xa3,0xb3,0xc3,0x00 +}; + +/* 2x2 bmp (32 bpp ARGB) */ +static const unsigned char bmp_32bpp_argb[] = +{ + 0x42,0x4d,0x46,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x28,0x00, + 0x00,0x00,0x02,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x01,0x00,0x20,0x00,0x00,0x00, + 0x00,0x00,0x10,0x00,0x00,0x00,0x12,0x0b,0x00,0x00,0x12,0x0b,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0xb0,0xc0,0x00,0xa1,0xb1,0xc1,0x00,0xa2,0xb2, + 0xc2,0x00,0xa3,0xb3,0xc3,0x01 +}; + static const unsigned char png_grayscale[] = { 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, @@ -560,6 +580,13 @@ static void test_D3DXGetImageInfo(void) 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(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); + todo_wine 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);
On 4/4/19 9:54 AM, Matteo Bruni wrote:
From: Christian Costa titan.costa@gmail.com
Signed-off-by: Vijay Kiran Kamuju infyquest@gmail.com Signed-off-by: Matteo Bruni mbruni@codeweavers.com
It would have been nice to know if this affects any actual application.
I have written down, though I can't remember where I found it, that it fixes transparency of icons in the game Runaway 3.
From: Vijay Kiran Kamuju infyquest@gmail.com
Based on a patch by Michael Müller.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=33904 Signed-off-by: Vijay Kiran Kamuju infyquest@gmail.com Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- dlls/d3dx9_36/mesh.c | 7 +++++ dlls/d3dx9_36/tests/mesh.c | 58 ++++++++++++++++++-------------------- 2 files changed, 34 insertions(+), 31 deletions(-)
diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c index d4896e08e9c..b953237333b 100644 --- a/dlls/d3dx9_36/mesh.c +++ b/dlls/d3dx9_36/mesh.c @@ -3332,6 +3332,13 @@ static HRESULT parse_mesh(ID3DXFileData *filedata, struct mesh_data *mesh_data, goto end; }
+ if ((provide_flags & PROVIDE_SKININFO) && !mesh_data->skin_info) + { + if (FAILED(hr = D3DXCreateSkinInfoFVF(mesh_data->num_vertices, mesh_data->fvf, + mesh_data->nb_bones, &mesh_data->skin_info))) + goto end; + } + hr = D3D_OK;
end: diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c index 43cde025fb9..9c321ba4316 100644 --- a/dlls/d3dx9_36/tests/mesh.c +++ b/dlls/d3dx9_36/tests/mesh.c @@ -11355,53 +11355,49 @@ static void test_load_skin_mesh_from_xof(void) ok(!materials, "Got unexpected value %p.\n", materials); ok(!effects, "Got unexpected value %p.\n", effects); ok(!count, "Got unexpected value %u.\n", count); - todo_wine ok(!!skin_info, "Got unexpected value %p.\n", skin_info); + 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); count = mesh->lpVtbl->GetNumFaces(mesh); ok(count == 1, "Got unexpected value %u.\n", count);
- if (skin_info) - { - hr = skin_info->lpVtbl->GetDeclaration(skin_info, declaration); - ok(hr == D3D_OK, "Got unexpected hr %#x.\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); + hr = skin_info->lpVtbl->GetDeclaration(skin_info, declaration); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + compare_elements(declaration, expected_declaration, __LINE__, 0);
- count = skin_info->lpVtbl->GetNumBones(skin_info); - ok(!count, "Got unexpected value %u.\n", count); + fvf = skin_info->lpVtbl->GetFVF(skin_info); + ok(fvf == D3DFVF_XYZ, "Got unexpected value %u.\n", fvf);
- influence = skin_info->lpVtbl->GetMinBoneInfluence(skin_info); - ok(!influence, "Got unexpected value %.8e.\n", influence); + count = skin_info->lpVtbl->GetNumBones(skin_info); + ok(!count, "Got unexpected value %u.\n", count);
- memset(max_influences, 0x55, sizeof(max_influences)); - hr = skin_info->lpVtbl->GetMaxVertexInfluences(skin_info, max_influences); - ok(hr == D3D_OK, "Got unexpected value %#x.\n", hr); - 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]); + influence = skin_info->lpVtbl->GetMinBoneInfluence(skin_info); + ok(!influence, "Got unexpected value %.8e.\n", influence);
- bone_name = skin_info->lpVtbl->GetBoneName(skin_info, 0); - ok(!bone_name, "Got unexpected value %p.\n", bone_name); + 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]);
- count = skin_info->lpVtbl->GetNumBoneInfluences(skin_info, 0); - ok(!count, "Got unexpected value %u.\n", count); + 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, 1); - ok(!count, "Got unexpected value %u.\n", count); + count = skin_info->lpVtbl->GetNumBoneInfluences(skin_info, 0); + ok(!count, "Got unexpected value %u.\n", count);
- matrix = skin_info->lpVtbl->GetBoneOffsetMatrix(skin_info, -1); - ok(!matrix, "Got unexpected value %p.\n", matrix); + count = skin_info->lpVtbl->GetNumBoneInfluences(skin_info, 1); + ok(!count, "Got unexpected value %u.\n", count);
- matrix = skin_info->lpVtbl->GetBoneOffsetMatrix(skin_info, 0); - ok(!matrix, "Got unexpected value %p.\n", matrix); + matrix = skin_info->lpVtbl->GetBoneOffsetMatrix(skin_info, -1); + ok(!matrix, "Got unexpected value %p.\n", matrix);
- skin_info->lpVtbl->Release(skin_info); - } + matrix = skin_info->lpVtbl->GetBoneOffsetMatrix(skin_info, 0); + ok(!matrix, "Got unexpected value %p.\n", matrix);
+ skin_info->lpVtbl->Release(skin_info); mesh->lpVtbl->Release(mesh); adjacency->lpVtbl->Release(adjacency); file_data->lpVtbl->Release(file_data);