~steve-sk2/mingw-w64/oneiric

« back to all changes in this revision

Viewing changes to mingw-w64-headers/direct-x/include/d3d10shader.h

  • Committer: Bazaar Package Importer
  • Author(s): Stephen Kitt
  • Date: 2010-11-18 00:04:46 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20101118000446-xe24b423su55onyl
Tags: 1.0+20101003-1
* New maintainer. (Closes: #594371.)
* New upstream snapshot:
  - Includes getopt.h. (Closes: #569914.)
* Build g++ for Win64. (Closes: #600451.)
* Standards-Version 3.9.1 (new packaging).
* Include patch from
  http://mingw-w64.svn.sourceforge.net/viewvc/mingw-w64?view=revision&revision=3715
  as suggested by Rafaël Carré.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2009 Henri Verbeet for CodeWeavers
 
3
 *
 
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.
 
8
 *
 
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.
 
13
 *
 
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
 
17
 *
 
18
 */
 
19
 
 
20
#ifndef __WINE_D3D10SHADER_H
 
21
#define __WINE_D3D10SHADER_H
 
22
 
 
23
#include "d3d10.h"
 
24
 
 
25
#define D3D10_SHADER_DEBUG                          0x0001
 
26
#define D3D10_SHADER_SKIP_VALIDATION                0x0002
 
27
#define D3D10_SHADER_SKIP_OPTIMIZATION              0x0004
 
28
#define D3D10_SHADER_PACK_MATRIX_ROW_MAJOR          0x0008
 
29
#define D3D10_SHADER_PACK_MATRIX_COLUMN_MAJOR       0x0010
 
30
#define D3D10_SHADER_PARTIAL_PRECISION              0x0020
 
31
#define D3D10_SHADER_FORCE_VS_SOFTWARE_NO_OPT       0x0040
 
32
#define D3D10_SHADER_FORCE_PS_SOFTWARE_NO_OPT       0x0080
 
33
#define D3D10_SHADER_NO_PRESHADER                   0x0100
 
34
#define D3D10_SHADER_AVOID_FLOW_CONTROL             0x0200
 
35
#define D3D10_SHADER_PREFER_FLOW_CONTROL            0x0400
 
36
#define D3D10_SHADER_ENABLE_STRICTNESS              0x0800
 
37
#define D3D10_SHADER_ENABLE_BACKWARDS_COMPATIBILITY 0x1000
 
38
#define D3D10_SHADER_IEEE_STRICTNESS                0x2000
 
39
#define D3D10_SHADER_WARNINGS_ARE_ERRORS           0x40000
 
40
 
 
41
#define D3D10_SHADER_OPTIMIZATION_LEVEL0            0x4000
 
42
#define D3D10_SHADER_OPTIMIZATION_LEVEL1            0x0000
 
43
#define D3D10_SHADER_OPTIMIZATION_LEVEL2            0xC000
 
44
#define D3D10_SHADER_OPTIMIZATION_LEVEL3            0x8000
 
45
 
 
46
typedef enum _D3D10_SHADER_VARIABLE_CLASS
 
47
{
 
48
    D3D10_SVC_SCALAR,
 
49
    D3D10_SVC_VECTOR,
 
50
    D3D10_SVC_MATRIX_ROWS,
 
51
    D3D10_SVC_MATRIX_COLUMNS,
 
52
    D3D10_SVC_OBJECT,
 
53
    D3D10_SVC_STRUCT,
 
54
    D3D10_SVC_FORCE_DWORD = 0x7fffffff
 
55
} D3D10_SHADER_VARIABLE_CLASS, *LPD3D10_SHADER_VARIABLE_CLASS;
 
56
 
 
57
typedef enum _D3D10_SHADER_VARIABLE_TYPE
 
58
{
 
59
    D3D10_SVT_VOID = 0,
 
60
    D3D10_SVT_BOOL = 1,
 
61
    D3D10_SVT_INT = 2,
 
62
    D3D10_SVT_FLOAT = 3,
 
63
    D3D10_SVT_STRING = 4,
 
64
    D3D10_SVT_TEXTURE = 5,
 
65
    D3D10_SVT_TEXTURE1D = 6,
 
66
    D3D10_SVT_TEXTURE2D = 7,
 
67
    D3D10_SVT_TEXTURE3D = 8,
 
68
    D3D10_SVT_TEXTURECUBE = 9,
 
69
    D3D10_SVT_SAMPLER = 10,
 
70
    D3D10_SVT_PIXELSHADER = 15,
 
71
    D3D10_SVT_VERTEXSHADER = 16,
 
72
    D3D10_SVT_UINT = 19,
 
73
    D3D10_SVT_UINT8 = 20,
 
74
    D3D10_SVT_GEOMETRYSHADER = 21,
 
75
    D3D10_SVT_RASTERIZER = 22,
 
76
    D3D10_SVT_DEPTHSTENCIL = 23,
 
77
    D3D10_SVT_BLEND = 24,
 
78
    D3D10_SVT_BUFFER = 25,
 
79
    D3D10_SVT_CBUFFER = 26,
 
80
    D3D10_SVT_TBUFFER = 27,
 
81
    D3D10_SVT_TEXTURE1DARRAY = 28,
 
82
    D3D10_SVT_TEXTURE2DARRAY = 29,
 
83
    D3D10_SVT_RENDERTARGETVIEW = 30,
 
84
    D3D10_SVT_DEPTHSTENCILVIEW = 31,
 
85
    D3D10_SVT_TEXTURE2DMS = 32,
 
86
    D3D10_SVT_TEXTURE2DMSARRAY = 33,
 
87
    D3D10_SVT_TEXTURECUBEARRAY = 34,
 
88
    D3D10_SVT_FORCE_DWORD = 0x7fffffff
 
89
} D3D10_SHADER_VARIABLE_TYPE, *LPD3D10_SHADER_VARIABLE_TYPE;
 
90
 
 
91
typedef enum _D3D10_SHADER_INPUT_TYPE
 
92
{
 
93
    D3D10_SIT_CBUFFER = 0,
 
94
    D3D10_SIT_TBUFFER = 1,
 
95
    D3D10_SIT_TEXTURE = 2,
 
96
    D3D10_SIT_SAMPLER = 3
 
97
} D3D10_SHADER_INPUT_TYPE, *LPD3D10_SHADER_INPUT_TYPE;
 
98
 
 
99
typedef enum D3D10_CBUFFER_TYPE
 
100
{
 
101
    D3D10_CT_CBUFFER = 0,
 
102
    D3D10_CT_TBUFFER = 1
 
103
} D3D10_CBUFFER_TYPE, *LPD3D10_CBUFFER_TYPE;
 
104
 
 
105
typedef enum D3D10_NAME
 
106
{
 
107
    D3D10_NAME_UNDEFINED = 0,
 
108
    D3D10_NAME_POSITION = 1,
 
109
    D3D10_NAME_CLIP_DISTANCE = 2,
 
110
    D3D10_NAME_CULL_DISTANCE = 3,
 
111
    D3D10_NAME_RENDER_TARGET_ARRAY_INDEX = 4,
 
112
    D3D10_NAME_VIEWPORT_ARRAY_INDEX = 5,
 
113
    D3D10_NAME_VERTEX_ID = 6,
 
114
    D3D10_NAME_PRIMITIVE_ID = 7,
 
115
    D3D10_NAME_INSTANCE_ID = 8,
 
116
    D3D10_NAME_IS_FRONT_FACE = 9,
 
117
    D3D10_NAME_SAMPLE_INDEX = 10,
 
118
    D3D10_NAME_TARGET = 64,
 
119
    D3D10_NAME_DEPTH = 65,
 
120
} D3D10_NAME;
 
121
 
 
122
typedef enum D3D10_REGISTER_COMPONENT_TYPE
 
123
{
 
124
    D3D10_REGISTER_COMPONENT_UNKNOWN = 0,
 
125
    D3D10_REGISTER_COMPONENT_UINT32 = 1,
 
126
    D3D10_REGISTER_COMPONENT_SINT32 = 2,
 
127
    D3D10_REGISTER_COMPONENT_FLOAT32 = 3,
 
128
} D3D10_REGISTER_COMPONENT_TYPE;
 
129
 
 
130
typedef struct _D3D10_SHADER_MACRO
 
131
{
 
132
    LPCSTR Name;
 
133
    LPCSTR Definition;
 
134
} D3D10_SHADER_MACRO, *LPD3D10_SHADER_MACRO;
 
135
 
 
136
typedef enum D3D10_RESOURCE_RETURN_TYPE
 
137
{
 
138
    D3D10_RETURN_TYPE_UNORM = 1,
 
139
    D3D10_RETURN_TYPE_SNORM = 2,
 
140
    D3D10_RETURN_TYPE_SINT = 3,
 
141
    D3D10_RETURN_TYPE_UINT = 4,
 
142
    D3D10_RETURN_TYPE_FLOAT = 5,
 
143
    D3D10_RETURN_TYPE_MIXED = 6
 
144
} D3D10_RESOURCE_RETURN_TYPE;
 
145
 
 
146
typedef struct _D3D10_SHADER_INPUT_BIND_DESC
 
147
{
 
148
    LPCSTR Name;
 
149
    D3D10_SHADER_INPUT_TYPE Type;
 
150
    UINT BindPoint;
 
151
    UINT BindCount;
 
152
    UINT uFlags;
 
153
    D3D10_RESOURCE_RETURN_TYPE ReturnType;
 
154
    D3D10_SRV_DIMENSION Dimension;
 
155
    UINT NumSamples;
 
156
} D3D10_SHADER_INPUT_BIND_DESC;
 
157
 
 
158
typedef struct _D3D10_SIGNATURE_PARAMETER_DESC
 
159
{
 
160
    LPCSTR SemanticName;
 
161
    UINT SemanticIndex;
 
162
    UINT Register;
 
163
    D3D10_NAME SystemValueType;
 
164
    D3D10_REGISTER_COMPONENT_TYPE ComponentType;
 
165
    BYTE Mask;
 
166
    BYTE ReadWriteMask;
 
167
} D3D10_SIGNATURE_PARAMETER_DESC;
 
168
 
 
169
typedef struct _D3D10_SHADER_DESC
 
170
{
 
171
    UINT Version;
 
172
    LPCSTR Creator;
 
173
    UINT Flags;
 
174
    UINT ConstantBuffers;
 
175
    UINT BoundResources;
 
176
    UINT InputParameters;
 
177
    UINT OutputParameters;
 
178
    UINT InstructionCount;
 
179
    UINT TempRegisterCount;
 
180
    UINT TempArrayCount;
 
181
    UINT DefCount;
 
182
    UINT DclCount;
 
183
    UINT TextureNormalInstructions;
 
184
    UINT TextureLoadInstructions;
 
185
    UINT TextureCompInstructions;
 
186
    UINT TextureBiasInstructions;
 
187
    UINT TextureGradientInstructions;
 
188
    UINT FloatInstructionCount;
 
189
    UINT IntInstructionCount;
 
190
    UINT UintInstructionCount;
 
191
    UINT StaticFlowControlCount;
 
192
    UINT DynamicFlowControlCount;
 
193
    UINT MacroInstructionCount;
 
194
    UINT ArrayInstructionCount;
 
195
    UINT CutInstructionCount;
 
196
    UINT EmitInstructionCount;
 
197
    D3D10_PRIMITIVE_TOPOLOGY GSOutputTopology;
 
198
    UINT GSMaxOutputVertexCount;
 
199
} D3D10_SHADER_DESC;
 
200
 
 
201
typedef struct _D3D10_SHADER_BUFFER_DESC
 
202
{
 
203
    LPCSTR Name;
 
204
    D3D10_CBUFFER_TYPE Type;
 
205
    UINT Variables;
 
206
    UINT Size;
 
207
    UINT uFlags;
 
208
} D3D10_SHADER_BUFFER_DESC;
 
209
 
 
210
typedef struct _D3D10_SHADER_VARIABLE_DESC
 
211
{
 
212
    LPCSTR Name;
 
213
    UINT StartOffset;
 
214
    UINT Size;
 
215
    UINT uFlags;
 
216
    LPVOID DefaultValue;
 
217
} D3D10_SHADER_VARIABLE_DESC;
 
218
 
 
219
typedef struct _D3D10_SHADER_TYPE_DESC
 
220
{
 
221
    D3D10_SHADER_VARIABLE_CLASS Class;
 
222
    D3D10_SHADER_VARIABLE_TYPE Type;
 
223
    UINT Rows;
 
224
    UINT Columns;
 
225
    UINT Elements;
 
226
    UINT Members;
 
227
    UINT Offset;
 
228
} D3D10_SHADER_TYPE_DESC;
 
229
 
 
230
DEFINE_GUID(IID_ID3D10ShaderReflectionType, 0xc530ad7d, 0x9b16, 0x4395, 0xa9, 0x79, 0xba, 0x2e, 0xcf, 0xf8, 0x3a, 0xdd);
 
231
 
 
232
#define INTERFACE ID3D10ShaderReflectionType
 
233
DECLARE_INTERFACE(ID3D10ShaderReflectionType)
 
234
{
 
235
    STDMETHOD(GetDesc)(THIS_ D3D10_SHADER_TYPE_DESC *desc) PURE;
 
236
    STDMETHOD_(struct ID3D10ShaderReflectionType *, GetMemberTypeByIndex)(THIS_ UINT index) PURE;
 
237
    STDMETHOD_(struct ID3D10ShaderReflectionType *, GetMemberTypeByName)(THIS_ LPCSTR name) PURE;
 
238
    STDMETHOD_(LPCSTR, GetMemberTypeName)(THIS_ UINT index) PURE;
 
239
};
 
240
#undef INTERFACE
 
241
 
 
242
DEFINE_GUID(IID_ID3D10ShaderReflectionVariable, 0x1bf63c95, 0x2650, 0x405d, 0x99, 0xc1, 0x36, 0x36, 0xbd, 0x1d, 0xa0, 0xa1);
 
243
 
 
244
#define INTERFACE ID3D10ShaderReflectionVariable
 
245
DECLARE_INTERFACE(ID3D10ShaderReflectionVariable)
 
246
{
 
247
    STDMETHOD(GetDesc)(THIS_ D3D10_SHADER_VARIABLE_DESC *desc) PURE;
 
248
    STDMETHOD_(struct ID3D10ShaderReflectionType *, GetType)(THIS) PURE;
 
249
};
 
250
#undef INTERFACE
 
251
 
 
252
DEFINE_GUID(IID_ID3D10ShaderReflectionConstantBuffer, 0x66c66a94, 0xdddd, 0x4b62, 0xa6, 0x6a, 0xf0, 0xda, 0x33, 0xc2, 0xb4, 0xd0);
 
253
 
 
254
#define INTERFACE ID3D10ShaderReflectionConstantBuffer
 
255
DECLARE_INTERFACE(ID3D10ShaderReflectionConstantBuffer)
 
256
{
 
257
    STDMETHOD(GetDesc)(THIS_ D3D10_SHADER_BUFFER_DESC *desc) PURE;
 
258
    STDMETHOD_(struct ID3D10ShaderReflectionVariable *, GetVariableByIndex)(THIS_ UINT index) PURE;
 
259
    STDMETHOD_(struct ID3D10ShaderReflectionVariable *, GetVariableByName)(THIS_ LPCSTR name) PURE;
 
260
};
 
261
#undef INTERFACE
 
262
 
 
263
DEFINE_GUID(IID_ID3D10ShaderReflection, 0xd40e20b6, 0xf8f7, 0x42ad, 0xab, 0x20, 0x4b, 0xaf, 0x8f, 0x15, 0xdf, 0xaa);
 
264
 
 
265
#define INTERFACE ID3D10ShaderReflection
 
266
DECLARE_INTERFACE_(ID3D10ShaderReflection, IUnknown)
 
267
{
 
268
    /* IUnknown methods */
 
269
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID *object) PURE;
 
270
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
 
271
    STDMETHOD_(ULONG, Release)(THIS) PURE;
 
272
    /* ID3D10ShaderReflection methods */
 
273
    STDMETHOD(GetDesc)(THIS_ D3D10_SHADER_DESC *desc) PURE;
 
274
    STDMETHOD_(struct ID3D10ShaderReflectionConstantBuffer *, GetConstantBufferByIndex)(THIS_ UINT index) PURE;
 
275
    STDMETHOD_(struct ID3D10ShaderReflectionConstantBuffer *, GetConstantBufferByName)(THIS_ LPCSTR name) PURE;
 
276
    STDMETHOD(GetResourceBindingDesc)(THIS_ UINT index, D3D10_SHADER_INPUT_BIND_DESC *desc) PURE;
 
277
    STDMETHOD(GetInputParameterDesc)(THIS_ UINT index, D3D10_SIGNATURE_PARAMETER_DESC *desc) PURE;
 
278
    STDMETHOD(GetOutputParameterDesc)(THIS_ UINT index, D3D10_SIGNATURE_PARAMETER_DESC *desc) PURE;
 
279
};
 
280
#undef INTERFACE
 
281
 
 
282
LPCSTR WINAPI D3D10GetVertexShaderProfile(ID3D10Device *device);
 
283
LPCSTR WINAPI D3D10GetGeometryShaderProfile(ID3D10Device *device);
 
284
LPCSTR WINAPI D3D10GetPixelShaderProfile(ID3D10Device *device);
 
285
 
 
286
HRESULT WINAPI D3D10ReflectShader(const void *data, SIZE_T data_size, ID3D10ShaderReflection **reflector);
 
287
 
 
288
#endif /* __WINE_D3D10SHADER_H */