From b1f9cd57be74c52ab0d56cbaf47065d8f560827c Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Thu, 16 May 2019 17:05:59 +0200 Subject: [PATCH] d3dcompiler: Accept a stat chunk size of 28 for reflection. Fixes "unhandled size" error for Crysis shaders. Signed-off-by: Philip Rebohle Signed-off-by: Matteo Bruni Signed-off-by: Alexandre Julliard --- 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 24190f6afef..7c67c929547 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;