po: Update German translation.
[wine/multimedia.git] / dlls / d3d10 / effect.c
blobb5cf791dbeb364532049ec7fd54f0d311092d430
1 /*
2 * Copyright 2009 Henri Verbeet for CodeWeavers
3 * Copyright 2009 Rico Schüller
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include "config.h"
22 #include "wine/port.h"
24 #include "d3d10_private.h"
26 WINE_DEFAULT_DEBUG_CHANNEL(d3d10);
28 #define D3D10_FX10_TYPE_COLUMN_SHIFT 11
29 #define D3D10_FX10_TYPE_COLUMN_MASK (0x7 << D3D10_FX10_TYPE_COLUMN_SHIFT)
31 #define D3D10_FX10_TYPE_ROW_SHIFT 8
32 #define D3D10_FX10_TYPE_ROW_MASK (0x7 << D3D10_FX10_TYPE_ROW_SHIFT)
34 #define D3D10_FX10_TYPE_BASETYPE_SHIFT 3
35 #define D3D10_FX10_TYPE_BASETYPE_MASK (0x1f << D3D10_FX10_TYPE_BASETYPE_SHIFT)
37 #define D3D10_FX10_TYPE_CLASS_SHIFT 0
38 #define D3D10_FX10_TYPE_CLASS_MASK (0x7 << D3D10_FX10_TYPE_CLASS_SHIFT)
40 #define D3D10_FX10_TYPE_MATRIX_COLUMN_MAJOR_MASK 0x4000
42 static const struct ID3D10EffectTechniqueVtbl d3d10_effect_technique_vtbl;
43 static const struct ID3D10EffectPassVtbl d3d10_effect_pass_vtbl;
44 static const struct ID3D10EffectVariableVtbl d3d10_effect_variable_vtbl;
45 static const struct ID3D10EffectConstantBufferVtbl d3d10_effect_constant_buffer_vtbl;
46 static const struct ID3D10EffectScalarVariableVtbl d3d10_effect_scalar_variable_vtbl;
47 static const struct ID3D10EffectVectorVariableVtbl d3d10_effect_vector_variable_vtbl;
48 static const struct ID3D10EffectMatrixVariableVtbl d3d10_effect_matrix_variable_vtbl;
49 static const struct ID3D10EffectStringVariableVtbl d3d10_effect_string_variable_vtbl;
50 static const struct ID3D10EffectShaderResourceVariableVtbl d3d10_effect_shader_resource_variable_vtbl;
51 static const struct ID3D10EffectRenderTargetViewVariableVtbl d3d10_effect_render_target_view_variable_vtbl;
52 static const struct ID3D10EffectDepthStencilViewVariableVtbl d3d10_effect_depth_stencil_view_variable_vtbl;
53 static const struct ID3D10EffectShaderVariableVtbl d3d10_effect_shader_variable_vtbl;
54 static const struct ID3D10EffectBlendVariableVtbl d3d10_effect_blend_variable_vtbl;
55 static const struct ID3D10EffectDepthStencilVariableVtbl d3d10_effect_depth_stencil_variable_vtbl;
56 static const struct ID3D10EffectRasterizerVariableVtbl d3d10_effect_rasterizer_variable_vtbl;
57 static const struct ID3D10EffectSamplerVariableVtbl d3d10_effect_sampler_variable_vtbl;
58 static const struct ID3D10EffectTypeVtbl d3d10_effect_type_vtbl;
60 /* null objects - needed for invalid calls */
61 static struct d3d10_effect_technique null_technique = {{&d3d10_effect_technique_vtbl}};
62 static struct d3d10_effect_pass null_pass = {{&d3d10_effect_pass_vtbl}};
63 static struct d3d10_effect_type null_type = {{&d3d10_effect_type_vtbl}};
64 static struct d3d10_effect_variable null_local_buffer = {{(const ID3D10EffectVariableVtbl *)&d3d10_effect_constant_buffer_vtbl},
65 &null_local_buffer, &null_type};
66 static struct d3d10_effect_variable null_variable = {{&d3d10_effect_variable_vtbl},
67 &null_local_buffer, &null_type};
68 static struct d3d10_effect_variable null_scalar_variable = {{(const ID3D10EffectVariableVtbl *)&d3d10_effect_scalar_variable_vtbl},
69 &null_local_buffer, &null_type};
70 static struct d3d10_effect_variable null_vector_variable = {{(const ID3D10EffectVariableVtbl *)&d3d10_effect_vector_variable_vtbl},
71 &null_local_buffer, &null_type};
72 static struct d3d10_effect_variable null_matrix_variable = {{(const ID3D10EffectVariableVtbl *)&d3d10_effect_matrix_variable_vtbl},
73 &null_local_buffer, &null_type};
74 static struct d3d10_effect_variable null_string_variable = {{(const ID3D10EffectVariableVtbl *)&d3d10_effect_string_variable_vtbl},
75 &null_local_buffer, &null_type};
76 static struct d3d10_effect_variable null_shader_resource_variable = {{(const ID3D10EffectVariableVtbl *)&d3d10_effect_shader_resource_variable_vtbl},
77 &null_local_buffer, &null_type};
78 static struct d3d10_effect_variable null_render_target_view_variable = {{(const ID3D10EffectVariableVtbl *)&d3d10_effect_render_target_view_variable_vtbl},
79 &null_local_buffer, &null_type};
80 static struct d3d10_effect_variable null_depth_stencil_view_variable = {{(const ID3D10EffectVariableVtbl *)&d3d10_effect_depth_stencil_view_variable_vtbl},
81 &null_local_buffer, &null_type};
82 static struct d3d10_effect_variable null_shader_variable = {{(const ID3D10EffectVariableVtbl *)&d3d10_effect_shader_variable_vtbl},
83 &null_local_buffer, &null_type};
84 static struct d3d10_effect_variable null_blend_variable = {{(const ID3D10EffectVariableVtbl *)&d3d10_effect_blend_variable_vtbl},
85 &null_local_buffer, &null_type};
86 static struct d3d10_effect_variable null_depth_stencil_variable = {{(const ID3D10EffectVariableVtbl *)&d3d10_effect_depth_stencil_variable_vtbl},
87 &null_local_buffer, &null_type};
88 static struct d3d10_effect_variable null_rasterizer_variable = {{(const ID3D10EffectVariableVtbl *)&d3d10_effect_rasterizer_variable_vtbl},
89 &null_local_buffer, &null_type};
90 static struct d3d10_effect_variable null_sampler_variable = {{(const ID3D10EffectVariableVtbl *)&d3d10_effect_sampler_variable_vtbl},
91 &null_local_buffer, &null_type};
93 /* anonymous_shader_type and anonymous_shader */
94 static char anonymous_name[] = "$Anonymous";
95 static char anonymous_vertexshader_name[] = "vertexshader";
96 static char anonymous_pixelshader_name[] = "pixelshader";
97 static char anonymous_geometryshader_name[] = "geometryshader";
98 static struct d3d10_effect_type anonymous_vs_type = {{&d3d10_effect_type_vtbl},
99 anonymous_vertexshader_name, D3D10_SVT_VERTEXSHADER, D3D10_SVC_OBJECT};
100 static struct d3d10_effect_type anonymous_ps_type = {{&d3d10_effect_type_vtbl},
101 anonymous_pixelshader_name, D3D10_SVT_PIXELSHADER, D3D10_SVC_OBJECT};
102 static struct d3d10_effect_type anonymous_gs_type = {{&d3d10_effect_type_vtbl},
103 anonymous_geometryshader_name, D3D10_SVT_GEOMETRYSHADER, D3D10_SVC_OBJECT};
104 static struct d3d10_effect_variable anonymous_vs = {{(const ID3D10EffectVariableVtbl *)&d3d10_effect_shader_variable_vtbl},
105 &null_local_buffer, &anonymous_vs_type, &null_shader_variable, anonymous_name};
106 static struct d3d10_effect_variable anonymous_ps = {{(const ID3D10EffectVariableVtbl *)&d3d10_effect_shader_variable_vtbl},
107 &null_local_buffer, &anonymous_ps_type, &null_shader_variable, anonymous_name};
108 static struct d3d10_effect_variable anonymous_gs = {{(const ID3D10EffectVariableVtbl *)&d3d10_effect_shader_variable_vtbl},
109 &null_local_buffer, &anonymous_gs_type, &null_shader_variable, anonymous_name};
111 static struct d3d10_effect_type *get_fx10_type(struct d3d10_effect *effect, const char *data, DWORD offset);
113 static inline struct d3d10_effect_variable *impl_from_ID3D10EffectVariable(ID3D10EffectVariable *iface)
115 return CONTAINING_RECORD(iface, struct d3d10_effect_variable, ID3D10EffectVariable_iface);
118 static BOOL copy_name(const char *ptr, char **name)
120 size_t name_len;
122 if (!ptr) return TRUE;
124 name_len = strlen(ptr) + 1;
125 if (name_len == 1)
127 return TRUE;
130 *name = HeapAlloc(GetProcessHeap(), 0, name_len);
131 if (!*name)
133 ERR("Failed to allocate name memory.\n");
134 return FALSE;
137 memcpy(*name, ptr, name_len);
139 return TRUE;
142 static HRESULT shader_parse_signature(const char *data, DWORD data_size, struct d3d10_effect_shader_signature *s)
144 D3D10_SIGNATURE_PARAMETER_DESC *e;
145 const char *ptr = data;
146 unsigned int i;
147 DWORD count;
149 read_dword(&ptr, &count);
150 TRACE("%u elements\n", count);
152 skip_dword_unknown("shader signature", &ptr, 1);
154 e = HeapAlloc(GetProcessHeap(), 0, count * sizeof(*e));
155 if (!e)
157 ERR("Failed to allocate signature memory.\n");
158 return E_OUTOFMEMORY;
161 for (i = 0; i < count; ++i)
163 UINT name_offset;
164 UINT mask;
166 read_dword(&ptr, &name_offset);
167 e[i].SemanticName = data + name_offset;
168 read_dword(&ptr, &e[i].SemanticIndex);
169 read_dword(&ptr, &e[i].SystemValueType);
170 read_dword(&ptr, &e[i].ComponentType);
171 read_dword(&ptr, &e[i].Register);
172 read_dword(&ptr, &mask);
174 e[i].ReadWriteMask = mask >> 8;
175 e[i].Mask = mask & 0xff;
177 TRACE("semantic: %s, semantic idx: %u, sysval_semantic %#x, "
178 "type %u, register idx: %u, use_mask %#x, input_mask %#x\n",
179 debugstr_a(e[i].SemanticName), e[i].SemanticIndex, e[i].SystemValueType,
180 e[i].ComponentType, e[i].Register, e[i].Mask, e[i].ReadWriteMask);
183 s->elements = e;
184 s->element_count = count;
186 return S_OK;
189 static void shader_free_signature(struct d3d10_effect_shader_signature *s)
191 HeapFree(GetProcessHeap(), 0, s->signature);
192 HeapFree(GetProcessHeap(), 0, s->elements);
195 static HRESULT shader_chunk_handler(const char *data, DWORD data_size, DWORD tag, void *ctx)
197 struct d3d10_effect_shader_variable *s = ctx;
198 HRESULT hr;
200 TRACE("tag: %s.\n", debugstr_an((const char *)&tag, 4));
202 TRACE("chunk size: %#x\n", data_size);
204 switch(tag)
206 case TAG_ISGN:
207 case TAG_OSGN:
209 /* 32 (DXBC header) + 1 * 4 (chunk index) + 2 * 4 (chunk header) + data_size (chunk data) */
210 UINT size = 44 + data_size;
211 struct d3d10_effect_shader_signature *sig;
212 char *ptr;
214 if (tag == TAG_ISGN) sig = &s->input_signature;
215 else sig = &s->output_signature;
217 sig->signature = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size);
218 if (!sig->signature)
220 ERR("Failed to allocate input signature data\n");
221 return E_OUTOFMEMORY;
223 sig->signature_size = size;
225 ptr = sig->signature;
227 write_dword(&ptr, TAG_DXBC);
229 /* signature(?) */
230 write_dword_unknown(&ptr, 0);
231 write_dword_unknown(&ptr, 0);
232 write_dword_unknown(&ptr, 0);
233 write_dword_unknown(&ptr, 0);
235 /* seems to be always 1 */
236 write_dword_unknown(&ptr, 1);
238 /* DXBC size */
239 write_dword(&ptr, size);
241 /* chunk count */
242 write_dword(&ptr, 1);
244 /* chunk index */
245 write_dword(&ptr, (ptr - sig->signature) + 4);
247 /* chunk */
248 write_dword(&ptr, tag);
249 write_dword(&ptr, data_size);
250 memcpy(ptr, data, data_size);
252 hr = shader_parse_signature(ptr, data_size, sig);
253 if (FAILED(hr))
255 ERR("Failed to parse shader, hr %#x\n", hr);
256 shader_free_signature(sig);
259 break;
262 default:
263 FIXME("Unhandled chunk %s.\n", debugstr_an((const char *)&tag, 4));
264 break;
267 return S_OK;
270 static HRESULT parse_shader(struct d3d10_effect_variable *v, const char *data)
272 ID3D10Device *device = v->effect->device;
273 struct d3d10_effect_shader_variable *s;
274 const char *ptr = data;
275 DWORD dxbc_size;
276 HRESULT hr;
278 s = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*s));
279 if (!s)
281 ERR("Failed to allocate shader variable memory\n");
282 return E_OUTOFMEMORY;
285 v->data = s;
287 if (v->effect->used_shader_current >= v->effect->used_shader_count)
289 WARN("Invalid shader? Used shader current(%u) >= used shader count(%u)\n", v->effect->used_shader_current, v->effect->used_shader_count);
290 return E_FAIL;
293 v->effect->used_shaders[v->effect->used_shader_current] = v;
294 ++v->effect->used_shader_current;
296 if (!ptr) return S_OK;
298 read_dword(&ptr, &dxbc_size);
299 TRACE("dxbc size: %#x\n", dxbc_size);
301 /* We got a shader VertexShader vs = NULL, so it is fine to skip this. */
302 if (!dxbc_size) return S_OK;
304 switch (v->type->basetype)
306 case D3D10_SVT_VERTEXSHADER:
307 hr = ID3D10Device_CreateVertexShader(device, ptr, dxbc_size, &s->shader.vs);
308 if (FAILED(hr)) return hr;
309 break;
311 case D3D10_SVT_PIXELSHADER:
312 hr = ID3D10Device_CreatePixelShader(device, ptr, dxbc_size, &s->shader.ps);
313 if (FAILED(hr)) return hr;
314 break;
316 case D3D10_SVT_GEOMETRYSHADER:
317 hr = ID3D10Device_CreateGeometryShader(device, ptr, dxbc_size, &s->shader.gs);
318 if (FAILED(hr)) return hr;
319 break;
321 default:
322 ERR("This should not happen!\n");
323 return E_FAIL;
326 return parse_dxbc(ptr, dxbc_size, shader_chunk_handler, s);
329 static D3D10_SHADER_VARIABLE_CLASS d3d10_variable_class(DWORD c, BOOL is_column_major)
331 switch (c)
333 case 1: return D3D10_SVC_SCALAR;
334 case 2: return D3D10_SVC_VECTOR;
335 case 3: if (is_column_major) return D3D10_SVC_MATRIX_COLUMNS;
336 else return D3D10_SVC_MATRIX_ROWS;
337 default:
338 FIXME("Unknown variable class %#x.\n", c);
339 return 0;
343 static D3D10_SHADER_VARIABLE_TYPE d3d10_variable_type(DWORD t, BOOL is_object)
345 if(is_object)
347 switch (t)
349 case 1: return D3D10_SVT_STRING;
350 case 2: return D3D10_SVT_BLEND;
351 case 3: return D3D10_SVT_DEPTHSTENCIL;
352 case 4: return D3D10_SVT_RASTERIZER;
353 case 5: return D3D10_SVT_PIXELSHADER;
354 case 6: return D3D10_SVT_VERTEXSHADER;
355 case 7: return D3D10_SVT_GEOMETRYSHADER;
357 case 10: return D3D10_SVT_TEXTURE1D;
358 case 11: return D3D10_SVT_TEXTURE1DARRAY;
359 case 12: return D3D10_SVT_TEXTURE2D;
360 case 13: return D3D10_SVT_TEXTURE2DARRAY;
361 case 14: return D3D10_SVT_TEXTURE2DMS;
362 case 15: return D3D10_SVT_TEXTURE2DMSARRAY;
363 case 16: return D3D10_SVT_TEXTURE3D;
364 case 17: return D3D10_SVT_TEXTURECUBE;
366 case 19: return D3D10_SVT_RENDERTARGETVIEW;
367 case 20: return D3D10_SVT_DEPTHSTENCILVIEW;
368 case 21: return D3D10_SVT_SAMPLER;
369 case 22: return D3D10_SVT_BUFFER;
370 default:
371 FIXME("Unknown variable type %#x.\n", t);
372 return D3D10_SVT_VOID;
375 else
377 switch (t)
379 case 1: return D3D10_SVT_FLOAT;
380 case 2: return D3D10_SVT_INT;
381 case 3: return D3D10_SVT_UINT;
382 case 4: return D3D10_SVT_BOOL;
383 default:
384 FIXME("Unknown variable type %#x.\n", t);
385 return D3D10_SVT_VOID;
390 static HRESULT parse_fx10_type(struct d3d10_effect_type *t, const char *ptr, const char *data)
392 DWORD unknown0;
393 DWORD offset;
394 DWORD typeinfo;
395 unsigned int i;
397 read_dword(&ptr, &offset);
398 TRACE("Type name at offset %#x.\n", offset);
400 if (!copy_name(data + offset, &t->name))
402 ERR("Failed to copy name.\n");
403 return E_OUTOFMEMORY;
405 TRACE("Type name: %s.\n", debugstr_a(t->name));
407 read_dword(&ptr, &unknown0);
408 TRACE("Unknown 0: %u.\n", unknown0);
410 read_dword(&ptr, &t->element_count);
411 TRACE("Element count: %u.\n", t->element_count);
413 read_dword(&ptr, &t->size_unpacked);
414 TRACE("Unpacked size: %#x.\n", t->size_unpacked);
416 read_dword(&ptr, &t->stride);
417 TRACE("Stride: %#x.\n", t->stride);
419 read_dword(&ptr, &t->size_packed);
420 TRACE("Packed size %#x.\n", t->size_packed);
422 switch (unknown0)
424 case 1:
425 t->member_count = 0;
427 read_dword(&ptr, &typeinfo);
428 t->column_count = (typeinfo & D3D10_FX10_TYPE_COLUMN_MASK) >> D3D10_FX10_TYPE_COLUMN_SHIFT;
429 t->row_count = (typeinfo & D3D10_FX10_TYPE_ROW_MASK) >> D3D10_FX10_TYPE_ROW_SHIFT;
430 t->basetype = d3d10_variable_type((typeinfo & D3D10_FX10_TYPE_BASETYPE_MASK) >> D3D10_FX10_TYPE_BASETYPE_SHIFT, FALSE);
431 t->type_class = d3d10_variable_class((typeinfo & D3D10_FX10_TYPE_CLASS_MASK) >> D3D10_FX10_TYPE_CLASS_SHIFT, typeinfo & D3D10_FX10_TYPE_MATRIX_COLUMN_MAJOR_MASK);
433 TRACE("Type description: %#x.\n", typeinfo);
434 TRACE("\tcolumns: %u.\n", t->column_count);
435 TRACE("\trows: %u.\n", t->row_count);
436 TRACE("\tbasetype: %s.\n", debug_d3d10_shader_variable_type(t->basetype));
437 TRACE("\tclass: %s.\n", debug_d3d10_shader_variable_class(t->type_class));
438 TRACE("\tunknown bits: %#x.\n", typeinfo & ~(D3D10_FX10_TYPE_COLUMN_MASK | D3D10_FX10_TYPE_ROW_MASK
439 | D3D10_FX10_TYPE_BASETYPE_MASK | D3D10_FX10_TYPE_CLASS_MASK | D3D10_FX10_TYPE_MATRIX_COLUMN_MAJOR_MASK));
440 break;
442 case 2:
443 TRACE("Type is an object.\n");
445 t->member_count = 0;
446 t->column_count = 0;
447 t->row_count = 0;
448 t->type_class = D3D10_SVC_OBJECT;
450 read_dword(&ptr, &typeinfo);
451 t->basetype = d3d10_variable_type(typeinfo, TRUE);
453 TRACE("Type description: %#x.\n", typeinfo);
454 TRACE("\tbasetype: %s.\n", debug_d3d10_shader_variable_type(t->basetype));
455 TRACE("\tclass: %s.\n", debug_d3d10_shader_variable_class(t->type_class));
456 break;
458 case 3:
459 TRACE("Type is a structure.\n");
461 read_dword(&ptr, &t->member_count);
462 TRACE("Member count: %u.\n", t->member_count);
464 t->column_count = 0;
465 t->row_count = 0;
466 t->basetype = 0;
467 t->type_class = D3D10_SVC_STRUCT;
469 t->members = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, t->member_count * sizeof(*t->members));
470 if (!t->members)
472 ERR("Failed to allocate members memory.\n");
473 return E_OUTOFMEMORY;
476 for (i = 0; i < t->member_count; ++i)
478 struct d3d10_effect_type_member *typem = &t->members[i];
480 read_dword(&ptr, &offset);
481 TRACE("Member name at offset %#x.\n", offset);
483 if (!copy_name(data + offset, &typem->name))
485 ERR("Failed to copy name.\n");
486 return E_OUTOFMEMORY;
488 TRACE("Member name: %s.\n", debugstr_a(typem->name));
490 read_dword(&ptr, &offset);
491 TRACE("Member semantic at offset %#x.\n", offset);
493 if (!copy_name(data + offset, &typem->semantic))
495 ERR("Failed to copy semantic.\n");
496 return E_OUTOFMEMORY;
498 TRACE("Member semantic: %s.\n", debugstr_a(typem->semantic));
500 read_dword(&ptr, &typem->buffer_offset);
501 TRACE("Member offset in struct: %#x.\n", typem->buffer_offset);
503 read_dword(&ptr, &offset);
504 TRACE("Member type info at offset %#x.\n", offset);
506 typem->type = get_fx10_type(t->effect, data, offset);
507 if (!typem->type)
509 ERR("Failed to get variable type.\n");
510 return E_FAIL;
513 break;
515 default:
516 FIXME("Unhandled case %#x.\n", unknown0);
517 return E_FAIL;
520 if (t->element_count)
522 TRACE("Elementtype for type at offset: %#x\n", t->id);
524 /* allocate elementtype - we need only one, because all elements have the same type */
525 t->elementtype = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*t->elementtype));
526 if (!t->elementtype)
528 ERR("Failed to allocate members memory.\n");
529 return E_OUTOFMEMORY;
532 /* create a copy of the original type with some minor changes */
533 t->elementtype->ID3D10EffectType_iface.lpVtbl = &d3d10_effect_type_vtbl;
534 t->elementtype->effect = t->effect;
536 if (!copy_name(t->name, &t->elementtype->name))
538 ERR("Failed to copy name.\n");
539 return E_OUTOFMEMORY;
541 TRACE("\tType name: %s.\n", debugstr_a(t->elementtype->name));
543 t->elementtype->element_count = 0;
544 TRACE("\tElement count: %u.\n", t->elementtype->element_count);
547 * Not sure if this calculation is 100% correct, but a test
548 * shows that these values work.
550 t->elementtype->size_unpacked = t->size_packed / t->element_count;
551 TRACE("\tUnpacked size: %#x.\n", t->elementtype->size_unpacked);
553 t->elementtype->stride = t->stride;
554 TRACE("\tStride: %#x.\n", t->elementtype->stride);
556 t->elementtype->size_packed = t->size_packed / t->element_count;
557 TRACE("\tPacked size: %#x.\n", t->elementtype->size_packed);
559 t->elementtype->member_count = t->member_count;
560 TRACE("\tMember count: %u.\n", t->elementtype->member_count);
562 t->elementtype->column_count = t->column_count;
563 TRACE("\tColumns: %u.\n", t->elementtype->column_count);
565 t->elementtype->row_count = t->row_count;
566 TRACE("\tRows: %u.\n", t->elementtype->row_count);
568 t->elementtype->basetype = t->basetype;
569 TRACE("\tBasetype: %s.\n", debug_d3d10_shader_variable_type(t->elementtype->basetype));
571 t->elementtype->type_class = t->type_class;
572 TRACE("\tClass: %s.\n", debug_d3d10_shader_variable_class(t->elementtype->type_class));
574 t->elementtype->members = t->members;
577 return S_OK;
580 static struct d3d10_effect_type *get_fx10_type(struct d3d10_effect *effect, const char *data, DWORD offset)
582 struct d3d10_effect_type *type;
583 struct wine_rb_entry *entry;
584 HRESULT hr;
586 entry = wine_rb_get(&effect->types, &offset);
587 if (entry)
589 TRACE("Returning existing type.\n");
590 return WINE_RB_ENTRY_VALUE(entry, struct d3d10_effect_type, entry);
593 type = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*type));
594 if (!type)
596 ERR("Failed to allocate type memory.\n");
597 return NULL;
600 type->ID3D10EffectType_iface.lpVtbl = &d3d10_effect_type_vtbl;
601 type->id = offset;
602 type->effect = effect;
603 hr = parse_fx10_type(type, data + offset, data);
604 if (FAILED(hr))
606 ERR("Failed to parse type info, hr %#x.\n", hr);
607 HeapFree(GetProcessHeap(), 0, type);
608 return NULL;
611 if (wine_rb_put(&effect->types, &offset, &type->entry) == -1)
613 ERR("Failed to insert type entry.\n");
614 HeapFree(GetProcessHeap(), 0, type);
615 return NULL;
618 return type;
621 static void set_variable_vtbl(struct d3d10_effect_variable *v)
623 const ID3D10EffectVariableVtbl **vtbl = &v->ID3D10EffectVariable_iface.lpVtbl;
625 switch (v->type->type_class)
627 case D3D10_SVC_SCALAR:
628 *vtbl = (const ID3D10EffectVariableVtbl *)&d3d10_effect_scalar_variable_vtbl;
629 break;
631 case D3D10_SVC_VECTOR:
632 *vtbl = (const ID3D10EffectVariableVtbl *)&d3d10_effect_vector_variable_vtbl;
633 break;
635 case D3D10_SVC_MATRIX_ROWS:
636 case D3D10_SVC_MATRIX_COLUMNS:
637 *vtbl = (const ID3D10EffectVariableVtbl *)&d3d10_effect_matrix_variable_vtbl;
638 break;
640 case D3D10_SVC_STRUCT:
641 *vtbl = &d3d10_effect_variable_vtbl;
642 break;
644 case D3D10_SVC_OBJECT:
645 switch(v->type->basetype)
647 case D3D10_SVT_STRING:
648 *vtbl = (const ID3D10EffectVariableVtbl *)&d3d10_effect_string_variable_vtbl;
649 break;
651 case D3D10_SVT_TEXTURE1D:
652 case D3D10_SVT_TEXTURE1DARRAY:
653 case D3D10_SVT_TEXTURE2D:
654 case D3D10_SVT_TEXTURE2DARRAY:
655 case D3D10_SVT_TEXTURE2DMS:
656 case D3D10_SVT_TEXTURE2DMSARRAY:
657 case D3D10_SVT_TEXTURE3D:
658 case D3D10_SVT_TEXTURECUBE:
659 case D3D10_SVT_BUFFER: /* Either resource or constant buffer. */
660 *vtbl = (const ID3D10EffectVariableVtbl *)&d3d10_effect_shader_resource_variable_vtbl;
661 break;
663 case D3D10_SVT_RENDERTARGETVIEW:
664 *vtbl = (const ID3D10EffectVariableVtbl *)&d3d10_effect_render_target_view_variable_vtbl;
665 break;
667 case D3D10_SVT_DEPTHSTENCILVIEW:
668 *vtbl = (const ID3D10EffectVariableVtbl *)&d3d10_effect_depth_stencil_view_variable_vtbl;
669 break;
671 case D3D10_SVT_DEPTHSTENCIL:
672 *vtbl = (const ID3D10EffectVariableVtbl *)&d3d10_effect_depth_stencil_variable_vtbl;
673 break;
675 case D3D10_SVT_VERTEXSHADER:
676 case D3D10_SVT_GEOMETRYSHADER:
677 case D3D10_SVT_PIXELSHADER:
678 *vtbl = (const ID3D10EffectVariableVtbl *)&d3d10_effect_shader_variable_vtbl;
679 break;
681 case D3D10_SVT_BLEND:
682 *vtbl = (const ID3D10EffectVariableVtbl *)&d3d10_effect_blend_variable_vtbl;
683 break;
685 case D3D10_SVT_RASTERIZER:
686 *vtbl = (const ID3D10EffectVariableVtbl *)&d3d10_effect_rasterizer_variable_vtbl;
687 break;
689 case D3D10_SVT_SAMPLER:
690 *vtbl = (const ID3D10EffectVariableVtbl *)&d3d10_effect_sampler_variable_vtbl;
691 break;
693 default:
694 FIXME("Unhandled basetype %s.\n", debug_d3d10_shader_variable_type(v->type->basetype));
695 *vtbl = &d3d10_effect_variable_vtbl;
696 break;
698 break;
700 default:
701 FIXME("Unhandled type class %s.\n", debug_d3d10_shader_variable_class(v->type->type_class));
702 *vtbl = &d3d10_effect_variable_vtbl;
703 break;
707 static HRESULT copy_variableinfo_from_type(struct d3d10_effect_variable *v)
709 unsigned int i;
710 HRESULT hr;
712 if (v->type->member_count)
714 v->members = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, v->type->member_count * sizeof(*v->members));
715 if (!v->members)
717 ERR("Failed to allocate members memory.\n");
718 return E_OUTOFMEMORY;
721 for (i = 0; i < v->type->member_count; ++i)
723 struct d3d10_effect_variable *var = &v->members[i];
724 struct d3d10_effect_type_member *typem = &v->type->members[i];
726 var->buffer = v->buffer;
727 var->effect = v->effect;
728 var->type = typem->type;
729 set_variable_vtbl(var);
731 if (!copy_name(typem->name, &var->name))
733 ERR("Failed to copy name.\n");
734 return E_OUTOFMEMORY;
736 TRACE("Variable name: %s.\n", debugstr_a(var->name));
738 if (!copy_name(typem->semantic, &var->semantic))
740 ERR("Failed to copy name.\n");
741 return E_OUTOFMEMORY;
743 TRACE("Variable semantic: %s.\n", debugstr_a(var->semantic));
745 var->buffer_offset = v->buffer_offset + typem->buffer_offset;
746 TRACE("Variable buffer offset: %u.\n", var->buffer_offset);
748 hr = copy_variableinfo_from_type(var);
749 if (FAILED(hr)) return hr;
753 if (v->type->element_count)
755 unsigned int bufferoffset = v->buffer_offset;
757 v->elements = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, v->type->element_count * sizeof(*v->elements));
758 if (!v->elements)
760 ERR("Failed to allocate elements memory.\n");
761 return E_OUTOFMEMORY;
764 for (i = 0; i < v->type->element_count; ++i)
766 struct d3d10_effect_variable *var = &v->elements[i];
768 var->buffer = v->buffer;
769 var->effect = v->effect;
770 var->type = v->type->elementtype;
771 set_variable_vtbl(var);
773 if (!copy_name(v->name, &var->name))
775 ERR("Failed to copy name.\n");
776 return E_OUTOFMEMORY;
778 TRACE("Variable name: %s.\n", debugstr_a(var->name));
780 if (!copy_name(v->semantic, &var->semantic))
782 ERR("Failed to copy name.\n");
783 return E_OUTOFMEMORY;
785 TRACE("Variable semantic: %s.\n", debugstr_a(var->semantic));
787 if (i != 0)
789 bufferoffset += v->type->stride;
791 var->buffer_offset = bufferoffset;
792 TRACE("Variable buffer offset: %u.\n", var->buffer_offset);
794 hr = copy_variableinfo_from_type(var);
795 if (FAILED(hr)) return hr;
799 return S_OK;
802 static HRESULT parse_fx10_variable_head(struct d3d10_effect_variable *v, const char **ptr, const char *data)
804 DWORD offset;
806 read_dword(ptr, &offset);
807 TRACE("Variable name at offset %#x.\n", offset);
809 if (!copy_name(data + offset, &v->name))
811 ERR("Failed to copy name.\n");
812 return E_OUTOFMEMORY;
814 TRACE("Variable name: %s.\n", debugstr_a(v->name));
816 read_dword(ptr, &offset);
817 TRACE("Variable type info at offset %#x.\n", offset);
819 v->type = get_fx10_type(v->effect, data, offset);
820 if (!v->type)
822 ERR("Failed to get variable type.\n");
823 return E_FAIL;
825 set_variable_vtbl(v);
827 return copy_variableinfo_from_type(v);
830 static HRESULT parse_fx10_annotation(struct d3d10_effect_variable *a, const char **ptr, const char *data)
832 HRESULT hr;
834 hr = parse_fx10_variable_head(a, ptr, data);
835 if (FAILED(hr)) return hr;
837 skip_dword_unknown("annotation", ptr, 1);
839 /* mark the variable as annotation */
840 a->flag = D3D10_EFFECT_VARIABLE_ANNOTATION;
842 return S_OK;
845 static HRESULT parse_fx10_anonymous_shader(struct d3d10_effect *e, struct d3d10_effect_anonymous_shader *s,
846 enum d3d10_effect_object_type otype)
848 struct d3d10_effect_variable *v = &s->shader;
849 struct d3d10_effect_type *t = &s->type;
850 const char *shader = NULL;
852 switch (otype)
854 case D3D10_EOT_VERTEXSHADER:
855 shader = "vertexshader";
856 t->basetype = D3D10_SVT_VERTEXSHADER;
857 break;
859 case D3D10_EOT_PIXELSHADER:
860 shader = "pixelshader";
861 t->basetype = D3D10_SVT_PIXELSHADER;
862 break;
864 case D3D10_EOT_GEOMETRYSHADER:
865 shader = "geometryshader";
866 t->basetype = D3D10_SVT_GEOMETRYSHADER;
867 break;
870 if (!copy_name(shader, &t->name))
872 ERR("Failed to copy name.\n");
873 return E_OUTOFMEMORY;
875 TRACE("Type name: %s.\n", debugstr_a(t->name));
877 t->type_class = D3D10_SVC_OBJECT;
879 t->ID3D10EffectType_iface.lpVtbl = &d3d10_effect_type_vtbl;
881 v->type = t;
882 v->effect = e;
883 set_variable_vtbl(v);
885 if (!copy_name("$Anonymous", &v->name))
887 ERR("Failed to copy semantic.\n");
888 return E_OUTOFMEMORY;
890 TRACE("Variable name: %s.\n", debugstr_a(v->name));
892 if (!copy_name(NULL, &v->semantic))
894 ERR("Failed to copy semantic.\n");
895 return E_OUTOFMEMORY;
897 TRACE("Variable semantic: %s.\n", debugstr_a(v->semantic));
899 return S_OK;
902 static HRESULT parse_fx10_object(struct d3d10_effect_object *o, const char **ptr, const char *data)
904 const char *data_ptr = NULL;
905 DWORD offset;
906 enum d3d10_effect_object_operation operation;
907 HRESULT hr;
908 struct d3d10_effect *effect = o->pass->technique->effect;
909 ID3D10Effect *e = &effect->ID3D10Effect_iface;
911 read_dword(ptr, &o->type);
912 TRACE("Effect object is of type %#x.\n", o->type);
914 read_dword(ptr, &o->index);
915 TRACE("Effect object index %#x.\n", o->index);
917 read_dword(ptr, &operation);
918 TRACE("Effect object operation %#x.\n", operation);
920 read_dword(ptr, &offset);
921 TRACE("Effect object idx is at offset %#x.\n", offset);
923 switch(operation)
925 case D3D10_EOO_VALUE:
926 TRACE("Copy variable values\n");
928 switch (o->type)
930 case D3D10_EOT_VERTEXSHADER:
931 TRACE("Vertex shader\n");
932 o->data = &anonymous_vs;
933 hr = S_OK;
934 break;
936 case D3D10_EOT_PIXELSHADER:
937 TRACE("Pixel shader\n");
938 o->data = &anonymous_ps;
939 hr = S_OK;
940 break;
942 case D3D10_EOT_GEOMETRYSHADER:
943 TRACE("Geometry shader\n");
944 o->data = &anonymous_gs;
945 hr = S_OK;
946 break;
948 default:
949 FIXME("Unhandled object type %#x\n", o->type);
950 hr = E_FAIL;
951 break;
953 break;
955 case D3D10_EOO_PARSED_OBJECT:
956 /* This is a local object, we've parsed in parse_fx10_local_object. */
957 TRACE("Shader = %s.\n", data + offset);
959 o->data = e->lpVtbl->GetVariableByName(e, data + offset);
960 hr = S_OK;
961 break;
963 case D3D10_EOO_PARSED_OBJECT_INDEX:
964 /* This is a local object, we've parsed in parse_fx10_local_object, which has an array index. */
965 data_ptr = data + offset;
966 read_dword(&data_ptr, &offset);
967 read_dword(&data_ptr, &o->index);
968 TRACE("Shader = %s[%u].\n", data + offset, o->index);
970 o->data = e->lpVtbl->GetVariableByName(e, data + offset);
971 hr = S_OK;
972 break;
974 case D3D10_EOO_ANONYMOUS_SHADER:
975 TRACE("Anonymous shader\n");
977 /* check anonymous_shader_current for validity */
978 if (effect->anonymous_shader_current >= effect->anonymous_shader_count)
980 ERR("Anonymous shader count is wrong!\n");
981 return E_FAIL;
984 data_ptr = data + offset;
985 read_dword(&data_ptr, &offset);
986 TRACE("Effect object starts at offset %#x.\n", offset);
988 data_ptr = data + offset;
990 hr = parse_fx10_anonymous_shader(effect, &effect->anonymous_shaders[effect->anonymous_shader_current], o->type);
991 if (FAILED(hr)) return hr;
993 o->data = &effect->anonymous_shaders[effect->anonymous_shader_current].shader;
994 ++effect->anonymous_shader_current;
996 switch (o->type)
998 case D3D10_EOT_VERTEXSHADER:
999 TRACE("Vertex shader\n");
1000 hr = parse_shader(o->data, data_ptr);
1001 break;
1003 case D3D10_EOT_PIXELSHADER:
1004 TRACE("Pixel shader\n");
1005 hr = parse_shader(o->data, data_ptr);
1006 break;
1008 case D3D10_EOT_GEOMETRYSHADER:
1009 TRACE("Geometry shader\n");
1010 hr = parse_shader(o->data, data_ptr);
1011 break;
1013 default:
1014 FIXME("Unhandled object type %#x\n", o->type);
1015 hr = E_FAIL;
1016 break;
1018 break;
1020 default:
1021 hr = E_FAIL;
1022 FIXME("Unhandled operation %#x.\n", operation);
1023 break;
1026 return hr;
1029 static HRESULT parse_fx10_pass(struct d3d10_effect_pass *p, const char **ptr, const char *data)
1031 HRESULT hr = S_OK;
1032 unsigned int i;
1033 DWORD offset;
1035 read_dword(ptr, &offset);
1036 TRACE("Pass name at offset %#x.\n", offset);
1038 if (!copy_name(data + offset, &p->name))
1040 ERR("Failed to copy name.\n");
1041 return E_OUTOFMEMORY;
1043 TRACE("Pass name: %s.\n", debugstr_a(p->name));
1045 read_dword(ptr, &p->object_count);
1046 TRACE("Pass has %u effect objects.\n", p->object_count);
1048 read_dword(ptr, &p->annotation_count);
1049 TRACE("Pass has %u annotations.\n", p->annotation_count);
1051 p->annotations = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, p->annotation_count * sizeof(*p->annotations));
1052 if (!p->annotations)
1054 ERR("Failed to allocate pass annotations memory.\n");
1055 return E_OUTOFMEMORY;
1058 for (i = 0; i < p->annotation_count; ++i)
1060 struct d3d10_effect_variable *a = &p->annotations[i];
1062 a->effect = p->technique->effect;
1063 a->buffer = &null_local_buffer;
1065 hr = parse_fx10_annotation(a, ptr, data);
1066 if (FAILED(hr)) return hr;
1069 p->objects = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, p->object_count * sizeof(*p->objects));
1070 if (!p->objects)
1072 ERR("Failed to allocate effect objects memory.\n");
1073 return E_OUTOFMEMORY;
1076 for (i = 0; i < p->object_count; ++i)
1078 struct d3d10_effect_object *o = &p->objects[i];
1080 o->pass = p;
1082 hr = parse_fx10_object(o, ptr, data);
1083 if (FAILED(hr)) return hr;
1086 return hr;
1089 static HRESULT parse_fx10_technique(struct d3d10_effect_technique *t, const char **ptr, const char *data)
1091 unsigned int i;
1092 DWORD offset;
1093 HRESULT hr;
1095 read_dword(ptr, &offset);
1096 TRACE("Technique name at offset %#x.\n", offset);
1098 if (!copy_name(data + offset, &t->name))
1100 ERR("Failed to copy name.\n");
1101 return E_OUTOFMEMORY;
1103 TRACE("Technique name: %s.\n", debugstr_a(t->name));
1105 read_dword(ptr, &t->pass_count);
1106 TRACE("Technique has %u passes\n", t->pass_count);
1108 read_dword(ptr, &t->annotation_count);
1109 TRACE("Technique has %u annotations.\n", t->annotation_count);
1111 t->annotations = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, t->annotation_count * sizeof(*t->annotations));
1112 if (!t->annotations)
1114 ERR("Failed to allocate technique annotations memory.\n");
1115 return E_OUTOFMEMORY;
1118 for (i = 0; i < t->annotation_count; ++i)
1120 struct d3d10_effect_variable *a = &t->annotations[i];
1122 a->effect = t->effect;
1123 a->buffer = &null_local_buffer;
1125 hr = parse_fx10_annotation(a, ptr, data);
1126 if (FAILED(hr)) return hr;
1129 t->passes = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, t->pass_count * sizeof(*t->passes));
1130 if (!t->passes)
1132 ERR("Failed to allocate passes memory\n");
1133 return E_OUTOFMEMORY;
1136 for (i = 0; i < t->pass_count; ++i)
1138 struct d3d10_effect_pass *p = &t->passes[i];
1140 p->ID3D10EffectPass_iface.lpVtbl = &d3d10_effect_pass_vtbl;
1141 p->technique = t;
1143 hr = parse_fx10_pass(p, ptr, data);
1144 if (FAILED(hr)) return hr;
1147 return S_OK;
1150 static HRESULT parse_fx10_variable(struct d3d10_effect_variable *v, const char **ptr, const char *data)
1152 DWORD offset;
1153 unsigned int i;
1154 HRESULT hr;
1156 hr = parse_fx10_variable_head(v, ptr, data);
1157 if (FAILED(hr)) return hr;
1159 read_dword(ptr, &offset);
1160 TRACE("Variable semantic at offset %#x.\n", offset);
1162 if (!copy_name(data + offset, &v->semantic))
1164 ERR("Failed to copy semantic.\n");
1165 return E_OUTOFMEMORY;
1167 TRACE("Variable semantic: %s.\n", debugstr_a(v->semantic));
1169 read_dword(ptr, &v->buffer_offset);
1170 TRACE("Variable offset in buffer: %#x.\n", v->buffer_offset);
1172 skip_dword_unknown("variable", ptr, 1);
1174 read_dword(ptr, &v->flag);
1175 TRACE("Variable flag: %#x.\n", v->flag);
1177 read_dword(ptr, &v->annotation_count);
1178 TRACE("Variable has %u annotations.\n", v->annotation_count);
1180 v->annotations = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, v->annotation_count * sizeof(*v->annotations));
1181 if (!v->annotations)
1183 ERR("Failed to allocate variable annotations memory.\n");
1184 return E_OUTOFMEMORY;
1187 for (i = 0; i < v->annotation_count; ++i)
1189 struct d3d10_effect_variable *a = &v->annotations[i];
1191 a->effect = v->effect;
1192 a->buffer = &null_local_buffer;
1194 hr = parse_fx10_annotation(a, ptr, data);
1195 if (FAILED(hr)) return hr;
1198 return S_OK;
1201 static HRESULT parse_fx10_local_variable(struct d3d10_effect_variable *v, const char **ptr, const char *data)
1203 unsigned int i;
1204 HRESULT hr;
1205 DWORD offset;
1207 hr = parse_fx10_variable_head(v, ptr, data);
1208 if (FAILED(hr)) return hr;
1210 read_dword(ptr, &offset);
1211 TRACE("Variable semantic at offset %#x.\n", offset);
1213 if (!copy_name(data + offset, &v->semantic))
1215 ERR("Failed to copy semantic.\n");
1216 return E_OUTOFMEMORY;
1218 TRACE("Variable semantic: %s.\n", debugstr_a(v->semantic));
1220 skip_dword_unknown("local variable", ptr, 1);
1222 switch (v->type->basetype)
1224 case D3D10_SVT_TEXTURE1D:
1225 case D3D10_SVT_TEXTURE1DARRAY:
1226 case D3D10_SVT_TEXTURE2D:
1227 case D3D10_SVT_TEXTURE2DARRAY:
1228 case D3D10_SVT_TEXTURE2DMS:
1229 case D3D10_SVT_TEXTURE2DMSARRAY:
1230 case D3D10_SVT_TEXTURE3D:
1231 case D3D10_SVT_TEXTURECUBE:
1232 case D3D10_SVT_RENDERTARGETVIEW:
1233 case D3D10_SVT_DEPTHSTENCILVIEW:
1234 case D3D10_SVT_BUFFER:
1235 TRACE("SVT could not have elements.\n");
1236 break;
1238 case D3D10_SVT_VERTEXSHADER:
1239 case D3D10_SVT_PIXELSHADER:
1240 case D3D10_SVT_GEOMETRYSHADER:
1241 TRACE("Shader type is %s\n", debug_d3d10_shader_variable_type(v->type->basetype));
1242 for (i = 0; i < max(v->type->element_count, 1); ++i)
1244 DWORD shader_offset;
1245 struct d3d10_effect_variable *var;
1247 if (!v->type->element_count)
1249 var = v;
1251 else
1253 var = &v->elements[i];
1256 read_dword(ptr, &shader_offset);
1257 TRACE("Shader offset: %#x.\n", shader_offset);
1259 hr = parse_shader(var, data + shader_offset);
1260 if (FAILED(hr)) return hr;
1262 break;
1264 case D3D10_SVT_DEPTHSTENCIL:
1265 case D3D10_SVT_BLEND:
1266 case D3D10_SVT_RASTERIZER:
1267 case D3D10_SVT_SAMPLER:
1268 TRACE("SVT is a state.\n");
1269 for (i = 0; i < max(v->type->element_count, 1); ++i)
1271 unsigned int j;
1272 DWORD object_count;
1274 read_dword(ptr, &object_count);
1275 TRACE("Object count: %#x.\n", object_count);
1277 for (j = 0; j < object_count; ++j)
1279 skip_dword_unknown("state object attribute", ptr, 4);
1282 break;
1284 default:
1285 FIXME("Unhandled case %s.\n", debug_d3d10_shader_variable_type(v->type->basetype));
1286 return E_FAIL;
1289 read_dword(ptr, &v->annotation_count);
1290 TRACE("Variable has %u annotations.\n", v->annotation_count);
1292 v->annotations = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, v->annotation_count * sizeof(*v->annotations));
1293 if (!v->annotations)
1295 ERR("Failed to allocate variable annotations memory.\n");
1296 return E_OUTOFMEMORY;
1299 for (i = 0; i < v->annotation_count; ++i)
1301 struct d3d10_effect_variable *a = &v->annotations[i];
1303 a->effect = v->effect;
1304 a->buffer = &null_local_buffer;
1306 hr = parse_fx10_annotation(a, ptr, data);
1307 if (FAILED(hr)) return hr;
1310 return S_OK;
1313 static HRESULT parse_fx10_local_buffer(struct d3d10_effect_variable *l, const char **ptr, const char *data)
1315 unsigned int i;
1316 DWORD offset;
1317 D3D10_CBUFFER_TYPE d3d10_cbuffer_type;
1318 HRESULT hr;
1319 unsigned int stride = 0;
1321 /* Generate our own type, it isn't in the fx blob. */
1322 l->type = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*l->type));
1323 if (!l->type)
1325 ERR("Failed to allocate local buffer type memory.\n");
1326 return E_OUTOFMEMORY;
1328 l->type->ID3D10EffectType_iface.lpVtbl = &d3d10_effect_type_vtbl;
1329 l->type->type_class = D3D10_SVC_OBJECT;
1330 l->type->effect = l->effect;
1332 read_dword(ptr, &offset);
1333 TRACE("Local buffer name at offset %#x.\n", offset);
1335 if (!copy_name(data + offset, &l->name))
1337 ERR("Failed to copy name.\n");
1338 return E_OUTOFMEMORY;
1340 TRACE("Local buffer name: %s.\n", debugstr_a(l->name));
1342 read_dword(ptr, &l->data_size);
1343 TRACE("Local buffer data size: %#x.\n", l->data_size);
1345 read_dword(ptr, &d3d10_cbuffer_type);
1346 TRACE("Local buffer type: %#x.\n", d3d10_cbuffer_type);
1348 switch(d3d10_cbuffer_type)
1350 case D3D10_CT_CBUFFER:
1351 l->type->basetype = D3D10_SVT_CBUFFER;
1352 if (!copy_name("cbuffer", &l->type->name))
1354 ERR("Failed to copy name.\n");
1355 return E_OUTOFMEMORY;
1357 break;
1359 case D3D10_CT_TBUFFER:
1360 l->type->basetype = D3D10_SVT_TBUFFER;
1361 if (!copy_name("tbuffer", &l->type->name))
1363 ERR("Failed to copy name.\n");
1364 return E_OUTOFMEMORY;
1366 break;
1368 default:
1369 ERR("Unexpected D3D10_CBUFFER_TYPE %#x!\n", d3d10_cbuffer_type);
1370 return E_FAIL;
1373 read_dword(ptr, &l->type->member_count);
1374 TRACE("Local buffer member count: %#x.\n", l->type->member_count);
1376 skip_dword_unknown("local buffer", ptr, 1);
1378 read_dword(ptr, &l->annotation_count);
1379 TRACE("Local buffer has %u annotations.\n", l->annotation_count);
1381 l->annotations = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, l->annotation_count * sizeof(*l->annotations));
1382 if (!l->annotations)
1384 ERR("Failed to allocate local buffer annotations memory.\n");
1385 return E_OUTOFMEMORY;
1388 for (i = 0; i < l->annotation_count; ++i)
1390 struct d3d10_effect_variable *a = &l->annotations[i];
1392 a->effect = l->effect;
1393 a->buffer = &null_local_buffer;
1395 hr = parse_fx10_annotation(a, ptr, data);
1396 if (FAILED(hr)) return hr;
1399 l->members = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, l->type->member_count * sizeof(*l->members));
1400 if (!l->members)
1402 ERR("Failed to allocate members memory.\n");
1403 return E_OUTOFMEMORY;
1406 l->type->members = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, l->type->member_count * sizeof(*l->type->members));
1407 if (!l->type->members)
1409 ERR("Failed to allocate type members memory.\n");
1410 return E_OUTOFMEMORY;
1413 for (i = 0; i < l->type->member_count; ++i)
1415 struct d3d10_effect_variable *v = &l->members[i];
1416 struct d3d10_effect_type_member *typem = &l->type->members[i];
1418 v->buffer = l;
1419 v->effect = l->effect;
1421 hr = parse_fx10_variable(v, ptr, data);
1422 if (FAILED(hr)) return hr;
1425 * Copy the values from the variable type to the constant buffers type
1426 * members structure, because it is our own generated type.
1428 typem->type = v->type;
1430 if (!copy_name(v->name, &typem->name))
1432 ERR("Failed to copy name.\n");
1433 return E_OUTOFMEMORY;
1435 TRACE("Variable name: %s.\n", debugstr_a(typem->name));
1437 if (!copy_name(v->semantic, &typem->semantic))
1439 ERR("Failed to copy name.\n");
1440 return E_OUTOFMEMORY;
1442 TRACE("Variable semantic: %s.\n", debugstr_a(typem->semantic));
1444 typem->buffer_offset = v->buffer_offset;
1445 TRACE("Variable buffer offset: %u.\n", typem->buffer_offset);
1447 l->type->size_packed += v->type->size_packed;
1450 * For the complete constantbuffer the size_unpacked = stride,
1451 * the stride is calculated like this:
1453 * 1) if the constant buffer variables are packed with packoffset
1454 * - stride = the highest used constant
1455 * - the complete stride has to be a multiple of 0x10
1457 * 2) if the constant buffer variables are NOT packed with packoffset
1458 * - sum of unpacked size for all variables which fit in a 0x10 part
1459 * - if the size exceeds a 0x10 part, the rest of the old part is skipped
1460 * and a new part is started
1461 * - if the variable is a struct it is always used a new part
1462 * - the complete stride has to be a multiple of 0x10
1464 * e.g.:
1465 * 0x4, 0x4, 0x4, 0x8, 0x4, 0x14, 0x4
1466 * part 0x10 0x10 0x20 -> 0x40
1468 if (v->flag & D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT)
1470 if ((v->type->size_unpacked + v->buffer_offset) > stride)
1472 stride = v->type->size_unpacked + v->buffer_offset;
1475 else
1477 if (v->type->type_class == D3D10_SVC_STRUCT)
1479 stride = (stride + 0xf) & ~0xf;
1482 if ( ((stride & 0xf) + v->type->size_unpacked) > 0x10)
1484 stride = (stride + 0xf) & ~0xf;
1487 stride += v->type->size_unpacked;
1490 l->type->stride = l->type->size_unpacked = (stride + 0xf) & ~0xf;
1492 TRACE("Constant buffer:\n");
1493 TRACE("\tType name: %s.\n", debugstr_a(l->type->name));
1494 TRACE("\tElement count: %u.\n", l->type->element_count);
1495 TRACE("\tMember count: %u.\n", l->type->member_count);
1496 TRACE("\tUnpacked size: %#x.\n", l->type->size_unpacked);
1497 TRACE("\tStride: %#x.\n", l->type->stride);
1498 TRACE("\tPacked size %#x.\n", l->type->size_packed);
1499 TRACE("\tBasetype: %s.\n", debug_d3d10_shader_variable_type(l->type->basetype));
1500 TRACE("\tTypeclass: %s.\n", debug_d3d10_shader_variable_class(l->type->type_class));
1502 return S_OK;
1505 static int d3d10_effect_type_compare(const void *key, const struct wine_rb_entry *entry)
1507 const struct d3d10_effect_type *t = WINE_RB_ENTRY_VALUE(entry, const struct d3d10_effect_type, entry);
1508 const DWORD *id = key;
1510 return *id - t->id;
1513 static void d3d10_effect_type_member_destroy(struct d3d10_effect_type_member *typem)
1515 TRACE("effect type member %p.\n", typem);
1517 /* Do not release typem->type, it will be covered by d3d10_effect_type_destroy(). */
1518 HeapFree(GetProcessHeap(), 0, typem->semantic);
1519 HeapFree(GetProcessHeap(), 0, typem->name);
1522 static void d3d10_effect_type_destroy(struct wine_rb_entry *entry, void *context)
1524 struct d3d10_effect_type *t = WINE_RB_ENTRY_VALUE(entry, struct d3d10_effect_type, entry);
1526 TRACE("effect type %p.\n", t);
1528 if (t->elementtype)
1530 HeapFree(GetProcessHeap(), 0, t->elementtype->name);
1531 HeapFree(GetProcessHeap(), 0, t->elementtype);
1534 if (t->members)
1536 unsigned int i;
1538 for (i = 0; i < t->member_count; ++i)
1540 d3d10_effect_type_member_destroy(&t->members[i]);
1542 HeapFree(GetProcessHeap(), 0, t->members);
1545 HeapFree(GetProcessHeap(), 0, t->name);
1546 HeapFree(GetProcessHeap(), 0, t);
1549 static const struct wine_rb_functions d3d10_effect_type_rb_functions =
1551 d3d10_rb_alloc,
1552 d3d10_rb_realloc,
1553 d3d10_rb_free,
1554 d3d10_effect_type_compare,
1557 static HRESULT parse_fx10_body(struct d3d10_effect *e, const char *data, DWORD data_size)
1559 const char *ptr = data + e->index_offset;
1560 unsigned int i;
1561 HRESULT hr;
1563 if (wine_rb_init(&e->types, &d3d10_effect_type_rb_functions) == -1)
1565 ERR("Failed to initialize type rbtree.\n");
1566 return E_FAIL;
1569 e->local_buffers = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, e->local_buffer_count * sizeof(*e->local_buffers));
1570 if (!e->local_buffers)
1572 ERR("Failed to allocate local buffer memory.\n");
1573 return E_OUTOFMEMORY;
1576 e->local_variables = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, e->local_variable_count * sizeof(*e->local_variables));
1577 if (!e->local_variables)
1579 ERR("Failed to allocate local variable memory.\n");
1580 return E_OUTOFMEMORY;
1583 e->anonymous_shaders = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, e->anonymous_shader_count * sizeof(*e->anonymous_shaders));
1584 if (!e->anonymous_shaders)
1586 ERR("Failed to allocate anonymous shaders memory\n");
1587 return E_OUTOFMEMORY;
1590 e->used_shaders = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, e->used_shader_count * sizeof(*e->used_shaders));
1591 if (!e->used_shaders)
1593 ERR("Failed to allocate used shaders memory\n");
1594 return E_OUTOFMEMORY;
1597 e->techniques = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, e->technique_count * sizeof(*e->techniques));
1598 if (!e->techniques)
1600 ERR("Failed to allocate techniques memory\n");
1601 return E_OUTOFMEMORY;
1604 for (i = 0; i < e->local_buffer_count; ++i)
1606 struct d3d10_effect_variable *l = &e->local_buffers[i];
1607 l->ID3D10EffectVariable_iface.lpVtbl = (const ID3D10EffectVariableVtbl *)&d3d10_effect_constant_buffer_vtbl;
1608 l->effect = e;
1609 l->buffer = &null_local_buffer;
1611 hr = parse_fx10_local_buffer(l, &ptr, data);
1612 if (FAILED(hr)) return hr;
1615 for (i = 0; i < e->local_variable_count; ++i)
1617 struct d3d10_effect_variable *v = &e->local_variables[i];
1619 v->effect = e;
1620 v->ID3D10EffectVariable_iface.lpVtbl = &d3d10_effect_variable_vtbl;
1621 v->buffer = &null_local_buffer;
1623 hr = parse_fx10_local_variable(v, &ptr, data);
1624 if (FAILED(hr)) return hr;
1627 for (i = 0; i < e->technique_count; ++i)
1629 struct d3d10_effect_technique *t = &e->techniques[i];
1631 t->ID3D10EffectTechnique_iface.lpVtbl = &d3d10_effect_technique_vtbl;
1632 t->effect = e;
1634 hr = parse_fx10_technique(t, &ptr, data);
1635 if (FAILED(hr)) return hr;
1638 return S_OK;
1641 static HRESULT parse_fx10(struct d3d10_effect *e, const char *data, DWORD data_size)
1643 const char *ptr = data;
1644 DWORD unknown;
1646 /* Compiled target version (e.g. fx_4_0=0xfeff1001, fx_4_1=0xfeff1011). */
1647 read_dword(&ptr, &e->version);
1648 TRACE("Target: %#x\n", e->version);
1650 read_dword(&ptr, &e->local_buffer_count);
1651 TRACE("Local buffer count: %u.\n", e->local_buffer_count);
1653 read_dword(&ptr, &e->variable_count);
1654 TRACE("Variable count: %u\n", e->variable_count);
1656 read_dword(&ptr, &e->local_variable_count);
1657 TRACE("Object count: %u\n", e->local_variable_count);
1659 read_dword(&ptr, &e->sharedbuffers_count);
1660 TRACE("Sharedbuffers count: %u\n", e->sharedbuffers_count);
1662 /* Number of variables in shared buffers? */
1663 read_dword(&ptr, &unknown);
1664 FIXME("Unknown 0: %u\n", unknown);
1666 read_dword(&ptr, &e->sharedobjects_count);
1667 TRACE("Sharedobjects count: %u\n", e->sharedobjects_count);
1669 read_dword(&ptr, &e->technique_count);
1670 TRACE("Technique count: %u\n", e->technique_count);
1672 read_dword(&ptr, &e->index_offset);
1673 TRACE("Index offset: %#x\n", e->index_offset);
1675 read_dword(&ptr, &unknown);
1676 FIXME("Unknown 1: %u\n", unknown);
1678 read_dword(&ptr, &e->texture_count);
1679 TRACE("Texture count: %u\n", e->texture_count);
1681 read_dword(&ptr, &e->dephstencilstate_count);
1682 TRACE("Depthstencilstate count: %u\n", e->dephstencilstate_count);
1684 read_dword(&ptr, &e->blendstate_count);
1685 TRACE("Blendstate count: %u\n", e->blendstate_count);
1687 read_dword(&ptr, &e->rasterizerstate_count);
1688 TRACE("Rasterizerstate count: %u\n", e->rasterizerstate_count);
1690 read_dword(&ptr, &e->samplerstate_count);
1691 TRACE("Samplerstate count: %u\n", e->samplerstate_count);
1693 read_dword(&ptr, &e->rendertargetview_count);
1694 TRACE("Rendertargetview count: %u\n", e->rendertargetview_count);
1696 read_dword(&ptr, &e->depthstencilview_count);
1697 TRACE("Depthstencilview count: %u\n", e->depthstencilview_count);
1699 read_dword(&ptr, &e->used_shader_count);
1700 TRACE("Used shader count: %u\n", e->used_shader_count);
1702 read_dword(&ptr, &e->anonymous_shader_count);
1703 TRACE("Anonymous shader count: %u\n", e->anonymous_shader_count);
1705 return parse_fx10_body(e, ptr, data_size - (ptr - data));
1708 static HRESULT fx10_chunk_handler(const char *data, DWORD data_size, DWORD tag, void *ctx)
1710 struct d3d10_effect *e = ctx;
1712 TRACE("tag: %s.\n", debugstr_an((const char *)&tag, 4));
1714 TRACE("chunk size: %#x\n", data_size);
1716 switch(tag)
1718 case TAG_FX10:
1719 return parse_fx10(e, data, data_size);
1721 default:
1722 FIXME("Unhandled chunk %s.\n", debugstr_an((const char *)&tag, 4));
1723 return S_OK;
1727 HRESULT d3d10_effect_parse(struct d3d10_effect *This, const void *data, SIZE_T data_size)
1729 return parse_dxbc(data, data_size, fx10_chunk_handler, This);
1732 static HRESULT d3d10_effect_object_apply(struct d3d10_effect_object *o)
1734 ID3D10Device *device = o->pass->technique->effect->device;
1735 struct d3d10_effect_variable *v = (struct d3d10_effect_variable*) o->data;
1737 TRACE("effect object %p, type %#x.\n", o, o->type);
1739 switch(o->type)
1741 case D3D10_EOT_VERTEXSHADER:
1742 ID3D10Device_VSSetShader(device, ((struct d3d10_effect_shader_variable *)v->data)->shader.vs);
1743 return S_OK;
1745 case D3D10_EOT_PIXELSHADER:
1746 ID3D10Device_PSSetShader(device, ((struct d3d10_effect_shader_variable *)v->data)->shader.ps);
1747 return S_OK;
1749 case D3D10_EOT_GEOMETRYSHADER:
1750 ID3D10Device_GSSetShader(device, ((struct d3d10_effect_shader_variable *)v->data)->shader.gs);
1751 return S_OK;
1753 default:
1754 FIXME("Unhandled effect object type %#x.\n", o->type);
1755 return E_FAIL;
1759 static void d3d10_effect_variable_destroy(struct d3d10_effect_variable *v)
1761 unsigned int i;
1763 TRACE("variable %p.\n", v);
1765 HeapFree(GetProcessHeap(), 0, v->name);
1766 HeapFree(GetProcessHeap(), 0, v->semantic);
1767 if (v->annotations)
1769 for (i = 0; i < v->annotation_count; ++i)
1771 d3d10_effect_variable_destroy(&v->annotations[i]);
1773 HeapFree(GetProcessHeap(), 0, v->annotations);
1776 if (v->members)
1778 for (i = 0; i < v->type->member_count; ++i)
1780 d3d10_effect_variable_destroy(&v->members[i]);
1782 HeapFree(GetProcessHeap(), 0, v->members);
1785 if (v->elements)
1787 for (i = 0; i < v->type->element_count; ++i)
1789 d3d10_effect_variable_destroy(&v->elements[i]);
1791 HeapFree(GetProcessHeap(), 0, v->elements);
1794 if (v->data)
1796 switch(v->type->basetype)
1798 case D3D10_SVT_VERTEXSHADER:
1799 case D3D10_SVT_PIXELSHADER:
1800 case D3D10_SVT_GEOMETRYSHADER:
1801 shader_free_signature(&((struct d3d10_effect_shader_variable *)v->data)->input_signature);
1802 shader_free_signature(&((struct d3d10_effect_shader_variable *)v->data)->output_signature);
1803 break;
1805 default:
1806 break;
1808 HeapFree(GetProcessHeap(), 0, v->data);
1812 static void d3d10_effect_pass_destroy(struct d3d10_effect_pass *p)
1814 unsigned int i;
1816 TRACE("pass %p\n", p);
1818 HeapFree(GetProcessHeap(), 0, p->name);
1819 HeapFree(GetProcessHeap(), 0, p->objects);
1821 if (p->annotations)
1823 for (i = 0; i < p->annotation_count; ++i)
1825 d3d10_effect_variable_destroy(&p->annotations[i]);
1827 HeapFree(GetProcessHeap(), 0, p->annotations);
1831 static void d3d10_effect_technique_destroy(struct d3d10_effect_technique *t)
1833 unsigned int i;
1835 TRACE("technique %p\n", t);
1837 HeapFree(GetProcessHeap(), 0, t->name);
1838 if (t->passes)
1840 for (i = 0; i < t->pass_count; ++i)
1842 d3d10_effect_pass_destroy(&t->passes[i]);
1844 HeapFree(GetProcessHeap(), 0, t->passes);
1847 if (t->annotations)
1849 for (i = 0; i < t->annotation_count; ++i)
1851 d3d10_effect_variable_destroy(&t->annotations[i]);
1853 HeapFree(GetProcessHeap(), 0, t->annotations);
1857 static void d3d10_effect_local_buffer_destroy(struct d3d10_effect_variable *l)
1859 unsigned int i;
1861 TRACE("local buffer %p.\n", l);
1863 HeapFree(GetProcessHeap(), 0, l->name);
1864 if (l->members)
1866 for (i = 0; i < l->type->member_count; ++i)
1868 d3d10_effect_variable_destroy(&l->members[i]);
1870 HeapFree(GetProcessHeap(), 0, l->members);
1873 if (l->type->members)
1875 for (i = 0; i < l->type->member_count; ++i)
1877 /* Do not release l->type->members[i].type, it will be covered by d3d10_effect_type_destroy(). */
1878 HeapFree(GetProcessHeap(), 0, l->type->members[i].semantic);
1879 HeapFree(GetProcessHeap(), 0, l->type->members[i].name);
1881 HeapFree(GetProcessHeap(), 0, l->type->members);
1883 HeapFree(GetProcessHeap(), 0, l->type->name);
1884 HeapFree(GetProcessHeap(), 0, l->type);
1886 if (l->annotations)
1888 for (i = 0; i < l->annotation_count; ++i)
1890 d3d10_effect_variable_destroy(&l->annotations[i]);
1892 HeapFree(GetProcessHeap(), 0, l->annotations);
1896 /* IUnknown methods */
1898 static inline struct d3d10_effect *impl_from_ID3D10Effect(ID3D10Effect *iface)
1900 return CONTAINING_RECORD(iface, struct d3d10_effect, ID3D10Effect_iface);
1903 static HRESULT STDMETHODCALLTYPE d3d10_effect_QueryInterface(ID3D10Effect *iface, REFIID riid, void **object)
1905 TRACE("iface %p, riid %s, object %p\n", iface, debugstr_guid(riid), object);
1907 if (IsEqualGUID(riid, &IID_ID3D10Effect)
1908 || IsEqualGUID(riid, &IID_IUnknown))
1910 IUnknown_AddRef(iface);
1911 *object = iface;
1912 return S_OK;
1915 WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid));
1917 *object = NULL;
1918 return E_NOINTERFACE;
1921 static ULONG STDMETHODCALLTYPE d3d10_effect_AddRef(ID3D10Effect *iface)
1923 struct d3d10_effect *This = impl_from_ID3D10Effect(iface);
1924 ULONG refcount = InterlockedIncrement(&This->refcount);
1926 TRACE("%p increasing refcount to %u\n", This, refcount);
1928 return refcount;
1931 static ULONG STDMETHODCALLTYPE d3d10_effect_Release(ID3D10Effect *iface)
1933 struct d3d10_effect *This = impl_from_ID3D10Effect(iface);
1934 ULONG refcount = InterlockedDecrement(&This->refcount);
1936 TRACE("%p decreasing refcount to %u\n", This, refcount);
1938 if (!refcount)
1940 unsigned int i;
1942 if (This->techniques)
1944 for (i = 0; i < This->technique_count; ++i)
1946 d3d10_effect_technique_destroy(&This->techniques[i]);
1948 HeapFree(GetProcessHeap(), 0, This->techniques);
1951 if (This->local_variables)
1953 for (i = 0; i < This->local_variable_count; ++i)
1955 d3d10_effect_variable_destroy(&This->local_variables[i]);
1957 HeapFree(GetProcessHeap(), 0, This->local_variables);
1960 if (This->local_buffers)
1962 for (i = 0; i < This->local_buffer_count; ++i)
1964 d3d10_effect_local_buffer_destroy(&This->local_buffers[i]);
1966 HeapFree(GetProcessHeap(), 0, This->local_buffers);
1969 if (This->anonymous_shaders)
1971 for (i = 0; i < This->anonymous_shader_count; ++i)
1973 d3d10_effect_variable_destroy(&This->anonymous_shaders[i].shader);
1974 HeapFree(GetProcessHeap(), 0, This->anonymous_shaders[i].type.name);
1976 HeapFree(GetProcessHeap(), 0, This->anonymous_shaders);
1979 HeapFree(GetProcessHeap(), 0, This->used_shaders);
1981 wine_rb_destroy(&This->types, d3d10_effect_type_destroy, NULL);
1983 ID3D10Device_Release(This->device);
1984 HeapFree(GetProcessHeap(), 0, This);
1987 return refcount;
1990 /* ID3D10Effect methods */
1992 static BOOL STDMETHODCALLTYPE d3d10_effect_IsValid(ID3D10Effect *iface)
1994 FIXME("iface %p stub!\n", iface);
1996 return FALSE;
1999 static BOOL STDMETHODCALLTYPE d3d10_effect_IsPool(ID3D10Effect *iface)
2001 FIXME("iface %p stub!\n", iface);
2003 return FALSE;
2006 static HRESULT STDMETHODCALLTYPE d3d10_effect_GetDevice(ID3D10Effect *iface, ID3D10Device **device)
2008 struct d3d10_effect *This = impl_from_ID3D10Effect(iface);
2010 TRACE("iface %p, device %p\n", iface, device);
2012 ID3D10Device_AddRef(This->device);
2013 *device = This->device;
2015 return S_OK;
2018 static HRESULT STDMETHODCALLTYPE d3d10_effect_GetDesc(ID3D10Effect *iface, D3D10_EFFECT_DESC *desc)
2020 FIXME("iface %p, desc %p stub!\n", iface, desc);
2022 return E_NOTIMPL;
2025 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_GetConstantBufferByIndex(ID3D10Effect *iface,
2026 UINT index)
2028 struct d3d10_effect *This = impl_from_ID3D10Effect(iface);
2029 struct d3d10_effect_variable *l;
2031 TRACE("iface %p, index %u\n", iface, index);
2033 if (index >= This->local_buffer_count)
2035 WARN("Invalid index specified\n");
2036 return (ID3D10EffectConstantBuffer *)&null_local_buffer;
2039 l = &This->local_buffers[index];
2041 TRACE("Returning buffer %p, %s.\n", l, debugstr_a(l->name));
2043 return (ID3D10EffectConstantBuffer *)l;
2046 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_GetConstantBufferByName(ID3D10Effect *iface,
2047 LPCSTR name)
2049 struct d3d10_effect *This = impl_from_ID3D10Effect(iface);
2050 unsigned int i;
2052 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
2054 for (i = 0; i < This->local_buffer_count; ++i)
2056 struct d3d10_effect_variable *l = &This->local_buffers[i];
2058 if (!strcmp(l->name, name))
2060 TRACE("Returning buffer %p.\n", l);
2061 return (ID3D10EffectConstantBuffer *)l;
2065 WARN("Invalid name specified\n");
2067 return (ID3D10EffectConstantBuffer *)&null_local_buffer;
2070 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableByIndex(ID3D10Effect *iface, UINT index)
2072 struct d3d10_effect *This = impl_from_ID3D10Effect(iface);
2073 unsigned int i;
2075 TRACE("iface %p, index %u\n", iface, index);
2077 for (i = 0; i < This->local_buffer_count; ++i)
2079 struct d3d10_effect_variable *l = &This->local_buffers[i];
2081 if (index < l->type->member_count)
2083 struct d3d10_effect_variable *v = &l->members[index];
2085 TRACE("Returning variable %p.\n", v);
2086 return &v->ID3D10EffectVariable_iface;
2088 index -= l->type->member_count;
2091 if (index < This->local_variable_count)
2093 struct d3d10_effect_variable *v = &This->local_variables[index];
2095 TRACE("Returning variable %p.\n", v);
2096 return &v->ID3D10EffectVariable_iface;
2099 WARN("Invalid index specified\n");
2101 return &null_variable.ID3D10EffectVariable_iface;
2104 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableByName(ID3D10Effect *iface, LPCSTR name)
2106 struct d3d10_effect *This = impl_from_ID3D10Effect(iface);
2107 unsigned int i;
2109 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
2111 if (!name)
2113 WARN("Invalid name specified\n");
2114 return &null_variable.ID3D10EffectVariable_iface;
2117 for (i = 0; i < This->local_buffer_count; ++i)
2119 struct d3d10_effect_variable *l = &This->local_buffers[i];
2120 unsigned int j;
2122 for (j = 0; j < l->type->member_count; ++j)
2124 struct d3d10_effect_variable *v = &l->members[j];
2126 if (!strcmp(v->name, name))
2128 TRACE("Returning variable %p.\n", v);
2129 return &v->ID3D10EffectVariable_iface;
2134 for (i = 0; i < This->local_variable_count; ++i)
2136 struct d3d10_effect_variable *v = &This->local_variables[i];
2138 if (!strcmp(v->name, name))
2140 TRACE("Returning variable %p.\n", v);
2141 return &v->ID3D10EffectVariable_iface;
2145 WARN("Invalid name specified\n");
2147 return &null_variable.ID3D10EffectVariable_iface;
2150 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableBySemantic(ID3D10Effect *iface,
2151 LPCSTR semantic)
2153 struct d3d10_effect *This = impl_from_ID3D10Effect(iface);
2154 unsigned int i;
2156 TRACE("iface %p, semantic %s\n", iface, debugstr_a(semantic));
2158 if (!semantic)
2160 WARN("Invalid semantic specified\n");
2161 return &null_variable.ID3D10EffectVariable_iface;
2164 for (i = 0; i < This->local_buffer_count; ++i)
2166 struct d3d10_effect_variable *l = &This->local_buffers[i];
2167 unsigned int j;
2169 for (j = 0; j < l->type->member_count; ++j)
2171 struct d3d10_effect_variable *v = &l->members[j];
2173 if (!strcmp(v->semantic, semantic))
2175 TRACE("Returning variable %p.\n", v);
2176 return &v->ID3D10EffectVariable_iface;
2181 for (i = 0; i < This->local_variable_count; ++i)
2183 struct d3d10_effect_variable *v = &This->local_variables[i];
2185 if (!strcmp(v->semantic, semantic))
2187 TRACE("Returning variable %p.\n", v);
2188 return &v->ID3D10EffectVariable_iface;
2192 WARN("Invalid semantic specified\n");
2194 return &null_variable.ID3D10EffectVariable_iface;
2197 static struct ID3D10EffectTechnique * STDMETHODCALLTYPE d3d10_effect_GetTechniqueByIndex(ID3D10Effect *iface,
2198 UINT index)
2200 struct d3d10_effect *This = impl_from_ID3D10Effect(iface);
2201 struct d3d10_effect_technique *t;
2203 TRACE("iface %p, index %u\n", iface, index);
2205 if (index >= This->technique_count)
2207 WARN("Invalid index specified\n");
2208 return &null_technique.ID3D10EffectTechnique_iface;
2211 t = &This->techniques[index];
2213 TRACE("Returning technique %p, %s.\n", t, debugstr_a(t->name));
2215 return &t->ID3D10EffectTechnique_iface;
2218 static struct ID3D10EffectTechnique * STDMETHODCALLTYPE d3d10_effect_GetTechniqueByName(ID3D10Effect *iface,
2219 LPCSTR name)
2221 struct d3d10_effect *This = impl_from_ID3D10Effect(iface);
2222 unsigned int i;
2224 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
2226 if (!name)
2228 WARN("Invalid name specified\n");
2229 return &null_technique.ID3D10EffectTechnique_iface;
2232 for (i = 0; i < This->technique_count; ++i)
2234 struct d3d10_effect_technique *t = &This->techniques[i];
2235 if (!strcmp(t->name, name))
2237 TRACE("Returning technique %p\n", t);
2238 return &t->ID3D10EffectTechnique_iface;
2242 WARN("Invalid name specified\n");
2244 return &null_technique.ID3D10EffectTechnique_iface;
2247 static HRESULT STDMETHODCALLTYPE d3d10_effect_Optimize(ID3D10Effect *iface)
2249 FIXME("iface %p stub!\n", iface);
2251 return E_NOTIMPL;
2254 static BOOL STDMETHODCALLTYPE d3d10_effect_IsOptimized(ID3D10Effect *iface)
2256 FIXME("iface %p stub!\n", iface);
2258 return FALSE;
2261 const struct ID3D10EffectVtbl d3d10_effect_vtbl =
2263 /* IUnknown methods */
2264 d3d10_effect_QueryInterface,
2265 d3d10_effect_AddRef,
2266 d3d10_effect_Release,
2267 /* ID3D10Effect methods */
2268 d3d10_effect_IsValid,
2269 d3d10_effect_IsPool,
2270 d3d10_effect_GetDevice,
2271 d3d10_effect_GetDesc,
2272 d3d10_effect_GetConstantBufferByIndex,
2273 d3d10_effect_GetConstantBufferByName,
2274 d3d10_effect_GetVariableByIndex,
2275 d3d10_effect_GetVariableByName,
2276 d3d10_effect_GetVariableBySemantic,
2277 d3d10_effect_GetTechniqueByIndex,
2278 d3d10_effect_GetTechniqueByName,
2279 d3d10_effect_Optimize,
2280 d3d10_effect_IsOptimized,
2283 /* ID3D10EffectTechnique methods */
2285 static inline struct d3d10_effect_technique *impl_from_ID3D10EffectTechnique(ID3D10EffectTechnique *iface)
2287 return CONTAINING_RECORD(iface, struct d3d10_effect_technique, ID3D10EffectTechnique_iface);
2290 static BOOL STDMETHODCALLTYPE d3d10_effect_technique_IsValid(ID3D10EffectTechnique *iface)
2292 struct d3d10_effect_technique *This = impl_from_ID3D10EffectTechnique(iface);
2294 TRACE("iface %p\n", iface);
2296 return This != &null_technique;
2299 static HRESULT STDMETHODCALLTYPE d3d10_effect_technique_GetDesc(ID3D10EffectTechnique *iface,
2300 D3D10_TECHNIQUE_DESC *desc)
2302 struct d3d10_effect_technique *This = impl_from_ID3D10EffectTechnique(iface);
2304 TRACE("iface %p, desc %p\n", iface, desc);
2306 if(This == &null_technique)
2308 WARN("Null technique specified\n");
2309 return E_FAIL;
2312 if(!desc)
2314 WARN("Invalid argument specified\n");
2315 return E_INVALIDARG;
2318 desc->Name = This->name;
2319 desc->Passes = This->pass_count;
2320 desc->Annotations = This->annotation_count;
2322 return S_OK;
2325 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_technique_GetAnnotationByIndex(
2326 ID3D10EffectTechnique *iface, UINT index)
2328 struct d3d10_effect_technique *This = impl_from_ID3D10EffectTechnique(iface);
2329 struct d3d10_effect_variable *a;
2331 TRACE("iface %p, index %u\n", iface, index);
2333 if (index >= This->annotation_count)
2335 WARN("Invalid index specified\n");
2336 return &null_variable.ID3D10EffectVariable_iface;
2339 a = &This->annotations[index];
2341 TRACE("Returning annotation %p, %s\n", a, debugstr_a(a->name));
2343 return &a->ID3D10EffectVariable_iface;
2346 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_technique_GetAnnotationByName(
2347 ID3D10EffectTechnique *iface, LPCSTR name)
2349 struct d3d10_effect_technique *This = impl_from_ID3D10EffectTechnique(iface);
2350 unsigned int i;
2352 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
2354 for (i = 0; i < This->annotation_count; ++i)
2356 struct d3d10_effect_variable *a = &This->annotations[i];
2357 if (!strcmp(a->name, name))
2359 TRACE("Returning annotation %p\n", a);
2360 return &a->ID3D10EffectVariable_iface;
2364 WARN("Invalid name specified\n");
2366 return &null_variable.ID3D10EffectVariable_iface;
2369 static struct ID3D10EffectPass * STDMETHODCALLTYPE d3d10_effect_technique_GetPassByIndex(ID3D10EffectTechnique *iface,
2370 UINT index)
2372 struct d3d10_effect_technique *This = impl_from_ID3D10EffectTechnique(iface);
2373 struct d3d10_effect_pass *p;
2375 TRACE("iface %p, index %u\n", iface, index);
2377 if (index >= This->pass_count)
2379 WARN("Invalid index specified\n");
2380 return &null_pass.ID3D10EffectPass_iface;
2383 p = &This->passes[index];
2385 TRACE("Returning pass %p, %s.\n", p, debugstr_a(p->name));
2387 return &p->ID3D10EffectPass_iface;
2390 static struct ID3D10EffectPass * STDMETHODCALLTYPE d3d10_effect_technique_GetPassByName(ID3D10EffectTechnique *iface,
2391 LPCSTR name)
2393 struct d3d10_effect_technique *This = impl_from_ID3D10EffectTechnique(iface);
2394 unsigned int i;
2396 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
2398 /* Do not check for name==NULL, W7/DX10 crashes in that case. */
2400 for (i = 0; i < This->pass_count; ++i)
2402 struct d3d10_effect_pass *p = &This->passes[i];
2403 if (!strcmp(p->name, name))
2405 TRACE("Returning pass %p\n", p);
2406 return &p->ID3D10EffectPass_iface;
2410 WARN("Invalid name specified\n");
2412 return &null_pass.ID3D10EffectPass_iface;
2415 static HRESULT STDMETHODCALLTYPE d3d10_effect_technique_ComputeStateBlockMask(ID3D10EffectTechnique *iface,
2416 D3D10_STATE_BLOCK_MASK *mask)
2418 FIXME("iface %p,mask %p stub!\n", iface, mask);
2420 return E_NOTIMPL;
2423 static const struct ID3D10EffectTechniqueVtbl d3d10_effect_technique_vtbl =
2425 /* ID3D10EffectTechnique methods */
2426 d3d10_effect_technique_IsValid,
2427 d3d10_effect_technique_GetDesc,
2428 d3d10_effect_technique_GetAnnotationByIndex,
2429 d3d10_effect_technique_GetAnnotationByName,
2430 d3d10_effect_technique_GetPassByIndex,
2431 d3d10_effect_technique_GetPassByName,
2432 d3d10_effect_technique_ComputeStateBlockMask,
2435 /* ID3D10EffectPass methods */
2437 static inline struct d3d10_effect_pass *impl_from_ID3D10EffectPass(ID3D10EffectPass *iface)
2439 return CONTAINING_RECORD(iface, struct d3d10_effect_pass, ID3D10EffectPass_iface);
2442 static BOOL STDMETHODCALLTYPE d3d10_effect_pass_IsValid(ID3D10EffectPass *iface)
2444 struct d3d10_effect_pass *This = impl_from_ID3D10EffectPass(iface);
2446 TRACE("iface %p\n", iface);
2448 return This != &null_pass;
2451 static HRESULT STDMETHODCALLTYPE d3d10_effect_pass_GetDesc(ID3D10EffectPass *iface,
2452 D3D10_PASS_DESC *desc)
2454 struct d3d10_effect_pass *This = impl_from_ID3D10EffectPass(iface);
2455 unsigned int i;
2457 FIXME("iface %p, desc %p partial stub!\n", iface, desc);
2459 if(This == &null_pass)
2461 WARN("Null pass specified\n");
2462 return E_FAIL;
2465 if(!desc)
2467 WARN("Invalid argument specified\n");
2468 return E_INVALIDARG;
2471 memset(desc, 0, sizeof(*desc));
2472 desc->Name = This->name;
2473 for (i = 0; i < This->object_count; ++i)
2475 struct d3d10_effect_object *o = &This->objects[i];
2476 if (o->type == D3D10_EOT_VERTEXSHADER)
2478 struct d3d10_effect_variable *v = o->data;
2479 struct d3d10_effect_shader_variable *s = v->data;
2480 desc->pIAInputSignature = (BYTE *)s->input_signature.signature;
2481 desc->IAInputSignatureSize = s->input_signature.signature_size;
2482 break;
2486 return S_OK;
2489 static HRESULT STDMETHODCALLTYPE d3d10_effect_pass_GetVertexShaderDesc(ID3D10EffectPass *iface,
2490 D3D10_PASS_SHADER_DESC *desc)
2492 struct d3d10_effect_pass *This = impl_from_ID3D10EffectPass(iface);
2493 unsigned int i;
2495 TRACE("iface %p, desc %p\n", iface, desc);
2497 if (This == &null_pass)
2499 WARN("Null pass specified\n");
2500 return E_FAIL;
2503 if (!desc)
2505 WARN("Invalid argument specified\n");
2506 return E_INVALIDARG;
2509 for (i = 0; i < This->object_count; ++i)
2511 struct d3d10_effect_object *o = &This->objects[i];
2513 if (o->type == D3D10_EOT_VERTEXSHADER)
2515 desc->pShaderVariable = o->data;
2516 desc->ShaderIndex = o->index;
2517 return S_OK;
2521 TRACE("Returning null_shader_variable\n");
2522 desc->pShaderVariable = (ID3D10EffectShaderVariable *)&null_shader_variable;
2523 desc->ShaderIndex = 0;
2525 return S_OK;
2528 static HRESULT STDMETHODCALLTYPE d3d10_effect_pass_GetGeometryShaderDesc(ID3D10EffectPass *iface,
2529 D3D10_PASS_SHADER_DESC *desc)
2531 struct d3d10_effect_pass *This = impl_from_ID3D10EffectPass(iface);
2532 unsigned int i;
2534 TRACE("iface %p, desc %p\n", iface, desc);
2536 if (This == &null_pass)
2538 WARN("Null pass specified\n");
2539 return E_FAIL;
2542 if (!desc)
2544 WARN("Invalid argument specified\n");
2545 return E_INVALIDARG;
2548 for (i = 0; i < This->object_count; ++i)
2550 struct d3d10_effect_object *o = &This->objects[i];
2552 if (o->type == D3D10_EOT_GEOMETRYSHADER)
2554 desc->pShaderVariable = o->data;
2555 desc->ShaderIndex = o->index;
2556 return S_OK;
2560 TRACE("Returning null_shader_variable\n");
2561 desc->pShaderVariable = (ID3D10EffectShaderVariable *)&null_shader_variable;
2562 desc->ShaderIndex = 0;
2564 return S_OK;
2567 static HRESULT STDMETHODCALLTYPE d3d10_effect_pass_GetPixelShaderDesc(ID3D10EffectPass *iface,
2568 D3D10_PASS_SHADER_DESC *desc)
2570 struct d3d10_effect_pass *This = impl_from_ID3D10EffectPass(iface);
2571 unsigned int i;
2573 TRACE("iface %p, desc %p\n", iface, desc);
2575 if (This == &null_pass)
2577 WARN("Null pass specified\n");
2578 return E_FAIL;
2581 if (!desc)
2583 WARN("Invalid argument specified\n");
2584 return E_INVALIDARG;
2587 for (i = 0; i < This->object_count; ++i)
2589 struct d3d10_effect_object *o = &This->objects[i];
2591 if (o->type == D3D10_EOT_PIXELSHADER)
2593 desc->pShaderVariable = o->data;
2594 desc->ShaderIndex = o->index;
2595 return S_OK;
2599 TRACE("Returning null_shader_variable\n");
2600 desc->pShaderVariable = (ID3D10EffectShaderVariable *)&null_shader_variable;
2601 desc->ShaderIndex = 0;
2603 return S_OK;
2606 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_pass_GetAnnotationByIndex(ID3D10EffectPass *iface,
2607 UINT index)
2609 struct d3d10_effect_pass *This = impl_from_ID3D10EffectPass(iface);
2610 struct d3d10_effect_variable *a;
2612 TRACE("iface %p, index %u\n", iface, index);
2614 if (index >= This->annotation_count)
2616 WARN("Invalid index specified\n");
2617 return &null_variable.ID3D10EffectVariable_iface;
2620 a = &This->annotations[index];
2622 TRACE("Returning annotation %p, %s\n", a, debugstr_a(a->name));
2624 return &a->ID3D10EffectVariable_iface;
2627 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_pass_GetAnnotationByName(ID3D10EffectPass *iface,
2628 LPCSTR name)
2630 struct d3d10_effect_pass *This = impl_from_ID3D10EffectPass(iface);
2631 unsigned int i;
2633 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
2635 for (i = 0; i < This->annotation_count; ++i)
2637 struct d3d10_effect_variable *a = &This->annotations[i];
2638 if (!strcmp(a->name, name))
2640 TRACE("Returning annotation %p\n", a);
2641 return &a->ID3D10EffectVariable_iface;
2645 WARN("Invalid name specified\n");
2647 return &null_variable.ID3D10EffectVariable_iface;
2650 static HRESULT STDMETHODCALLTYPE d3d10_effect_pass_Apply(ID3D10EffectPass *iface, UINT flags)
2652 struct d3d10_effect_pass *This = impl_from_ID3D10EffectPass(iface);
2653 HRESULT hr = S_OK;
2654 unsigned int i;
2656 TRACE("iface %p, flags %#x\n", iface, flags);
2658 if (flags) FIXME("Ignoring flags (%#x)\n", flags);
2660 for (i = 0; i < This->object_count; ++i)
2662 hr = d3d10_effect_object_apply(&This->objects[i]);
2663 if (FAILED(hr)) break;
2666 return hr;
2669 static HRESULT STDMETHODCALLTYPE d3d10_effect_pass_ComputeStateBlockMask(ID3D10EffectPass *iface,
2670 D3D10_STATE_BLOCK_MASK *mask)
2672 FIXME("iface %p, mask %p stub!\n", iface, mask);
2674 return E_NOTIMPL;
2677 static const struct ID3D10EffectPassVtbl d3d10_effect_pass_vtbl =
2679 /* ID3D10EffectPass methods */
2680 d3d10_effect_pass_IsValid,
2681 d3d10_effect_pass_GetDesc,
2682 d3d10_effect_pass_GetVertexShaderDesc,
2683 d3d10_effect_pass_GetGeometryShaderDesc,
2684 d3d10_effect_pass_GetPixelShaderDesc,
2685 d3d10_effect_pass_GetAnnotationByIndex,
2686 d3d10_effect_pass_GetAnnotationByName,
2687 d3d10_effect_pass_Apply,
2688 d3d10_effect_pass_ComputeStateBlockMask,
2691 /* ID3D10EffectVariable methods */
2693 static BOOL STDMETHODCALLTYPE d3d10_effect_variable_IsValid(ID3D10EffectVariable *iface)
2695 TRACE("iface %p\n", iface);
2697 return impl_from_ID3D10EffectVariable(iface) != &null_variable;
2700 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_variable_GetType(ID3D10EffectVariable *iface)
2702 struct d3d10_effect_variable *This = impl_from_ID3D10EffectVariable(iface);
2704 TRACE("iface %p\n", iface);
2706 return &This->type->ID3D10EffectType_iface;
2709 static HRESULT STDMETHODCALLTYPE d3d10_effect_variable_GetDesc(ID3D10EffectVariable *iface,
2710 D3D10_EFFECT_VARIABLE_DESC *desc)
2712 struct d3d10_effect_variable *This = impl_from_ID3D10EffectVariable(iface);
2714 TRACE("iface %p, desc %p\n", iface, desc);
2716 if (!iface->lpVtbl->IsValid(iface))
2718 WARN("Null variable specified\n");
2719 return E_FAIL;
2722 if (!desc)
2724 WARN("Invalid argument specified\n");
2725 return E_INVALIDARG;
2728 /* FIXME: This isn't correct. Anonymous shaders let desc->ExplicitBindPoint untouched, but normal shaders set it! */
2729 memset(desc, 0, sizeof(*desc));
2730 desc->Name = This->name;
2731 desc->Semantic = This->semantic;
2732 desc->Flags = This->flag;
2733 desc->Annotations = This->annotation_count;
2734 desc->BufferOffset = This->buffer_offset;
2736 if (This->flag & D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT)
2738 desc->ExplicitBindPoint = This->buffer_offset;
2741 return S_OK;
2744 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_variable_GetAnnotationByIndex(
2745 ID3D10EffectVariable *iface, UINT index)
2747 struct d3d10_effect_variable *This = impl_from_ID3D10EffectVariable(iface);
2748 struct d3d10_effect_variable *a;
2750 TRACE("iface %p, index %u\n", iface, index);
2752 if (index >= This->annotation_count)
2754 WARN("Invalid index specified\n");
2755 return &null_variable.ID3D10EffectVariable_iface;
2758 a = &This->annotations[index];
2760 TRACE("Returning annotation %p, %s\n", a, debugstr_a(a->name));
2762 return &a->ID3D10EffectVariable_iface;
2765 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_variable_GetAnnotationByName(
2766 ID3D10EffectVariable *iface, LPCSTR name)
2768 struct d3d10_effect_variable *This = impl_from_ID3D10EffectVariable(iface);
2769 unsigned int i;
2771 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
2773 for (i = 0; i < This->annotation_count; ++i)
2775 struct d3d10_effect_variable *a = &This->annotations[i];
2776 if (!strcmp(a->name, name))
2778 TRACE("Returning annotation %p\n", a);
2779 return &a->ID3D10EffectVariable_iface;
2783 WARN("Invalid name specified\n");
2785 return &null_variable.ID3D10EffectVariable_iface;
2788 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_variable_GetMemberByIndex(
2789 ID3D10EffectVariable *iface, UINT index)
2791 struct d3d10_effect_variable *This = impl_from_ID3D10EffectVariable(iface);
2792 struct d3d10_effect_variable *m;
2794 TRACE("iface %p, index %u\n", iface, index);
2796 if (index >= This->type->member_count)
2798 WARN("Invalid index specified\n");
2799 return &null_variable.ID3D10EffectVariable_iface;
2802 m = &This->members[index];
2804 TRACE("Returning member %p, %s\n", m, debugstr_a(m->name));
2806 return &m->ID3D10EffectVariable_iface;
2809 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_variable_GetMemberByName(
2810 ID3D10EffectVariable *iface, LPCSTR name)
2812 struct d3d10_effect_variable *This = impl_from_ID3D10EffectVariable(iface);
2813 unsigned int i;
2815 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
2817 if (!name)
2819 WARN("Invalid name specified\n");
2820 return &null_variable.ID3D10EffectVariable_iface;
2823 for (i = 0; i < This->type->member_count; ++i)
2825 struct d3d10_effect_variable *m = &This->members[i];
2827 if (m->name)
2829 if (!strcmp(m->name, name))
2831 TRACE("Returning member %p\n", m);
2832 return &m->ID3D10EffectVariable_iface;
2837 WARN("Invalid name specified\n");
2839 return &null_variable.ID3D10EffectVariable_iface;
2842 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_variable_GetMemberBySemantic(
2843 ID3D10EffectVariable *iface, LPCSTR semantic)
2845 struct d3d10_effect_variable *This = impl_from_ID3D10EffectVariable(iface);
2846 unsigned int i;
2848 TRACE("iface %p, semantic %s.\n", iface, debugstr_a(semantic));
2850 if (!semantic)
2852 WARN("Invalid semantic specified\n");
2853 return &null_variable.ID3D10EffectVariable_iface;
2856 for (i = 0; i < This->type->member_count; ++i)
2858 struct d3d10_effect_variable *m = &This->members[i];
2860 if (m->semantic)
2862 if (!strcmp(m->semantic, semantic))
2864 TRACE("Returning member %p\n", m);
2865 return &m->ID3D10EffectVariable_iface;
2870 WARN("Invalid semantic specified\n");
2872 return &null_variable.ID3D10EffectVariable_iface;
2875 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_variable_GetElement(
2876 ID3D10EffectVariable *iface, UINT index)
2878 struct d3d10_effect_variable *This = impl_from_ID3D10EffectVariable(iface);
2879 struct d3d10_effect_variable *v;
2881 TRACE("iface %p, index %u\n", iface, index);
2883 if (index >= This->type->element_count)
2885 WARN("Invalid index specified\n");
2886 return &null_variable.ID3D10EffectVariable_iface;
2889 v = &This->elements[index];
2891 TRACE("Returning element %p, %s\n", v, debugstr_a(v->name));
2893 return &v->ID3D10EffectVariable_iface;
2896 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_variable_GetParentConstantBuffer(
2897 ID3D10EffectVariable *iface)
2899 struct d3d10_effect_variable *This = impl_from_ID3D10EffectVariable(iface);
2901 TRACE("iface %p\n", iface);
2903 return (ID3D10EffectConstantBuffer *)This->buffer;
2906 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsScalar(
2907 ID3D10EffectVariable *iface)
2909 struct d3d10_effect_variable *This = impl_from_ID3D10EffectVariable(iface);
2911 TRACE("iface %p\n", iface);
2913 if (This->ID3D10EffectVariable_iface.lpVtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_scalar_variable_vtbl)
2914 return (ID3D10EffectScalarVariable *)&This->ID3D10EffectVariable_iface;
2916 return (ID3D10EffectScalarVariable *)&null_scalar_variable.ID3D10EffectVariable_iface;
2919 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsVector(
2920 ID3D10EffectVariable *iface)
2922 struct d3d10_effect_variable *This = impl_from_ID3D10EffectVariable(iface);
2924 TRACE("iface %p\n", iface);
2926 if (This->ID3D10EffectVariable_iface.lpVtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_vector_variable_vtbl)
2927 return (ID3D10EffectVectorVariable *)&This->ID3D10EffectVariable_iface;
2929 return (ID3D10EffectVectorVariable *)&null_vector_variable.ID3D10EffectVariable_iface;
2932 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsMatrix(
2933 ID3D10EffectVariable *iface)
2935 struct d3d10_effect_variable *This = impl_from_ID3D10EffectVariable(iface);
2937 TRACE("iface %p\n", iface);
2939 if (This->ID3D10EffectVariable_iface.lpVtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_matrix_variable_vtbl)
2940 return (ID3D10EffectMatrixVariable *)&This->ID3D10EffectVariable_iface;
2942 return (ID3D10EffectMatrixVariable *)&null_matrix_variable.ID3D10EffectVariable_iface;
2945 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsString(
2946 ID3D10EffectVariable *iface)
2948 struct d3d10_effect_variable *This = impl_from_ID3D10EffectVariable(iface);
2950 TRACE("iface %p\n", iface);
2952 if (This->ID3D10EffectVariable_iface.lpVtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_string_variable_vtbl)
2953 return (ID3D10EffectStringVariable *)&This->ID3D10EffectVariable_iface;
2955 return (ID3D10EffectStringVariable *)&null_string_variable.ID3D10EffectVariable_iface;
2958 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsShaderResource(
2959 ID3D10EffectVariable *iface)
2961 struct d3d10_effect_variable *This = impl_from_ID3D10EffectVariable(iface);
2963 TRACE("iface %p\n", iface);
2965 if (This->ID3D10EffectVariable_iface.lpVtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_shader_resource_variable_vtbl)
2966 return (ID3D10EffectShaderResourceVariable *)&This->ID3D10EffectVariable_iface;
2968 return (ID3D10EffectShaderResourceVariable *)&null_shader_resource_variable.ID3D10EffectVariable_iface;
2971 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsRenderTargetView(
2972 ID3D10EffectVariable *iface)
2974 struct d3d10_effect_variable *This = impl_from_ID3D10EffectVariable(iface);
2976 TRACE("iface %p\n", iface);
2978 if (This->ID3D10EffectVariable_iface.lpVtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_render_target_view_variable_vtbl)
2979 return (ID3D10EffectRenderTargetViewVariable *)&This->ID3D10EffectVariable_iface;
2981 return (ID3D10EffectRenderTargetViewVariable *)&null_render_target_view_variable.ID3D10EffectVariable_iface;
2984 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsDepthStencilView(
2985 ID3D10EffectVariable *iface)
2987 struct d3d10_effect_variable *This = impl_from_ID3D10EffectVariable(iface);
2989 TRACE("iface %p\n", iface);
2991 if (This->ID3D10EffectVariable_iface.lpVtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_depth_stencil_view_variable_vtbl)
2992 return (ID3D10EffectDepthStencilViewVariable *)&This->ID3D10EffectVariable_iface;
2994 return (ID3D10EffectDepthStencilViewVariable *)&null_depth_stencil_view_variable.ID3D10EffectVariable_iface;
2997 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_variable_AsConstantBuffer(
2998 ID3D10EffectVariable *iface)
3000 struct d3d10_effect_variable *This = impl_from_ID3D10EffectVariable(iface);
3002 TRACE("iface %p\n", iface);
3004 if (This->ID3D10EffectVariable_iface.lpVtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_constant_buffer_vtbl)
3005 return (ID3D10EffectConstantBuffer *)&This->ID3D10EffectVariable_iface;
3007 return (ID3D10EffectConstantBuffer *)&null_local_buffer.ID3D10EffectVariable_iface;
3010 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsShader(
3011 ID3D10EffectVariable *iface)
3013 struct d3d10_effect_variable *This = impl_from_ID3D10EffectVariable(iface);
3015 TRACE("iface %p\n", iface);
3017 if (This->ID3D10EffectVariable_iface.lpVtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_shader_variable_vtbl)
3018 return (ID3D10EffectShaderVariable *)&This->ID3D10EffectVariable_iface;
3020 return (ID3D10EffectShaderVariable *)&null_shader_variable.ID3D10EffectVariable_iface;
3023 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsBlend(ID3D10EffectVariable *iface)
3025 struct d3d10_effect_variable *This = impl_from_ID3D10EffectVariable(iface);
3027 TRACE("iface %p\n", iface);
3029 if (This->ID3D10EffectVariable_iface.lpVtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_blend_variable_vtbl)
3030 return (ID3D10EffectBlendVariable *)&This->ID3D10EffectVariable_iface;
3032 return (ID3D10EffectBlendVariable *)&null_blend_variable.ID3D10EffectVariable_iface;
3035 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsDepthStencil(
3036 ID3D10EffectVariable *iface)
3038 struct d3d10_effect_variable *This = impl_from_ID3D10EffectVariable(iface);
3040 TRACE("iface %p\n", iface);
3042 if (This->ID3D10EffectVariable_iface.lpVtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_depth_stencil_variable_vtbl)
3043 return (ID3D10EffectDepthStencilVariable *)&This->ID3D10EffectVariable_iface;
3045 return (ID3D10EffectDepthStencilVariable *)&null_depth_stencil_variable.ID3D10EffectVariable_iface;
3048 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsRasterizer(
3049 ID3D10EffectVariable *iface)
3051 struct d3d10_effect_variable *This = impl_from_ID3D10EffectVariable(iface);
3053 TRACE("iface %p\n", iface);
3055 if (This->ID3D10EffectVariable_iface.lpVtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_rasterizer_variable_vtbl)
3056 return (ID3D10EffectRasterizerVariable *)&This->ID3D10EffectVariable_iface;
3058 return (ID3D10EffectRasterizerVariable *)&null_rasterizer_variable.ID3D10EffectVariable_iface;
3061 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsSampler(
3062 ID3D10EffectVariable *iface)
3064 struct d3d10_effect_variable *This = impl_from_ID3D10EffectVariable(iface);
3066 TRACE("iface %p\n", iface);
3068 if (This->ID3D10EffectVariable_iface.lpVtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_sampler_variable_vtbl)
3069 return (ID3D10EffectSamplerVariable *)&This->ID3D10EffectVariable_iface;
3071 return (ID3D10EffectSamplerVariable *)&null_sampler_variable.ID3D10EffectVariable_iface;
3074 static HRESULT STDMETHODCALLTYPE d3d10_effect_variable_SetRawValue(ID3D10EffectVariable *iface,
3075 void *data, UINT offset, UINT count)
3077 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface, data, offset, count);
3079 return E_NOTIMPL;
3082 static HRESULT STDMETHODCALLTYPE d3d10_effect_variable_GetRawValue(ID3D10EffectVariable *iface,
3083 void *data, UINT offset, UINT count)
3085 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface, data, offset, count);
3087 return E_NOTIMPL;
3090 static const struct ID3D10EffectVariableVtbl d3d10_effect_variable_vtbl =
3092 /* ID3D10EffectVariable methods */
3093 d3d10_effect_variable_IsValid,
3094 d3d10_effect_variable_GetType,
3095 d3d10_effect_variable_GetDesc,
3096 d3d10_effect_variable_GetAnnotationByIndex,
3097 d3d10_effect_variable_GetAnnotationByName,
3098 d3d10_effect_variable_GetMemberByIndex,
3099 d3d10_effect_variable_GetMemberByName,
3100 d3d10_effect_variable_GetMemberBySemantic,
3101 d3d10_effect_variable_GetElement,
3102 d3d10_effect_variable_GetParentConstantBuffer,
3103 d3d10_effect_variable_AsScalar,
3104 d3d10_effect_variable_AsVector,
3105 d3d10_effect_variable_AsMatrix,
3106 d3d10_effect_variable_AsString,
3107 d3d10_effect_variable_AsShaderResource,
3108 d3d10_effect_variable_AsRenderTargetView,
3109 d3d10_effect_variable_AsDepthStencilView,
3110 d3d10_effect_variable_AsConstantBuffer,
3111 d3d10_effect_variable_AsShader,
3112 d3d10_effect_variable_AsBlend,
3113 d3d10_effect_variable_AsDepthStencil,
3114 d3d10_effect_variable_AsRasterizer,
3115 d3d10_effect_variable_AsSampler,
3116 d3d10_effect_variable_SetRawValue,
3117 d3d10_effect_variable_GetRawValue,
3120 /* ID3D10EffectVariable methods */
3121 static BOOL STDMETHODCALLTYPE d3d10_effect_constant_buffer_IsValid(ID3D10EffectConstantBuffer *iface)
3123 TRACE("iface %p\n", iface);
3125 return (struct d3d10_effect_variable *)iface != &null_local_buffer;
3128 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetType(ID3D10EffectConstantBuffer *iface)
3130 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
3133 static HRESULT STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetDesc(ID3D10EffectConstantBuffer *iface,
3134 D3D10_EFFECT_VARIABLE_DESC *desc)
3136 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
3139 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetAnnotationByIndex(
3140 ID3D10EffectConstantBuffer *iface, UINT index)
3142 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
3145 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetAnnotationByName(
3146 ID3D10EffectConstantBuffer *iface, LPCSTR name)
3148 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
3151 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetMemberByIndex(
3152 ID3D10EffectConstantBuffer *iface, UINT index)
3154 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
3157 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetMemberByName(
3158 ID3D10EffectConstantBuffer *iface, LPCSTR name)
3160 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
3163 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetMemberBySemantic(
3164 ID3D10EffectConstantBuffer *iface, LPCSTR semantic)
3166 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
3169 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetElement(
3170 ID3D10EffectConstantBuffer *iface, UINT index)
3172 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
3175 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetParentConstantBuffer(
3176 ID3D10EffectConstantBuffer *iface)
3178 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
3181 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsScalar(
3182 ID3D10EffectConstantBuffer *iface)
3184 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
3187 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsVector(
3188 ID3D10EffectConstantBuffer *iface)
3190 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
3193 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsMatrix(
3194 ID3D10EffectConstantBuffer *iface)
3196 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
3199 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsString(
3200 ID3D10EffectConstantBuffer *iface)
3202 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
3205 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsShaderResource(
3206 ID3D10EffectConstantBuffer *iface)
3208 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
3211 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsRenderTargetView(
3212 ID3D10EffectConstantBuffer *iface)
3214 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
3217 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsDepthStencilView(
3218 ID3D10EffectConstantBuffer *iface)
3220 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
3223 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsConstantBuffer(
3224 ID3D10EffectConstantBuffer *iface)
3226 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
3229 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsShader(
3230 ID3D10EffectConstantBuffer *iface)
3232 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
3235 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsBlend(ID3D10EffectConstantBuffer *iface)
3237 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
3240 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsDepthStencil(
3241 ID3D10EffectConstantBuffer *iface)
3243 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
3246 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsRasterizer(
3247 ID3D10EffectConstantBuffer *iface)
3249 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
3252 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsSampler(
3253 ID3D10EffectConstantBuffer *iface)
3255 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
3258 static HRESULT STDMETHODCALLTYPE d3d10_effect_constant_buffer_SetRawValue(ID3D10EffectConstantBuffer *iface,
3259 void *data, UINT offset, UINT count)
3261 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
3264 static HRESULT STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetRawValue(ID3D10EffectConstantBuffer *iface,
3265 void *data, UINT offset, UINT count)
3267 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
3270 /* ID3D10EffectConstantBuffer methods */
3271 static HRESULT STDMETHODCALLTYPE d3d10_effect_constant_buffer_SetConstantBuffer(ID3D10EffectConstantBuffer *iface,
3272 ID3D10Buffer *buffer)
3274 FIXME("iface %p, buffer %p stub!\n", iface, buffer);
3276 return E_NOTIMPL;
3279 static HRESULT STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetConstantBuffer(ID3D10EffectConstantBuffer *iface,
3280 ID3D10Buffer **buffer)
3282 FIXME("iface %p, buffer %p stub!\n", iface, buffer);
3284 return E_NOTIMPL;
3287 static HRESULT STDMETHODCALLTYPE d3d10_effect_constant_buffer_SetTextureBuffer(ID3D10EffectConstantBuffer *iface,
3288 ID3D10ShaderResourceView *view)
3290 FIXME("iface %p, view %p stub!\n", iface, view);
3292 return E_NOTIMPL;
3295 static HRESULT STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetTextureBuffer(ID3D10EffectConstantBuffer *iface,
3296 ID3D10ShaderResourceView **view)
3298 FIXME("iface %p, view %p stub!\n", iface, view);
3300 return E_NOTIMPL;
3303 static const struct ID3D10EffectConstantBufferVtbl d3d10_effect_constant_buffer_vtbl =
3305 /* ID3D10EffectVariable methods */
3306 d3d10_effect_constant_buffer_IsValid,
3307 d3d10_effect_constant_buffer_GetType,
3308 d3d10_effect_constant_buffer_GetDesc,
3309 d3d10_effect_constant_buffer_GetAnnotationByIndex,
3310 d3d10_effect_constant_buffer_GetAnnotationByName,
3311 d3d10_effect_constant_buffer_GetMemberByIndex,
3312 d3d10_effect_constant_buffer_GetMemberByName,
3313 d3d10_effect_constant_buffer_GetMemberBySemantic,
3314 d3d10_effect_constant_buffer_GetElement,
3315 d3d10_effect_constant_buffer_GetParentConstantBuffer,
3316 d3d10_effect_constant_buffer_AsScalar,
3317 d3d10_effect_constant_buffer_AsVector,
3318 d3d10_effect_constant_buffer_AsMatrix,
3319 d3d10_effect_constant_buffer_AsString,
3320 d3d10_effect_constant_buffer_AsShaderResource,
3321 d3d10_effect_constant_buffer_AsRenderTargetView,
3322 d3d10_effect_constant_buffer_AsDepthStencilView,
3323 d3d10_effect_constant_buffer_AsConstantBuffer,
3324 d3d10_effect_constant_buffer_AsShader,
3325 d3d10_effect_constant_buffer_AsBlend,
3326 d3d10_effect_constant_buffer_AsDepthStencil,
3327 d3d10_effect_constant_buffer_AsRasterizer,
3328 d3d10_effect_constant_buffer_AsSampler,
3329 d3d10_effect_constant_buffer_SetRawValue,
3330 d3d10_effect_constant_buffer_GetRawValue,
3331 /* ID3D10EffectConstantBuffer methods */
3332 d3d10_effect_constant_buffer_SetConstantBuffer,
3333 d3d10_effect_constant_buffer_GetConstantBuffer,
3334 d3d10_effect_constant_buffer_SetTextureBuffer,
3335 d3d10_effect_constant_buffer_GetTextureBuffer,
3338 /* ID3D10EffectVariable methods */
3340 static BOOL STDMETHODCALLTYPE d3d10_effect_scalar_variable_IsValid(ID3D10EffectScalarVariable *iface)
3342 TRACE("iface %p\n", iface);
3344 return (struct d3d10_effect_variable *)iface != &null_scalar_variable;
3347 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetType(
3348 ID3D10EffectScalarVariable *iface)
3350 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
3353 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetDesc(ID3D10EffectScalarVariable *iface,
3354 D3D10_EFFECT_VARIABLE_DESC *desc)
3356 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
3359 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetAnnotationByIndex(
3360 ID3D10EffectScalarVariable *iface, UINT index)
3362 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
3365 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetAnnotationByName(
3366 ID3D10EffectScalarVariable *iface, LPCSTR name)
3368 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
3371 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetMemberByIndex(
3372 ID3D10EffectScalarVariable *iface, UINT index)
3374 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
3377 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetMemberByName(
3378 ID3D10EffectScalarVariable *iface, LPCSTR name)
3380 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
3383 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetMemberBySemantic(
3384 ID3D10EffectScalarVariable *iface, LPCSTR semantic)
3386 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
3389 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetElement(
3390 ID3D10EffectScalarVariable *iface, UINT index)
3392 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
3395 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetParentConstantBuffer(
3396 ID3D10EffectScalarVariable *iface)
3398 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
3401 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsScalar(
3402 ID3D10EffectScalarVariable *iface)
3404 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
3407 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsVector(
3408 ID3D10EffectScalarVariable *iface)
3410 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
3413 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsMatrix(
3414 ID3D10EffectScalarVariable *iface)
3416 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
3419 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsString(
3420 ID3D10EffectScalarVariable *iface)
3422 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
3425 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsShaderResource(
3426 ID3D10EffectScalarVariable *iface)
3428 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
3431 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsRenderTargetView(
3432 ID3D10EffectScalarVariable *iface)
3434 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
3437 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsDepthStencilView(
3438 ID3D10EffectScalarVariable *iface)
3440 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
3443 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsConstantBuffer(
3444 ID3D10EffectScalarVariable *iface)
3446 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
3449 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsShader(
3450 ID3D10EffectScalarVariable *iface)
3452 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
3455 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsBlend(
3456 ID3D10EffectScalarVariable *iface)
3458 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
3461 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsDepthStencil(
3462 ID3D10EffectScalarVariable *iface)
3464 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
3467 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsRasterizer(
3468 ID3D10EffectScalarVariable *iface)
3470 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
3473 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsSampler(
3474 ID3D10EffectScalarVariable *iface)
3476 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
3479 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetRawValue(ID3D10EffectScalarVariable *iface,
3480 void *data, UINT offset, UINT count)
3482 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
3485 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetRawValue(ID3D10EffectScalarVariable *iface,
3486 void *data, UINT offset, UINT count)
3488 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
3491 /* ID3D10EffectScalarVariable methods */
3493 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetFloat(ID3D10EffectScalarVariable *iface,
3494 float value)
3496 FIXME("iface %p, value %.8e stub!\n", iface, value);
3498 return E_NOTIMPL;
3501 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetFloat(ID3D10EffectScalarVariable *iface,
3502 float *value)
3504 FIXME("iface %p, value %p stub!\n", iface, value);
3506 return E_NOTIMPL;
3509 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetFloatArray(ID3D10EffectScalarVariable *iface,
3510 float *values, UINT offset, UINT count)
3512 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3514 return E_NOTIMPL;
3517 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetFloatArray(ID3D10EffectScalarVariable *iface,
3518 float *values, UINT offset, UINT count)
3520 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3522 return E_NOTIMPL;
3525 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetInt(ID3D10EffectScalarVariable *iface,
3526 int value)
3528 FIXME("iface %p, value %d stub!\n", iface, value);
3530 return E_NOTIMPL;
3533 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetInt(ID3D10EffectScalarVariable *iface,
3534 int *value)
3536 FIXME("iface %p, value %p stub!\n", iface, value);
3538 return E_NOTIMPL;
3541 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetIntArray(ID3D10EffectScalarVariable *iface,
3542 int *values, UINT offset, UINT count)
3544 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3546 return E_NOTIMPL;
3549 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetIntArray(ID3D10EffectScalarVariable *iface,
3550 int *values, UINT offset, UINT count)
3552 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3554 return E_NOTIMPL;
3557 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetBool(ID3D10EffectScalarVariable *iface,
3558 BOOL value)
3560 FIXME("iface %p, value %d stub!\n", iface, value);
3562 return E_NOTIMPL;
3565 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetBool(ID3D10EffectScalarVariable *iface,
3566 BOOL *value)
3568 FIXME("iface %p, value %p stub!\n", iface, value);
3570 return E_NOTIMPL;
3573 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetBoolArray(ID3D10EffectScalarVariable *iface,
3574 BOOL *values, UINT offset, UINT count)
3576 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3578 return E_NOTIMPL;
3581 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetBoolArray(ID3D10EffectScalarVariable *iface,
3582 BOOL *values, UINT offset, UINT count)
3584 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3586 return E_NOTIMPL;
3589 static const struct ID3D10EffectScalarVariableVtbl d3d10_effect_scalar_variable_vtbl =
3591 /* ID3D10EffectVariable methods */
3592 d3d10_effect_scalar_variable_IsValid,
3593 d3d10_effect_scalar_variable_GetType,
3594 d3d10_effect_scalar_variable_GetDesc,
3595 d3d10_effect_scalar_variable_GetAnnotationByIndex,
3596 d3d10_effect_scalar_variable_GetAnnotationByName,
3597 d3d10_effect_scalar_variable_GetMemberByIndex,
3598 d3d10_effect_scalar_variable_GetMemberByName,
3599 d3d10_effect_scalar_variable_GetMemberBySemantic,
3600 d3d10_effect_scalar_variable_GetElement,
3601 d3d10_effect_scalar_variable_GetParentConstantBuffer,
3602 d3d10_effect_scalar_variable_AsScalar,
3603 d3d10_effect_scalar_variable_AsVector,
3604 d3d10_effect_scalar_variable_AsMatrix,
3605 d3d10_effect_scalar_variable_AsString,
3606 d3d10_effect_scalar_variable_AsShaderResource,
3607 d3d10_effect_scalar_variable_AsRenderTargetView,
3608 d3d10_effect_scalar_variable_AsDepthStencilView,
3609 d3d10_effect_scalar_variable_AsConstantBuffer,
3610 d3d10_effect_scalar_variable_AsShader,
3611 d3d10_effect_scalar_variable_AsBlend,
3612 d3d10_effect_scalar_variable_AsDepthStencil,
3613 d3d10_effect_scalar_variable_AsRasterizer,
3614 d3d10_effect_scalar_variable_AsSampler,
3615 d3d10_effect_scalar_variable_SetRawValue,
3616 d3d10_effect_scalar_variable_GetRawValue,
3617 /* ID3D10EffectScalarVariable methods */
3618 d3d10_effect_scalar_variable_SetFloat,
3619 d3d10_effect_scalar_variable_GetFloat,
3620 d3d10_effect_scalar_variable_SetFloatArray,
3621 d3d10_effect_scalar_variable_GetFloatArray,
3622 d3d10_effect_scalar_variable_SetInt,
3623 d3d10_effect_scalar_variable_GetInt,
3624 d3d10_effect_scalar_variable_SetIntArray,
3625 d3d10_effect_scalar_variable_GetIntArray,
3626 d3d10_effect_scalar_variable_SetBool,
3627 d3d10_effect_scalar_variable_GetBool,
3628 d3d10_effect_scalar_variable_SetBoolArray,
3629 d3d10_effect_scalar_variable_GetBoolArray,
3632 /* ID3D10EffectVariable methods */
3634 static BOOL STDMETHODCALLTYPE d3d10_effect_vector_variable_IsValid(ID3D10EffectVectorVariable *iface)
3636 TRACE("iface %p\n", iface);
3638 return (struct d3d10_effect_variable *)iface != &null_vector_variable;
3641 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetType(
3642 ID3D10EffectVectorVariable *iface)
3644 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
3647 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetDesc(ID3D10EffectVectorVariable *iface,
3648 D3D10_EFFECT_VARIABLE_DESC *desc)
3650 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
3653 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetAnnotationByIndex(
3654 ID3D10EffectVectorVariable *iface, UINT index)
3656 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
3659 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetAnnotationByName(
3660 ID3D10EffectVectorVariable *iface, LPCSTR name)
3662 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
3665 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetMemberByIndex(
3666 ID3D10EffectVectorVariable *iface, UINT index)
3668 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
3671 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetMemberByName(
3672 ID3D10EffectVectorVariable *iface, LPCSTR name)
3674 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
3677 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetMemberBySemantic(
3678 ID3D10EffectVectorVariable *iface, LPCSTR semantic)
3680 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
3683 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetElement(
3684 ID3D10EffectVectorVariable *iface, UINT index)
3686 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
3689 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetParentConstantBuffer(
3690 ID3D10EffectVectorVariable *iface)
3692 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
3695 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsScalar(
3696 ID3D10EffectVectorVariable *iface)
3698 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
3701 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsVector(
3702 ID3D10EffectVectorVariable *iface)
3704 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
3707 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsMatrix(
3708 ID3D10EffectVectorVariable *iface)
3710 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
3713 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsString(
3714 ID3D10EffectVectorVariable *iface)
3716 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
3719 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsShaderResource(
3720 ID3D10EffectVectorVariable *iface)
3722 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
3725 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsRenderTargetView(
3726 ID3D10EffectVectorVariable *iface)
3728 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
3731 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsDepthStencilView(
3732 ID3D10EffectVectorVariable *iface)
3734 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
3737 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsConstantBuffer(
3738 ID3D10EffectVectorVariable *iface)
3740 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
3743 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsShader(
3744 ID3D10EffectVectorVariable *iface)
3746 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
3749 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsBlend(
3750 ID3D10EffectVectorVariable *iface)
3752 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
3755 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsDepthStencil(
3756 ID3D10EffectVectorVariable *iface)
3758 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
3761 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsRasterizer(
3762 ID3D10EffectVectorVariable *iface)
3764 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
3767 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsSampler(
3768 ID3D10EffectVectorVariable *iface)
3770 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
3773 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_SetRawValue(ID3D10EffectVectorVariable *iface,
3774 void *data, UINT offset, UINT count)
3776 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
3779 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetRawValue(ID3D10EffectVectorVariable *iface,
3780 void *data, UINT offset, UINT count)
3782 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
3785 /* ID3D10EffectVectorVariable methods */
3787 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_SetBoolVector(ID3D10EffectVectorVariable *iface,
3788 BOOL *value)
3790 FIXME("iface %p, value %p stub!\n", iface, value);
3792 return E_NOTIMPL;
3795 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_SetIntVector(ID3D10EffectVectorVariable *iface,
3796 int *value)
3798 FIXME("iface %p, value %p stub!\n", iface, value);
3800 return E_NOTIMPL;
3803 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_SetFloatVector(ID3D10EffectVectorVariable *iface,
3804 float *value)
3806 FIXME("iface %p, value %p stub!\n", iface, value);
3808 return E_NOTIMPL;
3811 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetBoolVector(ID3D10EffectVectorVariable *iface,
3812 BOOL *value)
3814 FIXME("iface %p, value %p stub!\n", iface, value);
3816 return E_NOTIMPL;
3819 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetIntVector(ID3D10EffectVectorVariable *iface,
3820 int *value)
3822 FIXME("iface %p, value %p stub!\n", iface, value);
3824 return E_NOTIMPL;
3827 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetFloatVector(ID3D10EffectVectorVariable *iface,
3828 float *value)
3830 FIXME("iface %p, value %p stub!\n", iface, value);
3832 return E_NOTIMPL;
3835 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_SetBoolVectorArray(ID3D10EffectVectorVariable *iface,
3836 BOOL *values, UINT offset, UINT count)
3838 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3840 return E_NOTIMPL;
3843 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_SetIntVectorArray(ID3D10EffectVectorVariable *iface,
3844 int *values, UINT offset, UINT count)
3846 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3848 return E_NOTIMPL;
3851 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_SetFloatVectorArray(ID3D10EffectVectorVariable *iface,
3852 float *values, UINT offset, UINT count)
3854 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3856 return E_NOTIMPL;
3859 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetBoolVectorArray(ID3D10EffectVectorVariable *iface,
3860 BOOL *values, UINT offset, UINT count)
3862 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3864 return E_NOTIMPL;
3867 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetIntVectorArray(ID3D10EffectVectorVariable *iface,
3868 int *values, UINT offset, UINT count)
3870 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3872 return E_NOTIMPL;
3875 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetFloatVectorArray(ID3D10EffectVectorVariable *iface,
3876 float *values, UINT offset, UINT count)
3878 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3880 return E_NOTIMPL;
3883 static const struct ID3D10EffectVectorVariableVtbl d3d10_effect_vector_variable_vtbl =
3885 /* ID3D10EffectVariable methods */
3886 d3d10_effect_vector_variable_IsValid,
3887 d3d10_effect_vector_variable_GetType,
3888 d3d10_effect_vector_variable_GetDesc,
3889 d3d10_effect_vector_variable_GetAnnotationByIndex,
3890 d3d10_effect_vector_variable_GetAnnotationByName,
3891 d3d10_effect_vector_variable_GetMemberByIndex,
3892 d3d10_effect_vector_variable_GetMemberByName,
3893 d3d10_effect_vector_variable_GetMemberBySemantic,
3894 d3d10_effect_vector_variable_GetElement,
3895 d3d10_effect_vector_variable_GetParentConstantBuffer,
3896 d3d10_effect_vector_variable_AsScalar,
3897 d3d10_effect_vector_variable_AsVector,
3898 d3d10_effect_vector_variable_AsMatrix,
3899 d3d10_effect_vector_variable_AsString,
3900 d3d10_effect_vector_variable_AsShaderResource,
3901 d3d10_effect_vector_variable_AsRenderTargetView,
3902 d3d10_effect_vector_variable_AsDepthStencilView,
3903 d3d10_effect_vector_variable_AsConstantBuffer,
3904 d3d10_effect_vector_variable_AsShader,
3905 d3d10_effect_vector_variable_AsBlend,
3906 d3d10_effect_vector_variable_AsDepthStencil,
3907 d3d10_effect_vector_variable_AsRasterizer,
3908 d3d10_effect_vector_variable_AsSampler,
3909 d3d10_effect_vector_variable_SetRawValue,
3910 d3d10_effect_vector_variable_GetRawValue,
3911 /* ID3D10EffectVectorVariable methods */
3912 d3d10_effect_vector_variable_SetBoolVector,
3913 d3d10_effect_vector_variable_SetIntVector,
3914 d3d10_effect_vector_variable_SetFloatVector,
3915 d3d10_effect_vector_variable_GetBoolVector,
3916 d3d10_effect_vector_variable_GetIntVector,
3917 d3d10_effect_vector_variable_GetFloatVector,
3918 d3d10_effect_vector_variable_SetBoolVectorArray,
3919 d3d10_effect_vector_variable_SetIntVectorArray,
3920 d3d10_effect_vector_variable_SetFloatVectorArray,
3921 d3d10_effect_vector_variable_GetBoolVectorArray,
3922 d3d10_effect_vector_variable_GetIntVectorArray,
3923 d3d10_effect_vector_variable_GetFloatVectorArray,
3926 /* ID3D10EffectVariable methods */
3928 static BOOL STDMETHODCALLTYPE d3d10_effect_matrix_variable_IsValid(ID3D10EffectMatrixVariable *iface)
3930 TRACE("iface %p\n", iface);
3932 return (struct d3d10_effect_variable *)iface != &null_matrix_variable;
3935 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetType(
3936 ID3D10EffectMatrixVariable *iface)
3938 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
3941 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetDesc(ID3D10EffectMatrixVariable *iface,
3942 D3D10_EFFECT_VARIABLE_DESC *desc)
3944 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
3947 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetAnnotationByIndex(
3948 ID3D10EffectMatrixVariable *iface, UINT index)
3950 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
3953 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetAnnotationByName(
3954 ID3D10EffectMatrixVariable *iface, LPCSTR name)
3956 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
3959 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetMemberByIndex(
3960 ID3D10EffectMatrixVariable *iface, UINT index)
3962 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
3965 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetMemberByName(
3966 ID3D10EffectMatrixVariable *iface, LPCSTR name)
3968 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
3971 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetMemberBySemantic(
3972 ID3D10EffectMatrixVariable *iface, LPCSTR semantic)
3974 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
3977 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetElement(
3978 ID3D10EffectMatrixVariable *iface, UINT index)
3980 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
3983 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetParentConstantBuffer(
3984 ID3D10EffectMatrixVariable *iface)
3986 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
3989 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsScalar(
3990 ID3D10EffectMatrixVariable *iface)
3992 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
3995 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsVector(
3996 ID3D10EffectMatrixVariable *iface)
3998 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
4001 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsMatrix(
4002 ID3D10EffectMatrixVariable *iface)
4004 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
4007 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsString(
4008 ID3D10EffectMatrixVariable *iface)
4010 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
4013 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsShaderResource(
4014 ID3D10EffectMatrixVariable *iface)
4016 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
4019 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsRenderTargetView(
4020 ID3D10EffectMatrixVariable *iface)
4022 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
4025 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsDepthStencilView(
4026 ID3D10EffectMatrixVariable *iface)
4028 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
4031 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsConstantBuffer(
4032 ID3D10EffectMatrixVariable *iface)
4034 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
4037 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsShader(
4038 ID3D10EffectMatrixVariable *iface)
4040 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
4043 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsBlend(
4044 ID3D10EffectMatrixVariable *iface)
4046 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
4049 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsDepthStencil(
4050 ID3D10EffectMatrixVariable *iface)
4052 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
4055 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsRasterizer(
4056 ID3D10EffectMatrixVariable *iface)
4058 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
4061 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsSampler(
4062 ID3D10EffectMatrixVariable *iface)
4064 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
4067 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_SetRawValue(ID3D10EffectMatrixVariable *iface,
4068 void *data, UINT offset, UINT count)
4070 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4073 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetRawValue(ID3D10EffectMatrixVariable *iface,
4074 void *data, UINT offset, UINT count)
4076 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4079 /* ID3D10EffectMatrixVariable methods */
4081 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_SetMatrix(ID3D10EffectMatrixVariable *iface,
4082 float *data)
4084 FIXME("iface %p, data %p stub!\n", iface, data);
4086 return E_NOTIMPL;
4089 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetMatrix(ID3D10EffectMatrixVariable *iface,
4090 float *data)
4092 FIXME("iface %p, data %p stub!\n", iface, data);
4094 return E_NOTIMPL;
4097 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_SetMatrixArray(ID3D10EffectMatrixVariable *iface,
4098 float *data, UINT offset, UINT count)
4100 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface, data, offset, count);
4102 return E_NOTIMPL;
4105 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetMatrixArray(ID3D10EffectMatrixVariable *iface,
4106 float *data, UINT offset, UINT count)
4108 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface, data, offset, count);
4110 return E_NOTIMPL;
4113 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_SetMatrixTranspose(ID3D10EffectMatrixVariable *iface,
4114 float *data)
4116 FIXME("iface %p, data %p stub!\n", iface, data);
4118 return E_NOTIMPL;
4121 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetMatrixTranspose(ID3D10EffectMatrixVariable *iface,
4122 float *data)
4124 FIXME("iface %p, data %p stub!\n", iface, data);
4126 return E_NOTIMPL;
4129 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_SetMatrixTransposeArray(ID3D10EffectMatrixVariable *iface,
4130 float *data, UINT offset, UINT count)
4132 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface, data, offset, count);
4134 return E_NOTIMPL;
4137 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetMatrixTransposeArray(ID3D10EffectMatrixVariable *iface,
4138 float *data, UINT offset, UINT count)
4140 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface, data, offset, count);
4142 return E_NOTIMPL;
4146 static const struct ID3D10EffectMatrixVariableVtbl d3d10_effect_matrix_variable_vtbl =
4148 /* ID3D10EffectVariable methods */
4149 d3d10_effect_matrix_variable_IsValid,
4150 d3d10_effect_matrix_variable_GetType,
4151 d3d10_effect_matrix_variable_GetDesc,
4152 d3d10_effect_matrix_variable_GetAnnotationByIndex,
4153 d3d10_effect_matrix_variable_GetAnnotationByName,
4154 d3d10_effect_matrix_variable_GetMemberByIndex,
4155 d3d10_effect_matrix_variable_GetMemberByName,
4156 d3d10_effect_matrix_variable_GetMemberBySemantic,
4157 d3d10_effect_matrix_variable_GetElement,
4158 d3d10_effect_matrix_variable_GetParentConstantBuffer,
4159 d3d10_effect_matrix_variable_AsScalar,
4160 d3d10_effect_matrix_variable_AsVector,
4161 d3d10_effect_matrix_variable_AsMatrix,
4162 d3d10_effect_matrix_variable_AsString,
4163 d3d10_effect_matrix_variable_AsShaderResource,
4164 d3d10_effect_matrix_variable_AsRenderTargetView,
4165 d3d10_effect_matrix_variable_AsDepthStencilView,
4166 d3d10_effect_matrix_variable_AsConstantBuffer,
4167 d3d10_effect_matrix_variable_AsShader,
4168 d3d10_effect_matrix_variable_AsBlend,
4169 d3d10_effect_matrix_variable_AsDepthStencil,
4170 d3d10_effect_matrix_variable_AsRasterizer,
4171 d3d10_effect_matrix_variable_AsSampler,
4172 d3d10_effect_matrix_variable_SetRawValue,
4173 d3d10_effect_matrix_variable_GetRawValue,
4174 /* ID3D10EffectMatrixVariable methods */
4175 d3d10_effect_matrix_variable_SetMatrix,
4176 d3d10_effect_matrix_variable_GetMatrix,
4177 d3d10_effect_matrix_variable_SetMatrixArray,
4178 d3d10_effect_matrix_variable_GetMatrixArray,
4179 d3d10_effect_matrix_variable_SetMatrixTranspose,
4180 d3d10_effect_matrix_variable_GetMatrixTranspose,
4181 d3d10_effect_matrix_variable_SetMatrixTransposeArray,
4182 d3d10_effect_matrix_variable_GetMatrixTransposeArray,
4185 /* ID3D10EffectVariable methods */
4187 static BOOL STDMETHODCALLTYPE d3d10_effect_string_variable_IsValid(ID3D10EffectStringVariable *iface)
4189 TRACE("iface %p\n", iface);
4191 return (struct d3d10_effect_variable *)iface != &null_string_variable;
4194 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_string_variable_GetType(
4195 ID3D10EffectStringVariable *iface)
4197 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
4200 static HRESULT STDMETHODCALLTYPE d3d10_effect_string_variable_GetDesc(ID3D10EffectStringVariable *iface,
4201 D3D10_EFFECT_VARIABLE_DESC *desc)
4203 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
4206 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_GetAnnotationByIndex(
4207 ID3D10EffectStringVariable *iface, UINT index)
4209 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
4212 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_GetAnnotationByName(
4213 ID3D10EffectStringVariable *iface, LPCSTR name)
4215 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
4218 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_GetMemberByIndex(
4219 ID3D10EffectStringVariable *iface, UINT index)
4221 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
4224 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_GetMemberByName(
4225 ID3D10EffectStringVariable *iface, LPCSTR name)
4227 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
4230 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_GetMemberBySemantic(
4231 ID3D10EffectStringVariable *iface, LPCSTR semantic)
4233 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
4236 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_GetElement(
4237 ID3D10EffectStringVariable *iface, UINT index)
4239 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
4242 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_string_variable_GetParentConstantBuffer(
4243 ID3D10EffectStringVariable *iface)
4245 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
4248 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsScalar(
4249 ID3D10EffectStringVariable *iface)
4251 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
4254 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsVector(
4255 ID3D10EffectStringVariable *iface)
4257 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
4260 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsMatrix(
4261 ID3D10EffectStringVariable *iface)
4263 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
4266 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsString(
4267 ID3D10EffectStringVariable *iface)
4269 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
4272 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsShaderResource(
4273 ID3D10EffectStringVariable *iface)
4275 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
4278 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsRenderTargetView(
4279 ID3D10EffectStringVariable *iface)
4281 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
4284 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsDepthStencilView(
4285 ID3D10EffectStringVariable *iface)
4287 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
4290 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_string_variable_AsConstantBuffer(
4291 ID3D10EffectStringVariable *iface)
4293 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
4296 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsShader(
4297 ID3D10EffectStringVariable *iface)
4299 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
4302 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsBlend(
4303 ID3D10EffectStringVariable *iface)
4305 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
4308 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsDepthStencil(
4309 ID3D10EffectStringVariable *iface)
4311 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
4314 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsRasterizer(
4315 ID3D10EffectStringVariable *iface)
4317 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
4320 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsSampler(
4321 ID3D10EffectStringVariable *iface)
4323 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
4326 static HRESULT STDMETHODCALLTYPE d3d10_effect_string_variable_SetRawValue(ID3D10EffectStringVariable *iface,
4327 void *data, UINT offset, UINT count)
4329 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4332 static HRESULT STDMETHODCALLTYPE d3d10_effect_string_variable_GetRawValue(ID3D10EffectStringVariable *iface,
4333 void *data, UINT offset, UINT count)
4335 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4338 /* ID3D10EffectStringVariable methods */
4340 static HRESULT STDMETHODCALLTYPE d3d10_effect_string_variable_GetString(ID3D10EffectStringVariable *iface,
4341 LPCSTR *str)
4343 FIXME("iface %p, str %p stub!\n", iface, str);
4345 return E_NOTIMPL;
4348 static HRESULT STDMETHODCALLTYPE d3d10_effect_string_variable_GetStringArray(ID3D10EffectStringVariable *iface,
4349 LPCSTR *strs, UINT offset, UINT count)
4351 FIXME("iface %p, strs %p, offset %u, count %u stub!\n", iface, strs, offset, count);
4353 return E_NOTIMPL;
4357 static const struct ID3D10EffectStringVariableVtbl d3d10_effect_string_variable_vtbl =
4359 /* ID3D10EffectVariable methods */
4360 d3d10_effect_string_variable_IsValid,
4361 d3d10_effect_string_variable_GetType,
4362 d3d10_effect_string_variable_GetDesc,
4363 d3d10_effect_string_variable_GetAnnotationByIndex,
4364 d3d10_effect_string_variable_GetAnnotationByName,
4365 d3d10_effect_string_variable_GetMemberByIndex,
4366 d3d10_effect_string_variable_GetMemberByName,
4367 d3d10_effect_string_variable_GetMemberBySemantic,
4368 d3d10_effect_string_variable_GetElement,
4369 d3d10_effect_string_variable_GetParentConstantBuffer,
4370 d3d10_effect_string_variable_AsScalar,
4371 d3d10_effect_string_variable_AsVector,
4372 d3d10_effect_string_variable_AsMatrix,
4373 d3d10_effect_string_variable_AsString,
4374 d3d10_effect_string_variable_AsShaderResource,
4375 d3d10_effect_string_variable_AsRenderTargetView,
4376 d3d10_effect_string_variable_AsDepthStencilView,
4377 d3d10_effect_string_variable_AsConstantBuffer,
4378 d3d10_effect_string_variable_AsShader,
4379 d3d10_effect_string_variable_AsBlend,
4380 d3d10_effect_string_variable_AsDepthStencil,
4381 d3d10_effect_string_variable_AsRasterizer,
4382 d3d10_effect_string_variable_AsSampler,
4383 d3d10_effect_string_variable_SetRawValue,
4384 d3d10_effect_string_variable_GetRawValue,
4385 /* ID3D10EffectStringVariable methods */
4386 d3d10_effect_string_variable_GetString,
4387 d3d10_effect_string_variable_GetStringArray,
4390 /* ID3D10EffectVariable methods */
4392 static BOOL STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_IsValid(ID3D10EffectShaderResourceVariable *iface)
4394 TRACE("iface %p\n", iface);
4396 return (struct d3d10_effect_variable *)iface != &null_shader_resource_variable;
4399 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetType(
4400 ID3D10EffectShaderResourceVariable *iface)
4402 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
4405 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetDesc(
4406 ID3D10EffectShaderResourceVariable *iface, D3D10_EFFECT_VARIABLE_DESC *desc)
4408 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
4411 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetAnnotationByIndex(
4412 ID3D10EffectShaderResourceVariable *iface, UINT index)
4414 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
4417 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetAnnotationByName(
4418 ID3D10EffectShaderResourceVariable *iface, LPCSTR name)
4420 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
4423 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetMemberByIndex(
4424 ID3D10EffectShaderResourceVariable *iface, UINT index)
4426 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
4429 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetMemberByName(
4430 ID3D10EffectShaderResourceVariable *iface, LPCSTR name)
4432 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
4435 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetMemberBySemantic(
4436 ID3D10EffectShaderResourceVariable *iface, LPCSTR semantic)
4438 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
4441 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetElement(
4442 ID3D10EffectShaderResourceVariable *iface, UINT index)
4444 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
4447 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetParentConstantBuffer(
4448 ID3D10EffectShaderResourceVariable *iface)
4450 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
4453 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsScalar(
4454 ID3D10EffectShaderResourceVariable *iface)
4456 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
4459 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsVector(
4460 ID3D10EffectShaderResourceVariable *iface)
4462 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
4465 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsMatrix(
4466 ID3D10EffectShaderResourceVariable *iface)
4468 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
4471 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsString(
4472 ID3D10EffectShaderResourceVariable *iface)
4474 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
4477 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsShaderResource(
4478 ID3D10EffectShaderResourceVariable *iface)
4480 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
4483 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsRenderTargetView(
4484 ID3D10EffectShaderResourceVariable *iface)
4486 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
4489 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsDepthStencilView(
4490 ID3D10EffectShaderResourceVariable *iface)
4492 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
4495 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsConstantBuffer(
4496 ID3D10EffectShaderResourceVariable *iface)
4498 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
4501 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsShader(
4502 ID3D10EffectShaderResourceVariable *iface)
4504 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
4507 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsBlend(
4508 ID3D10EffectShaderResourceVariable *iface)
4510 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
4513 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsDepthStencil(
4514 ID3D10EffectShaderResourceVariable *iface)
4516 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
4519 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsRasterizer(
4520 ID3D10EffectShaderResourceVariable *iface)
4522 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
4525 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsSampler(
4526 ID3D10EffectShaderResourceVariable *iface)
4528 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
4531 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_SetRawValue(
4532 ID3D10EffectShaderResourceVariable *iface, void *data, UINT offset, UINT count)
4534 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4537 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetRawValue(
4538 ID3D10EffectShaderResourceVariable *iface, void *data, UINT offset, UINT count)
4540 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4543 /* ID3D10EffectShaderResourceVariable methods */
4545 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_SetResource(
4546 ID3D10EffectShaderResourceVariable *iface, ID3D10ShaderResourceView *resource)
4548 FIXME("iface %p, resource %p stub!\n", iface, resource);
4550 return E_NOTIMPL;
4553 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetResource(
4554 ID3D10EffectShaderResourceVariable *iface, ID3D10ShaderResourceView **resource)
4556 FIXME("iface %p, resource %p stub!\n", iface, resource);
4558 return E_NOTIMPL;
4561 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_SetResourceArray(
4562 ID3D10EffectShaderResourceVariable *iface, ID3D10ShaderResourceView **resources, UINT offset, UINT count)
4564 FIXME("iface %p, resources %p, offset %u, count %u stub!\n", iface, resources, offset, count);
4566 return E_NOTIMPL;
4569 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetResourceArray(
4570 ID3D10EffectShaderResourceVariable *iface, ID3D10ShaderResourceView **resources, UINT offset, UINT count)
4572 FIXME("iface %p, resources %p, offset %u, count %u stub!\n", iface, resources, offset, count);
4574 return E_NOTIMPL;
4578 static const struct ID3D10EffectShaderResourceVariableVtbl d3d10_effect_shader_resource_variable_vtbl =
4580 /* ID3D10EffectVariable methods */
4581 d3d10_effect_shader_resource_variable_IsValid,
4582 d3d10_effect_shader_resource_variable_GetType,
4583 d3d10_effect_shader_resource_variable_GetDesc,
4584 d3d10_effect_shader_resource_variable_GetAnnotationByIndex,
4585 d3d10_effect_shader_resource_variable_GetAnnotationByName,
4586 d3d10_effect_shader_resource_variable_GetMemberByIndex,
4587 d3d10_effect_shader_resource_variable_GetMemberByName,
4588 d3d10_effect_shader_resource_variable_GetMemberBySemantic,
4589 d3d10_effect_shader_resource_variable_GetElement,
4590 d3d10_effect_shader_resource_variable_GetParentConstantBuffer,
4591 d3d10_effect_shader_resource_variable_AsScalar,
4592 d3d10_effect_shader_resource_variable_AsVector,
4593 d3d10_effect_shader_resource_variable_AsMatrix,
4594 d3d10_effect_shader_resource_variable_AsString,
4595 d3d10_effect_shader_resource_variable_AsShaderResource,
4596 d3d10_effect_shader_resource_variable_AsRenderTargetView,
4597 d3d10_effect_shader_resource_variable_AsDepthStencilView,
4598 d3d10_effect_shader_resource_variable_AsConstantBuffer,
4599 d3d10_effect_shader_resource_variable_AsShader,
4600 d3d10_effect_shader_resource_variable_AsBlend,
4601 d3d10_effect_shader_resource_variable_AsDepthStencil,
4602 d3d10_effect_shader_resource_variable_AsRasterizer,
4603 d3d10_effect_shader_resource_variable_AsSampler,
4604 d3d10_effect_shader_resource_variable_SetRawValue,
4605 d3d10_effect_shader_resource_variable_GetRawValue,
4606 /* ID3D10EffectShaderResourceVariable methods */
4607 d3d10_effect_shader_resource_variable_SetResource,
4608 d3d10_effect_shader_resource_variable_GetResource,
4609 d3d10_effect_shader_resource_variable_SetResourceArray,
4610 d3d10_effect_shader_resource_variable_GetResourceArray,
4613 /* ID3D10EffectVariable methods */
4615 static BOOL STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_IsValid(
4616 ID3D10EffectRenderTargetViewVariable *iface)
4618 TRACE("iface %p\n", iface);
4620 return (struct d3d10_effect_variable *)iface != &null_render_target_view_variable;
4623 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetType(
4624 ID3D10EffectRenderTargetViewVariable *iface)
4626 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
4629 static HRESULT STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetDesc(
4630 ID3D10EffectRenderTargetViewVariable *iface, D3D10_EFFECT_VARIABLE_DESC *desc)
4632 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
4635 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetAnnotationByIndex(
4636 ID3D10EffectRenderTargetViewVariable *iface, UINT index)
4638 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
4641 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetAnnotationByName(
4642 ID3D10EffectRenderTargetViewVariable *iface, LPCSTR name)
4644 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
4647 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetMemberByIndex(
4648 ID3D10EffectRenderTargetViewVariable *iface, UINT index)
4650 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
4653 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetMemberByName(
4654 ID3D10EffectRenderTargetViewVariable *iface, LPCSTR name)
4656 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
4659 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetMemberBySemantic(
4660 ID3D10EffectRenderTargetViewVariable *iface, LPCSTR semantic)
4662 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
4665 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetElement(
4666 ID3D10EffectRenderTargetViewVariable *iface, UINT index)
4668 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
4671 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetParentConstantBuffer(
4672 ID3D10EffectRenderTargetViewVariable *iface)
4674 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
4677 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsScalar(
4678 ID3D10EffectRenderTargetViewVariable *iface)
4680 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
4683 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsVector(
4684 ID3D10EffectRenderTargetViewVariable *iface)
4686 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
4689 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsMatrix(
4690 ID3D10EffectRenderTargetViewVariable *iface)
4692 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
4695 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsString(
4696 ID3D10EffectRenderTargetViewVariable *iface)
4698 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
4701 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsShaderResource(
4702 ID3D10EffectRenderTargetViewVariable *iface)
4704 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
4707 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsRenderTargetView(
4708 ID3D10EffectRenderTargetViewVariable *iface)
4710 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
4713 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsDepthStencilView(
4714 ID3D10EffectRenderTargetViewVariable *iface)
4716 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
4719 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsConstantBuffer(
4720 ID3D10EffectRenderTargetViewVariable *iface)
4722 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
4725 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsShader(
4726 ID3D10EffectRenderTargetViewVariable *iface)
4728 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
4731 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsBlend(
4732 ID3D10EffectRenderTargetViewVariable *iface)
4734 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
4737 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsDepthStencil(
4738 ID3D10EffectRenderTargetViewVariable *iface)
4740 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
4743 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsRasterizer(
4744 ID3D10EffectRenderTargetViewVariable *iface)
4746 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
4749 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsSampler(
4750 ID3D10EffectRenderTargetViewVariable *iface)
4752 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
4755 static HRESULT STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_SetRawValue(
4756 ID3D10EffectRenderTargetViewVariable *iface, void *data, UINT offset, UINT count)
4758 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4761 static HRESULT STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetRawValue(
4762 ID3D10EffectRenderTargetViewVariable *iface, void *data, UINT offset, UINT count)
4764 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4767 /* ID3D10EffectRenderTargetViewVariable methods */
4769 static HRESULT STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_SetRenderTarget(
4770 ID3D10EffectRenderTargetViewVariable *iface, ID3D10RenderTargetView *view)
4772 FIXME("iface %p, view %p stub!\n", iface, view);
4774 return E_NOTIMPL;
4777 static HRESULT STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetRenderTarget(
4778 ID3D10EffectRenderTargetViewVariable *iface, ID3D10RenderTargetView **view)
4780 FIXME("iface %p, view %p stub!\n", iface, view);
4782 return E_NOTIMPL;
4785 static HRESULT STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_SetRenderTargetArray(
4786 ID3D10EffectRenderTargetViewVariable *iface, ID3D10RenderTargetView **views, UINT offset, UINT count)
4788 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface, views, offset, count);
4790 return E_NOTIMPL;
4793 static HRESULT STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetRenderTargetArray(
4794 ID3D10EffectRenderTargetViewVariable *iface, ID3D10RenderTargetView **views, UINT offset, UINT count)
4796 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface, views, offset, count);
4798 return E_NOTIMPL;
4802 static const struct ID3D10EffectRenderTargetViewVariableVtbl d3d10_effect_render_target_view_variable_vtbl =
4804 /* ID3D10EffectVariable methods */
4805 d3d10_effect_render_target_view_variable_IsValid,
4806 d3d10_effect_render_target_view_variable_GetType,
4807 d3d10_effect_render_target_view_variable_GetDesc,
4808 d3d10_effect_render_target_view_variable_GetAnnotationByIndex,
4809 d3d10_effect_render_target_view_variable_GetAnnotationByName,
4810 d3d10_effect_render_target_view_variable_GetMemberByIndex,
4811 d3d10_effect_render_target_view_variable_GetMemberByName,
4812 d3d10_effect_render_target_view_variable_GetMemberBySemantic,
4813 d3d10_effect_render_target_view_variable_GetElement,
4814 d3d10_effect_render_target_view_variable_GetParentConstantBuffer,
4815 d3d10_effect_render_target_view_variable_AsScalar,
4816 d3d10_effect_render_target_view_variable_AsVector,
4817 d3d10_effect_render_target_view_variable_AsMatrix,
4818 d3d10_effect_render_target_view_variable_AsString,
4819 d3d10_effect_render_target_view_variable_AsShaderResource,
4820 d3d10_effect_render_target_view_variable_AsRenderTargetView,
4821 d3d10_effect_render_target_view_variable_AsDepthStencilView,
4822 d3d10_effect_render_target_view_variable_AsConstantBuffer,
4823 d3d10_effect_render_target_view_variable_AsShader,
4824 d3d10_effect_render_target_view_variable_AsBlend,
4825 d3d10_effect_render_target_view_variable_AsDepthStencil,
4826 d3d10_effect_render_target_view_variable_AsRasterizer,
4827 d3d10_effect_render_target_view_variable_AsSampler,
4828 d3d10_effect_render_target_view_variable_SetRawValue,
4829 d3d10_effect_render_target_view_variable_GetRawValue,
4830 /* ID3D10EffectRenderTargetViewVariable methods */
4831 d3d10_effect_render_target_view_variable_SetRenderTarget,
4832 d3d10_effect_render_target_view_variable_GetRenderTarget,
4833 d3d10_effect_render_target_view_variable_SetRenderTargetArray,
4834 d3d10_effect_render_target_view_variable_GetRenderTargetArray,
4837 /* ID3D10EffectVariable methods */
4839 static BOOL STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_IsValid(
4840 ID3D10EffectDepthStencilViewVariable *iface)
4842 TRACE("iface %p\n", iface);
4844 return (struct d3d10_effect_variable *)iface != &null_depth_stencil_view_variable;
4847 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetType(
4848 ID3D10EffectDepthStencilViewVariable *iface)
4850 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
4853 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetDesc(
4854 ID3D10EffectDepthStencilViewVariable *iface, D3D10_EFFECT_VARIABLE_DESC *desc)
4856 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
4859 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetAnnotationByIndex(
4860 ID3D10EffectDepthStencilViewVariable *iface, UINT index)
4862 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
4865 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetAnnotationByName(
4866 ID3D10EffectDepthStencilViewVariable *iface, LPCSTR name)
4868 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
4871 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetMemberByIndex(
4872 ID3D10EffectDepthStencilViewVariable *iface, UINT index)
4874 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
4877 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetMemberByName(
4878 ID3D10EffectDepthStencilViewVariable *iface, LPCSTR name)
4880 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
4883 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetMemberBySemantic(
4884 ID3D10EffectDepthStencilViewVariable *iface, LPCSTR semantic)
4886 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
4889 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetElement(
4890 ID3D10EffectDepthStencilViewVariable *iface, UINT index)
4892 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
4895 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetParentConstantBuffer(
4896 ID3D10EffectDepthStencilViewVariable *iface)
4898 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
4901 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsScalar(
4902 ID3D10EffectDepthStencilViewVariable *iface)
4904 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
4907 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsVector(
4908 ID3D10EffectDepthStencilViewVariable *iface)
4910 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
4913 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsMatrix(
4914 ID3D10EffectDepthStencilViewVariable *iface)
4916 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
4919 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsString(
4920 ID3D10EffectDepthStencilViewVariable *iface)
4922 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
4925 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsShaderResource(
4926 ID3D10EffectDepthStencilViewVariable *iface)
4928 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
4931 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsRenderTargetView(
4932 ID3D10EffectDepthStencilViewVariable *iface)
4934 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
4937 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsDepthStencilView(
4938 ID3D10EffectDepthStencilViewVariable *iface)
4940 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
4943 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsConstantBuffer(
4944 ID3D10EffectDepthStencilViewVariable *iface)
4946 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
4949 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsShader(
4950 ID3D10EffectDepthStencilViewVariable *iface)
4952 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
4955 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsBlend(
4956 ID3D10EffectDepthStencilViewVariable *iface)
4958 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
4961 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsDepthStencil(
4962 ID3D10EffectDepthStencilViewVariable *iface)
4964 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
4967 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsRasterizer(
4968 ID3D10EffectDepthStencilViewVariable *iface)
4970 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
4973 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsSampler(
4974 ID3D10EffectDepthStencilViewVariable *iface)
4976 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
4979 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_SetRawValue(
4980 ID3D10EffectDepthStencilViewVariable *iface, void *data, UINT offset, UINT count)
4982 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4985 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetRawValue(
4986 ID3D10EffectDepthStencilViewVariable *iface, void *data, UINT offset, UINT count)
4988 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4991 /* ID3D10EffectDepthStencilViewVariable methods */
4993 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_SetDepthStencil(
4994 ID3D10EffectDepthStencilViewVariable *iface, ID3D10DepthStencilView *view)
4996 FIXME("iface %p, view %p stub!\n", iface, view);
4998 return E_NOTIMPL;
5001 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetDepthStencil(
5002 ID3D10EffectDepthStencilViewVariable *iface, ID3D10DepthStencilView **view)
5004 FIXME("iface %p, view %p stub!\n", iface, view);
5006 return E_NOTIMPL;
5009 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_SetDepthStencilArray(
5010 ID3D10EffectDepthStencilViewVariable *iface, ID3D10DepthStencilView **views, UINT offset, UINT count)
5012 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface, views, offset, count);
5014 return E_NOTIMPL;
5017 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetDepthStencilArray(
5018 ID3D10EffectDepthStencilViewVariable *iface, ID3D10DepthStencilView **views, UINT offset, UINT count)
5020 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface, views, offset, count);
5022 return E_NOTIMPL;
5026 static const struct ID3D10EffectDepthStencilViewVariableVtbl d3d10_effect_depth_stencil_view_variable_vtbl =
5028 /* ID3D10EffectVariable methods */
5029 d3d10_effect_depth_stencil_view_variable_IsValid,
5030 d3d10_effect_depth_stencil_view_variable_GetType,
5031 d3d10_effect_depth_stencil_view_variable_GetDesc,
5032 d3d10_effect_depth_stencil_view_variable_GetAnnotationByIndex,
5033 d3d10_effect_depth_stencil_view_variable_GetAnnotationByName,
5034 d3d10_effect_depth_stencil_view_variable_GetMemberByIndex,
5035 d3d10_effect_depth_stencil_view_variable_GetMemberByName,
5036 d3d10_effect_depth_stencil_view_variable_GetMemberBySemantic,
5037 d3d10_effect_depth_stencil_view_variable_GetElement,
5038 d3d10_effect_depth_stencil_view_variable_GetParentConstantBuffer,
5039 d3d10_effect_depth_stencil_view_variable_AsScalar,
5040 d3d10_effect_depth_stencil_view_variable_AsVector,
5041 d3d10_effect_depth_stencil_view_variable_AsMatrix,
5042 d3d10_effect_depth_stencil_view_variable_AsString,
5043 d3d10_effect_depth_stencil_view_variable_AsShaderResource,
5044 d3d10_effect_depth_stencil_view_variable_AsRenderTargetView,
5045 d3d10_effect_depth_stencil_view_variable_AsDepthStencilView,
5046 d3d10_effect_depth_stencil_view_variable_AsConstantBuffer,
5047 d3d10_effect_depth_stencil_view_variable_AsShader,
5048 d3d10_effect_depth_stencil_view_variable_AsBlend,
5049 d3d10_effect_depth_stencil_view_variable_AsDepthStencil,
5050 d3d10_effect_depth_stencil_view_variable_AsRasterizer,
5051 d3d10_effect_depth_stencil_view_variable_AsSampler,
5052 d3d10_effect_depth_stencil_view_variable_SetRawValue,
5053 d3d10_effect_depth_stencil_view_variable_GetRawValue,
5054 /* ID3D10EffectDepthStencilViewVariable methods */
5055 d3d10_effect_depth_stencil_view_variable_SetDepthStencil,
5056 d3d10_effect_depth_stencil_view_variable_GetDepthStencil,
5057 d3d10_effect_depth_stencil_view_variable_SetDepthStencilArray,
5058 d3d10_effect_depth_stencil_view_variable_GetDepthStencilArray,
5061 /* ID3D10EffectVariable methods */
5063 static BOOL STDMETHODCALLTYPE d3d10_effect_shader_variable_IsValid(ID3D10EffectShaderVariable *iface)
5065 TRACE("iface %p\n", iface);
5067 return (struct d3d10_effect_variable *)iface != &null_shader_variable;
5070 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetType(
5071 ID3D10EffectShaderVariable *iface)
5073 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
5076 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetDesc(ID3D10EffectShaderVariable *iface,
5077 D3D10_EFFECT_VARIABLE_DESC *desc)
5079 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
5082 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetAnnotationByIndex(
5083 ID3D10EffectShaderVariable *iface, UINT index)
5085 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
5088 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetAnnotationByName(
5089 ID3D10EffectShaderVariable *iface, LPCSTR name)
5091 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
5094 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetMemberByIndex(
5095 ID3D10EffectShaderVariable *iface, UINT index)
5097 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
5100 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetMemberByName(
5101 ID3D10EffectShaderVariable *iface, LPCSTR name)
5103 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
5106 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetMemberBySemantic(
5107 ID3D10EffectShaderVariable *iface, LPCSTR semantic)
5109 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
5112 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetElement(
5113 ID3D10EffectShaderVariable *iface, UINT index)
5115 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
5118 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetParentConstantBuffer(
5119 ID3D10EffectShaderVariable *iface)
5121 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
5124 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsScalar(
5125 ID3D10EffectShaderVariable *iface)
5127 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
5130 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsVector(
5131 ID3D10EffectShaderVariable *iface)
5133 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
5136 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsMatrix(
5137 ID3D10EffectShaderVariable *iface)
5139 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
5142 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsString(
5143 ID3D10EffectShaderVariable *iface)
5145 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
5148 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsShaderResource(
5149 ID3D10EffectShaderVariable *iface)
5151 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
5154 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsRenderTargetView(
5155 ID3D10EffectShaderVariable *iface)
5157 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
5160 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsDepthStencilView(
5161 ID3D10EffectShaderVariable *iface)
5163 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
5166 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsConstantBuffer(
5167 ID3D10EffectShaderVariable *iface)
5169 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
5172 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsShader(
5173 ID3D10EffectShaderVariable *iface)
5175 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
5178 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsBlend(
5179 ID3D10EffectShaderVariable *iface)
5181 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
5184 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsDepthStencil(
5185 ID3D10EffectShaderVariable *iface)
5187 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
5190 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsRasterizer(
5191 ID3D10EffectShaderVariable *iface)
5193 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
5196 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsSampler(
5197 ID3D10EffectShaderVariable *iface)
5199 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
5202 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_SetRawValue(
5203 ID3D10EffectShaderVariable *iface, void *data, UINT offset, UINT count)
5205 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5208 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetRawValue(
5209 ID3D10EffectShaderVariable *iface, void *data, UINT offset, UINT count)
5211 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5214 /* ID3D10EffectShaderVariable methods */
5216 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetShaderDesc(
5217 ID3D10EffectShaderVariable *iface, UINT index, D3D10_EFFECT_SHADER_DESC *desc)
5219 FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc);
5221 return E_NOTIMPL;
5224 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetVertexShader(
5225 ID3D10EffectShaderVariable *iface, UINT index, ID3D10VertexShader **shader)
5227 FIXME("iface %p, index %u, shader %p stub!\n", iface, index, shader);
5229 return E_NOTIMPL;
5232 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetGeometryShader(
5233 ID3D10EffectShaderVariable *iface, UINT index, ID3D10GeometryShader **shader)
5235 FIXME("iface %p, index %u, shader %p stub!\n", iface, index, shader);
5237 return E_NOTIMPL;
5240 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetPixelShader(
5241 ID3D10EffectShaderVariable *iface, UINT index, ID3D10PixelShader **shader)
5243 FIXME("iface %p, index %u, shader %p stub!\n", iface, index, shader);
5245 return E_NOTIMPL;
5248 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetInputSignatureElementDesc(
5249 ID3D10EffectShaderVariable *iface, UINT shader_index, UINT element_index,
5250 D3D10_SIGNATURE_PARAMETER_DESC *desc)
5252 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
5253 struct d3d10_effect_shader_variable *s;
5254 D3D10_SIGNATURE_PARAMETER_DESC *d;
5256 TRACE("iface %p, shader_index %u, element_index %u, desc %p\n",
5257 iface, shader_index, element_index, desc);
5259 if (!iface->lpVtbl->IsValid(iface))
5261 WARN("Null variable specified\n");
5262 return E_FAIL;
5265 /* Check shader_index, this crashes on W7/DX10 */
5266 if (shader_index >= This->effect->used_shader_count)
5268 WARN("This should crash on W7/DX10!\n");
5269 return E_FAIL;
5272 s = This->effect->used_shaders[shader_index]->data;
5273 if (!s->input_signature.signature)
5275 WARN("No shader signature\n");
5276 return D3DERR_INVALIDCALL;
5279 /* Check desc for NULL, this crashes on W7/DX10 */
5280 if (!desc)
5282 WARN("This should crash on W7/DX10!\n");
5283 return E_FAIL;
5286 if (element_index >= s->input_signature.element_count)
5288 WARN("Invalid element index specified\n");
5289 return E_INVALIDARG;
5292 d = &s->input_signature.elements[element_index];
5293 desc->SemanticName = d->SemanticName;
5294 desc->SemanticIndex = d->SemanticIndex;
5295 desc->SystemValueType = d->SystemValueType;
5296 desc->ComponentType = d->ComponentType;
5297 desc->Register = d->Register;
5298 desc->ReadWriteMask = d->ReadWriteMask;
5299 desc->Mask = d->Mask;
5301 return S_OK;
5304 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetOutputSignatureElementDesc(
5305 ID3D10EffectShaderVariable *iface, UINT shader_index, UINT element_index,
5306 D3D10_SIGNATURE_PARAMETER_DESC *desc)
5308 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
5309 struct d3d10_effect_shader_variable *s;
5310 D3D10_SIGNATURE_PARAMETER_DESC *d;
5312 TRACE("iface %p, shader_index %u, element_index %u, desc %p\n",
5313 iface, shader_index, element_index, desc);
5315 if (!iface->lpVtbl->IsValid(iface))
5317 WARN("Null variable specified\n");
5318 return E_FAIL;
5321 /* Check shader_index, this crashes on W7/DX10 */
5322 if (shader_index >= This->effect->used_shader_count)
5324 WARN("This should crash on W7/DX10!\n");
5325 return E_FAIL;
5328 s = This->effect->used_shaders[shader_index]->data;
5329 if (!s->output_signature.signature)
5331 WARN("No shader signature\n");
5332 return D3DERR_INVALIDCALL;
5335 /* Check desc for NULL, this crashes on W7/DX10 */
5336 if (!desc)
5338 WARN("This should crash on W7/DX10!\n");
5339 return E_FAIL;
5342 if (element_index >= s->output_signature.element_count)
5344 WARN("Invalid element index specified\n");
5345 return E_INVALIDARG;
5348 d = &s->output_signature.elements[element_index];
5349 desc->SemanticName = d->SemanticName;
5350 desc->SemanticIndex = d->SemanticIndex;
5351 desc->SystemValueType = d->SystemValueType;
5352 desc->ComponentType = d->ComponentType;
5353 desc->Register = d->Register;
5354 desc->ReadWriteMask = d->ReadWriteMask;
5355 desc->Mask = d->Mask;
5357 return S_OK;
5361 static const struct ID3D10EffectShaderVariableVtbl d3d10_effect_shader_variable_vtbl =
5363 /* ID3D10EffectVariable methods */
5364 d3d10_effect_shader_variable_IsValid,
5365 d3d10_effect_shader_variable_GetType,
5366 d3d10_effect_shader_variable_GetDesc,
5367 d3d10_effect_shader_variable_GetAnnotationByIndex,
5368 d3d10_effect_shader_variable_GetAnnotationByName,
5369 d3d10_effect_shader_variable_GetMemberByIndex,
5370 d3d10_effect_shader_variable_GetMemberByName,
5371 d3d10_effect_shader_variable_GetMemberBySemantic,
5372 d3d10_effect_shader_variable_GetElement,
5373 d3d10_effect_shader_variable_GetParentConstantBuffer,
5374 d3d10_effect_shader_variable_AsScalar,
5375 d3d10_effect_shader_variable_AsVector,
5376 d3d10_effect_shader_variable_AsMatrix,
5377 d3d10_effect_shader_variable_AsString,
5378 d3d10_effect_shader_variable_AsShaderResource,
5379 d3d10_effect_shader_variable_AsRenderTargetView,
5380 d3d10_effect_shader_variable_AsDepthStencilView,
5381 d3d10_effect_shader_variable_AsConstantBuffer,
5382 d3d10_effect_shader_variable_AsShader,
5383 d3d10_effect_shader_variable_AsBlend,
5384 d3d10_effect_shader_variable_AsDepthStencil,
5385 d3d10_effect_shader_variable_AsRasterizer,
5386 d3d10_effect_shader_variable_AsSampler,
5387 d3d10_effect_shader_variable_SetRawValue,
5388 d3d10_effect_shader_variable_GetRawValue,
5389 /* ID3D10EffectShaderVariable methods */
5390 d3d10_effect_shader_variable_GetShaderDesc,
5391 d3d10_effect_shader_variable_GetVertexShader,
5392 d3d10_effect_shader_variable_GetGeometryShader,
5393 d3d10_effect_shader_variable_GetPixelShader,
5394 d3d10_effect_shader_variable_GetInputSignatureElementDesc,
5395 d3d10_effect_shader_variable_GetOutputSignatureElementDesc,
5398 /* ID3D10EffectVariable methods */
5400 static BOOL STDMETHODCALLTYPE d3d10_effect_blend_variable_IsValid(ID3D10EffectBlendVariable *iface)
5402 TRACE("iface %p\n", iface);
5404 return (struct d3d10_effect_variable *)iface != &null_blend_variable;
5407 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetType(
5408 ID3D10EffectBlendVariable *iface)
5410 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
5413 static HRESULT STDMETHODCALLTYPE d3d10_effect_blend_variable_GetDesc(ID3D10EffectBlendVariable *iface,
5414 D3D10_EFFECT_VARIABLE_DESC *desc)
5416 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
5419 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetAnnotationByIndex(
5420 ID3D10EffectBlendVariable *iface, UINT index)
5422 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
5425 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetAnnotationByName(
5426 ID3D10EffectBlendVariable *iface, LPCSTR name)
5428 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
5431 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetMemberByIndex(
5432 ID3D10EffectBlendVariable *iface, UINT index)
5434 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
5437 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetMemberByName(
5438 ID3D10EffectBlendVariable *iface, LPCSTR name)
5440 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
5443 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetMemberBySemantic(
5444 ID3D10EffectBlendVariable *iface, LPCSTR semantic)
5446 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
5449 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetElement(
5450 ID3D10EffectBlendVariable *iface, UINT index)
5452 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
5455 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetParentConstantBuffer(
5456 ID3D10EffectBlendVariable *iface)
5458 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
5461 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsScalar(
5462 ID3D10EffectBlendVariable *iface)
5464 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
5467 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsVector(
5468 ID3D10EffectBlendVariable *iface)
5470 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
5473 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsMatrix(
5474 ID3D10EffectBlendVariable *iface)
5476 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
5479 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsString(
5480 ID3D10EffectBlendVariable *iface)
5482 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
5485 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsShaderResource(
5486 ID3D10EffectBlendVariable *iface)
5488 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
5491 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsRenderTargetView(
5492 ID3D10EffectBlendVariable *iface)
5494 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
5497 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsDepthStencilView(
5498 ID3D10EffectBlendVariable *iface)
5500 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
5503 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsConstantBuffer(
5504 ID3D10EffectBlendVariable *iface)
5506 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
5509 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsShader(
5510 ID3D10EffectBlendVariable *iface)
5512 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
5515 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsBlend(
5516 ID3D10EffectBlendVariable *iface)
5518 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
5521 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsDepthStencil(
5522 ID3D10EffectBlendVariable *iface)
5524 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
5527 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsRasterizer(
5528 ID3D10EffectBlendVariable *iface)
5530 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
5533 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsSampler(
5534 ID3D10EffectBlendVariable *iface)
5536 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
5539 static HRESULT STDMETHODCALLTYPE d3d10_effect_blend_variable_SetRawValue(ID3D10EffectBlendVariable *iface,
5540 void *data, UINT offset, UINT count)
5542 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5545 static HRESULT STDMETHODCALLTYPE d3d10_effect_blend_variable_GetRawValue(ID3D10EffectBlendVariable *iface,
5546 void *data, UINT offset, UINT count)
5548 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5551 /* ID3D10EffectBlendVariable methods */
5553 static HRESULT STDMETHODCALLTYPE d3d10_effect_blend_variable_GetBlendState(ID3D10EffectBlendVariable *iface,
5554 UINT index, ID3D10BlendState **blend_state)
5556 FIXME("iface %p, index %u, blend_state %p stub!\n", iface, index, blend_state);
5558 return E_NOTIMPL;
5561 static HRESULT STDMETHODCALLTYPE d3d10_effect_blend_variable_GetBackingStore(ID3D10EffectBlendVariable *iface,
5562 UINT index, D3D10_BLEND_DESC *desc)
5564 FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc);
5566 return E_NOTIMPL;
5570 static const struct ID3D10EffectBlendVariableVtbl d3d10_effect_blend_variable_vtbl =
5572 /* ID3D10EffectVariable methods */
5573 d3d10_effect_blend_variable_IsValid,
5574 d3d10_effect_blend_variable_GetType,
5575 d3d10_effect_blend_variable_GetDesc,
5576 d3d10_effect_blend_variable_GetAnnotationByIndex,
5577 d3d10_effect_blend_variable_GetAnnotationByName,
5578 d3d10_effect_blend_variable_GetMemberByIndex,
5579 d3d10_effect_blend_variable_GetMemberByName,
5580 d3d10_effect_blend_variable_GetMemberBySemantic,
5581 d3d10_effect_blend_variable_GetElement,
5582 d3d10_effect_blend_variable_GetParentConstantBuffer,
5583 d3d10_effect_blend_variable_AsScalar,
5584 d3d10_effect_blend_variable_AsVector,
5585 d3d10_effect_blend_variable_AsMatrix,
5586 d3d10_effect_blend_variable_AsString,
5587 d3d10_effect_blend_variable_AsShaderResource,
5588 d3d10_effect_blend_variable_AsRenderTargetView,
5589 d3d10_effect_blend_variable_AsDepthStencilView,
5590 d3d10_effect_blend_variable_AsConstantBuffer,
5591 d3d10_effect_blend_variable_AsShader,
5592 d3d10_effect_blend_variable_AsBlend,
5593 d3d10_effect_blend_variable_AsDepthStencil,
5594 d3d10_effect_blend_variable_AsRasterizer,
5595 d3d10_effect_blend_variable_AsSampler,
5596 d3d10_effect_blend_variable_SetRawValue,
5597 d3d10_effect_blend_variable_GetRawValue,
5598 /* ID3D10EffectBlendVariable methods */
5599 d3d10_effect_blend_variable_GetBlendState,
5600 d3d10_effect_blend_variable_GetBackingStore,
5603 /* ID3D10EffectVariable methods */
5605 static BOOL STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_IsValid(ID3D10EffectDepthStencilVariable *iface)
5607 TRACE("iface %p\n", iface);
5609 return (struct d3d10_effect_variable *)iface != &null_depth_stencil_variable;
5612 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetType(
5613 ID3D10EffectDepthStencilVariable *iface)
5615 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
5618 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetDesc(ID3D10EffectDepthStencilVariable *iface,
5619 D3D10_EFFECT_VARIABLE_DESC *desc)
5621 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
5624 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetAnnotationByIndex(
5625 ID3D10EffectDepthStencilVariable *iface, UINT index)
5627 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
5630 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetAnnotationByName(
5631 ID3D10EffectDepthStencilVariable *iface, LPCSTR name)
5633 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
5636 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetMemberByIndex(
5637 ID3D10EffectDepthStencilVariable *iface, UINT index)
5639 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
5642 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetMemberByName(
5643 ID3D10EffectDepthStencilVariable *iface, LPCSTR name)
5645 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
5648 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetMemberBySemantic(
5649 ID3D10EffectDepthStencilVariable *iface, LPCSTR semantic)
5651 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
5654 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetElement(
5655 ID3D10EffectDepthStencilVariable *iface, UINT index)
5657 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
5660 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetParentConstantBuffer(
5661 ID3D10EffectDepthStencilVariable *iface)
5663 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
5666 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsScalar(
5667 ID3D10EffectDepthStencilVariable *iface)
5669 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
5672 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsVector(
5673 ID3D10EffectDepthStencilVariable *iface)
5675 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
5678 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsMatrix(
5679 ID3D10EffectDepthStencilVariable *iface)
5681 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
5684 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsString(
5685 ID3D10EffectDepthStencilVariable *iface)
5687 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
5690 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsShaderResource(
5691 ID3D10EffectDepthStencilVariable *iface)
5693 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
5696 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsRenderTargetView(
5697 ID3D10EffectDepthStencilVariable *iface)
5699 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
5702 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsDepthStencilView(
5703 ID3D10EffectDepthStencilVariable *iface)
5705 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
5708 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsConstantBuffer(
5709 ID3D10EffectDepthStencilVariable *iface)
5711 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
5714 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsShader(
5715 ID3D10EffectDepthStencilVariable *iface)
5717 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
5720 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsBlend(
5721 ID3D10EffectDepthStencilVariable *iface)
5723 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
5726 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsDepthStencil(
5727 ID3D10EffectDepthStencilVariable *iface)
5729 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
5732 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsRasterizer(
5733 ID3D10EffectDepthStencilVariable *iface)
5735 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
5738 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsSampler(
5739 ID3D10EffectDepthStencilVariable *iface)
5741 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
5744 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_SetRawValue(ID3D10EffectDepthStencilVariable *iface,
5745 void *data, UINT offset, UINT count)
5747 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5750 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetRawValue(ID3D10EffectDepthStencilVariable *iface,
5751 void *data, UINT offset, UINT count)
5753 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5756 /* ID3D10EffectDepthStencilVariable methods */
5758 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetDepthStencilState(ID3D10EffectDepthStencilVariable *iface,
5759 UINT index, ID3D10DepthStencilState **depth_stencil_state)
5761 FIXME("iface %p, index %u, depth_stencil_state %p stub!\n", iface, index, depth_stencil_state);
5763 return E_NOTIMPL;
5766 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetBackingStore(ID3D10EffectDepthStencilVariable *iface,
5767 UINT index, D3D10_DEPTH_STENCIL_DESC *desc)
5769 FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc);
5771 return E_NOTIMPL;
5775 static const struct ID3D10EffectDepthStencilVariableVtbl d3d10_effect_depth_stencil_variable_vtbl =
5777 /* ID3D10EffectVariable methods */
5778 d3d10_effect_depth_stencil_variable_IsValid,
5779 d3d10_effect_depth_stencil_variable_GetType,
5780 d3d10_effect_depth_stencil_variable_GetDesc,
5781 d3d10_effect_depth_stencil_variable_GetAnnotationByIndex,
5782 d3d10_effect_depth_stencil_variable_GetAnnotationByName,
5783 d3d10_effect_depth_stencil_variable_GetMemberByIndex,
5784 d3d10_effect_depth_stencil_variable_GetMemberByName,
5785 d3d10_effect_depth_stencil_variable_GetMemberBySemantic,
5786 d3d10_effect_depth_stencil_variable_GetElement,
5787 d3d10_effect_depth_stencil_variable_GetParentConstantBuffer,
5788 d3d10_effect_depth_stencil_variable_AsScalar,
5789 d3d10_effect_depth_stencil_variable_AsVector,
5790 d3d10_effect_depth_stencil_variable_AsMatrix,
5791 d3d10_effect_depth_stencil_variable_AsString,
5792 d3d10_effect_depth_stencil_variable_AsShaderResource,
5793 d3d10_effect_depth_stencil_variable_AsRenderTargetView,
5794 d3d10_effect_depth_stencil_variable_AsDepthStencilView,
5795 d3d10_effect_depth_stencil_variable_AsConstantBuffer,
5796 d3d10_effect_depth_stencil_variable_AsShader,
5797 d3d10_effect_depth_stencil_variable_AsBlend,
5798 d3d10_effect_depth_stencil_variable_AsDepthStencil,
5799 d3d10_effect_depth_stencil_variable_AsRasterizer,
5800 d3d10_effect_depth_stencil_variable_AsSampler,
5801 d3d10_effect_depth_stencil_variable_SetRawValue,
5802 d3d10_effect_depth_stencil_variable_GetRawValue,
5803 /* ID3D10EffectDepthStencilVariable methods */
5804 d3d10_effect_depth_stencil_variable_GetDepthStencilState,
5805 d3d10_effect_depth_stencil_variable_GetBackingStore,
5808 /* ID3D10EffectVariable methods */
5810 static BOOL STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_IsValid(ID3D10EffectRasterizerVariable *iface)
5812 TRACE("iface %p\n", iface);
5814 return (struct d3d10_effect_variable *)iface != &null_rasterizer_variable;
5817 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetType(
5818 ID3D10EffectRasterizerVariable *iface)
5820 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
5823 static HRESULT STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetDesc(ID3D10EffectRasterizerVariable *iface,
5824 D3D10_EFFECT_VARIABLE_DESC *desc)
5826 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
5829 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetAnnotationByIndex(
5830 ID3D10EffectRasterizerVariable *iface, UINT index)
5832 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
5835 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetAnnotationByName(
5836 ID3D10EffectRasterizerVariable *iface, LPCSTR name)
5838 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
5841 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetMemberByIndex(
5842 ID3D10EffectRasterizerVariable *iface, UINT index)
5844 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
5847 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetMemberByName(
5848 ID3D10EffectRasterizerVariable *iface, LPCSTR name)
5850 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
5853 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetMemberBySemantic(
5854 ID3D10EffectRasterizerVariable *iface, LPCSTR semantic)
5856 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
5859 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetElement(
5860 ID3D10EffectRasterizerVariable *iface, UINT index)
5862 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
5865 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetParentConstantBuffer(
5866 ID3D10EffectRasterizerVariable *iface)
5868 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
5871 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsScalar(
5872 ID3D10EffectRasterizerVariable *iface)
5874 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
5877 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsVector(
5878 ID3D10EffectRasterizerVariable *iface)
5880 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
5883 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsMatrix(
5884 ID3D10EffectRasterizerVariable *iface)
5886 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
5889 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsString(
5890 ID3D10EffectRasterizerVariable *iface)
5892 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
5895 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsShaderResource(
5896 ID3D10EffectRasterizerVariable *iface)
5898 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
5901 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsRenderTargetView(
5902 ID3D10EffectRasterizerVariable *iface)
5904 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
5907 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsDepthStencilView(
5908 ID3D10EffectRasterizerVariable *iface)
5910 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
5913 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsConstantBuffer(
5914 ID3D10EffectRasterizerVariable *iface)
5916 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
5919 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsShader(
5920 ID3D10EffectRasterizerVariable *iface)
5922 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
5925 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsBlend(
5926 ID3D10EffectRasterizerVariable *iface)
5928 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
5931 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsDepthStencil(
5932 ID3D10EffectRasterizerVariable *iface)
5934 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
5937 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsRasterizer(
5938 ID3D10EffectRasterizerVariable *iface)
5940 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
5943 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsSampler(
5944 ID3D10EffectRasterizerVariable *iface)
5946 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
5949 static HRESULT STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_SetRawValue(ID3D10EffectRasterizerVariable *iface,
5950 void *data, UINT offset, UINT count)
5952 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5955 static HRESULT STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetRawValue(ID3D10EffectRasterizerVariable *iface,
5956 void *data, UINT offset, UINT count)
5958 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5961 /* ID3D10EffectRasterizerVariable methods */
5963 static HRESULT STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetRasterizerState(ID3D10EffectRasterizerVariable *iface,
5964 UINT index, ID3D10RasterizerState **rasterizer_state)
5966 FIXME("iface %p, index %u, rasterizer_state %p stub!\n", iface, index, rasterizer_state);
5968 return E_NOTIMPL;
5971 static HRESULT STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetBackingStore(ID3D10EffectRasterizerVariable *iface,
5972 UINT index, D3D10_RASTERIZER_DESC *desc)
5974 FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc);
5976 return E_NOTIMPL;
5980 static const struct ID3D10EffectRasterizerVariableVtbl d3d10_effect_rasterizer_variable_vtbl =
5982 /* ID3D10EffectVariable methods */
5983 d3d10_effect_rasterizer_variable_IsValid,
5984 d3d10_effect_rasterizer_variable_GetType,
5985 d3d10_effect_rasterizer_variable_GetDesc,
5986 d3d10_effect_rasterizer_variable_GetAnnotationByIndex,
5987 d3d10_effect_rasterizer_variable_GetAnnotationByName,
5988 d3d10_effect_rasterizer_variable_GetMemberByIndex,
5989 d3d10_effect_rasterizer_variable_GetMemberByName,
5990 d3d10_effect_rasterizer_variable_GetMemberBySemantic,
5991 d3d10_effect_rasterizer_variable_GetElement,
5992 d3d10_effect_rasterizer_variable_GetParentConstantBuffer,
5993 d3d10_effect_rasterizer_variable_AsScalar,
5994 d3d10_effect_rasterizer_variable_AsVector,
5995 d3d10_effect_rasterizer_variable_AsMatrix,
5996 d3d10_effect_rasterizer_variable_AsString,
5997 d3d10_effect_rasterizer_variable_AsShaderResource,
5998 d3d10_effect_rasterizer_variable_AsRenderTargetView,
5999 d3d10_effect_rasterizer_variable_AsDepthStencilView,
6000 d3d10_effect_rasterizer_variable_AsConstantBuffer,
6001 d3d10_effect_rasterizer_variable_AsShader,
6002 d3d10_effect_rasterizer_variable_AsBlend,
6003 d3d10_effect_rasterizer_variable_AsDepthStencil,
6004 d3d10_effect_rasterizer_variable_AsRasterizer,
6005 d3d10_effect_rasterizer_variable_AsSampler,
6006 d3d10_effect_rasterizer_variable_SetRawValue,
6007 d3d10_effect_rasterizer_variable_GetRawValue,
6008 /* ID3D10EffectRasterizerVariable methods */
6009 d3d10_effect_rasterizer_variable_GetRasterizerState,
6010 d3d10_effect_rasterizer_variable_GetBackingStore,
6013 /* ID3D10EffectVariable methods */
6015 static BOOL STDMETHODCALLTYPE d3d10_effect_sampler_variable_IsValid(ID3D10EffectSamplerVariable *iface)
6017 TRACE("iface %p\n", iface);
6019 return (struct d3d10_effect_variable *)iface != &null_sampler_variable;
6022 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetType(
6023 ID3D10EffectSamplerVariable *iface)
6025 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
6028 static HRESULT STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetDesc(ID3D10EffectSamplerVariable *iface,
6029 D3D10_EFFECT_VARIABLE_DESC *desc)
6031 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
6034 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetAnnotationByIndex(
6035 ID3D10EffectSamplerVariable *iface, UINT index)
6037 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
6040 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetAnnotationByName(
6041 ID3D10EffectSamplerVariable *iface, LPCSTR name)
6043 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
6046 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetMemberByIndex(
6047 ID3D10EffectSamplerVariable *iface, UINT index)
6049 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
6052 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetMemberByName(
6053 ID3D10EffectSamplerVariable *iface, LPCSTR name)
6055 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
6058 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetMemberBySemantic(
6059 ID3D10EffectSamplerVariable *iface, LPCSTR semantic)
6061 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
6064 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetElement(
6065 ID3D10EffectSamplerVariable *iface, UINT index)
6067 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
6070 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetParentConstantBuffer(
6071 ID3D10EffectSamplerVariable *iface)
6073 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
6076 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsScalar(
6077 ID3D10EffectSamplerVariable *iface)
6079 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
6082 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsVector(
6083 ID3D10EffectSamplerVariable *iface)
6085 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
6088 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsMatrix(
6089 ID3D10EffectSamplerVariable *iface)
6091 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
6094 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsString(
6095 ID3D10EffectSamplerVariable *iface)
6097 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
6100 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsShaderResource(
6101 ID3D10EffectSamplerVariable *iface)
6103 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
6106 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsRenderTargetView(
6107 ID3D10EffectSamplerVariable *iface)
6109 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
6112 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsDepthStencilView(
6113 ID3D10EffectSamplerVariable *iface)
6115 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
6118 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsConstantBuffer(
6119 ID3D10EffectSamplerVariable *iface)
6121 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
6124 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsShader(
6125 ID3D10EffectSamplerVariable *iface)
6127 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
6130 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsBlend(
6131 ID3D10EffectSamplerVariable *iface)
6133 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
6136 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsDepthStencil(
6137 ID3D10EffectSamplerVariable *iface)
6139 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
6142 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsRasterizer(
6143 ID3D10EffectSamplerVariable *iface)
6145 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
6148 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsSampler(
6149 ID3D10EffectSamplerVariable *iface)
6151 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
6154 static HRESULT STDMETHODCALLTYPE d3d10_effect_sampler_variable_SetRawValue(ID3D10EffectSamplerVariable *iface,
6155 void *data, UINT offset, UINT count)
6157 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
6160 static HRESULT STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetRawValue(ID3D10EffectSamplerVariable *iface,
6161 void *data, UINT offset, UINT count)
6163 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
6166 /* ID3D10EffectSamplerVariable methods */
6168 static HRESULT STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetSampler(ID3D10EffectSamplerVariable *iface,
6169 UINT index, ID3D10SamplerState **sampler)
6171 FIXME("iface %p, index %u, sampler %p stub!\n", iface, index, sampler);
6173 return E_NOTIMPL;
6176 static HRESULT STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetBackingStore(ID3D10EffectSamplerVariable *iface,
6177 UINT index, D3D10_SAMPLER_DESC *desc)
6179 FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc);
6181 return E_NOTIMPL;
6185 static const struct ID3D10EffectSamplerVariableVtbl d3d10_effect_sampler_variable_vtbl =
6187 /* ID3D10EffectVariable methods */
6188 d3d10_effect_sampler_variable_IsValid,
6189 d3d10_effect_sampler_variable_GetType,
6190 d3d10_effect_sampler_variable_GetDesc,
6191 d3d10_effect_sampler_variable_GetAnnotationByIndex,
6192 d3d10_effect_sampler_variable_GetAnnotationByName,
6193 d3d10_effect_sampler_variable_GetMemberByIndex,
6194 d3d10_effect_sampler_variable_GetMemberByName,
6195 d3d10_effect_sampler_variable_GetMemberBySemantic,
6196 d3d10_effect_sampler_variable_GetElement,
6197 d3d10_effect_sampler_variable_GetParentConstantBuffer,
6198 d3d10_effect_sampler_variable_AsScalar,
6199 d3d10_effect_sampler_variable_AsVector,
6200 d3d10_effect_sampler_variable_AsMatrix,
6201 d3d10_effect_sampler_variable_AsString,
6202 d3d10_effect_sampler_variable_AsShaderResource,
6203 d3d10_effect_sampler_variable_AsRenderTargetView,
6204 d3d10_effect_sampler_variable_AsDepthStencilView,
6205 d3d10_effect_sampler_variable_AsConstantBuffer,
6206 d3d10_effect_sampler_variable_AsShader,
6207 d3d10_effect_sampler_variable_AsBlend,
6208 d3d10_effect_sampler_variable_AsDepthStencil,
6209 d3d10_effect_sampler_variable_AsRasterizer,
6210 d3d10_effect_sampler_variable_AsSampler,
6211 d3d10_effect_sampler_variable_SetRawValue,
6212 d3d10_effect_sampler_variable_GetRawValue,
6213 /* ID3D10EffectSamplerVariable methods */
6214 d3d10_effect_sampler_variable_GetSampler,
6215 d3d10_effect_sampler_variable_GetBackingStore,
6218 /* ID3D10EffectType methods */
6220 static inline struct d3d10_effect_type *impl_from_ID3D10EffectType(ID3D10EffectType *iface)
6222 return CONTAINING_RECORD(iface, struct d3d10_effect_type, ID3D10EffectType_iface);
6225 static BOOL STDMETHODCALLTYPE d3d10_effect_type_IsValid(ID3D10EffectType *iface)
6227 struct d3d10_effect_type *This = impl_from_ID3D10EffectType(iface);
6229 TRACE("iface %p\n", iface);
6231 return This != &null_type;
6234 static HRESULT STDMETHODCALLTYPE d3d10_effect_type_GetDesc(ID3D10EffectType *iface, D3D10_EFFECT_TYPE_DESC *desc)
6236 struct d3d10_effect_type *This = impl_from_ID3D10EffectType(iface);
6238 TRACE("iface %p, desc %p\n", iface, desc);
6240 if (This == &null_type)
6242 WARN("Null type specified\n");
6243 return E_FAIL;
6246 if (!desc)
6248 WARN("Invalid argument specified\n");
6249 return E_INVALIDARG;
6252 desc->TypeName = This->name;
6253 desc->Class = This->type_class;
6254 desc->Type = This->basetype;
6255 desc->Elements = This->element_count;
6256 desc->Members = This->member_count;
6257 desc->Rows = This->row_count;
6258 desc->Columns = This->column_count;
6259 desc->PackedSize = This->size_packed;
6260 desc->UnpackedSize = This->size_unpacked;
6261 desc->Stride = This->stride;
6263 return S_OK;
6266 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_type_GetMemberTypeByIndex(ID3D10EffectType *iface,
6267 UINT index)
6269 struct d3d10_effect_type *This = impl_from_ID3D10EffectType(iface);
6270 struct d3d10_effect_type *t;
6272 TRACE("iface %p, index %u\n", iface, index);
6274 if (index >= This->member_count)
6276 WARN("Invalid index specified\n");
6277 return &null_type.ID3D10EffectType_iface;
6280 t = (&This->members[index])->type;
6282 TRACE("Returning member %p, %s\n", t, debugstr_a(t->name));
6284 return &t->ID3D10EffectType_iface;
6287 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_type_GetMemberTypeByName(ID3D10EffectType *iface,
6288 LPCSTR name)
6290 struct d3d10_effect_type *This = impl_from_ID3D10EffectType(iface);
6291 unsigned int i;
6293 TRACE("iface %p, name %s\n", iface, debugstr_a(name));
6295 if (!name)
6297 WARN("Invalid name specified\n");
6298 return &null_type.ID3D10EffectType_iface;
6301 for (i = 0; i < This->member_count; ++i)
6303 struct d3d10_effect_type_member *typem = &This->members[i];
6305 if (typem->name)
6307 if (!strcmp(typem->name, name))
6309 TRACE("Returning type %p.\n", typem->type);
6310 return &typem->type->ID3D10EffectType_iface;
6315 WARN("Invalid name specified\n");
6317 return &null_type.ID3D10EffectType_iface;
6320 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_type_GetMemberTypeBySemantic(ID3D10EffectType *iface,
6321 LPCSTR semantic)
6323 struct d3d10_effect_type *This = impl_from_ID3D10EffectType(iface);
6324 unsigned int i;
6326 TRACE("iface %p, semantic %s\n", iface, debugstr_a(semantic));
6328 if (!semantic)
6330 WARN("Invalid semantic specified\n");
6331 return &null_type.ID3D10EffectType_iface;
6334 for (i = 0; i < This->member_count; ++i)
6336 struct d3d10_effect_type_member *typem = &This->members[i];
6338 if (typem->semantic)
6340 if (!strcmp(typem->semantic, semantic))
6342 TRACE("Returning type %p.\n", typem->type);
6343 return &typem->type->ID3D10EffectType_iface;
6348 WARN("Invalid semantic specified\n");
6350 return &null_type.ID3D10EffectType_iface;
6353 static LPCSTR STDMETHODCALLTYPE d3d10_effect_type_GetMemberName(ID3D10EffectType *iface, UINT index)
6355 struct d3d10_effect_type *This = impl_from_ID3D10EffectType(iface);
6356 struct d3d10_effect_type_member *typem;
6358 TRACE("iface %p, index %u\n", iface, index);
6360 if (index >= This->member_count)
6362 WARN("Invalid index specified\n");
6363 return NULL;
6366 typem = &This->members[index];
6368 TRACE("Returning name %s\n", debugstr_a(typem->name));
6370 return typem->name;
6373 static LPCSTR STDMETHODCALLTYPE d3d10_effect_type_GetMemberSemantic(ID3D10EffectType *iface, UINT index)
6375 struct d3d10_effect_type *This = impl_from_ID3D10EffectType(iface);
6376 struct d3d10_effect_type_member *typem;
6378 TRACE("iface %p, index %u\n", iface, index);
6380 if (index >= This->member_count)
6382 WARN("Invalid index specified\n");
6383 return NULL;
6386 typem = &This->members[index];
6388 TRACE("Returning semantic %s\n", debugstr_a(typem->semantic));
6390 return typem->semantic;
6393 static const struct ID3D10EffectTypeVtbl d3d10_effect_type_vtbl =
6395 /* ID3D10EffectType */
6396 d3d10_effect_type_IsValid,
6397 d3d10_effect_type_GetDesc,
6398 d3d10_effect_type_GetMemberTypeByIndex,
6399 d3d10_effect_type_GetMemberTypeByName,
6400 d3d10_effect_type_GetMemberTypeBySemantic,
6401 d3d10_effect_type_GetMemberName,
6402 d3d10_effect_type_GetMemberSemantic,