From fe97269c92a2f8093a6d5138f46f64aa8bc4b207 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Mon, 17 Jul 2017 15:24:11 +0200 Subject: [PATCH] Added patch to implement semi-stub for D3DXOptimizeVertices. --- ...d-semi-stub-for-D3DXOptimizeVertices.patch | 371 ++++++++++++++++++ .../d3dx9_36-D3DXOptimizeVertices/definition | 1 + patches/patchinstall.sh | 21 + 3 files changed, 393 insertions(+) create mode 100644 patches/d3dx9_36-D3DXOptimizeVertices/0001-d3dx9_36-Add-semi-stub-for-D3DXOptimizeVertices.patch create mode 100644 patches/d3dx9_36-D3DXOptimizeVertices/definition diff --git a/patches/d3dx9_36-D3DXOptimizeVertices/0001-d3dx9_36-Add-semi-stub-for-D3DXOptimizeVertices.patch b/patches/d3dx9_36-D3DXOptimizeVertices/0001-d3dx9_36-Add-semi-stub-for-D3DXOptimizeVertices.patch new file mode 100644 index 00000000..89087c5e --- /dev/null +++ b/patches/d3dx9_36-D3DXOptimizeVertices/0001-d3dx9_36-Add-semi-stub-for-D3DXOptimizeVertices.patch @@ -0,0 +1,371 @@ +From aec6c09b537e7fe3bc9c3ad2d298798aa495aaa6 Mon Sep 17 00:00:00 2001 +From: Christian Costa +Date: Sun, 16 Jul 2017 18:13:31 +0200 +Subject: d3dx9_36: Add semi-stub for D3DXOptimizeVertices. + +--- + dlls/d3dx9_24/d3dx9_24.spec | 2 +- + dlls/d3dx9_25/d3dx9_25.spec | 2 +- + dlls/d3dx9_26/d3dx9_26.spec | 2 +- + dlls/d3dx9_27/d3dx9_27.spec | 2 +- + dlls/d3dx9_28/d3dx9_28.spec | 2 +- + dlls/d3dx9_29/d3dx9_29.spec | 2 +- + dlls/d3dx9_30/d3dx9_30.spec | 2 +- + dlls/d3dx9_31/d3dx9_31.spec | 2 +- + dlls/d3dx9_32/d3dx9_32.spec | 2 +- + dlls/d3dx9_33/d3dx9_33.spec | 2 +- + dlls/d3dx9_34/d3dx9_34.spec | 2 +- + dlls/d3dx9_35/d3dx9_35.spec | 2 +- + dlls/d3dx9_36/d3dx9_36.spec | 2 +- + dlls/d3dx9_36/mesh.c | 27 +++++++++++++++++++++++++++ + dlls/d3dx9_36/tests/mesh.c | 22 ++++++++++++++++++++++ + dlls/d3dx9_37/d3dx9_37.spec | 2 +- + dlls/d3dx9_38/d3dx9_38.spec | 2 +- + dlls/d3dx9_39/d3dx9_39.spec | 2 +- + dlls/d3dx9_40/d3dx9_40.spec | 2 +- + dlls/d3dx9_41/d3dx9_41.spec | 2 +- + dlls/d3dx9_42/d3dx9_42.spec | 2 +- + dlls/d3dx9_43/d3dx9_43.spec | 2 +- + 22 files changed, 69 insertions(+), 20 deletions(-) + +diff --git a/dlls/d3dx9_24/d3dx9_24.spec b/dlls/d3dx9_24/d3dx9_24.spec +index cf4218acccf..7b91655cff4 100644 +--- a/dlls/d3dx9_24/d3dx9_24.spec ++++ b/dlls/d3dx9_24/d3dx9_24.spec +@@ -226,7 +226,7 @@ + @ stdcall D3DXMatrixTranslation(ptr float float float) + @ stdcall D3DXMatrixTranspose(ptr ptr) + @ stdcall D3DXOptimizeFaces(ptr long long long ptr) +-@ stub D3DXOptimizeVertices(ptr long long long ptr) ++@ stdcall D3DXOptimizeVertices(ptr long long long ptr) + @ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr) + @ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr) + @ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr) +diff --git a/dlls/d3dx9_25/d3dx9_25.spec b/dlls/d3dx9_25/d3dx9_25.spec +index f2c0bb970c6..d3e2422b4de 100644 +--- a/dlls/d3dx9_25/d3dx9_25.spec ++++ b/dlls/d3dx9_25/d3dx9_25.spec +@@ -226,7 +226,7 @@ + @ stdcall D3DXMatrixTranslation(ptr float float float) + @ stdcall D3DXMatrixTranspose(ptr ptr) + @ stdcall D3DXOptimizeFaces(ptr long long long ptr) +-@ stub D3DXOptimizeVertices(ptr long long long ptr) ++@ stdcall D3DXOptimizeVertices(ptr long long long ptr) + @ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr) + @ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr) + @ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr) +diff --git a/dlls/d3dx9_26/d3dx9_26.spec b/dlls/d3dx9_26/d3dx9_26.spec +index f8fc25a2625..cc8ec706d81 100644 +--- a/dlls/d3dx9_26/d3dx9_26.spec ++++ b/dlls/d3dx9_26/d3dx9_26.spec +@@ -230,7 +230,7 @@ + @ stdcall D3DXMatrixTranslation(ptr float float float) + @ stdcall D3DXMatrixTranspose(ptr ptr) + @ stdcall D3DXOptimizeFaces(ptr long long long ptr) +-@ stub D3DXOptimizeVertices(ptr long long long ptr) ++@ stdcall D3DXOptimizeVertices(ptr long long long ptr) + @ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr) + @ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr) + @ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr) +diff --git a/dlls/d3dx9_27/d3dx9_27.spec b/dlls/d3dx9_27/d3dx9_27.spec +index f8fc25a2625..cc8ec706d81 100644 +--- a/dlls/d3dx9_27/d3dx9_27.spec ++++ b/dlls/d3dx9_27/d3dx9_27.spec +@@ -230,7 +230,7 @@ + @ stdcall D3DXMatrixTranslation(ptr float float float) + @ stdcall D3DXMatrixTranspose(ptr ptr) + @ stdcall D3DXOptimizeFaces(ptr long long long ptr) +-@ stub D3DXOptimizeVertices(ptr long long long ptr) ++@ stdcall D3DXOptimizeVertices(ptr long long long ptr) + @ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr) + @ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr) + @ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr) +diff --git a/dlls/d3dx9_28/d3dx9_28.spec b/dlls/d3dx9_28/d3dx9_28.spec +index 697f9349d56..4f018a48a6d 100644 +--- a/dlls/d3dx9_28/d3dx9_28.spec ++++ b/dlls/d3dx9_28/d3dx9_28.spec +@@ -230,7 +230,7 @@ + @ stdcall D3DXMatrixTranslation(ptr float float float) + @ stdcall D3DXMatrixTranspose(ptr ptr) + @ stdcall D3DXOptimizeFaces(ptr long long long ptr) +-@ stub D3DXOptimizeVertices(ptr long long long ptr) ++@ stdcall D3DXOptimizeVertices(ptr long long long ptr) + @ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr) + @ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr) + @ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr) +diff --git a/dlls/d3dx9_29/d3dx9_29.spec b/dlls/d3dx9_29/d3dx9_29.spec +index 697f9349d56..4f018a48a6d 100644 +--- a/dlls/d3dx9_29/d3dx9_29.spec ++++ b/dlls/d3dx9_29/d3dx9_29.spec +@@ -230,7 +230,7 @@ + @ stdcall D3DXMatrixTranslation(ptr float float float) + @ stdcall D3DXMatrixTranspose(ptr ptr) + @ stdcall D3DXOptimizeFaces(ptr long long long ptr) +-@ stub D3DXOptimizeVertices(ptr long long long ptr) ++@ stdcall D3DXOptimizeVertices(ptr long long long ptr) + @ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr) + @ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr) + @ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr) +diff --git a/dlls/d3dx9_30/d3dx9_30.spec b/dlls/d3dx9_30/d3dx9_30.spec +index cae13b0a787..2b2af51d028 100644 +--- a/dlls/d3dx9_30/d3dx9_30.spec ++++ b/dlls/d3dx9_30/d3dx9_30.spec +@@ -230,7 +230,7 @@ + @ stdcall D3DXMatrixTranslation(ptr float float float) + @ stdcall D3DXMatrixTranspose(ptr ptr) + @ stdcall D3DXOptimizeFaces(ptr long long long ptr) +-@ stub D3DXOptimizeVertices(ptr long long long ptr) ++@ stdcall D3DXOptimizeVertices(ptr long long long ptr) + @ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr) + @ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr) + @ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr) +diff --git a/dlls/d3dx9_31/d3dx9_31.spec b/dlls/d3dx9_31/d3dx9_31.spec +index 9560477f139..63c6eb3d321 100644 +--- a/dlls/d3dx9_31/d3dx9_31.spec ++++ b/dlls/d3dx9_31/d3dx9_31.spec +@@ -227,7 +227,7 @@ + @ stdcall D3DXMatrixTranslation(ptr float float float) + @ stdcall D3DXMatrixTranspose(ptr ptr) + @ stdcall D3DXOptimizeFaces(ptr long long long ptr) +-@ stub D3DXOptimizeVertices(ptr long long long ptr) ++@ stdcall D3DXOptimizeVertices(ptr long long long ptr) + @ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr) + @ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr) + @ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr) +diff --git a/dlls/d3dx9_32/d3dx9_32.spec b/dlls/d3dx9_32/d3dx9_32.spec +index c9e5619b680..2e16e627fd1 100644 +--- a/dlls/d3dx9_32/d3dx9_32.spec ++++ b/dlls/d3dx9_32/d3dx9_32.spec +@@ -227,7 +227,7 @@ + @ stdcall D3DXMatrixTranslation(ptr float float float) + @ stdcall D3DXMatrixTranspose(ptr ptr) + @ stdcall D3DXOptimizeFaces(ptr long long long ptr) +-@ stub D3DXOptimizeVertices(ptr long long long ptr) ++@ stdcall D3DXOptimizeVertices(ptr long long long ptr) + @ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr) + @ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr) + @ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr) +diff --git a/dlls/d3dx9_33/d3dx9_33.spec b/dlls/d3dx9_33/d3dx9_33.spec +index c9e5619b680..2e16e627fd1 100644 +--- a/dlls/d3dx9_33/d3dx9_33.spec ++++ b/dlls/d3dx9_33/d3dx9_33.spec +@@ -227,7 +227,7 @@ + @ stdcall D3DXMatrixTranslation(ptr float float float) + @ stdcall D3DXMatrixTranspose(ptr ptr) + @ stdcall D3DXOptimizeFaces(ptr long long long ptr) +-@ stub D3DXOptimizeVertices(ptr long long long ptr) ++@ stdcall D3DXOptimizeVertices(ptr long long long ptr) + @ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr) + @ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr) + @ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr) +diff --git a/dlls/d3dx9_34/d3dx9_34.spec b/dlls/d3dx9_34/d3dx9_34.spec +index c9e5619b680..2e16e627fd1 100644 +--- a/dlls/d3dx9_34/d3dx9_34.spec ++++ b/dlls/d3dx9_34/d3dx9_34.spec +@@ -227,7 +227,7 @@ + @ stdcall D3DXMatrixTranslation(ptr float float float) + @ stdcall D3DXMatrixTranspose(ptr ptr) + @ stdcall D3DXOptimizeFaces(ptr long long long ptr) +-@ stub D3DXOptimizeVertices(ptr long long long ptr) ++@ stdcall D3DXOptimizeVertices(ptr long long long ptr) + @ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr) + @ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr) + @ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr) +diff --git a/dlls/d3dx9_35/d3dx9_35.spec b/dlls/d3dx9_35/d3dx9_35.spec +index c9e5619b680..2e16e627fd1 100644 +--- a/dlls/d3dx9_35/d3dx9_35.spec ++++ b/dlls/d3dx9_35/d3dx9_35.spec +@@ -227,7 +227,7 @@ + @ stdcall D3DXMatrixTranslation(ptr float float float) + @ stdcall D3DXMatrixTranspose(ptr ptr) + @ stdcall D3DXOptimizeFaces(ptr long long long ptr) +-@ stub D3DXOptimizeVertices(ptr long long long ptr) ++@ stdcall D3DXOptimizeVertices(ptr long long long ptr) + @ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr) + @ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr) + @ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr) +diff --git a/dlls/d3dx9_36/d3dx9_36.spec b/dlls/d3dx9_36/d3dx9_36.spec +index 6bae090b179..94bde9fa2f2 100644 +--- a/dlls/d3dx9_36/d3dx9_36.spec ++++ b/dlls/d3dx9_36/d3dx9_36.spec +@@ -229,7 +229,7 @@ + @ stdcall D3DXMatrixTranslation(ptr float float float) + @ stdcall D3DXMatrixTranspose(ptr ptr) + @ stdcall D3DXOptimizeFaces(ptr long long long ptr) +-@ stub D3DXOptimizeVertices(ptr long long long ptr) ++@ stdcall D3DXOptimizeVertices(ptr long long long ptr) + @ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr) + @ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr) + @ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr) +diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c +index a206e06a976..30b812b6c35 100644 +--- a/dlls/d3dx9_36/mesh.c ++++ b/dlls/d3dx9_36/mesh.c +@@ -7193,6 +7193,33 @@ cleanup: + return hr; + } + ++ ++/************************************************************************* ++ * D3DXOptimizeVertices (D3DX9_36.@) ++ */ ++HRESULT WINAPI D3DXOptimizeVertices(const void *indices, UINT num_faces, ++ UINT num_vertices, BOOL indices_are_32bit, DWORD *vertex_remap) ++{ ++ UINT i; ++ ++ FIXME("indices %p, num_faces %u, num_vertices %u, indices_are_32bit %#x, vertex_remap %p semi-stub.\n", ++ indices, num_faces, num_vertices, indices_are_32bit, vertex_remap); ++ ++ if (!vertex_remap) ++ { ++ WARN("vertex remap pointer is NULL.\n"); ++ return D3DERR_INVALIDCALL; ++ } ++ ++ for (i = 0; i < num_vertices; i++) ++ { ++ vertex_remap[i] = i; ++ } ++ ++ return D3D_OK; ++} ++ ++ + /************************************************************************* + * D3DXOptimizeFaces (D3DX9_36.@) + * +diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c +index 2d9d89a231b..07c978265c8 100644 +--- a/dlls/d3dx9_36/tests/mesh.c ++++ b/dlls/d3dx9_36/tests/mesh.c +@@ -10611,6 +10611,27 @@ cleanup: + free_test_context(test_context); + } + ++static void test_optimize_vertices(void) ++{ ++ HRESULT hr; ++ DWORD vertex_remap[3]; ++ const DWORD indices[] = {0, 1, 2}; ++ const UINT num_faces = 1; ++ const UINT num_vertices = 3; ++ ++ hr = D3DXOptimizeVertices(indices, num_faces, ++ num_vertices, FALSE, ++ vertex_remap); ++ ok(hr == D3D_OK, "D3DXOptimizeVertices failed. Got %x, expected D3D_OK.\n", hr); ++ ++ /* vertex_remap must not be NULL */ ++ hr = D3DXOptimizeVertices(indices, num_faces, ++ num_vertices, FALSE, ++ NULL); ++ ok(hr == D3DERR_INVALIDCALL, "D3DXOptimizeVertices passed NULL vertex_remap " ++ "pointer. Got %x, expected D3DERR_INVALIDCALL.\n", hr); ++} ++ + static void test_optimize_faces(void) + { + HRESULT hr; +@@ -11426,6 +11447,7 @@ START_TEST(mesh) + test_weld_vertices(); + test_clone_mesh(); + test_valid_mesh(); ++ test_optimize_vertices(); + test_optimize_faces(); + test_compute_normals(); + } +diff --git a/dlls/d3dx9_37/d3dx9_37.spec b/dlls/d3dx9_37/d3dx9_37.spec +index 6bae090b179..94bde9fa2f2 100644 +--- a/dlls/d3dx9_37/d3dx9_37.spec ++++ b/dlls/d3dx9_37/d3dx9_37.spec +@@ -229,7 +229,7 @@ + @ stdcall D3DXMatrixTranslation(ptr float float float) + @ stdcall D3DXMatrixTranspose(ptr ptr) + @ stdcall D3DXOptimizeFaces(ptr long long long ptr) +-@ stub D3DXOptimizeVertices(ptr long long long ptr) ++@ stdcall D3DXOptimizeVertices(ptr long long long ptr) + @ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr) + @ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr) + @ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr) +diff --git a/dlls/d3dx9_38/d3dx9_38.spec b/dlls/d3dx9_38/d3dx9_38.spec +index 6bae090b179..94bde9fa2f2 100644 +--- a/dlls/d3dx9_38/d3dx9_38.spec ++++ b/dlls/d3dx9_38/d3dx9_38.spec +@@ -229,7 +229,7 @@ + @ stdcall D3DXMatrixTranslation(ptr float float float) + @ stdcall D3DXMatrixTranspose(ptr ptr) + @ stdcall D3DXOptimizeFaces(ptr long long long ptr) +-@ stub D3DXOptimizeVertices(ptr long long long ptr) ++@ stdcall D3DXOptimizeVertices(ptr long long long ptr) + @ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr) + @ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr) + @ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr) +diff --git a/dlls/d3dx9_39/d3dx9_39.spec b/dlls/d3dx9_39/d3dx9_39.spec +index 6bae090b179..94bde9fa2f2 100644 +--- a/dlls/d3dx9_39/d3dx9_39.spec ++++ b/dlls/d3dx9_39/d3dx9_39.spec +@@ -229,7 +229,7 @@ + @ stdcall D3DXMatrixTranslation(ptr float float float) + @ stdcall D3DXMatrixTranspose(ptr ptr) + @ stdcall D3DXOptimizeFaces(ptr long long long ptr) +-@ stub D3DXOptimizeVertices(ptr long long long ptr) ++@ stdcall D3DXOptimizeVertices(ptr long long long ptr) + @ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr) + @ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr) + @ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr) +diff --git a/dlls/d3dx9_40/d3dx9_40.spec b/dlls/d3dx9_40/d3dx9_40.spec +index 6bae090b179..94bde9fa2f2 100644 +--- a/dlls/d3dx9_40/d3dx9_40.spec ++++ b/dlls/d3dx9_40/d3dx9_40.spec +@@ -229,7 +229,7 @@ + @ stdcall D3DXMatrixTranslation(ptr float float float) + @ stdcall D3DXMatrixTranspose(ptr ptr) + @ stdcall D3DXOptimizeFaces(ptr long long long ptr) +-@ stub D3DXOptimizeVertices(ptr long long long ptr) ++@ stdcall D3DXOptimizeVertices(ptr long long long ptr) + @ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr) + @ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr) + @ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr) +diff --git a/dlls/d3dx9_41/d3dx9_41.spec b/dlls/d3dx9_41/d3dx9_41.spec +index 6bae090b179..94bde9fa2f2 100644 +--- a/dlls/d3dx9_41/d3dx9_41.spec ++++ b/dlls/d3dx9_41/d3dx9_41.spec +@@ -229,7 +229,7 @@ + @ stdcall D3DXMatrixTranslation(ptr float float float) + @ stdcall D3DXMatrixTranspose(ptr ptr) + @ stdcall D3DXOptimizeFaces(ptr long long long ptr) +-@ stub D3DXOptimizeVertices(ptr long long long ptr) ++@ stdcall D3DXOptimizeVertices(ptr long long long ptr) + @ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr) + @ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr) + @ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr) +diff --git a/dlls/d3dx9_42/d3dx9_42.spec b/dlls/d3dx9_42/d3dx9_42.spec +index 82a6d6498a5..19306d0573d 100644 +--- a/dlls/d3dx9_42/d3dx9_42.spec ++++ b/dlls/d3dx9_42/d3dx9_42.spec +@@ -222,7 +222,7 @@ + @ stdcall D3DXMatrixTranslation(ptr float float float) + @ stdcall D3DXMatrixTranspose(ptr ptr) + @ stdcall D3DXOptimizeFaces(ptr long long long ptr) +-@ stub D3DXOptimizeVertices(ptr long long long ptr) ++@ stdcall D3DXOptimizeVertices(ptr long long long ptr) + @ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr) + @ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr) + @ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr) +diff --git a/dlls/d3dx9_43/d3dx9_43.spec b/dlls/d3dx9_43/d3dx9_43.spec +index 82a6d6498a5..19306d0573d 100644 +--- a/dlls/d3dx9_43/d3dx9_43.spec ++++ b/dlls/d3dx9_43/d3dx9_43.spec +@@ -222,7 +222,7 @@ + @ stdcall D3DXMatrixTranslation(ptr float float float) + @ stdcall D3DXMatrixTranspose(ptr ptr) + @ stdcall D3DXOptimizeFaces(ptr long long long ptr) +-@ stub D3DXOptimizeVertices(ptr long long long ptr) ++@ stdcall D3DXOptimizeVertices(ptr long long long ptr) + @ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr) + @ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr) + @ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr) +-- +2.13.1 + diff --git a/patches/d3dx9_36-D3DXOptimizeVertices/definition b/patches/d3dx9_36-D3DXOptimizeVertices/definition new file mode 100644 index 00000000..d241900e --- /dev/null +++ b/patches/d3dx9_36-D3DXOptimizeVertices/definition @@ -0,0 +1 @@ +Fixes: Implement semi-stub for D3DXOptimizeVertices diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 73282387..69355864 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -126,6 +126,7 @@ patch_enable_all () enable_d3dx9_36_CloneEffect="$1" enable_d3dx9_36_D3DXCreateTeapot="$1" enable_d3dx9_36_D3DXDisassembleShader="$1" + enable_d3dx9_36_D3DXOptimizeVertices="$1" enable_d3dx9_36_D3DXStubs="$1" enable_d3dx9_36_DDS="$1" enable_d3dx9_36_DXTn="$1" @@ -634,6 +635,9 @@ patch_enable () d3dx9_36-D3DXDisassembleShader) enable_d3dx9_36_D3DXDisassembleShader="$2" ;; + d3dx9_36-D3DXOptimizeVertices) + enable_d3dx9_36_D3DXOptimizeVertices="$2" + ;; d3dx9_36-D3DXStubs) enable_d3dx9_36_D3DXStubs="$2" ;; @@ -3811,6 +3815,23 @@ if test "$enable_d3dx9_36_D3DXDisassembleShader" -eq 1; then ) >> "$patchlist" fi +# Patchset d3dx9_36-D3DXOptimizeVertices +# | +# | Modified files: +# | * dlls/d3dx9_24/d3dx9_24.spec, dlls/d3dx9_25/d3dx9_25.spec, dlls/d3dx9_26/d3dx9_26.spec, dlls/d3dx9_27/d3dx9_27.spec, +# | dlls/d3dx9_28/d3dx9_28.spec, dlls/d3dx9_29/d3dx9_29.spec, dlls/d3dx9_30/d3dx9_30.spec, dlls/d3dx9_31/d3dx9_31.spec, +# | dlls/d3dx9_32/d3dx9_32.spec, dlls/d3dx9_33/d3dx9_33.spec, dlls/d3dx9_34/d3dx9_34.spec, dlls/d3dx9_35/d3dx9_35.spec, +# | dlls/d3dx9_36/d3dx9_36.spec, dlls/d3dx9_36/mesh.c, dlls/d3dx9_36/tests/mesh.c, dlls/d3dx9_37/d3dx9_37.spec, +# | dlls/d3dx9_38/d3dx9_38.spec, dlls/d3dx9_39/d3dx9_39.spec, dlls/d3dx9_40/d3dx9_40.spec, dlls/d3dx9_41/d3dx9_41.spec, +# | dlls/d3dx9_42/d3dx9_42.spec, dlls/d3dx9_43/d3dx9_43.spec +# | +if test "$enable_d3dx9_36_D3DXOptimizeVertices" -eq 1; then + patch_apply d3dx9_36-D3DXOptimizeVertices/0001-d3dx9_36-Add-semi-stub-for-D3DXOptimizeVertices.patch + ( + printf '%s\n' '+ { "Christian Costa", "d3dx9_36: Add semi-stub for D3DXOptimizeVertices.", 1 },'; + ) >> "$patchlist" +fi + # Patchset d3dx9_36-D3DXStubs # | # | This patchset fixes the following Wine bugs: