https://git.reactos.org/?p=reactos.git;a=commitdiff;h=36d9e80add6c295ce05a36...
commit 36d9e80add6c295ce05a3655eb23b1efd1f3fff7 Author: Joachim Henze Joachim.Henze@reactos.org AuthorDate: Thu Oct 3 21:16:39 2019 +0200 Commit: Joachim Henze Joachim.Henze@reactos.org CommitDate: Thu Oct 3 21:16:39 2019 +0200
[D3DCOMPILER_43] Addendum to last commit CORE-14955 & CORE-15652
GCC Linux build had no issues with the last commit but MSVC x86 & x64 v18.0.31101.0 choked on it with error C4133: 'function' : incompatible types - from 'D3D_PRIMITIVE *' to 'DWORD *' and similar.
I could not retest with that exact version of MSVC, but the mentioned problems vanished for me when compiling locally with MSVC 16.0.40219.1 x86. Fingers crossed, that this makes the builders happy again! --- dll/directx/wine/d3dcompiler_43/reflection.c | 41 ++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+)
diff --git a/dll/directx/wine/d3dcompiler_43/reflection.c b/dll/directx/wine/d3dcompiler_43/reflection.c index 5a59c64f94d..e04c5c2dfb8 100644 --- a/dll/directx/wine/d3dcompiler_43/reflection.c +++ b/dll/directx/wine/d3dcompiler_43/reflection.c @@ -1107,10 +1107,18 @@ static HRESULT d3dcompiler_parse_stat(struct d3dcompiler_shader_reflection *r, c
skip_dword_unknown(&ptr, 1);
+#ifdef __REACTOS__ /* DWORD* cast added */ + read_dword(&ptr, (DWORD*)&r->input_primitive); +#else read_dword(&ptr, &r->input_primitive); +#endif TRACE("InputPrimitive: %x\n", r->input_primitive);
+#ifdef __REACTOS__ /* DWORD* cast added */ + read_dword(&ptr, (DWORD*)&r->gs_output_topology); +#else read_dword(&ptr, &r->gs_output_topology); +#endif TRACE("GSOutputTopology: %x\n", r->gs_output_topology);
read_dword(&ptr, &r->gs_max_output_vertex_count); @@ -1126,13 +1134,25 @@ static HRESULT d3dcompiler_parse_stat(struct d3dcompiler_shader_reflection *r, c read_dword(&ptr, &r->c_control_points); TRACE("cControlPoints: %u\n", r->c_control_points);
+#ifdef __REACTOS__ /* DWORD* cast added */ + read_dword(&ptr, (DWORD*)&r->hs_output_primitive); +#else read_dword(&ptr, &r->hs_output_primitive); +#endif TRACE("HSOutputPrimitive: %x\n", r->hs_output_primitive);
+#ifdef __REACTOS__ /* DWORD* cast added */ + read_dword(&ptr, (DWORD*)&r->hs_prtitioning); +#else read_dword(&ptr, &r->hs_prtitioning); +#endif TRACE("HSPartitioning: %x\n", r->hs_prtitioning);
+#ifdef __REACTOS__ /* DWORD* cast added */ + read_dword(&ptr, (DWORD*)&r->tessellator_domain); +#else read_dword(&ptr, &r->tessellator_domain); +#endif TRACE("TessellatorDomain: %x\n", r->tessellator_domain);
skip_dword_unknown(&ptr, 3); @@ -1438,13 +1458,25 @@ static HRESULT d3dcompiler_parse_rdef(struct d3dcompiler_shader_reflection *r, c desc->Name = string_data + (offset - string_data_offset); TRACE("Input bind Name: %s\n", debugstr_a(desc->Name));
+#ifdef __REACTOS__ /* DWORD* cast added */ + read_dword(&ptr, (DWORD*)&desc->Type); +#else read_dword(&ptr, &desc->Type); +#endif TRACE("Input bind Type: %#x\n", desc->Type);
+#ifdef __REACTOS__ /* DWORD* cast added */ + read_dword(&ptr, (DWORD*)&desc->ReturnType); +#else read_dword(&ptr, &desc->ReturnType); +#endif TRACE("Input bind ReturnType: %#x\n", desc->ReturnType);
+#ifdef __REACTOS__ /* DWORD* cast added */ + read_dword(&ptr, (DWORD*)&desc->Dimension); +#else read_dword(&ptr, &desc->Dimension); +#endif TRACE("Input bind Dimension: %#x\n", desc->Dimension);
read_dword(&ptr, &desc->NumSamples); @@ -1507,7 +1539,11 @@ static HRESULT d3dcompiler_parse_rdef(struct d3dcompiler_shader_reflection *r, c read_dword(&ptr, &cb->flags); TRACE("Cbuffer flags: %u\n", cb->flags);
+#ifdef __REACTOS__ /* DWORD* cast added */ + read_dword(&ptr, (DWORD*)&cb->type); +#else read_dword(&ptr, &cb->type); +#endif TRACE("Cbuffer type: %#x\n", cb->type); } } @@ -1603,8 +1639,13 @@ static HRESULT d3dcompiler_parse_signature(struct d3dcompiler_shader_signature * read_dword(&ptr, &name_offset); d[i].SemanticName = string_data + (name_offset - string_data_offset); read_dword(&ptr, &d[i].SemanticIndex); +#ifdef __REACTOS__ /* DWORD* casts added */ + read_dword(&ptr, (DWORD*)&d[i].SystemValueType); + read_dword(&ptr, (DWORD*)&d[i].ComponentType); +#else read_dword(&ptr, &d[i].SystemValueType); read_dword(&ptr, &d[i].ComponentType); +#endif read_dword(&ptr, &d[i].Register); read_dword(&ptr, &mask); d[i].ReadWriteMask = (mask >> 8) & 0xff;