mshtml: Implement MarkupServices_ParseString.
[wine.git] / dlls / d3d10 / d3d10_private.h
blob040976ffaa5bf79e7ff7c756c1a99488c8ca6201
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>
23 #include <stdint.h>
25 #include "wine/debug.h"
26 #include "wine/rbtree.h"
28 #define COBJMACROS
29 #include "winbase.h"
30 #include "winuser.h"
31 #include "objbase.h"
33 #include "d3d10.h"
34 #include "d3dcompiler.h"
35 #include "utils.h"
38 * This doesn't belong here, but for some functions it is possible to return that value,
39 * see http://msdn.microsoft.com/en-us/library/bb205278%28v=VS.85%29.aspx
40 * The original definition is in D3DX10core.h.
42 #define D3DERR_INVALIDCALL 0x8876086c
44 enum d3d10_effect_object_type_flags
46 D3D10_EOT_FLAG_GS_SO = 0x1,
49 enum d3d10_effect_object_operation
51 D3D10_EOO_CONST = 1,
52 D3D10_EOO_VAR = 2,
53 D3D10_EOO_CONST_INDEX = 3,
54 D3D10_EOO_VAR_INDEX = 4,
55 D3D10_EOO_INDEX_EXPRESSION = 5,
56 D3D10_EOO_VALUE_EXPRESSION = 6,
57 D3D10_EOO_ANONYMOUS_SHADER = 7,
60 struct d3d10_matrix
62 float m[4][4];
65 struct d3d10_effect_shader_resource
67 D3D10_SHADER_INPUT_TYPE in_type;
68 unsigned int bind_point;
69 unsigned int bind_count;
71 struct d3d10_effect_variable *variable;
74 struct d3d10_effect_shader_signature
76 char *signature;
77 unsigned int signature_size;
78 unsigned int element_count;
79 D3D10_SIGNATURE_PARAMETER_DESC *elements;
82 struct d3d10_effect_shader_variable
84 ID3D10ShaderReflection *reflection;
85 ID3D10Blob *input_signature;
86 ID3D10Blob *bytecode;
87 union
89 ID3D10VertexShader *vs;
90 ID3D10PixelShader *ps;
91 ID3D10GeometryShader *gs;
92 IUnknown *object;
93 } shader;
95 unsigned int resource_count;
96 struct d3d10_effect_shader_resource *resources;
97 char *stream_output_declaration;
98 unsigned int isinline : 1;
101 struct d3d10_effect_prop_dependencies
103 struct d3d10_effect_prop_dependency *entries;
104 SIZE_T count;
105 SIZE_T capacity;
108 struct d3d10_effect_sampler_desc
110 D3D10_SAMPLER_DESC desc;
111 struct d3d10_effect_variable *texture;
114 struct d3d10_effect_state_object_variable
116 union
118 D3D10_RASTERIZER_DESC rasterizer;
119 D3D10_DEPTH_STENCIL_DESC depth_stencil;
120 D3D10_BLEND_DESC blend;
121 struct d3d10_effect_sampler_desc sampler;
122 } desc;
123 union
125 ID3D10RasterizerState *rasterizer;
126 ID3D10DepthStencilState *depth_stencil;
127 ID3D10BlendState *blend;
128 ID3D10SamplerState *sampler;
129 IUnknown *object;
130 } object;
131 unsigned int index;
132 struct d3d10_effect_prop_dependencies dependencies;
135 struct d3d10_effect_resource_variable
137 ID3D10ShaderResourceView **srv;
138 BOOL parent;
141 struct d3d10_effect_buffer_variable
143 ID3D10Buffer *buffer;
144 ID3D10ShaderResourceView *resource_view;
146 BOOL changed;
147 BYTE *local_buffer;
150 /* ID3D10EffectType */
151 struct d3d10_effect_type
153 ID3D10EffectType ID3D10EffectType_iface;
155 char *name;
156 D3D10_SHADER_VARIABLE_TYPE basetype;
157 D3D10_SHADER_VARIABLE_CLASS type_class;
158 unsigned int flags;
160 DWORD id;
161 struct wine_rb_entry entry;
162 struct d3d10_effect *effect;
164 unsigned int element_count;
165 unsigned int size_unpacked;
166 unsigned int stride;
167 unsigned int size_packed;
168 unsigned int member_count;
169 unsigned int column_count;
170 unsigned int row_count;
171 struct d3d10_effect_type *elementtype;
172 struct d3d10_effect_type_member *members;
175 struct d3d10_effect_type_member
177 char *name;
178 char *semantic;
179 uint32_t buffer_offset;
180 struct d3d10_effect_type *type;
183 struct d3d10_effect_annotations
185 struct d3d10_effect_variable *elements;
186 unsigned int count;
189 /* ID3D10EffectVariable */
190 struct d3d10_effect_variable
192 ID3D10EffectVariable ID3D10EffectVariable_iface;
194 struct d3d10_effect_variable *buffer;
195 struct d3d10_effect_type *type;
197 char *name;
198 char *semantic;
199 uint32_t buffer_offset;
200 uint32_t flag;
201 uint32_t data_size;
202 unsigned int explicit_bind_point;
203 struct d3d10_effect *effect;
204 struct d3d10_effect_variable *elements;
205 struct d3d10_effect_variable *members;
206 struct d3d10_effect_annotations annotations;
208 union
210 struct d3d10_effect_state_object_variable state;
211 struct d3d10_effect_shader_variable shader;
212 struct d3d10_effect_buffer_variable buffer;
213 struct d3d10_effect_resource_variable resource;
214 } u;
217 struct d3d10_effect_pass_shader_desc
219 struct d3d10_effect_variable *shader;
220 unsigned int index;
223 /* ID3D10EffectPass */
224 struct d3d10_effect_pass
226 ID3D10EffectPass ID3D10EffectPass_iface;
228 struct d3d10_effect_technique *technique;
229 char *name;
230 struct d3d10_effect_annotations annotations;
232 struct d3d10_effect_prop_dependencies dependencies;
233 struct d3d10_effect_pass_shader_desc vs;
234 struct d3d10_effect_pass_shader_desc ps;
235 struct d3d10_effect_pass_shader_desc gs;
236 struct d3d10_effect_variable *rasterizer;
237 struct d3d10_effect_variable *depth_stencil;
238 struct d3d10_effect_variable *blend;
239 UINT stencil_ref;
240 UINT sample_mask;
241 float blend_factor[4];
244 /* ID3D10EffectTechnique */
245 struct d3d10_effect_technique
247 ID3D10EffectTechnique ID3D10EffectTechnique_iface;
249 struct d3d10_effect *effect;
250 char *name;
251 struct d3d10_effect_annotations annotations;
252 unsigned int pass_count;
253 struct d3d10_effect_pass *passes;
256 struct d3d10_effect_anonymous_shader
258 struct d3d10_effect_variable shader;
259 struct d3d10_effect_type type;
262 enum d3d10_effect_flags
264 D3D10_EFFECT_OPTIMIZED = 0x1,
265 D3D10_EFFECT_IS_POOL = 0x2,
268 struct d3d10_effect_var_array
270 struct d3d10_effect_variable **v;
271 unsigned int current;
272 unsigned int count;
275 /* ID3D10Effect */
276 struct d3d10_effect
278 ID3D10Effect ID3D10Effect_iface;
279 ID3D10EffectPool ID3D10EffectPool_iface;
280 LONG refcount;
282 ID3D10Device *device;
283 struct d3d10_effect *pool;
284 uint32_t version;
285 unsigned int local_buffer_count;
286 unsigned int variable_count;
287 unsigned int local_variable_count;
288 unsigned int shared_buffer_count;
289 unsigned int shared_object_count;
290 unsigned int technique_count;
291 uint32_t index_offset;
292 unsigned int texture_count;
293 unsigned int anonymous_shader_count;
294 uint32_t flags;
296 unsigned int anonymous_shader_current;
298 struct wine_rb_tree types;
299 struct d3d10_effect_variable *local_buffers;
300 struct d3d10_effect_variable *local_variables;
301 struct d3d10_effect_anonymous_shader *anonymous_shaders;
302 struct d3d10_effect_var_array shaders;
303 struct d3d10_effect_var_array samplers;
304 struct d3d10_effect_var_array rtvs;
305 struct d3d10_effect_var_array dsvs;
306 struct d3d10_effect_var_array blend_states;
307 struct d3d10_effect_var_array ds_states;
308 struct d3d10_effect_var_array rs_states;
309 struct d3d10_effect_technique *techniques;
312 HRESULT d3d10_effect_parse(struct d3d10_effect *effect, const void *data, SIZE_T data_size);
314 /* D3D10Core */
315 HRESULT WINAPI D3D10CoreCreateDevice(IDXGIFactory *factory, IDXGIAdapter *adapter,
316 unsigned int flags, D3D_FEATURE_LEVEL feature_level, ID3D10Device **device);
318 /* d3dcompiler_39 function prototypes */
319 HRESULT WINAPI D3DCompileFromMemory(const void *data, SIZE_T data_size, const char *filename,
320 const D3D_SHADER_MACRO *defines, ID3DInclude *include, const char *entrypoint,
321 const char *target, UINT sflags, UINT eflags, ID3DBlob **shader, ID3DBlob **error_messages);
323 HRESULT WINAPI D3DDisassembleCode(const void *data, SIZE_T data_size,
324 UINT flags, const char *comments, ID3DBlob **disassembly);
326 #endif /* __WINE_D3D10_PRIVATE_H */