From 2ec0d480e3104d6590846b436584715c1cabdf66 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sat, 15 Nov 2014 12:30:18 +0100 Subject: [PATCH] Added patch to avoid failing in d3dx9_mesh_OptimizeInplace because of unimplemented vertex reordering. --- debian/changelog | 1 + patches/Makefile | 13 ++++++++ ...-to-fail-if-we-don-t-support-vertice.patch | 33 +++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 patches/d3dx9_36-Optimize_Inplace/0001-d3dx9_36-No-need-to-fail-if-we-don-t-support-vertice.patch diff --git a/debian/changelog b/debian/changelog index 71613939..e1a9135c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -25,6 +25,7 @@ wine-compholio (1.7.31) UNRELEASED; urgency=low * Added patch to fix handling of invert_y in DrawTextExW. * Added patch to fix implementation of K32GetPerformanceInfo. * Added patch to close server fd if there is no space in thread inflight fd list. + * Added patch to avoid failing in d3dx9_mesh_OptimizeInplace because of unimplemented vertex reordering. * Removed patch for iphlpapi stub functions (accepted upstream). * Removed patches for FindFirstFileExW (accepted upstream). * Removed patches for TLB dependencies lookup in resources (accepted upstream). diff --git a/patches/Makefile b/patches/Makefile index 00a4791c..6ff16d84 100644 --- a/patches/Makefile +++ b/patches/Makefile @@ -31,6 +31,7 @@ PATCHLIST := \ d3dx9_36-DXTn.ok \ d3dx9_36-Filter_Warnings.ok \ d3dx9_36-GetShaderSemantics.ok \ + d3dx9_36-Optimize_Inplace.ok \ d3dx9_36-Texture_Align.ok \ d3dx9_36-UpdateSkinnedMesh.ok \ dbghelp-KdHelp.ok \ @@ -358,6 +359,18 @@ d3dx9_36-GetShaderSemantics.ok: echo '+ { "Christian Costa", "d3dx9_36: Implement D3DXGetShaderInputSemantics + tests.", 1 },'; \ ) > d3dx9_36-GetShaderSemantics.ok +# Patchset d3dx9_36-Optimize_Inplace +# | +# | Modified files: +# | * dlls/d3dx9_36/mesh.c +# | +.INTERMEDIATE: d3dx9_36-Optimize_Inplace.ok +d3dx9_36-Optimize_Inplace.ok: + $(call APPLY_FILE,d3dx9_36-Optimize_Inplace/0001-d3dx9_36-No-need-to-fail-if-we-don-t-support-vertice.patch) + @( \ + echo '+ { "Christian Costa", "d3dx9_36: No need to fail if we don'\''t support vertices reordering in D3DXMESHOPT_ATTRSORT.", 1 },'; \ + ) > d3dx9_36-Optimize_Inplace.ok + # Patchset d3dx9_36-Texture_Align # | # | Modified files: diff --git a/patches/d3dx9_36-Optimize_Inplace/0001-d3dx9_36-No-need-to-fail-if-we-don-t-support-vertice.patch b/patches/d3dx9_36-Optimize_Inplace/0001-d3dx9_36-No-need-to-fail-if-we-don-t-support-vertice.patch new file mode 100644 index 00000000..733cb0db --- /dev/null +++ b/patches/d3dx9_36-Optimize_Inplace/0001-d3dx9_36-No-need-to-fail-if-we-don-t-support-vertice.patch @@ -0,0 +1,33 @@ +From d037faddfa629e54b5ba13d57f2e4c185de2a555 Mon Sep 17 00:00:00 2001 +From: Christian Costa +Date: Tue, 4 Nov 2014 22:25:58 +0100 +Subject: 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). +--- + dlls/d3dx9_36/mesh.c | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c +index 6f268f2..b15e033 100644 +--- a/dlls/d3dx9_36/mesh.c ++++ b/dlls/d3dx9_36/mesh.c +@@ -1700,11 +1700,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; +-- +2.1.3 +