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
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 = {(const 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 = {(const ID3D10EffectVariableVtbl *)&d3d10_effect_scalar_variable_vtbl,
76 &null_local_buffer, &null_type};
77 static struct d3d10_effect_variable null_vector_variable = {(const ID3D10EffectVariableVtbl *)&d3d10_effect_vector_variable_vtbl,
78 &null_local_buffer, &null_type};
79 static struct d3d10_effect_variable null_matrix_variable = {(const ID3D10EffectVariableVtbl *)&d3d10_effect_matrix_variable_vtbl,
80 &null_local_buffer, &null_type};
81 static struct d3d10_effect_variable null_string_variable = {(const ID3D10EffectVariableVtbl *)&d3d10_effect_string_variable_vtbl,
82 &null_local_buffer, &null_type};
83 static struct d3d10_effect_variable null_shader_resource_variable = {(const ID3D10EffectVariableVtbl *)&d3d10_effect_shader_resource_variable_vtbl,
84 &null_local_buffer, &null_type};
85 static struct d3d10_effect_variable null_render_target_view_variable = {(const 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 = {(const ID3D10EffectVariableVtbl *)&d3d10_effect_depth_stencil_view_variable_vtbl,
88 &null_local_buffer, &null_type};
89 static struct d3d10_effect_variable null_shader_variable = {(const ID3D10EffectVariableVtbl *)&d3d10_effect_shader_variable_vtbl,
90 &null_local_buffer, &null_type};
91 static struct d3d10_effect_variable null_blend_variable = {(const ID3D10EffectVariableVtbl *)&d3d10_effect_blend_variable_vtbl,
92 &null_local_buffer, &null_type};
93 static struct d3d10_effect_variable null_depth_stencil_variable = {(const ID3D10EffectVariableVtbl *)&d3d10_effect_depth_stencil_variable_vtbl,
94 &null_local_buffer, &null_type};
95 static struct d3d10_effect_variable null_rasterizer_variable = {(const ID3D10EffectVariableVtbl *)&d3d10_effect_rasterizer_variable_vtbl,
96 &null_local_buffer, &null_type};
97 static struct d3d10_effect_variable null_sampler_variable = {(const 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 = {(const 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 = {(const 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 = {(const 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));
126 static inline void skip_dword_unknown(const char **ptr, unsigned int count)
131 FIXME("Skipping %u unknown DWORDs:\n", count);
132 for (i = 0; i < count; ++i)
135 FIXME("\t0x%08x\n", d);
139 static inline void write_dword(char **ptr, DWORD d)
141 memcpy(*ptr, &d, sizeof(d));
145 static inline void write_dword_unknown(char **ptr, DWORD d)
147 FIXME("Writing unknown DWORD 0x%08x\n", 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;
161 read_dword(&ptr, &tag);
162 TRACE("tag: %s.\n", debugstr_an((const char *)&tag, 4));
166 WARN("Wrong tag.\n");
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;
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;
202 static BOOL copy_name(const char *ptr, char **name)
206 if (!ptr) return TRUE;
208 name_len = strlen(ptr) + 1;
214 *name = HeapAlloc(GetProcessHeap(), 0, name_len);
217 ERR("Failed to allocate name memory.\n");
221 memcpy(*name, ptr, name_len);
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);
238 /* 32 (DXBC header) + 1 * 4 (chunk index) + 2 * 4 (chunk header) + data_size (chunk data) */
239 UINT size = 44 + data_size;
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);
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);
264 write_dword(&ptr, size);
267 write_dword(&ptr, 1);
270 write_dword(&ptr, (ptr - s->input_signature) + 4);
273 write_dword(&ptr, TAG_ISGN);
274 write_dword(&ptr, data_size);
275 memcpy(ptr, data, data_size);
280 FIXME("Unhandled chunk %s.\n", debugstr_an((const char *)&tag, 4));
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;
295 s = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*s));
298 ERR("Failed to allocate shader variable memory\n");
299 return E_OUTOFMEMORY;
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;
319 case D3D10_SVT_PIXELSHADER:
320 hr = ID3D10Device_CreatePixelShader(device, ptr, dxbc_size, &s->shader.ps);
321 if (FAILED(hr)) return hr;
324 case D3D10_SVT_GEOMETRYSHADER:
325 hr = ID3D10Device_CreateGeometryShader(device, ptr, dxbc_size, &s->shader.gs);
326 if (FAILED(hr)) return hr;
330 ERR("This should not happen!\n");
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)
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;
346 FIXME("Unknown variable class %#x.\n", c);
351 static D3D10_SHADER_VARIABLE_TYPE d3d10_variable_type(DWORD t, BOOL is_object)
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;
378 FIXME("Unknown variable type %#x.\n", 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;
391 FIXME("Unknown variable type %#x.\n", t);
397 static HRESULT parse_fx10_type(struct d3d10_effect_type *t, const char *ptr, const char *data)
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);
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));
450 TRACE("Type is an object.\n");
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));
466 TRACE("Type is a structure.\n");
468 read_dword(&ptr, &t->member_count);
469 TRACE("Member count: %u.\n", t->member_count);
474 t->type_class = D3D10_SVC_STRUCT;
476 t->members = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, t->member_count * sizeof(*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);
516 ERR("Failed to get variable type.\n");
523 FIXME("Unhandled case %#x.\n", unknown0);
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));
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;
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;
593 entry = wine_rb_get(&effect->types, &offset);
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));
603 ERR("Failed to allocate type memory.\n");
607 type->vtbl = &d3d10_effect_type_vtbl;
609 type->effect = effect;
610 hr = parse_fx10_type(type, data + offset, data);
613 ERR("Failed to parse type info, hr %#x.\n", hr);
614 HeapFree(GetProcessHeap(), 0, type);
618 if (wine_rb_put(&effect->types, &offset, &type->entry) == -1)
620 ERR("Failed to insert type entry.\n");
621 HeapFree(GetProcessHeap(), 0, 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 = (const ID3D10EffectVariableVtbl *)&d3d10_effect_scalar_variable_vtbl;
636 case D3D10_SVC_VECTOR:
637 v->vtbl = (const ID3D10EffectVariableVtbl *)&d3d10_effect_vector_variable_vtbl;
640 case D3D10_SVC_MATRIX_ROWS:
641 case D3D10_SVC_MATRIX_COLUMNS:
642 v->vtbl = (const ID3D10EffectVariableVtbl *)&d3d10_effect_matrix_variable_vtbl;
645 case D3D10_SVC_STRUCT:
646 v->vtbl = &d3d10_effect_variable_vtbl;
649 case D3D10_SVC_OBJECT:
650 switch(v->type->basetype)
652 case D3D10_SVT_STRING:
653 v->vtbl = (const ID3D10EffectVariableVtbl *)&d3d10_effect_string_variable_vtbl;
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 = (const ID3D10EffectVariableVtbl *)&d3d10_effect_shader_resource_variable_vtbl;
667 case D3D10_SVT_RENDERTARGETVIEW:
668 v->vtbl = (const ID3D10EffectVariableVtbl *)&d3d10_effect_render_target_view_variable_vtbl;
671 case D3D10_SVT_DEPTHSTENCILVIEW:
672 v->vtbl = (const ID3D10EffectVariableVtbl *)&d3d10_effect_depth_stencil_view_variable_vtbl;
675 case D3D10_SVT_DEPTHSTENCIL:
676 v->vtbl = (const ID3D10EffectVariableVtbl *)&d3d10_effect_depth_stencil_variable_vtbl;
679 case D3D10_SVT_VERTEXSHADER:
680 case D3D10_SVT_GEOMETRYSHADER:
681 case D3D10_SVT_PIXELSHADER:
682 v->vtbl = (const ID3D10EffectVariableVtbl *)&d3d10_effect_shader_variable_vtbl;
685 case D3D10_SVT_BLEND:
686 v->vtbl = (const ID3D10EffectVariableVtbl *)&d3d10_effect_blend_variable_vtbl;
689 case D3D10_SVT_RASTERIZER:
690 v->vtbl = (const ID3D10EffectVariableVtbl *)&d3d10_effect_rasterizer_variable_vtbl;
693 case D3D10_SVT_SAMPLER:
694 v->vtbl = (const ID3D10EffectVariableVtbl *)&d3d10_effect_sampler_variable_vtbl;
698 FIXME("Unhandled basetype %s.\n", debug_d3d10_shader_variable_type(v->type->basetype));
699 v->vtbl = &d3d10_effect_variable_vtbl;
705 FIXME("Unhandled type class %s.\n", debug_d3d10_shader_variable_class(v->type->type_class));
706 v->vtbl = &d3d10_effect_variable_vtbl;
711 static HRESULT copy_variableinfo_from_type(struct d3d10_effect_variable *v)
716 if (v->type->member_count)
718 v->members = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, v->type->member_count * sizeof(*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));
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));
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;
806 static HRESULT parse_fx10_variable_head(struct d3d10_effect_variable *v, const char **ptr, const char *data)
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);
826 ERR("Failed to get variable type.\n");
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)
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;
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;
858 case D3D10_EOT_VERTEXSHADER:
859 shader = "vertexshader";
860 t->basetype = D3D10_SVT_VERTEXSHADER;
863 case D3D10_EOT_PIXELSHADER:
864 shader = "pixelshader";
865 t->basetype = D3D10_SVT_PIXELSHADER;
868 case D3D10_EOT_GEOMETRYSHADER:
869 shader = "geometryshader";
870 t->basetype = D3D10_SVT_GEOMETRYSHADER;
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;
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));
906 static HRESULT parse_fx10_object(struct d3d10_effect_object *o, const char **ptr, const char *data)
908 const char *data_ptr = NULL;
910 enum d3d10_effect_object_operation operation;
912 struct d3d10_effect *effect = o->pass->technique->effect;
913 ID3D10Effect *e = (ID3D10Effect *)effect;
915 read_dword(ptr, &o->type);
916 TRACE("Effect object is of type %#x.\n", o->type);
918 read_dword(ptr, &o->index);
919 TRACE("Effect object index %#x.\n", o->index);
921 read_dword(ptr, &operation);
922 TRACE("Effect object operation %#x.\n", operation);
924 read_dword(ptr, &offset);
925 TRACE("Effect object idx is at offset %#x.\n", offset);
929 case D3D10_EOO_VALUE:
930 TRACE("Copy variable values\n");
935 case D3D10_EOT_VERTEXSHADER:
936 TRACE("Vertex shader\n");
937 o->data = &anonymous_vs;
941 case D3D10_EOT_PIXELSHADER:
942 TRACE("Pixel shader\n");
943 o->data = &anonymous_ps;
947 case D3D10_EOT_GEOMETRYSHADER:
948 TRACE("Geometry shader\n");
949 o->data = &anonymous_gs;
954 FIXME("Unhandled object type %#x\n", o->type);
960 case D3D10_EOO_PARSED_OBJECT:
961 /* This is a local object, we've parsed in parse_fx10_local_object. */
962 TRACE("Shader = %s.\n", data + offset);
964 o->data = e->lpVtbl->GetVariableByName(e, data + offset);
968 case D3D10_EOO_PARSED_OBJECT_INDEX:
969 /* This is a local object, we've parsed in parse_fx10_local_object, which has an array index. */
970 data_ptr = data + offset;
971 read_dword(&data_ptr, &offset);
972 read_dword(&data_ptr, &o->index);
973 TRACE("Shader = %s[%u].\n", data + offset, o->index);
975 o->data = e->lpVtbl->GetVariableByName(e, data + offset);
979 case D3D10_EOO_ANONYMOUS_SHADER:
980 TRACE("Anonymous shader\n");
982 /* check anonymous_shader_current for validity */
983 if (effect->anonymous_shader_current >= effect->anonymous_shader_count)
985 ERR("Anonymous shader count is wrong!\n");
989 data_ptr = data + offset;
990 read_dword(&data_ptr, &offset);
991 TRACE("Effect object starts at offset %#x.\n", offset);
993 data_ptr = data + offset;
995 hr = parse_fx10_anonymous_shader(effect, &effect->anonymous_shaders[effect->anonymous_shader_current], o->type);
996 if (FAILED(hr)) return hr;
998 o->data = &effect->anonymous_shaders[effect->anonymous_shader_current].shader;
999 ++effect->anonymous_shader_current;
1003 case D3D10_EOT_VERTEXSHADER:
1004 TRACE("Vertex shader\n");
1005 hr = parse_shader(o->data, data_ptr);
1008 case D3D10_EOT_PIXELSHADER:
1009 TRACE("Pixel shader\n");
1010 hr = parse_shader(o->data, data_ptr);
1013 case D3D10_EOT_GEOMETRYSHADER:
1014 TRACE("Geometry shader\n");
1015 hr = parse_shader(o->data, data_ptr);
1019 FIXME("Unhandled object type %#x\n", o->type);
1027 FIXME("Unhandled operation %#x.\n", operation);
1034 static HRESULT parse_fx10_pass(struct d3d10_effect_pass *p, const char **ptr, const char *data)
1040 read_dword(ptr, &offset);
1041 TRACE("Pass name at offset %#x.\n", offset);
1043 if (!copy_name(data + offset, &p->name))
1045 ERR("Failed to copy name.\n");
1046 return E_OUTOFMEMORY;
1048 TRACE("Pass name: %s.\n", debugstr_a(p->name));
1050 read_dword(ptr, &p->object_count);
1051 TRACE("Pass has %u effect objects.\n", p->object_count);
1053 read_dword(ptr, &p->annotation_count);
1054 TRACE("Pass has %u annotations.\n", p->annotation_count);
1056 p->annotations = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, p->annotation_count * sizeof(*p->annotations));
1057 if (!p->annotations)
1059 ERR("Failed to allocate pass annotations memory.\n");
1060 return E_OUTOFMEMORY;
1063 for (i = 0; i < p->annotation_count; ++i)
1065 struct d3d10_effect_variable *a = &p->annotations[i];
1067 a->effect = p->technique->effect;
1068 a->buffer = &null_local_buffer;
1070 hr = parse_fx10_annotation(a, ptr, data);
1071 if (FAILED(hr)) return hr;
1074 p->objects = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, p->object_count * sizeof(*p->objects));
1077 ERR("Failed to allocate effect objects memory.\n");
1078 return E_OUTOFMEMORY;
1081 for (i = 0; i < p->object_count; ++i)
1083 struct d3d10_effect_object *o = &p->objects[i];
1087 hr = parse_fx10_object(o, ptr, data);
1088 if (FAILED(hr)) return hr;
1094 static HRESULT parse_fx10_technique(struct d3d10_effect_technique *t, const char **ptr, const char *data)
1100 read_dword(ptr, &offset);
1101 TRACE("Technique name at offset %#x.\n", offset);
1103 if (!copy_name(data + offset, &t->name))
1105 ERR("Failed to copy name.\n");
1106 return E_OUTOFMEMORY;
1108 TRACE("Technique name: %s.\n", debugstr_a(t->name));
1110 read_dword(ptr, &t->pass_count);
1111 TRACE("Technique has %u passes\n", t->pass_count);
1113 read_dword(ptr, &t->annotation_count);
1114 TRACE("Technique has %u annotations.\n", t->annotation_count);
1116 t->annotations = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, t->annotation_count * sizeof(*t->annotations));
1117 if (!t->annotations)
1119 ERR("Failed to allocate technique annotations memory.\n");
1120 return E_OUTOFMEMORY;
1123 for (i = 0; i < t->annotation_count; ++i)
1125 struct d3d10_effect_variable *a = &t->annotations[i];
1127 a->effect = t->effect;
1128 a->buffer = &null_local_buffer;
1130 hr = parse_fx10_annotation(a, ptr, data);
1131 if (FAILED(hr)) return hr;
1134 t->passes = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, t->pass_count * sizeof(*t->passes));
1137 ERR("Failed to allocate passes memory\n");
1138 return E_OUTOFMEMORY;
1141 for (i = 0; i < t->pass_count; ++i)
1143 struct d3d10_effect_pass *p = &t->passes[i];
1145 p->vtbl = &d3d10_effect_pass_vtbl;
1148 hr = parse_fx10_pass(p, ptr, data);
1149 if (FAILED(hr)) return hr;
1155 static HRESULT parse_fx10_variable(struct d3d10_effect_variable *v, const char **ptr, const char *data)
1161 hr = parse_fx10_variable_head(v, ptr, data);
1162 if (FAILED(hr)) return hr;
1164 read_dword(ptr, &offset);
1165 TRACE("Variable semantic at offset %#x.\n", offset);
1167 if (!copy_name(data + offset, &v->semantic))
1169 ERR("Failed to copy semantic.\n");
1170 return E_OUTOFMEMORY;
1172 TRACE("Variable semantic: %s.\n", debugstr_a(v->semantic));
1174 read_dword(ptr, &v->buffer_offset);
1175 TRACE("Variable offset in buffer: %#x.\n", v->buffer_offset);
1177 skip_dword_unknown(ptr, 1);
1179 read_dword(ptr, &v->flag);
1180 TRACE("Variable flag: %#x.\n", v->flag);
1182 read_dword(ptr, &v->annotation_count);
1183 TRACE("Variable has %u annotations.\n", v->annotation_count);
1185 v->annotations = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, v->annotation_count * sizeof(*v->annotations));
1186 if (!v->annotations)
1188 ERR("Failed to allocate variable annotations memory.\n");
1189 return E_OUTOFMEMORY;
1192 for (i = 0; i < v->annotation_count; ++i)
1194 struct d3d10_effect_variable *a = &v->annotations[i];
1196 a->effect = v->effect;
1197 a->buffer = &null_local_buffer;
1199 hr = parse_fx10_annotation(a, ptr, data);
1200 if (FAILED(hr)) return hr;
1206 static HRESULT parse_fx10_local_variable(struct d3d10_effect_variable *v, const char **ptr, const char *data)
1211 hr = parse_fx10_variable_head(v, ptr, data);
1212 if (FAILED(hr)) return hr;
1214 skip_dword_unknown(ptr, 2);
1216 switch (v->type->basetype)
1218 case D3D10_SVT_TEXTURE1D:
1219 case D3D10_SVT_TEXTURE1DARRAY:
1220 case D3D10_SVT_TEXTURE2D:
1221 case D3D10_SVT_TEXTURE2DARRAY:
1222 case D3D10_SVT_TEXTURE2DMS:
1223 case D3D10_SVT_TEXTURE2DMSARRAY:
1224 case D3D10_SVT_TEXTURE3D:
1225 case D3D10_SVT_TEXTURECUBE:
1226 case D3D10_SVT_RENDERTARGETVIEW:
1227 case D3D10_SVT_DEPTHSTENCILVIEW:
1228 TRACE("SVT could not have elements.\n");
1231 case D3D10_SVT_VERTEXSHADER:
1232 case D3D10_SVT_PIXELSHADER:
1233 case D3D10_SVT_GEOMETRYSHADER:
1234 TRACE("Shader type is %s\n", debug_d3d10_shader_variable_type(v->type->basetype));
1235 for (i = 0; i < max(v->type->element_count, 1); ++i)
1237 DWORD shader_offset;
1238 struct d3d10_effect_variable *var;
1240 if (!v->type->element_count)
1246 var = &v->elements[i];
1249 read_dword(ptr, &shader_offset);
1250 TRACE("Shader offset: %#x.\n", shader_offset);
1252 hr = parse_shader(var, data + shader_offset);
1253 if (FAILED(hr)) return hr;
1257 case D3D10_SVT_DEPTHSTENCIL:
1258 case D3D10_SVT_BLEND:
1259 case D3D10_SVT_RASTERIZER:
1260 case D3D10_SVT_SAMPLER:
1261 TRACE("SVT is a state.\n");
1262 for (i = 0; i < max(v->type->element_count, 1); ++i)
1267 read_dword(ptr, &object_count);
1268 TRACE("Object count: %#x.\n", object_count);
1270 for (j = 0; j < object_count; ++j)
1272 skip_dword_unknown(ptr, 4);
1278 FIXME("Unhandled case %s.\n", debug_d3d10_shader_variable_type(v->type->basetype));
1282 read_dword(ptr, &v->annotation_count);
1283 TRACE("Variable has %u annotations.\n", v->annotation_count);
1285 v->annotations = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, v->annotation_count * sizeof(*v->annotations));
1286 if (!v->annotations)
1288 ERR("Failed to allocate variable annotations memory.\n");
1289 return E_OUTOFMEMORY;
1292 for (i = 0; i < v->annotation_count; ++i)
1294 struct d3d10_effect_variable *a = &v->annotations[i];
1296 a->effect = v->effect;
1297 a->buffer = &null_local_buffer;
1299 hr = parse_fx10_annotation(a, ptr, data);
1300 if (FAILED(hr)) return hr;
1306 static HRESULT parse_fx10_local_buffer(struct d3d10_effect_variable *l, const char **ptr, const char *data)
1310 D3D10_CBUFFER_TYPE d3d10_cbuffer_type;
1312 unsigned int stride = 0;
1314 /* Generate our own type, it isn't in the fx blob. */
1315 l->type = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*l->type));
1318 ERR("Failed to allocate local buffer type memory.\n");
1319 return E_OUTOFMEMORY;
1321 l->type->vtbl = &d3d10_effect_type_vtbl;
1322 l->type->type_class = D3D10_SVC_OBJECT;
1323 l->type->effect = l->effect;
1325 read_dword(ptr, &offset);
1326 TRACE("Local buffer name at offset %#x.\n", offset);
1328 if (!copy_name(data + offset, &l->name))
1330 ERR("Failed to copy name.\n");
1331 return E_OUTOFMEMORY;
1333 TRACE("Local buffer name: %s.\n", debugstr_a(l->name));
1335 read_dword(ptr, &l->data_size);
1336 TRACE("Local buffer data size: %#x.\n", l->data_size);
1338 read_dword(ptr, &d3d10_cbuffer_type);
1339 TRACE("Local buffer type: %#x.\n", d3d10_cbuffer_type);
1341 switch(d3d10_cbuffer_type)
1343 case D3D10_CT_CBUFFER:
1344 l->type->basetype = D3D10_SVT_CBUFFER;
1345 if (!copy_name("cbuffer", &l->type->name))
1347 ERR("Failed to copy name.\n");
1348 return E_OUTOFMEMORY;
1352 case D3D10_CT_TBUFFER:
1353 l->type->basetype = D3D10_SVT_TBUFFER;
1354 if (!copy_name("tbuffer", &l->type->name))
1356 ERR("Failed to copy name.\n");
1357 return E_OUTOFMEMORY;
1362 ERR("Unexpected D3D10_CBUFFER_TYPE %#x!\n", d3d10_cbuffer_type);
1366 read_dword(ptr, &l->type->member_count);
1367 TRACE("Local buffer member count: %#x.\n", l->type->member_count);
1369 skip_dword_unknown(ptr, 1);
1371 read_dword(ptr, &l->annotation_count);
1372 TRACE("Local buffer has %u annotations.\n", l->annotation_count);
1374 l->annotations = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, l->annotation_count * sizeof(*l->annotations));
1375 if (!l->annotations)
1377 ERR("Failed to allocate local buffer annotations memory.\n");
1378 return E_OUTOFMEMORY;
1381 for (i = 0; i < l->annotation_count; ++i)
1383 struct d3d10_effect_variable *a = &l->annotations[i];
1385 a->effect = l->effect;
1386 a->buffer = &null_local_buffer;
1388 hr = parse_fx10_annotation(a, ptr, data);
1389 if (FAILED(hr)) return hr;
1392 l->members = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, l->type->member_count * sizeof(*l->members));
1395 ERR("Failed to allocate members memory.\n");
1396 return E_OUTOFMEMORY;
1399 l->type->members = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, l->type->member_count * sizeof(*l->type->members));
1400 if (!l->type->members)
1402 ERR("Failed to allocate type members memory.\n");
1403 return E_OUTOFMEMORY;
1406 for (i = 0; i < l->type->member_count; ++i)
1408 struct d3d10_effect_variable *v = &l->members[i];
1409 struct d3d10_effect_type_member *typem = &l->type->members[i];
1412 v->effect = l->effect;
1414 hr = parse_fx10_variable(v, ptr, data);
1415 if (FAILED(hr)) return hr;
1418 * Copy the values from the variable type to the constant buffers type
1419 * members structure, because it is our own generated type.
1421 typem->type = v->type;
1423 if (!copy_name(v->name, &typem->name))
1425 ERR("Failed to copy name.\n");
1426 return E_OUTOFMEMORY;
1428 TRACE("Variable name: %s.\n", debugstr_a(typem->name));
1430 if (!copy_name(v->semantic, &typem->semantic))
1432 ERR("Failed to copy name.\n");
1433 return E_OUTOFMEMORY;
1435 TRACE("Variable semantic: %s.\n", debugstr_a(typem->semantic));
1437 typem->buffer_offset = v->buffer_offset;
1438 TRACE("Variable buffer offset: %u.\n", typem->buffer_offset);
1440 l->type->size_packed += v->type->size_packed;
1443 * For the complete constantbuffer the size_unpacked = stride,
1444 * the stride is calculated like this:
1446 * 1) if the constant buffer variables are packed with packoffset
1447 * - stride = the highest used constant
1448 * - the complete stride has to be a multiple of 0x10
1450 * 2) if the constant buffer variables are NOT packed with packoffset
1451 * - sum of unpacked size for all variables which fit in a 0x10 part
1452 * - if the size exceeds a 0x10 part, the rest of the old part is skipped
1453 * and a new part is started
1454 * - if the variable is a struct it is always used a new part
1455 * - the complete stride has to be a multiple of 0x10
1458 * 0x4, 0x4, 0x4, 0x8, 0x4, 0x14, 0x4
1459 * part 0x10 0x10 0x20 -> 0x40
1461 if (v->flag & D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT)
1463 if ((v->type->size_unpacked + v->buffer_offset) > stride)
1465 stride = v->type->size_unpacked + v->buffer_offset;
1470 if (v->type->type_class == D3D10_SVC_STRUCT)
1472 stride = (stride + 0xf) & ~0xf;
1475 if ( ((stride & 0xf) + v->type->size_unpacked) > 0x10)
1477 stride = (stride + 0xf) & ~0xf;
1480 stride += v->type->size_unpacked;
1483 l->type->stride = l->type->size_unpacked = (stride + 0xf) & ~0xf;
1485 TRACE("Constant buffer:\n");
1486 TRACE("\tType name: %s.\n", debugstr_a(l->type->name));
1487 TRACE("\tElement count: %u.\n", l->type->element_count);
1488 TRACE("\tMember count: %u.\n", l->type->member_count);
1489 TRACE("\tUnpacked size: %#x.\n", l->type->size_unpacked);
1490 TRACE("\tStride: %#x.\n", l->type->stride);
1491 TRACE("\tPacked size %#x.\n", l->type->size_packed);
1492 TRACE("\tBasetype: %s.\n", debug_d3d10_shader_variable_type(l->type->basetype));
1493 TRACE("\tTypeclass: %s.\n", debug_d3d10_shader_variable_class(l->type->type_class));
1498 static int d3d10_effect_type_compare(const void *key, const struct wine_rb_entry *entry)
1500 const struct d3d10_effect_type *t = WINE_RB_ENTRY_VALUE(entry, const struct d3d10_effect_type, entry);
1501 const DWORD *id = key;
1506 static void d3d10_effect_type_member_destroy(struct d3d10_effect_type_member *typem)
1508 TRACE("effect type member %p.\n", typem);
1510 /* Do not release typem->type, it will be covered by d3d10_effect_type_destroy(). */
1511 HeapFree(GetProcessHeap(), 0, typem->semantic);
1512 HeapFree(GetProcessHeap(), 0, typem->name);
1515 static void d3d10_effect_type_destroy(struct wine_rb_entry *entry, void *context)
1517 struct d3d10_effect_type *t = WINE_RB_ENTRY_VALUE(entry, struct d3d10_effect_type, entry);
1519 TRACE("effect type %p.\n", t);
1523 HeapFree(GetProcessHeap(), 0, t->elementtype->name);
1524 HeapFree(GetProcessHeap(), 0, t->elementtype);
1531 for (i = 0; i < t->member_count; ++i)
1533 d3d10_effect_type_member_destroy(&t->members[i]);
1535 HeapFree(GetProcessHeap(), 0, t->members);
1538 HeapFree(GetProcessHeap(), 0, t->name);
1539 HeapFree(GetProcessHeap(), 0, t);
1542 static const struct wine_rb_functions d3d10_effect_type_rb_functions =
1547 d3d10_effect_type_compare,
1550 static HRESULT parse_fx10_body(struct d3d10_effect *e, const char *data, DWORD data_size)
1552 const char *ptr = data + e->index_offset;
1556 if (wine_rb_init(&e->types, &d3d10_effect_type_rb_functions) == -1)
1558 ERR("Failed to initialize type rbtree.\n");
1562 e->local_buffers = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, e->local_buffer_count * sizeof(*e->local_buffers));
1563 if (!e->local_buffers)
1565 ERR("Failed to allocate local buffer memory.\n");
1566 return E_OUTOFMEMORY;
1569 e->local_variables = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, e->local_variable_count * sizeof(*e->local_variables));
1570 if (!e->local_variables)
1572 ERR("Failed to allocate local variable memory.\n");
1573 return E_OUTOFMEMORY;
1576 e->anonymous_shaders = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, e->anonymous_shader_count * sizeof(*e->anonymous_shaders));
1577 if (!e->anonymous_shaders)
1579 ERR("Failed to allocate techniques memory\n");
1580 return E_OUTOFMEMORY;
1583 e->techniques = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, e->technique_count * sizeof(*e->techniques));
1586 ERR("Failed to allocate techniques memory\n");
1587 return E_OUTOFMEMORY;
1590 for (i = 0; i < e->local_buffer_count; ++i)
1592 struct d3d10_effect_variable *l = &e->local_buffers[i];
1593 l->vtbl = (const ID3D10EffectVariableVtbl *)&d3d10_effect_constant_buffer_vtbl;
1595 l->buffer = &null_local_buffer;
1597 hr = parse_fx10_local_buffer(l, &ptr, data);
1598 if (FAILED(hr)) return hr;
1601 for (i = 0; i < e->local_variable_count; ++i)
1603 struct d3d10_effect_variable *v = &e->local_variables[i];
1606 v->vtbl = &d3d10_effect_variable_vtbl;
1607 v->buffer = &null_local_buffer;
1609 hr = parse_fx10_local_variable(v, &ptr, data);
1610 if (FAILED(hr)) return hr;
1613 for (i = 0; i < e->technique_count; ++i)
1615 struct d3d10_effect_technique *t = &e->techniques[i];
1617 t->vtbl = &d3d10_effect_technique_vtbl;
1620 hr = parse_fx10_technique(t, &ptr, data);
1621 if (FAILED(hr)) return hr;
1627 static HRESULT parse_fx10(struct d3d10_effect *e, const char *data, DWORD data_size)
1629 const char *ptr = data;
1632 /* Compiled target version (e.g. fx_4_0=0xfeff1001, fx_4_1=0xfeff1011). */
1633 read_dword(&ptr, &e->version);
1634 TRACE("Target: %#x\n", e->version);
1636 read_dword(&ptr, &e->local_buffer_count);
1637 TRACE("Local buffer count: %u.\n", e->local_buffer_count);
1639 read_dword(&ptr, &e->variable_count);
1640 TRACE("Variable count: %u\n", e->variable_count);
1642 read_dword(&ptr, &e->local_variable_count);
1643 TRACE("Object count: %u\n", e->local_variable_count);
1645 read_dword(&ptr, &e->sharedbuffers_count);
1646 TRACE("Sharedbuffers count: %u\n", e->sharedbuffers_count);
1648 /* Number of variables in shared buffers? */
1649 read_dword(&ptr, &unknown);
1650 FIXME("Unknown 0: %u\n", unknown);
1652 read_dword(&ptr, &e->sharedobjects_count);
1653 TRACE("Sharedobjects count: %u\n", e->sharedobjects_count);
1655 read_dword(&ptr, &e->technique_count);
1656 TRACE("Technique count: %u\n", e->technique_count);
1658 read_dword(&ptr, &e->index_offset);
1659 TRACE("Index offset: %#x\n", e->index_offset);
1661 read_dword(&ptr, &unknown);
1662 FIXME("Unknown 1: %u\n", unknown);
1664 read_dword(&ptr, &e->texture_count);
1665 TRACE("Texture count: %u\n", e->texture_count);
1667 read_dword(&ptr, &e->dephstencilstate_count);
1668 TRACE("Depthstencilstate count: %u\n", e->dephstencilstate_count);
1670 read_dword(&ptr, &e->blendstate_count);
1671 TRACE("Blendstate count: %u\n", e->blendstate_count);
1673 read_dword(&ptr, &e->rasterizerstate_count);
1674 TRACE("Rasterizerstate count: %u\n", e->rasterizerstate_count);
1676 read_dword(&ptr, &e->samplerstate_count);
1677 TRACE("Samplerstate count: %u\n", e->samplerstate_count);
1679 read_dword(&ptr, &e->rendertargetview_count);
1680 TRACE("Rendertargetview count: %u\n", e->rendertargetview_count);
1682 read_dword(&ptr, &e->depthstencilview_count);
1683 TRACE("Depthstencilview count: %u\n", e->depthstencilview_count);
1685 read_dword(&ptr, &e->shader_call_count);
1686 TRACE("Shader call count: %u\n", e->shader_call_count);
1688 read_dword(&ptr, &e->anonymous_shader_count);
1689 TRACE("Anonymous shader count: %u\n", e->anonymous_shader_count);
1691 return parse_fx10_body(e, ptr, data_size - (ptr - data));
1694 static HRESULT fx10_chunk_handler(const char *data, DWORD data_size, DWORD tag, void *ctx)
1696 struct d3d10_effect *e = ctx;
1698 TRACE("tag: %s.\n", debugstr_an((const char *)&tag, 4));
1700 TRACE("chunk size: %#x\n", data_size);
1705 return parse_fx10(e, data, data_size);
1708 FIXME("Unhandled chunk %s.\n", debugstr_an((const char *)&tag, 4));
1713 HRESULT d3d10_effect_parse(struct d3d10_effect *This, const void *data, SIZE_T data_size)
1715 return parse_dxbc(data, data_size, fx10_chunk_handler, This);
1718 static HRESULT d3d10_effect_object_apply(struct d3d10_effect_object *o)
1720 ID3D10Device *device = o->pass->technique->effect->device;
1721 struct d3d10_effect_variable *v = (struct d3d10_effect_variable*) o->data;
1723 TRACE("effect object %p, type %#x.\n", o, o->type);
1727 case D3D10_EOT_VERTEXSHADER:
1728 ID3D10Device_VSSetShader(device, ((struct d3d10_effect_shader_variable *)v->data)->shader.vs);
1731 case D3D10_EOT_PIXELSHADER:
1732 ID3D10Device_PSSetShader(device, ((struct d3d10_effect_shader_variable *)v->data)->shader.ps);
1735 case D3D10_EOT_GEOMETRYSHADER:
1736 ID3D10Device_GSSetShader(device, ((struct d3d10_effect_shader_variable *)v->data)->shader.gs);
1740 FIXME("Unhandled effect object type %#x.\n", o->type);
1745 static void d3d10_effect_variable_destroy(struct d3d10_effect_variable *v)
1749 TRACE("variable %p.\n", v);
1751 HeapFree(GetProcessHeap(), 0, v->name);
1752 HeapFree(GetProcessHeap(), 0, v->semantic);
1755 for (i = 0; i < v->annotation_count; ++i)
1757 d3d10_effect_variable_destroy(&v->annotations[i]);
1759 HeapFree(GetProcessHeap(), 0, v->annotations);
1764 for (i = 0; i < v->type->member_count; ++i)
1766 d3d10_effect_variable_destroy(&v->members[i]);
1768 HeapFree(GetProcessHeap(), 0, v->members);
1773 for (i = 0; i < v->type->element_count; ++i)
1775 d3d10_effect_variable_destroy(&v->elements[i]);
1777 HeapFree(GetProcessHeap(), 0, v->elements);
1782 switch(v->type->basetype)
1784 case D3D10_SVT_VERTEXSHADER:
1785 case D3D10_SVT_PIXELSHADER:
1786 case D3D10_SVT_GEOMETRYSHADER:
1787 HeapFree(GetProcessHeap(), 0, ((struct d3d10_effect_shader_variable *)v->data)->input_signature);
1793 HeapFree(GetProcessHeap(), 0, v->data);
1797 static void d3d10_effect_pass_destroy(struct d3d10_effect_pass *p)
1801 TRACE("pass %p\n", p);
1803 HeapFree(GetProcessHeap(), 0, p->name);
1804 HeapFree(GetProcessHeap(), 0, p->objects);
1808 for (i = 0; i < p->annotation_count; ++i)
1810 d3d10_effect_variable_destroy(&p->annotations[i]);
1812 HeapFree(GetProcessHeap(), 0, p->annotations);
1816 static void d3d10_effect_technique_destroy(struct d3d10_effect_technique *t)
1820 TRACE("technique %p\n", t);
1822 HeapFree(GetProcessHeap(), 0, t->name);
1825 for (i = 0; i < t->pass_count; ++i)
1827 d3d10_effect_pass_destroy(&t->passes[i]);
1829 HeapFree(GetProcessHeap(), 0, t->passes);
1834 for (i = 0; i < t->annotation_count; ++i)
1836 d3d10_effect_variable_destroy(&t->annotations[i]);
1838 HeapFree(GetProcessHeap(), 0, t->annotations);
1842 static void d3d10_effect_local_buffer_destroy(struct d3d10_effect_variable *l)
1846 TRACE("local buffer %p.\n", l);
1848 HeapFree(GetProcessHeap(), 0, l->name);
1851 for (i = 0; i < l->type->member_count; ++i)
1853 d3d10_effect_variable_destroy(&l->members[i]);
1855 HeapFree(GetProcessHeap(), 0, l->members);
1858 if (l->type->members)
1860 for (i = 0; i < l->type->member_count; ++i)
1862 /* Do not release l->type->members[i].type, it will be covered by d3d10_effect_type_destroy(). */
1863 HeapFree(GetProcessHeap(), 0, l->type->members[i].semantic);
1864 HeapFree(GetProcessHeap(), 0, l->type->members[i].name);
1866 HeapFree(GetProcessHeap(), 0, l->type->members);
1868 HeapFree(GetProcessHeap(), 0, l->type->name);
1869 HeapFree(GetProcessHeap(), 0, l->type);
1873 for (i = 0; i < l->annotation_count; ++i)
1875 d3d10_effect_variable_destroy(&l->annotations[i]);
1877 HeapFree(GetProcessHeap(), 0, l->annotations);
1881 /* IUnknown methods */
1883 static HRESULT STDMETHODCALLTYPE d3d10_effect_QueryInterface(ID3D10Effect *iface, REFIID riid, void **object)
1885 TRACE("iface %p, riid %s, object %p\n", iface, debugstr_guid(riid), object);
1887 if (IsEqualGUID(riid, &IID_ID3D10Effect)
1888 || IsEqualGUID(riid, &IID_IUnknown))
1890 IUnknown_AddRef(iface);
1895 WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid));
1898 return E_NOINTERFACE;
1901 static ULONG STDMETHODCALLTYPE d3d10_effect_AddRef(ID3D10Effect *iface)
1903 struct d3d10_effect *This = (struct d3d10_effect *)iface;
1904 ULONG refcount = InterlockedIncrement(&This->refcount);
1906 TRACE("%p increasing refcount to %u\n", This, refcount);
1911 static ULONG STDMETHODCALLTYPE d3d10_effect_Release(ID3D10Effect *iface)
1913 struct d3d10_effect *This = (struct d3d10_effect *)iface;
1914 ULONG refcount = InterlockedDecrement(&This->refcount);
1916 TRACE("%p decreasing refcount to %u\n", This, refcount);
1922 if (This->techniques)
1924 for (i = 0; i < This->technique_count; ++i)
1926 d3d10_effect_technique_destroy(&This->techniques[i]);
1928 HeapFree(GetProcessHeap(), 0, This->techniques);
1931 if (This->local_variables)
1933 for (i = 0; i < This->local_variable_count; ++i)
1935 d3d10_effect_variable_destroy(&This->local_variables[i]);
1937 HeapFree(GetProcessHeap(), 0, This->local_variables);
1940 if (This->local_buffers)
1942 for (i = 0; i < This->local_buffer_count; ++i)
1944 d3d10_effect_local_buffer_destroy(&This->local_buffers[i]);
1946 HeapFree(GetProcessHeap(), 0, This->local_buffers);
1949 if (This->anonymous_shaders)
1951 for (i = 0; i < This->anonymous_shader_count; ++i)
1953 d3d10_effect_variable_destroy(&This->anonymous_shaders[i].shader);
1954 HeapFree(GetProcessHeap(), 0, This->anonymous_shaders[i].type.name);
1956 HeapFree(GetProcessHeap(), 0, This->anonymous_shaders);
1959 wine_rb_destroy(&This->types, d3d10_effect_type_destroy, NULL);
1961 ID3D10Device_Release(This->device);
1962 HeapFree(GetProcessHeap(), 0, This);
1968 /* ID3D10Effect methods */
1970 static BOOL STDMETHODCALLTYPE d3d10_effect_IsValid(ID3D10Effect *iface)
1972 FIXME("iface %p stub!\n", iface);
1977 static BOOL STDMETHODCALLTYPE d3d10_effect_IsPool(ID3D10Effect *iface)
1979 FIXME("iface %p stub!\n", iface);
1984 static HRESULT STDMETHODCALLTYPE d3d10_effect_GetDevice(ID3D10Effect *iface, ID3D10Device **device)
1986 struct d3d10_effect *This = (struct d3d10_effect *)iface;
1988 TRACE("iface %p, device %p\n", iface, device);
1990 ID3D10Device_AddRef(This->device);
1991 *device = This->device;
1996 static HRESULT STDMETHODCALLTYPE d3d10_effect_GetDesc(ID3D10Effect *iface, D3D10_EFFECT_DESC *desc)
1998 FIXME("iface %p, desc %p stub!\n", iface, desc);
2003 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_GetConstantBufferByIndex(ID3D10Effect *iface,
2006 struct d3d10_effect *This = (struct d3d10_effect *)iface;
2007 struct d3d10_effect_variable *l;
2009 TRACE("iface %p, index %u\n", iface, index);
2011 if (index >= This->local_buffer_count)
2013 WARN("Invalid index specified\n");
2014 return (ID3D10EffectConstantBuffer *)&null_local_buffer;
2017 l = &This->local_buffers[index];
2019 TRACE("Returning buffer %p, %s.\n", l, debugstr_a(l->name));
2021 return (ID3D10EffectConstantBuffer *)l;
2024 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_GetConstantBufferByName(ID3D10Effect *iface,
2027 struct d3d10_effect *This = (struct d3d10_effect *)iface;
2030 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
2032 for (i = 0; i < This->local_buffer_count; ++i)
2034 struct d3d10_effect_variable *l = &This->local_buffers[i];
2036 if (!strcmp(l->name, name))
2038 TRACE("Returning buffer %p.\n", l);
2039 return (ID3D10EffectConstantBuffer *)l;
2043 WARN("Invalid name specified\n");
2045 return (ID3D10EffectConstantBuffer *)&null_local_buffer;
2048 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableByIndex(ID3D10Effect *iface, UINT index)
2050 struct d3d10_effect *This = (struct d3d10_effect *)iface;
2053 TRACE("iface %p, index %u\n", iface, index);
2055 for (i = 0; i < This->local_buffer_count; ++i)
2057 struct d3d10_effect_variable *l = &This->local_buffers[i];
2059 if (index < l->type->member_count)
2061 struct d3d10_effect_variable *v = &l->members[index];
2063 TRACE("Returning variable %p.\n", v);
2064 return (ID3D10EffectVariable *)v;
2066 index -= l->type->member_count;
2069 if (index < This->local_variable_count)
2071 struct d3d10_effect_variable *v = &This->local_variables[index];
2073 TRACE("Returning variable %p.\n", v);
2074 return (ID3D10EffectVariable *)v;
2077 WARN("Invalid index specified\n");
2079 return (ID3D10EffectVariable *)&null_variable;
2082 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableByName(ID3D10Effect *iface, LPCSTR name)
2084 struct d3d10_effect *This = (struct d3d10_effect *)iface;
2087 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
2089 for (i = 0; i < This->local_buffer_count; ++i)
2091 struct d3d10_effect_variable *l = &This->local_buffers[i];
2094 for (j = 0; j < l->type->member_count; ++j)
2096 struct d3d10_effect_variable *v = &l->members[j];
2098 if (!strcmp(v->name, name))
2100 TRACE("Returning variable %p.\n", v);
2101 return (ID3D10EffectVariable *)v;
2106 for (i = 0; i < This->local_variable_count; ++i)
2108 struct d3d10_effect_variable *v = &This->local_variables[i];
2110 if (!strcmp(v->name, name))
2112 TRACE("Returning variable %p.\n", v);
2113 return (ID3D10EffectVariable *)v;
2117 WARN("Invalid name specified\n");
2119 return (ID3D10EffectVariable *)&null_variable;
2122 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableBySemantic(ID3D10Effect *iface,
2125 FIXME("iface %p, semantic %s stub!\n", iface, debugstr_a(semantic));
2130 static struct ID3D10EffectTechnique * STDMETHODCALLTYPE d3d10_effect_GetTechniqueByIndex(ID3D10Effect *iface,
2133 struct d3d10_effect *This = (struct d3d10_effect *)iface;
2134 struct d3d10_effect_technique *t;
2136 TRACE("iface %p, index %u\n", iface, index);
2138 if (index >= This->technique_count)
2140 WARN("Invalid index specified\n");
2141 return (ID3D10EffectTechnique *)&null_technique;
2144 t = &This->techniques[index];
2146 TRACE("Returning technique %p, %s.\n", t, debugstr_a(t->name));
2148 return (ID3D10EffectTechnique *)t;
2151 static struct ID3D10EffectTechnique * STDMETHODCALLTYPE d3d10_effect_GetTechniqueByName(ID3D10Effect *iface,
2154 struct d3d10_effect *This = (struct d3d10_effect *)iface;
2157 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
2159 for (i = 0; i < This->technique_count; ++i)
2161 struct d3d10_effect_technique *t = &This->techniques[i];
2162 if (!strcmp(t->name, name))
2164 TRACE("Returning technique %p\n", t);
2165 return (ID3D10EffectTechnique *)t;
2169 WARN("Invalid name specified\n");
2171 return (ID3D10EffectTechnique *)&null_technique;
2174 static HRESULT STDMETHODCALLTYPE d3d10_effect_Optimize(ID3D10Effect *iface)
2176 FIXME("iface %p stub!\n", iface);
2181 static BOOL STDMETHODCALLTYPE d3d10_effect_IsOptimized(ID3D10Effect *iface)
2183 FIXME("iface %p stub!\n", iface);
2188 const struct ID3D10EffectVtbl d3d10_effect_vtbl =
2190 /* IUnknown methods */
2191 d3d10_effect_QueryInterface,
2192 d3d10_effect_AddRef,
2193 d3d10_effect_Release,
2194 /* ID3D10Effect methods */
2195 d3d10_effect_IsValid,
2196 d3d10_effect_IsPool,
2197 d3d10_effect_GetDevice,
2198 d3d10_effect_GetDesc,
2199 d3d10_effect_GetConstantBufferByIndex,
2200 d3d10_effect_GetConstantBufferByName,
2201 d3d10_effect_GetVariableByIndex,
2202 d3d10_effect_GetVariableByName,
2203 d3d10_effect_GetVariableBySemantic,
2204 d3d10_effect_GetTechniqueByIndex,
2205 d3d10_effect_GetTechniqueByName,
2206 d3d10_effect_Optimize,
2207 d3d10_effect_IsOptimized,
2210 /* ID3D10EffectTechnique methods */
2212 static BOOL STDMETHODCALLTYPE d3d10_effect_technique_IsValid(ID3D10EffectTechnique *iface)
2214 TRACE("iface %p\n", iface);
2216 return (struct d3d10_effect_technique *)iface != &null_technique;
2219 static HRESULT STDMETHODCALLTYPE d3d10_effect_technique_GetDesc(ID3D10EffectTechnique *iface,
2220 D3D10_TECHNIQUE_DESC *desc)
2222 struct d3d10_effect_technique *This = (struct d3d10_effect_technique *)iface;
2224 TRACE("iface %p, desc %p\n", iface, desc);
2226 if(This == &null_technique)
2228 WARN("Null technique specified\n");
2234 WARN("Invalid argument specified\n");
2235 return E_INVALIDARG;
2238 desc->Name = This->name;
2239 desc->Passes = This->pass_count;
2240 desc->Annotations = This->annotation_count;
2245 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_technique_GetAnnotationByIndex(
2246 ID3D10EffectTechnique *iface, UINT index)
2248 struct d3d10_effect_technique *This = (struct d3d10_effect_technique *)iface;
2249 struct d3d10_effect_variable *a;
2251 TRACE("iface %p, index %u\n", iface, index);
2253 if (index >= This->annotation_count)
2255 WARN("Invalid index specified\n");
2256 return (ID3D10EffectVariable *)&null_variable;
2259 a = &This->annotations[index];
2261 TRACE("Returning annotation %p, %s\n", a, debugstr_a(a->name));
2263 return (ID3D10EffectVariable *)a;
2266 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_technique_GetAnnotationByName(
2267 ID3D10EffectTechnique *iface, LPCSTR name)
2269 struct d3d10_effect_technique *This = (struct d3d10_effect_technique *)iface;
2272 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
2274 for (i = 0; i < This->annotation_count; ++i)
2276 struct d3d10_effect_variable *a = &This->annotations[i];
2277 if (!strcmp(a->name, name))
2279 TRACE("Returning annotation %p\n", a);
2280 return (ID3D10EffectVariable *)a;
2284 WARN("Invalid name specified\n");
2286 return (ID3D10EffectVariable *)&null_variable;
2289 static struct ID3D10EffectPass * STDMETHODCALLTYPE d3d10_effect_technique_GetPassByIndex(ID3D10EffectTechnique *iface,
2292 struct d3d10_effect_technique *This = (struct d3d10_effect_technique *)iface;
2293 struct d3d10_effect_pass *p;
2295 TRACE("iface %p, index %u\n", iface, index);
2297 if (index >= This->pass_count)
2299 WARN("Invalid index specified\n");
2300 return (ID3D10EffectPass *)&null_pass;
2303 p = &This->passes[index];
2305 TRACE("Returning pass %p, %s.\n", p, debugstr_a(p->name));
2307 return (ID3D10EffectPass *)p;
2310 static struct ID3D10EffectPass * STDMETHODCALLTYPE d3d10_effect_technique_GetPassByName(ID3D10EffectTechnique *iface,
2313 struct d3d10_effect_technique *This = (struct d3d10_effect_technique *)iface;
2316 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
2318 for (i = 0; i < This->pass_count; ++i)
2320 struct d3d10_effect_pass *p = &This->passes[i];
2321 if (!strcmp(p->name, name))
2323 TRACE("Returning pass %p\n", p);
2324 return (ID3D10EffectPass *)p;
2328 WARN("Invalid name specified\n");
2330 return (ID3D10EffectPass *)&null_pass;
2333 static HRESULT STDMETHODCALLTYPE d3d10_effect_technique_ComputeStateBlockMask(ID3D10EffectTechnique *iface,
2334 D3D10_STATE_BLOCK_MASK *mask)
2336 FIXME("iface %p,mask %p stub!\n", iface, mask);
2341 static const struct ID3D10EffectTechniqueVtbl d3d10_effect_technique_vtbl =
2343 /* ID3D10EffectTechnique methods */
2344 d3d10_effect_technique_IsValid,
2345 d3d10_effect_technique_GetDesc,
2346 d3d10_effect_technique_GetAnnotationByIndex,
2347 d3d10_effect_technique_GetAnnotationByName,
2348 d3d10_effect_technique_GetPassByIndex,
2349 d3d10_effect_technique_GetPassByName,
2350 d3d10_effect_technique_ComputeStateBlockMask,
2353 /* ID3D10EffectPass methods */
2355 static BOOL STDMETHODCALLTYPE d3d10_effect_pass_IsValid(ID3D10EffectPass *iface)
2357 TRACE("iface %p\n", iface);
2359 return (struct d3d10_effect_pass *)iface != &null_pass;
2362 static HRESULT STDMETHODCALLTYPE d3d10_effect_pass_GetDesc(ID3D10EffectPass *iface, D3D10_PASS_DESC *desc)
2364 struct d3d10_effect_pass *This = (struct d3d10_effect_pass *)iface;
2367 FIXME("iface %p, desc %p partial stub!\n", iface, desc);
2369 if(This == &null_pass)
2371 WARN("Null pass specified\n");
2377 WARN("Invalid argument specified\n");
2378 return E_INVALIDARG;
2381 memset(desc, 0, sizeof(*desc));
2382 desc->Name = This->name;
2383 for (i = 0; i < This->object_count; ++i)
2385 struct d3d10_effect_object *o = &This->objects[i];
2386 if (o->type == D3D10_EOT_VERTEXSHADER)
2388 struct d3d10_effect_variable *v = o->data;
2389 struct d3d10_effect_shader_variable *s = v->data;
2390 desc->pIAInputSignature = (BYTE *)s->input_signature;
2391 desc->IAInputSignatureSize = s->input_signature_size;
2399 static HRESULT STDMETHODCALLTYPE d3d10_effect_pass_GetVertexShaderDesc(ID3D10EffectPass *iface,
2400 D3D10_PASS_SHADER_DESC *desc)
2402 struct d3d10_effect_pass *This = (struct d3d10_effect_pass *)iface;
2405 TRACE("iface %p, desc %p\n", iface, desc);
2407 if (This == &null_pass)
2409 WARN("Null pass specified\n");
2415 WARN("Invalid argument specified\n");
2416 return E_INVALIDARG;
2419 for (i = 0; i < This->object_count; ++i)
2421 struct d3d10_effect_object *o = &This->objects[i];
2423 if (o->type == D3D10_EOT_VERTEXSHADER)
2425 desc->pShaderVariable = o->data;
2426 desc->ShaderIndex = o->index;
2431 TRACE("Returning null_shader_variable\n");
2432 desc->pShaderVariable = (ID3D10EffectShaderVariable *)&null_shader_variable;
2433 desc->ShaderIndex = 0;
2438 static HRESULT STDMETHODCALLTYPE d3d10_effect_pass_GetGeometryShaderDesc(ID3D10EffectPass *iface,
2439 D3D10_PASS_SHADER_DESC *desc)
2441 struct d3d10_effect_pass *This = (struct d3d10_effect_pass *)iface;
2444 TRACE("iface %p, desc %p\n", iface, desc);
2446 if (This == &null_pass)
2448 WARN("Null pass specified\n");
2454 WARN("Invalid argument specified\n");
2455 return E_INVALIDARG;
2458 for (i = 0; i < This->object_count; ++i)
2460 struct d3d10_effect_object *o = &This->objects[i];
2462 if (o->type == D3D10_EOT_GEOMETRYSHADER)
2464 desc->pShaderVariable = o->data;
2465 desc->ShaderIndex = o->index;
2470 TRACE("Returning null_shader_variable\n");
2471 desc->pShaderVariable = (ID3D10EffectShaderVariable *)&null_shader_variable;
2472 desc->ShaderIndex = 0;
2477 static HRESULT STDMETHODCALLTYPE d3d10_effect_pass_GetPixelShaderDesc(ID3D10EffectPass *iface,
2478 D3D10_PASS_SHADER_DESC *desc)
2480 struct d3d10_effect_pass *This = (struct d3d10_effect_pass *)iface;
2483 TRACE("iface %p, desc %p\n", iface, desc);
2485 if (This == &null_pass)
2487 WARN("Null pass specified\n");
2493 WARN("Invalid argument specified\n");
2494 return E_INVALIDARG;
2497 for (i = 0; i < This->object_count; ++i)
2499 struct d3d10_effect_object *o = &This->objects[i];
2501 if (o->type == D3D10_EOT_PIXELSHADER)
2503 desc->pShaderVariable = o->data;
2504 desc->ShaderIndex = o->index;
2509 TRACE("Returning null_shader_variable\n");
2510 desc->pShaderVariable = (ID3D10EffectShaderVariable *)&null_shader_variable;
2511 desc->ShaderIndex = 0;
2516 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_pass_GetAnnotationByIndex(ID3D10EffectPass *iface,
2519 struct d3d10_effect_pass *This = (struct d3d10_effect_pass *)iface;
2520 struct d3d10_effect_variable *a;
2522 TRACE("iface %p, index %u\n", iface, index);
2524 if (index >= This->annotation_count)
2526 WARN("Invalid index specified\n");
2527 return (ID3D10EffectVariable *)&null_variable;
2530 a = &This->annotations[index];
2532 TRACE("Returning annotation %p, %s\n", a, debugstr_a(a->name));
2534 return (ID3D10EffectVariable *)a;
2537 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_pass_GetAnnotationByName(ID3D10EffectPass *iface,
2540 struct d3d10_effect_pass *This = (struct d3d10_effect_pass *)iface;
2543 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
2545 for (i = 0; i < This->annotation_count; ++i)
2547 struct d3d10_effect_variable *a = &This->annotations[i];
2548 if (!strcmp(a->name, name))
2550 TRACE("Returning annotation %p\n", a);
2551 return (ID3D10EffectVariable *)a;
2555 WARN("Invalid name specified\n");
2557 return (ID3D10EffectVariable *)&null_variable;
2560 static HRESULT STDMETHODCALLTYPE d3d10_effect_pass_Apply(ID3D10EffectPass *iface, UINT flags)
2562 struct d3d10_effect_pass *This = (struct d3d10_effect_pass *)iface;
2566 TRACE("iface %p, flags %#x\n", iface, flags);
2568 if (flags) FIXME("Ignoring flags (%#x)\n", flags);
2570 for (i = 0; i < This->object_count; ++i)
2572 hr = d3d10_effect_object_apply(&This->objects[i]);
2573 if (FAILED(hr)) break;
2579 static HRESULT STDMETHODCALLTYPE d3d10_effect_pass_ComputeStateBlockMask(ID3D10EffectPass *iface,
2580 D3D10_STATE_BLOCK_MASK *mask)
2582 FIXME("iface %p, mask %p stub!\n", iface, mask);
2587 static const struct ID3D10EffectPassVtbl d3d10_effect_pass_vtbl =
2589 /* ID3D10EffectPass methods */
2590 d3d10_effect_pass_IsValid,
2591 d3d10_effect_pass_GetDesc,
2592 d3d10_effect_pass_GetVertexShaderDesc,
2593 d3d10_effect_pass_GetGeometryShaderDesc,
2594 d3d10_effect_pass_GetPixelShaderDesc,
2595 d3d10_effect_pass_GetAnnotationByIndex,
2596 d3d10_effect_pass_GetAnnotationByName,
2597 d3d10_effect_pass_Apply,
2598 d3d10_effect_pass_ComputeStateBlockMask,
2601 /* ID3D10EffectVariable methods */
2603 static BOOL STDMETHODCALLTYPE d3d10_effect_variable_IsValid(ID3D10EffectVariable *iface)
2605 TRACE("iface %p\n", iface);
2607 return (struct d3d10_effect_variable *)iface != &null_variable;
2610 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_variable_GetType(ID3D10EffectVariable *iface)
2612 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2614 TRACE("iface %p\n", iface);
2616 return (ID3D10EffectType *)This->type;
2619 static HRESULT STDMETHODCALLTYPE d3d10_effect_variable_GetDesc(ID3D10EffectVariable *iface,
2620 D3D10_EFFECT_VARIABLE_DESC *desc)
2622 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2624 TRACE("iface %p, desc %p\n", iface, desc);
2626 if (!iface->lpVtbl->IsValid(iface))
2628 WARN("Null variable specified\n");
2634 WARN("Invalid argument specified\n");
2635 return E_INVALIDARG;
2638 /* FIXME: This isn't correct. Anonymous shaders let desc->ExplicitBindPoint untouched, but normal shaders set it! */
2639 memset(desc, 0, sizeof(*desc));
2640 desc->Name = This->name;
2641 desc->Semantic = This->semantic;
2642 desc->Flags = This->flag;
2643 desc->Annotations = This->annotation_count;
2644 desc->BufferOffset = This->buffer_offset;
2646 if (This->flag & D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT)
2648 desc->ExplicitBindPoint = This->buffer_offset;
2654 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_variable_GetAnnotationByIndex(
2655 ID3D10EffectVariable *iface, UINT index)
2657 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2658 struct d3d10_effect_variable *a;
2660 TRACE("iface %p, index %u\n", iface, index);
2662 if (index >= This->annotation_count)
2664 WARN("Invalid index specified\n");
2665 return (ID3D10EffectVariable *)&null_variable;
2668 a = &This->annotations[index];
2670 TRACE("Returning annotation %p, %s\n", a, debugstr_a(a->name));
2672 return (ID3D10EffectVariable *)a;
2675 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_variable_GetAnnotationByName(
2676 ID3D10EffectVariable *iface, LPCSTR name)
2678 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2681 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
2683 for (i = 0; i < This->annotation_count; ++i)
2685 struct d3d10_effect_variable *a = &This->annotations[i];
2686 if (!strcmp(a->name, name))
2688 TRACE("Returning annotation %p\n", a);
2689 return (ID3D10EffectVariable *)a;
2693 WARN("Invalid name specified\n");
2695 return (ID3D10EffectVariable *)&null_variable;
2698 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_variable_GetMemberByIndex(
2699 ID3D10EffectVariable *iface, UINT index)
2701 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2702 struct d3d10_effect_variable *m;
2704 TRACE("iface %p, index %u\n", iface, index);
2706 if (index >= This->type->member_count)
2708 WARN("Invalid index specified\n");
2709 return (ID3D10EffectVariable *)&null_variable;
2712 m = &This->members[index];
2714 TRACE("Returning member %p, %s\n", m, debugstr_a(m->name));
2716 return (ID3D10EffectVariable *)m;
2719 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_variable_GetMemberByName(
2720 ID3D10EffectVariable *iface, LPCSTR name)
2722 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2725 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
2729 WARN("Invalid name specified\n");
2730 return (ID3D10EffectVariable *)&null_variable;
2733 for (i = 0; i < This->type->member_count; ++i)
2735 struct d3d10_effect_variable *m = &This->members[i];
2739 if (!strcmp(m->name, name))
2741 TRACE("Returning member %p\n", m);
2742 return (ID3D10EffectVariable *)m;
2747 WARN("Invalid name specified\n");
2749 return (ID3D10EffectVariable *)&null_variable;
2752 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_variable_GetMemberBySemantic(
2753 ID3D10EffectVariable *iface, LPCSTR semantic)
2755 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2758 TRACE("iface %p, semantic %s.\n", iface, debugstr_a(semantic));
2762 WARN("Invalid semantic specified\n");
2763 return (ID3D10EffectVariable *)&null_variable;
2766 for (i = 0; i < This->type->member_count; ++i)
2768 struct d3d10_effect_variable *m = &This->members[i];
2772 if (!strcmp(m->semantic, semantic))
2774 TRACE("Returning member %p\n", m);
2775 return (ID3D10EffectVariable *)m;
2780 WARN("Invalid semantic specified\n");
2782 return (ID3D10EffectVariable *)&null_variable;
2785 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_variable_GetElement(
2786 ID3D10EffectVariable *iface, UINT index)
2788 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2789 struct d3d10_effect_variable *v;
2791 TRACE("iface %p, index %u\n", iface, index);
2793 if (index >= This->type->element_count)
2795 WARN("Invalid index specified\n");
2796 return (ID3D10EffectVariable *)&null_variable;
2799 v = &This->elements[index];
2801 TRACE("Returning element %p, %s\n", v, debugstr_a(v->name));
2803 return (ID3D10EffectVariable *)v;
2806 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_variable_GetParentConstantBuffer(
2807 ID3D10EffectVariable *iface)
2809 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2811 TRACE("iface %p\n", iface);
2813 return (ID3D10EffectConstantBuffer *)This->buffer;
2816 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsScalar(
2817 ID3D10EffectVariable *iface)
2819 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2821 TRACE("iface %p\n", iface);
2823 if (This->vtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_scalar_variable_vtbl)
2824 return (ID3D10EffectScalarVariable *)This;
2826 return (ID3D10EffectScalarVariable *)&null_scalar_variable;
2829 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsVector(
2830 ID3D10EffectVariable *iface)
2832 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2834 TRACE("iface %p\n", iface);
2836 if (This->vtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_vector_variable_vtbl)
2837 return (ID3D10EffectVectorVariable *)This;
2839 return (ID3D10EffectVectorVariable *)&null_vector_variable;
2842 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsMatrix(
2843 ID3D10EffectVariable *iface)
2845 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2847 TRACE("iface %p\n", iface);
2849 if (This->vtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_matrix_variable_vtbl)
2850 return (ID3D10EffectMatrixVariable *)This;
2852 return (ID3D10EffectMatrixVariable *)&null_matrix_variable;
2855 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsString(
2856 ID3D10EffectVariable *iface)
2858 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2860 TRACE("iface %p\n", iface);
2862 if (This->vtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_string_variable_vtbl)
2863 return (ID3D10EffectStringVariable *)This;
2865 return (ID3D10EffectStringVariable *)&null_string_variable;
2868 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsShaderResource(
2869 ID3D10EffectVariable *iface)
2871 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2873 TRACE("iface %p\n", iface);
2875 if (This->vtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_shader_resource_variable_vtbl)
2876 return (ID3D10EffectShaderResourceVariable *)This;
2878 return (ID3D10EffectShaderResourceVariable *)&null_shader_resource_variable;
2881 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsRenderTargetView(
2882 ID3D10EffectVariable *iface)
2884 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2886 TRACE("iface %p\n", iface);
2888 if (This->vtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_render_target_view_variable_vtbl)
2889 return (ID3D10EffectRenderTargetViewVariable *)This;
2891 return (ID3D10EffectRenderTargetViewVariable *)&null_render_target_view_variable;
2894 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsDepthStencilView(
2895 ID3D10EffectVariable *iface)
2897 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2899 TRACE("iface %p\n", iface);
2901 if (This->vtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_depth_stencil_view_variable_vtbl)
2902 return (ID3D10EffectDepthStencilViewVariable *)This;
2904 return (ID3D10EffectDepthStencilViewVariable *)&null_depth_stencil_view_variable;
2907 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_variable_AsConstantBuffer(
2908 ID3D10EffectVariable *iface)
2910 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2912 TRACE("iface %p\n", iface);
2914 if (This->vtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_constant_buffer_vtbl)
2915 return (ID3D10EffectConstantBuffer *)This;
2917 return (ID3D10EffectConstantBuffer *)&null_local_buffer;
2920 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsShader(
2921 ID3D10EffectVariable *iface)
2923 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2925 TRACE("iface %p\n", iface);
2927 if (This->vtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_shader_variable_vtbl)
2928 return (ID3D10EffectShaderVariable *)This;
2930 return (ID3D10EffectShaderVariable *)&null_shader_variable;
2933 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsBlend(ID3D10EffectVariable *iface)
2935 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2937 TRACE("iface %p\n", iface);
2939 if (This->vtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_blend_variable_vtbl)
2940 return (ID3D10EffectBlendVariable *)This;
2942 return (ID3D10EffectBlendVariable *)&null_blend_variable;
2945 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsDepthStencil(
2946 ID3D10EffectVariable *iface)
2948 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2950 TRACE("iface %p\n", iface);
2952 if (This->vtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_depth_stencil_variable_vtbl)
2953 return (ID3D10EffectDepthStencilVariable *)This;
2955 return (ID3D10EffectDepthStencilVariable *)&null_depth_stencil_variable;
2958 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsRasterizer(
2959 ID3D10EffectVariable *iface)
2961 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2963 TRACE("iface %p\n", iface);
2965 if (This->vtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_rasterizer_variable_vtbl)
2966 return (ID3D10EffectRasterizerVariable *)This;
2968 return (ID3D10EffectRasterizerVariable *)&null_rasterizer_variable;
2971 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsSampler(
2972 ID3D10EffectVariable *iface)
2974 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2976 TRACE("iface %p\n", iface);
2978 if (This->vtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_sampler_variable_vtbl)
2979 return (ID3D10EffectSamplerVariable *)This;
2981 return (ID3D10EffectSamplerVariable *)&null_sampler_variable;
2984 static HRESULT STDMETHODCALLTYPE d3d10_effect_variable_SetRawValue(ID3D10EffectVariable *iface,
2985 void *data, UINT offset, UINT count)
2987 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface, data, offset, count);
2992 static HRESULT STDMETHODCALLTYPE d3d10_effect_variable_GetRawValue(ID3D10EffectVariable *iface,
2993 void *data, UINT offset, UINT count)
2995 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface, data, offset, count);
3000 static const struct ID3D10EffectVariableVtbl d3d10_effect_variable_vtbl =
3002 /* ID3D10EffectVariable methods */
3003 d3d10_effect_variable_IsValid,
3004 d3d10_effect_variable_GetType,
3005 d3d10_effect_variable_GetDesc,
3006 d3d10_effect_variable_GetAnnotationByIndex,
3007 d3d10_effect_variable_GetAnnotationByName,
3008 d3d10_effect_variable_GetMemberByIndex,
3009 d3d10_effect_variable_GetMemberByName,
3010 d3d10_effect_variable_GetMemberBySemantic,
3011 d3d10_effect_variable_GetElement,
3012 d3d10_effect_variable_GetParentConstantBuffer,
3013 d3d10_effect_variable_AsScalar,
3014 d3d10_effect_variable_AsVector,
3015 d3d10_effect_variable_AsMatrix,
3016 d3d10_effect_variable_AsString,
3017 d3d10_effect_variable_AsShaderResource,
3018 d3d10_effect_variable_AsRenderTargetView,
3019 d3d10_effect_variable_AsDepthStencilView,
3020 d3d10_effect_variable_AsConstantBuffer,
3021 d3d10_effect_variable_AsShader,
3022 d3d10_effect_variable_AsBlend,
3023 d3d10_effect_variable_AsDepthStencil,
3024 d3d10_effect_variable_AsRasterizer,
3025 d3d10_effect_variable_AsSampler,
3026 d3d10_effect_variable_SetRawValue,
3027 d3d10_effect_variable_GetRawValue,
3030 /* ID3D10EffectVariable methods */
3031 static BOOL STDMETHODCALLTYPE d3d10_effect_constant_buffer_IsValid(ID3D10EffectConstantBuffer *iface)
3033 TRACE("iface %p\n", iface);
3035 return (struct d3d10_effect_variable *)iface != &null_local_buffer;
3038 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetType(ID3D10EffectConstantBuffer *iface)
3040 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
3043 static HRESULT STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetDesc(ID3D10EffectConstantBuffer *iface,
3044 D3D10_EFFECT_VARIABLE_DESC *desc)
3046 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
3049 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetAnnotationByIndex(
3050 ID3D10EffectConstantBuffer *iface, UINT index)
3052 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
3055 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetAnnotationByName(
3056 ID3D10EffectConstantBuffer *iface, LPCSTR name)
3058 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
3061 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetMemberByIndex(
3062 ID3D10EffectConstantBuffer *iface, UINT index)
3064 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
3067 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetMemberByName(
3068 ID3D10EffectConstantBuffer *iface, LPCSTR name)
3070 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
3073 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetMemberBySemantic(
3074 ID3D10EffectConstantBuffer *iface, LPCSTR semantic)
3076 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
3079 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetElement(
3080 ID3D10EffectConstantBuffer *iface, UINT index)
3082 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
3085 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetParentConstantBuffer(
3086 ID3D10EffectConstantBuffer *iface)
3088 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
3091 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsScalar(
3092 ID3D10EffectConstantBuffer *iface)
3094 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
3097 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsVector(
3098 ID3D10EffectConstantBuffer *iface)
3100 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
3103 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsMatrix(
3104 ID3D10EffectConstantBuffer *iface)
3106 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
3109 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsString(
3110 ID3D10EffectConstantBuffer *iface)
3112 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
3115 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsShaderResource(
3116 ID3D10EffectConstantBuffer *iface)
3118 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
3121 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsRenderTargetView(
3122 ID3D10EffectConstantBuffer *iface)
3124 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
3127 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsDepthStencilView(
3128 ID3D10EffectConstantBuffer *iface)
3130 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
3133 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsConstantBuffer(
3134 ID3D10EffectConstantBuffer *iface)
3136 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
3139 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsShader(
3140 ID3D10EffectConstantBuffer *iface)
3142 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
3145 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsBlend(ID3D10EffectConstantBuffer *iface)
3147 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
3150 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsDepthStencil(
3151 ID3D10EffectConstantBuffer *iface)
3153 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
3156 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsRasterizer(
3157 ID3D10EffectConstantBuffer *iface)
3159 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
3162 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsSampler(
3163 ID3D10EffectConstantBuffer *iface)
3165 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
3168 static HRESULT STDMETHODCALLTYPE d3d10_effect_constant_buffer_SetRawValue(ID3D10EffectConstantBuffer *iface,
3169 void *data, UINT offset, UINT count)
3171 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
3174 static HRESULT STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetRawValue(ID3D10EffectConstantBuffer *iface,
3175 void *data, UINT offset, UINT count)
3177 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
3180 /* ID3D10EffectConstantBuffer methods */
3181 static HRESULT STDMETHODCALLTYPE d3d10_effect_constant_buffer_SetConstantBuffer(ID3D10EffectConstantBuffer *iface,
3182 ID3D10Buffer *buffer)
3184 FIXME("iface %p, buffer %p stub!\n", iface, buffer);
3189 static HRESULT STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetConstantBuffer(ID3D10EffectConstantBuffer *iface,
3190 ID3D10Buffer **buffer)
3192 FIXME("iface %p, buffer %p stub!\n", iface, buffer);
3197 static HRESULT STDMETHODCALLTYPE d3d10_effect_constant_buffer_SetTextureBuffer(ID3D10EffectConstantBuffer *iface,
3198 ID3D10ShaderResourceView *view)
3200 FIXME("iface %p, view %p stub!\n", iface, view);
3205 static HRESULT STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetTextureBuffer(ID3D10EffectConstantBuffer *iface,
3206 ID3D10ShaderResourceView **view)
3208 FIXME("iface %p, view %p stub!\n", iface, view);
3213 static const struct ID3D10EffectConstantBufferVtbl d3d10_effect_constant_buffer_vtbl =
3215 /* ID3D10EffectVariable methods */
3216 d3d10_effect_constant_buffer_IsValid,
3217 d3d10_effect_constant_buffer_GetType,
3218 d3d10_effect_constant_buffer_GetDesc,
3219 d3d10_effect_constant_buffer_GetAnnotationByIndex,
3220 d3d10_effect_constant_buffer_GetAnnotationByName,
3221 d3d10_effect_constant_buffer_GetMemberByIndex,
3222 d3d10_effect_constant_buffer_GetMemberByName,
3223 d3d10_effect_constant_buffer_GetMemberBySemantic,
3224 d3d10_effect_constant_buffer_GetElement,
3225 d3d10_effect_constant_buffer_GetParentConstantBuffer,
3226 d3d10_effect_constant_buffer_AsScalar,
3227 d3d10_effect_constant_buffer_AsVector,
3228 d3d10_effect_constant_buffer_AsMatrix,
3229 d3d10_effect_constant_buffer_AsString,
3230 d3d10_effect_constant_buffer_AsShaderResource,
3231 d3d10_effect_constant_buffer_AsRenderTargetView,
3232 d3d10_effect_constant_buffer_AsDepthStencilView,
3233 d3d10_effect_constant_buffer_AsConstantBuffer,
3234 d3d10_effect_constant_buffer_AsShader,
3235 d3d10_effect_constant_buffer_AsBlend,
3236 d3d10_effect_constant_buffer_AsDepthStencil,
3237 d3d10_effect_constant_buffer_AsRasterizer,
3238 d3d10_effect_constant_buffer_AsSampler,
3239 d3d10_effect_constant_buffer_SetRawValue,
3240 d3d10_effect_constant_buffer_GetRawValue,
3241 /* ID3D10EffectConstantBuffer methods */
3242 d3d10_effect_constant_buffer_SetConstantBuffer,
3243 d3d10_effect_constant_buffer_GetConstantBuffer,
3244 d3d10_effect_constant_buffer_SetTextureBuffer,
3245 d3d10_effect_constant_buffer_GetTextureBuffer,
3248 /* ID3D10EffectVariable methods */
3250 static BOOL STDMETHODCALLTYPE d3d10_effect_scalar_variable_IsValid(ID3D10EffectScalarVariable *iface)
3252 TRACE("iface %p\n", iface);
3254 return (struct d3d10_effect_variable *)iface != &null_scalar_variable;
3257 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetType(
3258 ID3D10EffectScalarVariable *iface)
3260 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
3263 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetDesc(ID3D10EffectScalarVariable *iface,
3264 D3D10_EFFECT_VARIABLE_DESC *desc)
3266 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
3269 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetAnnotationByIndex(
3270 ID3D10EffectScalarVariable *iface, UINT index)
3272 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
3275 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetAnnotationByName(
3276 ID3D10EffectScalarVariable *iface, LPCSTR name)
3278 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
3281 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetMemberByIndex(
3282 ID3D10EffectScalarVariable *iface, UINT index)
3284 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
3287 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetMemberByName(
3288 ID3D10EffectScalarVariable *iface, LPCSTR name)
3290 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
3293 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetMemberBySemantic(
3294 ID3D10EffectScalarVariable *iface, LPCSTR semantic)
3296 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
3299 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetElement(
3300 ID3D10EffectScalarVariable *iface, UINT index)
3302 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
3305 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetParentConstantBuffer(
3306 ID3D10EffectScalarVariable *iface)
3308 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
3311 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsScalar(
3312 ID3D10EffectScalarVariable *iface)
3314 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
3317 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsVector(
3318 ID3D10EffectScalarVariable *iface)
3320 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
3323 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsMatrix(
3324 ID3D10EffectScalarVariable *iface)
3326 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
3329 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsString(
3330 ID3D10EffectScalarVariable *iface)
3332 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
3335 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsShaderResource(
3336 ID3D10EffectScalarVariable *iface)
3338 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
3341 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsRenderTargetView(
3342 ID3D10EffectScalarVariable *iface)
3344 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
3347 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsDepthStencilView(
3348 ID3D10EffectScalarVariable *iface)
3350 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
3353 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsConstantBuffer(
3354 ID3D10EffectScalarVariable *iface)
3356 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
3359 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsShader(
3360 ID3D10EffectScalarVariable *iface)
3362 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
3365 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsBlend(
3366 ID3D10EffectScalarVariable *iface)
3368 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
3371 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsDepthStencil(
3372 ID3D10EffectScalarVariable *iface)
3374 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
3377 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsRasterizer(
3378 ID3D10EffectScalarVariable *iface)
3380 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
3383 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsSampler(
3384 ID3D10EffectScalarVariable *iface)
3386 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
3389 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetRawValue(ID3D10EffectScalarVariable *iface,
3390 void *data, UINT offset, UINT count)
3392 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
3395 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetRawValue(ID3D10EffectScalarVariable *iface,
3396 void *data, UINT offset, UINT count)
3398 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
3401 /* ID3D10EffectScalarVariable methods */
3403 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetFloat(ID3D10EffectScalarVariable *iface,
3406 FIXME("iface %p, value %.8e stub!\n", iface, value);
3411 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetFloat(ID3D10EffectScalarVariable *iface,
3414 FIXME("iface %p, value %p stub!\n", iface, value);
3419 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetFloatArray(ID3D10EffectScalarVariable *iface,
3420 float *values, UINT offset, UINT count)
3422 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3427 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetFloatArray(ID3D10EffectScalarVariable *iface,
3428 float *values, UINT offset, UINT count)
3430 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3435 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetInt(ID3D10EffectScalarVariable *iface,
3438 FIXME("iface %p, value %d stub!\n", iface, value);
3443 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetInt(ID3D10EffectScalarVariable *iface,
3446 FIXME("iface %p, value %p stub!\n", iface, value);
3451 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetIntArray(ID3D10EffectScalarVariable *iface,
3452 int *values, UINT offset, UINT count)
3454 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3459 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetIntArray(ID3D10EffectScalarVariable *iface,
3460 int *values, UINT offset, UINT count)
3462 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3467 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetBool(ID3D10EffectScalarVariable *iface,
3470 FIXME("iface %p, value %d stub!\n", iface, value);
3475 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetBool(ID3D10EffectScalarVariable *iface,
3478 FIXME("iface %p, value %p stub!\n", iface, value);
3483 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetBoolArray(ID3D10EffectScalarVariable *iface,
3484 BOOL *values, UINT offset, UINT count)
3486 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3491 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetBoolArray(ID3D10EffectScalarVariable *iface,
3492 BOOL *values, UINT offset, UINT count)
3494 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3499 static const struct ID3D10EffectScalarVariableVtbl d3d10_effect_scalar_variable_vtbl =
3501 /* ID3D10EffectVariable methods */
3502 d3d10_effect_scalar_variable_IsValid,
3503 d3d10_effect_scalar_variable_GetType,
3504 d3d10_effect_scalar_variable_GetDesc,
3505 d3d10_effect_scalar_variable_GetAnnotationByIndex,
3506 d3d10_effect_scalar_variable_GetAnnotationByName,
3507 d3d10_effect_scalar_variable_GetMemberByIndex,
3508 d3d10_effect_scalar_variable_GetMemberByName,
3509 d3d10_effect_scalar_variable_GetMemberBySemantic,
3510 d3d10_effect_scalar_variable_GetElement,
3511 d3d10_effect_scalar_variable_GetParentConstantBuffer,
3512 d3d10_effect_scalar_variable_AsScalar,
3513 d3d10_effect_scalar_variable_AsVector,
3514 d3d10_effect_scalar_variable_AsMatrix,
3515 d3d10_effect_scalar_variable_AsString,
3516 d3d10_effect_scalar_variable_AsShaderResource,
3517 d3d10_effect_scalar_variable_AsRenderTargetView,
3518 d3d10_effect_scalar_variable_AsDepthStencilView,
3519 d3d10_effect_scalar_variable_AsConstantBuffer,
3520 d3d10_effect_scalar_variable_AsShader,
3521 d3d10_effect_scalar_variable_AsBlend,
3522 d3d10_effect_scalar_variable_AsDepthStencil,
3523 d3d10_effect_scalar_variable_AsRasterizer,
3524 d3d10_effect_scalar_variable_AsSampler,
3525 d3d10_effect_scalar_variable_SetRawValue,
3526 d3d10_effect_scalar_variable_GetRawValue,
3527 /* ID3D10EffectScalarVariable methods */
3528 d3d10_effect_scalar_variable_SetFloat,
3529 d3d10_effect_scalar_variable_GetFloat,
3530 d3d10_effect_scalar_variable_SetFloatArray,
3531 d3d10_effect_scalar_variable_GetFloatArray,
3532 d3d10_effect_scalar_variable_SetInt,
3533 d3d10_effect_scalar_variable_GetInt,
3534 d3d10_effect_scalar_variable_SetIntArray,
3535 d3d10_effect_scalar_variable_GetIntArray,
3536 d3d10_effect_scalar_variable_SetBool,
3537 d3d10_effect_scalar_variable_GetBool,
3538 d3d10_effect_scalar_variable_SetBoolArray,
3539 d3d10_effect_scalar_variable_GetBoolArray,
3542 /* ID3D10EffectVariable methods */
3544 static BOOL STDMETHODCALLTYPE d3d10_effect_vector_variable_IsValid(ID3D10EffectVectorVariable *iface)
3546 TRACE("iface %p\n", iface);
3548 return (struct d3d10_effect_variable *)iface != &null_vector_variable;
3551 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetType(
3552 ID3D10EffectVectorVariable *iface)
3554 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
3557 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetDesc(ID3D10EffectVectorVariable *iface,
3558 D3D10_EFFECT_VARIABLE_DESC *desc)
3560 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
3563 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetAnnotationByIndex(
3564 ID3D10EffectVectorVariable *iface, UINT index)
3566 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
3569 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetAnnotationByName(
3570 ID3D10EffectVectorVariable *iface, LPCSTR name)
3572 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
3575 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetMemberByIndex(
3576 ID3D10EffectVectorVariable *iface, UINT index)
3578 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
3581 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetMemberByName(
3582 ID3D10EffectVectorVariable *iface, LPCSTR name)
3584 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
3587 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetMemberBySemantic(
3588 ID3D10EffectVectorVariable *iface, LPCSTR semantic)
3590 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
3593 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetElement(
3594 ID3D10EffectVectorVariable *iface, UINT index)
3596 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
3599 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetParentConstantBuffer(
3600 ID3D10EffectVectorVariable *iface)
3602 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
3605 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsScalar(
3606 ID3D10EffectVectorVariable *iface)
3608 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
3611 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsVector(
3612 ID3D10EffectVectorVariable *iface)
3614 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
3617 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsMatrix(
3618 ID3D10EffectVectorVariable *iface)
3620 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
3623 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsString(
3624 ID3D10EffectVectorVariable *iface)
3626 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
3629 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsShaderResource(
3630 ID3D10EffectVectorVariable *iface)
3632 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
3635 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsRenderTargetView(
3636 ID3D10EffectVectorVariable *iface)
3638 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
3641 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsDepthStencilView(
3642 ID3D10EffectVectorVariable *iface)
3644 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
3647 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsConstantBuffer(
3648 ID3D10EffectVectorVariable *iface)
3650 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
3653 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsShader(
3654 ID3D10EffectVectorVariable *iface)
3656 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
3659 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsBlend(
3660 ID3D10EffectVectorVariable *iface)
3662 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
3665 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsDepthStencil(
3666 ID3D10EffectVectorVariable *iface)
3668 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
3671 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsRasterizer(
3672 ID3D10EffectVectorVariable *iface)
3674 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
3677 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsSampler(
3678 ID3D10EffectVectorVariable *iface)
3680 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
3683 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_SetRawValue(ID3D10EffectVectorVariable *iface,
3684 void *data, UINT offset, UINT count)
3686 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
3689 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetRawValue(ID3D10EffectVectorVariable *iface,
3690 void *data, UINT offset, UINT count)
3692 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
3695 /* ID3D10EffectVectorVariable methods */
3697 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_SetBoolVector(ID3D10EffectVectorVariable *iface,
3700 FIXME("iface %p, value %p stub!\n", iface, value);
3705 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_SetIntVector(ID3D10EffectVectorVariable *iface,
3708 FIXME("iface %p, value %p stub!\n", iface, value);
3713 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_SetFloatVector(ID3D10EffectVectorVariable *iface,
3716 FIXME("iface %p, value %p stub!\n", iface, value);
3721 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetBoolVector(ID3D10EffectVectorVariable *iface,
3724 FIXME("iface %p, value %p stub!\n", iface, value);
3729 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetIntVector(ID3D10EffectVectorVariable *iface,
3732 FIXME("iface %p, value %p stub!\n", iface, value);
3737 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetFloatVector(ID3D10EffectVectorVariable *iface,
3740 FIXME("iface %p, value %p stub!\n", iface, value);
3745 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_SetBoolVectorArray(ID3D10EffectVectorVariable *iface,
3746 BOOL *values, UINT offset, UINT count)
3748 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3753 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_SetIntVectorArray(ID3D10EffectVectorVariable *iface,
3754 int *values, UINT offset, UINT count)
3756 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3761 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_SetFloatVectorArray(ID3D10EffectVectorVariable *iface,
3762 float *values, UINT offset, UINT count)
3764 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3769 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetBoolVectorArray(ID3D10EffectVectorVariable *iface,
3770 BOOL *values, UINT offset, UINT count)
3772 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3777 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetIntVectorArray(ID3D10EffectVectorVariable *iface,
3778 int *values, UINT offset, UINT count)
3780 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3785 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetFloatVectorArray(ID3D10EffectVectorVariable *iface,
3786 float *values, UINT offset, UINT count)
3788 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3793 static const struct ID3D10EffectVectorVariableVtbl d3d10_effect_vector_variable_vtbl =
3795 /* ID3D10EffectVariable methods */
3796 d3d10_effect_vector_variable_IsValid,
3797 d3d10_effect_vector_variable_GetType,
3798 d3d10_effect_vector_variable_GetDesc,
3799 d3d10_effect_vector_variable_GetAnnotationByIndex,
3800 d3d10_effect_vector_variable_GetAnnotationByName,
3801 d3d10_effect_vector_variable_GetMemberByIndex,
3802 d3d10_effect_vector_variable_GetMemberByName,
3803 d3d10_effect_vector_variable_GetMemberBySemantic,
3804 d3d10_effect_vector_variable_GetElement,
3805 d3d10_effect_vector_variable_GetParentConstantBuffer,
3806 d3d10_effect_vector_variable_AsScalar,
3807 d3d10_effect_vector_variable_AsVector,
3808 d3d10_effect_vector_variable_AsMatrix,
3809 d3d10_effect_vector_variable_AsString,
3810 d3d10_effect_vector_variable_AsShaderResource,
3811 d3d10_effect_vector_variable_AsRenderTargetView,
3812 d3d10_effect_vector_variable_AsDepthStencilView,
3813 d3d10_effect_vector_variable_AsConstantBuffer,
3814 d3d10_effect_vector_variable_AsShader,
3815 d3d10_effect_vector_variable_AsBlend,
3816 d3d10_effect_vector_variable_AsDepthStencil,
3817 d3d10_effect_vector_variable_AsRasterizer,
3818 d3d10_effect_vector_variable_AsSampler,
3819 d3d10_effect_vector_variable_SetRawValue,
3820 d3d10_effect_vector_variable_GetRawValue,
3821 /* ID3D10EffectVectorVariable methods */
3822 d3d10_effect_vector_variable_SetBoolVector,
3823 d3d10_effect_vector_variable_SetIntVector,
3824 d3d10_effect_vector_variable_SetFloatVector,
3825 d3d10_effect_vector_variable_GetBoolVector,
3826 d3d10_effect_vector_variable_GetIntVector,
3827 d3d10_effect_vector_variable_GetFloatVector,
3828 d3d10_effect_vector_variable_SetBoolVectorArray,
3829 d3d10_effect_vector_variable_SetIntVectorArray,
3830 d3d10_effect_vector_variable_SetFloatVectorArray,
3831 d3d10_effect_vector_variable_GetBoolVectorArray,
3832 d3d10_effect_vector_variable_GetIntVectorArray,
3833 d3d10_effect_vector_variable_GetFloatVectorArray,
3836 /* ID3D10EffectVariable methods */
3838 static BOOL STDMETHODCALLTYPE d3d10_effect_matrix_variable_IsValid(ID3D10EffectMatrixVariable *iface)
3840 TRACE("iface %p\n", iface);
3842 return (struct d3d10_effect_variable *)iface != &null_matrix_variable;
3845 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetType(
3846 ID3D10EffectMatrixVariable *iface)
3848 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
3851 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetDesc(ID3D10EffectMatrixVariable *iface,
3852 D3D10_EFFECT_VARIABLE_DESC *desc)
3854 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
3857 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetAnnotationByIndex(
3858 ID3D10EffectMatrixVariable *iface, UINT index)
3860 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
3863 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetAnnotationByName(
3864 ID3D10EffectMatrixVariable *iface, LPCSTR name)
3866 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
3869 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetMemberByIndex(
3870 ID3D10EffectMatrixVariable *iface, UINT index)
3872 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
3875 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetMemberByName(
3876 ID3D10EffectMatrixVariable *iface, LPCSTR name)
3878 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
3881 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetMemberBySemantic(
3882 ID3D10EffectMatrixVariable *iface, LPCSTR semantic)
3884 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
3887 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetElement(
3888 ID3D10EffectMatrixVariable *iface, UINT index)
3890 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
3893 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetParentConstantBuffer(
3894 ID3D10EffectMatrixVariable *iface)
3896 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
3899 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsScalar(
3900 ID3D10EffectMatrixVariable *iface)
3902 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
3905 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsVector(
3906 ID3D10EffectMatrixVariable *iface)
3908 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
3911 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsMatrix(
3912 ID3D10EffectMatrixVariable *iface)
3914 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
3917 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsString(
3918 ID3D10EffectMatrixVariable *iface)
3920 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
3923 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsShaderResource(
3924 ID3D10EffectMatrixVariable *iface)
3926 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
3929 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsRenderTargetView(
3930 ID3D10EffectMatrixVariable *iface)
3932 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
3935 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsDepthStencilView(
3936 ID3D10EffectMatrixVariable *iface)
3938 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
3941 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsConstantBuffer(
3942 ID3D10EffectMatrixVariable *iface)
3944 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
3947 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsShader(
3948 ID3D10EffectMatrixVariable *iface)
3950 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
3953 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsBlend(
3954 ID3D10EffectMatrixVariable *iface)
3956 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
3959 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsDepthStencil(
3960 ID3D10EffectMatrixVariable *iface)
3962 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
3965 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsRasterizer(
3966 ID3D10EffectMatrixVariable *iface)
3968 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
3971 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsSampler(
3972 ID3D10EffectMatrixVariable *iface)
3974 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
3977 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_SetRawValue(ID3D10EffectMatrixVariable *iface,
3978 void *data, UINT offset, UINT count)
3980 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
3983 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetRawValue(ID3D10EffectMatrixVariable *iface,
3984 void *data, UINT offset, UINT count)
3986 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
3989 /* ID3D10EffectMatrixVariable methods */
3991 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_SetMatrix(ID3D10EffectMatrixVariable *iface,
3994 FIXME("iface %p, data %p stub!\n", iface, data);
3999 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetMatrix(ID3D10EffectMatrixVariable *iface,
4002 FIXME("iface %p, data %p stub!\n", iface, data);
4007 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_SetMatrixArray(ID3D10EffectMatrixVariable *iface,
4008 float *data, UINT offset, UINT count)
4010 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface, data, offset, count);
4015 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetMatrixArray(ID3D10EffectMatrixVariable *iface,
4016 float *data, UINT offset, UINT count)
4018 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface, data, offset, count);
4023 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_SetMatrixTranspose(ID3D10EffectMatrixVariable *iface,
4026 FIXME("iface %p, data %p stub!\n", iface, data);
4031 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetMatrixTranspose(ID3D10EffectMatrixVariable *iface,
4034 FIXME("iface %p, data %p stub!\n", iface, data);
4039 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_SetMatrixTransposeArray(ID3D10EffectMatrixVariable *iface,
4040 float *data, UINT offset, UINT count)
4042 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface, data, offset, count);
4047 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetMatrixTransposeArray(ID3D10EffectMatrixVariable *iface,
4048 float *data, UINT offset, UINT count)
4050 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface, data, offset, count);
4056 static const struct ID3D10EffectMatrixVariableVtbl d3d10_effect_matrix_variable_vtbl =
4058 /* ID3D10EffectVariable methods */
4059 d3d10_effect_matrix_variable_IsValid,
4060 d3d10_effect_matrix_variable_GetType,
4061 d3d10_effect_matrix_variable_GetDesc,
4062 d3d10_effect_matrix_variable_GetAnnotationByIndex,
4063 d3d10_effect_matrix_variable_GetAnnotationByName,
4064 d3d10_effect_matrix_variable_GetMemberByIndex,
4065 d3d10_effect_matrix_variable_GetMemberByName,
4066 d3d10_effect_matrix_variable_GetMemberBySemantic,
4067 d3d10_effect_matrix_variable_GetElement,
4068 d3d10_effect_matrix_variable_GetParentConstantBuffer,
4069 d3d10_effect_matrix_variable_AsScalar,
4070 d3d10_effect_matrix_variable_AsVector,
4071 d3d10_effect_matrix_variable_AsMatrix,
4072 d3d10_effect_matrix_variable_AsString,
4073 d3d10_effect_matrix_variable_AsShaderResource,
4074 d3d10_effect_matrix_variable_AsRenderTargetView,
4075 d3d10_effect_matrix_variable_AsDepthStencilView,
4076 d3d10_effect_matrix_variable_AsConstantBuffer,
4077 d3d10_effect_matrix_variable_AsShader,
4078 d3d10_effect_matrix_variable_AsBlend,
4079 d3d10_effect_matrix_variable_AsDepthStencil,
4080 d3d10_effect_matrix_variable_AsRasterizer,
4081 d3d10_effect_matrix_variable_AsSampler,
4082 d3d10_effect_matrix_variable_SetRawValue,
4083 d3d10_effect_matrix_variable_GetRawValue,
4084 /* ID3D10EffectMatrixVariable methods */
4085 d3d10_effect_matrix_variable_SetMatrix,
4086 d3d10_effect_matrix_variable_GetMatrix,
4087 d3d10_effect_matrix_variable_SetMatrixArray,
4088 d3d10_effect_matrix_variable_GetMatrixArray,
4089 d3d10_effect_matrix_variable_SetMatrixTranspose,
4090 d3d10_effect_matrix_variable_GetMatrixTranspose,
4091 d3d10_effect_matrix_variable_SetMatrixTransposeArray,
4092 d3d10_effect_matrix_variable_GetMatrixTransposeArray,
4095 /* ID3D10EffectVariable methods */
4097 static BOOL STDMETHODCALLTYPE d3d10_effect_string_variable_IsValid(ID3D10EffectStringVariable *iface)
4099 TRACE("iface %p\n", iface);
4101 return (struct d3d10_effect_variable *)iface != &null_string_variable;
4104 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_string_variable_GetType(
4105 ID3D10EffectStringVariable *iface)
4107 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
4110 static HRESULT STDMETHODCALLTYPE d3d10_effect_string_variable_GetDesc(ID3D10EffectStringVariable *iface,
4111 D3D10_EFFECT_VARIABLE_DESC *desc)
4113 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
4116 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_GetAnnotationByIndex(
4117 ID3D10EffectStringVariable *iface, UINT index)
4119 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
4122 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_GetAnnotationByName(
4123 ID3D10EffectStringVariable *iface, LPCSTR name)
4125 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
4128 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_GetMemberByIndex(
4129 ID3D10EffectStringVariable *iface, UINT index)
4131 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
4134 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_GetMemberByName(
4135 ID3D10EffectStringVariable *iface, LPCSTR name)
4137 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
4140 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_GetMemberBySemantic(
4141 ID3D10EffectStringVariable *iface, LPCSTR semantic)
4143 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
4146 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_GetElement(
4147 ID3D10EffectStringVariable *iface, UINT index)
4149 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
4152 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_string_variable_GetParentConstantBuffer(
4153 ID3D10EffectStringVariable *iface)
4155 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
4158 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsScalar(
4159 ID3D10EffectStringVariable *iface)
4161 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
4164 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsVector(
4165 ID3D10EffectStringVariable *iface)
4167 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
4170 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsMatrix(
4171 ID3D10EffectStringVariable *iface)
4173 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
4176 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsString(
4177 ID3D10EffectStringVariable *iface)
4179 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
4182 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsShaderResource(
4183 ID3D10EffectStringVariable *iface)
4185 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
4188 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsRenderTargetView(
4189 ID3D10EffectStringVariable *iface)
4191 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
4194 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsDepthStencilView(
4195 ID3D10EffectStringVariable *iface)
4197 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
4200 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_string_variable_AsConstantBuffer(
4201 ID3D10EffectStringVariable *iface)
4203 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
4206 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsShader(
4207 ID3D10EffectStringVariable *iface)
4209 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
4212 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsBlend(
4213 ID3D10EffectStringVariable *iface)
4215 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
4218 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsDepthStencil(
4219 ID3D10EffectStringVariable *iface)
4221 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
4224 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsRasterizer(
4225 ID3D10EffectStringVariable *iface)
4227 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
4230 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsSampler(
4231 ID3D10EffectStringVariable *iface)
4233 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
4236 static HRESULT STDMETHODCALLTYPE d3d10_effect_string_variable_SetRawValue(ID3D10EffectStringVariable *iface,
4237 void *data, UINT offset, UINT count)
4239 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4242 static HRESULT STDMETHODCALLTYPE d3d10_effect_string_variable_GetRawValue(ID3D10EffectStringVariable *iface,
4243 void *data, UINT offset, UINT count)
4245 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4248 /* ID3D10EffectStringVariable methods */
4250 static HRESULT STDMETHODCALLTYPE d3d10_effect_string_variable_GetString(ID3D10EffectStringVariable *iface,
4253 FIXME("iface %p, str %p stub!\n", iface, str);
4258 static HRESULT STDMETHODCALLTYPE d3d10_effect_string_variable_GetStringArray(ID3D10EffectStringVariable *iface,
4259 LPCSTR *strs, UINT offset, UINT count)
4261 FIXME("iface %p, strs %p, offset %u, count %u stub!\n", iface, strs, offset, count);
4267 static const struct ID3D10EffectStringVariableVtbl d3d10_effect_string_variable_vtbl =
4269 /* ID3D10EffectVariable methods */
4270 d3d10_effect_string_variable_IsValid,
4271 d3d10_effect_string_variable_GetType,
4272 d3d10_effect_string_variable_GetDesc,
4273 d3d10_effect_string_variable_GetAnnotationByIndex,
4274 d3d10_effect_string_variable_GetAnnotationByName,
4275 d3d10_effect_string_variable_GetMemberByIndex,
4276 d3d10_effect_string_variable_GetMemberByName,
4277 d3d10_effect_string_variable_GetMemberBySemantic,
4278 d3d10_effect_string_variable_GetElement,
4279 d3d10_effect_string_variable_GetParentConstantBuffer,
4280 d3d10_effect_string_variable_AsScalar,
4281 d3d10_effect_string_variable_AsVector,
4282 d3d10_effect_string_variable_AsMatrix,
4283 d3d10_effect_string_variable_AsString,
4284 d3d10_effect_string_variable_AsShaderResource,
4285 d3d10_effect_string_variable_AsRenderTargetView,
4286 d3d10_effect_string_variable_AsDepthStencilView,
4287 d3d10_effect_string_variable_AsConstantBuffer,
4288 d3d10_effect_string_variable_AsShader,
4289 d3d10_effect_string_variable_AsBlend,
4290 d3d10_effect_string_variable_AsDepthStencil,
4291 d3d10_effect_string_variable_AsRasterizer,
4292 d3d10_effect_string_variable_AsSampler,
4293 d3d10_effect_string_variable_SetRawValue,
4294 d3d10_effect_string_variable_GetRawValue,
4295 /* ID3D10EffectStringVariable methods */
4296 d3d10_effect_string_variable_GetString,
4297 d3d10_effect_string_variable_GetStringArray,
4300 /* ID3D10EffectVariable methods */
4302 static BOOL STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_IsValid(ID3D10EffectShaderResourceVariable *iface)
4304 TRACE("iface %p\n", iface);
4306 return (struct d3d10_effect_variable *)iface != &null_shader_resource_variable;
4309 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetType(
4310 ID3D10EffectShaderResourceVariable *iface)
4312 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
4315 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetDesc(
4316 ID3D10EffectShaderResourceVariable *iface, D3D10_EFFECT_VARIABLE_DESC *desc)
4318 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
4321 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetAnnotationByIndex(
4322 ID3D10EffectShaderResourceVariable *iface, UINT index)
4324 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
4327 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetAnnotationByName(
4328 ID3D10EffectShaderResourceVariable *iface, LPCSTR name)
4330 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
4333 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetMemberByIndex(
4334 ID3D10EffectShaderResourceVariable *iface, UINT index)
4336 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
4339 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetMemberByName(
4340 ID3D10EffectShaderResourceVariable *iface, LPCSTR name)
4342 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
4345 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetMemberBySemantic(
4346 ID3D10EffectShaderResourceVariable *iface, LPCSTR semantic)
4348 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
4351 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetElement(
4352 ID3D10EffectShaderResourceVariable *iface, UINT index)
4354 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
4357 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetParentConstantBuffer(
4358 ID3D10EffectShaderResourceVariable *iface)
4360 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
4363 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsScalar(
4364 ID3D10EffectShaderResourceVariable *iface)
4366 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
4369 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsVector(
4370 ID3D10EffectShaderResourceVariable *iface)
4372 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
4375 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsMatrix(
4376 ID3D10EffectShaderResourceVariable *iface)
4378 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
4381 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsString(
4382 ID3D10EffectShaderResourceVariable *iface)
4384 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
4387 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsShaderResource(
4388 ID3D10EffectShaderResourceVariable *iface)
4390 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
4393 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsRenderTargetView(
4394 ID3D10EffectShaderResourceVariable *iface)
4396 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
4399 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsDepthStencilView(
4400 ID3D10EffectShaderResourceVariable *iface)
4402 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
4405 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsConstantBuffer(
4406 ID3D10EffectShaderResourceVariable *iface)
4408 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
4411 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsShader(
4412 ID3D10EffectShaderResourceVariable *iface)
4414 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
4417 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsBlend(
4418 ID3D10EffectShaderResourceVariable *iface)
4420 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
4423 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsDepthStencil(
4424 ID3D10EffectShaderResourceVariable *iface)
4426 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
4429 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsRasterizer(
4430 ID3D10EffectShaderResourceVariable *iface)
4432 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
4435 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsSampler(
4436 ID3D10EffectShaderResourceVariable *iface)
4438 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
4441 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_SetRawValue(
4442 ID3D10EffectShaderResourceVariable *iface, void *data, UINT offset, UINT count)
4444 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4447 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetRawValue(
4448 ID3D10EffectShaderResourceVariable *iface, void *data, UINT offset, UINT count)
4450 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4453 /* ID3D10EffectShaderResourceVariable methods */
4455 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_SetResource(
4456 ID3D10EffectShaderResourceVariable *iface, ID3D10ShaderResourceView *resource)
4458 FIXME("iface %p, resource %p stub!\n", iface, resource);
4463 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetResource(
4464 ID3D10EffectShaderResourceVariable *iface, ID3D10ShaderResourceView **resource)
4466 FIXME("iface %p, resource %p stub!\n", iface, resource);
4471 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_SetResourceArray(
4472 ID3D10EffectShaderResourceVariable *iface, ID3D10ShaderResourceView **resources, UINT offset, UINT count)
4474 FIXME("iface %p, resources %p, offset %u, count %u stub!\n", iface, resources, offset, count);
4479 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetResourceArray(
4480 ID3D10EffectShaderResourceVariable *iface, ID3D10ShaderResourceView **resources, UINT offset, UINT count)
4482 FIXME("iface %p, resources %p, offset %u, count %u stub!\n", iface, resources, offset, count);
4488 static const struct ID3D10EffectShaderResourceVariableVtbl d3d10_effect_shader_resource_variable_vtbl =
4490 /* ID3D10EffectVariable methods */
4491 d3d10_effect_shader_resource_variable_IsValid,
4492 d3d10_effect_shader_resource_variable_GetType,
4493 d3d10_effect_shader_resource_variable_GetDesc,
4494 d3d10_effect_shader_resource_variable_GetAnnotationByIndex,
4495 d3d10_effect_shader_resource_variable_GetAnnotationByName,
4496 d3d10_effect_shader_resource_variable_GetMemberByIndex,
4497 d3d10_effect_shader_resource_variable_GetMemberByName,
4498 d3d10_effect_shader_resource_variable_GetMemberBySemantic,
4499 d3d10_effect_shader_resource_variable_GetElement,
4500 d3d10_effect_shader_resource_variable_GetParentConstantBuffer,
4501 d3d10_effect_shader_resource_variable_AsScalar,
4502 d3d10_effect_shader_resource_variable_AsVector,
4503 d3d10_effect_shader_resource_variable_AsMatrix,
4504 d3d10_effect_shader_resource_variable_AsString,
4505 d3d10_effect_shader_resource_variable_AsShaderResource,
4506 d3d10_effect_shader_resource_variable_AsRenderTargetView,
4507 d3d10_effect_shader_resource_variable_AsDepthStencilView,
4508 d3d10_effect_shader_resource_variable_AsConstantBuffer,
4509 d3d10_effect_shader_resource_variable_AsShader,
4510 d3d10_effect_shader_resource_variable_AsBlend,
4511 d3d10_effect_shader_resource_variable_AsDepthStencil,
4512 d3d10_effect_shader_resource_variable_AsRasterizer,
4513 d3d10_effect_shader_resource_variable_AsSampler,
4514 d3d10_effect_shader_resource_variable_SetRawValue,
4515 d3d10_effect_shader_resource_variable_GetRawValue,
4516 /* ID3D10EffectShaderResourceVariable methods */
4517 d3d10_effect_shader_resource_variable_SetResource,
4518 d3d10_effect_shader_resource_variable_GetResource,
4519 d3d10_effect_shader_resource_variable_SetResourceArray,
4520 d3d10_effect_shader_resource_variable_GetResourceArray,
4523 /* ID3D10EffectVariable methods */
4525 static BOOL STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_IsValid(
4526 ID3D10EffectRenderTargetViewVariable *iface)
4528 TRACE("iface %p\n", iface);
4530 return (struct d3d10_effect_variable *)iface != &null_render_target_view_variable;
4533 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetType(
4534 ID3D10EffectRenderTargetViewVariable *iface)
4536 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
4539 static HRESULT STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetDesc(
4540 ID3D10EffectRenderTargetViewVariable *iface, D3D10_EFFECT_VARIABLE_DESC *desc)
4542 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
4545 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetAnnotationByIndex(
4546 ID3D10EffectRenderTargetViewVariable *iface, UINT index)
4548 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
4551 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetAnnotationByName(
4552 ID3D10EffectRenderTargetViewVariable *iface, LPCSTR name)
4554 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
4557 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetMemberByIndex(
4558 ID3D10EffectRenderTargetViewVariable *iface, UINT index)
4560 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
4563 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetMemberByName(
4564 ID3D10EffectRenderTargetViewVariable *iface, LPCSTR name)
4566 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
4569 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetMemberBySemantic(
4570 ID3D10EffectRenderTargetViewVariable *iface, LPCSTR semantic)
4572 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
4575 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetElement(
4576 ID3D10EffectRenderTargetViewVariable *iface, UINT index)
4578 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
4581 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetParentConstantBuffer(
4582 ID3D10EffectRenderTargetViewVariable *iface)
4584 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
4587 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsScalar(
4588 ID3D10EffectRenderTargetViewVariable *iface)
4590 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
4593 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsVector(
4594 ID3D10EffectRenderTargetViewVariable *iface)
4596 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
4599 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsMatrix(
4600 ID3D10EffectRenderTargetViewVariable *iface)
4602 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
4605 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsString(
4606 ID3D10EffectRenderTargetViewVariable *iface)
4608 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
4611 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsShaderResource(
4612 ID3D10EffectRenderTargetViewVariable *iface)
4614 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
4617 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsRenderTargetView(
4618 ID3D10EffectRenderTargetViewVariable *iface)
4620 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
4623 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsDepthStencilView(
4624 ID3D10EffectRenderTargetViewVariable *iface)
4626 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
4629 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsConstantBuffer(
4630 ID3D10EffectRenderTargetViewVariable *iface)
4632 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
4635 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsShader(
4636 ID3D10EffectRenderTargetViewVariable *iface)
4638 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
4641 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsBlend(
4642 ID3D10EffectRenderTargetViewVariable *iface)
4644 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
4647 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsDepthStencil(
4648 ID3D10EffectRenderTargetViewVariable *iface)
4650 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
4653 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsRasterizer(
4654 ID3D10EffectRenderTargetViewVariable *iface)
4656 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
4659 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsSampler(
4660 ID3D10EffectRenderTargetViewVariable *iface)
4662 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
4665 static HRESULT STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_SetRawValue(
4666 ID3D10EffectRenderTargetViewVariable *iface, void *data, UINT offset, UINT count)
4668 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4671 static HRESULT STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetRawValue(
4672 ID3D10EffectRenderTargetViewVariable *iface, void *data, UINT offset, UINT count)
4674 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4677 /* ID3D10EffectRenderTargetViewVariable methods */
4679 static HRESULT STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_SetRenderTarget(
4680 ID3D10EffectRenderTargetViewVariable *iface, ID3D10RenderTargetView *view)
4682 FIXME("iface %p, view %p stub!\n", iface, view);
4687 static HRESULT STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetRenderTarget(
4688 ID3D10EffectRenderTargetViewVariable *iface, ID3D10RenderTargetView **view)
4690 FIXME("iface %p, view %p stub!\n", iface, view);
4695 static HRESULT STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_SetRenderTargetArray(
4696 ID3D10EffectRenderTargetViewVariable *iface, ID3D10RenderTargetView **views, UINT offset, UINT count)
4698 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface, views, offset, count);
4703 static HRESULT STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetRenderTargetArray(
4704 ID3D10EffectRenderTargetViewVariable *iface, ID3D10RenderTargetView **views, UINT offset, UINT count)
4706 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface, views, offset, count);
4712 static const struct ID3D10EffectRenderTargetViewVariableVtbl d3d10_effect_render_target_view_variable_vtbl =
4714 /* ID3D10EffectVariable methods */
4715 d3d10_effect_render_target_view_variable_IsValid,
4716 d3d10_effect_render_target_view_variable_GetType,
4717 d3d10_effect_render_target_view_variable_GetDesc,
4718 d3d10_effect_render_target_view_variable_GetAnnotationByIndex,
4719 d3d10_effect_render_target_view_variable_GetAnnotationByName,
4720 d3d10_effect_render_target_view_variable_GetMemberByIndex,
4721 d3d10_effect_render_target_view_variable_GetMemberByName,
4722 d3d10_effect_render_target_view_variable_GetMemberBySemantic,
4723 d3d10_effect_render_target_view_variable_GetElement,
4724 d3d10_effect_render_target_view_variable_GetParentConstantBuffer,
4725 d3d10_effect_render_target_view_variable_AsScalar,
4726 d3d10_effect_render_target_view_variable_AsVector,
4727 d3d10_effect_render_target_view_variable_AsMatrix,
4728 d3d10_effect_render_target_view_variable_AsString,
4729 d3d10_effect_render_target_view_variable_AsShaderResource,
4730 d3d10_effect_render_target_view_variable_AsRenderTargetView,
4731 d3d10_effect_render_target_view_variable_AsDepthStencilView,
4732 d3d10_effect_render_target_view_variable_AsConstantBuffer,
4733 d3d10_effect_render_target_view_variable_AsShader,
4734 d3d10_effect_render_target_view_variable_AsBlend,
4735 d3d10_effect_render_target_view_variable_AsDepthStencil,
4736 d3d10_effect_render_target_view_variable_AsRasterizer,
4737 d3d10_effect_render_target_view_variable_AsSampler,
4738 d3d10_effect_render_target_view_variable_SetRawValue,
4739 d3d10_effect_render_target_view_variable_GetRawValue,
4740 /* ID3D10EffectRenderTargetViewVariable methods */
4741 d3d10_effect_render_target_view_variable_SetRenderTarget,
4742 d3d10_effect_render_target_view_variable_GetRenderTarget,
4743 d3d10_effect_render_target_view_variable_SetRenderTargetArray,
4744 d3d10_effect_render_target_view_variable_GetRenderTargetArray,
4747 /* ID3D10EffectVariable methods */
4749 static BOOL STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_IsValid(
4750 ID3D10EffectDepthStencilViewVariable *iface)
4752 TRACE("iface %p\n", iface);
4754 return (struct d3d10_effect_variable *)iface != &null_depth_stencil_view_variable;
4757 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetType(
4758 ID3D10EffectDepthStencilViewVariable *iface)
4760 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
4763 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetDesc(
4764 ID3D10EffectDepthStencilViewVariable *iface, D3D10_EFFECT_VARIABLE_DESC *desc)
4766 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
4769 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetAnnotationByIndex(
4770 ID3D10EffectDepthStencilViewVariable *iface, UINT index)
4772 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
4775 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetAnnotationByName(
4776 ID3D10EffectDepthStencilViewVariable *iface, LPCSTR name)
4778 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
4781 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetMemberByIndex(
4782 ID3D10EffectDepthStencilViewVariable *iface, UINT index)
4784 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
4787 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetMemberByName(
4788 ID3D10EffectDepthStencilViewVariable *iface, LPCSTR name)
4790 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
4793 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetMemberBySemantic(
4794 ID3D10EffectDepthStencilViewVariable *iface, LPCSTR semantic)
4796 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
4799 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetElement(
4800 ID3D10EffectDepthStencilViewVariable *iface, UINT index)
4802 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
4805 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetParentConstantBuffer(
4806 ID3D10EffectDepthStencilViewVariable *iface)
4808 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
4811 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsScalar(
4812 ID3D10EffectDepthStencilViewVariable *iface)
4814 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
4817 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsVector(
4818 ID3D10EffectDepthStencilViewVariable *iface)
4820 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
4823 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsMatrix(
4824 ID3D10EffectDepthStencilViewVariable *iface)
4826 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
4829 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsString(
4830 ID3D10EffectDepthStencilViewVariable *iface)
4832 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
4835 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsShaderResource(
4836 ID3D10EffectDepthStencilViewVariable *iface)
4838 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
4841 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsRenderTargetView(
4842 ID3D10EffectDepthStencilViewVariable *iface)
4844 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
4847 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsDepthStencilView(
4848 ID3D10EffectDepthStencilViewVariable *iface)
4850 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
4853 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsConstantBuffer(
4854 ID3D10EffectDepthStencilViewVariable *iface)
4856 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
4859 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsShader(
4860 ID3D10EffectDepthStencilViewVariable *iface)
4862 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
4865 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsBlend(
4866 ID3D10EffectDepthStencilViewVariable *iface)
4868 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
4871 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsDepthStencil(
4872 ID3D10EffectDepthStencilViewVariable *iface)
4874 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
4877 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsRasterizer(
4878 ID3D10EffectDepthStencilViewVariable *iface)
4880 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
4883 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsSampler(
4884 ID3D10EffectDepthStencilViewVariable *iface)
4886 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
4889 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_SetRawValue(
4890 ID3D10EffectDepthStencilViewVariable *iface, void *data, UINT offset, UINT count)
4892 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4895 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetRawValue(
4896 ID3D10EffectDepthStencilViewVariable *iface, void *data, UINT offset, UINT count)
4898 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4901 /* ID3D10EffectDepthStencilViewVariable methods */
4903 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_SetDepthStencil(
4904 ID3D10EffectDepthStencilViewVariable *iface, ID3D10DepthStencilView *view)
4906 FIXME("iface %p, view %p stub!\n", iface, view);
4911 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetDepthStencil(
4912 ID3D10EffectDepthStencilViewVariable *iface, ID3D10DepthStencilView **view)
4914 FIXME("iface %p, view %p stub!\n", iface, view);
4919 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_SetDepthStencilArray(
4920 ID3D10EffectDepthStencilViewVariable *iface, ID3D10DepthStencilView **views, UINT offset, UINT count)
4922 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface, views, offset, count);
4927 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetDepthStencilArray(
4928 ID3D10EffectDepthStencilViewVariable *iface, ID3D10DepthStencilView **views, UINT offset, UINT count)
4930 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface, views, offset, count);
4936 static const struct ID3D10EffectDepthStencilViewVariableVtbl d3d10_effect_depth_stencil_view_variable_vtbl =
4938 /* ID3D10EffectVariable methods */
4939 d3d10_effect_depth_stencil_view_variable_IsValid,
4940 d3d10_effect_depth_stencil_view_variable_GetType,
4941 d3d10_effect_depth_stencil_view_variable_GetDesc,
4942 d3d10_effect_depth_stencil_view_variable_GetAnnotationByIndex,
4943 d3d10_effect_depth_stencil_view_variable_GetAnnotationByName,
4944 d3d10_effect_depth_stencil_view_variable_GetMemberByIndex,
4945 d3d10_effect_depth_stencil_view_variable_GetMemberByName,
4946 d3d10_effect_depth_stencil_view_variable_GetMemberBySemantic,
4947 d3d10_effect_depth_stencil_view_variable_GetElement,
4948 d3d10_effect_depth_stencil_view_variable_GetParentConstantBuffer,
4949 d3d10_effect_depth_stencil_view_variable_AsScalar,
4950 d3d10_effect_depth_stencil_view_variable_AsVector,
4951 d3d10_effect_depth_stencil_view_variable_AsMatrix,
4952 d3d10_effect_depth_stencil_view_variable_AsString,
4953 d3d10_effect_depth_stencil_view_variable_AsShaderResource,
4954 d3d10_effect_depth_stencil_view_variable_AsRenderTargetView,
4955 d3d10_effect_depth_stencil_view_variable_AsDepthStencilView,
4956 d3d10_effect_depth_stencil_view_variable_AsConstantBuffer,
4957 d3d10_effect_depth_stencil_view_variable_AsShader,
4958 d3d10_effect_depth_stencil_view_variable_AsBlend,
4959 d3d10_effect_depth_stencil_view_variable_AsDepthStencil,
4960 d3d10_effect_depth_stencil_view_variable_AsRasterizer,
4961 d3d10_effect_depth_stencil_view_variable_AsSampler,
4962 d3d10_effect_depth_stencil_view_variable_SetRawValue,
4963 d3d10_effect_depth_stencil_view_variable_GetRawValue,
4964 /* ID3D10EffectDepthStencilViewVariable methods */
4965 d3d10_effect_depth_stencil_view_variable_SetDepthStencil,
4966 d3d10_effect_depth_stencil_view_variable_GetDepthStencil,
4967 d3d10_effect_depth_stencil_view_variable_SetDepthStencilArray,
4968 d3d10_effect_depth_stencil_view_variable_GetDepthStencilArray,
4971 /* ID3D10EffectVariable methods */
4973 static BOOL STDMETHODCALLTYPE d3d10_effect_shader_variable_IsValid(ID3D10EffectShaderVariable *iface)
4975 TRACE("iface %p\n", iface);
4977 return (struct d3d10_effect_variable *)iface != &null_shader_variable;
4980 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetType(
4981 ID3D10EffectShaderVariable *iface)
4983 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
4986 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetDesc(ID3D10EffectShaderVariable *iface,
4987 D3D10_EFFECT_VARIABLE_DESC *desc)
4989 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
4992 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetAnnotationByIndex(
4993 ID3D10EffectShaderVariable *iface, UINT index)
4995 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
4998 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetAnnotationByName(
4999 ID3D10EffectShaderVariable *iface, LPCSTR name)
5001 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
5004 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetMemberByIndex(
5005 ID3D10EffectShaderVariable *iface, UINT index)
5007 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
5010 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetMemberByName(
5011 ID3D10EffectShaderVariable *iface, LPCSTR name)
5013 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
5016 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetMemberBySemantic(
5017 ID3D10EffectShaderVariable *iface, LPCSTR semantic)
5019 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
5022 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetElement(
5023 ID3D10EffectShaderVariable *iface, UINT index)
5025 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
5028 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetParentConstantBuffer(
5029 ID3D10EffectShaderVariable *iface)
5031 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
5034 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsScalar(
5035 ID3D10EffectShaderVariable *iface)
5037 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
5040 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsVector(
5041 ID3D10EffectShaderVariable *iface)
5043 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
5046 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsMatrix(
5047 ID3D10EffectShaderVariable *iface)
5049 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
5052 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsString(
5053 ID3D10EffectShaderVariable *iface)
5055 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
5058 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsShaderResource(
5059 ID3D10EffectShaderVariable *iface)
5061 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
5064 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsRenderTargetView(
5065 ID3D10EffectShaderVariable *iface)
5067 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
5070 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsDepthStencilView(
5071 ID3D10EffectShaderVariable *iface)
5073 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
5076 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsConstantBuffer(
5077 ID3D10EffectShaderVariable *iface)
5079 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
5082 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsShader(
5083 ID3D10EffectShaderVariable *iface)
5085 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
5088 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsBlend(
5089 ID3D10EffectShaderVariable *iface)
5091 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
5094 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsDepthStencil(
5095 ID3D10EffectShaderVariable *iface)
5097 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
5100 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsRasterizer(
5101 ID3D10EffectShaderVariable *iface)
5103 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
5106 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsSampler(
5107 ID3D10EffectShaderVariable *iface)
5109 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
5112 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_SetRawValue(
5113 ID3D10EffectShaderVariable *iface, void *data, UINT offset, UINT count)
5115 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5118 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetRawValue(
5119 ID3D10EffectShaderVariable *iface, void *data, UINT offset, UINT count)
5121 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5124 /* ID3D10EffectShaderVariable methods */
5126 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetShaderDesc(
5127 ID3D10EffectShaderVariable *iface, UINT index, D3D10_EFFECT_SHADER_DESC *desc)
5129 FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc);
5134 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetVertexShader(
5135 ID3D10EffectShaderVariable *iface, UINT index, ID3D10VertexShader **shader)
5137 FIXME("iface %p, index %u, shader %p stub!\n", iface, index, shader);
5142 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetGeometryShader(
5143 ID3D10EffectShaderVariable *iface, UINT index, ID3D10GeometryShader **shader)
5145 FIXME("iface %p, index %u, shader %p stub!\n", iface, index, shader);
5150 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetPixelShader(
5151 ID3D10EffectShaderVariable *iface, UINT index, ID3D10PixelShader **shader)
5153 FIXME("iface %p, index %u, shader %p stub!\n", iface, index, shader);
5158 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetInputSignatureElementDesc(
5159 ID3D10EffectShaderVariable *iface, UINT shader_index, UINT element_index,
5160 D3D10_SIGNATURE_PARAMETER_DESC *desc)
5162 FIXME("iface %p, shader_index %u, element_index %u, desc %p stub!\n",
5163 iface, shader_index, element_index, desc);
5168 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetOutputSignatureElementDesc(
5169 ID3D10EffectShaderVariable *iface, UINT shader_index, UINT element_index,
5170 D3D10_SIGNATURE_PARAMETER_DESC *desc)
5172 FIXME("iface %p, shader_index %u, element_index %u, desc %p stub!\n",
5173 iface, shader_index, element_index, desc);
5179 static const struct ID3D10EffectShaderVariableVtbl d3d10_effect_shader_variable_vtbl =
5181 /* ID3D10EffectVariable methods */
5182 d3d10_effect_shader_variable_IsValid,
5183 d3d10_effect_shader_variable_GetType,
5184 d3d10_effect_shader_variable_GetDesc,
5185 d3d10_effect_shader_variable_GetAnnotationByIndex,
5186 d3d10_effect_shader_variable_GetAnnotationByName,
5187 d3d10_effect_shader_variable_GetMemberByIndex,
5188 d3d10_effect_shader_variable_GetMemberByName,
5189 d3d10_effect_shader_variable_GetMemberBySemantic,
5190 d3d10_effect_shader_variable_GetElement,
5191 d3d10_effect_shader_variable_GetParentConstantBuffer,
5192 d3d10_effect_shader_variable_AsScalar,
5193 d3d10_effect_shader_variable_AsVector,
5194 d3d10_effect_shader_variable_AsMatrix,
5195 d3d10_effect_shader_variable_AsString,
5196 d3d10_effect_shader_variable_AsShaderResource,
5197 d3d10_effect_shader_variable_AsRenderTargetView,
5198 d3d10_effect_shader_variable_AsDepthStencilView,
5199 d3d10_effect_shader_variable_AsConstantBuffer,
5200 d3d10_effect_shader_variable_AsShader,
5201 d3d10_effect_shader_variable_AsBlend,
5202 d3d10_effect_shader_variable_AsDepthStencil,
5203 d3d10_effect_shader_variable_AsRasterizer,
5204 d3d10_effect_shader_variable_AsSampler,
5205 d3d10_effect_shader_variable_SetRawValue,
5206 d3d10_effect_shader_variable_GetRawValue,
5207 /* ID3D10EffectShaderVariable methods */
5208 d3d10_effect_shader_variable_GetShaderDesc,
5209 d3d10_effect_shader_variable_GetVertexShader,
5210 d3d10_effect_shader_variable_GetGeometryShader,
5211 d3d10_effect_shader_variable_GetPixelShader,
5212 d3d10_effect_shader_variable_GetInputSignatureElementDesc,
5213 d3d10_effect_shader_variable_GetOutputSignatureElementDesc,
5216 /* ID3D10EffectVariable methods */
5218 static BOOL STDMETHODCALLTYPE d3d10_effect_blend_variable_IsValid(ID3D10EffectBlendVariable *iface)
5220 TRACE("iface %p\n", iface);
5222 return (struct d3d10_effect_variable *)iface != &null_blend_variable;
5225 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetType(
5226 ID3D10EffectBlendVariable *iface)
5228 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
5231 static HRESULT STDMETHODCALLTYPE d3d10_effect_blend_variable_GetDesc(ID3D10EffectBlendVariable *iface,
5232 D3D10_EFFECT_VARIABLE_DESC *desc)
5234 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
5237 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetAnnotationByIndex(
5238 ID3D10EffectBlendVariable *iface, UINT index)
5240 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
5243 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetAnnotationByName(
5244 ID3D10EffectBlendVariable *iface, LPCSTR name)
5246 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
5249 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetMemberByIndex(
5250 ID3D10EffectBlendVariable *iface, UINT index)
5252 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
5255 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetMemberByName(
5256 ID3D10EffectBlendVariable *iface, LPCSTR name)
5258 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
5261 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetMemberBySemantic(
5262 ID3D10EffectBlendVariable *iface, LPCSTR semantic)
5264 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
5267 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetElement(
5268 ID3D10EffectBlendVariable *iface, UINT index)
5270 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
5273 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetParentConstantBuffer(
5274 ID3D10EffectBlendVariable *iface)
5276 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
5279 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsScalar(
5280 ID3D10EffectBlendVariable *iface)
5282 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
5285 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsVector(
5286 ID3D10EffectBlendVariable *iface)
5288 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
5291 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsMatrix(
5292 ID3D10EffectBlendVariable *iface)
5294 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
5297 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsString(
5298 ID3D10EffectBlendVariable *iface)
5300 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
5303 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsShaderResource(
5304 ID3D10EffectBlendVariable *iface)
5306 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
5309 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsRenderTargetView(
5310 ID3D10EffectBlendVariable *iface)
5312 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
5315 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsDepthStencilView(
5316 ID3D10EffectBlendVariable *iface)
5318 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
5321 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsConstantBuffer(
5322 ID3D10EffectBlendVariable *iface)
5324 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
5327 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsShader(
5328 ID3D10EffectBlendVariable *iface)
5330 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
5333 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsBlend(
5334 ID3D10EffectBlendVariable *iface)
5336 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
5339 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsDepthStencil(
5340 ID3D10EffectBlendVariable *iface)
5342 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
5345 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsRasterizer(
5346 ID3D10EffectBlendVariable *iface)
5348 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
5351 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsSampler(
5352 ID3D10EffectBlendVariable *iface)
5354 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
5357 static HRESULT STDMETHODCALLTYPE d3d10_effect_blend_variable_SetRawValue(ID3D10EffectBlendVariable *iface,
5358 void *data, UINT offset, UINT count)
5360 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5363 static HRESULT STDMETHODCALLTYPE d3d10_effect_blend_variable_GetRawValue(ID3D10EffectBlendVariable *iface,
5364 void *data, UINT offset, UINT count)
5366 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5369 /* ID3D10EffectBlendVariable methods */
5371 static HRESULT STDMETHODCALLTYPE d3d10_effect_blend_variable_GetBlendState(ID3D10EffectBlendVariable *iface,
5372 UINT index, ID3D10BlendState **blend_state)
5374 FIXME("iface %p, index %u, blend_state %p stub!\n", iface, index, blend_state);
5379 static HRESULT STDMETHODCALLTYPE d3d10_effect_blend_variable_GetBackingStore(ID3D10EffectBlendVariable *iface,
5380 UINT index, D3D10_BLEND_DESC *desc)
5382 FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc);
5388 static const struct ID3D10EffectBlendVariableVtbl d3d10_effect_blend_variable_vtbl =
5390 /* ID3D10EffectVariable methods */
5391 d3d10_effect_blend_variable_IsValid,
5392 d3d10_effect_blend_variable_GetType,
5393 d3d10_effect_blend_variable_GetDesc,
5394 d3d10_effect_blend_variable_GetAnnotationByIndex,
5395 d3d10_effect_blend_variable_GetAnnotationByName,
5396 d3d10_effect_blend_variable_GetMemberByIndex,
5397 d3d10_effect_blend_variable_GetMemberByName,
5398 d3d10_effect_blend_variable_GetMemberBySemantic,
5399 d3d10_effect_blend_variable_GetElement,
5400 d3d10_effect_blend_variable_GetParentConstantBuffer,
5401 d3d10_effect_blend_variable_AsScalar,
5402 d3d10_effect_blend_variable_AsVector,
5403 d3d10_effect_blend_variable_AsMatrix,
5404 d3d10_effect_blend_variable_AsString,
5405 d3d10_effect_blend_variable_AsShaderResource,
5406 d3d10_effect_blend_variable_AsRenderTargetView,
5407 d3d10_effect_blend_variable_AsDepthStencilView,
5408 d3d10_effect_blend_variable_AsConstantBuffer,
5409 d3d10_effect_blend_variable_AsShader,
5410 d3d10_effect_blend_variable_AsBlend,
5411 d3d10_effect_blend_variable_AsDepthStencil,
5412 d3d10_effect_blend_variable_AsRasterizer,
5413 d3d10_effect_blend_variable_AsSampler,
5414 d3d10_effect_blend_variable_SetRawValue,
5415 d3d10_effect_blend_variable_GetRawValue,
5416 /* ID3D10EffectBlendVariable methods */
5417 d3d10_effect_blend_variable_GetBlendState,
5418 d3d10_effect_blend_variable_GetBackingStore,
5421 /* ID3D10EffectVariable methods */
5423 static BOOL STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_IsValid(ID3D10EffectDepthStencilVariable *iface)
5425 TRACE("iface %p\n", iface);
5427 return (struct d3d10_effect_variable *)iface != &null_depth_stencil_variable;
5430 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetType(
5431 ID3D10EffectDepthStencilVariable *iface)
5433 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
5436 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetDesc(ID3D10EffectDepthStencilVariable *iface,
5437 D3D10_EFFECT_VARIABLE_DESC *desc)
5439 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
5442 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetAnnotationByIndex(
5443 ID3D10EffectDepthStencilVariable *iface, UINT index)
5445 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
5448 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetAnnotationByName(
5449 ID3D10EffectDepthStencilVariable *iface, LPCSTR name)
5451 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
5454 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetMemberByIndex(
5455 ID3D10EffectDepthStencilVariable *iface, UINT index)
5457 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
5460 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetMemberByName(
5461 ID3D10EffectDepthStencilVariable *iface, LPCSTR name)
5463 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
5466 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetMemberBySemantic(
5467 ID3D10EffectDepthStencilVariable *iface, LPCSTR semantic)
5469 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
5472 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetElement(
5473 ID3D10EffectDepthStencilVariable *iface, UINT index)
5475 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
5478 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetParentConstantBuffer(
5479 ID3D10EffectDepthStencilVariable *iface)
5481 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
5484 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsScalar(
5485 ID3D10EffectDepthStencilVariable *iface)
5487 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
5490 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsVector(
5491 ID3D10EffectDepthStencilVariable *iface)
5493 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
5496 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsMatrix(
5497 ID3D10EffectDepthStencilVariable *iface)
5499 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
5502 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsString(
5503 ID3D10EffectDepthStencilVariable *iface)
5505 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
5508 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsShaderResource(
5509 ID3D10EffectDepthStencilVariable *iface)
5511 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
5514 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsRenderTargetView(
5515 ID3D10EffectDepthStencilVariable *iface)
5517 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
5520 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsDepthStencilView(
5521 ID3D10EffectDepthStencilVariable *iface)
5523 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
5526 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsConstantBuffer(
5527 ID3D10EffectDepthStencilVariable *iface)
5529 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
5532 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsShader(
5533 ID3D10EffectDepthStencilVariable *iface)
5535 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
5538 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsBlend(
5539 ID3D10EffectDepthStencilVariable *iface)
5541 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
5544 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsDepthStencil(
5545 ID3D10EffectDepthStencilVariable *iface)
5547 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
5550 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsRasterizer(
5551 ID3D10EffectDepthStencilVariable *iface)
5553 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
5556 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsSampler(
5557 ID3D10EffectDepthStencilVariable *iface)
5559 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
5562 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_SetRawValue(ID3D10EffectDepthStencilVariable *iface,
5563 void *data, UINT offset, UINT count)
5565 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5568 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetRawValue(ID3D10EffectDepthStencilVariable *iface,
5569 void *data, UINT offset, UINT count)
5571 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5574 /* ID3D10EffectDepthStencilVariable methods */
5576 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetDepthStencilState(ID3D10EffectDepthStencilVariable *iface,
5577 UINT index, ID3D10DepthStencilState **depth_stencil_state)
5579 FIXME("iface %p, index %u, depth_stencil_state %p stub!\n", iface, index, depth_stencil_state);
5584 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetBackingStore(ID3D10EffectDepthStencilVariable *iface,
5585 UINT index, D3D10_DEPTH_STENCIL_DESC *desc)
5587 FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc);
5593 static const struct ID3D10EffectDepthStencilVariableVtbl d3d10_effect_depth_stencil_variable_vtbl =
5595 /* ID3D10EffectVariable methods */
5596 d3d10_effect_depth_stencil_variable_IsValid,
5597 d3d10_effect_depth_stencil_variable_GetType,
5598 d3d10_effect_depth_stencil_variable_GetDesc,
5599 d3d10_effect_depth_stencil_variable_GetAnnotationByIndex,
5600 d3d10_effect_depth_stencil_variable_GetAnnotationByName,
5601 d3d10_effect_depth_stencil_variable_GetMemberByIndex,
5602 d3d10_effect_depth_stencil_variable_GetMemberByName,
5603 d3d10_effect_depth_stencil_variable_GetMemberBySemantic,
5604 d3d10_effect_depth_stencil_variable_GetElement,
5605 d3d10_effect_depth_stencil_variable_GetParentConstantBuffer,
5606 d3d10_effect_depth_stencil_variable_AsScalar,
5607 d3d10_effect_depth_stencil_variable_AsVector,
5608 d3d10_effect_depth_stencil_variable_AsMatrix,
5609 d3d10_effect_depth_stencil_variable_AsString,
5610 d3d10_effect_depth_stencil_variable_AsShaderResource,
5611 d3d10_effect_depth_stencil_variable_AsRenderTargetView,
5612 d3d10_effect_depth_stencil_variable_AsDepthStencilView,
5613 d3d10_effect_depth_stencil_variable_AsConstantBuffer,
5614 d3d10_effect_depth_stencil_variable_AsShader,
5615 d3d10_effect_depth_stencil_variable_AsBlend,
5616 d3d10_effect_depth_stencil_variable_AsDepthStencil,
5617 d3d10_effect_depth_stencil_variable_AsRasterizer,
5618 d3d10_effect_depth_stencil_variable_AsSampler,
5619 d3d10_effect_depth_stencil_variable_SetRawValue,
5620 d3d10_effect_depth_stencil_variable_GetRawValue,
5621 /* ID3D10EffectDepthStencilVariable methods */
5622 d3d10_effect_depth_stencil_variable_GetDepthStencilState,
5623 d3d10_effect_depth_stencil_variable_GetBackingStore,
5626 /* ID3D10EffectVariable methods */
5628 static BOOL STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_IsValid(ID3D10EffectRasterizerVariable *iface)
5630 TRACE("iface %p\n", iface);
5632 return (struct d3d10_effect_variable *)iface != &null_rasterizer_variable;
5635 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetType(
5636 ID3D10EffectRasterizerVariable *iface)
5638 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
5641 static HRESULT STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetDesc(ID3D10EffectRasterizerVariable *iface,
5642 D3D10_EFFECT_VARIABLE_DESC *desc)
5644 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
5647 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetAnnotationByIndex(
5648 ID3D10EffectRasterizerVariable *iface, UINT index)
5650 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
5653 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetAnnotationByName(
5654 ID3D10EffectRasterizerVariable *iface, LPCSTR name)
5656 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
5659 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetMemberByIndex(
5660 ID3D10EffectRasterizerVariable *iface, UINT index)
5662 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
5665 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetMemberByName(
5666 ID3D10EffectRasterizerVariable *iface, LPCSTR name)
5668 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
5671 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetMemberBySemantic(
5672 ID3D10EffectRasterizerVariable *iface, LPCSTR semantic)
5674 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
5677 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetElement(
5678 ID3D10EffectRasterizerVariable *iface, UINT index)
5680 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
5683 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetParentConstantBuffer(
5684 ID3D10EffectRasterizerVariable *iface)
5686 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
5689 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsScalar(
5690 ID3D10EffectRasterizerVariable *iface)
5692 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
5695 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsVector(
5696 ID3D10EffectRasterizerVariable *iface)
5698 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
5701 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsMatrix(
5702 ID3D10EffectRasterizerVariable *iface)
5704 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
5707 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsString(
5708 ID3D10EffectRasterizerVariable *iface)
5710 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
5713 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsShaderResource(
5714 ID3D10EffectRasterizerVariable *iface)
5716 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
5719 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsRenderTargetView(
5720 ID3D10EffectRasterizerVariable *iface)
5722 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
5725 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsDepthStencilView(
5726 ID3D10EffectRasterizerVariable *iface)
5728 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
5731 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsConstantBuffer(
5732 ID3D10EffectRasterizerVariable *iface)
5734 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
5737 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsShader(
5738 ID3D10EffectRasterizerVariable *iface)
5740 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
5743 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsBlend(
5744 ID3D10EffectRasterizerVariable *iface)
5746 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
5749 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsDepthStencil(
5750 ID3D10EffectRasterizerVariable *iface)
5752 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
5755 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsRasterizer(
5756 ID3D10EffectRasterizerVariable *iface)
5758 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
5761 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsSampler(
5762 ID3D10EffectRasterizerVariable *iface)
5764 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
5767 static HRESULT STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_SetRawValue(ID3D10EffectRasterizerVariable *iface,
5768 void *data, UINT offset, UINT count)
5770 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5773 static HRESULT STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetRawValue(ID3D10EffectRasterizerVariable *iface,
5774 void *data, UINT offset, UINT count)
5776 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5779 /* ID3D10EffectRasterizerVariable methods */
5781 static HRESULT STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetRasterizerState(ID3D10EffectRasterizerVariable *iface,
5782 UINT index, ID3D10RasterizerState **rasterizer_state)
5784 FIXME("iface %p, index %u, rasterizer_state %p stub!\n", iface, index, rasterizer_state);
5789 static HRESULT STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetBackingStore(ID3D10EffectRasterizerVariable *iface,
5790 UINT index, D3D10_RASTERIZER_DESC *desc)
5792 FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc);
5798 static const struct ID3D10EffectRasterizerVariableVtbl d3d10_effect_rasterizer_variable_vtbl =
5800 /* ID3D10EffectVariable methods */
5801 d3d10_effect_rasterizer_variable_IsValid,
5802 d3d10_effect_rasterizer_variable_GetType,
5803 d3d10_effect_rasterizer_variable_GetDesc,
5804 d3d10_effect_rasterizer_variable_GetAnnotationByIndex,
5805 d3d10_effect_rasterizer_variable_GetAnnotationByName,
5806 d3d10_effect_rasterizer_variable_GetMemberByIndex,
5807 d3d10_effect_rasterizer_variable_GetMemberByName,
5808 d3d10_effect_rasterizer_variable_GetMemberBySemantic,
5809 d3d10_effect_rasterizer_variable_GetElement,
5810 d3d10_effect_rasterizer_variable_GetParentConstantBuffer,
5811 d3d10_effect_rasterizer_variable_AsScalar,
5812 d3d10_effect_rasterizer_variable_AsVector,
5813 d3d10_effect_rasterizer_variable_AsMatrix,
5814 d3d10_effect_rasterizer_variable_AsString,
5815 d3d10_effect_rasterizer_variable_AsShaderResource,
5816 d3d10_effect_rasterizer_variable_AsRenderTargetView,
5817 d3d10_effect_rasterizer_variable_AsDepthStencilView,
5818 d3d10_effect_rasterizer_variable_AsConstantBuffer,
5819 d3d10_effect_rasterizer_variable_AsShader,
5820 d3d10_effect_rasterizer_variable_AsBlend,
5821 d3d10_effect_rasterizer_variable_AsDepthStencil,
5822 d3d10_effect_rasterizer_variable_AsRasterizer,
5823 d3d10_effect_rasterizer_variable_AsSampler,
5824 d3d10_effect_rasterizer_variable_SetRawValue,
5825 d3d10_effect_rasterizer_variable_GetRawValue,
5826 /* ID3D10EffectRasterizerVariable methods */
5827 d3d10_effect_rasterizer_variable_GetRasterizerState,
5828 d3d10_effect_rasterizer_variable_GetBackingStore,
5831 /* ID3D10EffectVariable methods */
5833 static BOOL STDMETHODCALLTYPE d3d10_effect_sampler_variable_IsValid(ID3D10EffectSamplerVariable *iface)
5835 TRACE("iface %p\n", iface);
5837 return (struct d3d10_effect_variable *)iface != &null_sampler_variable;
5840 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetType(
5841 ID3D10EffectSamplerVariable *iface)
5843 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
5846 static HRESULT STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetDesc(ID3D10EffectSamplerVariable *iface,
5847 D3D10_EFFECT_VARIABLE_DESC *desc)
5849 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
5852 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetAnnotationByIndex(
5853 ID3D10EffectSamplerVariable *iface, UINT index)
5855 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
5858 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetAnnotationByName(
5859 ID3D10EffectSamplerVariable *iface, LPCSTR name)
5861 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
5864 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetMemberByIndex(
5865 ID3D10EffectSamplerVariable *iface, UINT index)
5867 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
5870 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetMemberByName(
5871 ID3D10EffectSamplerVariable *iface, LPCSTR name)
5873 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
5876 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetMemberBySemantic(
5877 ID3D10EffectSamplerVariable *iface, LPCSTR semantic)
5879 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
5882 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetElement(
5883 ID3D10EffectSamplerVariable *iface, UINT index)
5885 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
5888 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetParentConstantBuffer(
5889 ID3D10EffectSamplerVariable *iface)
5891 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
5894 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsScalar(
5895 ID3D10EffectSamplerVariable *iface)
5897 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
5900 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsVector(
5901 ID3D10EffectSamplerVariable *iface)
5903 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
5906 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsMatrix(
5907 ID3D10EffectSamplerVariable *iface)
5909 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
5912 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsString(
5913 ID3D10EffectSamplerVariable *iface)
5915 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
5918 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsShaderResource(
5919 ID3D10EffectSamplerVariable *iface)
5921 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
5924 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsRenderTargetView(
5925 ID3D10EffectSamplerVariable *iface)
5927 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
5930 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsDepthStencilView(
5931 ID3D10EffectSamplerVariable *iface)
5933 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
5936 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsConstantBuffer(
5937 ID3D10EffectSamplerVariable *iface)
5939 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
5942 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsShader(
5943 ID3D10EffectSamplerVariable *iface)
5945 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
5948 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsBlend(
5949 ID3D10EffectSamplerVariable *iface)
5951 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
5954 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsDepthStencil(
5955 ID3D10EffectSamplerVariable *iface)
5957 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
5960 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsRasterizer(
5961 ID3D10EffectSamplerVariable *iface)
5963 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
5966 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsSampler(
5967 ID3D10EffectSamplerVariable *iface)
5969 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
5972 static HRESULT STDMETHODCALLTYPE d3d10_effect_sampler_variable_SetRawValue(ID3D10EffectSamplerVariable *iface,
5973 void *data, UINT offset, UINT count)
5975 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5978 static HRESULT STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetRawValue(ID3D10EffectSamplerVariable *iface,
5979 void *data, UINT offset, UINT count)
5981 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5984 /* ID3D10EffectSamplerVariable methods */
5986 static HRESULT STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetSampler(ID3D10EffectSamplerVariable *iface,
5987 UINT index, ID3D10SamplerState **sampler)
5989 FIXME("iface %p, index %u, sampler %p stub!\n", iface, index, sampler);
5994 static HRESULT STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetBackingStore(ID3D10EffectSamplerVariable *iface,
5995 UINT index, D3D10_SAMPLER_DESC *desc)
5997 FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc);
6003 static const struct ID3D10EffectSamplerVariableVtbl d3d10_effect_sampler_variable_vtbl =
6005 /* ID3D10EffectVariable methods */
6006 d3d10_effect_sampler_variable_IsValid,
6007 d3d10_effect_sampler_variable_GetType,
6008 d3d10_effect_sampler_variable_GetDesc,
6009 d3d10_effect_sampler_variable_GetAnnotationByIndex,
6010 d3d10_effect_sampler_variable_GetAnnotationByName,
6011 d3d10_effect_sampler_variable_GetMemberByIndex,
6012 d3d10_effect_sampler_variable_GetMemberByName,
6013 d3d10_effect_sampler_variable_GetMemberBySemantic,
6014 d3d10_effect_sampler_variable_GetElement,
6015 d3d10_effect_sampler_variable_GetParentConstantBuffer,
6016 d3d10_effect_sampler_variable_AsScalar,
6017 d3d10_effect_sampler_variable_AsVector,
6018 d3d10_effect_sampler_variable_AsMatrix,
6019 d3d10_effect_sampler_variable_AsString,
6020 d3d10_effect_sampler_variable_AsShaderResource,
6021 d3d10_effect_sampler_variable_AsRenderTargetView,
6022 d3d10_effect_sampler_variable_AsDepthStencilView,
6023 d3d10_effect_sampler_variable_AsConstantBuffer,
6024 d3d10_effect_sampler_variable_AsShader,
6025 d3d10_effect_sampler_variable_AsBlend,
6026 d3d10_effect_sampler_variable_AsDepthStencil,
6027 d3d10_effect_sampler_variable_AsRasterizer,
6028 d3d10_effect_sampler_variable_AsSampler,
6029 d3d10_effect_sampler_variable_SetRawValue,
6030 d3d10_effect_sampler_variable_GetRawValue,
6031 /* ID3D10EffectSamplerVariable methods */
6032 d3d10_effect_sampler_variable_GetSampler,
6033 d3d10_effect_sampler_variable_GetBackingStore,
6036 /* ID3D10EffectType methods */
6038 static BOOL STDMETHODCALLTYPE d3d10_effect_type_IsValid(ID3D10EffectType *iface)
6040 TRACE("iface %p\n", iface);
6042 return (struct d3d10_effect_type *)iface != &null_type;
6045 static HRESULT STDMETHODCALLTYPE d3d10_effect_type_GetDesc(ID3D10EffectType *iface, D3D10_EFFECT_TYPE_DESC *desc)
6047 struct d3d10_effect_type *This = (struct d3d10_effect_type *)iface;
6049 TRACE("iface %p, desc %p\n", iface, desc);
6051 if (This == &null_type)
6053 WARN("Null type specified\n");
6059 WARN("Invalid argument specified\n");
6060 return E_INVALIDARG;
6063 desc->TypeName = This->name;
6064 desc->Class = This->type_class;
6065 desc->Type = This->basetype;
6066 desc->Elements = This->element_count;
6067 desc->Members = This->member_count;
6068 desc->Rows = This->row_count;
6069 desc->Columns = This->column_count;
6070 desc->PackedSize = This->size_packed;
6071 desc->UnpackedSize = This->size_unpacked;
6072 desc->Stride = This->stride;
6077 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_type_GetMemberTypeByIndex(ID3D10EffectType *iface,
6080 struct d3d10_effect_type *This = (struct d3d10_effect_type *)iface;
6081 struct d3d10_effect_type *t;
6083 TRACE("iface %p, index %u\n", iface, index);
6085 if (index >= This->member_count)
6087 WARN("Invalid index specified\n");
6088 return (ID3D10EffectType *)&null_type;
6091 t = (&This->members[index])->type;
6093 TRACE("Returning member %p, %s\n", t, debugstr_a(t->name));
6095 return (ID3D10EffectType *)t;
6098 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_type_GetMemberTypeByName(ID3D10EffectType *iface,
6101 struct d3d10_effect_type *This = (struct d3d10_effect_type *)iface;
6104 TRACE("iface %p, name %s\n", iface, debugstr_a(name));
6108 WARN("Invalid name specified\n");
6109 return (ID3D10EffectType *)&null_type;
6112 for (i = 0; i < This->member_count; ++i)
6114 struct d3d10_effect_type_member *typem = &This->members[i];
6118 if (!strcmp(typem->name, name))
6120 TRACE("Returning type %p.\n", typem->type);
6121 return (ID3D10EffectType *)typem->type;
6126 WARN("Invalid name specified\n");
6128 return (ID3D10EffectType *)&null_type;
6131 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_type_GetMemberTypeBySemantic(ID3D10EffectType *iface,
6134 struct d3d10_effect_type *This = (struct d3d10_effect_type *)iface;
6137 TRACE("iface %p, semantic %s\n", iface, debugstr_a(semantic));
6141 WARN("Invalid semantic specified\n");
6142 return (ID3D10EffectType *)&null_type;
6145 for (i = 0; i < This->member_count; ++i)
6147 struct d3d10_effect_type_member *typem = &This->members[i];
6149 if (typem->semantic)
6151 if (!strcmp(typem->semantic, semantic))
6153 TRACE("Returning type %p.\n", typem->type);
6154 return (ID3D10EffectType *)typem->type;
6159 WARN("Invalid semantic specified\n");
6161 return (ID3D10EffectType *)&null_type;
6164 static LPCSTR STDMETHODCALLTYPE d3d10_effect_type_GetMemberName(ID3D10EffectType *iface, UINT index)
6166 struct d3d10_effect_type *This = (struct d3d10_effect_type *)iface;
6167 struct d3d10_effect_type_member *typem;
6169 TRACE("iface %p, index %u\n", iface, index);
6171 if (index >= This->member_count)
6173 WARN("Invalid index specified\n");
6177 typem = &This->members[index];
6179 TRACE("Returning name %s\n", debugstr_a(typem->name));
6184 static LPCSTR STDMETHODCALLTYPE d3d10_effect_type_GetMemberSemantic(ID3D10EffectType *iface, UINT index)
6186 struct d3d10_effect_type *This = (struct d3d10_effect_type *)iface;
6187 struct d3d10_effect_type_member *typem;
6189 TRACE("iface %p, index %u\n", iface, index);
6191 if (index >= This->member_count)
6193 WARN("Invalid index specified\n");
6197 typem = &This->members[index];
6199 TRACE("Returning semantic %s\n", debugstr_a(typem->semantic));
6201 return typem->semantic;
6204 static const struct ID3D10EffectTypeVtbl d3d10_effect_type_vtbl =
6206 /* ID3D10EffectType */
6207 d3d10_effect_type_IsValid,
6208 d3d10_effect_type_GetDesc,
6209 d3d10_effect_type_GetMemberTypeByIndex,
6210 d3d10_effect_type_GetMemberTypeByName,
6211 d3d10_effect_type_GetMemberTypeBySemantic,
6212 d3d10_effect_type_GetMemberName,
6213 d3d10_effect_type_GetMemberSemantic,