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 "wine/debug.h"
23 #include "wine/rbtree.h"
32 /* TRACE helper functions */
33 const char *debug_d3d10_driver_type(D3D10_DRIVER_TYPE driver_type) DECLSPEC_HIDDEN;
34 const char *debug_d3d10_shader_variable_class(D3D10_SHADER_VARIABLE_CLASS c) DECLSPEC_HIDDEN;
35 const char *debug_d3d10_shader_variable_type(D3D10_SHADER_VARIABLE_TYPE t) DECLSPEC_HIDDEN;
37 void *d3d10_rb_alloc(size_t size) DECLSPEC_HIDDEN;
38 void *d3d10_rb_realloc(void *ptr, size_t size) DECLSPEC_HIDDEN;
39 void d3d10_rb_free(void *ptr) DECLSPEC_HIDDEN;
41 enum d3d10_effect_object_type
43 D3D10_EOT_VERTEXSHADER = 6,
44 D3D10_EOT_PIXELSHADER = 7,
45 D3D10_EOT_GEOMETRYSHADER = 8,
48 struct d3d10_effect_object
50 struct d3d10_effect_pass *pass;
51 enum d3d10_effect_object_type type;
56 struct d3d10_effect_shader_variable
58 char *input_signature;
59 UINT input_signature_size;
62 ID3D10VertexShader *vs;
63 ID3D10PixelShader *ps;
64 ID3D10GeometryShader *gs;
68 /* ID3D10EffectType */
69 struct d3d10_effect_type
71 const struct ID3D10EffectTypeVtbl *vtbl;
74 struct wine_rb_entry entry;
75 struct d3d10_effect *effect;
85 D3D10_SHADER_VARIABLE_TYPE basetype;
86 D3D10_SHADER_VARIABLE_CLASS type_class;
87 struct d3d10_effect_type_member *members;
90 struct d3d10_effect_type_member
95 struct d3d10_effect_type *type;
98 /* ID3D10EffectVariable */
99 struct d3d10_effect_variable
101 const struct ID3D10EffectVariableVtbl *vtbl;
103 struct d3d10_effect_variable *buffer;
104 struct d3d10_effect *effect;
109 DWORD annotation_count;
112 struct d3d10_effect_type *type;
113 struct d3d10_effect_variable *members;
114 struct d3d10_effect_variable *annotations;
117 /* ID3D10EffectPass */
118 struct d3d10_effect_pass
120 const struct ID3D10EffectPassVtbl *vtbl;
122 struct d3d10_effect_technique *technique;
126 DWORD annotation_count;
127 struct d3d10_effect_object *objects;
128 struct d3d10_effect_variable *annotations;
131 /* ID3D10EffectTechnique */
132 struct d3d10_effect_technique
134 const struct ID3D10EffectTechniqueVtbl *vtbl;
136 struct d3d10_effect *effect;
139 DWORD annotation_count;
140 struct d3d10_effect_pass *passes;
141 struct d3d10_effect_variable *annotations;
145 extern const struct ID3D10EffectVtbl d3d10_effect_vtbl DECLSPEC_HIDDEN;
148 const struct ID3D10EffectVtbl *vtbl;
151 ID3D10Device *device;
153 DWORD local_buffer_count;
154 DWORD variable_count;
156 DWORD sharedbuffers_count;
157 DWORD sharedobjects_count;
158 DWORD technique_count;
161 DWORD dephstencilstate_count;
162 DWORD blendstate_count;
163 DWORD rasterizerstate_count;
164 DWORD samplerstate_count;
165 DWORD rendertargetview_count;
166 DWORD depthstencilview_count;
167 DWORD shader_call_count;
168 DWORD shader_compile_count;
170 struct wine_rb_tree types;
171 struct d3d10_effect_variable *local_buffers;
172 struct d3d10_effect_technique *techniques;
175 HRESULT d3d10_effect_parse(struct d3d10_effect *This, const void *data, SIZE_T data_size) DECLSPEC_HIDDEN;
178 HRESULT WINAPI D3D10CoreCreateDevice(IDXGIFactory *factory, IDXGIAdapter *adapter,
179 UINT flags, DWORD unknown0, ID3D10Device **device);
181 #endif /* __WINE_D3D10_PRIVATE_H */