winepulse: Set pulse master volume to 0 when session is muted.
[wine.git] / dlls / d3d10 / d3d10_private.h
blob8d48231d97180306cf752b05d624aa4c73aa90a1
1 /*
2 * Copyright 2008-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
19 #ifndef __WINE_D3D10_PRIVATE_H
20 #define __WINE_D3D10_PRIVATE_H
22 #include <math.h>
24 #include "wine/debug.h"
25 #include "wine/rbtree.h"
26 #include "wine/heap.h"
28 #define COBJMACROS
29 #include "winbase.h"
30 #include "winuser.h"
31 #include "objbase.h"
33 #include "d3d10.h"
34 #include "d3dcompiler.h"
37 * This doesn't belong here, but for some functions it is possible to return that value,
38 * see http://msdn.microsoft.com/en-us/library/bb205278%28v=VS.85%29.aspx
39 * The original definition is in D3DX10core.h.
41 #define D3DERR_INVALIDCALL 0x8876086c
43 enum d3d10_effect_object_type
45 D3D10_EOT_RASTERIZER_STATE = 0x0,
46 D3D10_EOT_DEPTH_STENCIL_STATE = 0x1,
47 D3D10_EOT_BLEND_STATE = 0x2,
48 D3D10_EOT_VERTEXSHADER = 0x6,
49 D3D10_EOT_PIXELSHADER = 0x7,
50 D3D10_EOT_GEOMETRYSHADER = 0x8,
51 D3D10_EOT_STENCIL_REF = 0x9,
52 D3D10_EOT_BLEND_FACTOR = 0xa,
53 D3D10_EOT_SAMPLE_MASK = 0xb,
56 enum d3d10_effect_object_operation
58 D3D10_EOO_VALUE = 1,
59 D3D10_EOO_PARSED_OBJECT = 2,
60 D3D10_EOO_PARSED_OBJECT_INDEX = 3,
61 D3D10_EOO_ANONYMOUS_SHADER = 7,
64 struct d3d10_matrix
66 float m[4][4];
69 struct d3d10_effect_object
71 struct d3d10_effect_pass *pass;
72 enum d3d10_effect_object_type type;
73 union
75 ID3D10RasterizerState *rs;
76 ID3D10DepthStencilState *ds;
77 ID3D10BlendState *bs;
78 ID3D10VertexShader *vs;
79 ID3D10PixelShader *ps;
80 ID3D10GeometryShader *gs;
81 } object;
84 struct d3d10_effect_shader_resource
86 D3D10_SHADER_INPUT_TYPE in_type;
87 unsigned int bind_point;
88 unsigned int bind_count;
90 struct d3d10_effect_variable *variable;
93 struct d3d10_effect_shader_signature
95 char *signature;
96 UINT signature_size;
97 UINT element_count;
98 D3D10_SIGNATURE_PARAMETER_DESC *elements;
101 struct d3d10_effect_shader_variable
103 struct d3d10_effect_shader_signature input_signature;
104 struct d3d10_effect_shader_signature output_signature;
105 union
107 ID3D10VertexShader *vs;
108 ID3D10PixelShader *ps;
109 ID3D10GeometryShader *gs;
110 } shader;
112 unsigned int resource_count;
113 struct d3d10_effect_shader_resource *resources;
116 struct d3d10_effect_state_object_variable
118 union
120 D3D10_RASTERIZER_DESC rasterizer;
121 D3D10_DEPTH_STENCIL_DESC depth_stencil;
122 D3D10_BLEND_DESC blend;
123 D3D10_SAMPLER_DESC sampler;
124 } desc;
125 union
127 ID3D10RasterizerState *rasterizer;
128 ID3D10DepthStencilState *depth_stencil;
129 ID3D10BlendState *blend;
130 ID3D10SamplerState *sampler;
131 } object;
134 struct d3d10_effect_resource_variable
136 ID3D10ShaderResourceView **srv;
137 BOOL parent;
140 struct d3d10_effect_buffer_variable
142 ID3D10Buffer *buffer;
143 ID3D10ShaderResourceView *resource_view;
145 BOOL changed;
146 BYTE *local_buffer;
149 /* ID3D10EffectType */
150 struct d3d10_effect_type
152 ID3D10EffectType ID3D10EffectType_iface;
154 char *name;
155 D3D10_SHADER_VARIABLE_TYPE basetype;
156 D3D10_SHADER_VARIABLE_CLASS type_class;
158 DWORD id;
159 struct wine_rb_entry entry;
160 struct d3d10_effect *effect;
162 DWORD element_count;
163 DWORD size_unpacked;
164 DWORD stride;
165 DWORD size_packed;
166 DWORD member_count;
167 DWORD column_count;
168 DWORD row_count;
169 struct d3d10_effect_type *elementtype;
170 struct d3d10_effect_type_member *members;
173 struct d3d10_effect_type_member
175 char *name;
176 char *semantic;
177 DWORD buffer_offset;
178 struct d3d10_effect_type *type;
181 /* ID3D10EffectVariable */
182 struct d3d10_effect_variable
184 ID3D10EffectVariable ID3D10EffectVariable_iface;
186 struct d3d10_effect_variable *buffer;
187 struct d3d10_effect_type *type;
189 char *name;
190 char *semantic;
191 DWORD buffer_offset;
192 DWORD annotation_count;
193 DWORD flag;
194 DWORD data_size;
195 struct d3d10_effect *effect;
196 struct d3d10_effect_variable *elements;
197 struct d3d10_effect_variable *members;
198 struct d3d10_effect_variable *annotations;
200 union
202 struct d3d10_effect_state_object_variable state;
203 struct d3d10_effect_shader_variable shader;
204 struct d3d10_effect_buffer_variable buffer;
205 struct d3d10_effect_resource_variable resource;
206 } u;
209 /* ID3D10EffectPass */
210 struct d3d10_effect_pass
212 ID3D10EffectPass ID3D10EffectPass_iface;
214 struct d3d10_effect_technique *technique;
215 char *name;
216 DWORD start;
217 DWORD object_count;
218 DWORD annotation_count;
219 struct d3d10_effect_object *objects;
220 struct d3d10_effect_variable *annotations;
222 D3D10_PASS_SHADER_DESC vs;
223 D3D10_PASS_SHADER_DESC ps;
224 D3D10_PASS_SHADER_DESC gs;
225 UINT stencil_ref;
226 UINT sample_mask;
227 float blend_factor[4];
230 /* ID3D10EffectTechnique */
231 struct d3d10_effect_technique
233 ID3D10EffectTechnique ID3D10EffectTechnique_iface;
235 struct d3d10_effect *effect;
236 char *name;
237 DWORD pass_count;
238 DWORD annotation_count;
239 struct d3d10_effect_pass *passes;
240 struct d3d10_effect_variable *annotations;
243 struct d3d10_effect_anonymous_shader
245 struct d3d10_effect_variable shader;
246 struct d3d10_effect_type type;
249 /* ID3D10Effect */
250 extern const struct ID3D10EffectVtbl d3d10_effect_vtbl DECLSPEC_HIDDEN;
251 struct d3d10_effect
253 ID3D10Effect ID3D10Effect_iface;
254 LONG refcount;
256 ID3D10Device *device;
257 DWORD version;
258 DWORD local_buffer_count;
259 DWORD variable_count;
260 DWORD local_variable_count;
261 DWORD sharedbuffers_count;
262 DWORD sharedobjects_count;
263 DWORD technique_count;
264 DWORD index_offset;
265 DWORD texture_count;
266 DWORD depthstencilstate_count;
267 DWORD blendstate_count;
268 DWORD rasterizerstate_count;
269 DWORD samplerstate_count;
270 DWORD rendertargetview_count;
271 DWORD depthstencilview_count;
272 DWORD used_shader_count;
273 DWORD anonymous_shader_count;
275 DWORD used_shader_current;
276 DWORD anonymous_shader_current;
278 struct wine_rb_tree types;
279 struct d3d10_effect_variable *local_buffers;
280 struct d3d10_effect_variable *local_variables;
281 struct d3d10_effect_anonymous_shader *anonymous_shaders;
282 struct d3d10_effect_variable **used_shaders;
283 struct d3d10_effect_technique *techniques;
286 HRESULT d3d10_effect_parse(struct d3d10_effect *This, const void *data, SIZE_T data_size) DECLSPEC_HIDDEN;
288 /* D3D10Core */
289 HRESULT WINAPI D3D10CoreCreateDevice(IDXGIFactory *factory, IDXGIAdapter *adapter,
290 unsigned int flags, D3D_FEATURE_LEVEL feature_level, ID3D10Device **device);
292 #endif /* __WINE_D3D10_PRIVATE_H */