https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b7a4b73b6532f41b7ec022d957e521784b799d6f

commit b7a4b73b6532f41b7ec022d957e521784b799d6f
Author:     winesync <[email protected]>
AuthorDate: Wed Feb 5 22:13:58 2020 +0100
Commit:     Jérôme Gardou <[email protected]>
CommitDate: Wed Feb 26 18:19:18 2020 +0100

    [WINESYNC] d3dx9_36: No need to fail if we don't support vertices 
reordering in D3DXMESHOPT_ATTRSORT
    
    A non optimized mesh does not prevent rendering as long as we return valid 
data to the application.
    In our case we provided an identity remapping array when no vertices 
reordering is done.
    
    Avencast demo works perfectly well (using native effects functions).
    
    wine-staging patch by Christian Costa <[email protected]>
---
 dll/directx/wine/d3dx9_36/mesh.c                         |  4 ----
 ...port_vertices_reordering_in_D3DXMESHOPT_ATTRSORT.diff | 16 ++++++++++++++++
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/dll/directx/wine/d3dx9_36/mesh.c b/dll/directx/wine/d3dx9_36/mesh.c
index 898a88c1131..b1d9f68ade1 100644
--- a/dll/directx/wine/d3dx9_36/mesh.c
+++ b/dll/directx/wine/d3dx9_36/mesh.c
@@ -1695,11 +1695,7 @@ static HRESULT WINAPI 
d3dx9_mesh_OptimizeInplace(ID3DXMesh *iface, DWORD flags,
         if (FAILED(hr)) goto cleanup;
     } else if (flags & D3DXMESHOPT_ATTRSORT) {
         if (!(flags & D3DXMESHOPT_IGNOREVERTS))
-        {
             FIXME("D3DXMESHOPT_ATTRSORT vertex reordering not implemented.\n");
-            hr = E_NOTIMPL;
-            goto cleanup;
-        }
 
         hr = iface->lpVtbl->LockAttributeBuffer(iface, 0, &attrib_buffer);
         if (FAILED(hr)) goto cleanup;
diff --git 
a/sdk/tools/winesync/d3dx9_staging/0022-d3dx9_36__No_need_to_fail_if_we_don_t_support_vertices_reordering_in_D3DXMESHOPT_ATTRSORT.diff
 
b/sdk/tools/winesync/d3dx9_staging/0022-d3dx9_36__No_need_to_fail_if_we_don_t_support_vertices_reordering_in_D3DXMESHOPT_ATTRSORT.diff
new file mode 100644
index 00000000000..ce6243813ef
--- /dev/null
+++ 
b/sdk/tools/winesync/d3dx9_staging/0022-d3dx9_36__No_need_to_fail_if_we_don_t_support_vertices_reordering_in_D3DXMESHOPT_ATTRSORT.diff
@@ -0,0 +1,16 @@
+diff --git a/dll/directx/wine/d3dx9_36/mesh.c 
b/dll/directx/wine/d3dx9_36/mesh.c
+index 898a88c..b1d9f68 100644
+--- a/dll/directx/wine/d3dx9_36/mesh.c
++++ b/dll/directx/wine/d3dx9_36/mesh.c
+@@ -1695,11 +1695,7 @@ static HRESULT WINAPI 
d3dx9_mesh_OptimizeInplace(ID3DXMesh *iface, DWORD flags, 
+         if (FAILED(hr)) goto cleanup;
+     } else if (flags & D3DXMESHOPT_ATTRSORT) {
+         if (!(flags & D3DXMESHOPT_IGNOREVERTS))
+-        {
+             FIXME("D3DXMESHOPT_ATTRSORT vertex reordering not 
implemented.\n");
+-            hr = E_NOTIMPL;
+-            goto cleanup;
+-        }
+ 
+         hr = iface->lpVtbl->LockAttributeBuffer(iface, 0, &attrib_buffer);
+         if (FAILED(hr)) goto cleanup;

Reply via email to