[0.4.11][D3DCOMPILER_43] Fix 11 MSVC2010SP1 x86 dbg warnings C4133 CORE-18104

can be observed with MSVC 2010SP1 (16.0.40219.1) x86 target in dbg configuation:
C:\047rls\reactos\dll\directx\wine\d3dcompiler_43\reflection.c(1107) : warning C4133: 'function' : incompatible types - from 'D3D_PRIMITIVE *' to 'DWORD *'
C:\047rls\reactos\dll\directx\wine\d3dcompiler_43\reflection.c(1110) : warning C4133: 'function' : incompatible types - from 'D3D_PRIMITIVE_TOPOLOGY *' to 'DWORD *'
C:\047rls\reactos\dll\directx\wine\d3dcompiler_43\reflection.c(1126) : warning C4133: 'function' : incompatible types - from 'D3D_TESSELLATOR_OUTPUT_PRIMITIVE *' to 'DWORD *'
C:\047rls\reactos\dll\directx\wine\d3dcompiler_43\reflection.c(1129) : warning C4133: 'function' : incompatible types - from 'D3D_TESSELLATOR_PARTITIONING *' to 'DWORD *'
C:\047rls\reactos\dll\directx\wine\d3dcompiler_43\reflection.c(1132) : warning C4133: 'function' : incompatible types - from 'D3D_TESSELLATOR_DOMAIN *' to 'DWORD *'
C:\047rls\reactos\dll\directx\wine\d3dcompiler_43\reflection.c(1438) : warning C4133: 'function' : incompatible types - from 'D3D_SHADER_INPUT_TYPE *' to 'DWORD *'
C:\047rls\reactos\dll\directx\wine\d3dcompiler_43\reflection.c(1441) : warning C4133: 'function' : incompatible types - from 'D3D_RESOURCE_RETURN_TYPE *' to 'DWORD *'
C:\047rls\reactos\dll\directx\wine\d3dcompiler_43\reflection.c(1444) : warning C4133: 'function' : incompatible types - from 'D3D_SRV_DIMENSION *' to 'DWORD *'
C:\047rls\reactos\dll\directx\wine\d3dcompiler_43\reflection.c(1507) : warning C4133: 'function' : incompatible types - from 'D3D_CBUFFER_TYPE *' to 'DWORD *'
C:\047rls\reactos\dll\directx\wine\d3dcompiler_43\reflection.c(1603) : warning C4133: 'function' : incompatible types - from 'D3D_NAME *' to 'DWORD *'
C:\047rls\reactos\dll\directx\wine\d3dcompiler_43\reflection.c(1604) : warning C4133: 'function' : incompatible types - from 'D3D_REGISTER_COMPONENT_TYPE *' to 'DWORD *'

picked from 0.4.14-dev-8-g 36d9e80add

( for the record: 0.4.13 got this years ago already via 0.4.13-RC-4-g d27a20233d )
This commit is contained in:
Joachim Henze 2022-03-29 01:52:45 +02:00
parent 445753f1ca
commit 0c13246030

View file

@ -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;