Skip to content

Commit 36d9e80

Browse files
committed
[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!
1 parent 81cffd7 commit 36d9e80

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

dll/directx/wine/d3dcompiler_43/reflection.c

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,10 +1107,18 @@ static HRESULT d3dcompiler_parse_stat(struct d3dcompiler_shader_reflection *r, c
11071107

11081108
skip_dword_unknown(&ptr, 1);
11091109

1110+
#ifdef __REACTOS__ /* DWORD* cast added */
1111+
read_dword(&ptr, (DWORD*)&r->input_primitive);
1112+
#else
11101113
read_dword(&ptr, &r->input_primitive);
1114+
#endif
11111115
TRACE("InputPrimitive: %x\n", r->input_primitive);
11121116

1117+
#ifdef __REACTOS__ /* DWORD* cast added */
1118+
read_dword(&ptr, (DWORD*)&r->gs_output_topology);
1119+
#else
11131120
read_dword(&ptr, &r->gs_output_topology);
1121+
#endif
11141122
TRACE("GSOutputTopology: %x\n", r->gs_output_topology);
11151123

11161124
read_dword(&ptr, &r->gs_max_output_vertex_count);
@@ -1126,13 +1134,25 @@ static HRESULT d3dcompiler_parse_stat(struct d3dcompiler_shader_reflection *r, c
11261134
read_dword(&ptr, &r->c_control_points);
11271135
TRACE("cControlPoints: %u\n", r->c_control_points);
11281136

1137+
#ifdef __REACTOS__ /* DWORD* cast added */
1138+
read_dword(&ptr, (DWORD*)&r->hs_output_primitive);
1139+
#else
11291140
read_dword(&ptr, &r->hs_output_primitive);
1141+
#endif
11301142
TRACE("HSOutputPrimitive: %x\n", r->hs_output_primitive);
11311143

1144+
#ifdef __REACTOS__ /* DWORD* cast added */
1145+
read_dword(&ptr, (DWORD*)&r->hs_prtitioning);
1146+
#else
11321147
read_dword(&ptr, &r->hs_prtitioning);
1148+
#endif
11331149
TRACE("HSPartitioning: %x\n", r->hs_prtitioning);
11341150

1151+
#ifdef __REACTOS__ /* DWORD* cast added */
1152+
read_dword(&ptr, (DWORD*)&r->tessellator_domain);
1153+
#else
11351154
read_dword(&ptr, &r->tessellator_domain);
1155+
#endif
11361156
TRACE("TessellatorDomain: %x\n", r->tessellator_domain);
11371157

11381158
skip_dword_unknown(&ptr, 3);
@@ -1438,13 +1458,25 @@ static HRESULT d3dcompiler_parse_rdef(struct d3dcompiler_shader_reflection *r, c
14381458
desc->Name = string_data + (offset - string_data_offset);
14391459
TRACE("Input bind Name: %s\n", debugstr_a(desc->Name));
14401460

1461+
#ifdef __REACTOS__ /* DWORD* cast added */
1462+
read_dword(&ptr, (DWORD*)&desc->Type);
1463+
#else
14411464
read_dword(&ptr, &desc->Type);
1465+
#endif
14421466
TRACE("Input bind Type: %#x\n", desc->Type);
14431467

1468+
#ifdef __REACTOS__ /* DWORD* cast added */
1469+
read_dword(&ptr, (DWORD*)&desc->ReturnType);
1470+
#else
14441471
read_dword(&ptr, &desc->ReturnType);
1472+
#endif
14451473
TRACE("Input bind ReturnType: %#x\n", desc->ReturnType);
14461474

1475+
#ifdef __REACTOS__ /* DWORD* cast added */
1476+
read_dword(&ptr, (DWORD*)&desc->Dimension);
1477+
#else
14471478
read_dword(&ptr, &desc->Dimension);
1479+
#endif
14481480
TRACE("Input bind Dimension: %#x\n", desc->Dimension);
14491481

14501482
read_dword(&ptr, &desc->NumSamples);
@@ -1507,7 +1539,11 @@ static HRESULT d3dcompiler_parse_rdef(struct d3dcompiler_shader_reflection *r, c
15071539
read_dword(&ptr, &cb->flags);
15081540
TRACE("Cbuffer flags: %u\n", cb->flags);
15091541

1542+
#ifdef __REACTOS__ /* DWORD* cast added */
1543+
read_dword(&ptr, (DWORD*)&cb->type);
1544+
#else
15101545
read_dword(&ptr, &cb->type);
1546+
#endif
15111547
TRACE("Cbuffer type: %#x\n", cb->type);
15121548
}
15131549
}
@@ -1603,8 +1639,13 @@ static HRESULT d3dcompiler_parse_signature(struct d3dcompiler_shader_signature *
16031639
read_dword(&ptr, &name_offset);
16041640
d[i].SemanticName = string_data + (name_offset - string_data_offset);
16051641
read_dword(&ptr, &d[i].SemanticIndex);
1642+
#ifdef __REACTOS__ /* DWORD* casts added */
1643+
read_dword(&ptr, (DWORD*)&d[i].SystemValueType);
1644+
read_dword(&ptr, (DWORD*)&d[i].ComponentType);
1645+
#else
16061646
read_dword(&ptr, &d[i].SystemValueType);
16071647
read_dword(&ptr, &d[i].ComponentType);
1648+
#endif
16081649
read_dword(&ptr, &d[i].Register);
16091650
read_dword(&ptr, &mask);
16101651
d[i].ReadWriteMask = (mask >> 8) & 0xff;

0 commit comments

Comments
 (0)