d3d10: Parse shaders in parse_fx10_local_variable().
[wine.git] / dlls / d3d10 / effect.c
blob3e7f21d55dce52294d03c3fe21e1012d6186ef24
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 MAKE_TAG(ch0, ch1, ch2, ch3) \
29 ((DWORD)(ch0) | ((DWORD)(ch1) << 8) | \
30 ((DWORD)(ch2) << 16) | ((DWORD)(ch3) << 24 ))
31 #define TAG_DXBC MAKE_TAG('D', 'X', 'B', 'C')
32 #define TAG_FX10 MAKE_TAG('F', 'X', '1', '0')
33 #define TAG_ISGN MAKE_TAG('I', 'S', 'G', 'N')
35 #define D3D10_FX10_TYPE_COLUMN_SHIFT 11
36 #define D3D10_FX10_TYPE_COLUMN_MASK (0x7 << D3D10_FX10_TYPE_COLUMN_SHIFT)
38 #define D3D10_FX10_TYPE_ROW_SHIFT 8
39 #define D3D10_FX10_TYPE_ROW_MASK (0x7 << D3D10_FX10_TYPE_ROW_SHIFT)
41 #define D3D10_FX10_TYPE_BASETYPE_SHIFT 3
42 #define D3D10_FX10_TYPE_BASETYPE_MASK (0x1f << D3D10_FX10_TYPE_BASETYPE_SHIFT)
44 #define D3D10_FX10_TYPE_CLASS_SHIFT 0
45 #define D3D10_FX10_TYPE_CLASS_MASK (0x7 << D3D10_FX10_TYPE_CLASS_SHIFT)
47 #define D3D10_FX10_TYPE_MATRIX_COLUMN_MAJOR_MASK 0x4000
49 static const struct ID3D10EffectTechniqueVtbl d3d10_effect_technique_vtbl;
50 static const struct ID3D10EffectPassVtbl d3d10_effect_pass_vtbl;
51 static const struct ID3D10EffectVariableVtbl d3d10_effect_variable_vtbl;
52 static const struct ID3D10EffectConstantBufferVtbl d3d10_effect_constant_buffer_vtbl;
53 static const struct ID3D10EffectScalarVariableVtbl d3d10_effect_scalar_variable_vtbl;
54 static const struct ID3D10EffectVectorVariableVtbl d3d10_effect_vector_variable_vtbl;
55 static const struct ID3D10EffectMatrixVariableVtbl d3d10_effect_matrix_variable_vtbl;
56 static const struct ID3D10EffectStringVariableVtbl d3d10_effect_string_variable_vtbl;
57 static const struct ID3D10EffectShaderResourceVariableVtbl d3d10_effect_shader_resource_variable_vtbl;
58 static const struct ID3D10EffectRenderTargetViewVariableVtbl d3d10_effect_render_target_view_variable_vtbl;
59 static const struct ID3D10EffectDepthStencilViewVariableVtbl d3d10_effect_depth_stencil_view_variable_vtbl;
60 static const struct ID3D10EffectShaderVariableVtbl d3d10_effect_shader_variable_vtbl;
61 static const struct ID3D10EffectBlendVariableVtbl d3d10_effect_blend_variable_vtbl;
62 static const struct ID3D10EffectDepthStencilVariableVtbl d3d10_effect_depth_stencil_variable_vtbl;
63 static const struct ID3D10EffectRasterizerVariableVtbl d3d10_effect_rasterizer_variable_vtbl;
64 static const struct ID3D10EffectSamplerVariableVtbl d3d10_effect_sampler_variable_vtbl;
65 static const struct ID3D10EffectTypeVtbl d3d10_effect_type_vtbl;
67 /* null objects - needed for invalid calls */
68 static struct d3d10_effect_technique null_technique = {&d3d10_effect_technique_vtbl};
69 static struct d3d10_effect_pass null_pass = {&d3d10_effect_pass_vtbl};
70 static struct d3d10_effect_type null_type = {&d3d10_effect_type_vtbl};
71 static struct d3d10_effect_variable null_local_buffer = {(ID3D10EffectVariableVtbl *)&d3d10_effect_constant_buffer_vtbl,
72 &null_local_buffer, &null_type};
73 static struct d3d10_effect_variable null_variable = {&d3d10_effect_variable_vtbl,
74 &null_local_buffer, &null_type};
75 static struct d3d10_effect_variable null_scalar_variable = {(ID3D10EffectVariableVtbl *)&d3d10_effect_scalar_variable_vtbl,
76 &null_local_buffer, &null_type};
77 static struct d3d10_effect_variable null_vector_variable = {(ID3D10EffectVariableVtbl *)&d3d10_effect_vector_variable_vtbl,
78 &null_local_buffer, &null_type};
79 static struct d3d10_effect_variable null_matrix_variable = {(ID3D10EffectVariableVtbl *)&d3d10_effect_matrix_variable_vtbl,
80 &null_local_buffer, &null_type};
81 static struct d3d10_effect_variable null_string_variable = {(ID3D10EffectVariableVtbl *)&d3d10_effect_string_variable_vtbl,
82 &null_local_buffer, &null_type};
83 static struct d3d10_effect_variable null_shader_resource_variable = {(ID3D10EffectVariableVtbl *)&d3d10_effect_shader_resource_variable_vtbl,
84 &null_local_buffer, &null_type};
85 static struct d3d10_effect_variable null_render_target_view_variable = {(ID3D10EffectVariableVtbl *)&d3d10_effect_render_target_view_variable_vtbl,
86 &null_local_buffer, &null_type};
87 static struct d3d10_effect_variable null_depth_stencil_view_variable = {(ID3D10EffectVariableVtbl *)&d3d10_effect_depth_stencil_view_variable_vtbl,
88 &null_local_buffer, &null_type};
89 static struct d3d10_effect_variable null_shader_variable = {(ID3D10EffectVariableVtbl *)&d3d10_effect_shader_variable_vtbl,
90 &null_local_buffer, &null_type};
91 static struct d3d10_effect_variable null_blend_variable = {(ID3D10EffectVariableVtbl *)&d3d10_effect_blend_variable_vtbl,
92 &null_local_buffer, &null_type};
93 static struct d3d10_effect_variable null_depth_stencil_variable = {(ID3D10EffectVariableVtbl *)&d3d10_effect_depth_stencil_variable_vtbl,
94 &null_local_buffer, &null_type};
95 static struct d3d10_effect_variable null_rasterizer_variable = {(ID3D10EffectVariableVtbl *)&d3d10_effect_rasterizer_variable_vtbl,
96 &null_local_buffer, &null_type};
97 static struct d3d10_effect_variable null_sampler_variable = {(ID3D10EffectVariableVtbl *)&d3d10_effect_sampler_variable_vtbl,
98 &null_local_buffer, &null_type};
100 /* anonymous_shader_type and anonymous_shader */
101 static char anonymous_name[] = "$Anonymous";
102 static char anonymous_vertexshader_name[] = "vertexshader";
103 static char anonymous_pixelshader_name[] = "pixelshader";
104 static char anonymous_geometryshader_name[] = "geometryshader";
105 static struct d3d10_effect_type anonymous_vs_type = {&d3d10_effect_type_vtbl, anonymous_vertexshader_name,
106 D3D10_SVT_VERTEXSHADER, D3D10_SVC_OBJECT};
107 static struct d3d10_effect_type anonymous_ps_type = {&d3d10_effect_type_vtbl, anonymous_pixelshader_name,
108 D3D10_SVT_PIXELSHADER, D3D10_SVC_OBJECT};
109 static struct d3d10_effect_type anonymous_gs_type = {&d3d10_effect_type_vtbl, anonymous_geometryshader_name,
110 D3D10_SVT_GEOMETRYSHADER, D3D10_SVC_OBJECT};
111 static struct d3d10_effect_variable anonymous_vs = {(ID3D10EffectVariableVtbl *)&d3d10_effect_shader_variable_vtbl,
112 &null_local_buffer, &anonymous_vs_type, &null_shader_variable, anonymous_name};
113 static struct d3d10_effect_variable anonymous_ps = {(ID3D10EffectVariableVtbl *)&d3d10_effect_shader_variable_vtbl,
114 &null_local_buffer, &anonymous_ps_type, &null_shader_variable, anonymous_name};
115 static struct d3d10_effect_variable anonymous_gs = {(ID3D10EffectVariableVtbl *)&d3d10_effect_shader_variable_vtbl,
116 &null_local_buffer, &anonymous_gs_type, &null_shader_variable, anonymous_name};
118 static struct d3d10_effect_type *get_fx10_type(struct d3d10_effect *effect, const char *data, DWORD offset);
120 static inline void read_dword(const char **ptr, DWORD *d)
122 memcpy(d, *ptr, sizeof(*d));
123 *ptr += sizeof(*d);
126 static inline void skip_dword_unknown(const char **ptr, unsigned int count)
128 unsigned int i;
129 DWORD d;
131 FIXME("Skipping %u unknown DWORDs:\n", count);
132 for (i = 0; i < count; ++i)
134 read_dword(ptr, &d);
135 FIXME("\t0x%08x\n", d);
139 static inline void write_dword(char **ptr, DWORD d)
141 memcpy(*ptr, &d, sizeof(d));
142 *ptr += sizeof(d);
145 static inline void write_dword_unknown(char **ptr, DWORD d)
147 FIXME("Writing unknown DWORD 0x%08x\n", d);
148 write_dword(ptr, d);
151 static HRESULT parse_dxbc(const char *data, SIZE_T data_size,
152 HRESULT (*chunk_handler)(const char *data, DWORD data_size, DWORD tag, void *ctx), void *ctx)
154 const char *ptr = data;
155 HRESULT hr = S_OK;
156 DWORD chunk_count;
157 DWORD total_size;
158 unsigned int i;
159 DWORD tag;
161 read_dword(&ptr, &tag);
162 TRACE("tag: %s.\n", debugstr_an((const char *)&tag, 4));
164 if (tag != TAG_DXBC)
166 WARN("Wrong tag.\n");
167 return E_FAIL;
170 /* checksum? */
171 skip_dword_unknown(&ptr, 4);
173 skip_dword_unknown(&ptr, 1);
175 read_dword(&ptr, &total_size);
176 TRACE("total size: %#x\n", total_size);
178 read_dword(&ptr, &chunk_count);
179 TRACE("chunk count: %#x\n", chunk_count);
181 for (i = 0; i < chunk_count; ++i)
183 DWORD chunk_tag, chunk_size;
184 const char *chunk_ptr;
185 DWORD chunk_offset;
187 read_dword(&ptr, &chunk_offset);
188 TRACE("chunk %u at offset %#x\n", i, chunk_offset);
190 chunk_ptr = data + chunk_offset;
192 read_dword(&chunk_ptr, &chunk_tag);
193 read_dword(&chunk_ptr, &chunk_size);
195 hr = chunk_handler(chunk_ptr, chunk_size, chunk_tag, ctx);
196 if (FAILED(hr)) break;
199 return hr;
202 static BOOL copy_name(const char *ptr, char **name)
204 size_t name_len;
206 if (!ptr) return TRUE;
208 name_len = strlen(ptr) + 1;
209 if (name_len == 1)
211 return TRUE;
214 *name = HeapAlloc(GetProcessHeap(), 0, name_len);
215 if (!*name)
217 ERR("Failed to allocate name memory.\n");
218 return FALSE;
221 memcpy(*name, ptr, name_len);
223 return TRUE;
226 static HRESULT shader_chunk_handler(const char *data, DWORD data_size, DWORD tag, void *ctx)
228 struct d3d10_effect_shader_variable *s = ctx;
230 TRACE("tag: %s.\n", debugstr_an((const char *)&tag, 4));
232 TRACE("chunk size: %#x\n", data_size);
234 switch(tag)
236 case TAG_ISGN:
238 /* 32 (DXBC header) + 1 * 4 (chunk index) + 2 * 4 (chunk header) + data_size (chunk data) */
239 UINT size = 44 + data_size;
240 char *ptr;
242 s->input_signature = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size);
243 if (!s->input_signature)
245 ERR("Failed to allocate input signature data\n");
246 return E_OUTOFMEMORY;
248 s->input_signature_size = size;
250 ptr = s->input_signature;
252 write_dword(&ptr, TAG_DXBC);
254 /* signature(?) */
255 write_dword_unknown(&ptr, 0);
256 write_dword_unknown(&ptr, 0);
257 write_dword_unknown(&ptr, 0);
258 write_dword_unknown(&ptr, 0);
260 /* seems to be always 1 */
261 write_dword_unknown(&ptr, 1);
263 /* DXBC size */
264 write_dword(&ptr, size);
266 /* chunk count */
267 write_dword(&ptr, 1);
269 /* chunk index */
270 write_dword(&ptr, (ptr - s->input_signature) + 4);
272 /* chunk */
273 write_dword(&ptr, TAG_ISGN);
274 write_dword(&ptr, data_size);
275 memcpy(ptr, data, data_size);
276 break;
279 default:
280 FIXME("Unhandled chunk %s.\n", debugstr_an((const char *)&tag, 4));
281 break;
284 return S_OK;
287 static HRESULT parse_shader(struct d3d10_effect_variable *v, const char *data)
289 ID3D10Device *device = v->effect->device;
290 struct d3d10_effect_shader_variable *s;
291 const char *ptr = data;
292 DWORD dxbc_size;
293 HRESULT hr;
295 s = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*s));
296 if (!s)
298 ERR("Failed to allocate shader variable memory\n");
299 return E_OUTOFMEMORY;
302 v->data = s;
304 if (!ptr) return S_OK;
306 read_dword(&ptr, &dxbc_size);
307 TRACE("dxbc size: %#x\n", dxbc_size);
309 /* We got a shader VertexShader vs = NULL, so it is fine to skip this. */
310 if (!dxbc_size) return S_OK;
312 switch (v->type->basetype)
314 case D3D10_SVT_VERTEXSHADER:
315 hr = ID3D10Device_CreateVertexShader(device, ptr, dxbc_size, &s->shader.vs);
316 if (FAILED(hr)) return hr;
317 break;
319 case D3D10_SVT_PIXELSHADER:
320 hr = ID3D10Device_CreatePixelShader(device, ptr, dxbc_size, &s->shader.ps);
321 if (FAILED(hr)) return hr;
322 break;
324 case D3D10_SVT_GEOMETRYSHADER:
325 hr = ID3D10Device_CreateGeometryShader(device, ptr, dxbc_size, &s->shader.gs);
326 if (FAILED(hr)) return hr;
327 break;
329 default:
330 ERR("This should not happen!\n");
331 return E_FAIL;
334 return parse_dxbc(ptr, dxbc_size, shader_chunk_handler, s);
337 static D3D10_SHADER_VARIABLE_CLASS d3d10_variable_class(DWORD c, BOOL is_column_major)
339 switch (c)
341 case 1: return D3D10_SVC_SCALAR;
342 case 2: return D3D10_SVC_VECTOR;
343 case 3: if (is_column_major) return D3D10_SVC_MATRIX_COLUMNS;
344 else return D3D10_SVC_MATRIX_ROWS;
345 default:
346 FIXME("Unknown variable class %#x.\n", c);
347 return 0;
351 static D3D10_SHADER_VARIABLE_TYPE d3d10_variable_type(DWORD t, BOOL is_object)
353 if(is_object)
355 switch (t)
357 case 1: return D3D10_SVT_STRING;
358 case 2: return D3D10_SVT_BLEND;
359 case 3: return D3D10_SVT_DEPTHSTENCIL;
360 case 4: return D3D10_SVT_RASTERIZER;
361 case 5: return D3D10_SVT_PIXELSHADER;
362 case 6: return D3D10_SVT_VERTEXSHADER;
363 case 7: return D3D10_SVT_GEOMETRYSHADER;
365 case 10: return D3D10_SVT_TEXTURE1D;
366 case 11: return D3D10_SVT_TEXTURE1DARRAY;
367 case 12: return D3D10_SVT_TEXTURE2D;
368 case 13: return D3D10_SVT_TEXTURE2DARRAY;
369 case 14: return D3D10_SVT_TEXTURE2DMS;
370 case 15: return D3D10_SVT_TEXTURE2DMSARRAY;
371 case 16: return D3D10_SVT_TEXTURE3D;
372 case 17: return D3D10_SVT_TEXTURECUBE;
374 case 19: return D3D10_SVT_RENDERTARGETVIEW;
375 case 20: return D3D10_SVT_DEPTHSTENCILVIEW;
376 case 21: return D3D10_SVT_SAMPLER;
377 default:
378 FIXME("Unknown variable type %#x.\n", t);
379 return 0;
382 else
384 switch (t)
386 case 1: return D3D10_SVT_FLOAT;
387 case 2: return D3D10_SVT_INT;
388 case 3: return D3D10_SVT_UINT;
389 case 4: return D3D10_SVT_BOOL;
390 default:
391 FIXME("Unknown variable type %#x.\n", t);
392 return 0;
397 static HRESULT parse_fx10_type(struct d3d10_effect_type *t, const char *ptr, const char *data)
399 DWORD unknown0;
400 DWORD offset;
401 DWORD typeinfo;
402 unsigned int i;
404 read_dword(&ptr, &offset);
405 TRACE("Type name at offset %#x.\n", offset);
407 if (!copy_name(data + offset, &t->name))
409 ERR("Failed to copy name.\n");
410 return E_OUTOFMEMORY;
412 TRACE("Type name: %s.\n", debugstr_a(t->name));
414 read_dword(&ptr, &unknown0);
415 TRACE("Unknown 0: %u.\n", unknown0);
417 read_dword(&ptr, &t->element_count);
418 TRACE("Element count: %u.\n", t->element_count);
420 read_dword(&ptr, &t->size_unpacked);
421 TRACE("Unpacked size: %#x.\n", t->size_unpacked);
423 read_dword(&ptr, &t->stride);
424 TRACE("Stride: %#x.\n", t->stride);
426 read_dword(&ptr, &t->size_packed);
427 TRACE("Packed size %#x.\n", t->size_packed);
429 switch (unknown0)
431 case 1:
432 t->member_count = 0;
434 read_dword(&ptr, &typeinfo);
435 t->column_count = (typeinfo & D3D10_FX10_TYPE_COLUMN_MASK) >> D3D10_FX10_TYPE_COLUMN_SHIFT;
436 t->row_count = (typeinfo & D3D10_FX10_TYPE_ROW_MASK) >> D3D10_FX10_TYPE_ROW_SHIFT;
437 t->basetype = d3d10_variable_type((typeinfo & D3D10_FX10_TYPE_BASETYPE_MASK) >> D3D10_FX10_TYPE_BASETYPE_SHIFT, FALSE);
438 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);
440 TRACE("Type description: %#x.\n", typeinfo);
441 TRACE("\tcolumns: %u.\n", t->column_count);
442 TRACE("\trows: %u.\n", t->row_count);
443 TRACE("\tbasetype: %s.\n", debug_d3d10_shader_variable_type(t->basetype));
444 TRACE("\tclass: %s.\n", debug_d3d10_shader_variable_class(t->type_class));
445 TRACE("\tunknown bits: %#x.\n", typeinfo & ~(D3D10_FX10_TYPE_COLUMN_MASK | D3D10_FX10_TYPE_ROW_MASK
446 | D3D10_FX10_TYPE_BASETYPE_MASK | D3D10_FX10_TYPE_CLASS_MASK | D3D10_FX10_TYPE_MATRIX_COLUMN_MAJOR_MASK));
447 break;
449 case 2:
450 TRACE("Type is an object.\n");
452 t->member_count = 0;
453 t->column_count = 0;
454 t->row_count = 0;
455 t->type_class = D3D10_SVC_OBJECT;
457 read_dword(&ptr, &typeinfo);
458 t->basetype = d3d10_variable_type(typeinfo, TRUE);
460 TRACE("Type description: %#x.\n", typeinfo);
461 TRACE("\tbasetype: %s.\n", debug_d3d10_shader_variable_type(t->basetype));
462 TRACE("\tclass: %s.\n", debug_d3d10_shader_variable_class(t->type_class));
463 break;
465 case 3:
466 TRACE("Type is a structure.\n");
468 read_dword(&ptr, &t->member_count);
469 TRACE("Member count: %u.\n", t->member_count);
471 t->column_count = 0;
472 t->row_count = 0;
473 t->basetype = 0;
474 t->type_class = D3D10_SVC_STRUCT;
476 t->members = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, t->member_count * sizeof(*t->members));
477 if (!t->members)
479 ERR("Failed to allocate members memory.\n");
480 return E_OUTOFMEMORY;
483 for (i = 0; i < t->member_count; ++i)
485 struct d3d10_effect_type_member *typem = &t->members[i];
487 read_dword(&ptr, &offset);
488 TRACE("Member name at offset %#x.\n", offset);
490 if (!copy_name(data + offset, &typem->name))
492 ERR("Failed to copy name.\n");
493 return E_OUTOFMEMORY;
495 TRACE("Member name: %s.\n", debugstr_a(typem->name));
497 read_dword(&ptr, &offset);
498 TRACE("Member semantic at offset %#x.\n", offset);
500 if (!copy_name(data + offset, &typem->semantic))
502 ERR("Failed to copy semantic.\n");
503 return E_OUTOFMEMORY;
505 TRACE("Member semantic: %s.\n", debugstr_a(typem->semantic));
507 read_dword(&ptr, &typem->buffer_offset);
508 TRACE("Member offset in struct: %#x.\n", typem->buffer_offset);
510 read_dword(&ptr, &offset);
511 TRACE("Member type info at offset %#x.\n", offset);
513 typem->type = get_fx10_type(t->effect, data, offset);
514 if (!typem->type)
516 ERR("Failed to get variable type.\n");
517 return E_FAIL;
520 break;
522 default:
523 FIXME("Unhandled case %#x.\n", unknown0);
524 return E_FAIL;
527 if (t->element_count)
529 TRACE("Elementtype for type at offset: %#x\n", t->id);
531 /* allocate elementtype - we need only one, because all elements have the same type */
532 t->elementtype = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*t->elementtype));
533 if (!t->elementtype)
535 ERR("Failed to allocate members memory.\n");
536 return E_OUTOFMEMORY;
539 /* create a copy of the original type with some minor changes */
540 t->elementtype->vtbl = &d3d10_effect_type_vtbl;
541 t->elementtype->effect = t->effect;
543 if (!copy_name(t->name, &t->elementtype->name))
545 ERR("Failed to copy name.\n");
546 return E_OUTOFMEMORY;
548 TRACE("\tType name: %s.\n", debugstr_a(t->elementtype->name));
550 t->elementtype->element_count = 0;
551 TRACE("\tElement count: %u.\n", t->elementtype->element_count);
554 * Not sure if this calculation is 100% correct, but a test
555 * show's that these values work.
557 t->elementtype->size_unpacked = t->size_packed / t->element_count;
558 TRACE("\tUnpacked size: %#x.\n", t->elementtype->size_unpacked);
560 t->elementtype->stride = t->stride;
561 TRACE("\tStride: %#x.\n", t->elementtype->stride);
563 t->elementtype->size_packed = t->size_packed / t->element_count;
564 TRACE("\tPacked size: %#x.\n", t->elementtype->size_packed);
566 t->elementtype->member_count = t->member_count;
567 TRACE("\tMember count: %u.\n", t->elementtype->member_count);
569 t->elementtype->column_count = t->column_count;
570 TRACE("\tColumns: %u.\n", t->elementtype->column_count);
572 t->elementtype->row_count = t->row_count;
573 TRACE("\tRows: %u.\n", t->elementtype->row_count);
575 t->elementtype->basetype = t->basetype;
576 TRACE("\tBasetype: %s.\n", debug_d3d10_shader_variable_type(t->elementtype->basetype));
578 t->elementtype->type_class = t->type_class;
579 TRACE("\tClass: %s.\n", debug_d3d10_shader_variable_class(t->elementtype->type_class));
581 t->elementtype->members = t->members;
584 return S_OK;
587 static struct d3d10_effect_type *get_fx10_type(struct d3d10_effect *effect, const char *data, DWORD offset)
589 struct d3d10_effect_type *type;
590 struct wine_rb_entry *entry;
591 HRESULT hr;
593 entry = wine_rb_get(&effect->types, &offset);
594 if (entry)
596 TRACE("Returning existing type.\n");
597 return WINE_RB_ENTRY_VALUE(entry, struct d3d10_effect_type, entry);
600 type = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*type));
601 if (!type)
603 ERR("Failed to allocate type memory.\n");
604 return NULL;
607 type->vtbl = &d3d10_effect_type_vtbl;
608 type->id = offset;
609 type->effect = effect;
610 hr = parse_fx10_type(type, data + offset, data);
611 if (FAILED(hr))
613 ERR("Failed to parse type info, hr %#x.\n", hr);
614 HeapFree(GetProcessHeap(), 0, type);
615 return NULL;
618 if (wine_rb_put(&effect->types, &offset, &type->entry) == -1)
620 ERR("Failed to insert type entry.\n");
621 HeapFree(GetProcessHeap(), 0, type);
622 return NULL;
625 return type;
628 static void set_variable_vtbl(struct d3d10_effect_variable *v)
630 switch (v->type->type_class)
632 case D3D10_SVC_SCALAR:
633 v->vtbl = (ID3D10EffectVariableVtbl *)&d3d10_effect_scalar_variable_vtbl;
634 break;
636 case D3D10_SVC_VECTOR:
637 v->vtbl = (ID3D10EffectVariableVtbl *)&d3d10_effect_vector_variable_vtbl;
638 break;
640 case D3D10_SVC_MATRIX_ROWS:
641 case D3D10_SVC_MATRIX_COLUMNS:
642 v->vtbl = (ID3D10EffectVariableVtbl *)&d3d10_effect_matrix_variable_vtbl;
643 break;
645 case D3D10_SVC_STRUCT:
646 v->vtbl = &d3d10_effect_variable_vtbl;
647 break;
649 case D3D10_SVC_OBJECT:
650 switch(v->type->basetype)
652 case D3D10_SVT_STRING:
653 v->vtbl = (ID3D10EffectVariableVtbl *)&d3d10_effect_string_variable_vtbl;
654 break;
656 case D3D10_SVT_TEXTURE1D:
657 case D3D10_SVT_TEXTURE1DARRAY:
658 case D3D10_SVT_TEXTURE2D:
659 case D3D10_SVT_TEXTURE2DARRAY:
660 case D3D10_SVT_TEXTURE2DMS:
661 case D3D10_SVT_TEXTURE2DMSARRAY:
662 case D3D10_SVT_TEXTURE3D:
663 case D3D10_SVT_TEXTURECUBE:
664 v->vtbl = (ID3D10EffectVariableVtbl *)&d3d10_effect_shader_resource_variable_vtbl;
665 break;
667 case D3D10_SVT_RENDERTARGETVIEW:
668 v->vtbl = (ID3D10EffectVariableVtbl *)&d3d10_effect_render_target_view_variable_vtbl;
669 break;
671 case D3D10_SVT_DEPTHSTENCILVIEW:
672 v->vtbl = (ID3D10EffectVariableVtbl *)&d3d10_effect_depth_stencil_view_variable_vtbl;
673 break;
675 case D3D10_SVT_DEPTHSTENCIL:
676 v->vtbl = (ID3D10EffectVariableVtbl *)&d3d10_effect_depth_stencil_variable_vtbl;
677 break;
679 case D3D10_SVT_VERTEXSHADER:
680 case D3D10_SVT_GEOMETRYSHADER:
681 case D3D10_SVT_PIXELSHADER:
682 v->vtbl = (ID3D10EffectVariableVtbl *)&d3d10_effect_shader_variable_vtbl;
683 break;
685 case D3D10_SVT_BLEND:
686 v->vtbl = (ID3D10EffectVariableVtbl *)&d3d10_effect_blend_variable_vtbl;
687 break;
689 case D3D10_SVT_RASTERIZER:
690 v->vtbl = (ID3D10EffectVariableVtbl *)&d3d10_effect_rasterizer_variable_vtbl;
691 break;
693 case D3D10_SVT_SAMPLER:
694 v->vtbl = (ID3D10EffectVariableVtbl *)&d3d10_effect_sampler_variable_vtbl;
695 break;
697 default:
698 FIXME("Unhandled basetype %s.\n", debug_d3d10_shader_variable_type(v->type->basetype));
699 v->vtbl = &d3d10_effect_variable_vtbl;
700 break;
702 break;
704 default:
705 FIXME("Unhandled type class %s.\n", debug_d3d10_shader_variable_class(v->type->type_class));
706 v->vtbl = &d3d10_effect_variable_vtbl;
707 break;
711 static HRESULT copy_variableinfo_from_type(struct d3d10_effect_variable *v)
713 unsigned int i;
714 HRESULT hr;
716 if (v->type->member_count)
718 v->members = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, v->type->member_count * sizeof(*v->members));
719 if (!v->members)
721 ERR("Failed to allocate members memory.\n");
722 return E_OUTOFMEMORY;
725 for (i = 0; i < v->type->member_count; ++i)
727 struct d3d10_effect_variable *var = &v->members[i];
728 struct d3d10_effect_type_member *typem = &v->type->members[i];
730 var->buffer = v->buffer;
731 var->effect = v->effect;
732 var->type = typem->type;
733 set_variable_vtbl(var);
735 if (!copy_name(typem->name, &var->name))
737 ERR("Failed to copy name.\n");
738 return E_OUTOFMEMORY;
740 TRACE("Variable name: %s.\n", debugstr_a(var->name));
742 if (!copy_name(typem->semantic, &var->semantic))
744 ERR("Failed to copy name.\n");
745 return E_OUTOFMEMORY;
747 TRACE("Variable semantic: %s.\n", debugstr_a(var->semantic));
749 var->buffer_offset = v->buffer_offset + typem->buffer_offset;
750 TRACE("Variable buffer offset: %u.\n", var->buffer_offset);
752 hr = copy_variableinfo_from_type(var);
753 if (FAILED(hr)) return hr;
757 if (v->type->element_count)
759 unsigned int bufferoffset = v->buffer_offset;
761 v->elements = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, v->type->element_count * sizeof(*v->elements));
762 if (!v->elements)
764 ERR("Failed to allocate elements memory.\n");
765 return E_OUTOFMEMORY;
768 for (i = 0; i < v->type->element_count; ++i)
770 struct d3d10_effect_variable *var = &v->elements[i];
772 var->buffer = v->buffer;
773 var->effect = v->effect;
774 var->type = v->type->elementtype;
775 set_variable_vtbl(var);
777 if (!copy_name(v->name, &var->name))
779 ERR("Failed to copy name.\n");
780 return E_OUTOFMEMORY;
782 TRACE("Variable name: %s.\n", debugstr_a(var->name));
784 if (!copy_name(v->semantic, &var->semantic))
786 ERR("Failed to copy name.\n");
787 return E_OUTOFMEMORY;
789 TRACE("Variable semantic: %s.\n", debugstr_a(var->semantic));
791 if (i != 0)
793 bufferoffset += v->type->stride;
795 var->buffer_offset = bufferoffset;
796 TRACE("Variable buffer offset: %u.\n", var->buffer_offset);
798 hr = copy_variableinfo_from_type(var);
799 if (FAILED(hr)) return hr;
803 return S_OK;
806 static HRESULT parse_fx10_variable_head(struct d3d10_effect_variable *v, const char **ptr, const char *data)
808 DWORD offset;
810 read_dword(ptr, &offset);
811 TRACE("Variable name at offset %#x.\n", offset);
813 if (!copy_name(data + offset, &v->name))
815 ERR("Failed to copy name.\n");
816 return E_OUTOFMEMORY;
818 TRACE("Variable name: %s.\n", debugstr_a(v->name));
820 read_dword(ptr, &offset);
821 TRACE("Variable type info at offset %#x.\n", offset);
823 v->type = get_fx10_type(v->effect, data, offset);
824 if (!v->type)
826 ERR("Failed to get variable type.\n");
827 return E_FAIL;
829 set_variable_vtbl(v);
831 return copy_variableinfo_from_type(v);
834 static HRESULT parse_fx10_annotation(struct d3d10_effect_variable *a, const char **ptr, const char *data)
836 HRESULT hr;
838 hr = parse_fx10_variable_head(a, ptr, data);
839 if (FAILED(hr)) return hr;
841 skip_dword_unknown(ptr, 1);
843 /* mark the variable as annotation */
844 a->flag = D3D10_EFFECT_VARIABLE_ANNOTATION;
846 return S_OK;
849 static HRESULT parse_fx10_anonymous_shader(struct d3d10_effect *e, struct d3d10_effect_anonymous_shader *s,
850 enum d3d10_effect_object_type otype)
852 struct d3d10_effect_variable *v = &s->shader;
853 struct d3d10_effect_type *t = &s->type;
854 const char *shader = NULL;
856 switch (otype)
858 case D3D10_EOT_VERTEXSHADER:
859 shader = "vertexshader";
860 t->basetype = D3D10_SVT_VERTEXSHADER;
861 break;
863 case D3D10_EOT_PIXELSHADER:
864 shader = "pixelshader";
865 t->basetype = D3D10_SVT_PIXELSHADER;
866 break;
868 case D3D10_EOT_GEOMETRYSHADER:
869 shader = "geometryshader";
870 t->basetype = D3D10_SVT_GEOMETRYSHADER;
871 break;
874 if (!copy_name(shader, &t->name))
876 ERR("Failed to copy name.\n");
877 return E_OUTOFMEMORY;
879 TRACE("Type name: %s.\n", debugstr_a(t->name));
881 t->type_class = D3D10_SVC_OBJECT;
883 t->vtbl = &d3d10_effect_type_vtbl;
885 v->type = t;
886 v->effect = e;
887 set_variable_vtbl(v);
889 if (!copy_name("$Anonymous", &v->name))
891 ERR("Failed to copy semantic.\n");
892 return E_OUTOFMEMORY;
894 TRACE("Variable name: %s.\n", debugstr_a(v->name));
896 if (!copy_name(NULL, &v->semantic))
898 ERR("Failed to copy semantic.\n");
899 return E_OUTOFMEMORY;
901 TRACE("Variable semantic: %s.\n", debugstr_a(v->semantic));
903 return S_OK;
906 static HRESULT parse_fx10_object(struct d3d10_effect_object *o, const char **ptr, const char *data)
908 const char *data_ptr = NULL;
909 DWORD offset, index;
910 enum d3d10_effect_object_operation operation;
911 HRESULT hr;
912 struct d3d10_effect *effect = o->pass->technique->effect;
914 read_dword(ptr, &o->type);
915 TRACE("Effect object is of type %#x.\n", o->type);
917 read_dword(ptr, &index);
918 TRACE("Effect object index %#x.\n", index);
920 read_dword(ptr, &operation);
921 TRACE("Effect object operation %#x.\n", operation);
923 read_dword(ptr, &offset);
924 TRACE("Effect object idx is at offset %#x.\n", offset);
926 switch(operation)
928 case D3D10_EOO_VALUE:
929 TRACE("Copy variable values\n");
930 hr = E_FAIL;
932 switch (o->type)
934 case D3D10_EOT_VERTEXSHADER:
935 TRACE("Vertex shader\n");
936 o->data = &anonymous_vs;
937 hr = S_OK;
938 break;
940 case D3D10_EOT_PIXELSHADER:
941 TRACE("Pixel shader\n");
942 o->data = &anonymous_ps;
943 hr = S_OK;
944 break;
946 case D3D10_EOT_GEOMETRYSHADER:
947 TRACE("Geometry shader\n");
948 o->data = &anonymous_gs;
949 hr = S_OK;
950 break;
952 default:
953 FIXME("Unhandled object type %#x\n", o->type);
954 hr = E_FAIL;
955 break;
957 break;
959 case D3D10_EOO_ANONYMOUS_SHADER:
960 TRACE("Anonymous shader\n");
962 /* check anonymous_shader_current for validity */
963 if (effect->anonymous_shader_current >= effect->anonymous_shader_count)
965 ERR("Anonymous shader count is wrong!\n");
966 return E_FAIL;
969 data_ptr = data + offset;
970 read_dword(&data_ptr, &offset);
971 TRACE("Effect object starts at offset %#x.\n", offset);
973 data_ptr = data + offset;
975 hr = parse_fx10_anonymous_shader(effect, &effect->anonymous_shaders[effect->anonymous_shader_current], o->type);
976 if (FAILED(hr)) return hr;
978 o->data = &effect->anonymous_shaders[effect->anonymous_shader_current].shader;
979 ++effect->anonymous_shader_current;
981 switch (o->type)
983 case D3D10_EOT_VERTEXSHADER:
984 TRACE("Vertex shader\n");
985 hr = parse_shader(o->data, data_ptr);
986 break;
988 case D3D10_EOT_PIXELSHADER:
989 TRACE("Pixel shader\n");
990 hr = parse_shader(o->data, data_ptr);
991 break;
993 case D3D10_EOT_GEOMETRYSHADER:
994 TRACE("Geometry shader\n");
995 hr = parse_shader(o->data, data_ptr);
996 break;
998 default:
999 FIXME("Unhandled object type %#x\n", o->type);
1000 hr = E_FAIL;
1001 break;
1003 break;
1005 default:
1006 hr = E_FAIL;
1007 FIXME("Unhandled operation %#x.\n", operation);
1008 break;
1011 return hr;
1014 static HRESULT parse_fx10_pass(struct d3d10_effect_pass *p, const char **ptr, const char *data)
1016 HRESULT hr = S_OK;
1017 unsigned int i;
1018 DWORD offset;
1020 read_dword(ptr, &offset);
1021 TRACE("Pass name at offset %#x.\n", offset);
1023 if (!copy_name(data + offset, &p->name))
1025 ERR("Failed to copy name.\n");
1026 return E_OUTOFMEMORY;
1028 TRACE("Pass name: %s.\n", debugstr_a(p->name));
1030 read_dword(ptr, &p->object_count);
1031 TRACE("Pass has %u effect objects.\n", p->object_count);
1033 read_dword(ptr, &p->annotation_count);
1034 TRACE("Pass has %u annotations.\n", p->annotation_count);
1036 p->annotations = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, p->annotation_count * sizeof(*p->annotations));
1037 if (!p->annotations)
1039 ERR("Failed to allocate pass annotations memory.\n");
1040 return E_OUTOFMEMORY;
1043 for (i = 0; i < p->annotation_count; ++i)
1045 struct d3d10_effect_variable *a = &p->annotations[i];
1047 a->effect = p->technique->effect;
1048 a->buffer = &null_local_buffer;
1050 hr = parse_fx10_annotation(a, ptr, data);
1051 if (FAILED(hr)) return hr;
1054 p->objects = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, p->object_count * sizeof(*p->objects));
1055 if (!p->objects)
1057 ERR("Failed to allocate effect objects memory.\n");
1058 return E_OUTOFMEMORY;
1061 for (i = 0; i < p->object_count; ++i)
1063 struct d3d10_effect_object *o = &p->objects[i];
1065 o->pass = p;
1067 hr = parse_fx10_object(o, ptr, data);
1068 if (FAILED(hr)) return hr;
1071 return hr;
1074 static HRESULT parse_fx10_technique(struct d3d10_effect_technique *t, const char **ptr, const char *data)
1076 unsigned int i;
1077 DWORD offset;
1078 HRESULT hr;
1080 read_dword(ptr, &offset);
1081 TRACE("Technique name at offset %#x.\n", offset);
1083 if (!copy_name(data + offset, &t->name))
1085 ERR("Failed to copy name.\n");
1086 return E_OUTOFMEMORY;
1088 TRACE("Technique name: %s.\n", debugstr_a(t->name));
1090 read_dword(ptr, &t->pass_count);
1091 TRACE("Technique has %u passes\n", t->pass_count);
1093 read_dword(ptr, &t->annotation_count);
1094 TRACE("Technique has %u annotations.\n", t->annotation_count);
1096 t->annotations = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, t->annotation_count * sizeof(*t->annotations));
1097 if (!t->annotations)
1099 ERR("Failed to allocate technique annotations memory.\n");
1100 return E_OUTOFMEMORY;
1103 for (i = 0; i < t->annotation_count; ++i)
1105 struct d3d10_effect_variable *a = &t->annotations[i];
1107 a->effect = t->effect;
1108 a->buffer = &null_local_buffer;
1110 hr = parse_fx10_annotation(a, ptr, data);
1111 if (FAILED(hr)) return hr;
1114 t->passes = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, t->pass_count * sizeof(*t->passes));
1115 if (!t->passes)
1117 ERR("Failed to allocate passes memory\n");
1118 return E_OUTOFMEMORY;
1121 for (i = 0; i < t->pass_count; ++i)
1123 struct d3d10_effect_pass *p = &t->passes[i];
1125 p->vtbl = &d3d10_effect_pass_vtbl;
1126 p->technique = t;
1128 hr = parse_fx10_pass(p, ptr, data);
1129 if (FAILED(hr)) return hr;
1132 return S_OK;
1135 static HRESULT parse_fx10_variable(struct d3d10_effect_variable *v, const char **ptr, const char *data)
1137 DWORD offset;
1138 unsigned int i;
1139 HRESULT hr;
1141 hr = parse_fx10_variable_head(v, ptr, data);
1142 if (FAILED(hr)) return hr;
1144 read_dword(ptr, &offset);
1145 TRACE("Variable semantic at offset %#x.\n", offset);
1147 if (!copy_name(data + offset, &v->semantic))
1149 ERR("Failed to copy semantic.\n");
1150 return E_OUTOFMEMORY;
1152 TRACE("Variable semantic: %s.\n", debugstr_a(v->semantic));
1154 read_dword(ptr, &v->buffer_offset);
1155 TRACE("Variable offset in buffer: %#x.\n", v->buffer_offset);
1157 skip_dword_unknown(ptr, 1);
1159 read_dword(ptr, &v->flag);
1160 TRACE("Variable flag: %#x.\n", v->flag);
1162 read_dword(ptr, &v->annotation_count);
1163 TRACE("Variable has %u annotations.\n", v->annotation_count);
1165 v->annotations = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, v->annotation_count * sizeof(*v->annotations));
1166 if (!v->annotations)
1168 ERR("Failed to allocate variable annotations memory.\n");
1169 return E_OUTOFMEMORY;
1172 for (i = 0; i < v->annotation_count; ++i)
1174 struct d3d10_effect_variable *a = &v->annotations[i];
1176 a->effect = v->effect;
1177 a->buffer = &null_local_buffer;
1179 hr = parse_fx10_annotation(a, ptr, data);
1180 if (FAILED(hr)) return hr;
1183 return S_OK;
1186 static HRESULT parse_fx10_local_variable(struct d3d10_effect_variable *v, const char **ptr, const char *data)
1188 unsigned int i;
1189 HRESULT hr;
1191 hr = parse_fx10_variable_head(v, ptr, data);
1192 if (FAILED(hr)) return hr;
1194 skip_dword_unknown(ptr, 2);
1196 switch (v->type->basetype)
1198 case D3D10_SVT_TEXTURE1D:
1199 case D3D10_SVT_TEXTURE1DARRAY:
1200 case D3D10_SVT_TEXTURE2D:
1201 case D3D10_SVT_TEXTURE2DARRAY:
1202 case D3D10_SVT_TEXTURE2DMS:
1203 case D3D10_SVT_TEXTURE2DMSARRAY:
1204 case D3D10_SVT_TEXTURE3D:
1205 case D3D10_SVT_TEXTURECUBE:
1206 case D3D10_SVT_RENDERTARGETVIEW:
1207 case D3D10_SVT_DEPTHSTENCILVIEW:
1208 TRACE("SVT could not have elements.\n");
1209 break;
1211 case D3D10_SVT_VERTEXSHADER:
1212 case D3D10_SVT_PIXELSHADER:
1213 case D3D10_SVT_GEOMETRYSHADER:
1214 TRACE("Shader type is %s\n", debug_d3d10_shader_variable_type(v->type->basetype));
1215 for (i = 0; i < max(v->type->element_count, 1); ++i)
1217 DWORD shader_offset;
1218 struct d3d10_effect_variable *var;
1220 if (!v->type->element_count)
1222 var = v;
1224 else
1226 var = &v->elements[i];
1229 read_dword(ptr, &shader_offset);
1230 TRACE("Shader offset: %#x.\n", shader_offset);
1232 hr = parse_shader(var, data + shader_offset);
1233 if (FAILED(hr)) return hr;
1235 break;
1237 case D3D10_SVT_DEPTHSTENCIL:
1238 case D3D10_SVT_BLEND:
1239 case D3D10_SVT_RASTERIZER:
1240 case D3D10_SVT_SAMPLER:
1241 TRACE("SVT is a state.\n");
1242 for (i = 0; i < max(v->type->element_count, 1); ++i)
1244 unsigned int j;
1245 DWORD object_count;
1247 read_dword(ptr, &object_count);
1248 TRACE("Object count: %#x.\n", object_count);
1250 for (j = 0; j < object_count; ++j)
1252 skip_dword_unknown(ptr, 4);
1255 break;
1257 default:
1258 FIXME("Unhandled case %s.\n", debug_d3d10_shader_variable_type(v->type->basetype));
1259 return E_FAIL;
1262 read_dword(ptr, &v->annotation_count);
1263 TRACE("Variable has %u annotations.\n", v->annotation_count);
1265 v->annotations = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, v->annotation_count * sizeof(*v->annotations));
1266 if (!v->annotations)
1268 ERR("Failed to allocate variable annotations memory.\n");
1269 return E_OUTOFMEMORY;
1272 for (i = 0; i < v->annotation_count; ++i)
1274 struct d3d10_effect_variable *a = &v->annotations[i];
1276 a->effect = v->effect;
1277 a->buffer = &null_local_buffer;
1279 hr = parse_fx10_annotation(a, ptr, data);
1280 if (FAILED(hr)) return hr;
1283 return S_OK;
1286 static HRESULT parse_fx10_local_buffer(struct d3d10_effect_variable *l, const char **ptr, const char *data)
1288 unsigned int i;
1289 DWORD offset;
1290 D3D10_CBUFFER_TYPE d3d10_cbuffer_type;
1291 HRESULT hr;
1292 unsigned int stride = 0;
1294 /* Generate our own type, it isn't in the fx blob. */
1295 l->type = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*l->type));
1296 if (!l->type)
1298 ERR("Failed to allocate local buffer type memory.\n");
1299 return E_OUTOFMEMORY;
1301 l->type->vtbl = &d3d10_effect_type_vtbl;
1302 l->type->type_class = D3D10_SVC_OBJECT;
1303 l->type->effect = l->effect;
1305 read_dword(ptr, &offset);
1306 TRACE("Local buffer name at offset %#x.\n", offset);
1308 if (!copy_name(data + offset, &l->name))
1310 ERR("Failed to copy name.\n");
1311 return E_OUTOFMEMORY;
1313 TRACE("Local buffer name: %s.\n", debugstr_a(l->name));
1315 read_dword(ptr, &l->data_size);
1316 TRACE("Local buffer data size: %#x.\n", l->data_size);
1318 read_dword(ptr, &d3d10_cbuffer_type);
1319 TRACE("Local buffer type: %#x.\n", d3d10_cbuffer_type);
1321 switch(d3d10_cbuffer_type)
1323 case D3D10_CT_CBUFFER:
1324 l->type->basetype = D3D10_SVT_CBUFFER;
1325 if (!copy_name("cbuffer", &l->type->name))
1327 ERR("Failed to copy name.\n");
1328 return E_OUTOFMEMORY;
1330 break;
1332 case D3D10_CT_TBUFFER:
1333 l->type->basetype = D3D10_SVT_TBUFFER;
1334 if (!copy_name("tbuffer", &l->type->name))
1336 ERR("Failed to copy name.\n");
1337 return E_OUTOFMEMORY;
1339 break;
1341 default:
1342 ERR("Unexpected D3D10_CBUFFER_TYPE %#x!\n", d3d10_cbuffer_type);
1343 return E_FAIL;
1346 read_dword(ptr, &l->type->member_count);
1347 TRACE("Local buffer member count: %#x.\n", l->type->member_count);
1349 skip_dword_unknown(ptr, 1);
1351 read_dword(ptr, &l->annotation_count);
1352 TRACE("Local buffer has %u annotations.\n", l->annotation_count);
1354 l->annotations = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, l->annotation_count * sizeof(*l->annotations));
1355 if (!l->annotations)
1357 ERR("Failed to allocate local buffer annotations memory.\n");
1358 return E_OUTOFMEMORY;
1361 for (i = 0; i < l->annotation_count; ++i)
1363 struct d3d10_effect_variable *a = &l->annotations[i];
1365 a->effect = l->effect;
1366 a->buffer = &null_local_buffer;
1368 hr = parse_fx10_annotation(a, ptr, data);
1369 if (FAILED(hr)) return hr;
1372 l->members = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, l->type->member_count * sizeof(*l->members));
1373 if (!l->members)
1375 ERR("Failed to allocate members memory.\n");
1376 return E_OUTOFMEMORY;
1379 l->type->members = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, l->type->member_count * sizeof(*l->type->members));
1380 if (!l->type->members)
1382 ERR("Failed to allocate type members memory.\n");
1383 return E_OUTOFMEMORY;
1386 for (i = 0; i < l->type->member_count; ++i)
1388 struct d3d10_effect_variable *v = &l->members[i];
1389 struct d3d10_effect_type_member *typem = &l->type->members[i];
1391 v->buffer = l;
1392 v->effect = l->effect;
1394 hr = parse_fx10_variable(v, ptr, data);
1395 if (FAILED(hr)) return hr;
1398 * Copy the values from the variable type to the constant buffers type
1399 * members structure, because it is our own generated type.
1401 typem->type = v->type;
1403 if (!copy_name(v->name, &typem->name))
1405 ERR("Failed to copy name.\n");
1406 return E_OUTOFMEMORY;
1408 TRACE("Variable name: %s.\n", debugstr_a(typem->name));
1410 if (!copy_name(v->semantic, &typem->semantic))
1412 ERR("Failed to copy name.\n");
1413 return E_OUTOFMEMORY;
1415 TRACE("Variable semantic: %s.\n", debugstr_a(typem->semantic));
1417 typem->buffer_offset = v->buffer_offset;
1418 TRACE("Variable buffer offset: %u.\n", typem->buffer_offset);
1420 l->type->size_packed += v->type->size_packed;
1423 * For the complete constantbuffer the size_unpacked = stride,
1424 * the stride is calculated like this:
1426 * 1) if the constant buffer variables are packed with packoffset
1427 * - stride = the highest used constant
1428 * - the complete stride has to be a multiple of 0x10
1430 * 2) if the constant buffer variables are NOT packed with packoffset
1431 * - sum of unpacked size for all variables which fit in a 0x10 part
1432 * - if the size exceeds a 0x10 part, the rest of the old part is skipped
1433 * and a new part is started
1434 * - if the variable is a struct it is always used a new part
1435 * - the complete stride has to be a multiple of 0x10
1437 * e.g.:
1438 * 0x4, 0x4, 0x4, 0x8, 0x4, 0x14, 0x4
1439 * part 0x10 0x10 0x20 -> 0x40
1441 if (v->flag & D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT)
1443 if ((v->type->size_unpacked + v->buffer_offset) > stride)
1445 stride = v->type->size_unpacked + v->buffer_offset;
1448 else
1450 if (v->type->type_class == D3D10_SVC_STRUCT)
1452 stride = (stride + 0xf) & ~0xf;
1455 if ( ((stride & 0xf) + v->type->size_unpacked) > 0x10)
1457 stride = (stride + 0xf) & ~0xf;
1460 stride += v->type->size_unpacked;
1463 l->type->stride = l->type->size_unpacked = (stride + 0xf) & ~0xf;
1465 TRACE("Constant buffer:\n");
1466 TRACE("\tType name: %s.\n", debugstr_a(l->type->name));
1467 TRACE("\tElement count: %u.\n", l->type->element_count);
1468 TRACE("\tMember count: %u.\n", l->type->member_count);
1469 TRACE("\tUnpacked size: %#x.\n", l->type->size_unpacked);
1470 TRACE("\tStride: %#x.\n", l->type->stride);
1471 TRACE("\tPacked size %#x.\n", l->type->size_packed);
1472 TRACE("\tBasetype: %s.\n", debug_d3d10_shader_variable_type(l->type->basetype));
1473 TRACE("\tTypeclass: %s.\n", debug_d3d10_shader_variable_class(l->type->type_class));
1475 return S_OK;
1478 static int d3d10_effect_type_compare(const void *key, const struct wine_rb_entry *entry)
1480 const struct d3d10_effect_type *t = WINE_RB_ENTRY_VALUE(entry, const struct d3d10_effect_type, entry);
1481 const DWORD *id = key;
1483 return *id - t->id;
1486 static void d3d10_effect_type_member_destroy(struct d3d10_effect_type_member *typem)
1488 TRACE("effect type member %p.\n", typem);
1490 /* Do not release typem->type, it will be covered by d3d10_effect_type_destroy(). */
1491 HeapFree(GetProcessHeap(), 0, typem->semantic);
1492 HeapFree(GetProcessHeap(), 0, typem->name);
1495 static void d3d10_effect_type_destroy(struct wine_rb_entry *entry, void *context)
1497 struct d3d10_effect_type *t = WINE_RB_ENTRY_VALUE(entry, struct d3d10_effect_type, entry);
1499 TRACE("effect type %p.\n", t);
1501 if (t->elementtype)
1503 HeapFree(GetProcessHeap(), 0, t->elementtype->name);
1504 HeapFree(GetProcessHeap(), 0, t->elementtype);
1507 if (t->members)
1509 unsigned int i;
1511 for (i = 0; i < t->member_count; ++i)
1513 d3d10_effect_type_member_destroy(&t->members[i]);
1515 HeapFree(GetProcessHeap(), 0, t->members);
1518 HeapFree(GetProcessHeap(), 0, t->name);
1519 HeapFree(GetProcessHeap(), 0, t);
1522 static const struct wine_rb_functions d3d10_effect_type_rb_functions =
1524 d3d10_rb_alloc,
1525 d3d10_rb_realloc,
1526 d3d10_rb_free,
1527 d3d10_effect_type_compare,
1530 static HRESULT parse_fx10_body(struct d3d10_effect *e, const char *data, DWORD data_size)
1532 const char *ptr = data + e->index_offset;
1533 unsigned int i;
1534 HRESULT hr;
1536 if (wine_rb_init(&e->types, &d3d10_effect_type_rb_functions) == -1)
1538 ERR("Failed to initialize type rbtree.\n");
1539 return E_FAIL;
1542 e->local_buffers = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, e->local_buffer_count * sizeof(*e->local_buffers));
1543 if (!e->local_buffers)
1545 ERR("Failed to allocate local buffer memory.\n");
1546 return E_OUTOFMEMORY;
1549 e->local_variables = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, e->local_variable_count * sizeof(*e->local_variables));
1550 if (!e->local_variables)
1552 ERR("Failed to allocate local variable memory.\n");
1553 return E_OUTOFMEMORY;
1556 e->anonymous_shaders = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, e->anonymous_shader_count * sizeof(*e->anonymous_shaders));
1557 if (!e->anonymous_shaders)
1559 ERR("Failed to allocate techniques memory\n");
1560 return E_OUTOFMEMORY;
1563 e->techniques = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, e->technique_count * sizeof(*e->techniques));
1564 if (!e->techniques)
1566 ERR("Failed to allocate techniques memory\n");
1567 return E_OUTOFMEMORY;
1570 for (i = 0; i < e->local_buffer_count; ++i)
1572 struct d3d10_effect_variable *l = &e->local_buffers[i];
1573 l->vtbl = (ID3D10EffectVariableVtbl *)&d3d10_effect_constant_buffer_vtbl;
1574 l->effect = e;
1575 l->buffer = &null_local_buffer;
1577 hr = parse_fx10_local_buffer(l, &ptr, data);
1578 if (FAILED(hr)) return hr;
1581 for (i = 0; i < e->local_variable_count; ++i)
1583 struct d3d10_effect_variable *v = &e->local_variables[i];
1585 v->effect = e;
1586 v->vtbl = &d3d10_effect_variable_vtbl;
1587 v->buffer = &null_local_buffer;
1589 hr = parse_fx10_local_variable(v, &ptr, data);
1590 if (FAILED(hr)) return hr;
1593 for (i = 0; i < e->technique_count; ++i)
1595 struct d3d10_effect_technique *t = &e->techniques[i];
1597 t->vtbl = &d3d10_effect_technique_vtbl;
1598 t->effect = e;
1600 hr = parse_fx10_technique(t, &ptr, data);
1601 if (FAILED(hr)) return hr;
1604 return S_OK;
1607 static HRESULT parse_fx10(struct d3d10_effect *e, const char *data, DWORD data_size)
1609 const char *ptr = data;
1610 DWORD unknown;
1612 /* Compiled target version (e.g. fx_4_0=0xfeff1001, fx_4_1=0xfeff1011). */
1613 read_dword(&ptr, &e->version);
1614 TRACE("Target: %#x\n", e->version);
1616 read_dword(&ptr, &e->local_buffer_count);
1617 TRACE("Local buffer count: %u.\n", e->local_buffer_count);
1619 read_dword(&ptr, &e->variable_count);
1620 TRACE("Variable count: %u\n", e->variable_count);
1622 read_dword(&ptr, &e->local_variable_count);
1623 TRACE("Object count: %u\n", e->local_variable_count);
1625 read_dword(&ptr, &e->sharedbuffers_count);
1626 TRACE("Sharedbuffers count: %u\n", e->sharedbuffers_count);
1628 /* Number of variables in shared buffers? */
1629 read_dword(&ptr, &unknown);
1630 FIXME("Unknown 0: %u\n", unknown);
1632 read_dword(&ptr, &e->sharedobjects_count);
1633 TRACE("Sharedobjects count: %u\n", e->sharedobjects_count);
1635 read_dword(&ptr, &e->technique_count);
1636 TRACE("Technique count: %u\n", e->technique_count);
1638 read_dword(&ptr, &e->index_offset);
1639 TRACE("Index offset: %#x\n", e->index_offset);
1641 read_dword(&ptr, &unknown);
1642 FIXME("Unknown 1: %u\n", unknown);
1644 read_dword(&ptr, &e->texture_count);
1645 TRACE("Texture count: %u\n", e->texture_count);
1647 read_dword(&ptr, &e->dephstencilstate_count);
1648 TRACE("Depthstencilstate count: %u\n", e->dephstencilstate_count);
1650 read_dword(&ptr, &e->blendstate_count);
1651 TRACE("Blendstate count: %u\n", e->blendstate_count);
1653 read_dword(&ptr, &e->rasterizerstate_count);
1654 TRACE("Rasterizerstate count: %u\n", e->rasterizerstate_count);
1656 read_dword(&ptr, &e->samplerstate_count);
1657 TRACE("Samplerstate count: %u\n", e->samplerstate_count);
1659 read_dword(&ptr, &e->rendertargetview_count);
1660 TRACE("Rendertargetview count: %u\n", e->rendertargetview_count);
1662 read_dword(&ptr, &e->depthstencilview_count);
1663 TRACE("Depthstencilview count: %u\n", e->depthstencilview_count);
1665 read_dword(&ptr, &e->shader_call_count);
1666 TRACE("Shader call count: %u\n", e->shader_call_count);
1668 read_dword(&ptr, &e->anonymous_shader_count);
1669 TRACE("Anonymous shader count: %u\n", e->anonymous_shader_count);
1671 return parse_fx10_body(e, ptr, data_size - (ptr - data));
1674 static HRESULT fx10_chunk_handler(const char *data, DWORD data_size, DWORD tag, void *ctx)
1676 struct d3d10_effect *e = ctx;
1678 TRACE("tag: %s.\n", debugstr_an((const char *)&tag, 4));
1680 TRACE("chunk size: %#x\n", data_size);
1682 switch(tag)
1684 case TAG_FX10:
1685 return parse_fx10(e, data, data_size);
1687 default:
1688 FIXME("Unhandled chunk %s.\n", debugstr_an((const char *)&tag, 4));
1689 return S_OK;
1693 HRESULT d3d10_effect_parse(struct d3d10_effect *This, const void *data, SIZE_T data_size)
1695 return parse_dxbc(data, data_size, fx10_chunk_handler, This);
1698 static HRESULT d3d10_effect_object_apply(struct d3d10_effect_object *o)
1700 ID3D10Device *device = o->pass->technique->effect->device;
1701 struct d3d10_effect_variable *v = (struct d3d10_effect_variable*) o->data;
1703 TRACE("effect object %p, type %#x.\n", o, o->type);
1705 switch(o->type)
1707 case D3D10_EOT_VERTEXSHADER:
1708 ID3D10Device_VSSetShader(device, ((struct d3d10_effect_shader_variable *)v->data)->shader.vs);
1709 return S_OK;
1711 case D3D10_EOT_PIXELSHADER:
1712 ID3D10Device_PSSetShader(device, ((struct d3d10_effect_shader_variable *)v->data)->shader.ps);
1713 return S_OK;
1715 case D3D10_EOT_GEOMETRYSHADER:
1716 ID3D10Device_GSSetShader(device, ((struct d3d10_effect_shader_variable *)v->data)->shader.gs);
1717 return S_OK;
1719 default:
1720 FIXME("Unhandled effect object type %#x.\n", o->type);
1721 return E_FAIL;
1725 static void d3d10_effect_variable_destroy(struct d3d10_effect_variable *v)
1727 unsigned int i;
1729 TRACE("variable %p.\n", v);
1731 HeapFree(GetProcessHeap(), 0, v->name);
1732 HeapFree(GetProcessHeap(), 0, v->semantic);
1733 if (v->annotations)
1735 for (i = 0; i < v->annotation_count; ++i)
1737 d3d10_effect_variable_destroy(&v->annotations[i]);
1739 HeapFree(GetProcessHeap(), 0, v->annotations);
1742 if (v->members)
1744 for (i = 0; i < v->type->member_count; ++i)
1746 d3d10_effect_variable_destroy(&v->members[i]);
1748 HeapFree(GetProcessHeap(), 0, v->members);
1751 if (v->elements)
1753 for (i = 0; i < v->type->element_count; ++i)
1755 d3d10_effect_variable_destroy(&v->elements[i]);
1757 HeapFree(GetProcessHeap(), 0, v->elements);
1760 if (v->data)
1762 switch(v->type->basetype)
1764 case D3D10_SVT_VERTEXSHADER:
1765 case D3D10_SVT_PIXELSHADER:
1766 case D3D10_SVT_GEOMETRYSHADER:
1767 HeapFree(GetProcessHeap(), 0, ((struct d3d10_effect_shader_variable *)v->data)->input_signature);
1768 break;
1770 default:
1771 break;
1773 HeapFree(GetProcessHeap(), 0, v->data);
1777 static void d3d10_effect_pass_destroy(struct d3d10_effect_pass *p)
1779 unsigned int i;
1781 TRACE("pass %p\n", p);
1783 HeapFree(GetProcessHeap(), 0, p->name);
1784 HeapFree(GetProcessHeap(), 0, p->objects);
1786 if (p->annotations)
1788 for (i = 0; i < p->annotation_count; ++i)
1790 d3d10_effect_variable_destroy(&p->annotations[i]);
1792 HeapFree(GetProcessHeap(), 0, p->annotations);
1796 static void d3d10_effect_technique_destroy(struct d3d10_effect_technique *t)
1798 unsigned int i;
1800 TRACE("technique %p\n", t);
1802 HeapFree(GetProcessHeap(), 0, t->name);
1803 if (t->passes)
1805 for (i = 0; i < t->pass_count; ++i)
1807 d3d10_effect_pass_destroy(&t->passes[i]);
1809 HeapFree(GetProcessHeap(), 0, t->passes);
1812 if (t->annotations)
1814 for (i = 0; i < t->annotation_count; ++i)
1816 d3d10_effect_variable_destroy(&t->annotations[i]);
1818 HeapFree(GetProcessHeap(), 0, t->annotations);
1822 static void d3d10_effect_local_buffer_destroy(struct d3d10_effect_variable *l)
1824 unsigned int i;
1826 TRACE("local buffer %p.\n", l);
1828 HeapFree(GetProcessHeap(), 0, l->name);
1829 if (l->members)
1831 for (i = 0; i < l->type->member_count; ++i)
1833 d3d10_effect_variable_destroy(&l->members[i]);
1835 HeapFree(GetProcessHeap(), 0, l->members);
1838 if (l->type->members)
1840 for (i = 0; i < l->type->member_count; ++i)
1842 /* Do not release l->type->members[i].type, it will be covered by d3d10_effect_type_destroy(). */
1843 HeapFree(GetProcessHeap(), 0, l->type->members[i].semantic);
1844 HeapFree(GetProcessHeap(), 0, l->type->members[i].name);
1846 HeapFree(GetProcessHeap(), 0, l->type->members);
1848 HeapFree(GetProcessHeap(), 0, l->type->name);
1849 HeapFree(GetProcessHeap(), 0, l->type);
1851 if (l->annotations)
1853 for (i = 0; i < l->annotation_count; ++i)
1855 d3d10_effect_variable_destroy(&l->annotations[i]);
1857 HeapFree(GetProcessHeap(), 0, l->annotations);
1861 /* IUnknown methods */
1863 static HRESULT STDMETHODCALLTYPE d3d10_effect_QueryInterface(ID3D10Effect *iface, REFIID riid, void **object)
1865 TRACE("iface %p, riid %s, object %p\n", iface, debugstr_guid(riid), object);
1867 if (IsEqualGUID(riid, &IID_ID3D10Effect)
1868 || IsEqualGUID(riid, &IID_IUnknown))
1870 IUnknown_AddRef(iface);
1871 *object = iface;
1872 return S_OK;
1875 WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid));
1877 *object = NULL;
1878 return E_NOINTERFACE;
1881 static ULONG STDMETHODCALLTYPE d3d10_effect_AddRef(ID3D10Effect *iface)
1883 struct d3d10_effect *This = (struct d3d10_effect *)iface;
1884 ULONG refcount = InterlockedIncrement(&This->refcount);
1886 TRACE("%p increasing refcount to %u\n", This, refcount);
1888 return refcount;
1891 static ULONG STDMETHODCALLTYPE d3d10_effect_Release(ID3D10Effect *iface)
1893 struct d3d10_effect *This = (struct d3d10_effect *)iface;
1894 ULONG refcount = InterlockedDecrement(&This->refcount);
1896 TRACE("%p decreasing refcount to %u\n", This, refcount);
1898 if (!refcount)
1900 unsigned int i;
1902 if (This->techniques)
1904 for (i = 0; i < This->technique_count; ++i)
1906 d3d10_effect_technique_destroy(&This->techniques[i]);
1908 HeapFree(GetProcessHeap(), 0, This->techniques);
1911 if (This->local_variables)
1913 for (i = 0; i < This->local_variable_count; ++i)
1915 d3d10_effect_variable_destroy(&This->local_variables[i]);
1917 HeapFree(GetProcessHeap(), 0, This->local_variables);
1920 if (This->local_buffers)
1922 for (i = 0; i < This->local_buffer_count; ++i)
1924 d3d10_effect_local_buffer_destroy(&This->local_buffers[i]);
1926 HeapFree(GetProcessHeap(), 0, This->local_buffers);
1929 if (This->anonymous_shaders)
1931 for (i = 0; i < This->anonymous_shader_count; ++i)
1933 d3d10_effect_variable_destroy(&This->anonymous_shaders[i].shader);
1934 HeapFree(GetProcessHeap(), 0, &This->anonymous_shaders[i].type.name);
1936 HeapFree(GetProcessHeap(), 0, This->anonymous_shaders);
1939 wine_rb_destroy(&This->types, d3d10_effect_type_destroy, NULL);
1941 ID3D10Device_Release(This->device);
1942 HeapFree(GetProcessHeap(), 0, This);
1945 return refcount;
1948 /* ID3D10Effect methods */
1950 static BOOL STDMETHODCALLTYPE d3d10_effect_IsValid(ID3D10Effect *iface)
1952 FIXME("iface %p stub!\n", iface);
1954 return FALSE;
1957 static BOOL STDMETHODCALLTYPE d3d10_effect_IsPool(ID3D10Effect *iface)
1959 FIXME("iface %p stub!\n", iface);
1961 return FALSE;
1964 static HRESULT STDMETHODCALLTYPE d3d10_effect_GetDevice(ID3D10Effect *iface, ID3D10Device **device)
1966 struct d3d10_effect *This = (struct d3d10_effect *)iface;
1968 TRACE("iface %p, device %p\n", iface, device);
1970 ID3D10Device_AddRef(This->device);
1971 *device = This->device;
1973 return S_OK;
1976 static HRESULT STDMETHODCALLTYPE d3d10_effect_GetDesc(ID3D10Effect *iface, D3D10_EFFECT_DESC *desc)
1978 FIXME("iface %p, desc %p stub!\n", iface, desc);
1980 return E_NOTIMPL;
1983 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_GetConstantBufferByIndex(ID3D10Effect *iface,
1984 UINT index)
1986 struct d3d10_effect *This = (struct d3d10_effect *)iface;
1987 struct d3d10_effect_variable *l;
1989 TRACE("iface %p, index %u\n", iface, index);
1991 if (index >= This->local_buffer_count)
1993 WARN("Invalid index specified\n");
1994 return (ID3D10EffectConstantBuffer *)&null_local_buffer;
1997 l = &This->local_buffers[index];
1999 TRACE("Returning buffer %p, %s.\n", l, debugstr_a(l->name));
2001 return (ID3D10EffectConstantBuffer *)l;
2004 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_GetConstantBufferByName(ID3D10Effect *iface,
2005 LPCSTR name)
2007 struct d3d10_effect *This = (struct d3d10_effect *)iface;
2008 unsigned int i;
2010 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
2012 for (i = 0; i < This->local_buffer_count; ++i)
2014 struct d3d10_effect_variable *l = &This->local_buffers[i];
2016 if (!strcmp(l->name, name))
2018 TRACE("Returning buffer %p.\n", l);
2019 return (ID3D10EffectConstantBuffer *)l;
2023 WARN("Invalid name specified\n");
2025 return (ID3D10EffectConstantBuffer *)&null_local_buffer;
2028 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableByIndex(ID3D10Effect *iface, UINT index)
2030 struct d3d10_effect *This = (struct d3d10_effect *)iface;
2031 unsigned int i;
2033 TRACE("iface %p, index %u\n", iface, index);
2035 for (i = 0; i < This->local_buffer_count; ++i)
2037 struct d3d10_effect_variable *l = &This->local_buffers[i];
2039 if (index < l->type->member_count)
2041 struct d3d10_effect_variable *v = &l->members[index];
2043 TRACE("Returning variable %p.\n", v);
2044 return (ID3D10EffectVariable *)v;
2046 index -= l->type->member_count;
2049 if (index < This->local_variable_count)
2051 struct d3d10_effect_variable *v = &This->local_variables[index];
2053 TRACE("Returning variable %p.\n", v);
2054 return (ID3D10EffectVariable *)v;
2057 WARN("Invalid index specified\n");
2059 return (ID3D10EffectVariable *)&null_variable;
2062 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableByName(ID3D10Effect *iface, LPCSTR name)
2064 struct d3d10_effect *This = (struct d3d10_effect *)iface;
2065 unsigned int i;
2067 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
2069 for (i = 0; i < This->local_buffer_count; ++i)
2071 struct d3d10_effect_variable *l = &This->local_buffers[i];
2072 unsigned int j;
2074 for (j = 0; j < l->type->member_count; ++j)
2076 struct d3d10_effect_variable *v = &l->members[j];
2078 if (!strcmp(v->name, name))
2080 TRACE("Returning variable %p.\n", v);
2081 return (ID3D10EffectVariable *)v;
2086 for (i = 0; i < This->local_variable_count; ++i)
2088 struct d3d10_effect_variable *v = &This->local_variables[i];
2090 if (!strcmp(v->name, name))
2092 TRACE("Returning variable %p.\n", v);
2093 return (ID3D10EffectVariable *)v;
2097 WARN("Invalid name specified\n");
2099 return (ID3D10EffectVariable *)&null_variable;
2102 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableBySemantic(ID3D10Effect *iface,
2103 LPCSTR semantic)
2105 FIXME("iface %p, semantic %s stub!\n", iface, debugstr_a(semantic));
2107 return NULL;
2110 static struct ID3D10EffectTechnique * STDMETHODCALLTYPE d3d10_effect_GetTechniqueByIndex(ID3D10Effect *iface,
2111 UINT index)
2113 struct d3d10_effect *This = (struct d3d10_effect *)iface;
2114 struct d3d10_effect_technique *t;
2116 TRACE("iface %p, index %u\n", iface, index);
2118 if (index >= This->technique_count)
2120 WARN("Invalid index specified\n");
2121 return (ID3D10EffectTechnique *)&null_technique;
2124 t = &This->techniques[index];
2126 TRACE("Returning technique %p, %s.\n", t, debugstr_a(t->name));
2128 return (ID3D10EffectTechnique *)t;
2131 static struct ID3D10EffectTechnique * STDMETHODCALLTYPE d3d10_effect_GetTechniqueByName(ID3D10Effect *iface,
2132 LPCSTR name)
2134 struct d3d10_effect *This = (struct d3d10_effect *)iface;
2135 unsigned int i;
2137 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
2139 for (i = 0; i < This->technique_count; ++i)
2141 struct d3d10_effect_technique *t = &This->techniques[i];
2142 if (!strcmp(t->name, name))
2144 TRACE("Returning technique %p\n", t);
2145 return (ID3D10EffectTechnique *)t;
2149 WARN("Invalid name specified\n");
2151 return (ID3D10EffectTechnique *)&null_technique;
2154 static HRESULT STDMETHODCALLTYPE d3d10_effect_Optimize(ID3D10Effect *iface)
2156 FIXME("iface %p stub!\n", iface);
2158 return E_NOTIMPL;
2161 static BOOL STDMETHODCALLTYPE d3d10_effect_IsOptimized(ID3D10Effect *iface)
2163 FIXME("iface %p stub!\n", iface);
2165 return FALSE;
2168 const struct ID3D10EffectVtbl d3d10_effect_vtbl =
2170 /* IUnknown methods */
2171 d3d10_effect_QueryInterface,
2172 d3d10_effect_AddRef,
2173 d3d10_effect_Release,
2174 /* ID3D10Effect methods */
2175 d3d10_effect_IsValid,
2176 d3d10_effect_IsPool,
2177 d3d10_effect_GetDevice,
2178 d3d10_effect_GetDesc,
2179 d3d10_effect_GetConstantBufferByIndex,
2180 d3d10_effect_GetConstantBufferByName,
2181 d3d10_effect_GetVariableByIndex,
2182 d3d10_effect_GetVariableByName,
2183 d3d10_effect_GetVariableBySemantic,
2184 d3d10_effect_GetTechniqueByIndex,
2185 d3d10_effect_GetTechniqueByName,
2186 d3d10_effect_Optimize,
2187 d3d10_effect_IsOptimized,
2190 /* ID3D10EffectTechnique methods */
2192 static BOOL STDMETHODCALLTYPE d3d10_effect_technique_IsValid(ID3D10EffectTechnique *iface)
2194 TRACE("iface %p\n", iface);
2196 return (struct d3d10_effect_technique *)iface != &null_technique;
2199 static HRESULT STDMETHODCALLTYPE d3d10_effect_technique_GetDesc(ID3D10EffectTechnique *iface,
2200 D3D10_TECHNIQUE_DESC *desc)
2202 struct d3d10_effect_technique *This = (struct d3d10_effect_technique *)iface;
2204 TRACE("iface %p, desc %p\n", iface, desc);
2206 if(This == &null_technique)
2208 WARN("Null technique specified\n");
2209 return E_FAIL;
2212 if(!desc)
2214 WARN("Invalid argument specified\n");
2215 return E_INVALIDARG;
2218 desc->Name = This->name;
2219 desc->Passes = This->pass_count;
2220 desc->Annotations = This->annotation_count;
2222 return S_OK;
2225 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_technique_GetAnnotationByIndex(
2226 ID3D10EffectTechnique *iface, UINT index)
2228 struct d3d10_effect_technique *This = (struct d3d10_effect_technique *)iface;
2229 struct d3d10_effect_variable *a;
2231 TRACE("iface %p, index %u\n", iface, index);
2233 if (index >= This->annotation_count)
2235 WARN("Invalid index specified\n");
2236 return (ID3D10EffectVariable *)&null_variable;
2239 a = &This->annotations[index];
2241 TRACE("Returning annotation %p, %s\n", a, debugstr_a(a->name));
2243 return (ID3D10EffectVariable *)a;
2246 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_technique_GetAnnotationByName(
2247 ID3D10EffectTechnique *iface, LPCSTR name)
2249 struct d3d10_effect_technique *This = (struct d3d10_effect_technique *)iface;
2250 unsigned int i;
2252 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
2254 for (i = 0; i < This->annotation_count; ++i)
2256 struct d3d10_effect_variable *a = &This->annotations[i];
2257 if (!strcmp(a->name, name))
2259 TRACE("Returning annotation %p\n", a);
2260 return (ID3D10EffectVariable *)a;
2264 WARN("Invalid name specified\n");
2266 return (ID3D10EffectVariable *)&null_variable;
2269 static struct ID3D10EffectPass * STDMETHODCALLTYPE d3d10_effect_technique_GetPassByIndex(ID3D10EffectTechnique *iface,
2270 UINT index)
2272 struct d3d10_effect_technique *This = (struct d3d10_effect_technique *)iface;
2273 struct d3d10_effect_pass *p;
2275 TRACE("iface %p, index %u\n", iface, index);
2277 if (index >= This->pass_count)
2279 WARN("Invalid index specified\n");
2280 return (ID3D10EffectPass *)&null_pass;
2283 p = &This->passes[index];
2285 TRACE("Returning pass %p, %s.\n", p, debugstr_a(p->name));
2287 return (ID3D10EffectPass *)p;
2290 static struct ID3D10EffectPass * STDMETHODCALLTYPE d3d10_effect_technique_GetPassByName(ID3D10EffectTechnique *iface,
2291 LPCSTR name)
2293 struct d3d10_effect_technique *This = (struct d3d10_effect_technique *)iface;
2294 unsigned int i;
2296 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
2298 for (i = 0; i < This->pass_count; ++i)
2300 struct d3d10_effect_pass *p = &This->passes[i];
2301 if (!strcmp(p->name, name))
2303 TRACE("Returning pass %p\n", p);
2304 return (ID3D10EffectPass *)p;
2308 WARN("Invalid name specified\n");
2310 return (ID3D10EffectPass *)&null_pass;
2313 static HRESULT STDMETHODCALLTYPE d3d10_effect_technique_ComputeStateBlockMask(ID3D10EffectTechnique *iface,
2314 D3D10_STATE_BLOCK_MASK *mask)
2316 FIXME("iface %p,mask %p stub!\n", iface, mask);
2318 return E_NOTIMPL;
2321 static const struct ID3D10EffectTechniqueVtbl d3d10_effect_technique_vtbl =
2323 /* ID3D10EffectTechnique methods */
2324 d3d10_effect_technique_IsValid,
2325 d3d10_effect_technique_GetDesc,
2326 d3d10_effect_technique_GetAnnotationByIndex,
2327 d3d10_effect_technique_GetAnnotationByName,
2328 d3d10_effect_technique_GetPassByIndex,
2329 d3d10_effect_technique_GetPassByName,
2330 d3d10_effect_technique_ComputeStateBlockMask,
2333 /* ID3D10EffectPass methods */
2335 static BOOL STDMETHODCALLTYPE d3d10_effect_pass_IsValid(ID3D10EffectPass *iface)
2337 TRACE("iface %p\n", iface);
2339 return (struct d3d10_effect_pass *)iface != &null_pass;
2342 static HRESULT STDMETHODCALLTYPE d3d10_effect_pass_GetDesc(ID3D10EffectPass *iface, D3D10_PASS_DESC *desc)
2344 struct d3d10_effect_pass *This = (struct d3d10_effect_pass *)iface;
2345 unsigned int i;
2347 FIXME("iface %p, desc %p partial stub!\n", iface, desc);
2349 if(This == &null_pass)
2351 WARN("Null pass specified\n");
2352 return E_FAIL;
2355 if(!desc)
2357 WARN("Invalid argument specified\n");
2358 return E_INVALIDARG;
2361 memset(desc, 0, sizeof(*desc));
2362 desc->Name = This->name;
2363 for (i = 0; i < This->object_count; ++i)
2365 struct d3d10_effect_object *o = &This->objects[i];
2366 if (o->type == D3D10_EOT_VERTEXSHADER)
2368 struct d3d10_effect_variable *v = o->data;
2369 struct d3d10_effect_shader_variable *s = v->data;
2370 desc->pIAInputSignature = (BYTE *)s->input_signature;
2371 desc->IAInputSignatureSize = s->input_signature_size;
2372 break;
2376 return S_OK;
2379 static HRESULT STDMETHODCALLTYPE d3d10_effect_pass_GetVertexShaderDesc(ID3D10EffectPass *iface,
2380 D3D10_PASS_SHADER_DESC *desc)
2382 FIXME("iface %p, desc %p stub!\n", iface, desc);
2384 return E_NOTIMPL;
2387 static HRESULT STDMETHODCALLTYPE d3d10_effect_pass_GetGeometryShaderDesc(ID3D10EffectPass *iface,
2388 D3D10_PASS_SHADER_DESC *desc)
2390 FIXME("iface %p, desc %p stub!\n", iface, desc);
2392 return E_NOTIMPL;
2395 static HRESULT STDMETHODCALLTYPE d3d10_effect_pass_GetPixelShaderDesc(ID3D10EffectPass *iface,
2396 D3D10_PASS_SHADER_DESC *desc)
2398 FIXME("iface %p, desc %p stub!\n", iface, desc);
2400 return E_NOTIMPL;
2403 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_pass_GetAnnotationByIndex(ID3D10EffectPass *iface,
2404 UINT index)
2406 struct d3d10_effect_pass *This = (struct d3d10_effect_pass *)iface;
2407 struct d3d10_effect_variable *a;
2409 TRACE("iface %p, index %u\n", iface, index);
2411 if (index >= This->annotation_count)
2413 WARN("Invalid index specified\n");
2414 return (ID3D10EffectVariable *)&null_variable;
2417 a = &This->annotations[index];
2419 TRACE("Returning annotation %p, %s\n", a, debugstr_a(a->name));
2421 return (ID3D10EffectVariable *)a;
2424 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_pass_GetAnnotationByName(ID3D10EffectPass *iface,
2425 LPCSTR name)
2427 struct d3d10_effect_pass *This = (struct d3d10_effect_pass *)iface;
2428 unsigned int i;
2430 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
2432 for (i = 0; i < This->annotation_count; ++i)
2434 struct d3d10_effect_variable *a = &This->annotations[i];
2435 if (!strcmp(a->name, name))
2437 TRACE("Returning annotation %p\n", a);
2438 return (ID3D10EffectVariable *)a;
2442 WARN("Invalid name specified\n");
2444 return (ID3D10EffectVariable *)&null_variable;
2447 static HRESULT STDMETHODCALLTYPE d3d10_effect_pass_Apply(ID3D10EffectPass *iface, UINT flags)
2449 struct d3d10_effect_pass *This = (struct d3d10_effect_pass *)iface;
2450 HRESULT hr = S_OK;
2451 unsigned int i;
2453 TRACE("iface %p, flags %#x\n", iface, flags);
2455 if (flags) FIXME("Ignoring flags (%#x)\n", flags);
2457 for (i = 0; i < This->object_count; ++i)
2459 hr = d3d10_effect_object_apply(&This->objects[i]);
2460 if (FAILED(hr)) break;
2463 return hr;
2466 static HRESULT STDMETHODCALLTYPE d3d10_effect_pass_ComputeStateBlockMask(ID3D10EffectPass *iface,
2467 D3D10_STATE_BLOCK_MASK *mask)
2469 FIXME("iface %p, mask %p stub!\n", iface, mask);
2471 return E_NOTIMPL;
2474 static const struct ID3D10EffectPassVtbl d3d10_effect_pass_vtbl =
2476 /* ID3D10EffectPass methods */
2477 d3d10_effect_pass_IsValid,
2478 d3d10_effect_pass_GetDesc,
2479 d3d10_effect_pass_GetVertexShaderDesc,
2480 d3d10_effect_pass_GetGeometryShaderDesc,
2481 d3d10_effect_pass_GetPixelShaderDesc,
2482 d3d10_effect_pass_GetAnnotationByIndex,
2483 d3d10_effect_pass_GetAnnotationByName,
2484 d3d10_effect_pass_Apply,
2485 d3d10_effect_pass_ComputeStateBlockMask,
2488 /* ID3D10EffectVariable methods */
2490 static BOOL STDMETHODCALLTYPE d3d10_effect_variable_IsValid(ID3D10EffectVariable *iface)
2492 TRACE("iface %p\n", iface);
2494 return (struct d3d10_effect_variable *)iface != &null_variable;
2497 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_variable_GetType(ID3D10EffectVariable *iface)
2499 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2501 TRACE("iface %p\n", iface);
2503 return (ID3D10EffectType *)This->type;
2506 static HRESULT STDMETHODCALLTYPE d3d10_effect_variable_GetDesc(ID3D10EffectVariable *iface,
2507 D3D10_EFFECT_VARIABLE_DESC *desc)
2509 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2511 TRACE("iface %p, desc %p\n", iface, desc);
2513 if (!iface->lpVtbl->IsValid(iface))
2515 WARN("Null variable specified\n");
2516 return E_FAIL;
2519 if (!desc)
2521 WARN("Invalid argument specified\n");
2522 return E_INVALIDARG;
2525 /* FIXME: This isn't correct. Anonymous shaders let desc->ExplicitBindPoint untouched, but normal shaders set it! */
2526 memset(desc, 0, sizeof(*desc));
2527 desc->Name = This->name;
2528 desc->Semantic = This->semantic;
2529 desc->Flags = This->flag;
2530 desc->Annotations = This->annotation_count;
2531 desc->BufferOffset = This->buffer_offset;
2533 if (This->flag & D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT)
2535 desc->ExplicitBindPoint = This->buffer_offset;
2538 return S_OK;
2541 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_variable_GetAnnotationByIndex(
2542 ID3D10EffectVariable *iface, UINT index)
2544 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2545 struct d3d10_effect_variable *a;
2547 TRACE("iface %p, index %u\n", iface, index);
2549 if (index >= This->annotation_count)
2551 WARN("Invalid index specified\n");
2552 return (ID3D10EffectVariable *)&null_variable;
2555 a = &This->annotations[index];
2557 TRACE("Returning annotation %p, %s\n", a, debugstr_a(a->name));
2559 return (ID3D10EffectVariable *)a;
2562 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_variable_GetAnnotationByName(
2563 ID3D10EffectVariable *iface, LPCSTR name)
2565 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2566 unsigned int i;
2568 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
2570 for (i = 0; i < This->annotation_count; ++i)
2572 struct d3d10_effect_variable *a = &This->annotations[i];
2573 if (!strcmp(a->name, name))
2575 TRACE("Returning annotation %p\n", a);
2576 return (ID3D10EffectVariable *)a;
2580 WARN("Invalid name specified\n");
2582 return (ID3D10EffectVariable *)&null_variable;
2585 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_variable_GetMemberByIndex(
2586 ID3D10EffectVariable *iface, UINT index)
2588 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2589 struct d3d10_effect_variable *m;
2591 TRACE("iface %p, index %u\n", iface, index);
2593 if (index >= This->type->member_count)
2595 WARN("Invalid index specified\n");
2596 return (ID3D10EffectVariable *)&null_variable;
2599 m = &This->members[index];
2601 TRACE("Returning member %p, %s\n", m, debugstr_a(m->name));
2603 return (ID3D10EffectVariable *)m;
2606 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_variable_GetMemberByName(
2607 ID3D10EffectVariable *iface, LPCSTR name)
2609 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2610 unsigned int i;
2612 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
2614 if (!name)
2616 WARN("Invalid name specified\n");
2617 return (ID3D10EffectVariable *)&null_variable;
2620 for (i = 0; i < This->type->member_count; ++i)
2622 struct d3d10_effect_variable *m = &This->members[i];
2624 if (m->name)
2626 if (!strcmp(m->name, name))
2628 TRACE("Returning member %p\n", m);
2629 return (ID3D10EffectVariable *)m;
2634 WARN("Invalid name specified\n");
2636 return (ID3D10EffectVariable *)&null_variable;
2639 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_variable_GetMemberBySemantic(
2640 ID3D10EffectVariable *iface, LPCSTR semantic)
2642 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2643 unsigned int i;
2645 TRACE("iface %p, semantic %s.\n", iface, debugstr_a(semantic));
2647 if (!semantic)
2649 WARN("Invalid semantic specified\n");
2650 return (ID3D10EffectVariable *)&null_variable;
2653 for (i = 0; i < This->type->member_count; ++i)
2655 struct d3d10_effect_variable *m = &This->members[i];
2657 if (m->semantic)
2659 if (!strcmp(m->semantic, semantic))
2661 TRACE("Returning member %p\n", m);
2662 return (ID3D10EffectVariable *)m;
2667 WARN("Invalid semantic specified\n");
2669 return (ID3D10EffectVariable *)&null_variable;
2672 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_variable_GetElement(
2673 ID3D10EffectVariable *iface, UINT index)
2675 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2676 struct d3d10_effect_variable *v;
2678 TRACE("iface %p, index %u\n", iface, index);
2680 if (index >= This->type->element_count)
2682 WARN("Invalid index specified\n");
2683 return (ID3D10EffectVariable *)&null_variable;
2686 v = &This->elements[index];
2688 TRACE("Returning element %p, %s\n", v, debugstr_a(v->name));
2690 return (ID3D10EffectVariable *)v;
2693 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_variable_GetParentConstantBuffer(
2694 ID3D10EffectVariable *iface)
2696 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2698 TRACE("iface %p\n", iface);
2700 return (ID3D10EffectConstantBuffer *)This->buffer;
2703 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsScalar(
2704 ID3D10EffectVariable *iface)
2706 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2708 TRACE("iface %p\n", iface);
2710 if (This->vtbl == (ID3D10EffectVariableVtbl *)&d3d10_effect_scalar_variable_vtbl)
2711 return (ID3D10EffectScalarVariable *)This;
2713 return (ID3D10EffectScalarVariable *)&null_scalar_variable;
2716 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsVector(
2717 ID3D10EffectVariable *iface)
2719 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2721 TRACE("iface %p\n", iface);
2723 if (This->vtbl == (ID3D10EffectVariableVtbl *)&d3d10_effect_vector_variable_vtbl)
2724 return (ID3D10EffectVectorVariable *)This;
2726 return (ID3D10EffectVectorVariable *)&null_vector_variable;
2729 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsMatrix(
2730 ID3D10EffectVariable *iface)
2732 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2734 TRACE("iface %p\n", iface);
2736 if (This->vtbl == (ID3D10EffectVariableVtbl *)&d3d10_effect_matrix_variable_vtbl)
2737 return (ID3D10EffectMatrixVariable *)This;
2739 return (ID3D10EffectMatrixVariable *)&null_matrix_variable;
2742 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsString(
2743 ID3D10EffectVariable *iface)
2745 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2747 TRACE("iface %p\n", iface);
2749 if (This->vtbl == (ID3D10EffectVariableVtbl *)&d3d10_effect_string_variable_vtbl)
2750 return (ID3D10EffectStringVariable *)This;
2752 return (ID3D10EffectStringVariable *)&null_string_variable;
2755 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsShaderResource(
2756 ID3D10EffectVariable *iface)
2758 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2760 TRACE("iface %p\n", iface);
2762 if (This->vtbl == (ID3D10EffectVariableVtbl *)&d3d10_effect_shader_resource_variable_vtbl)
2763 return (ID3D10EffectShaderResourceVariable *)This;
2765 return (ID3D10EffectShaderResourceVariable *)&null_shader_resource_variable;
2768 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsRenderTargetView(
2769 ID3D10EffectVariable *iface)
2771 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2773 TRACE("iface %p\n", iface);
2775 if (This->vtbl == (ID3D10EffectVariableVtbl *)&d3d10_effect_render_target_view_variable_vtbl)
2776 return (ID3D10EffectRenderTargetViewVariable *)This;
2778 return (ID3D10EffectRenderTargetViewVariable *)&null_render_target_view_variable;
2781 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsDepthStencilView(
2782 ID3D10EffectVariable *iface)
2784 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2786 TRACE("iface %p\n", iface);
2788 if (This->vtbl == (ID3D10EffectVariableVtbl *)&d3d10_effect_depth_stencil_view_variable_vtbl)
2789 return (ID3D10EffectDepthStencilViewVariable *)This;
2791 return (ID3D10EffectDepthStencilViewVariable *)&null_depth_stencil_view_variable;
2794 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_variable_AsConstantBuffer(
2795 ID3D10EffectVariable *iface)
2797 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2799 TRACE("iface %p\n", iface);
2801 if (This->vtbl == (ID3D10EffectVariableVtbl *)&d3d10_effect_constant_buffer_vtbl)
2802 return (ID3D10EffectConstantBuffer *)This;
2804 return (ID3D10EffectConstantBuffer *)&null_local_buffer;
2807 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsShader(
2808 ID3D10EffectVariable *iface)
2810 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2812 TRACE("iface %p\n", iface);
2814 if (This->vtbl == (ID3D10EffectVariableVtbl *)&d3d10_effect_shader_variable_vtbl)
2815 return (ID3D10EffectShaderVariable *)This;
2817 return (ID3D10EffectShaderVariable *)&null_shader_variable;
2820 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsBlend(ID3D10EffectVariable *iface)
2822 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2824 TRACE("iface %p\n", iface);
2826 if (This->vtbl == (ID3D10EffectVariableVtbl *)&d3d10_effect_blend_variable_vtbl)
2827 return (ID3D10EffectBlendVariable *)This;
2829 return (ID3D10EffectBlendVariable *)&null_blend_variable;
2832 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsDepthStencil(
2833 ID3D10EffectVariable *iface)
2835 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2837 TRACE("iface %p\n", iface);
2839 if (This->vtbl == (ID3D10EffectVariableVtbl *)&d3d10_effect_depth_stencil_variable_vtbl)
2840 return (ID3D10EffectDepthStencilVariable *)This;
2842 return (ID3D10EffectDepthStencilVariable *)&null_depth_stencil_variable;
2845 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsRasterizer(
2846 ID3D10EffectVariable *iface)
2848 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2850 TRACE("iface %p\n", iface);
2852 if (This->vtbl == (ID3D10EffectVariableVtbl *)&d3d10_effect_rasterizer_variable_vtbl)
2853 return (ID3D10EffectRasterizerVariable *)This;
2855 return (ID3D10EffectRasterizerVariable *)&null_rasterizer_variable;
2858 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsSampler(
2859 ID3D10EffectVariable *iface)
2861 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2863 TRACE("iface %p\n", iface);
2865 if (This->vtbl == (ID3D10EffectVariableVtbl *)&d3d10_effect_sampler_variable_vtbl)
2866 return (ID3D10EffectSamplerVariable *)This;
2868 return (ID3D10EffectSamplerVariable *)&null_sampler_variable;
2871 static HRESULT STDMETHODCALLTYPE d3d10_effect_variable_SetRawValue(ID3D10EffectVariable *iface,
2872 void *data, UINT offset, UINT count)
2874 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface, data, offset, count);
2876 return E_NOTIMPL;
2879 static HRESULT STDMETHODCALLTYPE d3d10_effect_variable_GetRawValue(ID3D10EffectVariable *iface,
2880 void *data, UINT offset, UINT count)
2882 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface, data, offset, count);
2884 return E_NOTIMPL;
2887 static const struct ID3D10EffectVariableVtbl d3d10_effect_variable_vtbl =
2889 /* ID3D10EffectVariable methods */
2890 d3d10_effect_variable_IsValid,
2891 d3d10_effect_variable_GetType,
2892 d3d10_effect_variable_GetDesc,
2893 d3d10_effect_variable_GetAnnotationByIndex,
2894 d3d10_effect_variable_GetAnnotationByName,
2895 d3d10_effect_variable_GetMemberByIndex,
2896 d3d10_effect_variable_GetMemberByName,
2897 d3d10_effect_variable_GetMemberBySemantic,
2898 d3d10_effect_variable_GetElement,
2899 d3d10_effect_variable_GetParentConstantBuffer,
2900 d3d10_effect_variable_AsScalar,
2901 d3d10_effect_variable_AsVector,
2902 d3d10_effect_variable_AsMatrix,
2903 d3d10_effect_variable_AsString,
2904 d3d10_effect_variable_AsShaderResource,
2905 d3d10_effect_variable_AsRenderTargetView,
2906 d3d10_effect_variable_AsDepthStencilView,
2907 d3d10_effect_variable_AsConstantBuffer,
2908 d3d10_effect_variable_AsShader,
2909 d3d10_effect_variable_AsBlend,
2910 d3d10_effect_variable_AsDepthStencil,
2911 d3d10_effect_variable_AsRasterizer,
2912 d3d10_effect_variable_AsSampler,
2913 d3d10_effect_variable_SetRawValue,
2914 d3d10_effect_variable_GetRawValue,
2917 /* ID3D10EffectVariable methods */
2918 static BOOL STDMETHODCALLTYPE d3d10_effect_constant_buffer_IsValid(ID3D10EffectConstantBuffer *iface)
2920 TRACE("iface %p\n", iface);
2922 return (struct d3d10_effect_variable *)iface != &null_local_buffer;
2925 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetType(ID3D10EffectConstantBuffer *iface)
2927 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
2930 static HRESULT STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetDesc(ID3D10EffectConstantBuffer *iface,
2931 D3D10_EFFECT_VARIABLE_DESC *desc)
2933 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
2936 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetAnnotationByIndex(
2937 ID3D10EffectConstantBuffer *iface, UINT index)
2939 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
2942 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetAnnotationByName(
2943 ID3D10EffectConstantBuffer *iface, LPCSTR name)
2945 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
2948 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetMemberByIndex(
2949 ID3D10EffectConstantBuffer *iface, UINT index)
2951 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
2954 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetMemberByName(
2955 ID3D10EffectConstantBuffer *iface, LPCSTR name)
2957 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
2960 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetMemberBySemantic(
2961 ID3D10EffectConstantBuffer *iface, LPCSTR semantic)
2963 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
2966 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetElement(
2967 ID3D10EffectConstantBuffer *iface, UINT index)
2969 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
2972 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetParentConstantBuffer(
2973 ID3D10EffectConstantBuffer *iface)
2975 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
2978 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsScalar(
2979 ID3D10EffectConstantBuffer *iface)
2981 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
2984 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsVector(
2985 ID3D10EffectConstantBuffer *iface)
2987 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
2990 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsMatrix(
2991 ID3D10EffectConstantBuffer *iface)
2993 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
2996 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsString(
2997 ID3D10EffectConstantBuffer *iface)
2999 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
3002 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsShaderResource(
3003 ID3D10EffectConstantBuffer *iface)
3005 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
3008 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsRenderTargetView(
3009 ID3D10EffectConstantBuffer *iface)
3011 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
3014 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsDepthStencilView(
3015 ID3D10EffectConstantBuffer *iface)
3017 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
3020 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsConstantBuffer(
3021 ID3D10EffectConstantBuffer *iface)
3023 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
3026 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsShader(
3027 ID3D10EffectConstantBuffer *iface)
3029 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
3032 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsBlend(ID3D10EffectConstantBuffer *iface)
3034 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
3037 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsDepthStencil(
3038 ID3D10EffectConstantBuffer *iface)
3040 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
3043 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsRasterizer(
3044 ID3D10EffectConstantBuffer *iface)
3046 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
3049 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsSampler(
3050 ID3D10EffectConstantBuffer *iface)
3052 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
3055 static HRESULT STDMETHODCALLTYPE d3d10_effect_constant_buffer_SetRawValue(ID3D10EffectConstantBuffer *iface,
3056 void *data, UINT offset, UINT count)
3058 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
3061 static HRESULT STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetRawValue(ID3D10EffectConstantBuffer *iface,
3062 void *data, UINT offset, UINT count)
3064 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
3067 /* ID3D10EffectConstantBuffer methods */
3068 static HRESULT STDMETHODCALLTYPE d3d10_effect_constant_buffer_SetConstantBuffer(ID3D10EffectConstantBuffer *iface,
3069 ID3D10Buffer *buffer)
3071 FIXME("iface %p, buffer %p stub!\n", iface, buffer);
3073 return E_NOTIMPL;
3076 static HRESULT STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetConstantBuffer(ID3D10EffectConstantBuffer *iface,
3077 ID3D10Buffer **buffer)
3079 FIXME("iface %p, buffer %p stub!\n", iface, buffer);
3081 return E_NOTIMPL;
3084 static HRESULT STDMETHODCALLTYPE d3d10_effect_constant_buffer_SetTextureBuffer(ID3D10EffectConstantBuffer *iface,
3085 ID3D10ShaderResourceView *view)
3087 FIXME("iface %p, view %p stub!\n", iface, view);
3089 return E_NOTIMPL;
3092 static HRESULT STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetTextureBuffer(ID3D10EffectConstantBuffer *iface,
3093 ID3D10ShaderResourceView **view)
3095 FIXME("iface %p, view %p stub!\n", iface, view);
3097 return E_NOTIMPL;
3100 static const struct ID3D10EffectConstantBufferVtbl d3d10_effect_constant_buffer_vtbl =
3102 /* ID3D10EffectVariable methods */
3103 d3d10_effect_constant_buffer_IsValid,
3104 d3d10_effect_constant_buffer_GetType,
3105 d3d10_effect_constant_buffer_GetDesc,
3106 d3d10_effect_constant_buffer_GetAnnotationByIndex,
3107 d3d10_effect_constant_buffer_GetAnnotationByName,
3108 d3d10_effect_constant_buffer_GetMemberByIndex,
3109 d3d10_effect_constant_buffer_GetMemberByName,
3110 d3d10_effect_constant_buffer_GetMemberBySemantic,
3111 d3d10_effect_constant_buffer_GetElement,
3112 d3d10_effect_constant_buffer_GetParentConstantBuffer,
3113 d3d10_effect_constant_buffer_AsScalar,
3114 d3d10_effect_constant_buffer_AsVector,
3115 d3d10_effect_constant_buffer_AsMatrix,
3116 d3d10_effect_constant_buffer_AsString,
3117 d3d10_effect_constant_buffer_AsShaderResource,
3118 d3d10_effect_constant_buffer_AsRenderTargetView,
3119 d3d10_effect_constant_buffer_AsDepthStencilView,
3120 d3d10_effect_constant_buffer_AsConstantBuffer,
3121 d3d10_effect_constant_buffer_AsShader,
3122 d3d10_effect_constant_buffer_AsBlend,
3123 d3d10_effect_constant_buffer_AsDepthStencil,
3124 d3d10_effect_constant_buffer_AsRasterizer,
3125 d3d10_effect_constant_buffer_AsSampler,
3126 d3d10_effect_constant_buffer_SetRawValue,
3127 d3d10_effect_constant_buffer_GetRawValue,
3128 /* ID3D10EffectConstantBuffer methods */
3129 d3d10_effect_constant_buffer_SetConstantBuffer,
3130 d3d10_effect_constant_buffer_GetConstantBuffer,
3131 d3d10_effect_constant_buffer_SetTextureBuffer,
3132 d3d10_effect_constant_buffer_GetTextureBuffer,
3135 /* ID3D10EffectVariable methods */
3137 static BOOL STDMETHODCALLTYPE d3d10_effect_scalar_variable_IsValid(ID3D10EffectScalarVariable *iface)
3139 TRACE("iface %p\n", iface);
3141 return (struct d3d10_effect_variable *)iface != &null_scalar_variable;
3144 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetType(
3145 ID3D10EffectScalarVariable *iface)
3147 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
3150 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetDesc(ID3D10EffectScalarVariable *iface,
3151 D3D10_EFFECT_VARIABLE_DESC *desc)
3153 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
3156 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetAnnotationByIndex(
3157 ID3D10EffectScalarVariable *iface, UINT index)
3159 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
3162 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetAnnotationByName(
3163 ID3D10EffectScalarVariable *iface, LPCSTR name)
3165 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
3168 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetMemberByIndex(
3169 ID3D10EffectScalarVariable *iface, UINT index)
3171 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
3174 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetMemberByName(
3175 ID3D10EffectScalarVariable *iface, LPCSTR name)
3177 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
3180 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetMemberBySemantic(
3181 ID3D10EffectScalarVariable *iface, LPCSTR semantic)
3183 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
3186 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetElement(
3187 ID3D10EffectScalarVariable *iface, UINT index)
3189 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
3192 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetParentConstantBuffer(
3193 ID3D10EffectScalarVariable *iface)
3195 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
3198 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsScalar(
3199 ID3D10EffectScalarVariable *iface)
3201 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
3204 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsVector(
3205 ID3D10EffectScalarVariable *iface)
3207 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
3210 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsMatrix(
3211 ID3D10EffectScalarVariable *iface)
3213 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
3216 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsString(
3217 ID3D10EffectScalarVariable *iface)
3219 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
3222 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsShaderResource(
3223 ID3D10EffectScalarVariable *iface)
3225 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
3228 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsRenderTargetView(
3229 ID3D10EffectScalarVariable *iface)
3231 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
3234 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsDepthStencilView(
3235 ID3D10EffectScalarVariable *iface)
3237 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
3240 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsConstantBuffer(
3241 ID3D10EffectScalarVariable *iface)
3243 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
3246 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsShader(
3247 ID3D10EffectScalarVariable *iface)
3249 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
3252 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsBlend(
3253 ID3D10EffectScalarVariable *iface)
3255 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
3258 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsDepthStencil(
3259 ID3D10EffectScalarVariable *iface)
3261 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
3264 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsRasterizer(
3265 ID3D10EffectScalarVariable *iface)
3267 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
3270 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsSampler(
3271 ID3D10EffectScalarVariable *iface)
3273 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
3276 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetRawValue(ID3D10EffectScalarVariable *iface,
3277 void *data, UINT offset, UINT count)
3279 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
3282 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetRawValue(ID3D10EffectScalarVariable *iface,
3283 void *data, UINT offset, UINT count)
3285 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
3288 /* ID3D10EffectScalarVariable methods */
3290 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetFloat(ID3D10EffectScalarVariable *iface,
3291 float value)
3293 FIXME("iface %p, value %.8e stub!\n", iface, value);
3295 return E_NOTIMPL;
3298 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetFloat(ID3D10EffectScalarVariable *iface,
3299 float *value)
3301 FIXME("iface %p, value %p stub!\n", iface, value);
3303 return E_NOTIMPL;
3306 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetFloatArray(ID3D10EffectScalarVariable *iface,
3307 float *values, UINT offset, UINT count)
3309 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3311 return E_NOTIMPL;
3314 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetFloatArray(ID3D10EffectScalarVariable *iface,
3315 float *values, UINT offset, UINT count)
3317 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3319 return E_NOTIMPL;
3322 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetInt(ID3D10EffectScalarVariable *iface,
3323 int value)
3325 FIXME("iface %p, value %d stub!\n", iface, value);
3327 return E_NOTIMPL;
3330 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetInt(ID3D10EffectScalarVariable *iface,
3331 int *value)
3333 FIXME("iface %p, value %p stub!\n", iface, value);
3335 return E_NOTIMPL;
3338 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetIntArray(ID3D10EffectScalarVariable *iface,
3339 int *values, UINT offset, UINT count)
3341 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3343 return E_NOTIMPL;
3346 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetIntArray(ID3D10EffectScalarVariable *iface,
3347 int *values, UINT offset, UINT count)
3349 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3351 return E_NOTIMPL;
3354 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetBool(ID3D10EffectScalarVariable *iface,
3355 BOOL value)
3357 FIXME("iface %p, value %d stub!\n", iface, value);
3359 return E_NOTIMPL;
3362 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetBool(ID3D10EffectScalarVariable *iface,
3363 BOOL *value)
3365 FIXME("iface %p, value %p stub!\n", iface, value);
3367 return E_NOTIMPL;
3370 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetBoolArray(ID3D10EffectScalarVariable *iface,
3371 BOOL *values, UINT offset, UINT count)
3373 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3375 return E_NOTIMPL;
3378 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetBoolArray(ID3D10EffectScalarVariable *iface,
3379 BOOL *values, UINT offset, UINT count)
3381 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3383 return E_NOTIMPL;
3386 static const struct ID3D10EffectScalarVariableVtbl d3d10_effect_scalar_variable_vtbl =
3388 /* ID3D10EffectVariable methods */
3389 d3d10_effect_scalar_variable_IsValid,
3390 d3d10_effect_scalar_variable_GetType,
3391 d3d10_effect_scalar_variable_GetDesc,
3392 d3d10_effect_scalar_variable_GetAnnotationByIndex,
3393 d3d10_effect_scalar_variable_GetAnnotationByName,
3394 d3d10_effect_scalar_variable_GetMemberByIndex,
3395 d3d10_effect_scalar_variable_GetMemberByName,
3396 d3d10_effect_scalar_variable_GetMemberBySemantic,
3397 d3d10_effect_scalar_variable_GetElement,
3398 d3d10_effect_scalar_variable_GetParentConstantBuffer,
3399 d3d10_effect_scalar_variable_AsScalar,
3400 d3d10_effect_scalar_variable_AsVector,
3401 d3d10_effect_scalar_variable_AsMatrix,
3402 d3d10_effect_scalar_variable_AsString,
3403 d3d10_effect_scalar_variable_AsShaderResource,
3404 d3d10_effect_scalar_variable_AsRenderTargetView,
3405 d3d10_effect_scalar_variable_AsDepthStencilView,
3406 d3d10_effect_scalar_variable_AsConstantBuffer,
3407 d3d10_effect_scalar_variable_AsShader,
3408 d3d10_effect_scalar_variable_AsBlend,
3409 d3d10_effect_scalar_variable_AsDepthStencil,
3410 d3d10_effect_scalar_variable_AsRasterizer,
3411 d3d10_effect_scalar_variable_AsSampler,
3412 d3d10_effect_scalar_variable_SetRawValue,
3413 d3d10_effect_scalar_variable_GetRawValue,
3414 /* ID3D10EffectScalarVariable methods */
3415 d3d10_effect_scalar_variable_SetFloat,
3416 d3d10_effect_scalar_variable_GetFloat,
3417 d3d10_effect_scalar_variable_SetFloatArray,
3418 d3d10_effect_scalar_variable_GetFloatArray,
3419 d3d10_effect_scalar_variable_SetInt,
3420 d3d10_effect_scalar_variable_GetInt,
3421 d3d10_effect_scalar_variable_SetIntArray,
3422 d3d10_effect_scalar_variable_GetIntArray,
3423 d3d10_effect_scalar_variable_SetBool,
3424 d3d10_effect_scalar_variable_GetBool,
3425 d3d10_effect_scalar_variable_SetBoolArray,
3426 d3d10_effect_scalar_variable_GetBoolArray,
3429 /* ID3D10EffectVariable methods */
3431 static BOOL STDMETHODCALLTYPE d3d10_effect_vector_variable_IsValid(ID3D10EffectVectorVariable *iface)
3433 TRACE("iface %p\n", iface);
3435 return (struct d3d10_effect_variable *)iface != &null_vector_variable;
3438 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetType(
3439 ID3D10EffectVectorVariable *iface)
3441 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
3444 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetDesc(ID3D10EffectVectorVariable *iface,
3445 D3D10_EFFECT_VARIABLE_DESC *desc)
3447 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
3450 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetAnnotationByIndex(
3451 ID3D10EffectVectorVariable *iface, UINT index)
3453 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
3456 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetAnnotationByName(
3457 ID3D10EffectVectorVariable *iface, LPCSTR name)
3459 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
3462 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetMemberByIndex(
3463 ID3D10EffectVectorVariable *iface, UINT index)
3465 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
3468 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetMemberByName(
3469 ID3D10EffectVectorVariable *iface, LPCSTR name)
3471 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
3474 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetMemberBySemantic(
3475 ID3D10EffectVectorVariable *iface, LPCSTR semantic)
3477 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
3480 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetElement(
3481 ID3D10EffectVectorVariable *iface, UINT index)
3483 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
3486 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetParentConstantBuffer(
3487 ID3D10EffectVectorVariable *iface)
3489 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
3492 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsScalar(
3493 ID3D10EffectVectorVariable *iface)
3495 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
3498 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsVector(
3499 ID3D10EffectVectorVariable *iface)
3501 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
3504 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsMatrix(
3505 ID3D10EffectVectorVariable *iface)
3507 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
3510 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsString(
3511 ID3D10EffectVectorVariable *iface)
3513 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
3516 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsShaderResource(
3517 ID3D10EffectVectorVariable *iface)
3519 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
3522 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsRenderTargetView(
3523 ID3D10EffectVectorVariable *iface)
3525 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
3528 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsDepthStencilView(
3529 ID3D10EffectVectorVariable *iface)
3531 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
3534 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsConstantBuffer(
3535 ID3D10EffectVectorVariable *iface)
3537 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
3540 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsShader(
3541 ID3D10EffectVectorVariable *iface)
3543 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
3546 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsBlend(
3547 ID3D10EffectVectorVariable *iface)
3549 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
3552 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsDepthStencil(
3553 ID3D10EffectVectorVariable *iface)
3555 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
3558 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsRasterizer(
3559 ID3D10EffectVectorVariable *iface)
3561 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
3564 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsSampler(
3565 ID3D10EffectVectorVariable *iface)
3567 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
3570 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_SetRawValue(ID3D10EffectVectorVariable *iface,
3571 void *data, UINT offset, UINT count)
3573 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
3576 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetRawValue(ID3D10EffectVectorVariable *iface,
3577 void *data, UINT offset, UINT count)
3579 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
3582 /* ID3D10EffectVectorVariable methods */
3584 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_SetBoolVector(ID3D10EffectVectorVariable *iface,
3585 BOOL *value)
3587 FIXME("iface %p, value %p stub!\n", iface, value);
3589 return E_NOTIMPL;
3592 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_SetIntVector(ID3D10EffectVectorVariable *iface,
3593 int *value)
3595 FIXME("iface %p, value %p stub!\n", iface, value);
3597 return E_NOTIMPL;
3600 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_SetFloatVector(ID3D10EffectVectorVariable *iface,
3601 float *value)
3603 FIXME("iface %p, value %p stub!\n", iface, value);
3605 return E_NOTIMPL;
3608 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetBoolVector(ID3D10EffectVectorVariable *iface,
3609 BOOL *value)
3611 FIXME("iface %p, value %p stub!\n", iface, value);
3613 return E_NOTIMPL;
3616 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetIntVector(ID3D10EffectVectorVariable *iface,
3617 int *value)
3619 FIXME("iface %p, value %p stub!\n", iface, value);
3621 return E_NOTIMPL;
3624 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetFloatVector(ID3D10EffectVectorVariable *iface,
3625 float *value)
3627 FIXME("iface %p, value %p stub!\n", iface, value);
3629 return E_NOTIMPL;
3632 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_SetBoolVectorArray(ID3D10EffectVectorVariable *iface,
3633 BOOL *values, UINT offset, UINT count)
3635 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3637 return E_NOTIMPL;
3640 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_SetIntVectorArray(ID3D10EffectVectorVariable *iface,
3641 int *values, UINT offset, UINT count)
3643 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3645 return E_NOTIMPL;
3648 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_SetFloatVectorArray(ID3D10EffectVectorVariable *iface,
3649 float *values, UINT offset, UINT count)
3651 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3653 return E_NOTIMPL;
3656 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetBoolVectorArray(ID3D10EffectVectorVariable *iface,
3657 BOOL *values, UINT offset, UINT count)
3659 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3661 return E_NOTIMPL;
3664 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetIntVectorArray(ID3D10EffectVectorVariable *iface,
3665 int *values, UINT offset, UINT count)
3667 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3669 return E_NOTIMPL;
3672 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetFloatVectorArray(ID3D10EffectVectorVariable *iface,
3673 float *values, UINT offset, UINT count)
3675 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3677 return E_NOTIMPL;
3680 static const struct ID3D10EffectVectorVariableVtbl d3d10_effect_vector_variable_vtbl =
3682 /* ID3D10EffectVariable methods */
3683 d3d10_effect_vector_variable_IsValid,
3684 d3d10_effect_vector_variable_GetType,
3685 d3d10_effect_vector_variable_GetDesc,
3686 d3d10_effect_vector_variable_GetAnnotationByIndex,
3687 d3d10_effect_vector_variable_GetAnnotationByName,
3688 d3d10_effect_vector_variable_GetMemberByIndex,
3689 d3d10_effect_vector_variable_GetMemberByName,
3690 d3d10_effect_vector_variable_GetMemberBySemantic,
3691 d3d10_effect_vector_variable_GetElement,
3692 d3d10_effect_vector_variable_GetParentConstantBuffer,
3693 d3d10_effect_vector_variable_AsScalar,
3694 d3d10_effect_vector_variable_AsVector,
3695 d3d10_effect_vector_variable_AsMatrix,
3696 d3d10_effect_vector_variable_AsString,
3697 d3d10_effect_vector_variable_AsShaderResource,
3698 d3d10_effect_vector_variable_AsRenderTargetView,
3699 d3d10_effect_vector_variable_AsDepthStencilView,
3700 d3d10_effect_vector_variable_AsConstantBuffer,
3701 d3d10_effect_vector_variable_AsShader,
3702 d3d10_effect_vector_variable_AsBlend,
3703 d3d10_effect_vector_variable_AsDepthStencil,
3704 d3d10_effect_vector_variable_AsRasterizer,
3705 d3d10_effect_vector_variable_AsSampler,
3706 d3d10_effect_vector_variable_SetRawValue,
3707 d3d10_effect_vector_variable_GetRawValue,
3708 /* ID3D10EffectVectorVariable methods */
3709 d3d10_effect_vector_variable_SetBoolVector,
3710 d3d10_effect_vector_variable_SetIntVector,
3711 d3d10_effect_vector_variable_SetFloatVector,
3712 d3d10_effect_vector_variable_GetBoolVector,
3713 d3d10_effect_vector_variable_GetIntVector,
3714 d3d10_effect_vector_variable_GetFloatVector,
3715 d3d10_effect_vector_variable_SetBoolVectorArray,
3716 d3d10_effect_vector_variable_SetIntVectorArray,
3717 d3d10_effect_vector_variable_SetFloatVectorArray,
3718 d3d10_effect_vector_variable_GetBoolVectorArray,
3719 d3d10_effect_vector_variable_GetIntVectorArray,
3720 d3d10_effect_vector_variable_GetFloatVectorArray,
3723 /* ID3D10EffectVariable methods */
3725 static BOOL STDMETHODCALLTYPE d3d10_effect_matrix_variable_IsValid(ID3D10EffectMatrixVariable *iface)
3727 TRACE("iface %p\n", iface);
3729 return (struct d3d10_effect_variable *)iface != &null_matrix_variable;
3732 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetType(
3733 ID3D10EffectMatrixVariable *iface)
3735 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
3738 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetDesc(ID3D10EffectMatrixVariable *iface,
3739 D3D10_EFFECT_VARIABLE_DESC *desc)
3741 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
3744 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetAnnotationByIndex(
3745 ID3D10EffectMatrixVariable *iface, UINT index)
3747 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
3750 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetAnnotationByName(
3751 ID3D10EffectMatrixVariable *iface, LPCSTR name)
3753 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
3756 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetMemberByIndex(
3757 ID3D10EffectMatrixVariable *iface, UINT index)
3759 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
3762 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetMemberByName(
3763 ID3D10EffectMatrixVariable *iface, LPCSTR name)
3765 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
3768 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetMemberBySemantic(
3769 ID3D10EffectMatrixVariable *iface, LPCSTR semantic)
3771 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
3774 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetElement(
3775 ID3D10EffectMatrixVariable *iface, UINT index)
3777 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
3780 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetParentConstantBuffer(
3781 ID3D10EffectMatrixVariable *iface)
3783 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
3786 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsScalar(
3787 ID3D10EffectMatrixVariable *iface)
3789 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
3792 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsVector(
3793 ID3D10EffectMatrixVariable *iface)
3795 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
3798 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsMatrix(
3799 ID3D10EffectMatrixVariable *iface)
3801 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
3804 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsString(
3805 ID3D10EffectMatrixVariable *iface)
3807 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
3810 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsShaderResource(
3811 ID3D10EffectMatrixVariable *iface)
3813 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
3816 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsRenderTargetView(
3817 ID3D10EffectMatrixVariable *iface)
3819 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
3822 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsDepthStencilView(
3823 ID3D10EffectMatrixVariable *iface)
3825 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
3828 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsConstantBuffer(
3829 ID3D10EffectMatrixVariable *iface)
3831 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
3834 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsShader(
3835 ID3D10EffectMatrixVariable *iface)
3837 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
3840 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsBlend(
3841 ID3D10EffectMatrixVariable *iface)
3843 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
3846 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsDepthStencil(
3847 ID3D10EffectMatrixVariable *iface)
3849 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
3852 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsRasterizer(
3853 ID3D10EffectMatrixVariable *iface)
3855 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
3858 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsSampler(
3859 ID3D10EffectMatrixVariable *iface)
3861 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
3864 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_SetRawValue(ID3D10EffectMatrixVariable *iface,
3865 void *data, UINT offset, UINT count)
3867 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
3870 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetRawValue(ID3D10EffectMatrixVariable *iface,
3871 void *data, UINT offset, UINT count)
3873 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
3876 /* ID3D10EffectMatrixVariable methods */
3878 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_SetMatrix(ID3D10EffectMatrixVariable *iface,
3879 float *data)
3881 FIXME("iface %p, data %p stub!\n", iface, data);
3883 return E_NOTIMPL;
3886 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetMatrix(ID3D10EffectMatrixVariable *iface,
3887 float *data)
3889 FIXME("iface %p, data %p stub!\n", iface, data);
3891 return E_NOTIMPL;
3894 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_SetMatrixArray(ID3D10EffectMatrixVariable *iface,
3895 float *data, UINT offset, UINT count)
3897 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface, data, offset, count);
3899 return E_NOTIMPL;
3902 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetMatrixArray(ID3D10EffectMatrixVariable *iface,
3903 float *data, UINT offset, UINT count)
3905 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface, data, offset, count);
3907 return E_NOTIMPL;
3910 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_SetMatrixTranspose(ID3D10EffectMatrixVariable *iface,
3911 float *data)
3913 FIXME("iface %p, data %p stub!\n", iface, data);
3915 return E_NOTIMPL;
3918 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetMatrixTranspose(ID3D10EffectMatrixVariable *iface,
3919 float *data)
3921 FIXME("iface %p, data %p stub!\n", iface, data);
3923 return E_NOTIMPL;
3926 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_SetMatrixTransposeArray(ID3D10EffectMatrixVariable *iface,
3927 float *data, UINT offset, UINT count)
3929 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface, data, offset, count);
3931 return E_NOTIMPL;
3934 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetMatrixTransposeArray(ID3D10EffectMatrixVariable *iface,
3935 float *data, UINT offset, UINT count)
3937 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface, data, offset, count);
3939 return E_NOTIMPL;
3943 static const struct ID3D10EffectMatrixVariableVtbl d3d10_effect_matrix_variable_vtbl =
3945 /* ID3D10EffectVariable methods */
3946 d3d10_effect_matrix_variable_IsValid,
3947 d3d10_effect_matrix_variable_GetType,
3948 d3d10_effect_matrix_variable_GetDesc,
3949 d3d10_effect_matrix_variable_GetAnnotationByIndex,
3950 d3d10_effect_matrix_variable_GetAnnotationByName,
3951 d3d10_effect_matrix_variable_GetMemberByIndex,
3952 d3d10_effect_matrix_variable_GetMemberByName,
3953 d3d10_effect_matrix_variable_GetMemberBySemantic,
3954 d3d10_effect_matrix_variable_GetElement,
3955 d3d10_effect_matrix_variable_GetParentConstantBuffer,
3956 d3d10_effect_matrix_variable_AsScalar,
3957 d3d10_effect_matrix_variable_AsVector,
3958 d3d10_effect_matrix_variable_AsMatrix,
3959 d3d10_effect_matrix_variable_AsString,
3960 d3d10_effect_matrix_variable_AsShaderResource,
3961 d3d10_effect_matrix_variable_AsRenderTargetView,
3962 d3d10_effect_matrix_variable_AsDepthStencilView,
3963 d3d10_effect_matrix_variable_AsConstantBuffer,
3964 d3d10_effect_matrix_variable_AsShader,
3965 d3d10_effect_matrix_variable_AsBlend,
3966 d3d10_effect_matrix_variable_AsDepthStencil,
3967 d3d10_effect_matrix_variable_AsRasterizer,
3968 d3d10_effect_matrix_variable_AsSampler,
3969 d3d10_effect_matrix_variable_SetRawValue,
3970 d3d10_effect_matrix_variable_GetRawValue,
3971 /* ID3D10EffectMatrixVariable methods */
3972 d3d10_effect_matrix_variable_SetMatrix,
3973 d3d10_effect_matrix_variable_GetMatrix,
3974 d3d10_effect_matrix_variable_SetMatrixArray,
3975 d3d10_effect_matrix_variable_GetMatrixArray,
3976 d3d10_effect_matrix_variable_SetMatrixTranspose,
3977 d3d10_effect_matrix_variable_GetMatrixTranspose,
3978 d3d10_effect_matrix_variable_SetMatrixTransposeArray,
3979 d3d10_effect_matrix_variable_GetMatrixTransposeArray,
3982 /* ID3D10EffectVariable methods */
3984 static BOOL STDMETHODCALLTYPE d3d10_effect_string_variable_IsValid(ID3D10EffectStringVariable *iface)
3986 TRACE("iface %p\n", iface);
3988 return (struct d3d10_effect_variable *)iface != &null_string_variable;
3991 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_string_variable_GetType(
3992 ID3D10EffectStringVariable *iface)
3994 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
3997 static HRESULT STDMETHODCALLTYPE d3d10_effect_string_variable_GetDesc(ID3D10EffectStringVariable *iface,
3998 D3D10_EFFECT_VARIABLE_DESC *desc)
4000 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
4003 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_GetAnnotationByIndex(
4004 ID3D10EffectStringVariable *iface, UINT index)
4006 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
4009 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_GetAnnotationByName(
4010 ID3D10EffectStringVariable *iface, LPCSTR name)
4012 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
4015 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_GetMemberByIndex(
4016 ID3D10EffectStringVariable *iface, UINT index)
4018 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
4021 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_GetMemberByName(
4022 ID3D10EffectStringVariable *iface, LPCSTR name)
4024 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
4027 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_GetMemberBySemantic(
4028 ID3D10EffectStringVariable *iface, LPCSTR semantic)
4030 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
4033 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_GetElement(
4034 ID3D10EffectStringVariable *iface, UINT index)
4036 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
4039 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_string_variable_GetParentConstantBuffer(
4040 ID3D10EffectStringVariable *iface)
4042 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
4045 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsScalar(
4046 ID3D10EffectStringVariable *iface)
4048 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
4051 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsVector(
4052 ID3D10EffectStringVariable *iface)
4054 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
4057 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsMatrix(
4058 ID3D10EffectStringVariable *iface)
4060 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
4063 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsString(
4064 ID3D10EffectStringVariable *iface)
4066 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
4069 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsShaderResource(
4070 ID3D10EffectStringVariable *iface)
4072 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
4075 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsRenderTargetView(
4076 ID3D10EffectStringVariable *iface)
4078 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
4081 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsDepthStencilView(
4082 ID3D10EffectStringVariable *iface)
4084 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
4087 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_string_variable_AsConstantBuffer(
4088 ID3D10EffectStringVariable *iface)
4090 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
4093 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsShader(
4094 ID3D10EffectStringVariable *iface)
4096 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
4099 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsBlend(
4100 ID3D10EffectStringVariable *iface)
4102 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
4105 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsDepthStencil(
4106 ID3D10EffectStringVariable *iface)
4108 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
4111 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsRasterizer(
4112 ID3D10EffectStringVariable *iface)
4114 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
4117 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsSampler(
4118 ID3D10EffectStringVariable *iface)
4120 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
4123 static HRESULT STDMETHODCALLTYPE d3d10_effect_string_variable_SetRawValue(ID3D10EffectStringVariable *iface,
4124 void *data, UINT offset, UINT count)
4126 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4129 static HRESULT STDMETHODCALLTYPE d3d10_effect_string_variable_GetRawValue(ID3D10EffectStringVariable *iface,
4130 void *data, UINT offset, UINT count)
4132 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4135 /* ID3D10EffectStringVariable methods */
4137 static HRESULT STDMETHODCALLTYPE d3d10_effect_string_variable_GetString(ID3D10EffectStringVariable *iface,
4138 LPCSTR *str)
4140 FIXME("iface %p, str %p stub!\n", iface, str);
4142 return E_NOTIMPL;
4145 static HRESULT STDMETHODCALLTYPE d3d10_effect_string_variable_GetStringArray(ID3D10EffectStringVariable *iface,
4146 LPCSTR *strs, UINT offset, UINT count)
4148 FIXME("iface %p, strs %p, offset %u, count %u stub!\n", iface, strs, offset, count);
4150 return E_NOTIMPL;
4154 static const struct ID3D10EffectStringVariableVtbl d3d10_effect_string_variable_vtbl =
4156 /* ID3D10EffectVariable methods */
4157 d3d10_effect_string_variable_IsValid,
4158 d3d10_effect_string_variable_GetType,
4159 d3d10_effect_string_variable_GetDesc,
4160 d3d10_effect_string_variable_GetAnnotationByIndex,
4161 d3d10_effect_string_variable_GetAnnotationByName,
4162 d3d10_effect_string_variable_GetMemberByIndex,
4163 d3d10_effect_string_variable_GetMemberByName,
4164 d3d10_effect_string_variable_GetMemberBySemantic,
4165 d3d10_effect_string_variable_GetElement,
4166 d3d10_effect_string_variable_GetParentConstantBuffer,
4167 d3d10_effect_string_variable_AsScalar,
4168 d3d10_effect_string_variable_AsVector,
4169 d3d10_effect_string_variable_AsMatrix,
4170 d3d10_effect_string_variable_AsString,
4171 d3d10_effect_string_variable_AsShaderResource,
4172 d3d10_effect_string_variable_AsRenderTargetView,
4173 d3d10_effect_string_variable_AsDepthStencilView,
4174 d3d10_effect_string_variable_AsConstantBuffer,
4175 d3d10_effect_string_variable_AsShader,
4176 d3d10_effect_string_variable_AsBlend,
4177 d3d10_effect_string_variable_AsDepthStencil,
4178 d3d10_effect_string_variable_AsRasterizer,
4179 d3d10_effect_string_variable_AsSampler,
4180 d3d10_effect_string_variable_SetRawValue,
4181 d3d10_effect_string_variable_GetRawValue,
4182 /* ID3D10EffectStringVariable methods */
4183 d3d10_effect_string_variable_GetString,
4184 d3d10_effect_string_variable_GetStringArray,
4187 /* ID3D10EffectVariable methods */
4189 static BOOL STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_IsValid(ID3D10EffectShaderResourceVariable *iface)
4191 TRACE("iface %p\n", iface);
4193 return (struct d3d10_effect_variable *)iface != &null_shader_resource_variable;
4196 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetType(
4197 ID3D10EffectShaderResourceVariable *iface)
4199 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
4202 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetDesc(
4203 ID3D10EffectShaderResourceVariable *iface, D3D10_EFFECT_VARIABLE_DESC *desc)
4205 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
4208 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetAnnotationByIndex(
4209 ID3D10EffectShaderResourceVariable *iface, UINT index)
4211 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
4214 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetAnnotationByName(
4215 ID3D10EffectShaderResourceVariable *iface, LPCSTR name)
4217 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
4220 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetMemberByIndex(
4221 ID3D10EffectShaderResourceVariable *iface, UINT index)
4223 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
4226 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetMemberByName(
4227 ID3D10EffectShaderResourceVariable *iface, LPCSTR name)
4229 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
4232 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetMemberBySemantic(
4233 ID3D10EffectShaderResourceVariable *iface, LPCSTR semantic)
4235 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
4238 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetElement(
4239 ID3D10EffectShaderResourceVariable *iface, UINT index)
4241 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
4244 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetParentConstantBuffer(
4245 ID3D10EffectShaderResourceVariable *iface)
4247 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
4250 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsScalar(
4251 ID3D10EffectShaderResourceVariable *iface)
4253 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
4256 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsVector(
4257 ID3D10EffectShaderResourceVariable *iface)
4259 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
4262 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsMatrix(
4263 ID3D10EffectShaderResourceVariable *iface)
4265 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
4268 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsString(
4269 ID3D10EffectShaderResourceVariable *iface)
4271 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
4274 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsShaderResource(
4275 ID3D10EffectShaderResourceVariable *iface)
4277 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
4280 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsRenderTargetView(
4281 ID3D10EffectShaderResourceVariable *iface)
4283 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
4286 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsDepthStencilView(
4287 ID3D10EffectShaderResourceVariable *iface)
4289 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
4292 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsConstantBuffer(
4293 ID3D10EffectShaderResourceVariable *iface)
4295 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
4298 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsShader(
4299 ID3D10EffectShaderResourceVariable *iface)
4301 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
4304 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsBlend(
4305 ID3D10EffectShaderResourceVariable *iface)
4307 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
4310 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsDepthStencil(
4311 ID3D10EffectShaderResourceVariable *iface)
4313 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
4316 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsRasterizer(
4317 ID3D10EffectShaderResourceVariable *iface)
4319 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
4322 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsSampler(
4323 ID3D10EffectShaderResourceVariable *iface)
4325 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
4328 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_SetRawValue(
4329 ID3D10EffectShaderResourceVariable *iface, void *data, UINT offset, UINT count)
4331 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4334 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetRawValue(
4335 ID3D10EffectShaderResourceVariable *iface, void *data, UINT offset, UINT count)
4337 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4340 /* ID3D10EffectShaderResourceVariable methods */
4342 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_SetResource(
4343 ID3D10EffectShaderResourceVariable *iface, ID3D10ShaderResourceView *resource)
4345 FIXME("iface %p, resource %p stub!\n", iface, resource);
4347 return E_NOTIMPL;
4350 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetResource(
4351 ID3D10EffectShaderResourceVariable *iface, ID3D10ShaderResourceView **resource)
4353 FIXME("iface %p, resource %p stub!\n", iface, resource);
4355 return E_NOTIMPL;
4358 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_SetResourceArray(
4359 ID3D10EffectShaderResourceVariable *iface, ID3D10ShaderResourceView **resources, UINT offset, UINT count)
4361 FIXME("iface %p, resources %p, offset %u, count %u stub!\n", iface, resources, offset, count);
4363 return E_NOTIMPL;
4366 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetResourceArray(
4367 ID3D10EffectShaderResourceVariable *iface, ID3D10ShaderResourceView **resources, UINT offset, UINT count)
4369 FIXME("iface %p, resources %p, offset %u, count %u stub!\n", iface, resources, offset, count);
4371 return E_NOTIMPL;
4375 static const struct ID3D10EffectShaderResourceVariableVtbl d3d10_effect_shader_resource_variable_vtbl =
4377 /* ID3D10EffectVariable methods */
4378 d3d10_effect_shader_resource_variable_IsValid,
4379 d3d10_effect_shader_resource_variable_GetType,
4380 d3d10_effect_shader_resource_variable_GetDesc,
4381 d3d10_effect_shader_resource_variable_GetAnnotationByIndex,
4382 d3d10_effect_shader_resource_variable_GetAnnotationByName,
4383 d3d10_effect_shader_resource_variable_GetMemberByIndex,
4384 d3d10_effect_shader_resource_variable_GetMemberByName,
4385 d3d10_effect_shader_resource_variable_GetMemberBySemantic,
4386 d3d10_effect_shader_resource_variable_GetElement,
4387 d3d10_effect_shader_resource_variable_GetParentConstantBuffer,
4388 d3d10_effect_shader_resource_variable_AsScalar,
4389 d3d10_effect_shader_resource_variable_AsVector,
4390 d3d10_effect_shader_resource_variable_AsMatrix,
4391 d3d10_effect_shader_resource_variable_AsString,
4392 d3d10_effect_shader_resource_variable_AsShaderResource,
4393 d3d10_effect_shader_resource_variable_AsRenderTargetView,
4394 d3d10_effect_shader_resource_variable_AsDepthStencilView,
4395 d3d10_effect_shader_resource_variable_AsConstantBuffer,
4396 d3d10_effect_shader_resource_variable_AsShader,
4397 d3d10_effect_shader_resource_variable_AsBlend,
4398 d3d10_effect_shader_resource_variable_AsDepthStencil,
4399 d3d10_effect_shader_resource_variable_AsRasterizer,
4400 d3d10_effect_shader_resource_variable_AsSampler,
4401 d3d10_effect_shader_resource_variable_SetRawValue,
4402 d3d10_effect_shader_resource_variable_GetRawValue,
4403 /* ID3D10EffectShaderResourceVariable methods */
4404 d3d10_effect_shader_resource_variable_SetResource,
4405 d3d10_effect_shader_resource_variable_GetResource,
4406 d3d10_effect_shader_resource_variable_SetResourceArray,
4407 d3d10_effect_shader_resource_variable_GetResourceArray,
4410 /* ID3D10EffectVariable methods */
4412 static BOOL STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_IsValid(
4413 ID3D10EffectRenderTargetViewVariable *iface)
4415 TRACE("iface %p\n", iface);
4417 return (struct d3d10_effect_variable *)iface != &null_render_target_view_variable;
4420 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetType(
4421 ID3D10EffectRenderTargetViewVariable *iface)
4423 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
4426 static HRESULT STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetDesc(
4427 ID3D10EffectRenderTargetViewVariable *iface, D3D10_EFFECT_VARIABLE_DESC *desc)
4429 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
4432 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetAnnotationByIndex(
4433 ID3D10EffectRenderTargetViewVariable *iface, UINT index)
4435 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
4438 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetAnnotationByName(
4439 ID3D10EffectRenderTargetViewVariable *iface, LPCSTR name)
4441 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
4444 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetMemberByIndex(
4445 ID3D10EffectRenderTargetViewVariable *iface, UINT index)
4447 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
4450 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetMemberByName(
4451 ID3D10EffectRenderTargetViewVariable *iface, LPCSTR name)
4453 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
4456 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetMemberBySemantic(
4457 ID3D10EffectRenderTargetViewVariable *iface, LPCSTR semantic)
4459 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
4462 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetElement(
4463 ID3D10EffectRenderTargetViewVariable *iface, UINT index)
4465 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
4468 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetParentConstantBuffer(
4469 ID3D10EffectRenderTargetViewVariable *iface)
4471 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
4474 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsScalar(
4475 ID3D10EffectRenderTargetViewVariable *iface)
4477 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
4480 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsVector(
4481 ID3D10EffectRenderTargetViewVariable *iface)
4483 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
4486 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsMatrix(
4487 ID3D10EffectRenderTargetViewVariable *iface)
4489 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
4492 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsString(
4493 ID3D10EffectRenderTargetViewVariable *iface)
4495 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
4498 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsShaderResource(
4499 ID3D10EffectRenderTargetViewVariable *iface)
4501 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
4504 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsRenderTargetView(
4505 ID3D10EffectRenderTargetViewVariable *iface)
4507 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
4510 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsDepthStencilView(
4511 ID3D10EffectRenderTargetViewVariable *iface)
4513 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
4516 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsConstantBuffer(
4517 ID3D10EffectRenderTargetViewVariable *iface)
4519 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
4522 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsShader(
4523 ID3D10EffectRenderTargetViewVariable *iface)
4525 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
4528 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsBlend(
4529 ID3D10EffectRenderTargetViewVariable *iface)
4531 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
4534 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsDepthStencil(
4535 ID3D10EffectRenderTargetViewVariable *iface)
4537 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
4540 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsRasterizer(
4541 ID3D10EffectRenderTargetViewVariable *iface)
4543 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
4546 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsSampler(
4547 ID3D10EffectRenderTargetViewVariable *iface)
4549 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
4552 static HRESULT STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_SetRawValue(
4553 ID3D10EffectRenderTargetViewVariable *iface, void *data, UINT offset, UINT count)
4555 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4558 static HRESULT STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetRawValue(
4559 ID3D10EffectRenderTargetViewVariable *iface, void *data, UINT offset, UINT count)
4561 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4564 /* ID3D10EffectRenderTargetViewVariable methods */
4566 static HRESULT STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_SetRenderTarget(
4567 ID3D10EffectRenderTargetViewVariable *iface, ID3D10RenderTargetView *view)
4569 FIXME("iface %p, view %p stub!\n", iface, view);
4571 return E_NOTIMPL;
4574 static HRESULT STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetRenderTarget(
4575 ID3D10EffectRenderTargetViewVariable *iface, ID3D10RenderTargetView **view)
4577 FIXME("iface %p, view %p stub!\n", iface, view);
4579 return E_NOTIMPL;
4582 static HRESULT STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_SetRenderTargetArray(
4583 ID3D10EffectRenderTargetViewVariable *iface, ID3D10RenderTargetView **views, UINT offset, UINT count)
4585 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface, views, offset, count);
4587 return E_NOTIMPL;
4590 static HRESULT STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetRenderTargetArray(
4591 ID3D10EffectRenderTargetViewVariable *iface, ID3D10RenderTargetView **views, UINT offset, UINT count)
4593 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface, views, offset, count);
4595 return E_NOTIMPL;
4599 static const struct ID3D10EffectRenderTargetViewVariableVtbl d3d10_effect_render_target_view_variable_vtbl =
4601 /* ID3D10EffectVariable methods */
4602 d3d10_effect_render_target_view_variable_IsValid,
4603 d3d10_effect_render_target_view_variable_GetType,
4604 d3d10_effect_render_target_view_variable_GetDesc,
4605 d3d10_effect_render_target_view_variable_GetAnnotationByIndex,
4606 d3d10_effect_render_target_view_variable_GetAnnotationByName,
4607 d3d10_effect_render_target_view_variable_GetMemberByIndex,
4608 d3d10_effect_render_target_view_variable_GetMemberByName,
4609 d3d10_effect_render_target_view_variable_GetMemberBySemantic,
4610 d3d10_effect_render_target_view_variable_GetElement,
4611 d3d10_effect_render_target_view_variable_GetParentConstantBuffer,
4612 d3d10_effect_render_target_view_variable_AsScalar,
4613 d3d10_effect_render_target_view_variable_AsVector,
4614 d3d10_effect_render_target_view_variable_AsMatrix,
4615 d3d10_effect_render_target_view_variable_AsString,
4616 d3d10_effect_render_target_view_variable_AsShaderResource,
4617 d3d10_effect_render_target_view_variable_AsRenderTargetView,
4618 d3d10_effect_render_target_view_variable_AsDepthStencilView,
4619 d3d10_effect_render_target_view_variable_AsConstantBuffer,
4620 d3d10_effect_render_target_view_variable_AsShader,
4621 d3d10_effect_render_target_view_variable_AsBlend,
4622 d3d10_effect_render_target_view_variable_AsDepthStencil,
4623 d3d10_effect_render_target_view_variable_AsRasterizer,
4624 d3d10_effect_render_target_view_variable_AsSampler,
4625 d3d10_effect_render_target_view_variable_SetRawValue,
4626 d3d10_effect_render_target_view_variable_GetRawValue,
4627 /* ID3D10EffectRenderTargetViewVariable methods */
4628 d3d10_effect_render_target_view_variable_SetRenderTarget,
4629 d3d10_effect_render_target_view_variable_GetRenderTarget,
4630 d3d10_effect_render_target_view_variable_SetRenderTargetArray,
4631 d3d10_effect_render_target_view_variable_GetRenderTargetArray,
4634 /* ID3D10EffectVariable methods */
4636 static BOOL STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_IsValid(
4637 ID3D10EffectDepthStencilViewVariable *iface)
4639 TRACE("iface %p\n", iface);
4641 return (struct d3d10_effect_variable *)iface != &null_depth_stencil_view_variable;
4644 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetType(
4645 ID3D10EffectDepthStencilViewVariable *iface)
4647 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
4650 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetDesc(
4651 ID3D10EffectDepthStencilViewVariable *iface, D3D10_EFFECT_VARIABLE_DESC *desc)
4653 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
4656 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetAnnotationByIndex(
4657 ID3D10EffectDepthStencilViewVariable *iface, UINT index)
4659 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
4662 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetAnnotationByName(
4663 ID3D10EffectDepthStencilViewVariable *iface, LPCSTR name)
4665 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
4668 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetMemberByIndex(
4669 ID3D10EffectDepthStencilViewVariable *iface, UINT index)
4671 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
4674 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetMemberByName(
4675 ID3D10EffectDepthStencilViewVariable *iface, LPCSTR name)
4677 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
4680 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetMemberBySemantic(
4681 ID3D10EffectDepthStencilViewVariable *iface, LPCSTR semantic)
4683 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
4686 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetElement(
4687 ID3D10EffectDepthStencilViewVariable *iface, UINT index)
4689 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
4692 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetParentConstantBuffer(
4693 ID3D10EffectDepthStencilViewVariable *iface)
4695 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
4698 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsScalar(
4699 ID3D10EffectDepthStencilViewVariable *iface)
4701 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
4704 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsVector(
4705 ID3D10EffectDepthStencilViewVariable *iface)
4707 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
4710 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsMatrix(
4711 ID3D10EffectDepthStencilViewVariable *iface)
4713 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
4716 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsString(
4717 ID3D10EffectDepthStencilViewVariable *iface)
4719 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
4722 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsShaderResource(
4723 ID3D10EffectDepthStencilViewVariable *iface)
4725 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
4728 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsRenderTargetView(
4729 ID3D10EffectDepthStencilViewVariable *iface)
4731 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
4734 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsDepthStencilView(
4735 ID3D10EffectDepthStencilViewVariable *iface)
4737 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
4740 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsConstantBuffer(
4741 ID3D10EffectDepthStencilViewVariable *iface)
4743 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
4746 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsShader(
4747 ID3D10EffectDepthStencilViewVariable *iface)
4749 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
4752 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsBlend(
4753 ID3D10EffectDepthStencilViewVariable *iface)
4755 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
4758 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsDepthStencil(
4759 ID3D10EffectDepthStencilViewVariable *iface)
4761 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
4764 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsRasterizer(
4765 ID3D10EffectDepthStencilViewVariable *iface)
4767 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
4770 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsSampler(
4771 ID3D10EffectDepthStencilViewVariable *iface)
4773 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
4776 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_SetRawValue(
4777 ID3D10EffectDepthStencilViewVariable *iface, void *data, UINT offset, UINT count)
4779 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4782 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetRawValue(
4783 ID3D10EffectDepthStencilViewVariable *iface, void *data, UINT offset, UINT count)
4785 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4788 /* ID3D10EffectDepthStencilViewVariable methods */
4790 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_SetDepthStencil(
4791 ID3D10EffectDepthStencilViewVariable *iface, ID3D10DepthStencilView *view)
4793 FIXME("iface %p, view %p stub!\n", iface, view);
4795 return E_NOTIMPL;
4798 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetDepthStencil(
4799 ID3D10EffectDepthStencilViewVariable *iface, ID3D10DepthStencilView **view)
4801 FIXME("iface %p, view %p stub!\n", iface, view);
4803 return E_NOTIMPL;
4806 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_SetDepthStencilArray(
4807 ID3D10EffectDepthStencilViewVariable *iface, ID3D10DepthStencilView **views, UINT offset, UINT count)
4809 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface, views, offset, count);
4811 return E_NOTIMPL;
4814 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetDepthStencilArray(
4815 ID3D10EffectDepthStencilViewVariable *iface, ID3D10DepthStencilView **views, UINT offset, UINT count)
4817 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface, views, offset, count);
4819 return E_NOTIMPL;
4823 static const struct ID3D10EffectDepthStencilViewVariableVtbl d3d10_effect_depth_stencil_view_variable_vtbl =
4825 /* ID3D10EffectVariable methods */
4826 d3d10_effect_depth_stencil_view_variable_IsValid,
4827 d3d10_effect_depth_stencil_view_variable_GetType,
4828 d3d10_effect_depth_stencil_view_variable_GetDesc,
4829 d3d10_effect_depth_stencil_view_variable_GetAnnotationByIndex,
4830 d3d10_effect_depth_stencil_view_variable_GetAnnotationByName,
4831 d3d10_effect_depth_stencil_view_variable_GetMemberByIndex,
4832 d3d10_effect_depth_stencil_view_variable_GetMemberByName,
4833 d3d10_effect_depth_stencil_view_variable_GetMemberBySemantic,
4834 d3d10_effect_depth_stencil_view_variable_GetElement,
4835 d3d10_effect_depth_stencil_view_variable_GetParentConstantBuffer,
4836 d3d10_effect_depth_stencil_view_variable_AsScalar,
4837 d3d10_effect_depth_stencil_view_variable_AsVector,
4838 d3d10_effect_depth_stencil_view_variable_AsMatrix,
4839 d3d10_effect_depth_stencil_view_variable_AsString,
4840 d3d10_effect_depth_stencil_view_variable_AsShaderResource,
4841 d3d10_effect_depth_stencil_view_variable_AsRenderTargetView,
4842 d3d10_effect_depth_stencil_view_variable_AsDepthStencilView,
4843 d3d10_effect_depth_stencil_view_variable_AsConstantBuffer,
4844 d3d10_effect_depth_stencil_view_variable_AsShader,
4845 d3d10_effect_depth_stencil_view_variable_AsBlend,
4846 d3d10_effect_depth_stencil_view_variable_AsDepthStencil,
4847 d3d10_effect_depth_stencil_view_variable_AsRasterizer,
4848 d3d10_effect_depth_stencil_view_variable_AsSampler,
4849 d3d10_effect_depth_stencil_view_variable_SetRawValue,
4850 d3d10_effect_depth_stencil_view_variable_GetRawValue,
4851 /* ID3D10EffectDepthStencilViewVariable methods */
4852 d3d10_effect_depth_stencil_view_variable_SetDepthStencil,
4853 d3d10_effect_depth_stencil_view_variable_GetDepthStencil,
4854 d3d10_effect_depth_stencil_view_variable_SetDepthStencilArray,
4855 d3d10_effect_depth_stencil_view_variable_GetDepthStencilArray,
4858 /* ID3D10EffectVariable methods */
4860 static BOOL STDMETHODCALLTYPE d3d10_effect_shader_variable_IsValid(ID3D10EffectShaderVariable *iface)
4862 TRACE("iface %p\n", iface);
4864 return (struct d3d10_effect_variable *)iface != &null_shader_variable;
4867 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetType(
4868 ID3D10EffectShaderVariable *iface)
4870 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
4873 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetDesc(ID3D10EffectShaderVariable *iface,
4874 D3D10_EFFECT_VARIABLE_DESC *desc)
4876 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
4879 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetAnnotationByIndex(
4880 ID3D10EffectShaderVariable *iface, UINT index)
4882 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
4885 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetAnnotationByName(
4886 ID3D10EffectShaderVariable *iface, LPCSTR name)
4888 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
4891 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetMemberByIndex(
4892 ID3D10EffectShaderVariable *iface, UINT index)
4894 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
4897 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetMemberByName(
4898 ID3D10EffectShaderVariable *iface, LPCSTR name)
4900 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
4903 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetMemberBySemantic(
4904 ID3D10EffectShaderVariable *iface, LPCSTR semantic)
4906 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
4909 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetElement(
4910 ID3D10EffectShaderVariable *iface, UINT index)
4912 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
4915 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetParentConstantBuffer(
4916 ID3D10EffectShaderVariable *iface)
4918 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
4921 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsScalar(
4922 ID3D10EffectShaderVariable *iface)
4924 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
4927 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsVector(
4928 ID3D10EffectShaderVariable *iface)
4930 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
4933 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsMatrix(
4934 ID3D10EffectShaderVariable *iface)
4936 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
4939 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsString(
4940 ID3D10EffectShaderVariable *iface)
4942 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
4945 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsShaderResource(
4946 ID3D10EffectShaderVariable *iface)
4948 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
4951 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsRenderTargetView(
4952 ID3D10EffectShaderVariable *iface)
4954 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
4957 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsDepthStencilView(
4958 ID3D10EffectShaderVariable *iface)
4960 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
4963 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsConstantBuffer(
4964 ID3D10EffectShaderVariable *iface)
4966 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
4969 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsShader(
4970 ID3D10EffectShaderVariable *iface)
4972 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
4975 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsBlend(
4976 ID3D10EffectShaderVariable *iface)
4978 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
4981 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsDepthStencil(
4982 ID3D10EffectShaderVariable *iface)
4984 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
4987 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsRasterizer(
4988 ID3D10EffectShaderVariable *iface)
4990 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
4993 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsSampler(
4994 ID3D10EffectShaderVariable *iface)
4996 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
4999 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_SetRawValue(
5000 ID3D10EffectShaderVariable *iface, void *data, UINT offset, UINT count)
5002 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5005 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetRawValue(
5006 ID3D10EffectShaderVariable *iface, void *data, UINT offset, UINT count)
5008 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5011 /* ID3D10EffectShaderVariable methods */
5013 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetShaderDesc(
5014 ID3D10EffectShaderVariable *iface, UINT index, D3D10_EFFECT_SHADER_DESC *desc)
5016 FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc);
5018 return E_NOTIMPL;
5021 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetVertexShader(
5022 ID3D10EffectShaderVariable *iface, UINT index, ID3D10VertexShader **shader)
5024 FIXME("iface %p, index %u, shader %p stub!\n", iface, index, shader);
5026 return E_NOTIMPL;
5029 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetGeometryShader(
5030 ID3D10EffectShaderVariable *iface, UINT index, ID3D10GeometryShader **shader)
5032 FIXME("iface %p, index %u, shader %p stub!\n", iface, index, shader);
5034 return E_NOTIMPL;
5037 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetPixelShader(
5038 ID3D10EffectShaderVariable *iface, UINT index, ID3D10PixelShader **shader)
5040 FIXME("iface %p, index %u, shader %p stub!\n", iface, index, shader);
5042 return E_NOTIMPL;
5045 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetInputSignatureElementDesc(
5046 ID3D10EffectShaderVariable *iface, UINT shader_index, UINT element_index,
5047 D3D10_SIGNATURE_PARAMETER_DESC *desc)
5049 FIXME("iface %p, shader_index %u, element_index %u, desc %p stub!\n",
5050 iface, shader_index, element_index, desc);
5052 return E_NOTIMPL;
5055 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetOutputSignatureElementDesc(
5056 ID3D10EffectShaderVariable *iface, UINT shader_index, UINT element_index,
5057 D3D10_SIGNATURE_PARAMETER_DESC *desc)
5059 FIXME("iface %p, shader_index %u, element_index %u, desc %p stub!\n",
5060 iface, shader_index, element_index, desc);
5062 return E_NOTIMPL;
5066 static const struct ID3D10EffectShaderVariableVtbl d3d10_effect_shader_variable_vtbl =
5068 /* ID3D10EffectVariable methods */
5069 d3d10_effect_shader_variable_IsValid,
5070 d3d10_effect_shader_variable_GetType,
5071 d3d10_effect_shader_variable_GetDesc,
5072 d3d10_effect_shader_variable_GetAnnotationByIndex,
5073 d3d10_effect_shader_variable_GetAnnotationByName,
5074 d3d10_effect_shader_variable_GetMemberByIndex,
5075 d3d10_effect_shader_variable_GetMemberByName,
5076 d3d10_effect_shader_variable_GetMemberBySemantic,
5077 d3d10_effect_shader_variable_GetElement,
5078 d3d10_effect_shader_variable_GetParentConstantBuffer,
5079 d3d10_effect_shader_variable_AsScalar,
5080 d3d10_effect_shader_variable_AsVector,
5081 d3d10_effect_shader_variable_AsMatrix,
5082 d3d10_effect_shader_variable_AsString,
5083 d3d10_effect_shader_variable_AsShaderResource,
5084 d3d10_effect_shader_variable_AsRenderTargetView,
5085 d3d10_effect_shader_variable_AsDepthStencilView,
5086 d3d10_effect_shader_variable_AsConstantBuffer,
5087 d3d10_effect_shader_variable_AsShader,
5088 d3d10_effect_shader_variable_AsBlend,
5089 d3d10_effect_shader_variable_AsDepthStencil,
5090 d3d10_effect_shader_variable_AsRasterizer,
5091 d3d10_effect_shader_variable_AsSampler,
5092 d3d10_effect_shader_variable_SetRawValue,
5093 d3d10_effect_shader_variable_GetRawValue,
5094 /* ID3D10EffectShaderVariable methods */
5095 d3d10_effect_shader_variable_GetShaderDesc,
5096 d3d10_effect_shader_variable_GetVertexShader,
5097 d3d10_effect_shader_variable_GetGeometryShader,
5098 d3d10_effect_shader_variable_GetPixelShader,
5099 d3d10_effect_shader_variable_GetInputSignatureElementDesc,
5100 d3d10_effect_shader_variable_GetOutputSignatureElementDesc,
5103 /* ID3D10EffectVariable methods */
5105 static BOOL STDMETHODCALLTYPE d3d10_effect_blend_variable_IsValid(ID3D10EffectBlendVariable *iface)
5107 TRACE("iface %p\n", iface);
5109 return (struct d3d10_effect_variable *)iface != &null_blend_variable;
5112 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetType(
5113 ID3D10EffectBlendVariable *iface)
5115 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
5118 static HRESULT STDMETHODCALLTYPE d3d10_effect_blend_variable_GetDesc(ID3D10EffectBlendVariable *iface,
5119 D3D10_EFFECT_VARIABLE_DESC *desc)
5121 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
5124 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetAnnotationByIndex(
5125 ID3D10EffectBlendVariable *iface, UINT index)
5127 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
5130 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetAnnotationByName(
5131 ID3D10EffectBlendVariable *iface, LPCSTR name)
5133 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
5136 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetMemberByIndex(
5137 ID3D10EffectBlendVariable *iface, UINT index)
5139 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
5142 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetMemberByName(
5143 ID3D10EffectBlendVariable *iface, LPCSTR name)
5145 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
5148 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetMemberBySemantic(
5149 ID3D10EffectBlendVariable *iface, LPCSTR semantic)
5151 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
5154 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetElement(
5155 ID3D10EffectBlendVariable *iface, UINT index)
5157 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
5160 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetParentConstantBuffer(
5161 ID3D10EffectBlendVariable *iface)
5163 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
5166 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsScalar(
5167 ID3D10EffectBlendVariable *iface)
5169 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
5172 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsVector(
5173 ID3D10EffectBlendVariable *iface)
5175 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
5178 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsMatrix(
5179 ID3D10EffectBlendVariable *iface)
5181 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
5184 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsString(
5185 ID3D10EffectBlendVariable *iface)
5187 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
5190 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsShaderResource(
5191 ID3D10EffectBlendVariable *iface)
5193 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
5196 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsRenderTargetView(
5197 ID3D10EffectBlendVariable *iface)
5199 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
5202 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsDepthStencilView(
5203 ID3D10EffectBlendVariable *iface)
5205 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
5208 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsConstantBuffer(
5209 ID3D10EffectBlendVariable *iface)
5211 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
5214 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsShader(
5215 ID3D10EffectBlendVariable *iface)
5217 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
5220 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsBlend(
5221 ID3D10EffectBlendVariable *iface)
5223 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
5226 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsDepthStencil(
5227 ID3D10EffectBlendVariable *iface)
5229 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
5232 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsRasterizer(
5233 ID3D10EffectBlendVariable *iface)
5235 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
5238 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsSampler(
5239 ID3D10EffectBlendVariable *iface)
5241 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
5244 static HRESULT STDMETHODCALLTYPE d3d10_effect_blend_variable_SetRawValue(ID3D10EffectBlendVariable *iface,
5245 void *data, UINT offset, UINT count)
5247 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5250 static HRESULT STDMETHODCALLTYPE d3d10_effect_blend_variable_GetRawValue(ID3D10EffectBlendVariable *iface,
5251 void *data, UINT offset, UINT count)
5253 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5256 /* ID3D10EffectBlendVariable methods */
5258 static HRESULT STDMETHODCALLTYPE d3d10_effect_blend_variable_GetBlendState(ID3D10EffectBlendVariable *iface,
5259 UINT index, ID3D10BlendState **blend_state)
5261 FIXME("iface %p, index %u, blend_state %p stub!\n", iface, index, blend_state);
5263 return E_NOTIMPL;
5266 static HRESULT STDMETHODCALLTYPE d3d10_effect_blend_variable_GetBackingStore(ID3D10EffectBlendVariable *iface,
5267 UINT index, D3D10_BLEND_DESC *desc)
5269 FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc);
5271 return E_NOTIMPL;
5275 static const struct ID3D10EffectBlendVariableVtbl d3d10_effect_blend_variable_vtbl =
5277 /* ID3D10EffectVariable methods */
5278 d3d10_effect_blend_variable_IsValid,
5279 d3d10_effect_blend_variable_GetType,
5280 d3d10_effect_blend_variable_GetDesc,
5281 d3d10_effect_blend_variable_GetAnnotationByIndex,
5282 d3d10_effect_blend_variable_GetAnnotationByName,
5283 d3d10_effect_blend_variable_GetMemberByIndex,
5284 d3d10_effect_blend_variable_GetMemberByName,
5285 d3d10_effect_blend_variable_GetMemberBySemantic,
5286 d3d10_effect_blend_variable_GetElement,
5287 d3d10_effect_blend_variable_GetParentConstantBuffer,
5288 d3d10_effect_blend_variable_AsScalar,
5289 d3d10_effect_blend_variable_AsVector,
5290 d3d10_effect_blend_variable_AsMatrix,
5291 d3d10_effect_blend_variable_AsString,
5292 d3d10_effect_blend_variable_AsShaderResource,
5293 d3d10_effect_blend_variable_AsRenderTargetView,
5294 d3d10_effect_blend_variable_AsDepthStencilView,
5295 d3d10_effect_blend_variable_AsConstantBuffer,
5296 d3d10_effect_blend_variable_AsShader,
5297 d3d10_effect_blend_variable_AsBlend,
5298 d3d10_effect_blend_variable_AsDepthStencil,
5299 d3d10_effect_blend_variable_AsRasterizer,
5300 d3d10_effect_blend_variable_AsSampler,
5301 d3d10_effect_blend_variable_SetRawValue,
5302 d3d10_effect_blend_variable_GetRawValue,
5303 /* ID3D10EffectBlendVariable methods */
5304 d3d10_effect_blend_variable_GetBlendState,
5305 d3d10_effect_blend_variable_GetBackingStore,
5308 /* ID3D10EffectVariable methods */
5310 static BOOL STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_IsValid(ID3D10EffectDepthStencilVariable *iface)
5312 TRACE("iface %p\n", iface);
5314 return (struct d3d10_effect_variable *)iface != &null_depth_stencil_variable;
5317 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetType(
5318 ID3D10EffectDepthStencilVariable *iface)
5320 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
5323 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetDesc(ID3D10EffectDepthStencilVariable *iface,
5324 D3D10_EFFECT_VARIABLE_DESC *desc)
5326 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
5329 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetAnnotationByIndex(
5330 ID3D10EffectDepthStencilVariable *iface, UINT index)
5332 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
5335 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetAnnotationByName(
5336 ID3D10EffectDepthStencilVariable *iface, LPCSTR name)
5338 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
5341 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetMemberByIndex(
5342 ID3D10EffectDepthStencilVariable *iface, UINT index)
5344 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
5347 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetMemberByName(
5348 ID3D10EffectDepthStencilVariable *iface, LPCSTR name)
5350 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
5353 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetMemberBySemantic(
5354 ID3D10EffectDepthStencilVariable *iface, LPCSTR semantic)
5356 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
5359 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetElement(
5360 ID3D10EffectDepthStencilVariable *iface, UINT index)
5362 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
5365 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetParentConstantBuffer(
5366 ID3D10EffectDepthStencilVariable *iface)
5368 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
5371 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsScalar(
5372 ID3D10EffectDepthStencilVariable *iface)
5374 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
5377 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsVector(
5378 ID3D10EffectDepthStencilVariable *iface)
5380 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
5383 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsMatrix(
5384 ID3D10EffectDepthStencilVariable *iface)
5386 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
5389 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsString(
5390 ID3D10EffectDepthStencilVariable *iface)
5392 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
5395 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsShaderResource(
5396 ID3D10EffectDepthStencilVariable *iface)
5398 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
5401 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsRenderTargetView(
5402 ID3D10EffectDepthStencilVariable *iface)
5404 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
5407 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsDepthStencilView(
5408 ID3D10EffectDepthStencilVariable *iface)
5410 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
5413 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsConstantBuffer(
5414 ID3D10EffectDepthStencilVariable *iface)
5416 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
5419 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsShader(
5420 ID3D10EffectDepthStencilVariable *iface)
5422 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
5425 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsBlend(
5426 ID3D10EffectDepthStencilVariable *iface)
5428 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
5431 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsDepthStencil(
5432 ID3D10EffectDepthStencilVariable *iface)
5434 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
5437 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsRasterizer(
5438 ID3D10EffectDepthStencilVariable *iface)
5440 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
5443 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsSampler(
5444 ID3D10EffectDepthStencilVariable *iface)
5446 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
5449 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_SetRawValue(ID3D10EffectDepthStencilVariable *iface,
5450 void *data, UINT offset, UINT count)
5452 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5455 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetRawValue(ID3D10EffectDepthStencilVariable *iface,
5456 void *data, UINT offset, UINT count)
5458 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5461 /* ID3D10EffectDepthStencilVariable methods */
5463 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetDepthStencilState(ID3D10EffectDepthStencilVariable *iface,
5464 UINT index, ID3D10DepthStencilState **depth_stencil_state)
5466 FIXME("iface %p, index %u, depth_stencil_state %p stub!\n", iface, index, depth_stencil_state);
5468 return E_NOTIMPL;
5471 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetBackingStore(ID3D10EffectDepthStencilVariable *iface,
5472 UINT index, D3D10_DEPTH_STENCIL_DESC *desc)
5474 FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc);
5476 return E_NOTIMPL;
5480 static const struct ID3D10EffectDepthStencilVariableVtbl d3d10_effect_depth_stencil_variable_vtbl =
5482 /* ID3D10EffectVariable methods */
5483 d3d10_effect_depth_stencil_variable_IsValid,
5484 d3d10_effect_depth_stencil_variable_GetType,
5485 d3d10_effect_depth_stencil_variable_GetDesc,
5486 d3d10_effect_depth_stencil_variable_GetAnnotationByIndex,
5487 d3d10_effect_depth_stencil_variable_GetAnnotationByName,
5488 d3d10_effect_depth_stencil_variable_GetMemberByIndex,
5489 d3d10_effect_depth_stencil_variable_GetMemberByName,
5490 d3d10_effect_depth_stencil_variable_GetMemberBySemantic,
5491 d3d10_effect_depth_stencil_variable_GetElement,
5492 d3d10_effect_depth_stencil_variable_GetParentConstantBuffer,
5493 d3d10_effect_depth_stencil_variable_AsScalar,
5494 d3d10_effect_depth_stencil_variable_AsVector,
5495 d3d10_effect_depth_stencil_variable_AsMatrix,
5496 d3d10_effect_depth_stencil_variable_AsString,
5497 d3d10_effect_depth_stencil_variable_AsShaderResource,
5498 d3d10_effect_depth_stencil_variable_AsRenderTargetView,
5499 d3d10_effect_depth_stencil_variable_AsDepthStencilView,
5500 d3d10_effect_depth_stencil_variable_AsConstantBuffer,
5501 d3d10_effect_depth_stencil_variable_AsShader,
5502 d3d10_effect_depth_stencil_variable_AsBlend,
5503 d3d10_effect_depth_stencil_variable_AsDepthStencil,
5504 d3d10_effect_depth_stencil_variable_AsRasterizer,
5505 d3d10_effect_depth_stencil_variable_AsSampler,
5506 d3d10_effect_depth_stencil_variable_SetRawValue,
5507 d3d10_effect_depth_stencil_variable_GetRawValue,
5508 /* ID3D10EffectDepthStencilVariable methods */
5509 d3d10_effect_depth_stencil_variable_GetDepthStencilState,
5510 d3d10_effect_depth_stencil_variable_GetBackingStore,
5513 /* ID3D10EffectVariable methods */
5515 static BOOL STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_IsValid(ID3D10EffectRasterizerVariable *iface)
5517 TRACE("iface %p\n", iface);
5519 return (struct d3d10_effect_variable *)iface != &null_rasterizer_variable;
5522 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetType(
5523 ID3D10EffectRasterizerVariable *iface)
5525 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
5528 static HRESULT STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetDesc(ID3D10EffectRasterizerVariable *iface,
5529 D3D10_EFFECT_VARIABLE_DESC *desc)
5531 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
5534 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetAnnotationByIndex(
5535 ID3D10EffectRasterizerVariable *iface, UINT index)
5537 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
5540 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetAnnotationByName(
5541 ID3D10EffectRasterizerVariable *iface, LPCSTR name)
5543 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
5546 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetMemberByIndex(
5547 ID3D10EffectRasterizerVariable *iface, UINT index)
5549 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
5552 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetMemberByName(
5553 ID3D10EffectRasterizerVariable *iface, LPCSTR name)
5555 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
5558 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetMemberBySemantic(
5559 ID3D10EffectRasterizerVariable *iface, LPCSTR semantic)
5561 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
5564 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetElement(
5565 ID3D10EffectRasterizerVariable *iface, UINT index)
5567 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
5570 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetParentConstantBuffer(
5571 ID3D10EffectRasterizerVariable *iface)
5573 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
5576 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsScalar(
5577 ID3D10EffectRasterizerVariable *iface)
5579 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
5582 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsVector(
5583 ID3D10EffectRasterizerVariable *iface)
5585 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
5588 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsMatrix(
5589 ID3D10EffectRasterizerVariable *iface)
5591 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
5594 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsString(
5595 ID3D10EffectRasterizerVariable *iface)
5597 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
5600 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsShaderResource(
5601 ID3D10EffectRasterizerVariable *iface)
5603 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
5606 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsRenderTargetView(
5607 ID3D10EffectRasterizerVariable *iface)
5609 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
5612 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsDepthStencilView(
5613 ID3D10EffectRasterizerVariable *iface)
5615 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
5618 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsConstantBuffer(
5619 ID3D10EffectRasterizerVariable *iface)
5621 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
5624 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsShader(
5625 ID3D10EffectRasterizerVariable *iface)
5627 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
5630 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsBlend(
5631 ID3D10EffectRasterizerVariable *iface)
5633 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
5636 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsDepthStencil(
5637 ID3D10EffectRasterizerVariable *iface)
5639 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
5642 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsRasterizer(
5643 ID3D10EffectRasterizerVariable *iface)
5645 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
5648 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsSampler(
5649 ID3D10EffectRasterizerVariable *iface)
5651 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
5654 static HRESULT STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_SetRawValue(ID3D10EffectRasterizerVariable *iface,
5655 void *data, UINT offset, UINT count)
5657 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5660 static HRESULT STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetRawValue(ID3D10EffectRasterizerVariable *iface,
5661 void *data, UINT offset, UINT count)
5663 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5666 /* ID3D10EffectRasterizerVariable methods */
5668 static HRESULT STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetRasterizerState(ID3D10EffectRasterizerVariable *iface,
5669 UINT index, ID3D10RasterizerState **rasterizer_state)
5671 FIXME("iface %p, index %u, rasterizer_state %p stub!\n", iface, index, rasterizer_state);
5673 return E_NOTIMPL;
5676 static HRESULT STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetBackingStore(ID3D10EffectRasterizerVariable *iface,
5677 UINT index, D3D10_RASTERIZER_DESC *desc)
5679 FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc);
5681 return E_NOTIMPL;
5685 static const struct ID3D10EffectRasterizerVariableVtbl d3d10_effect_rasterizer_variable_vtbl =
5687 /* ID3D10EffectVariable methods */
5688 d3d10_effect_rasterizer_variable_IsValid,
5689 d3d10_effect_rasterizer_variable_GetType,
5690 d3d10_effect_rasterizer_variable_GetDesc,
5691 d3d10_effect_rasterizer_variable_GetAnnotationByIndex,
5692 d3d10_effect_rasterizer_variable_GetAnnotationByName,
5693 d3d10_effect_rasterizer_variable_GetMemberByIndex,
5694 d3d10_effect_rasterizer_variable_GetMemberByName,
5695 d3d10_effect_rasterizer_variable_GetMemberBySemantic,
5696 d3d10_effect_rasterizer_variable_GetElement,
5697 d3d10_effect_rasterizer_variable_GetParentConstantBuffer,
5698 d3d10_effect_rasterizer_variable_AsScalar,
5699 d3d10_effect_rasterizer_variable_AsVector,
5700 d3d10_effect_rasterizer_variable_AsMatrix,
5701 d3d10_effect_rasterizer_variable_AsString,
5702 d3d10_effect_rasterizer_variable_AsShaderResource,
5703 d3d10_effect_rasterizer_variable_AsRenderTargetView,
5704 d3d10_effect_rasterizer_variable_AsDepthStencilView,
5705 d3d10_effect_rasterizer_variable_AsConstantBuffer,
5706 d3d10_effect_rasterizer_variable_AsShader,
5707 d3d10_effect_rasterizer_variable_AsBlend,
5708 d3d10_effect_rasterizer_variable_AsDepthStencil,
5709 d3d10_effect_rasterizer_variable_AsRasterizer,
5710 d3d10_effect_rasterizer_variable_AsSampler,
5711 d3d10_effect_rasterizer_variable_SetRawValue,
5712 d3d10_effect_rasterizer_variable_GetRawValue,
5713 /* ID3D10EffectRasterizerVariable methods */
5714 d3d10_effect_rasterizer_variable_GetRasterizerState,
5715 d3d10_effect_rasterizer_variable_GetBackingStore,
5718 /* ID3D10EffectVariable methods */
5720 static BOOL STDMETHODCALLTYPE d3d10_effect_sampler_variable_IsValid(ID3D10EffectSamplerVariable *iface)
5722 TRACE("iface %p\n", iface);
5724 return (struct d3d10_effect_variable *)iface != &null_sampler_variable;
5727 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetType(
5728 ID3D10EffectSamplerVariable *iface)
5730 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
5733 static HRESULT STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetDesc(ID3D10EffectSamplerVariable *iface,
5734 D3D10_EFFECT_VARIABLE_DESC *desc)
5736 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
5739 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetAnnotationByIndex(
5740 ID3D10EffectSamplerVariable *iface, UINT index)
5742 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
5745 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetAnnotationByName(
5746 ID3D10EffectSamplerVariable *iface, LPCSTR name)
5748 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
5751 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetMemberByIndex(
5752 ID3D10EffectSamplerVariable *iface, UINT index)
5754 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
5757 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetMemberByName(
5758 ID3D10EffectSamplerVariable *iface, LPCSTR name)
5760 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
5763 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetMemberBySemantic(
5764 ID3D10EffectSamplerVariable *iface, LPCSTR semantic)
5766 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
5769 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetElement(
5770 ID3D10EffectSamplerVariable *iface, UINT index)
5772 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
5775 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetParentConstantBuffer(
5776 ID3D10EffectSamplerVariable *iface)
5778 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
5781 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsScalar(
5782 ID3D10EffectSamplerVariable *iface)
5784 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
5787 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsVector(
5788 ID3D10EffectSamplerVariable *iface)
5790 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
5793 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsMatrix(
5794 ID3D10EffectSamplerVariable *iface)
5796 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
5799 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsString(
5800 ID3D10EffectSamplerVariable *iface)
5802 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
5805 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsShaderResource(
5806 ID3D10EffectSamplerVariable *iface)
5808 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
5811 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsRenderTargetView(
5812 ID3D10EffectSamplerVariable *iface)
5814 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
5817 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsDepthStencilView(
5818 ID3D10EffectSamplerVariable *iface)
5820 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
5823 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsConstantBuffer(
5824 ID3D10EffectSamplerVariable *iface)
5826 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
5829 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsShader(
5830 ID3D10EffectSamplerVariable *iface)
5832 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
5835 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsBlend(
5836 ID3D10EffectSamplerVariable *iface)
5838 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
5841 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsDepthStencil(
5842 ID3D10EffectSamplerVariable *iface)
5844 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
5847 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsRasterizer(
5848 ID3D10EffectSamplerVariable *iface)
5850 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
5853 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsSampler(
5854 ID3D10EffectSamplerVariable *iface)
5856 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
5859 static HRESULT STDMETHODCALLTYPE d3d10_effect_sampler_variable_SetRawValue(ID3D10EffectSamplerVariable *iface,
5860 void *data, UINT offset, UINT count)
5862 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5865 static HRESULT STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetRawValue(ID3D10EffectSamplerVariable *iface,
5866 void *data, UINT offset, UINT count)
5868 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5871 /* ID3D10EffectSamplerVariable methods */
5873 static HRESULT STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetSampler(ID3D10EffectSamplerVariable *iface,
5874 UINT index, ID3D10SamplerState **sampler)
5876 FIXME("iface %p, index %u, sampler %p stub!\n", iface, index, sampler);
5878 return E_NOTIMPL;
5881 static HRESULT STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetBackingStore(ID3D10EffectSamplerVariable *iface,
5882 UINT index, D3D10_SAMPLER_DESC *desc)
5884 FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc);
5886 return E_NOTIMPL;
5890 static const struct ID3D10EffectSamplerVariableVtbl d3d10_effect_sampler_variable_vtbl =
5892 /* ID3D10EffectVariable methods */
5893 d3d10_effect_sampler_variable_IsValid,
5894 d3d10_effect_sampler_variable_GetType,
5895 d3d10_effect_sampler_variable_GetDesc,
5896 d3d10_effect_sampler_variable_GetAnnotationByIndex,
5897 d3d10_effect_sampler_variable_GetAnnotationByName,
5898 d3d10_effect_sampler_variable_GetMemberByIndex,
5899 d3d10_effect_sampler_variable_GetMemberByName,
5900 d3d10_effect_sampler_variable_GetMemberBySemantic,
5901 d3d10_effect_sampler_variable_GetElement,
5902 d3d10_effect_sampler_variable_GetParentConstantBuffer,
5903 d3d10_effect_sampler_variable_AsScalar,
5904 d3d10_effect_sampler_variable_AsVector,
5905 d3d10_effect_sampler_variable_AsMatrix,
5906 d3d10_effect_sampler_variable_AsString,
5907 d3d10_effect_sampler_variable_AsShaderResource,
5908 d3d10_effect_sampler_variable_AsRenderTargetView,
5909 d3d10_effect_sampler_variable_AsDepthStencilView,
5910 d3d10_effect_sampler_variable_AsConstantBuffer,
5911 d3d10_effect_sampler_variable_AsShader,
5912 d3d10_effect_sampler_variable_AsBlend,
5913 d3d10_effect_sampler_variable_AsDepthStencil,
5914 d3d10_effect_sampler_variable_AsRasterizer,
5915 d3d10_effect_sampler_variable_AsSampler,
5916 d3d10_effect_sampler_variable_SetRawValue,
5917 d3d10_effect_sampler_variable_GetRawValue,
5918 /* ID3D10EffectSamplerVariable methods */
5919 d3d10_effect_sampler_variable_GetSampler,
5920 d3d10_effect_sampler_variable_GetBackingStore,
5923 /* ID3D10EffectType methods */
5925 static BOOL STDMETHODCALLTYPE d3d10_effect_type_IsValid(ID3D10EffectType *iface)
5927 FIXME("iface %p stub!\n", iface);
5929 return FALSE;
5932 static HRESULT STDMETHODCALLTYPE d3d10_effect_type_GetDesc(ID3D10EffectType *iface, D3D10_EFFECT_TYPE_DESC *desc)
5934 struct d3d10_effect_type *This = (struct d3d10_effect_type *)iface;
5936 TRACE("iface %p, desc %p\n", iface, desc);
5938 if (This == &null_type)
5940 WARN("Null type specified\n");
5941 return E_FAIL;
5944 if (!desc)
5946 WARN("Invalid argument specified\n");
5947 return E_INVALIDARG;
5950 desc->TypeName = This->name;
5951 desc->Class = This->type_class;
5952 desc->Type = This->basetype;
5953 desc->Elements = This->element_count;
5954 desc->Members = This->member_count;
5955 desc->Rows = This->row_count;
5956 desc->Columns = This->column_count;
5957 desc->PackedSize = This->size_packed;
5958 desc->UnpackedSize = This->size_unpacked;
5959 desc->Stride = This->stride;
5961 return S_OK;
5964 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_type_GetMemberTypeByIndex(ID3D10EffectType *iface,
5965 UINT index)
5967 struct d3d10_effect_type *This = (struct d3d10_effect_type *)iface;
5968 struct d3d10_effect_type *t;
5970 TRACE("iface %p, index %u\n", iface, index);
5972 if (index >= This->member_count)
5974 WARN("Invalid index specified\n");
5975 return (ID3D10EffectType *)&null_type;
5978 t = (&This->members[index])->type;
5980 TRACE("Returning member %p, %s\n", t, debugstr_a(t->name));
5982 return (ID3D10EffectType *)t;
5985 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_type_GetMemberTypeByName(ID3D10EffectType *iface,
5986 LPCSTR name)
5988 struct d3d10_effect_type *This = (struct d3d10_effect_type *)iface;
5989 unsigned int i;
5991 TRACE("iface %p, name %s\n", iface, debugstr_a(name));
5993 if (!name)
5995 WARN("Invalid name specified\n");
5996 return (ID3D10EffectType *)&null_type;
5999 for (i = 0; i < This->member_count; ++i)
6001 struct d3d10_effect_type_member *typem = &This->members[i];
6003 if (typem->name)
6005 if (!strcmp(typem->name, name))
6007 TRACE("Returning type %p.\n", typem->type);
6008 return (ID3D10EffectType *)typem->type;
6013 WARN("Invalid name specified\n");
6015 return (ID3D10EffectType *)&null_type;
6018 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_type_GetMemberTypeBySemantic(ID3D10EffectType *iface,
6019 LPCSTR semantic)
6021 struct d3d10_effect_type *This = (struct d3d10_effect_type *)iface;
6022 unsigned int i;
6024 TRACE("iface %p, semantic %s\n", iface, debugstr_a(semantic));
6026 if (!semantic)
6028 WARN("Invalid semantic specified\n");
6029 return (ID3D10EffectType *)&null_type;
6032 for (i = 0; i < This->member_count; ++i)
6034 struct d3d10_effect_type_member *typem = &This->members[i];
6036 if (typem->semantic)
6038 if (!strcmp(typem->semantic, semantic))
6040 TRACE("Returning type %p.\n", typem->type);
6041 return (ID3D10EffectType *)typem->type;
6046 WARN("Invalid semantic specified\n");
6048 return (ID3D10EffectType *)&null_type;
6051 static LPCSTR STDMETHODCALLTYPE d3d10_effect_type_GetMemberName(ID3D10EffectType *iface, UINT index)
6053 struct d3d10_effect_type *This = (struct d3d10_effect_type *)iface;
6054 struct d3d10_effect_type_member *typem;
6056 TRACE("iface %p, index %u\n", iface, index);
6058 if (index >= This->member_count)
6060 WARN("Invalid index specified\n");
6061 return NULL;
6064 typem = &This->members[index];
6066 TRACE("Returning name %s\n", debugstr_a(typem->name));
6068 return typem->name;
6071 static LPCSTR STDMETHODCALLTYPE d3d10_effect_type_GetMemberSemantic(ID3D10EffectType *iface, UINT index)
6073 struct d3d10_effect_type *This = (struct d3d10_effect_type *)iface;
6074 struct d3d10_effect_type_member *typem;
6076 TRACE("iface %p, index %u\n", iface, index);
6078 if (index >= This->member_count)
6080 WARN("Invalid index specified\n");
6081 return NULL;
6084 typem = &This->members[index];
6086 TRACE("Returning semantic %s\n", debugstr_a(typem->semantic));
6088 return typem->semantic;
6091 static const struct ID3D10EffectTypeVtbl d3d10_effect_type_vtbl =
6093 /* ID3D10EffectType */
6094 d3d10_effect_type_IsValid,
6095 d3d10_effect_type_GetDesc,
6096 d3d10_effect_type_GetMemberTypeByIndex,
6097 d3d10_effect_type_GetMemberTypeByName,
6098 d3d10_effect_type_GetMemberTypeBySemantic,
6099 d3d10_effect_type_GetMemberName,
6100 d3d10_effect_type_GetMemberSemantic,