[PATCH 0/1] MR11239: include: include d3d10shader.idl from d3d10effect.idl
In file included from include/d3d10.h:5783, from include/d3d10shader.h:55, from ../wine/libs/vkd3d/libs/vkd3d-common/blob.c:28: include/d3d10effect.h:339:5: error: unknown type name ‘D3D10_SHADER_VARIABLE_CLASS’; did you mean ‘D3D_SHADER_VARIABLE_CLASS’? 339 | D3D10_SHADER_VARIABLE_CLASS Class; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ | D3D_SHADER_VARIABLE_CLASS include/d3d10effect.h:340:5: error: unknown type name ‘D3D10_SHADER_VARIABLE_TYPE’; did you mean ‘D3D_SHADER_VARIABLE_TYPE’? 340 | D3D10_SHADER_VARIABLE_TYPE Type; | ^~~~~~~~~~~~~~~~~~~~~~~~~~ | D3D_SHADER_VARIABLE_TYPE include/d3d10effect.h:3506:9: error: unknown type name ‘D3D10_SIGNATURE_PARAMETER_DESC’ 3506 | D3D10_SIGNATURE_PARAMETER_DESC *desc); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/d3d10effect.h:3512:9: error: unknown type name ‘D3D10_SIGNATURE_PARAMETER_DESC’ 3512 | D3D10_SIGNATURE_PARAMETER_DESC *desc); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/d3d10effect.h:3515:1: warning: no semicolon at end of struct or union 3515 | } ID3D10EffectShaderVariableVtbl; -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11239
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com> In file included from include/d3d10.h:5783, from include/d3d10shader.h:55, from ../wine/libs/vkd3d/libs/vkd3d-common/blob.c:28: include/d3d10effect.h:339:5: error: unknown type name ‘D3D10_SHADER_VARIABLE_CLASS’; did you mean ‘D3D_SHADER_VARIABLE_CLASS’? 339 | D3D10_SHADER_VARIABLE_CLASS Class; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ | D3D_SHADER_VARIABLE_CLASS include/d3d10effect.h:340:5: error: unknown type name ‘D3D10_SHADER_VARIABLE_TYPE’; did you mean ‘D3D_SHADER_VARIABLE_TYPE’? 340 | D3D10_SHADER_VARIABLE_TYPE Type; | ^~~~~~~~~~~~~~~~~~~~~~~~~~ | D3D_SHADER_VARIABLE_TYPE include/d3d10effect.h:3506:9: error: unknown type name ‘D3D10_SIGNATURE_PARAMETER_DESC’ 3506 | D3D10_SIGNATURE_PARAMETER_DESC *desc); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/d3d10effect.h:3512:9: error: unknown type name ‘D3D10_SIGNATURE_PARAMETER_DESC’ 3512 | D3D10_SIGNATURE_PARAMETER_DESC *desc); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/d3d10effect.h:3515:1: warning: no semicolon at end of struct or union 3515 | } ID3D10EffectShaderVariableVtbl; --- include/d3d10shader.idl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/include/d3d10shader.idl b/include/d3d10shader.idl index 91f453d5776..4af4b5738eb 100644 --- a/include/d3d10shader.idl +++ b/include/d3d10shader.idl @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -import "d3d10.idl"; +import "d3dcommon.idl"; const unsigned int D3D10_SHADER_DEBUG = 0x00001; const unsigned int D3D10_SHADER_SKIP_VALIDATION = 0x00002; @@ -73,7 +73,7 @@ typedef struct _D3D10_SHADER_INPUT_BIND_DESC UINT BindCount; UINT uFlags; D3D10_RESOURCE_RETURN_TYPE ReturnType; - D3D10_SRV_DIMENSION Dimension; + D3D_SRV_DIMENSION Dimension; UINT NumSamples; } D3D10_SHADER_INPUT_BIND_DESC; @@ -116,7 +116,7 @@ typedef struct _D3D10_SHADER_DESC UINT ArrayInstructionCount; UINT CutInstructionCount; UINT EmitInstructionCount; - D3D10_PRIMITIVE_TOPOLOGY GSOutputTopology; + D3D_PRIMITIVE_TOPOLOGY GSOutputTopology; UINT GSMaxOutputVertexCount; } D3D10_SHADER_DESC; @@ -200,6 +200,7 @@ interface ID3D10ShaderReflection : IUnknown HRESULT GetOutputParameterDesc(UINT index, D3D10_SIGNATURE_PARAMETER_DESC *desc); }; +interface ID3D10Device; HRESULT __stdcall D3D10CompileShader(const char *data, SIZE_T data_size, const char *filename, const D3D10_SHADER_MACRO *defines, ID3D10Include *include, const char *entrypoint, @@ -215,3 +216,5 @@ HRESULT __stdcall D3D10GetInputSignatureBlob(const void *data, SIZE_T data_size, HRESULT __stdcall D3D10GetOutputSignatureBlob(const void *data, SIZE_T data_size, ID3D10Blob **blob); HRESULT __stdcall D3D10GetInputAndOutputSignatureBlob(const void *data, SIZE_T data_size, ID3D10Blob **blob); HRESULT __stdcall D3D10GetShaderDebugInfo(const void *data, SIZE_T data_size, ID3D10Blob **blob); + +cpp_quote("#include \"d3d10.h\"") -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/11239
The subject line here is perhaps a little misleading; this includes d3d10.h at the end of d3d10shader.h, so that d3d10effect.h (which is included by d3d10.h) has access to the D3D10_SHADER_VARIABLE_CLASS/D3D10_SHADER_VARIABLE_TYPE/D3D10_SIGNATURE_PARAMETER_DESC definitions. d3d10shader.idl itself doesn't really need to include d3d10.h; the two enums it uses are aliases for the corresponding enums from d3dcommon.idl. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11239#note_143985
That doesn't seem to match what Windows does. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11239#note_144016
That doesn't seem to match what Windows does.
Yeah. I didn't explicitly verify this, but I think including just d3d10shader.h simply doesn't work with the PSDK. The background on this is that Alistair ran into this issue while doing the vkd3d import for staging, specifically replacing a vkd3d_d3d10shader.h include with a d3d10shader.h include. The more straightforward way to address that is to replace that include with a d3d10.h include instead; I don't think the changes in this MR are incompatible with the PSDK headers though. (And for some more background, the d3dcommon.h header didn't use to exist in earlier DirectX SDKs, IIRC it was introduced with Direct3D 11.) -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11239#note_144084
The simplest seems to be to rename d3d10shader.h to d3d10effect.h in blob.c since d3d10effect.h -> d3d10.h -> d3d10shader.h. I've updated my import script and it no longer errors. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11239#note_147537
This merge request was closed by Alistair Leslie-Hughes. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11239
participants (4)
-
Alexandre Julliard (@julliard) -
Alistair Leslie-Hughes -
Alistair Leslie-Hughes (@alesliehughes) -
Henri Verbeet (@hverbeet)