Philip Rebohle : d3dcompiler: Accept a stat chunk size of 28 for reflection.

Alexandre Julliard julliard at winehq.org
Fri May 17 16:10:14 CDT 2019


Module: wine
Branch: master
Commit: b1f9cd57be74c52ab0d56cbaf47065d8f560827c
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=b1f9cd57be74c52ab0d56cbaf47065d8f560827c

Author: Philip Rebohle <philip.rebohle at tu-dortmund.de>
Date:   Thu May 16 17:05:59 2019 +0200

d3dcompiler: Accept a stat chunk size of 28 for reflection.

Fixes "unhandled size" error for Crysis shaders.

Signed-off-by: Philip Rebohle <philip.rebohle at tu-dortmund.de>
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/d3dcompiler_43/reflection.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c
index 24190f6..7c67c92 100644
--- a/dlls/d3dcompiler_43/reflection.c
+++ b/dlls/d3dcompiler_43/reflection.c
@@ -1127,7 +1127,12 @@ static HRESULT d3dcompiler_parse_stat(struct d3dcompiler_shader_reflection *r, c
     read_dword(&ptr, &r->gs_max_output_vertex_count);
     TRACE("GSMaxOutputVertexCount: %u\n", r->gs_max_output_vertex_count);
 
-    skip_dword_unknown(&ptr, 3);
+    skip_dword_unknown(&ptr, 2);
+
+    /* old dx10 stat size */
+    if (size == 28) return S_OK;
+
+    skip_dword_unknown(&ptr, 1);
 
     /* dx10 stat size */
     if (size == 29) return S_OK;




More information about the wine-cvs mailing list