[PATCH 2/2] include: Define d3d12 shader reflection interfaces.

Paul Gofman pgofman at codeweavers.com
Thu Aug 6 10:05:33 CDT 2020


Signed-off-by: Paul Gofman <pgofman at codeweavers.com>
---
 include/d3d12shader.h | 111 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 111 insertions(+)

diff --git a/include/d3d12shader.h b/include/d3d12shader.h
index a5ef054e806..7179c33790b 100644
--- a/include/d3d12shader.h
+++ b/include/d3d12shader.h
@@ -184,4 +184,115 @@ typedef struct _D3D12_LIBRARY_DESC
     UINT FunctionCount;
 } D3D12_LIBRARY_DESC;
 
+DEFINE_GUID(IID_ID3D12ShaderReflectionType, 0xe913c351, 0x783d, 0x48ca, 0xa1, 0xd1, 0x4f, 0x30, 0x62, 0x84, 0xad, 0x56);
+
+#define INTERFACE ID3D12ShaderReflectionType
+DECLARE_INTERFACE(ID3D12ShaderReflectionType)
+{
+    STDMETHOD(GetDesc)(THIS_  D3D12_SHADER_TYPE_DESC *desc) PURE;
+    STDMETHOD_(struct ID3D12ShaderReflectionType *, GetMemberTypeByIndex)(THIS_ UINT index) PURE;
+    STDMETHOD_(struct ID3D12ShaderReflectionType *, GetMemberTypeByName)(THIS_ const char *name) PURE;
+    STDMETHOD_(const char *, GetMemberTypeName)(THIS_ UINT index) PURE;
+    STDMETHOD(IsEqual)(THIS_ struct ID3D12ShaderReflectionType *type) PURE;
+    STDMETHOD_(struct ID3D12ShaderReflectionType *, GetSubType)(THIS) PURE;
+    STDMETHOD_(struct ID3D12ShaderReflectionType *, GetBaseClass)(THIS) PURE;
+    STDMETHOD_(UINT, GetNumInterfaces)(THIS) PURE;
+    STDMETHOD_(struct ID3D12ShaderReflectionType *, GetInterfaceByIndex)(THIS_ UINT index) PURE;
+    STDMETHOD(IsOfType)(THIS_ struct ID3D12ShaderReflectionType *type) PURE;
+    STDMETHOD(ImplementsInterface)(THIS_ struct ID3D12ShaderReflectionType *base) PURE;
+};
+#undef INTERFACE
+
+DEFINE_GUID(IID_ID3D12ShaderReflectionVariable, 0x8337a8a6, 0xa216, 0x444a, 0xb2, 0xf4, 0x31, 0x47, 0x33, 0xa7, 0x3a, 0xea);
+
+#define INTERFACE ID3D12ShaderReflectionVariable
+DECLARE_INTERFACE(ID3D12ShaderReflectionVariable)
+{
+    STDMETHOD(GetDesc)(THIS_ D3D12_SHADER_VARIABLE_DESC *desc) PURE;
+    STDMETHOD_(struct ID3D12ShaderReflectionType *, GetType)(THIS) PURE;
+    STDMETHOD_(struct ID3D12ShaderReflectionConstantBuffer *, GetBuffer)(THIS) PURE;
+    STDMETHOD_(UINT, GetInterfaceSlot)(THIS_ UINT index) PURE;
+};
+#undef INTERFACE
+
+DEFINE_GUID(IID_ID3D12ShaderReflectionConstantBuffer, 0xc59598b4, 0x48b3, 0x4869, 0xb9, 0xb1, 0xb1, 0x61, 0x8b, 0x14, 0xa8, 0xb7);
+
+#define INTERFACE ID3D12ShaderReflectionConstantBuffer
+DECLARE_INTERFACE(ID3D12ShaderReflectionConstantBuffer)
+{
+    STDMETHOD(GetDesc)(THIS_ D3D12_SHADER_BUFFER_DESC *desc) PURE;
+    STDMETHOD_(struct ID3D12ShaderReflectionVariable *, GetVariableByIndex)(THIS_  UINT index) PURE;
+    STDMETHOD_(struct ID3D12ShaderReflectionVariable *, GetVariableByName)(THIS_  const char *name) PURE;
+};
+#undef INTERFACE
+
+DEFINE_GUID(IID_ID3D12ShaderReflection, 0x5a58797d, 0xa72c, 0x478d, 0x8b, 0xa2, 0xef, 0xc6, 0xb0, 0xef, 0xe8, 0x8e);
+
+#define INTERFACE ID3D12ShaderReflection
+DECLARE_INTERFACE_(ID3D12ShaderReflection, IUnknown)
+{
+    /* IUnknown methods */
+    STDMETHOD(QueryInterface)(THIS_ REFIID iid, void **out) PURE;
+    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
+    STDMETHOD_(ULONG, Release)(THIS) PURE;
+    /* ID3D12ShaderReflection methods */
+    STDMETHOD(GetDesc)(THIS_ D3D12_SHADER_DESC *desc) PURE;
+    STDMETHOD_(struct ID3D12ShaderReflectionConstantBuffer *, GetConstantBufferByIndex)(THIS_ UINT index) PURE;
+    STDMETHOD_(struct ID3D12ShaderReflectionConstantBuffer *, GetConstantBufferByName)(THIS_ const char *name) PURE;
+    STDMETHOD(GetResourceBindingDesc)(THIS_ UINT index, D3D12_SHADER_INPUT_BIND_DESC *desc) PURE;
+    STDMETHOD(GetInputParameterDesc)(THIS_ UINT index, D3D12_SIGNATURE_PARAMETER_DESC *desc) PURE;
+    STDMETHOD(GetOutputParameterDesc)(THIS_ UINT index, D3D12_SIGNATURE_PARAMETER_DESC *desc) PURE;
+    STDMETHOD(GetPatchConstantParameterDesc)(THIS_ UINT index, D3D12_SIGNATURE_PARAMETER_DESC *desc) PURE;
+    STDMETHOD_(struct ID3D12ShaderReflectionVariable *, GetVariableByName)(THIS_ const char *name) PURE;
+    STDMETHOD(GetResourceBindingDescByName)(THIS_ const char *name, D3D12_SHADER_INPUT_BIND_DESC *desc) PURE;
+    STDMETHOD_(UINT, GetMovInstructionCount)(THIS) PURE;
+    STDMETHOD_(UINT, GetMovcInstructionCount)(THIS) PURE;
+    STDMETHOD_(UINT, GetConversionInstructionCount)(THIS) PURE;
+    STDMETHOD_(UINT, GetBitwiseInstructionCount)(THIS) PURE;
+    STDMETHOD_(D3D_PRIMITIVE, GetGSInputPrimitive)(THIS) PURE;
+    STDMETHOD_(BOOL, IsSampleFrequencyShader)(THIS) PURE;
+    STDMETHOD_(UINT, GetNumInterfaceSlots)(THIS) PURE;
+    STDMETHOD(GetMinFeatureLevel)(THIS_ enum D3D_FEATURE_LEVEL *level) PURE;
+    STDMETHOD_(UINT, GetThreadGroupSize)(THIS_ UINT *sizex, UINT *sizey, UINT *sizez) PURE;
+    STDMETHOD_(UINT64, GetRequiresFlags)(THIS) PURE;
+};
+#undef INTERFACE
+
+DEFINE_GUID(IID_ID3D12FunctionParameterReflection, 0xec25f42d, 0x7006, 0x4f2b, 0xb3, 0x3e, 0x2, 0xcc, 0x33, 0x75, 0x73, 0x3f);
+
+#define INTERFACE ID3D12FunctionParameterReflection
+DECLARE_INTERFACE(ID3D12FunctionParameterReflection)
+{
+    STDMETHOD(GetDesc)(THIS_ D3D12_PARAMETER_DESC *desc) PURE;
+};
+#undef INTERFACE
+
+DEFINE_GUID(IID_ID3D12FunctionReflection, 0x1108795c, 0x2772, 0x4ba9, 0xb2, 0xa8, 0xd4, 0x64, 0xdc, 0x7e, 0x27, 0x99);
+
+#define INTERFACE ID3D12FunctionReflection
+DECLARE_INTERFACE(ID3D12FunctionReflection)
+{
+    STDMETHOD(GetDesc)(THIS_ D3D12_FUNCTION_DESC *desc) PURE;
+    STDMETHOD_(struct ID3D12ShaderReflectionConstantBuffer *, GetConstantBufferByIndex)(THIS_ UINT index) PURE;
+    STDMETHOD_(struct ID3D12ShaderReflectionConstantBuffer *, GetConstantBufferByName)(THIS_ const char *name) PURE;
+    STDMETHOD(GetResourceBindingDesc)(THIS_ UINT index, D3D12_SHADER_INPUT_BIND_DESC *desc) PURE;
+    STDMETHOD_(struct ID3D12ShaderReflectionVariable *, GetVariableByName)(THIS_ const char *name) PURE;
+    STDMETHOD(GetResourceBindingDescByName)(THIS_ const char *name, D3D12_SHADER_INPUT_BIND_DESC *desc) PURE;
+    STDMETHOD_(struct ID3D12FunctionParameterReflection *, GetFunctionParameter)(THIS_ INT index) PURE;
+};
+#undef INTERFACE
+
+DEFINE_GUID(IID_ID3D12LibraryReflection, 0x8e349d19, 0x54db, 0x4a56, 0x9d, 0xc9, 0x11, 0x9d, 0x87, 0xbd, 0xb8, 0x4);
+
+#define INTERFACE ID3D12LibraryReflection
+DECLARE_INTERFACE_(ID3D12LibraryReflection, IUnknown)
+{
+    STDMETHOD(QueryInterface)(THIS_ REFIID iid, void **out) PURE;
+    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
+    STDMETHOD_(ULONG, Release)(THIS) PURE;
+    STDMETHOD(GetDesc)(THIS_ D3D12_LIBRARY_DESC *desc) PURE;
+    STDMETHOD_(struct ID3D12FunctionReflection *, GetFunctionByIndex)(THIS_ INT index) PURE;
+};
+#undef INTERFACE
+
 #endif
-- 
2.26.2




More information about the wine-devel mailing list