From 823a7a97311a3211e60a39b7b8a1f9ea34b5d7ab Mon Sep 17 00:00:00 2001
From: Christian Costa <titan.costa@gmail.com>
Date: Sun, 16 Jul 2017 18:13:31 +0200
Subject: [PATCH 1/2] d3dx9_36: Add semi-stub for D3DXOptimizeVertices.

Added more checks and tests

From : Christian Costa <titan.costa@gmail.com>
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
---
 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        | 29 ++++++++++++++++++++++++
 dlls/d3dx9_36/tests/mesh.c  | 44 +++++++++++++++++++++++++++++++++++++
 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, 93 insertions(+), 20 deletions(-)

diff --git a/dlls/d3dx9_24/d3dx9_24.spec b/dlls/d3dx9_24/d3dx9_24.spec
index fe8140d1b4..a6eef88801 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 cb40277ea0..eac8da07be 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 bfad690a15..87ecda2d5a 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 bfad690a15..87ecda2d5a 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 6022854101..c4ac4e3ab9 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 6022854101..c4ac4e3ab9 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 06ced20df6..72418ac59a 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 c9aca309a3..12db9be10f 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 f541f6f2ef..4e85b4ca2f 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 f541f6f2ef..4e85b4ca2f 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 f541f6f2ef..4e85b4ca2f 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 f541f6f2ef..4e85b4ca2f 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 e1f4426161..b07809e646 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 5e0bb98efc..35eb933223 100644
--- a/dlls/d3dx9_36/mesh.c
+++ b/dlls/d3dx9_36/mesh.c
@@ -7187,6 +7187,35 @@ 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;
+    HRESULT hr = D3D_OK;
+
+    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 (!indices || !num_faces || !num_vertices || !vertex_remap)
+    {
+        hr = D3DERR_INVALIDCALL;
+        goto error;
+    }
+
+    for (i = 0; i < num_vertices; i++)
+    {
+        vertex_remap[i] = i;
+    }
+
+error:
+    return hr;
+}
+
+
 /*************************************************************************
  * D3DXOptimizeFaces    (D3DX9_36.@)
  *
diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c
index ae7c5f2010..50f9dc754f 100644
--- a/dlls/d3dx9_36/tests/mesh.c
+++ b/dlls/d3dx9_36/tests/mesh.c
@@ -10334,6 +10334,49 @@ cleanup:
     free_test_context(test_context);
 }
 
+static void test_optimize_vertices(void)
+{
+    HRESULT hr;
+    DWORD vertex_remap[3];
+    DWORD smallest_vertex_remap;
+    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);
+
+    /* indices must not be NULL */
+    hr = D3DXOptimizeVertices(NULL, num_faces,
+                              num_vertices, FALSE,
+                              vertex_remap);
+    ok(hr == D3DERR_INVALIDCALL, "D3DXOptimizeVertices passed NULL indices "
+            "pointer. Got %x, expected D3DERR_INVALIDCALL.\n", hr);
+
+    /* num_faces must not be NULL */
+    hr = D3DXOptimizeVertices(indices, NULL,
+                              num_vertices, FALSE,
+                              vertex_remap);
+    ok(hr == D3DERR_INVALIDCALL, "D3DXOptimizeVertices passed NULL num_faces."
+            " Got %x, expected D3DERR_INVALIDCALL.\n", hr);
+
+    /* num_vertices must not be NULL */
+    hr = D3DXOptimizeVertices(indices, num_faces,
+                              NULL, FALSE,
+                              vertex_remap);
+    ok(hr == D3DERR_INVALIDCALL, "D3DXOptimizeVertices passed NULL num_vertices."
+            " Got %x, expected D3DERR_INVALIDCALL.\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;
@@ -11425,6 +11468,7 @@ START_TEST(mesh)
     test_weld_vertices();
     test_clone_mesh();
     test_valid_mesh();
+    test_optimize_vertices();
     test_optimize_faces();
     test_compute_normals();
     test_D3DXFrameFind();
diff --git a/dlls/d3dx9_37/d3dx9_37.spec b/dlls/d3dx9_37/d3dx9_37.spec
index e1f4426161..b07809e646 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 e1f4426161..b07809e646 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 e1f4426161..b07809e646 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 e1f4426161..b07809e646 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 e1f4426161..b07809e646 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 0851945d36..288ab27dd5 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 0851945d36..288ab27dd5 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.26.1

