2 * Copyright 2009 Henri Verbeet for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 const unsigned int D3D10_SHADER_DEBUG
= 0x00001;
22 const unsigned int D3D10_SHADER_SKIP_VALIDATION
= 0x00002;
23 const unsigned int D3D10_SHADER_SKIP_OPTIMIZATION
= 0x00004;
24 const unsigned int D3D10_SHADER_PACK_MATRIX_ROW_MAJOR
= 0x00008;
25 const unsigned int D3D10_SHADER_PACK_MATRIX_COLUMN_MAJOR
= 0x00010;
26 const unsigned int D3D10_SHADER_PARTIAL_PRECISION
= 0x00020;
27 const unsigned int D3D10_SHADER_FORCE_VS_SOFTWARE_NO_OPT
= 0x00040;
28 const unsigned int D3D10_SHADER_FORCE_PS_SOFTWARE_NO_OPT
= 0x00080;
29 const unsigned int D3D10_SHADER_NO_PRESHADER
= 0x00100;
30 const unsigned int D3D10_SHADER_AVOID_FLOW_CONTROL
= 0x00200;
31 const unsigned int D3D10_SHADER_PREFER_FLOW_CONTROL
= 0x00400;
32 const unsigned int D3D10_SHADER_ENABLE_STRICTNESS
= 0x00800;
33 const unsigned int D3D10_SHADER_ENABLE_BACKWARDS_COMPATIBILITY
= 0x01000;
34 const unsigned int D3D10_SHADER_IEEE_STRICTNESS
= 0x02000;
35 const unsigned int D3D10_SHADER_WARNINGS_ARE_ERRORS
= 0x40000;
37 const unsigned int D3D10_SHADER_OPTIMIZATION_LEVEL0
= 0x04000;
38 const unsigned int D3D10_SHADER_OPTIMIZATION_LEVEL1
= 0x00000;
39 const unsigned int D3D10_SHADER_OPTIMIZATION_LEVEL2
= 0x0c000;
40 const unsigned int D3D10_SHADER_OPTIMIZATION_LEVEL3
= 0x08000;
42 typedef D3D_SHADER_MACRO D3D10_SHADER_MACRO
;
43 typedef D3D_SHADER_MACRO
*LPD3D10_SHADER_MACRO
;
45 typedef D3D_SHADER_VARIABLE_CLASS D3D10_SHADER_VARIABLE_CLASS
;
46 typedef D3D_SHADER_VARIABLE_CLASS
*LPD3D10_SHADER_VARIABLE_CLASS
;
48 typedef D3D_CBUFFER_TYPE D3D10_CBUFFER_TYPE
;
49 typedef D3D_CBUFFER_TYPE
*LPD3D10_CBUFFER_TYPE
;
51 typedef D3D_REGISTER_COMPONENT_TYPE D3D10_REGISTER_COMPONENT_TYPE
;
53 typedef D3D_RESOURCE_RETURN_TYPE D3D10_RESOURCE_RETURN_TYPE
;
55 typedef D3D_NAME D3D10_NAME
;
57 typedef D3D_SHADER_INPUT_TYPE D3D10_SHADER_INPUT_TYPE
;
58 typedef D3D_SHADER_INPUT_TYPE
*LPD3D10_SHADER_INPUT_TYPE
;
60 typedef D3D_SHADER_VARIABLE_TYPE D3D10_SHADER_VARIABLE_TYPE
;
61 typedef D3D_SHADER_VARIABLE_TYPE
*LPD3D10_SHADER_VARIABLE_TYPE
;
63 typedef D3D_INCLUDE_TYPE D3D10_INCLUDE_TYPE
;
64 typedef ID3DInclude ID3D10Include
;
65 typedef ID3DInclude
*LPD3D10INCLUDE
;
66 cpp_quote
("#define IID_ID3D10Include IID_ID3DInclude")
68 typedef struct _D3D10_SHADER_INPUT_BIND_DESC
71 D3D10_SHADER_INPUT_TYPE Type
;
75 D3D10_RESOURCE_RETURN_TYPE ReturnType
;
76 D3D10_SRV_DIMENSION Dimension
;
78 } D3D10_SHADER_INPUT_BIND_DESC
;
80 typedef struct _D3D10_SIGNATURE_PARAMETER_DESC
82 const char *SemanticName
;
85 D3D10_NAME SystemValueType
;
86 D3D10_REGISTER_COMPONENT_TYPE ComponentType
;
89 } D3D10_SIGNATURE_PARAMETER_DESC
;
91 typedef struct _D3D10_SHADER_DESC
99 UINT OutputParameters
;
100 UINT InstructionCount
;
101 UINT TempRegisterCount
;
105 UINT TextureNormalInstructions
;
106 UINT TextureLoadInstructions
;
107 UINT TextureCompInstructions
;
108 UINT TextureBiasInstructions
;
109 UINT TextureGradientInstructions
;
110 UINT FloatInstructionCount
;
111 UINT IntInstructionCount
;
112 UINT UintInstructionCount
;
113 UINT StaticFlowControlCount
;
114 UINT DynamicFlowControlCount
;
115 UINT MacroInstructionCount
;
116 UINT ArrayInstructionCount
;
117 UINT CutInstructionCount
;
118 UINT EmitInstructionCount
;
119 D3D10_PRIMITIVE_TOPOLOGY GSOutputTopology
;
120 UINT GSMaxOutputVertexCount
;
123 typedef struct _D3D10_SHADER_BUFFER_DESC
126 D3D10_CBUFFER_TYPE Type
;
130 } D3D10_SHADER_BUFFER_DESC
;
132 typedef struct _D3D10_SHADER_VARIABLE_DESC
139 } D3D10_SHADER_VARIABLE_DESC
;
141 typedef struct _D3D10_SHADER_TYPE_DESC
143 D3D10_SHADER_VARIABLE_CLASS Class
;
144 D3D10_SHADER_VARIABLE_TYPE Type
;
150 } D3D10_SHADER_TYPE_DESC
;
155 uuid(c530ad7d
-9b16
-4395-a979
-ba2ecff83add
),
157 interface ID3D10ShaderReflectionType
159 HRESULT GetDesc
(D3D10_SHADER_TYPE_DESC
*desc
);
160 ID3D10ShaderReflectionType
*GetMemberTypeByIndex
(UINT index
);
161 ID3D10ShaderReflectionType
*GetMemberTypeByName
(const char *name
);
162 const char *GetMemberTypeName
(UINT index
);
168 uuid(1bf63c95
-2650-405d
-99c1
-3636bd1da0a1
),
170 interface ID3D10ShaderReflectionVariable
172 HRESULT GetDesc
(D3D10_SHADER_VARIABLE_DESC
*desc
);
173 ID3D10ShaderReflectionType
*GetType
();
179 uuid(66c66a94
-dddd
-4b62
-a66a
-f0da33c2b4d0
),
181 interface ID3D10ShaderReflectionConstantBuffer
183 HRESULT GetDesc
(D3D10_SHADER_BUFFER_DESC
*desc
);
184 ID3D10ShaderReflectionVariable
*GetVariableByIndex
(UINT index
);
185 ID3D10ShaderReflectionVariable
*GetVariableByName
(const char *name
);
191 uuid(d40e20b6
-f8f7
-42ad
-ab20
-4baf8f15dfaa
),
193 interface ID3D10ShaderReflection
: IUnknown
195 HRESULT GetDesc
(D3D10_SHADER_DESC
*desc
);
196 ID3D10ShaderReflectionConstantBuffer
*GetConstantBufferByIndex
(UINT index
);
197 ID3D10ShaderReflectionConstantBuffer
*GetConstantBufferByName
(const char *name
);
198 HRESULT GetResourceBindingDesc
(UINT index
, D3D10_SHADER_INPUT_BIND_DESC
*desc
);
199 HRESULT GetInputParameterDesc
(UINT index
, D3D10_SIGNATURE_PARAMETER_DESC
*desc
);
200 HRESULT GetOutputParameterDesc
(UINT index
, D3D10_SIGNATURE_PARAMETER_DESC
*desc
);
204 HRESULT __stdcall D3D10CompileShader
(const char *data
, SIZE_T data_size
, const char *filename
,
205 const D3D10_SHADER_MACRO
*defines
, ID3D10Include
*include
, const char *entrypoint
,
206 const char *profile
, UINT flags
, ID3D10Blob
**shader
, ID3D10Blob
**error_messages
);
207 HRESULT __stdcall D3D10DisassembleShader
(const void *data
, SIZE_T data_size
,
208 BOOL color_code
, const char *comments
, ID3D10Blob
**disassembly
);
209 const char * __stdcall D3D10GetVertexShaderProfile
(ID3D10Device
*device
);
210 const char * __stdcall D3D10GetGeometryShaderProfile
(ID3D10Device
*device
);
211 const char * __stdcall D3D10GetPixelShaderProfile
(ID3D10Device
*device
);
213 HRESULT __stdcall D3D10ReflectShader
(const void *data
, SIZE_T data_size
, ID3D10ShaderReflection
**reflector
);
214 HRESULT __stdcall D3D10GetInputSignatureBlob
(const void *data
, SIZE_T data_size
, ID3D10Blob
**blob
);
215 HRESULT __stdcall D3D10GetOutputSignatureBlob
(const void *data
, SIZE_T data_size
, ID3D10Blob
**blob
);
216 HRESULT __stdcall D3D10GetInputAndOutputSignatureBlob
(const void *data
, SIZE_T data_size
, ID3D10Blob
**blob
);
217 HRESULT __stdcall D3D10GetShaderDebugInfo
(const void *data
, SIZE_T data_size
, ID3D10Blob
**blob
);