Based on a patch by Michael Müller.
From: Vijay Kiran Kamuju infyquest@gmail.com Signed-off-by: Vijay Kiran Kamuju infyquest@gmail.com Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=33904 Signed-off-by: Vijay Kiran Kamuju infyquest@gmail.com --- dlls/d3dx9_36/mesh.c | 7 +++++++ dlls/d3dx9_36/tests/mesh.c | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c index acbb247767..6a0ba5564a 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) + { + hr = D3DXCreateSkinInfoFVF(mesh_data->num_vertices, mesh_data->fvf, mesh_data->nb_bones, &mesh_data->skin_info); + if (FAILED(hr)) + goto end; + } + hr = D3D_OK;
end: diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c index a33ed2cbab..e091fa040f 100644 --- a/dlls/d3dx9_36/tests/mesh.c +++ b/dlls/d3dx9_36/tests/mesh.c @@ -11319,7 +11319,7 @@ 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); @@ -11343,8 +11343,8 @@ static void test_load_skin_mesh_from_xof(void)
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]); + 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]);