[PATCH] d3dcompiler: Accept a stat chunk size of 28 for reflection

Philip Rebohle philip.rebohle at tu-dortmund.de
Thu May 16 10:05:59 CDT 2019


Fixes "unhandled size" error for Crysis shaders.

Signed-off-by: Philip Rebohle <philip.rebohle at tu-dortmund.de>
---
 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 24190f6afe..7c67c92954 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;
-- 
2.21.0




More information about the wine-devel mailing list