2 * Copyright 2009 Henri Verbeet for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include "wine/port.h"
23 #include "d3d10_private.h"
25 WINE_DEFAULT_DEBUG_CHANNEL(d3d10);
27 #define MAKE_TAG(ch0, ch1, ch2, ch3) \
28 ((DWORD)(ch0) | ((DWORD)(ch1) << 8) | \
29 ((DWORD)(ch2) << 16) | ((DWORD)(ch3) << 24 ))
30 #define TAG_DXBC MAKE_TAG('D', 'X', 'B', 'C')
31 #define TAG_FX10 MAKE_TAG('F', 'X', '1', '0')
32 #define TAG_ISGN MAKE_TAG('I', 'S', 'G', 'N')
34 #define D3D10_FX10_TYPE_COLUMN_SHIFT 11
35 #define D3D10_FX10_TYPE_COLUMN_MASK (0x7 << D3D10_FX10_TYPE_COLUMN_SHIFT)
37 #define D3D10_FX10_TYPE_ROW_SHIFT 8
38 #define D3D10_FX10_TYPE_ROW_MASK (0x7 << D3D10_FX10_TYPE_ROW_SHIFT)
40 #define D3D10_FX10_TYPE_BASETYPE_SHIFT 3
41 #define D3D10_FX10_TYPE_BASETYPE_MASK (0x1f << D3D10_FX10_TYPE_BASETYPE_SHIFT)
43 #define D3D10_FX10_TYPE_CLASS_SHIFT 0
44 #define D3D10_FX10_TYPE_CLASS_MASK (0x7 << D3D10_FX10_TYPE_CLASS_SHIFT)
46 #define D3D10_FX10_TYPE_MATRIX_COLUMN_MAJOR_MASK 0x4000
48 static const struct ID3D10EffectTechniqueVtbl d3d10_effect_technique_vtbl;
49 static const struct ID3D10EffectPassVtbl d3d10_effect_pass_vtbl;
50 static const struct ID3D10EffectVariableVtbl d3d10_effect_variable_vtbl;
51 static const struct ID3D10EffectConstantBufferVtbl d3d10_effect_constant_buffer_vtbl;
52 static const struct ID3D10EffectScalarVariableVtbl d3d10_effect_scalar_variable_vtbl;
53 static const struct ID3D10EffectVectorVariableVtbl d3d10_effect_vector_variable_vtbl;
54 static const struct ID3D10EffectMatrixVariableVtbl d3d10_effect_matrix_variable_vtbl;
55 static const struct ID3D10EffectStringVariableVtbl d3d10_effect_string_variable_vtbl;
56 static const struct ID3D10EffectShaderResourceVariableVtbl d3d10_effect_shader_resource_variable_vtbl;
57 static const struct ID3D10EffectRenderTargetViewVariableVtbl d3d10_effect_render_target_view_variable_vtbl;
58 static const struct ID3D10EffectDepthStencilViewVariableVtbl d3d10_effect_depth_stencil_view_variable_vtbl;
59 static const struct ID3D10EffectShaderVariableVtbl d3d10_effect_shader_variable_vtbl;
60 static const struct ID3D10EffectBlendVariableVtbl d3d10_effect_blend_variable_vtbl;
61 static const struct ID3D10EffectDepthStencilVariableVtbl d3d10_effect_depth_stencil_variable_vtbl;
62 static const struct ID3D10EffectRasterizerVariableVtbl d3d10_effect_rasterizer_variable_vtbl;
63 static const struct ID3D10EffectSamplerVariableVtbl d3d10_effect_sampler_variable_vtbl;
64 static const struct ID3D10EffectTypeVtbl d3d10_effect_type_vtbl;
66 /* null objects - needed for invalid calls */
67 static struct d3d10_effect_technique null_technique =
68 {&d3d10_effect_technique_vtbl, NULL, NULL, 0, 0, NULL, NULL};
69 static struct d3d10_effect_pass null_pass =
70 {&d3d10_effect_pass_vtbl, NULL, NULL, 0, 0, 0, NULL, NULL};
71 static struct d3d10_effect_type null_type =
72 {&d3d10_effect_type_vtbl, 0, {NULL, NULL, 0}, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL};
73 static struct d3d10_effect_variable null_local_buffer =
74 {(ID3D10EffectVariableVtbl *)&d3d10_effect_constant_buffer_vtbl, &null_local_buffer,
75 NULL, NULL, NULL, 0, 0, 0, 0, &null_type, NULL, NULL, NULL};
76 static struct d3d10_effect_variable null_variable =
77 {&d3d10_effect_variable_vtbl, &null_local_buffer,
78 NULL, NULL, NULL, 0, 0, 0, 0, &null_type, NULL, NULL, NULL};
79 static struct d3d10_effect_variable null_scalar_variable =
80 {(ID3D10EffectVariableVtbl *)&d3d10_effect_scalar_variable_vtbl, &null_local_buffer,
81 NULL, NULL, NULL, 0, 0, 0, 0, &null_type, NULL, NULL, NULL};
82 static struct d3d10_effect_variable null_vector_variable =
83 {(ID3D10EffectVariableVtbl *)&d3d10_effect_vector_variable_vtbl, &null_local_buffer,
84 NULL, NULL, NULL, 0, 0, 0, 0, &null_type, NULL, NULL, NULL};
85 static struct d3d10_effect_variable null_matrix_variable =
86 {(ID3D10EffectVariableVtbl *)&d3d10_effect_matrix_variable_vtbl, &null_local_buffer,
87 NULL, NULL, NULL, 0, 0, 0, 0, &null_type, NULL, NULL, NULL};
88 static struct d3d10_effect_variable null_string_variable =
89 {(ID3D10EffectVariableVtbl *)&d3d10_effect_string_variable_vtbl, &null_local_buffer,
90 NULL, NULL, NULL, 0, 0, 0, 0, &null_type, NULL, NULL, NULL};
91 static struct d3d10_effect_variable null_shader_resource_variable =
92 {(ID3D10EffectVariableVtbl *)&d3d10_effect_shader_resource_variable_vtbl, &null_local_buffer,
93 NULL, NULL, NULL, 0, 0, 0, 0, &null_type, NULL, NULL, NULL};
94 static struct d3d10_effect_variable null_render_target_view_variable =
95 {(ID3D10EffectVariableVtbl *)&d3d10_effect_render_target_view_variable_vtbl, &null_local_buffer,
96 NULL, NULL, NULL, 0, 0, 0, 0, &null_type, NULL, NULL, NULL};
97 static struct d3d10_effect_variable null_depth_stencil_view_variable =
98 {(ID3D10EffectVariableVtbl *)&d3d10_effect_depth_stencil_view_variable_vtbl, &null_local_buffer,
99 NULL, NULL, NULL, 0, 0, 0, 0, &null_type, NULL, NULL, NULL};
100 static struct d3d10_effect_variable null_shader_variable =
101 {(ID3D10EffectVariableVtbl *)&d3d10_effect_shader_variable_vtbl, &null_local_buffer,
102 NULL, NULL, NULL, 0, 0, 0, 0, &null_type, NULL, NULL, NULL};
103 static struct d3d10_effect_variable null_blend_variable =
104 {(ID3D10EffectVariableVtbl *)&d3d10_effect_blend_variable_vtbl, &null_local_buffer,
105 NULL, NULL, NULL, 0, 0, 0, 0, &null_type, NULL, NULL, NULL};
106 static struct d3d10_effect_variable null_depth_stencil_variable =
107 {(ID3D10EffectVariableVtbl *)&d3d10_effect_depth_stencil_variable_vtbl, &null_local_buffer,
108 NULL, NULL, NULL, 0, 0, 0, 0, &null_type, NULL, NULL, NULL};
109 static struct d3d10_effect_variable null_rasterizer_variable =
110 {(ID3D10EffectVariableVtbl *)&d3d10_effect_rasterizer_variable_vtbl, &null_local_buffer,
111 NULL, NULL, NULL, 0, 0, 0, 0, &null_type, NULL, NULL, NULL};
112 static struct d3d10_effect_variable null_sampler_variable =
113 {(ID3D10EffectVariableVtbl *)&d3d10_effect_sampler_variable_vtbl, &null_local_buffer,
114 NULL, NULL, NULL, 0, 0, 0, 0, &null_type, NULL, NULL, NULL};
116 static struct d3d10_effect_type *get_fx10_type(struct d3d10_effect *effect, const char *data, DWORD offset);
118 static inline void read_dword(const char **ptr, DWORD *d)
120 memcpy(d, *ptr, sizeof(*d));
124 static inline void skip_dword_unknown(const char **ptr, unsigned int count)
129 FIXME("Skipping %u unknown DWORDs:\n", count);
130 for (i = 0; i < count; ++i)
133 FIXME("\t0x%08x\n", d);
137 static inline void write_dword(char **ptr, DWORD d)
139 memcpy(*ptr, &d, sizeof(d));
143 static inline void write_dword_unknown(char **ptr, DWORD d)
145 FIXME("Writing unknown DWORD 0x%08x\n", d);
149 static HRESULT parse_dxbc(const char *data, SIZE_T data_size,
150 HRESULT (*chunk_handler)(const char *data, DWORD data_size, DWORD tag, void *ctx), void *ctx)
152 const char *ptr = data;
159 read_dword(&ptr, &tag);
160 TRACE("tag: %s.\n", debugstr_an((const char *)&tag, 4));
164 WARN("Wrong tag.\n");
169 skip_dword_unknown(&ptr, 4);
171 skip_dword_unknown(&ptr, 1);
173 read_dword(&ptr, &total_size);
174 TRACE("total size: %#x\n", total_size);
176 read_dword(&ptr, &chunk_count);
177 TRACE("chunk count: %#x\n", chunk_count);
179 for (i = 0; i < chunk_count; ++i)
181 DWORD chunk_tag, chunk_size;
182 const char *chunk_ptr;
185 read_dword(&ptr, &chunk_offset);
186 TRACE("chunk %u at offset %#x\n", i, chunk_offset);
188 chunk_ptr = data + chunk_offset;
190 read_dword(&chunk_ptr, &chunk_tag);
191 read_dword(&chunk_ptr, &chunk_size);
193 hr = chunk_handler(chunk_ptr, chunk_size, chunk_tag, ctx);
194 if (FAILED(hr)) break;
200 static BOOL copy_name(const char *ptr, char **name)
204 if (!ptr) return TRUE;
206 name_len = strlen(ptr) + 1;
212 *name = HeapAlloc(GetProcessHeap(), 0, name_len);
215 ERR("Failed to allocate name memory.\n");
219 memcpy(*name, ptr, name_len);
224 static HRESULT shader_chunk_handler(const char *data, DWORD data_size, DWORD tag, void *ctx)
226 struct d3d10_effect_shader_variable *s = ctx;
228 TRACE("tag: %s.\n", debugstr_an((const char *)&tag, 4));
230 TRACE("chunk size: %#x\n", data_size);
236 /* 32 (DXBC header) + 1 * 4 (chunk index) + 2 * 4 (chunk header) + data_size (chunk data) */
237 UINT size = 44 + data_size;
240 s->input_signature = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size);
241 if (!s->input_signature)
243 ERR("Failed to allocate input signature data\n");
244 return E_OUTOFMEMORY;
246 s->input_signature_size = size;
248 ptr = s->input_signature;
250 write_dword(&ptr, TAG_DXBC);
253 write_dword_unknown(&ptr, 0);
254 write_dword_unknown(&ptr, 0);
255 write_dword_unknown(&ptr, 0);
256 write_dword_unknown(&ptr, 0);
258 /* seems to be always 1 */
259 write_dword_unknown(&ptr, 1);
262 write_dword(&ptr, size);
265 write_dword(&ptr, 1);
268 write_dword(&ptr, (ptr - s->input_signature) + 4);
271 write_dword(&ptr, TAG_ISGN);
272 write_dword(&ptr, data_size);
273 memcpy(ptr, data, data_size);
278 FIXME("Unhandled chunk %s.\n", debugstr_an((const char *)&tag, 4));
285 static HRESULT parse_shader(struct d3d10_effect_object *o, const char *data)
287 ID3D10Device *device = o->pass->technique->effect->device;
288 struct d3d10_effect_shader_variable *s;
289 const char *ptr = data;
293 o->data = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct d3d10_effect_shader_variable));
296 ERR("Failed to allocate shader variable memory\n");
297 return E_OUTOFMEMORY;
300 if (!ptr) return S_OK;
304 read_dword(&ptr, &dxbc_size);
305 TRACE("dxbc size: %#x\n", dxbc_size);
309 case D3D10_EOT_VERTEXSHADER:
310 hr = ID3D10Device_CreateVertexShader(device, ptr, dxbc_size, &s->shader.vs);
311 if (FAILED(hr)) return hr;
314 case D3D10_EOT_PIXELSHADER:
315 hr = ID3D10Device_CreatePixelShader(device, ptr, dxbc_size, &s->shader.ps);
316 if (FAILED(hr)) return hr;
318 case D3D10_EOT_GEOMETRYSHADER:
319 hr = ID3D10Device_CreateGeometryShader(device, ptr, dxbc_size, &s->shader.gs);
320 if (FAILED(hr)) return hr;
324 return parse_dxbc(ptr, dxbc_size, shader_chunk_handler, s);
327 static D3D10_SHADER_VARIABLE_CLASS d3d10_variable_class(DWORD c, BOOL is_column_major)
331 case 1: return D3D10_SVC_SCALAR;
332 case 2: return D3D10_SVC_VECTOR;
333 case 3: if (is_column_major) return D3D10_SVC_MATRIX_COLUMNS;
334 else return D3D10_SVC_MATRIX_ROWS;
336 FIXME("Unknown variable class %#x.\n", c);
341 static D3D10_SHADER_VARIABLE_TYPE d3d10_variable_type(DWORD t, BOOL is_object)
347 case 1: return D3D10_SVT_STRING;
348 case 2: return D3D10_SVT_BLEND;
349 case 3: return D3D10_SVT_DEPTHSTENCIL;
350 case 4: return D3D10_SVT_RASTERIZER;
351 case 5: return D3D10_SVT_PIXELSHADER;
352 case 6: return D3D10_SVT_VERTEXSHADER;
353 case 7: return D3D10_SVT_GEOMETRYSHADER;
355 case 10: return D3D10_SVT_TEXTURE1D;
356 case 11: return D3D10_SVT_TEXTURE1DARRAY;
357 case 12: return D3D10_SVT_TEXTURE2D;
358 case 13: return D3D10_SVT_TEXTURE2DARRAY;
359 case 14: return D3D10_SVT_TEXTURE2DMS;
360 case 15: return D3D10_SVT_TEXTURE2DMSARRAY;
361 case 16: return D3D10_SVT_TEXTURE3D;
362 case 17: return D3D10_SVT_TEXTURECUBE;
364 case 19: return D3D10_SVT_RENDERTARGETVIEW;
365 case 20: return D3D10_SVT_DEPTHSTENCILVIEW;
366 case 21: return D3D10_SVT_SAMPLER;
368 FIXME("Unknown variable type %#x.\n", t);
376 case 1: return D3D10_SVT_FLOAT;
377 case 2: return D3D10_SVT_INT;
378 case 3: return D3D10_SVT_UINT;
379 case 4: return D3D10_SVT_BOOL;
381 FIXME("Unknown variable type %#x.\n", t);
387 static HRESULT parse_fx10_type(struct d3d10_effect_type *t, const char *ptr, const char *data)
394 read_dword(&ptr, &offset);
395 TRACE("Type name at offset %#x.\n", offset);
397 if (!copy_name(data + offset, &t->name))
399 ERR("Failed to copy name.\n");
400 return E_OUTOFMEMORY;
402 TRACE("Type name: %s.\n", debugstr_a(t->name));
404 read_dword(&ptr, &unknown0);
405 TRACE("Unknown 0: %u.\n", unknown0);
407 read_dword(&ptr, &t->element_count);
408 TRACE("Element count: %u.\n", t->element_count);
410 read_dword(&ptr, &t->size_unpacked);
411 TRACE("Unpacked size: %#x.\n", t->size_unpacked);
413 read_dword(&ptr, &t->stride);
414 TRACE("Stride: %#x.\n", t->stride);
416 read_dword(&ptr, &t->size_packed);
417 TRACE("Packed size %#x.\n", t->size_packed);
424 read_dword(&ptr, &typeinfo);
425 t->column_count = (typeinfo & D3D10_FX10_TYPE_COLUMN_MASK) >> D3D10_FX10_TYPE_COLUMN_SHIFT;
426 t->row_count = (typeinfo & D3D10_FX10_TYPE_ROW_MASK) >> D3D10_FX10_TYPE_ROW_SHIFT;
427 t->basetype = d3d10_variable_type((typeinfo & D3D10_FX10_TYPE_BASETYPE_MASK) >> D3D10_FX10_TYPE_BASETYPE_SHIFT, FALSE);
428 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);
430 TRACE("Type description: %#x.\n", typeinfo);
431 TRACE("\tcolumns: %u.\n", t->column_count);
432 TRACE("\trows: %u.\n", t->row_count);
433 TRACE("\tbasetype: %s.\n", debug_d3d10_shader_variable_type(t->basetype));
434 TRACE("\tclass: %s.\n", debug_d3d10_shader_variable_class(t->type_class));
435 TRACE("\tunknown bits: %#x.\n", typeinfo & ~(D3D10_FX10_TYPE_COLUMN_MASK | D3D10_FX10_TYPE_ROW_MASK
436 | D3D10_FX10_TYPE_BASETYPE_MASK | D3D10_FX10_TYPE_CLASS_MASK | D3D10_FX10_TYPE_MATRIX_COLUMN_MAJOR_MASK));
440 TRACE("Type is an object.\n");
445 t->type_class = D3D10_SVC_OBJECT;
447 read_dword(&ptr, &typeinfo);
448 t->basetype = d3d10_variable_type(typeinfo, TRUE);
450 TRACE("Type description: %#x.\n", typeinfo);
451 TRACE("\tbasetype: %s.\n", debug_d3d10_shader_variable_type(t->basetype));
452 TRACE("\tclass: %s.\n", debug_d3d10_shader_variable_class(t->type_class));
456 TRACE("Type is a structure.\n");
458 read_dword(&ptr, &t->member_count);
459 TRACE("Member count: %u.\n", t->member_count);
464 t->type_class = D3D10_SVC_STRUCT;
466 t->members = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, t->member_count * sizeof(*t->members));
469 ERR("Failed to allocate members memory.\n");
470 return E_OUTOFMEMORY;
473 for (i = 0; i < t->member_count; ++i)
475 struct d3d10_effect_type_member *typem = &t->members[i];
477 read_dword(&ptr, &offset);
478 TRACE("Member name at offset %#x.\n", offset);
480 if (!copy_name(data + offset, &typem->name))
482 ERR("Failed to copy name.\n");
483 return E_OUTOFMEMORY;
485 TRACE("Member name: %s.\n", debugstr_a(typem->name));
487 read_dword(&ptr, &offset);
488 TRACE("Member semantic at offset %#x.\n", offset);
490 if (!copy_name(data + offset, &typem->semantic))
492 ERR("Failed to copy semantic.\n");
493 return E_OUTOFMEMORY;
495 TRACE("Member semantic: %s.\n", debugstr_a(typem->semantic));
497 read_dword(&ptr, &typem->buffer_offset);
498 TRACE("Member offset in struct: %#x.\n", typem->buffer_offset);
500 read_dword(&ptr, &offset);
501 TRACE("Member type info at offset %#x.\n", offset);
503 typem->type = get_fx10_type(t->effect, data, offset);
506 ERR("Failed to get variable type.\n");
513 FIXME("Unhandled case %#x.\n", unknown0);
517 if (t->element_count)
519 TRACE("Elementtype for type at offset: %#x\n", t->id);
521 /* allocate elementtype - we need only one, because all elements have the same type */
522 t->elementtype = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*t->elementtype));
525 ERR("Failed to allocate members memory.\n");
526 return E_OUTOFMEMORY;
529 /* create a copy of the original type with some minor changes */
530 t->elementtype->vtbl = &d3d10_effect_type_vtbl;
531 t->elementtype->effect = t->effect;
533 if (!copy_name(t->name, &t->elementtype->name))
535 ERR("Failed to copy name.\n");
536 return E_OUTOFMEMORY;
538 TRACE("\tType name: %s.\n", debugstr_a(t->elementtype->name));
540 t->elementtype->element_count = 0;
541 TRACE("\tElement count: %u.\n", t->elementtype->element_count);
544 * Not sure if this calculation is 100% correct, but a test
545 * show's that these values work.
547 t->elementtype->size_unpacked = t->size_packed / t->element_count;
548 TRACE("\tUnpacked size: %#x.\n", t->elementtype->size_unpacked);
550 t->elementtype->stride = t->stride;
551 TRACE("\tStride: %#x.\n", t->elementtype->stride);
553 t->elementtype->size_packed = t->size_packed / t->element_count;
554 TRACE("\tPacked size: %#x.\n", t->elementtype->size_packed);
556 t->elementtype->member_count = t->member_count;
557 TRACE("\tMember count: %u.\n", t->elementtype->member_count);
559 t->elementtype->column_count = t->column_count;
560 TRACE("\tColumns: %u.\n", t->elementtype->column_count);
562 t->elementtype->row_count = t->row_count;
563 TRACE("\tRows: %u.\n", t->elementtype->row_count);
565 t->elementtype->basetype = t->basetype;
566 TRACE("\tBasetype: %s.\n", debug_d3d10_shader_variable_type(t->elementtype->basetype));
568 t->elementtype->type_class = t->type_class;
569 TRACE("\tClass: %s.\n", debug_d3d10_shader_variable_class(t->elementtype->type_class));
571 t->elementtype->members = t->members;
577 static struct d3d10_effect_type *get_fx10_type(struct d3d10_effect *effect, const char *data, DWORD offset)
579 struct d3d10_effect_type *type;
580 struct wine_rb_entry *entry;
583 entry = wine_rb_get(&effect->types, &offset);
586 TRACE("Returning existing type.\n");
587 return WINE_RB_ENTRY_VALUE(entry, struct d3d10_effect_type, entry);
590 type = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*type));
593 ERR("Failed to allocate type memory.\n");
597 type->vtbl = &d3d10_effect_type_vtbl;
599 type->effect = effect;
600 hr = parse_fx10_type(type, data + offset, data);
603 ERR("Failed to parse type info, hr %#x.\n", hr);
604 HeapFree(GetProcessHeap(), 0, type);
608 if (wine_rb_put(&effect->types, &offset, &type->entry) == -1)
610 ERR("Failed to insert type entry.\n");
611 HeapFree(GetProcessHeap(), 0, type);
618 static void set_variable_vtbl(struct d3d10_effect_variable *v)
620 switch (v->type->type_class)
622 case D3D10_SVC_SCALAR:
623 v->vtbl = (ID3D10EffectVariableVtbl *)&d3d10_effect_scalar_variable_vtbl;
626 case D3D10_SVC_VECTOR:
627 v->vtbl = (ID3D10EffectVariableVtbl *)&d3d10_effect_vector_variable_vtbl;
630 case D3D10_SVC_MATRIX_ROWS:
631 case D3D10_SVC_MATRIX_COLUMNS:
632 v->vtbl = (ID3D10EffectVariableVtbl *)&d3d10_effect_matrix_variable_vtbl;
635 case D3D10_SVC_STRUCT:
636 v->vtbl = &d3d10_effect_variable_vtbl;
639 case D3D10_SVC_OBJECT:
640 switch(v->type->basetype)
642 case D3D10_SVT_STRING:
643 v->vtbl = (ID3D10EffectVariableVtbl *)&d3d10_effect_string_variable_vtbl;
646 case D3D10_SVT_TEXTURE1D:
647 case D3D10_SVT_TEXTURE1DARRAY:
648 case D3D10_SVT_TEXTURE2D:
649 case D3D10_SVT_TEXTURE2DARRAY:
650 case D3D10_SVT_TEXTURE2DMS:
651 case D3D10_SVT_TEXTURE2DMSARRAY:
652 case D3D10_SVT_TEXTURE3D:
653 case D3D10_SVT_TEXTURECUBE:
654 v->vtbl = (ID3D10EffectVariableVtbl *)&d3d10_effect_shader_resource_variable_vtbl;
657 case D3D10_SVT_RENDERTARGETVIEW:
658 v->vtbl = (ID3D10EffectVariableVtbl *)&d3d10_effect_render_target_view_variable_vtbl;
661 case D3D10_SVT_DEPTHSTENCILVIEW:
662 v->vtbl = (ID3D10EffectVariableVtbl *)&d3d10_effect_depth_stencil_view_variable_vtbl;
665 case D3D10_SVT_DEPTHSTENCIL:
666 v->vtbl = (ID3D10EffectVariableVtbl *)&d3d10_effect_depth_stencil_variable_vtbl;
669 case D3D10_SVT_VERTEXSHADER:
670 case D3D10_SVT_GEOMETRYSHADER:
671 case D3D10_SVT_PIXELSHADER:
672 v->vtbl = (ID3D10EffectVariableVtbl *)&d3d10_effect_shader_variable_vtbl;
675 case D3D10_SVT_BLEND:
676 v->vtbl = (ID3D10EffectVariableVtbl *)&d3d10_effect_blend_variable_vtbl;
679 case D3D10_SVT_RASTERIZER:
680 v->vtbl = (ID3D10EffectVariableVtbl *)&d3d10_effect_rasterizer_variable_vtbl;
683 case D3D10_SVT_SAMPLER:
684 v->vtbl = (ID3D10EffectVariableVtbl *)&d3d10_effect_sampler_variable_vtbl;
688 FIXME("Unhandled basetype %s.\n", debug_d3d10_shader_variable_type(v->type->basetype));
689 v->vtbl = &d3d10_effect_variable_vtbl;
695 FIXME("Unhandled type class %s.\n", debug_d3d10_shader_variable_class(v->type->type_class));
696 v->vtbl = &d3d10_effect_variable_vtbl;
701 static HRESULT copy_variableinfo_from_type(struct d3d10_effect_variable *v)
706 if (v->type->member_count)
708 v->members = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, v->type->member_count * sizeof(*v->members));
711 ERR("Failed to allocate members memory.\n");
712 return E_OUTOFMEMORY;
715 for (i = 0; i < v->type->member_count; ++i)
717 struct d3d10_effect_variable *var = &v->members[i];
718 struct d3d10_effect_type_member *typem = &v->type->members[i];
720 var->buffer = v->buffer;
721 var->effect = v->effect;
722 var->type = typem->type;
723 set_variable_vtbl(var);
725 if (!copy_name(typem->name, &var->name))
727 ERR("Failed to copy name.\n");
728 return E_OUTOFMEMORY;
730 TRACE("Variable name: %s.\n", debugstr_a(var->name));
732 if (!copy_name(typem->semantic, &var->semantic))
734 ERR("Failed to copy name.\n");
735 return E_OUTOFMEMORY;
737 TRACE("Variable semantic: %s.\n", debugstr_a(var->semantic));
739 var->buffer_offset = v->buffer_offset + typem->buffer_offset;
740 TRACE("Variable buffer offset: %u.\n", var->buffer_offset);
742 hr = copy_variableinfo_from_type(var);
743 if (FAILED(hr)) return hr;
747 if (v->type->element_count)
749 unsigned int bufferoffset = v->buffer_offset;
751 v->elements = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, v->type->element_count * sizeof(*v->elements));
754 ERR("Failed to allocate elements memory.\n");
755 return E_OUTOFMEMORY;
758 for (i = 0; i < v->type->element_count; ++i)
760 struct d3d10_effect_variable *var = &v->elements[i];
762 var->buffer = v->buffer;
763 var->effect = v->effect;
764 var->type = v->type->elementtype;
765 set_variable_vtbl(var);
767 if (!copy_name(v->name, &var->name))
769 ERR("Failed to copy name.\n");
770 return E_OUTOFMEMORY;
772 TRACE("Variable name: %s.\n", debugstr_a(var->name));
774 if (!copy_name(v->semantic, &var->semantic))
776 ERR("Failed to copy name.\n");
777 return E_OUTOFMEMORY;
779 TRACE("Variable semantic: %s.\n", debugstr_a(var->semantic));
783 bufferoffset += v->type->stride;
785 var->buffer_offset = bufferoffset;
786 TRACE("Variable buffer offset: %u.\n", var->buffer_offset);
788 hr = copy_variableinfo_from_type(var);
789 if (FAILED(hr)) return hr;
796 static HRESULT parse_fx10_variable_head(struct d3d10_effect_variable *v, const char **ptr, const char *data)
800 read_dword(ptr, &offset);
801 TRACE("Variable name at offset %#x.\n", offset);
803 if (!copy_name(data + offset, &v->name))
805 ERR("Failed to copy name.\n");
806 return E_OUTOFMEMORY;
808 TRACE("Variable name: %s.\n", debugstr_a(v->name));
810 read_dword(ptr, &offset);
811 TRACE("Variable type info at offset %#x.\n", offset);
813 v->type = get_fx10_type(v->effect, data, offset);
816 ERR("Failed to get variable type.\n");
819 set_variable_vtbl(v);
821 return copy_variableinfo_from_type(v);
824 static HRESULT parse_fx10_annotation(struct d3d10_effect_variable *a, const char **ptr, const char *data)
828 hr = parse_fx10_variable_head(a, ptr, data);
829 if (FAILED(hr)) return hr;
831 skip_dword_unknown(ptr, 1);
836 static HRESULT parse_fx10_object(struct d3d10_effect_object *o, const char **ptr, const char *data)
838 const char *data_ptr;
842 read_dword(ptr, &o->type);
843 TRACE("Effect object is of type %#x.\n", o->type);
845 skip_dword_unknown(ptr, 2);
847 read_dword(ptr, &offset);
848 TRACE("Effect object idx is at offset %#x.\n", offset);
850 data_ptr = data + offset;
851 read_dword(&data_ptr, &offset);
853 TRACE("Effect object starts at offset %#x.\n", offset);
855 /* FIXME: This probably isn't completely correct. */
858 WARN("Skipping effect object.\n");
863 data_ptr = data + offset;
868 case D3D10_EOT_VERTEXSHADER:
869 TRACE("Vertex shader\n");
870 hr = parse_shader(o, data_ptr);
873 case D3D10_EOT_PIXELSHADER:
874 TRACE("Pixel shader\n");
875 hr = parse_shader(o, data_ptr);
878 case D3D10_EOT_GEOMETRYSHADER:
879 TRACE("Geometry shader\n");
880 hr = parse_shader(o, data_ptr);
884 FIXME("Unhandled object type %#x\n", o->type);
892 static HRESULT parse_fx10_pass(struct d3d10_effect_pass *p, const char **ptr, const char *data)
898 read_dword(ptr, &offset);
899 TRACE("Pass name at offset %#x.\n", offset);
901 if (!copy_name(data + offset, &p->name))
903 ERR("Failed to copy name.\n");
904 return E_OUTOFMEMORY;
906 TRACE("Pass name: %s.\n", debugstr_a(p->name));
908 read_dword(ptr, &p->object_count);
909 TRACE("Pass has %u effect objects.\n", p->object_count);
911 read_dword(ptr, &p->annotation_count);
912 TRACE("Pass has %u annotations.\n", p->annotation_count);
914 p->annotations = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, p->annotation_count * sizeof(*p->annotations));
917 ERR("Failed to allocate pass annotations memory.\n");
918 return E_OUTOFMEMORY;
921 for(i = 0; i < p->annotation_count; ++i)
923 struct d3d10_effect_variable *a = &p->annotations[i];
925 a->effect = p->technique->effect;
927 hr = parse_fx10_annotation(a, ptr, data);
928 if (FAILED(hr)) return hr;
931 p->objects = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, p->object_count * sizeof(*p->objects));
934 ERR("Failed to allocate effect objects memory.\n");
935 return E_OUTOFMEMORY;
938 for (i = 0; i < p->object_count; ++i)
940 struct d3d10_effect_object *o = &p->objects[i];
944 hr = parse_fx10_object(o, ptr, data);
945 if (FAILED(hr)) return hr;
951 static HRESULT parse_fx10_technique(struct d3d10_effect_technique *t, const char **ptr, const char *data)
957 read_dword(ptr, &offset);
958 TRACE("Technique name at offset %#x.\n", offset);
960 if (!copy_name(data + offset, &t->name))
962 ERR("Failed to copy name.\n");
963 return E_OUTOFMEMORY;
965 TRACE("Technique name: %s.\n", debugstr_a(t->name));
967 read_dword(ptr, &t->pass_count);
968 TRACE("Technique has %u passes\n", t->pass_count);
970 read_dword(ptr, &t->annotation_count);
971 TRACE("Technique has %u annotations.\n", t->annotation_count);
973 t->annotations = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, t->annotation_count * sizeof(*t->annotations));
976 ERR("Failed to allocate technique annotations memory.\n");
977 return E_OUTOFMEMORY;
980 for(i = 0; i < t->annotation_count; ++i)
982 struct d3d10_effect_variable *a = &t->annotations[i];
984 a->effect = t->effect;
986 hr = parse_fx10_annotation(a, ptr, data);
987 if (FAILED(hr)) return hr;
990 t->passes = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, t->pass_count * sizeof(*t->passes));
993 ERR("Failed to allocate passes memory\n");
994 return E_OUTOFMEMORY;
997 for (i = 0; i < t->pass_count; ++i)
999 struct d3d10_effect_pass *p = &t->passes[i];
1001 p->vtbl = &d3d10_effect_pass_vtbl;
1004 hr = parse_fx10_pass(p, ptr, data);
1005 if (FAILED(hr)) return hr;
1011 static HRESULT parse_fx10_variable(struct d3d10_effect_variable *v, const char **ptr, const char *data)
1017 hr = parse_fx10_variable_head(v, ptr, data);
1018 if (FAILED(hr)) return hr;
1020 read_dword(ptr, &offset);
1021 TRACE("Variable semantic at offset %#x.\n", offset);
1023 if (!copy_name(data + offset, &v->semantic))
1025 ERR("Failed to copy semantic.\n");
1026 return E_OUTOFMEMORY;
1028 TRACE("Variable semantic: %s.\n", debugstr_a(v->semantic));
1030 read_dword(ptr, &v->buffer_offset);
1031 TRACE("Variable offset in buffer: %#x.\n", v->buffer_offset);
1033 skip_dword_unknown(ptr, 1);
1035 read_dword(ptr, &v->flag);
1036 TRACE("Variable flag: %#x.\n", v->flag);
1038 read_dword(ptr, &v->annotation_count);
1039 TRACE("Variable has %u annotations.\n", v->annotation_count);
1041 v->annotations = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, v->annotation_count * sizeof(*v->annotations));
1042 if (!v->annotations)
1044 ERR("Failed to allocate variable annotations memory.\n");
1045 return E_OUTOFMEMORY;
1048 for (i = 0; i < v->annotation_count; ++i)
1050 struct d3d10_effect_variable *a = &v->annotations[i];
1052 a->effect = v->effect;
1054 hr = parse_fx10_annotation(a, ptr, data);
1055 if (FAILED(hr)) return hr;
1061 static HRESULT parse_fx10_local_variable(struct d3d10_effect_variable *v, const char **ptr, const char *data)
1066 hr = parse_fx10_variable_head(v, ptr, data);
1067 if (FAILED(hr)) return hr;
1069 skip_dword_unknown(ptr, 2);
1071 switch (v->type->basetype)
1073 case D3D10_SVT_TEXTURE1D:
1074 case D3D10_SVT_TEXTURE1DARRAY:
1075 case D3D10_SVT_TEXTURE2D:
1076 case D3D10_SVT_TEXTURE2DARRAY:
1077 case D3D10_SVT_TEXTURE2DMS:
1078 case D3D10_SVT_TEXTURE2DMSARRAY:
1079 case D3D10_SVT_TEXTURE3D:
1080 case D3D10_SVT_TEXTURECUBE:
1081 case D3D10_SVT_RENDERTARGETVIEW:
1082 case D3D10_SVT_DEPTHSTENCILVIEW:
1083 TRACE("SVT could not have elements.\n");
1086 case D3D10_SVT_VERTEXSHADER:
1087 case D3D10_SVT_PIXELSHADER:
1088 case D3D10_SVT_GEOMETRYSHADER:
1089 TRACE("SVT is a shader.\n");
1090 for (i = 0; i < max(v->type->element_count, 1); ++i)
1092 DWORD shader_offset;
1095 * TODO: Parse the shader
1097 read_dword(ptr, &shader_offset);
1098 FIXME("Shader offset: %#x.\n", shader_offset);
1102 case D3D10_SVT_DEPTHSTENCIL:
1103 case D3D10_SVT_BLEND:
1104 case D3D10_SVT_RASTERIZER:
1105 case D3D10_SVT_SAMPLER:
1106 TRACE("SVT is a state.\n");
1107 for (i = 0; i < max(v->type->element_count, 1); ++i)
1112 read_dword(ptr, &object_count);
1113 TRACE("Object count: %#x.\n", object_count);
1115 for (j = 0; j < object_count; ++j)
1117 skip_dword_unknown(ptr, 4);
1123 FIXME("Unhandled case %s.\n", debug_d3d10_shader_variable_type(v->type->basetype));
1127 read_dword(ptr, &v->annotation_count);
1128 TRACE("Variable has %u annotations.\n", v->annotation_count);
1130 v->annotations = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, v->annotation_count * sizeof(*v->annotations));
1131 if (!v->annotations)
1133 ERR("Failed to allocate variable annotations memory.\n");
1134 return E_OUTOFMEMORY;
1137 for (i = 0; i < v->annotation_count; ++i)
1139 struct d3d10_effect_variable *a = &v->annotations[i];
1141 a->effect = v->effect;
1143 hr = parse_fx10_annotation(a, ptr, data);
1144 if (FAILED(hr)) return hr;
1150 static HRESULT parse_fx10_local_buffer(struct d3d10_effect_variable *l, const char **ptr, const char *data)
1154 D3D10_CBUFFER_TYPE d3d10_cbuffer_type;
1157 /* Generate our own type, it isn't in the fx blob. */
1158 l->type = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*l->type));
1161 ERR("Failed to allocate local buffer type memory.\n");
1162 return E_OUTOFMEMORY;
1164 l->type->vtbl = &d3d10_effect_type_vtbl;
1165 l->type->type_class = D3D10_SVC_OBJECT;
1166 l->type->effect = l->effect;
1168 read_dword(ptr, &offset);
1169 TRACE("Local buffer name at offset %#x.\n", offset);
1171 if (!copy_name(data + offset, &l->name))
1173 ERR("Failed to copy name.\n");
1174 return E_OUTOFMEMORY;
1176 TRACE("Local buffer name: %s.\n", debugstr_a(l->name));
1178 read_dword(ptr, &l->data_size);
1179 TRACE("Local buffer data size: %#x.\n", l->data_size);
1181 read_dword(ptr, &d3d10_cbuffer_type);
1182 TRACE("Local buffer type: %#x.\n", d3d10_cbuffer_type);
1184 switch(d3d10_cbuffer_type)
1186 case D3D10_CT_CBUFFER:
1187 l->type->basetype = D3D10_SVT_CBUFFER;
1188 if (!copy_name("cbuffer", &l->type->name))
1190 ERR("Failed to copy name.\n");
1191 return E_OUTOFMEMORY;
1195 case D3D10_CT_TBUFFER:
1196 l->type->basetype = D3D10_SVT_TBUFFER;
1197 if (!copy_name("tbuffer", &l->type->name))
1199 ERR("Failed to copy name.\n");
1200 return E_OUTOFMEMORY;
1205 ERR("Unexpected D3D10_CBUFFER_TYPE %#x!\n", d3d10_cbuffer_type);
1209 read_dword(ptr, &l->type->member_count);
1210 TRACE("Local buffer member count: %#x.\n", l->type->member_count);
1212 skip_dword_unknown(ptr, 1);
1214 read_dword(ptr, &l->annotation_count);
1215 TRACE("Local buffer has %u annotations.\n", l->annotation_count);
1217 l->annotations = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, l->annotation_count * sizeof(*l->annotations));
1218 if (!l->annotations)
1220 ERR("Failed to allocate local buffer annotations memory.\n");
1221 return E_OUTOFMEMORY;
1224 for(i = 0; i < l->annotation_count; ++i)
1226 struct d3d10_effect_variable *a = &l->annotations[i];
1228 a->effect = l->effect;
1230 hr = parse_fx10_annotation(a, ptr, data);
1231 if (FAILED(hr)) return hr;
1234 l->members = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, l->type->member_count * sizeof(*l->members));
1237 ERR("Failed to allocate members memory.\n");
1238 return E_OUTOFMEMORY;
1241 l->type->members = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, l->type->member_count * sizeof(*l->type->members));
1242 if (!l->type->members)
1244 ERR("Failed to allocate type members memory.\n");
1245 return E_OUTOFMEMORY;
1248 for (i = 0; i < l->type->member_count; ++i)
1250 struct d3d10_effect_variable *v = &l->members[i];
1251 struct d3d10_effect_type_member *typem = &l->type->members[i];
1254 v->effect = l->effect;
1256 hr = parse_fx10_variable(v, ptr, data);
1257 if (FAILED(hr)) return hr;
1260 * Copy the values from the variable type to the constant buffers type
1261 * members structure, because it is our own generated type.
1263 typem->type = v->type;
1265 if (!copy_name(v->name, &typem->name))
1267 ERR("Failed to copy name.\n");
1268 return E_OUTOFMEMORY;
1270 TRACE("Variable name: %s.\n", debugstr_a(typem->name));
1272 if (!copy_name(v->semantic, &typem->semantic))
1274 ERR("Failed to copy name.\n");
1275 return E_OUTOFMEMORY;
1277 TRACE("Variable semantic: %s.\n", debugstr_a(typem->semantic));
1279 typem->buffer_offset = v->buffer_offset;
1280 TRACE("Variable buffer offset: %u.\n", typem->buffer_offset);
1282 l->type->size_packed += v->type->size_packed;
1283 l->type->size_unpacked += v->type->size_unpacked;
1285 l->type->stride = l->type->size_unpacked = (l->type->size_unpacked + 0xf) & ~0xf;
1287 TRACE("Constant buffer:\n");
1288 TRACE("\tType name: %s.\n", debugstr_a(l->type->name));
1289 TRACE("\tElement count: %u.\n", l->type->element_count);
1290 TRACE("\tMember count: %u.\n", l->type->member_count);
1291 TRACE("\tUnpacked size: %#x.\n", l->type->size_unpacked);
1292 TRACE("\tStride: %#x.\n", l->type->stride);
1293 TRACE("\tPacked size %#x.\n", l->type->size_packed);
1294 TRACE("\tBasetype: %s.\n", debug_d3d10_shader_variable_type(l->type->basetype));
1295 TRACE("\tTypeclass: %s.\n", debug_d3d10_shader_variable_class(l->type->type_class));
1300 static int d3d10_effect_type_compare(const void *key, const struct wine_rb_entry *entry)
1302 const struct d3d10_effect_type *t = WINE_RB_ENTRY_VALUE(entry, const struct d3d10_effect_type, entry);
1303 const DWORD *id = key;
1308 static void d3d10_effect_type_member_destroy(struct d3d10_effect_type_member *typem)
1310 TRACE("effect type member %p.\n", typem);
1312 /* Do not release typem->type, it will be covered by d3d10_effect_type_destroy(). */
1313 HeapFree(GetProcessHeap(), 0, typem->semantic);
1314 HeapFree(GetProcessHeap(), 0, typem->name);
1317 static void d3d10_effect_type_destroy(struct wine_rb_entry *entry, void *context)
1319 struct d3d10_effect_type *t = WINE_RB_ENTRY_VALUE(entry, struct d3d10_effect_type, entry);
1321 TRACE("effect type %p.\n", t);
1325 HeapFree(GetProcessHeap(), 0, t->elementtype->name);
1326 HeapFree(GetProcessHeap(), 0, t->elementtype);
1333 for (i = 0; i < t->member_count; ++i)
1335 d3d10_effect_type_member_destroy(&t->members[i]);
1337 HeapFree(GetProcessHeap(), 0, t->members);
1340 HeapFree(GetProcessHeap(), 0, t->name);
1341 HeapFree(GetProcessHeap(), 0, t);
1344 static const struct wine_rb_functions d3d10_effect_type_rb_functions =
1349 d3d10_effect_type_compare,
1352 static HRESULT parse_fx10_body(struct d3d10_effect *e, const char *data, DWORD data_size)
1354 const char *ptr = data + e->index_offset;
1358 if (wine_rb_init(&e->types, &d3d10_effect_type_rb_functions) == -1)
1360 ERR("Failed to initialize type rbtree.\n");
1364 e->local_buffers = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, e->local_buffer_count * sizeof(*e->local_buffers));
1365 if (!e->local_buffers)
1367 ERR("Failed to allocate local buffer memory.\n");
1368 return E_OUTOFMEMORY;
1371 e->local_variables = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, e->local_variable_count * sizeof(*e->local_variables));
1372 if (!e->local_variables)
1374 ERR("Failed to allocate local variable memory.\n");
1375 return E_OUTOFMEMORY;
1378 e->techniques = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, e->technique_count * sizeof(*e->techniques));
1381 ERR("Failed to allocate techniques memory\n");
1382 return E_OUTOFMEMORY;
1385 for (i = 0; i < e->local_buffer_count; ++i)
1387 struct d3d10_effect_variable *l = &e->local_buffers[i];
1388 l->vtbl = (ID3D10EffectVariableVtbl *)&d3d10_effect_constant_buffer_vtbl;
1390 l->buffer = &null_local_buffer;
1392 hr = parse_fx10_local_buffer(l, &ptr, data);
1393 if (FAILED(hr)) return hr;
1396 for (i = 0; i < e->local_variable_count; ++i)
1398 struct d3d10_effect_variable *v = &e->local_variables[i];
1401 v->vtbl = &d3d10_effect_variable_vtbl;
1403 hr = parse_fx10_local_variable(v, &ptr, data);
1404 if (FAILED(hr)) return hr;
1407 for (i = 0; i < e->technique_count; ++i)
1409 struct d3d10_effect_technique *t = &e->techniques[i];
1411 t->vtbl = &d3d10_effect_technique_vtbl;
1414 hr = parse_fx10_technique(t, &ptr, data);
1415 if (FAILED(hr)) return hr;
1421 static HRESULT parse_fx10(struct d3d10_effect *e, const char *data, DWORD data_size)
1423 const char *ptr = data;
1426 /* Compiled target version (e.g. fx_4_0=0xfeff1001, fx_4_1=0xfeff1011). */
1427 read_dword(&ptr, &e->version);
1428 TRACE("Target: %#x\n", e->version);
1430 read_dword(&ptr, &e->local_buffer_count);
1431 TRACE("Local buffer count: %u.\n", e->local_buffer_count);
1433 read_dword(&ptr, &e->variable_count);
1434 TRACE("Variable count: %u\n", e->variable_count);
1436 read_dword(&ptr, &e->local_variable_count);
1437 TRACE("Object count: %u\n", e->local_variable_count);
1439 read_dword(&ptr, &e->sharedbuffers_count);
1440 TRACE("Sharedbuffers count: %u\n", e->sharedbuffers_count);
1442 /* Number of variables in shared buffers? */
1443 read_dword(&ptr, &unknown);
1444 FIXME("Unknown 0: %u\n", unknown);
1446 read_dword(&ptr, &e->sharedobjects_count);
1447 TRACE("Sharedobjects count: %u\n", e->sharedobjects_count);
1449 read_dword(&ptr, &e->technique_count);
1450 TRACE("Technique count: %u\n", e->technique_count);
1452 read_dword(&ptr, &e->index_offset);
1453 TRACE("Index offset: %#x\n", e->index_offset);
1455 read_dword(&ptr, &unknown);
1456 FIXME("Unknown 1: %u\n", unknown);
1458 read_dword(&ptr, &e->texture_count);
1459 TRACE("Texture count: %u\n", e->texture_count);
1461 read_dword(&ptr, &e->dephstencilstate_count);
1462 TRACE("Depthstencilstate count: %u\n", e->dephstencilstate_count);
1464 read_dword(&ptr, &e->blendstate_count);
1465 TRACE("Blendstate count: %u\n", e->blendstate_count);
1467 read_dword(&ptr, &e->rasterizerstate_count);
1468 TRACE("Rasterizerstate count: %u\n", e->rasterizerstate_count);
1470 read_dword(&ptr, &e->samplerstate_count);
1471 TRACE("Samplerstate count: %u\n", e->samplerstate_count);
1473 read_dword(&ptr, &e->rendertargetview_count);
1474 TRACE("Rendertargetview count: %u\n", e->rendertargetview_count);
1476 read_dword(&ptr, &e->depthstencilview_count);
1477 TRACE("Depthstencilview count: %u\n", e->depthstencilview_count);
1479 read_dword(&ptr, &e->shader_call_count);
1480 TRACE("Shader call count: %u\n", e->shader_call_count);
1482 read_dword(&ptr, &e->shader_compile_count);
1483 TRACE("Shader compile count: %u\n", e->shader_compile_count);
1485 return parse_fx10_body(e, ptr, data_size - (ptr - data));
1488 static HRESULT fx10_chunk_handler(const char *data, DWORD data_size, DWORD tag, void *ctx)
1490 struct d3d10_effect *e = ctx;
1492 TRACE("tag: %s.\n", debugstr_an((const char *)&tag, 4));
1494 TRACE("chunk size: %#x\n", data_size);
1499 return parse_fx10(e, data, data_size);
1502 FIXME("Unhandled chunk %s.\n", debugstr_an((const char *)&tag, 4));
1507 HRESULT d3d10_effect_parse(struct d3d10_effect *This, const void *data, SIZE_T data_size)
1509 return parse_dxbc(data, data_size, fx10_chunk_handler, This);
1512 static void d3d10_effect_object_destroy(struct d3d10_effect_object *o)
1514 TRACE("effect object %p.\n", o);
1518 case D3D10_EOT_VERTEXSHADER:
1519 case D3D10_EOT_PIXELSHADER:
1520 case D3D10_EOT_GEOMETRYSHADER:
1521 HeapFree(GetProcessHeap(), 0, ((struct d3d10_effect_shader_variable *)o->data)->input_signature);
1527 HeapFree(GetProcessHeap(), 0, o->data);
1530 static HRESULT d3d10_effect_object_apply(struct d3d10_effect_object *o)
1532 ID3D10Device *device = o->pass->technique->effect->device;
1534 TRACE("effect object %p, type %#x.\n", o, o->type);
1538 case D3D10_EOT_VERTEXSHADER:
1539 ID3D10Device_VSSetShader(device, ((struct d3d10_effect_shader_variable *)o->data)->shader.vs);
1542 case D3D10_EOT_PIXELSHADER:
1543 ID3D10Device_PSSetShader(device, ((struct d3d10_effect_shader_variable *)o->data)->shader.ps);
1546 case D3D10_EOT_GEOMETRYSHADER:
1547 ID3D10Device_GSSetShader(device, ((struct d3d10_effect_shader_variable *)o->data)->shader.gs);
1551 FIXME("Unhandled effect object type %#x.\n", o->type);
1556 static void d3d10_effect_variable_destroy(struct d3d10_effect_variable *v)
1560 TRACE("variable %p.\n", v);
1562 HeapFree(GetProcessHeap(), 0, v->name);
1563 HeapFree(GetProcessHeap(), 0, v->semantic);
1566 for (i = 0; i < v->annotation_count; ++i)
1568 d3d10_effect_variable_destroy(&v->annotations[i]);
1570 HeapFree(GetProcessHeap(), 0, v->annotations);
1575 for (i = 0; i < v->type->member_count; ++i)
1577 d3d10_effect_variable_destroy(&v->members[i]);
1579 HeapFree(GetProcessHeap(), 0, v->members);
1584 for (i = 0; i < v->type->element_count; ++i)
1586 d3d10_effect_variable_destroy(&v->elements[i]);
1588 HeapFree(GetProcessHeap(), 0, v->elements);
1592 static void d3d10_effect_pass_destroy(struct d3d10_effect_pass *p)
1596 TRACE("pass %p\n", p);
1598 HeapFree(GetProcessHeap(), 0, p->name);
1601 for (i = 0; i < p->object_count; ++i)
1603 d3d10_effect_object_destroy(&p->objects[i]);
1605 HeapFree(GetProcessHeap(), 0, p->objects);
1610 for (i = 0; i < p->annotation_count; ++i)
1612 d3d10_effect_variable_destroy(&p->annotations[i]);
1614 HeapFree(GetProcessHeap(), 0, p->annotations);
1619 static void d3d10_effect_technique_destroy(struct d3d10_effect_technique *t)
1623 TRACE("technique %p\n", t);
1625 HeapFree(GetProcessHeap(), 0, t->name);
1628 for (i = 0; i < t->pass_count; ++i)
1630 d3d10_effect_pass_destroy(&t->passes[i]);
1632 HeapFree(GetProcessHeap(), 0, t->passes);
1637 for (i = 0; i < t->annotation_count; ++i)
1639 d3d10_effect_variable_destroy(&t->annotations[i]);
1641 HeapFree(GetProcessHeap(), 0, t->annotations);
1645 static void d3d10_effect_local_buffer_destroy(struct d3d10_effect_variable *l)
1649 TRACE("local buffer %p.\n", l);
1651 HeapFree(GetProcessHeap(), 0, l->name);
1654 for (i = 0; i < l->type->member_count; ++i)
1656 d3d10_effect_variable_destroy(&l->members[i]);
1658 HeapFree(GetProcessHeap(), 0, l->members);
1661 if (l->type->members)
1663 for (i = 0; i < l->type->member_count; ++i)
1665 /* Do not release l->type->members[i].type, it will be covered by d3d10_effect_type_destroy(). */
1666 HeapFree(GetProcessHeap(), 0, l->type->members[i].semantic);
1667 HeapFree(GetProcessHeap(), 0, l->type->members[i].name);
1669 HeapFree(GetProcessHeap(), 0, l->type->members);
1671 HeapFree(GetProcessHeap(), 0, l->type->name);
1672 HeapFree(GetProcessHeap(), 0, l->type);
1676 for (i = 0; i < l->annotation_count; ++i)
1678 d3d10_effect_variable_destroy(&l->annotations[i]);
1680 HeapFree(GetProcessHeap(), 0, l->annotations);
1684 /* IUnknown methods */
1686 static HRESULT STDMETHODCALLTYPE d3d10_effect_QueryInterface(ID3D10Effect *iface, REFIID riid, void **object)
1688 TRACE("iface %p, riid %s, object %p\n", iface, debugstr_guid(riid), object);
1690 if (IsEqualGUID(riid, &IID_ID3D10Effect)
1691 || IsEqualGUID(riid, &IID_IUnknown))
1693 IUnknown_AddRef(iface);
1698 WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid));
1701 return E_NOINTERFACE;
1704 static ULONG STDMETHODCALLTYPE d3d10_effect_AddRef(ID3D10Effect *iface)
1706 struct d3d10_effect *This = (struct d3d10_effect *)iface;
1707 ULONG refcount = InterlockedIncrement(&This->refcount);
1709 TRACE("%p increasing refcount to %u\n", This, refcount);
1714 static ULONG STDMETHODCALLTYPE d3d10_effect_Release(ID3D10Effect *iface)
1716 struct d3d10_effect *This = (struct d3d10_effect *)iface;
1717 ULONG refcount = InterlockedDecrement(&This->refcount);
1719 TRACE("%p decreasing refcount to %u\n", This, refcount);
1725 if (This->techniques)
1727 for (i = 0; i < This->technique_count; ++i)
1729 d3d10_effect_technique_destroy(&This->techniques[i]);
1731 HeapFree(GetProcessHeap(), 0, This->techniques);
1734 if (This->local_variables)
1736 for (i = 0; i < This->local_variable_count; ++i)
1738 d3d10_effect_variable_destroy(&This->local_variables[i]);
1740 HeapFree(GetProcessHeap(), 0, &This->local_variables);
1743 if (This->local_buffers)
1745 for (i = 0; i < This->local_buffer_count; ++i)
1747 d3d10_effect_local_buffer_destroy(&This->local_buffers[i]);
1749 HeapFree(GetProcessHeap(), 0, This->local_buffers);
1752 wine_rb_destroy(&This->types, d3d10_effect_type_destroy, NULL);
1754 ID3D10Device_Release(This->device);
1755 HeapFree(GetProcessHeap(), 0, This);
1761 /* ID3D10Effect methods */
1763 static BOOL STDMETHODCALLTYPE d3d10_effect_IsValid(ID3D10Effect *iface)
1765 FIXME("iface %p stub!\n", iface);
1770 static BOOL STDMETHODCALLTYPE d3d10_effect_IsPool(ID3D10Effect *iface)
1772 FIXME("iface %p stub!\n", iface);
1777 static HRESULT STDMETHODCALLTYPE d3d10_effect_GetDevice(ID3D10Effect *iface, ID3D10Device **device)
1779 struct d3d10_effect *This = (struct d3d10_effect *)iface;
1781 TRACE("iface %p, device %p\n", iface, device);
1783 ID3D10Device_AddRef(This->device);
1784 *device = This->device;
1789 static HRESULT STDMETHODCALLTYPE d3d10_effect_GetDesc(ID3D10Effect *iface, D3D10_EFFECT_DESC *desc)
1791 FIXME("iface %p, desc %p stub!\n", iface, desc);
1796 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_GetConstantBufferByIndex(ID3D10Effect *iface,
1799 struct d3d10_effect *This = (struct d3d10_effect *)iface;
1800 struct d3d10_effect_variable *l;
1802 TRACE("iface %p, index %u\n", iface, index);
1804 if (index >= This->local_buffer_count)
1806 WARN("Invalid index specified\n");
1807 return (ID3D10EffectConstantBuffer *)&null_local_buffer;
1810 l = &This->local_buffers[index];
1812 TRACE("Returning buffer %p, %s.\n", l, debugstr_a(l->name));
1814 return (ID3D10EffectConstantBuffer *)l;
1817 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_GetConstantBufferByName(ID3D10Effect *iface,
1820 struct d3d10_effect *This = (struct d3d10_effect *)iface;
1823 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
1825 for (i = 0; i < This->local_buffer_count; ++i)
1827 struct d3d10_effect_variable *l = &This->local_buffers[i];
1829 if (!strcmp(l->name, name))
1831 TRACE("Returning buffer %p.\n", l);
1832 return (ID3D10EffectConstantBuffer *)l;
1836 WARN("Invalid name specified\n");
1838 return (ID3D10EffectConstantBuffer *)&null_local_buffer;
1841 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableByIndex(ID3D10Effect *iface, UINT index)
1843 struct d3d10_effect *This = (struct d3d10_effect *)iface;
1846 TRACE("iface %p, index %u\n", iface, index);
1848 for (i = 0; i < This->local_buffer_count; ++i)
1850 struct d3d10_effect_variable *l = &This->local_buffers[i];
1852 if (index < l->type->member_count)
1854 struct d3d10_effect_variable *v = &l->members[index];
1856 TRACE("Returning variable %p.\n", v);
1857 return (ID3D10EffectVariable *)v;
1859 index -= l->type->member_count;
1862 if (index < This->local_variable_count)
1864 struct d3d10_effect_variable *v = &This->local_variables[index];
1866 TRACE("Returning variable %p.\n", v);
1867 return (ID3D10EffectVariable *)v;
1870 WARN("Invalid index specified\n");
1872 return (ID3D10EffectVariable *)&null_variable;
1875 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableByName(ID3D10Effect *iface, LPCSTR name)
1877 struct d3d10_effect *This = (struct d3d10_effect *)iface;
1880 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
1882 for (i = 0; i < This->local_buffer_count; ++i)
1884 struct d3d10_effect_variable *l = &This->local_buffers[i];
1887 for (j = 0; j < l->type->member_count; ++j)
1889 struct d3d10_effect_variable *v = &l->members[j];
1891 if (!strcmp(v->name, name))
1893 TRACE("Returning variable %p.\n", v);
1894 return (ID3D10EffectVariable *)v;
1899 for (i = 0; i < This->local_variable_count; ++i)
1901 struct d3d10_effect_variable *v = &This->local_variables[i];
1903 if (!strcmp(v->name, name))
1905 TRACE("Returning variable %p.\n", v);
1906 return (ID3D10EffectVariable *)v;
1910 WARN("Invalid name specified\n");
1912 return (ID3D10EffectVariable *)&null_variable;
1915 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableBySemantic(ID3D10Effect *iface,
1918 FIXME("iface %p, semantic %s stub!\n", iface, debugstr_a(semantic));
1923 static struct ID3D10EffectTechnique * STDMETHODCALLTYPE d3d10_effect_GetTechniqueByIndex(ID3D10Effect *iface,
1926 struct d3d10_effect *This = (struct d3d10_effect *)iface;
1927 struct d3d10_effect_technique *t;
1929 TRACE("iface %p, index %u\n", iface, index);
1931 if (index >= This->technique_count)
1933 WARN("Invalid index specified\n");
1934 return (ID3D10EffectTechnique *)&null_technique;
1937 t = &This->techniques[index];
1939 TRACE("Returning technique %p, %s.\n", t, debugstr_a(t->name));
1941 return (ID3D10EffectTechnique *)t;
1944 static struct ID3D10EffectTechnique * STDMETHODCALLTYPE d3d10_effect_GetTechniqueByName(ID3D10Effect *iface,
1947 struct d3d10_effect *This = (struct d3d10_effect *)iface;
1950 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
1952 for (i = 0; i < This->technique_count; ++i)
1954 struct d3d10_effect_technique *t = &This->techniques[i];
1955 if (!strcmp(t->name, name))
1957 TRACE("Returning technique %p\n", t);
1958 return (ID3D10EffectTechnique *)t;
1962 WARN("Invalid name specified\n");
1964 return (ID3D10EffectTechnique *)&null_technique;
1967 static HRESULT STDMETHODCALLTYPE d3d10_effect_Optimize(ID3D10Effect *iface)
1969 FIXME("iface %p stub!\n", iface);
1974 static BOOL STDMETHODCALLTYPE d3d10_effect_IsOptimized(ID3D10Effect *iface)
1976 FIXME("iface %p stub!\n", iface);
1981 const struct ID3D10EffectVtbl d3d10_effect_vtbl =
1983 /* IUnknown methods */
1984 d3d10_effect_QueryInterface,
1985 d3d10_effect_AddRef,
1986 d3d10_effect_Release,
1987 /* ID3D10Effect methods */
1988 d3d10_effect_IsValid,
1989 d3d10_effect_IsPool,
1990 d3d10_effect_GetDevice,
1991 d3d10_effect_GetDesc,
1992 d3d10_effect_GetConstantBufferByIndex,
1993 d3d10_effect_GetConstantBufferByName,
1994 d3d10_effect_GetVariableByIndex,
1995 d3d10_effect_GetVariableByName,
1996 d3d10_effect_GetVariableBySemantic,
1997 d3d10_effect_GetTechniqueByIndex,
1998 d3d10_effect_GetTechniqueByName,
1999 d3d10_effect_Optimize,
2000 d3d10_effect_IsOptimized,
2003 /* ID3D10EffectTechnique methods */
2005 static BOOL STDMETHODCALLTYPE d3d10_effect_technique_IsValid(ID3D10EffectTechnique *iface)
2007 TRACE("iface %p\n", iface);
2009 return (struct d3d10_effect_technique *)iface != &null_technique;
2012 static HRESULT STDMETHODCALLTYPE d3d10_effect_technique_GetDesc(ID3D10EffectTechnique *iface,
2013 D3D10_TECHNIQUE_DESC *desc)
2015 struct d3d10_effect_technique *This = (struct d3d10_effect_technique *)iface;
2017 TRACE("iface %p, desc %p\n", iface, desc);
2019 if(This == &null_technique)
2021 WARN("Null technique specified\n");
2027 WARN("Invalid argument specified\n");
2028 return E_INVALIDARG;
2031 desc->Name = This->name;
2032 desc->Passes = This->pass_count;
2033 desc->Annotations = This->annotation_count;
2038 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_technique_GetAnnotationByIndex(
2039 ID3D10EffectTechnique *iface, UINT index)
2041 struct d3d10_effect_technique *This = (struct d3d10_effect_technique *)iface;
2042 struct d3d10_effect_variable *a;
2044 TRACE("iface %p, index %u\n", iface, index);
2046 if (index >= This->annotation_count)
2048 WARN("Invalid index specified\n");
2049 return (ID3D10EffectVariable *)&null_variable;
2052 a = &This->annotations[index];
2054 TRACE("Returning annotation %p, %s\n", a, debugstr_a(a->name));
2056 return (ID3D10EffectVariable *)a;
2059 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_technique_GetAnnotationByName(
2060 ID3D10EffectTechnique *iface, LPCSTR name)
2062 struct d3d10_effect_technique *This = (struct d3d10_effect_technique *)iface;
2065 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
2067 for (i = 0; i < This->annotation_count; ++i)
2069 struct d3d10_effect_variable *a = &This->annotations[i];
2070 if (!strcmp(a->name, name))
2072 TRACE("Returning annotation %p\n", a);
2073 return (ID3D10EffectVariable *)a;
2077 WARN("Invalid name specified\n");
2079 return (ID3D10EffectVariable *)&null_variable;
2082 static struct ID3D10EffectPass * STDMETHODCALLTYPE d3d10_effect_technique_GetPassByIndex(ID3D10EffectTechnique *iface,
2085 struct d3d10_effect_technique *This = (struct d3d10_effect_technique *)iface;
2086 struct d3d10_effect_pass *p;
2088 TRACE("iface %p, index %u\n", iface, index);
2090 if (index >= This->pass_count)
2092 WARN("Invalid index specified\n");
2093 return (ID3D10EffectPass *)&null_pass;
2096 p = &This->passes[index];
2098 TRACE("Returning pass %p, %s.\n", p, debugstr_a(p->name));
2100 return (ID3D10EffectPass *)p;
2103 static struct ID3D10EffectPass * STDMETHODCALLTYPE d3d10_effect_technique_GetPassByName(ID3D10EffectTechnique *iface,
2106 struct d3d10_effect_technique *This = (struct d3d10_effect_technique *)iface;
2109 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
2111 for (i = 0; i < This->pass_count; ++i)
2113 struct d3d10_effect_pass *p = &This->passes[i];
2114 if (!strcmp(p->name, name))
2116 TRACE("Returning pass %p\n", p);
2117 return (ID3D10EffectPass *)p;
2121 WARN("Invalid name specified\n");
2123 return (ID3D10EffectPass *)&null_pass;
2126 static HRESULT STDMETHODCALLTYPE d3d10_effect_technique_ComputeStateBlockMask(ID3D10EffectTechnique *iface,
2127 D3D10_STATE_BLOCK_MASK *mask)
2129 FIXME("iface %p,mask %p stub!\n", iface, mask);
2134 static const struct ID3D10EffectTechniqueVtbl d3d10_effect_technique_vtbl =
2136 /* ID3D10EffectTechnique methods */
2137 d3d10_effect_technique_IsValid,
2138 d3d10_effect_technique_GetDesc,
2139 d3d10_effect_technique_GetAnnotationByIndex,
2140 d3d10_effect_technique_GetAnnotationByName,
2141 d3d10_effect_technique_GetPassByIndex,
2142 d3d10_effect_technique_GetPassByName,
2143 d3d10_effect_technique_ComputeStateBlockMask,
2146 /* ID3D10EffectPass methods */
2148 static BOOL STDMETHODCALLTYPE d3d10_effect_pass_IsValid(ID3D10EffectPass *iface)
2150 TRACE("iface %p\n", iface);
2152 return (struct d3d10_effect_pass *)iface != &null_pass;
2155 static HRESULT STDMETHODCALLTYPE d3d10_effect_pass_GetDesc(ID3D10EffectPass *iface, D3D10_PASS_DESC *desc)
2157 struct d3d10_effect_pass *This = (struct d3d10_effect_pass *)iface;
2160 FIXME("iface %p, desc %p partial stub!\n", iface, desc);
2162 if(This == &null_pass)
2164 WARN("Null pass specified\n");
2170 WARN("Invalid argument specified\n");
2171 return E_INVALIDARG;
2174 memset(desc, 0, sizeof(*desc));
2175 desc->Name = This->name;
2176 for (i = 0; i < This->object_count; ++i)
2178 struct d3d10_effect_object *o = &This->objects[i];
2179 if (o->type == D3D10_EOT_VERTEXSHADER)
2181 struct d3d10_effect_shader_variable *s = o->data;
2182 desc->pIAInputSignature = (BYTE *)s->input_signature;
2183 desc->IAInputSignatureSize = s->input_signature_size;
2191 static HRESULT STDMETHODCALLTYPE d3d10_effect_pass_GetVertexShaderDesc(ID3D10EffectPass *iface,
2192 D3D10_PASS_SHADER_DESC *desc)
2194 FIXME("iface %p, desc %p stub!\n", iface, desc);
2199 static HRESULT STDMETHODCALLTYPE d3d10_effect_pass_GetGeometryShaderDesc(ID3D10EffectPass *iface,
2200 D3D10_PASS_SHADER_DESC *desc)
2202 FIXME("iface %p, desc %p stub!\n", iface, desc);
2207 static HRESULT STDMETHODCALLTYPE d3d10_effect_pass_GetPixelShaderDesc(ID3D10EffectPass *iface,
2208 D3D10_PASS_SHADER_DESC *desc)
2210 FIXME("iface %p, desc %p stub!\n", iface, desc);
2215 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_pass_GetAnnotationByIndex(ID3D10EffectPass *iface,
2218 struct d3d10_effect_pass *This = (struct d3d10_effect_pass *)iface;
2219 struct d3d10_effect_variable *a;
2221 TRACE("iface %p, index %u\n", iface, index);
2223 if (index >= This->annotation_count)
2225 WARN("Invalid index specified\n");
2226 return (ID3D10EffectVariable *)&null_variable;
2229 a = &This->annotations[index];
2231 TRACE("Returning annotation %p, %s\n", a, debugstr_a(a->name));
2233 return (ID3D10EffectVariable *)a;
2236 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_pass_GetAnnotationByName(ID3D10EffectPass *iface,
2239 struct d3d10_effect_pass *This = (struct d3d10_effect_pass *)iface;
2242 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
2244 for (i = 0; i < This->annotation_count; ++i)
2246 struct d3d10_effect_variable *a = &This->annotations[i];
2247 if (!strcmp(a->name, name))
2249 TRACE("Returning annotation %p\n", a);
2250 return (ID3D10EffectVariable *)a;
2254 WARN("Invalid name specified\n");
2256 return (ID3D10EffectVariable *)&null_variable;
2259 static HRESULT STDMETHODCALLTYPE d3d10_effect_pass_Apply(ID3D10EffectPass *iface, UINT flags)
2261 struct d3d10_effect_pass *This = (struct d3d10_effect_pass *)iface;
2265 TRACE("iface %p, flags %#x\n", iface, flags);
2267 if (flags) FIXME("Ignoring flags (%#x)\n", flags);
2269 for (i = 0; i < This->object_count; ++i)
2271 hr = d3d10_effect_object_apply(&This->objects[i]);
2272 if (FAILED(hr)) break;
2278 static HRESULT STDMETHODCALLTYPE d3d10_effect_pass_ComputeStateBlockMask(ID3D10EffectPass *iface,
2279 D3D10_STATE_BLOCK_MASK *mask)
2281 FIXME("iface %p, mask %p stub!\n", iface, mask);
2286 static const struct ID3D10EffectPassVtbl d3d10_effect_pass_vtbl =
2288 /* ID3D10EffectPass methods */
2289 d3d10_effect_pass_IsValid,
2290 d3d10_effect_pass_GetDesc,
2291 d3d10_effect_pass_GetVertexShaderDesc,
2292 d3d10_effect_pass_GetGeometryShaderDesc,
2293 d3d10_effect_pass_GetPixelShaderDesc,
2294 d3d10_effect_pass_GetAnnotationByIndex,
2295 d3d10_effect_pass_GetAnnotationByName,
2296 d3d10_effect_pass_Apply,
2297 d3d10_effect_pass_ComputeStateBlockMask,
2300 /* ID3D10EffectVariable methods */
2302 static BOOL STDMETHODCALLTYPE d3d10_effect_variable_IsValid(ID3D10EffectVariable *iface)
2304 TRACE("iface %p\n", iface);
2306 return (struct d3d10_effect_variable *)iface != &null_variable;
2309 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_variable_GetType(ID3D10EffectVariable *iface)
2311 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2313 TRACE("iface %p\n", iface);
2315 return (ID3D10EffectType *)This->type;
2318 static HRESULT STDMETHODCALLTYPE d3d10_effect_variable_GetDesc(ID3D10EffectVariable *iface,
2319 D3D10_EFFECT_VARIABLE_DESC *desc)
2321 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2323 TRACE("iface %p, desc %p\n", iface, desc);
2325 if(This == &null_variable)
2327 WARN("Null variable specified\n");
2333 WARN("Invalid argument specified\n");
2334 return E_INVALIDARG;
2337 memset(desc, 0, sizeof(*desc));
2338 desc->Name = This->name;
2339 desc->Semantic = This->semantic;
2340 desc->Flags = This->flag;
2341 desc->Annotations = This->annotation_count;
2342 desc->BufferOffset = This->buffer_offset;
2344 if( This->flag == D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT)
2346 desc->ExplicitBindPoint = This->buffer_offset;
2350 FIXME("Unhandled flag %#x!\n", This->flag);
2356 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_variable_GetAnnotationByIndex(
2357 ID3D10EffectVariable *iface, UINT index)
2359 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2360 struct d3d10_effect_variable *a;
2362 TRACE("iface %p, index %u\n", iface, index);
2364 if (index >= This->annotation_count)
2366 WARN("Invalid index specified\n");
2367 return (ID3D10EffectVariable *)&null_variable;
2370 a = &This->annotations[index];
2372 TRACE("Returning annotation %p, %s\n", a, debugstr_a(a->name));
2374 return (ID3D10EffectVariable *)a;
2377 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_variable_GetAnnotationByName(
2378 ID3D10EffectVariable *iface, LPCSTR name)
2380 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2383 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
2385 for (i = 0; i < This->annotation_count; ++i)
2387 struct d3d10_effect_variable *a = &This->annotations[i];
2388 if (!strcmp(a->name, name))
2390 TRACE("Returning annotation %p\n", a);
2391 return (ID3D10EffectVariable *)a;
2395 WARN("Invalid name specified\n");
2397 return (ID3D10EffectVariable *)&null_variable;
2400 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_variable_GetMemberByIndex(
2401 ID3D10EffectVariable *iface, UINT index)
2403 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2404 struct d3d10_effect_variable *m;
2406 TRACE("iface %p, index %u\n", iface, index);
2408 if (index >= This->type->member_count)
2410 WARN("Invalid index specified\n");
2411 return (ID3D10EffectVariable *)&null_variable;
2414 m = &This->members[index];
2416 TRACE("Returning member %p, %s\n", m, debugstr_a(m->name));
2418 return (ID3D10EffectVariable *)m;
2421 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_variable_GetMemberByName(
2422 ID3D10EffectVariable *iface, LPCSTR name)
2424 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2427 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
2431 WARN("Invalid name specified\n");
2432 return (ID3D10EffectVariable *)&null_variable;
2435 for (i = 0; i < This->type->member_count; ++i)
2437 struct d3d10_effect_variable *m = &This->members[i];
2441 if (!strcmp(m->name, name))
2443 TRACE("Returning member %p\n", m);
2444 return (ID3D10EffectVariable *)m;
2449 WARN("Invalid name specified\n");
2451 return (ID3D10EffectVariable *)&null_variable;
2454 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_variable_GetMemberBySemantic(
2455 ID3D10EffectVariable *iface, LPCSTR semantic)
2457 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2460 TRACE("iface %p, semantic %s.\n", iface, debugstr_a(semantic));
2464 WARN("Invalid semantic specified\n");
2465 return (ID3D10EffectVariable *)&null_variable;
2468 for (i = 0; i < This->type->member_count; ++i)
2470 struct d3d10_effect_variable *m = &This->members[i];
2474 if (!strcmp(m->semantic, semantic))
2476 TRACE("Returning member %p\n", m);
2477 return (ID3D10EffectVariable *)m;
2482 WARN("Invalid semantic specified\n");
2484 return (ID3D10EffectVariable *)&null_variable;
2487 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_variable_GetElement(
2488 ID3D10EffectVariable *iface, UINT index)
2490 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2491 struct d3d10_effect_variable *v;
2493 TRACE("iface %p, index %u\n", iface, index);
2495 if (index >= This->type->element_count)
2497 WARN("Invalid index specified\n");
2498 return (ID3D10EffectVariable *)&null_variable;
2501 v = &This->elements[index];
2503 TRACE("Returning element %p, %s\n", v, debugstr_a(v->name));
2505 return (ID3D10EffectVariable *)v;
2508 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_variable_GetParentConstantBuffer(
2509 ID3D10EffectVariable *iface)
2511 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2513 TRACE("iface %p\n", iface);
2515 return (ID3D10EffectConstantBuffer *)This->buffer;
2518 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsScalar(
2519 ID3D10EffectVariable *iface)
2521 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2523 TRACE("iface %p\n", iface);
2525 if (This->vtbl == (ID3D10EffectVariableVtbl *)&d3d10_effect_scalar_variable_vtbl)
2526 return (ID3D10EffectScalarVariable *)This;
2528 return (ID3D10EffectScalarVariable *)&null_scalar_variable;
2531 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsVector(
2532 ID3D10EffectVariable *iface)
2534 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2536 TRACE("iface %p\n", iface);
2538 if (This->vtbl == (ID3D10EffectVariableVtbl *)&d3d10_effect_vector_variable_vtbl)
2539 return (ID3D10EffectVectorVariable *)This;
2541 return (ID3D10EffectVectorVariable *)&null_vector_variable;
2544 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsMatrix(
2545 ID3D10EffectVariable *iface)
2547 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2549 TRACE("iface %p\n", iface);
2551 if (This->vtbl == (ID3D10EffectVariableVtbl *)&d3d10_effect_matrix_variable_vtbl)
2552 return (ID3D10EffectMatrixVariable *)This;
2554 return (ID3D10EffectMatrixVariable *)&null_matrix_variable;
2557 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsString(
2558 ID3D10EffectVariable *iface)
2560 FIXME("iface %p stub!\n", iface);
2565 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsShaderResource(
2566 ID3D10EffectVariable *iface)
2568 FIXME("iface %p stub!\n", iface);
2573 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsRenderTargetView(
2574 ID3D10EffectVariable *iface)
2576 FIXME("iface %p stub!\n", iface);
2581 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsDepthStencilView(
2582 ID3D10EffectVariable *iface)
2584 FIXME("iface %p stub!\n", iface);
2589 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_variable_AsConstantBuffer(
2590 ID3D10EffectVariable *iface)
2592 FIXME("iface %p stub!\n", iface);
2597 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsShader(
2598 ID3D10EffectVariable *iface)
2600 FIXME("iface %p stub!\n", iface);
2605 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsBlend(ID3D10EffectVariable *iface)
2607 FIXME("iface %p stub!\n", iface);
2612 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsDepthStencil(
2613 ID3D10EffectVariable *iface)
2615 FIXME("iface %p stub!\n", iface);
2620 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsRasterizer(
2621 ID3D10EffectVariable *iface)
2623 FIXME("iface %p stub!\n", iface);
2628 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsSampler(
2629 ID3D10EffectVariable *iface)
2631 FIXME("iface %p stub!\n", iface);
2636 static HRESULT STDMETHODCALLTYPE d3d10_effect_variable_SetRawValue(ID3D10EffectVariable *iface,
2637 void *data, UINT offset, UINT count)
2639 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface, data, offset, count);
2644 static HRESULT STDMETHODCALLTYPE d3d10_effect_variable_GetRawValue(ID3D10EffectVariable *iface,
2645 void *data, UINT offset, UINT count)
2647 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface, data, offset, count);
2652 static const struct ID3D10EffectVariableVtbl d3d10_effect_variable_vtbl =
2654 /* ID3D10EffectVariable methods */
2655 d3d10_effect_variable_IsValid,
2656 d3d10_effect_variable_GetType,
2657 d3d10_effect_variable_GetDesc,
2658 d3d10_effect_variable_GetAnnotationByIndex,
2659 d3d10_effect_variable_GetAnnotationByName,
2660 d3d10_effect_variable_GetMemberByIndex,
2661 d3d10_effect_variable_GetMemberByName,
2662 d3d10_effect_variable_GetMemberBySemantic,
2663 d3d10_effect_variable_GetElement,
2664 d3d10_effect_variable_GetParentConstantBuffer,
2665 d3d10_effect_variable_AsScalar,
2666 d3d10_effect_variable_AsVector,
2667 d3d10_effect_variable_AsMatrix,
2668 d3d10_effect_variable_AsString,
2669 d3d10_effect_variable_AsShaderResource,
2670 d3d10_effect_variable_AsRenderTargetView,
2671 d3d10_effect_variable_AsDepthStencilView,
2672 d3d10_effect_variable_AsConstantBuffer,
2673 d3d10_effect_variable_AsShader,
2674 d3d10_effect_variable_AsBlend,
2675 d3d10_effect_variable_AsDepthStencil,
2676 d3d10_effect_variable_AsRasterizer,
2677 d3d10_effect_variable_AsSampler,
2678 d3d10_effect_variable_SetRawValue,
2679 d3d10_effect_variable_GetRawValue,
2682 /* ID3D10EffectVariable methods */
2683 static BOOL STDMETHODCALLTYPE d3d10_effect_constant_buffer_IsValid(ID3D10EffectConstantBuffer *iface)
2685 TRACE("iface %p\n", iface);
2687 return (struct d3d10_effect_variable *)iface != &null_local_buffer;
2690 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetType(ID3D10EffectConstantBuffer *iface)
2692 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
2695 static HRESULT STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetDesc(ID3D10EffectConstantBuffer *iface,
2696 D3D10_EFFECT_VARIABLE_DESC *desc)
2698 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
2701 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetAnnotationByIndex(
2702 ID3D10EffectConstantBuffer *iface, UINT index)
2704 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
2707 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetAnnotationByName(
2708 ID3D10EffectConstantBuffer *iface, LPCSTR name)
2710 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
2713 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetMemberByIndex(
2714 ID3D10EffectConstantBuffer *iface, UINT index)
2716 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
2719 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetMemberByName(
2720 ID3D10EffectConstantBuffer *iface, LPCSTR name)
2722 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
2725 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetMemberBySemantic(
2726 ID3D10EffectConstantBuffer *iface, LPCSTR semantic)
2728 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
2731 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetElement(
2732 ID3D10EffectConstantBuffer *iface, UINT index)
2734 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
2737 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetParentConstantBuffer(
2738 ID3D10EffectConstantBuffer *iface)
2740 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
2743 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsScalar(
2744 ID3D10EffectConstantBuffer *iface)
2746 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
2749 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsVector(
2750 ID3D10EffectConstantBuffer *iface)
2752 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
2755 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsMatrix(
2756 ID3D10EffectConstantBuffer *iface)
2758 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
2761 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsString(
2762 ID3D10EffectConstantBuffer *iface)
2764 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
2767 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsShaderResource(
2768 ID3D10EffectConstantBuffer *iface)
2770 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
2773 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsRenderTargetView(
2774 ID3D10EffectConstantBuffer *iface)
2776 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
2779 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsDepthStencilView(
2780 ID3D10EffectConstantBuffer *iface)
2782 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
2785 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsConstantBuffer(
2786 ID3D10EffectConstantBuffer *iface)
2788 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
2791 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsShader(
2792 ID3D10EffectConstantBuffer *iface)
2794 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
2797 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsBlend(ID3D10EffectConstantBuffer *iface)
2799 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
2802 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsDepthStencil(
2803 ID3D10EffectConstantBuffer *iface)
2805 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
2808 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsRasterizer(
2809 ID3D10EffectConstantBuffer *iface)
2811 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
2814 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsSampler(
2815 ID3D10EffectConstantBuffer *iface)
2817 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
2820 static HRESULT STDMETHODCALLTYPE d3d10_effect_constant_buffer_SetRawValue(ID3D10EffectConstantBuffer *iface,
2821 void *data, UINT offset, UINT count)
2823 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
2826 static HRESULT STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetRawValue(ID3D10EffectConstantBuffer *iface,
2827 void *data, UINT offset, UINT count)
2829 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
2832 /* ID3D10EffectConstantBuffer methods */
2833 static HRESULT STDMETHODCALLTYPE d3d10_effect_constant_buffer_SetConstantBuffer(ID3D10EffectConstantBuffer *iface,
2834 ID3D10Buffer *buffer)
2836 FIXME("iface %p, buffer %p stub!\n", iface, buffer);
2841 static HRESULT STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetConstantBuffer(ID3D10EffectConstantBuffer *iface,
2842 ID3D10Buffer **buffer)
2844 FIXME("iface %p, buffer %p stub!\n", iface, buffer);
2849 static HRESULT STDMETHODCALLTYPE d3d10_effect_constant_buffer_SetTextureBuffer(ID3D10EffectConstantBuffer *iface,
2850 ID3D10ShaderResourceView *view)
2852 FIXME("iface %p, view %p stub!\n", iface, view);
2857 static HRESULT STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetTextureBuffer(ID3D10EffectConstantBuffer *iface,
2858 ID3D10ShaderResourceView **view)
2860 FIXME("iface %p, view %p stub!\n", iface, view);
2865 static const struct ID3D10EffectConstantBufferVtbl d3d10_effect_constant_buffer_vtbl =
2867 /* ID3D10EffectVariable methods */
2868 d3d10_effect_constant_buffer_IsValid,
2869 d3d10_effect_constant_buffer_GetType,
2870 d3d10_effect_constant_buffer_GetDesc,
2871 d3d10_effect_constant_buffer_GetAnnotationByIndex,
2872 d3d10_effect_constant_buffer_GetAnnotationByName,
2873 d3d10_effect_constant_buffer_GetMemberByIndex,
2874 d3d10_effect_constant_buffer_GetMemberByName,
2875 d3d10_effect_constant_buffer_GetMemberBySemantic,
2876 d3d10_effect_constant_buffer_GetElement,
2877 d3d10_effect_constant_buffer_GetParentConstantBuffer,
2878 d3d10_effect_constant_buffer_AsScalar,
2879 d3d10_effect_constant_buffer_AsVector,
2880 d3d10_effect_constant_buffer_AsMatrix,
2881 d3d10_effect_constant_buffer_AsString,
2882 d3d10_effect_constant_buffer_AsShaderResource,
2883 d3d10_effect_constant_buffer_AsRenderTargetView,
2884 d3d10_effect_constant_buffer_AsDepthStencilView,
2885 d3d10_effect_constant_buffer_AsConstantBuffer,
2886 d3d10_effect_constant_buffer_AsShader,
2887 d3d10_effect_constant_buffer_AsBlend,
2888 d3d10_effect_constant_buffer_AsDepthStencil,
2889 d3d10_effect_constant_buffer_AsRasterizer,
2890 d3d10_effect_constant_buffer_AsSampler,
2891 d3d10_effect_constant_buffer_SetRawValue,
2892 d3d10_effect_constant_buffer_GetRawValue,
2893 /* ID3D10EffectConstantBuffer methods */
2894 d3d10_effect_constant_buffer_SetConstantBuffer,
2895 d3d10_effect_constant_buffer_GetConstantBuffer,
2896 d3d10_effect_constant_buffer_SetTextureBuffer,
2897 d3d10_effect_constant_buffer_GetTextureBuffer,
2900 /* ID3D10EffectVariable methods */
2902 static BOOL STDMETHODCALLTYPE d3d10_effect_scalar_variable_IsValid(ID3D10EffectScalarVariable *iface)
2904 TRACE("iface %p\n", iface);
2906 return (struct d3d10_effect_variable *)iface != &null_scalar_variable;
2909 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetType(
2910 ID3D10EffectScalarVariable *iface)
2912 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
2915 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetDesc(ID3D10EffectScalarVariable *iface,
2916 D3D10_EFFECT_VARIABLE_DESC *desc)
2918 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
2921 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetAnnotationByIndex(
2922 ID3D10EffectScalarVariable *iface, UINT index)
2924 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
2927 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetAnnotationByName(
2928 ID3D10EffectScalarVariable *iface, LPCSTR name)
2930 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
2933 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetMemberByIndex(
2934 ID3D10EffectScalarVariable *iface, UINT index)
2936 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
2939 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetMemberByName(
2940 ID3D10EffectScalarVariable *iface, LPCSTR name)
2942 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
2945 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetMemberBySemantic(
2946 ID3D10EffectScalarVariable *iface, LPCSTR semantic)
2948 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
2951 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetElement(
2952 ID3D10EffectScalarVariable *iface, UINT index)
2954 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
2957 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetParentConstantBuffer(
2958 ID3D10EffectScalarVariable *iface)
2960 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
2963 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsScalar(
2964 ID3D10EffectScalarVariable *iface)
2966 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
2969 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsVector(
2970 ID3D10EffectScalarVariable *iface)
2972 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
2975 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsMatrix(
2976 ID3D10EffectScalarVariable *iface)
2978 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
2981 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsString(
2982 ID3D10EffectScalarVariable *iface)
2984 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
2987 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsShaderResource(
2988 ID3D10EffectScalarVariable *iface)
2990 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
2993 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsRenderTargetView(
2994 ID3D10EffectScalarVariable *iface)
2996 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
2999 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsDepthStencilView(
3000 ID3D10EffectScalarVariable *iface)
3002 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
3005 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsConstantBuffer(
3006 ID3D10EffectScalarVariable *iface)
3008 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
3011 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsShader(
3012 ID3D10EffectScalarVariable *iface)
3014 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
3017 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsBlend(
3018 ID3D10EffectScalarVariable *iface)
3020 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
3023 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsDepthStencil(
3024 ID3D10EffectScalarVariable *iface)
3026 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
3029 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsRasterizer(
3030 ID3D10EffectScalarVariable *iface)
3032 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
3035 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsSampler(
3036 ID3D10EffectScalarVariable *iface)
3038 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
3041 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetRawValue(ID3D10EffectScalarVariable *iface,
3042 void *data, UINT offset, UINT count)
3044 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
3047 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetRawValue(ID3D10EffectScalarVariable *iface,
3048 void *data, UINT offset, UINT count)
3050 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
3053 /* ID3D10EffectScalarVariable methods */
3055 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetFloat(ID3D10EffectScalarVariable *iface,
3058 FIXME("iface %p, value %.8e stub!\n", iface, value);
3063 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetFloat(ID3D10EffectScalarVariable *iface,
3066 FIXME("iface %p, value %p stub!\n", iface, value);
3071 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetFloatArray(ID3D10EffectScalarVariable *iface,
3072 float *values, UINT offset, UINT count)
3074 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3079 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetFloatArray(ID3D10EffectScalarVariable *iface,
3080 float *values, UINT offset, UINT count)
3082 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3087 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetInt(ID3D10EffectScalarVariable *iface,
3090 FIXME("iface %p, value %d stub!\n", iface, value);
3095 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetInt(ID3D10EffectScalarVariable *iface,
3098 FIXME("iface %p, value %p stub!\n", iface, value);
3103 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetIntArray(ID3D10EffectScalarVariable *iface,
3104 int *values, UINT offset, UINT count)
3106 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3111 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetIntArray(ID3D10EffectScalarVariable *iface,
3112 int *values, UINT offset, UINT count)
3114 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3119 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetBool(ID3D10EffectScalarVariable *iface,
3122 FIXME("iface %p, value %d stub!\n", iface, value);
3127 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetBool(ID3D10EffectScalarVariable *iface,
3130 FIXME("iface %p, value %p stub!\n", iface, value);
3135 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetBoolArray(ID3D10EffectScalarVariable *iface,
3136 BOOL *values, UINT offset, UINT count)
3138 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3143 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetBoolArray(ID3D10EffectScalarVariable *iface,
3144 BOOL *values, UINT offset, UINT count)
3146 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3151 static const struct ID3D10EffectScalarVariableVtbl d3d10_effect_scalar_variable_vtbl =
3153 /* ID3D10EffectVariable methods */
3154 d3d10_effect_scalar_variable_IsValid,
3155 d3d10_effect_scalar_variable_GetType,
3156 d3d10_effect_scalar_variable_GetDesc,
3157 d3d10_effect_scalar_variable_GetAnnotationByIndex,
3158 d3d10_effect_scalar_variable_GetAnnotationByName,
3159 d3d10_effect_scalar_variable_GetMemberByIndex,
3160 d3d10_effect_scalar_variable_GetMemberByName,
3161 d3d10_effect_scalar_variable_GetMemberBySemantic,
3162 d3d10_effect_scalar_variable_GetElement,
3163 d3d10_effect_scalar_variable_GetParentConstantBuffer,
3164 d3d10_effect_scalar_variable_AsScalar,
3165 d3d10_effect_scalar_variable_AsVector,
3166 d3d10_effect_scalar_variable_AsMatrix,
3167 d3d10_effect_scalar_variable_AsString,
3168 d3d10_effect_scalar_variable_AsShaderResource,
3169 d3d10_effect_scalar_variable_AsRenderTargetView,
3170 d3d10_effect_scalar_variable_AsDepthStencilView,
3171 d3d10_effect_scalar_variable_AsConstantBuffer,
3172 d3d10_effect_scalar_variable_AsShader,
3173 d3d10_effect_scalar_variable_AsBlend,
3174 d3d10_effect_scalar_variable_AsDepthStencil,
3175 d3d10_effect_scalar_variable_AsRasterizer,
3176 d3d10_effect_scalar_variable_AsSampler,
3177 d3d10_effect_scalar_variable_SetRawValue,
3178 d3d10_effect_scalar_variable_GetRawValue,
3179 /* ID3D10EffectScalarVariable methods */
3180 d3d10_effect_scalar_variable_SetFloat,
3181 d3d10_effect_scalar_variable_GetFloat,
3182 d3d10_effect_scalar_variable_SetFloatArray,
3183 d3d10_effect_scalar_variable_GetFloatArray,
3184 d3d10_effect_scalar_variable_SetInt,
3185 d3d10_effect_scalar_variable_GetInt,
3186 d3d10_effect_scalar_variable_SetIntArray,
3187 d3d10_effect_scalar_variable_GetIntArray,
3188 d3d10_effect_scalar_variable_SetBool,
3189 d3d10_effect_scalar_variable_GetBool,
3190 d3d10_effect_scalar_variable_SetBoolArray,
3191 d3d10_effect_scalar_variable_GetBoolArray,
3194 /* ID3D10EffectVariable methods */
3196 static BOOL STDMETHODCALLTYPE d3d10_effect_vector_variable_IsValid(ID3D10EffectVectorVariable *iface)
3198 TRACE("iface %p\n", iface);
3200 return (struct d3d10_effect_variable *)iface != &null_vector_variable;
3203 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetType(
3204 ID3D10EffectVectorVariable *iface)
3206 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
3209 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetDesc(ID3D10EffectVectorVariable *iface,
3210 D3D10_EFFECT_VARIABLE_DESC *desc)
3212 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
3215 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetAnnotationByIndex(
3216 ID3D10EffectVectorVariable *iface, UINT index)
3218 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
3221 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetAnnotationByName(
3222 ID3D10EffectVectorVariable *iface, LPCSTR name)
3224 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
3227 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetMemberByIndex(
3228 ID3D10EffectVectorVariable *iface, UINT index)
3230 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
3233 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetMemberByName(
3234 ID3D10EffectVectorVariable *iface, LPCSTR name)
3236 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
3239 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetMemberBySemantic(
3240 ID3D10EffectVectorVariable *iface, LPCSTR semantic)
3242 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
3245 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetElement(
3246 ID3D10EffectVectorVariable *iface, UINT index)
3248 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
3251 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetParentConstantBuffer(
3252 ID3D10EffectVectorVariable *iface)
3254 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
3257 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsScalar(
3258 ID3D10EffectVectorVariable *iface)
3260 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
3263 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsVector(
3264 ID3D10EffectVectorVariable *iface)
3266 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
3269 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsMatrix(
3270 ID3D10EffectVectorVariable *iface)
3272 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
3275 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsString(
3276 ID3D10EffectVectorVariable *iface)
3278 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
3281 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsShaderResource(
3282 ID3D10EffectVectorVariable *iface)
3284 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
3287 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsRenderTargetView(
3288 ID3D10EffectVectorVariable *iface)
3290 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
3293 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsDepthStencilView(
3294 ID3D10EffectVectorVariable *iface)
3296 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
3299 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsConstantBuffer(
3300 ID3D10EffectVectorVariable *iface)
3302 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
3305 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsShader(
3306 ID3D10EffectVectorVariable *iface)
3308 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
3311 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsBlend(
3312 ID3D10EffectVectorVariable *iface)
3314 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
3317 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsDepthStencil(
3318 ID3D10EffectVectorVariable *iface)
3320 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
3323 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsRasterizer(
3324 ID3D10EffectVectorVariable *iface)
3326 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
3329 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsSampler(
3330 ID3D10EffectVectorVariable *iface)
3332 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
3335 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_SetRawValue(ID3D10EffectVectorVariable *iface,
3336 void *data, UINT offset, UINT count)
3338 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
3341 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetRawValue(ID3D10EffectVectorVariable *iface,
3342 void *data, UINT offset, UINT count)
3344 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
3347 /* ID3D10EffectVectorVariable methods */
3349 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_SetBoolVector(ID3D10EffectVectorVariable *iface,
3352 FIXME("iface %p, value %p stub!\n", iface, value);
3357 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_SetIntVector(ID3D10EffectVectorVariable *iface,
3360 FIXME("iface %p, value %p stub!\n", iface, value);
3365 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_SetFloatVector(ID3D10EffectVectorVariable *iface,
3368 FIXME("iface %p, value %p stub!\n", iface, value);
3373 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetBoolVector(ID3D10EffectVectorVariable *iface,
3376 FIXME("iface %p, value %p stub!\n", iface, value);
3381 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetIntVector(ID3D10EffectVectorVariable *iface,
3384 FIXME("iface %p, value %p stub!\n", iface, value);
3389 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetFloatVector(ID3D10EffectVectorVariable *iface,
3392 FIXME("iface %p, value %p stub!\n", iface, value);
3397 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_SetBoolVectorArray(ID3D10EffectVectorVariable *iface,
3398 BOOL *values, UINT offset, UINT count)
3400 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3405 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_SetIntVectorArray(ID3D10EffectVectorVariable *iface,
3406 int *values, UINT offset, UINT count)
3408 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3413 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_SetFloatVectorArray(ID3D10EffectVectorVariable *iface,
3414 float *values, UINT offset, UINT count)
3416 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3421 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetBoolVectorArray(ID3D10EffectVectorVariable *iface,
3422 BOOL *values, UINT offset, UINT count)
3424 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3429 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetIntVectorArray(ID3D10EffectVectorVariable *iface,
3430 int *values, UINT offset, UINT count)
3432 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3437 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetFloatVectorArray(ID3D10EffectVectorVariable *iface,
3438 float *values, UINT offset, UINT count)
3440 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3445 static const struct ID3D10EffectVectorVariableVtbl d3d10_effect_vector_variable_vtbl =
3447 /* ID3D10EffectVariable methods */
3448 d3d10_effect_vector_variable_IsValid,
3449 d3d10_effect_vector_variable_GetType,
3450 d3d10_effect_vector_variable_GetDesc,
3451 d3d10_effect_vector_variable_GetAnnotationByIndex,
3452 d3d10_effect_vector_variable_GetAnnotationByName,
3453 d3d10_effect_vector_variable_GetMemberByIndex,
3454 d3d10_effect_vector_variable_GetMemberByName,
3455 d3d10_effect_vector_variable_GetMemberBySemantic,
3456 d3d10_effect_vector_variable_GetElement,
3457 d3d10_effect_vector_variable_GetParentConstantBuffer,
3458 d3d10_effect_vector_variable_AsScalar,
3459 d3d10_effect_vector_variable_AsVector,
3460 d3d10_effect_vector_variable_AsMatrix,
3461 d3d10_effect_vector_variable_AsString,
3462 d3d10_effect_vector_variable_AsShaderResource,
3463 d3d10_effect_vector_variable_AsRenderTargetView,
3464 d3d10_effect_vector_variable_AsDepthStencilView,
3465 d3d10_effect_vector_variable_AsConstantBuffer,
3466 d3d10_effect_vector_variable_AsShader,
3467 d3d10_effect_vector_variable_AsBlend,
3468 d3d10_effect_vector_variable_AsDepthStencil,
3469 d3d10_effect_vector_variable_AsRasterizer,
3470 d3d10_effect_vector_variable_AsSampler,
3471 d3d10_effect_vector_variable_SetRawValue,
3472 d3d10_effect_vector_variable_GetRawValue,
3473 /* ID3D10EffectVectorVariable methods */
3474 d3d10_effect_vector_variable_SetBoolVector,
3475 d3d10_effect_vector_variable_SetIntVector,
3476 d3d10_effect_vector_variable_SetFloatVector,
3477 d3d10_effect_vector_variable_GetBoolVector,
3478 d3d10_effect_vector_variable_GetIntVector,
3479 d3d10_effect_vector_variable_GetFloatVector,
3480 d3d10_effect_vector_variable_SetBoolVectorArray,
3481 d3d10_effect_vector_variable_SetIntVectorArray,
3482 d3d10_effect_vector_variable_SetFloatVectorArray,
3483 d3d10_effect_vector_variable_GetBoolVectorArray,
3484 d3d10_effect_vector_variable_GetIntVectorArray,
3485 d3d10_effect_vector_variable_GetFloatVectorArray,
3488 /* ID3D10EffectVariable methods */
3490 static BOOL STDMETHODCALLTYPE d3d10_effect_matrix_variable_IsValid(ID3D10EffectMatrixVariable *iface)
3492 TRACE("iface %p\n", iface);
3494 return (struct d3d10_effect_variable *)iface != &null_matrix_variable;
3497 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetType(
3498 ID3D10EffectMatrixVariable *iface)
3500 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
3503 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetDesc(ID3D10EffectMatrixVariable *iface,
3504 D3D10_EFFECT_VARIABLE_DESC *desc)
3506 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
3509 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetAnnotationByIndex(
3510 ID3D10EffectMatrixVariable *iface, UINT index)
3512 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
3515 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetAnnotationByName(
3516 ID3D10EffectMatrixVariable *iface, LPCSTR name)
3518 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
3521 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetMemberByIndex(
3522 ID3D10EffectMatrixVariable *iface, UINT index)
3524 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
3527 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetMemberByName(
3528 ID3D10EffectMatrixVariable *iface, LPCSTR name)
3530 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
3533 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetMemberBySemantic(
3534 ID3D10EffectMatrixVariable *iface, LPCSTR semantic)
3536 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
3539 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetElement(
3540 ID3D10EffectMatrixVariable *iface, UINT index)
3542 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
3545 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetParentConstantBuffer(
3546 ID3D10EffectMatrixVariable *iface)
3548 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
3551 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsScalar(
3552 ID3D10EffectMatrixVariable *iface)
3554 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
3557 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsVector(
3558 ID3D10EffectMatrixVariable *iface)
3560 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
3563 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsMatrix(
3564 ID3D10EffectMatrixVariable *iface)
3566 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
3569 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsString(
3570 ID3D10EffectMatrixVariable *iface)
3572 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
3575 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsShaderResource(
3576 ID3D10EffectMatrixVariable *iface)
3578 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
3581 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsRenderTargetView(
3582 ID3D10EffectMatrixVariable *iface)
3584 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
3587 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsDepthStencilView(
3588 ID3D10EffectMatrixVariable *iface)
3590 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
3593 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsConstantBuffer(
3594 ID3D10EffectMatrixVariable *iface)
3596 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
3599 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsShader(
3600 ID3D10EffectMatrixVariable *iface)
3602 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
3605 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsBlend(
3606 ID3D10EffectMatrixVariable *iface)
3608 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
3611 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsDepthStencil(
3612 ID3D10EffectMatrixVariable *iface)
3614 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
3617 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsRasterizer(
3618 ID3D10EffectMatrixVariable *iface)
3620 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
3623 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsSampler(
3624 ID3D10EffectMatrixVariable *iface)
3626 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
3629 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_SetRawValue(ID3D10EffectMatrixVariable *iface,
3630 void *data, UINT offset, UINT count)
3632 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
3635 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetRawValue(ID3D10EffectMatrixVariable *iface,
3636 void *data, UINT offset, UINT count)
3638 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
3641 /* ID3D10EffectMatrixVariable methods */
3643 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_SetMatrix(ID3D10EffectMatrixVariable *iface,
3646 FIXME("iface %p, data %p stub!\n", iface, data);
3651 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetMatrix(ID3D10EffectMatrixVariable *iface,
3654 FIXME("iface %p, data %p stub!\n", iface, data);
3659 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_SetMatrixArray(ID3D10EffectMatrixVariable *iface,
3660 float *data, UINT offset, UINT count)
3662 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface, data, offset, count);
3667 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetMatrixArray(ID3D10EffectMatrixVariable *iface,
3668 float *data, UINT offset, UINT count)
3670 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface, data, offset, count);
3675 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_SetMatrixTranspose(ID3D10EffectMatrixVariable *iface,
3678 FIXME("iface %p, data %p stub!\n", iface, data);
3683 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetMatrixTranspose(ID3D10EffectMatrixVariable *iface,
3686 FIXME("iface %p, data %p stub!\n", iface, data);
3691 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_SetMatrixTransposeArray(ID3D10EffectMatrixVariable *iface,
3692 float *data, UINT offset, UINT count)
3694 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface, data, offset, count);
3699 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetMatrixTransposeArray(ID3D10EffectMatrixVariable *iface,
3700 float *data, UINT offset, UINT count)
3702 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface, data, offset, count);
3708 static const struct ID3D10EffectMatrixVariableVtbl d3d10_effect_matrix_variable_vtbl =
3710 /* ID3D10EffectVariable methods */
3711 d3d10_effect_matrix_variable_IsValid,
3712 d3d10_effect_matrix_variable_GetType,
3713 d3d10_effect_matrix_variable_GetDesc,
3714 d3d10_effect_matrix_variable_GetAnnotationByIndex,
3715 d3d10_effect_matrix_variable_GetAnnotationByName,
3716 d3d10_effect_matrix_variable_GetMemberByIndex,
3717 d3d10_effect_matrix_variable_GetMemberByName,
3718 d3d10_effect_matrix_variable_GetMemberBySemantic,
3719 d3d10_effect_matrix_variable_GetElement,
3720 d3d10_effect_matrix_variable_GetParentConstantBuffer,
3721 d3d10_effect_matrix_variable_AsScalar,
3722 d3d10_effect_matrix_variable_AsVector,
3723 d3d10_effect_matrix_variable_AsMatrix,
3724 d3d10_effect_matrix_variable_AsString,
3725 d3d10_effect_matrix_variable_AsShaderResource,
3726 d3d10_effect_matrix_variable_AsRenderTargetView,
3727 d3d10_effect_matrix_variable_AsDepthStencilView,
3728 d3d10_effect_matrix_variable_AsConstantBuffer,
3729 d3d10_effect_matrix_variable_AsShader,
3730 d3d10_effect_matrix_variable_AsBlend,
3731 d3d10_effect_matrix_variable_AsDepthStencil,
3732 d3d10_effect_matrix_variable_AsRasterizer,
3733 d3d10_effect_matrix_variable_AsSampler,
3734 d3d10_effect_matrix_variable_SetRawValue,
3735 d3d10_effect_matrix_variable_GetRawValue,
3736 /* ID3D10EffectMatrixVariable methods */
3737 d3d10_effect_matrix_variable_SetMatrix,
3738 d3d10_effect_matrix_variable_GetMatrix,
3739 d3d10_effect_matrix_variable_SetMatrixArray,
3740 d3d10_effect_matrix_variable_GetMatrixArray,
3741 d3d10_effect_matrix_variable_SetMatrixTranspose,
3742 d3d10_effect_matrix_variable_GetMatrixTranspose,
3743 d3d10_effect_matrix_variable_SetMatrixTransposeArray,
3744 d3d10_effect_matrix_variable_GetMatrixTransposeArray,
3747 /* ID3D10EffectVariable methods */
3749 static BOOL STDMETHODCALLTYPE d3d10_effect_string_variable_IsValid(ID3D10EffectStringVariable *iface)
3751 TRACE("iface %p\n", iface);
3753 return (struct d3d10_effect_variable *)iface != &null_string_variable;
3756 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_string_variable_GetType(
3757 ID3D10EffectStringVariable *iface)
3759 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
3762 static HRESULT STDMETHODCALLTYPE d3d10_effect_string_variable_GetDesc(ID3D10EffectStringVariable *iface,
3763 D3D10_EFFECT_VARIABLE_DESC *desc)
3765 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
3768 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_GetAnnotationByIndex(
3769 ID3D10EffectStringVariable *iface, UINT index)
3771 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
3774 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_GetAnnotationByName(
3775 ID3D10EffectStringVariable *iface, LPCSTR name)
3777 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
3780 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_GetMemberByIndex(
3781 ID3D10EffectStringVariable *iface, UINT index)
3783 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
3786 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_GetMemberByName(
3787 ID3D10EffectStringVariable *iface, LPCSTR name)
3789 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
3792 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_GetMemberBySemantic(
3793 ID3D10EffectStringVariable *iface, LPCSTR semantic)
3795 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
3798 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_GetElement(
3799 ID3D10EffectStringVariable *iface, UINT index)
3801 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
3804 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_string_variable_GetParentConstantBuffer(
3805 ID3D10EffectStringVariable *iface)
3807 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
3810 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsScalar(
3811 ID3D10EffectStringVariable *iface)
3813 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
3816 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsVector(
3817 ID3D10EffectStringVariable *iface)
3819 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
3822 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsMatrix(
3823 ID3D10EffectStringVariable *iface)
3825 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
3828 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsString(
3829 ID3D10EffectStringVariable *iface)
3831 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
3834 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsShaderResource(
3835 ID3D10EffectStringVariable *iface)
3837 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
3840 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsRenderTargetView(
3841 ID3D10EffectStringVariable *iface)
3843 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
3846 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsDepthStencilView(
3847 ID3D10EffectStringVariable *iface)
3849 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
3852 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_string_variable_AsConstantBuffer(
3853 ID3D10EffectStringVariable *iface)
3855 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
3858 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsShader(
3859 ID3D10EffectStringVariable *iface)
3861 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
3864 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsBlend(
3865 ID3D10EffectStringVariable *iface)
3867 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
3870 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsDepthStencil(
3871 ID3D10EffectStringVariable *iface)
3873 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
3876 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsRasterizer(
3877 ID3D10EffectStringVariable *iface)
3879 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
3882 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsSampler(
3883 ID3D10EffectStringVariable *iface)
3885 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
3888 static HRESULT STDMETHODCALLTYPE d3d10_effect_string_variable_SetRawValue(ID3D10EffectStringVariable *iface,
3889 void *data, UINT offset, UINT count)
3891 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
3894 static HRESULT STDMETHODCALLTYPE d3d10_effect_string_variable_GetRawValue(ID3D10EffectStringVariable *iface,
3895 void *data, UINT offset, UINT count)
3897 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
3900 /* ID3D10EffectStringVariable methods */
3902 static HRESULT STDMETHODCALLTYPE d3d10_effect_string_variable_GetString(ID3D10EffectStringVariable *iface,
3905 FIXME("iface %p, str %p stub!\n", iface, str);
3910 static HRESULT STDMETHODCALLTYPE d3d10_effect_string_variable_GetStringArray(ID3D10EffectStringVariable *iface,
3911 LPCSTR *strs, UINT offset, UINT count)
3913 FIXME("iface %p, strs %p, offset %u, count %u stub!\n", iface, strs, offset, count);
3919 static const struct ID3D10EffectStringVariableVtbl d3d10_effect_string_variable_vtbl =
3921 /* ID3D10EffectVariable methods */
3922 d3d10_effect_string_variable_IsValid,
3923 d3d10_effect_string_variable_GetType,
3924 d3d10_effect_string_variable_GetDesc,
3925 d3d10_effect_string_variable_GetAnnotationByIndex,
3926 d3d10_effect_string_variable_GetAnnotationByName,
3927 d3d10_effect_string_variable_GetMemberByIndex,
3928 d3d10_effect_string_variable_GetMemberByName,
3929 d3d10_effect_string_variable_GetMemberBySemantic,
3930 d3d10_effect_string_variable_GetElement,
3931 d3d10_effect_string_variable_GetParentConstantBuffer,
3932 d3d10_effect_string_variable_AsScalar,
3933 d3d10_effect_string_variable_AsVector,
3934 d3d10_effect_string_variable_AsMatrix,
3935 d3d10_effect_string_variable_AsString,
3936 d3d10_effect_string_variable_AsShaderResource,
3937 d3d10_effect_string_variable_AsRenderTargetView,
3938 d3d10_effect_string_variable_AsDepthStencilView,
3939 d3d10_effect_string_variable_AsConstantBuffer,
3940 d3d10_effect_string_variable_AsShader,
3941 d3d10_effect_string_variable_AsBlend,
3942 d3d10_effect_string_variable_AsDepthStencil,
3943 d3d10_effect_string_variable_AsRasterizer,
3944 d3d10_effect_string_variable_AsSampler,
3945 d3d10_effect_string_variable_SetRawValue,
3946 d3d10_effect_string_variable_GetRawValue,
3947 /* ID3D10EffectStringVariable methods */
3948 d3d10_effect_string_variable_GetString,
3949 d3d10_effect_string_variable_GetStringArray,
3952 /* ID3D10EffectVariable methods */
3954 static BOOL STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_IsValid(ID3D10EffectShaderResourceVariable *iface)
3956 TRACE("iface %p\n", iface);
3958 return (struct d3d10_effect_variable *)iface != &null_shader_resource_variable;
3961 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetType(
3962 ID3D10EffectShaderResourceVariable *iface)
3964 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
3967 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetDesc(
3968 ID3D10EffectShaderResourceVariable *iface, D3D10_EFFECT_VARIABLE_DESC *desc)
3970 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
3973 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetAnnotationByIndex(
3974 ID3D10EffectShaderResourceVariable *iface, UINT index)
3976 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
3979 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetAnnotationByName(
3980 ID3D10EffectShaderResourceVariable *iface, LPCSTR name)
3982 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
3985 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetMemberByIndex(
3986 ID3D10EffectShaderResourceVariable *iface, UINT index)
3988 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
3991 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetMemberByName(
3992 ID3D10EffectShaderResourceVariable *iface, LPCSTR name)
3994 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
3997 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetMemberBySemantic(
3998 ID3D10EffectShaderResourceVariable *iface, LPCSTR semantic)
4000 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
4003 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetElement(
4004 ID3D10EffectShaderResourceVariable *iface, UINT index)
4006 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
4009 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetParentConstantBuffer(
4010 ID3D10EffectShaderResourceVariable *iface)
4012 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
4015 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsScalar(
4016 ID3D10EffectShaderResourceVariable *iface)
4018 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
4021 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsVector(
4022 ID3D10EffectShaderResourceVariable *iface)
4024 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
4027 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsMatrix(
4028 ID3D10EffectShaderResourceVariable *iface)
4030 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
4033 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsString(
4034 ID3D10EffectShaderResourceVariable *iface)
4036 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
4039 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsShaderResource(
4040 ID3D10EffectShaderResourceVariable *iface)
4042 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
4045 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsRenderTargetView(
4046 ID3D10EffectShaderResourceVariable *iface)
4048 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
4051 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsDepthStencilView(
4052 ID3D10EffectShaderResourceVariable *iface)
4054 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
4057 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsConstantBuffer(
4058 ID3D10EffectShaderResourceVariable *iface)
4060 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
4063 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsShader(
4064 ID3D10EffectShaderResourceVariable *iface)
4066 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
4069 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsBlend(
4070 ID3D10EffectShaderResourceVariable *iface)
4072 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
4075 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsDepthStencil(
4076 ID3D10EffectShaderResourceVariable *iface)
4078 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
4081 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsRasterizer(
4082 ID3D10EffectShaderResourceVariable *iface)
4084 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
4087 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsSampler(
4088 ID3D10EffectShaderResourceVariable *iface)
4090 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
4093 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_SetRawValue(
4094 ID3D10EffectShaderResourceVariable *iface, void *data, UINT offset, UINT count)
4096 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4099 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetRawValue(
4100 ID3D10EffectShaderResourceVariable *iface, void *data, UINT offset, UINT count)
4102 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4105 /* ID3D10EffectShaderResourceVariable methods */
4107 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_SetResource(
4108 ID3D10EffectShaderResourceVariable *iface, ID3D10ShaderResourceView *resource)
4110 FIXME("iface %p, resource %p stub!\n", iface, resource);
4115 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetResource(
4116 ID3D10EffectShaderResourceVariable *iface, ID3D10ShaderResourceView **resource)
4118 FIXME("iface %p, resource %p stub!\n", iface, resource);
4123 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_SetResourceArray(
4124 ID3D10EffectShaderResourceVariable *iface, ID3D10ShaderResourceView **resources, UINT offset, UINT count)
4126 FIXME("iface %p, resources %p, offset %u, count %u stub!\n", iface, resources, offset, count);
4131 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetResourceArray(
4132 ID3D10EffectShaderResourceVariable *iface, ID3D10ShaderResourceView **resources, UINT offset, UINT count)
4134 FIXME("iface %p, resources %p, offset %u, count %u stub!\n", iface, resources, offset, count);
4140 static const struct ID3D10EffectShaderResourceVariableVtbl d3d10_effect_shader_resource_variable_vtbl =
4142 /* ID3D10EffectVariable methods */
4143 d3d10_effect_shader_resource_variable_IsValid,
4144 d3d10_effect_shader_resource_variable_GetType,
4145 d3d10_effect_shader_resource_variable_GetDesc,
4146 d3d10_effect_shader_resource_variable_GetAnnotationByIndex,
4147 d3d10_effect_shader_resource_variable_GetAnnotationByName,
4148 d3d10_effect_shader_resource_variable_GetMemberByIndex,
4149 d3d10_effect_shader_resource_variable_GetMemberByName,
4150 d3d10_effect_shader_resource_variable_GetMemberBySemantic,
4151 d3d10_effect_shader_resource_variable_GetElement,
4152 d3d10_effect_shader_resource_variable_GetParentConstantBuffer,
4153 d3d10_effect_shader_resource_variable_AsScalar,
4154 d3d10_effect_shader_resource_variable_AsVector,
4155 d3d10_effect_shader_resource_variable_AsMatrix,
4156 d3d10_effect_shader_resource_variable_AsString,
4157 d3d10_effect_shader_resource_variable_AsShaderResource,
4158 d3d10_effect_shader_resource_variable_AsRenderTargetView,
4159 d3d10_effect_shader_resource_variable_AsDepthStencilView,
4160 d3d10_effect_shader_resource_variable_AsConstantBuffer,
4161 d3d10_effect_shader_resource_variable_AsShader,
4162 d3d10_effect_shader_resource_variable_AsBlend,
4163 d3d10_effect_shader_resource_variable_AsDepthStencil,
4164 d3d10_effect_shader_resource_variable_AsRasterizer,
4165 d3d10_effect_shader_resource_variable_AsSampler,
4166 d3d10_effect_shader_resource_variable_SetRawValue,
4167 d3d10_effect_shader_resource_variable_GetRawValue,
4168 /* ID3D10EffectShaderResourceVariable methods */
4169 d3d10_effect_shader_resource_variable_SetResource,
4170 d3d10_effect_shader_resource_variable_GetResource,
4171 d3d10_effect_shader_resource_variable_SetResourceArray,
4172 d3d10_effect_shader_resource_variable_GetResourceArray,
4175 /* ID3D10EffectVariable methods */
4177 static BOOL STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_IsValid(
4178 ID3D10EffectRenderTargetViewVariable *iface)
4180 TRACE("iface %p\n", iface);
4182 return (struct d3d10_effect_variable *)iface != &null_render_target_view_variable;
4185 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetType(
4186 ID3D10EffectRenderTargetViewVariable *iface)
4188 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
4191 static HRESULT STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetDesc(
4192 ID3D10EffectRenderTargetViewVariable *iface, D3D10_EFFECT_VARIABLE_DESC *desc)
4194 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
4197 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetAnnotationByIndex(
4198 ID3D10EffectRenderTargetViewVariable *iface, UINT index)
4200 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
4203 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetAnnotationByName(
4204 ID3D10EffectRenderTargetViewVariable *iface, LPCSTR name)
4206 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
4209 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetMemberByIndex(
4210 ID3D10EffectRenderTargetViewVariable *iface, UINT index)
4212 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
4215 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetMemberByName(
4216 ID3D10EffectRenderTargetViewVariable *iface, LPCSTR name)
4218 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
4221 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetMemberBySemantic(
4222 ID3D10EffectRenderTargetViewVariable *iface, LPCSTR semantic)
4224 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
4227 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetElement(
4228 ID3D10EffectRenderTargetViewVariable *iface, UINT index)
4230 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
4233 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetParentConstantBuffer(
4234 ID3D10EffectRenderTargetViewVariable *iface)
4236 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
4239 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsScalar(
4240 ID3D10EffectRenderTargetViewVariable *iface)
4242 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
4245 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsVector(
4246 ID3D10EffectRenderTargetViewVariable *iface)
4248 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
4251 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsMatrix(
4252 ID3D10EffectRenderTargetViewVariable *iface)
4254 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
4257 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsString(
4258 ID3D10EffectRenderTargetViewVariable *iface)
4260 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
4263 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsShaderResource(
4264 ID3D10EffectRenderTargetViewVariable *iface)
4266 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
4269 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsRenderTargetView(
4270 ID3D10EffectRenderTargetViewVariable *iface)
4272 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
4275 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsDepthStencilView(
4276 ID3D10EffectRenderTargetViewVariable *iface)
4278 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
4281 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsConstantBuffer(
4282 ID3D10EffectRenderTargetViewVariable *iface)
4284 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
4287 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsShader(
4288 ID3D10EffectRenderTargetViewVariable *iface)
4290 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
4293 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsBlend(
4294 ID3D10EffectRenderTargetViewVariable *iface)
4296 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
4299 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsDepthStencil(
4300 ID3D10EffectRenderTargetViewVariable *iface)
4302 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
4305 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsRasterizer(
4306 ID3D10EffectRenderTargetViewVariable *iface)
4308 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
4311 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsSampler(
4312 ID3D10EffectRenderTargetViewVariable *iface)
4314 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
4317 static HRESULT STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_SetRawValue(
4318 ID3D10EffectRenderTargetViewVariable *iface, void *data, UINT offset, UINT count)
4320 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4323 static HRESULT STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetRawValue(
4324 ID3D10EffectRenderTargetViewVariable *iface, void *data, UINT offset, UINT count)
4326 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4329 /* ID3D10EffectRenderTargetViewVariable methods */
4331 static HRESULT STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_SetRenderTarget(
4332 ID3D10EffectRenderTargetViewVariable *iface, ID3D10RenderTargetView *view)
4334 FIXME("iface %p, view %p stub!\n", iface, view);
4339 static HRESULT STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetRenderTarget(
4340 ID3D10EffectRenderTargetViewVariable *iface, ID3D10RenderTargetView **view)
4342 FIXME("iface %p, view %p stub!\n", iface, view);
4347 static HRESULT STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_SetRenderTargetArray(
4348 ID3D10EffectRenderTargetViewVariable *iface, ID3D10RenderTargetView **views, UINT offset, UINT count)
4350 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface, views, offset, count);
4355 static HRESULT STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetRenderTargetArray(
4356 ID3D10EffectRenderTargetViewVariable *iface, ID3D10RenderTargetView **views, UINT offset, UINT count)
4358 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface, views, offset, count);
4364 static const struct ID3D10EffectRenderTargetViewVariableVtbl d3d10_effect_render_target_view_variable_vtbl =
4366 /* ID3D10EffectVariable methods */
4367 d3d10_effect_render_target_view_variable_IsValid,
4368 d3d10_effect_render_target_view_variable_GetType,
4369 d3d10_effect_render_target_view_variable_GetDesc,
4370 d3d10_effect_render_target_view_variable_GetAnnotationByIndex,
4371 d3d10_effect_render_target_view_variable_GetAnnotationByName,
4372 d3d10_effect_render_target_view_variable_GetMemberByIndex,
4373 d3d10_effect_render_target_view_variable_GetMemberByName,
4374 d3d10_effect_render_target_view_variable_GetMemberBySemantic,
4375 d3d10_effect_render_target_view_variable_GetElement,
4376 d3d10_effect_render_target_view_variable_GetParentConstantBuffer,
4377 d3d10_effect_render_target_view_variable_AsScalar,
4378 d3d10_effect_render_target_view_variable_AsVector,
4379 d3d10_effect_render_target_view_variable_AsMatrix,
4380 d3d10_effect_render_target_view_variable_AsString,
4381 d3d10_effect_render_target_view_variable_AsShaderResource,
4382 d3d10_effect_render_target_view_variable_AsRenderTargetView,
4383 d3d10_effect_render_target_view_variable_AsDepthStencilView,
4384 d3d10_effect_render_target_view_variable_AsConstantBuffer,
4385 d3d10_effect_render_target_view_variable_AsShader,
4386 d3d10_effect_render_target_view_variable_AsBlend,
4387 d3d10_effect_render_target_view_variable_AsDepthStencil,
4388 d3d10_effect_render_target_view_variable_AsRasterizer,
4389 d3d10_effect_render_target_view_variable_AsSampler,
4390 d3d10_effect_render_target_view_variable_SetRawValue,
4391 d3d10_effect_render_target_view_variable_GetRawValue,
4392 /* ID3D10EffectRenderTargetViewVariable methods */
4393 d3d10_effect_render_target_view_variable_SetRenderTarget,
4394 d3d10_effect_render_target_view_variable_GetRenderTarget,
4395 d3d10_effect_render_target_view_variable_SetRenderTargetArray,
4396 d3d10_effect_render_target_view_variable_GetRenderTargetArray,
4399 /* ID3D10EffectVariable methods */
4401 static BOOL STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_IsValid(
4402 ID3D10EffectDepthStencilViewVariable *iface)
4404 TRACE("iface %p\n", iface);
4406 return (struct d3d10_effect_variable *)iface != &null_depth_stencil_view_variable;
4409 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetType(
4410 ID3D10EffectDepthStencilViewVariable *iface)
4412 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
4415 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetDesc(
4416 ID3D10EffectDepthStencilViewVariable *iface, D3D10_EFFECT_VARIABLE_DESC *desc)
4418 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
4421 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetAnnotationByIndex(
4422 ID3D10EffectDepthStencilViewVariable *iface, UINT index)
4424 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
4427 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetAnnotationByName(
4428 ID3D10EffectDepthStencilViewVariable *iface, LPCSTR name)
4430 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
4433 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetMemberByIndex(
4434 ID3D10EffectDepthStencilViewVariable *iface, UINT index)
4436 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
4439 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetMemberByName(
4440 ID3D10EffectDepthStencilViewVariable *iface, LPCSTR name)
4442 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
4445 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetMemberBySemantic(
4446 ID3D10EffectDepthStencilViewVariable *iface, LPCSTR semantic)
4448 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
4451 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetElement(
4452 ID3D10EffectDepthStencilViewVariable *iface, UINT index)
4454 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
4457 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetParentConstantBuffer(
4458 ID3D10EffectDepthStencilViewVariable *iface)
4460 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
4463 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsScalar(
4464 ID3D10EffectDepthStencilViewVariable *iface)
4466 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
4469 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsVector(
4470 ID3D10EffectDepthStencilViewVariable *iface)
4472 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
4475 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsMatrix(
4476 ID3D10EffectDepthStencilViewVariable *iface)
4478 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
4481 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsString(
4482 ID3D10EffectDepthStencilViewVariable *iface)
4484 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
4487 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsShaderResource(
4488 ID3D10EffectDepthStencilViewVariable *iface)
4490 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
4493 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsRenderTargetView(
4494 ID3D10EffectDepthStencilViewVariable *iface)
4496 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
4499 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsDepthStencilView(
4500 ID3D10EffectDepthStencilViewVariable *iface)
4502 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
4505 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsConstantBuffer(
4506 ID3D10EffectDepthStencilViewVariable *iface)
4508 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
4511 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsShader(
4512 ID3D10EffectDepthStencilViewVariable *iface)
4514 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
4517 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsBlend(
4518 ID3D10EffectDepthStencilViewVariable *iface)
4520 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
4523 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsDepthStencil(
4524 ID3D10EffectDepthStencilViewVariable *iface)
4526 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
4529 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsRasterizer(
4530 ID3D10EffectDepthStencilViewVariable *iface)
4532 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
4535 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsSampler(
4536 ID3D10EffectDepthStencilViewVariable *iface)
4538 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
4541 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_SetRawValue(
4542 ID3D10EffectDepthStencilViewVariable *iface, void *data, UINT offset, UINT count)
4544 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4547 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetRawValue(
4548 ID3D10EffectDepthStencilViewVariable *iface, void *data, UINT offset, UINT count)
4550 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4553 /* ID3D10EffectDepthStencilViewVariable methods */
4555 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_SetDepthStencil(
4556 ID3D10EffectDepthStencilViewVariable *iface, ID3D10DepthStencilView *view)
4558 FIXME("iface %p, view %p stub!\n", iface, view);
4563 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetDepthStencil(
4564 ID3D10EffectDepthStencilViewVariable *iface, ID3D10DepthStencilView **view)
4566 FIXME("iface %p, view %p stub!\n", iface, view);
4571 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_SetDepthStencilArray(
4572 ID3D10EffectDepthStencilViewVariable *iface, ID3D10DepthStencilView **views, UINT offset, UINT count)
4574 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface, views, offset, count);
4579 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetDepthStencilArray(
4580 ID3D10EffectDepthStencilViewVariable *iface, ID3D10DepthStencilView **views, UINT offset, UINT count)
4582 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface, views, offset, count);
4588 static const struct ID3D10EffectDepthStencilViewVariableVtbl d3d10_effect_depth_stencil_view_variable_vtbl =
4590 /* ID3D10EffectVariable methods */
4591 d3d10_effect_depth_stencil_view_variable_IsValid,
4592 d3d10_effect_depth_stencil_view_variable_GetType,
4593 d3d10_effect_depth_stencil_view_variable_GetDesc,
4594 d3d10_effect_depth_stencil_view_variable_GetAnnotationByIndex,
4595 d3d10_effect_depth_stencil_view_variable_GetAnnotationByName,
4596 d3d10_effect_depth_stencil_view_variable_GetMemberByIndex,
4597 d3d10_effect_depth_stencil_view_variable_GetMemberByName,
4598 d3d10_effect_depth_stencil_view_variable_GetMemberBySemantic,
4599 d3d10_effect_depth_stencil_view_variable_GetElement,
4600 d3d10_effect_depth_stencil_view_variable_GetParentConstantBuffer,
4601 d3d10_effect_depth_stencil_view_variable_AsScalar,
4602 d3d10_effect_depth_stencil_view_variable_AsVector,
4603 d3d10_effect_depth_stencil_view_variable_AsMatrix,
4604 d3d10_effect_depth_stencil_view_variable_AsString,
4605 d3d10_effect_depth_stencil_view_variable_AsShaderResource,
4606 d3d10_effect_depth_stencil_view_variable_AsRenderTargetView,
4607 d3d10_effect_depth_stencil_view_variable_AsDepthStencilView,
4608 d3d10_effect_depth_stencil_view_variable_AsConstantBuffer,
4609 d3d10_effect_depth_stencil_view_variable_AsShader,
4610 d3d10_effect_depth_stencil_view_variable_AsBlend,
4611 d3d10_effect_depth_stencil_view_variable_AsDepthStencil,
4612 d3d10_effect_depth_stencil_view_variable_AsRasterizer,
4613 d3d10_effect_depth_stencil_view_variable_AsSampler,
4614 d3d10_effect_depth_stencil_view_variable_SetRawValue,
4615 d3d10_effect_depth_stencil_view_variable_GetRawValue,
4616 /* ID3D10EffectDepthStencilViewVariable methods */
4617 d3d10_effect_depth_stencil_view_variable_SetDepthStencil,
4618 d3d10_effect_depth_stencil_view_variable_GetDepthStencil,
4619 d3d10_effect_depth_stencil_view_variable_SetDepthStencilArray,
4620 d3d10_effect_depth_stencil_view_variable_GetDepthStencilArray,
4623 /* ID3D10EffectVariable methods */
4625 static BOOL STDMETHODCALLTYPE d3d10_effect_shader_variable_IsValid(ID3D10EffectShaderVariable *iface)
4627 TRACE("iface %p\n", iface);
4629 return (struct d3d10_effect_variable *)iface != &null_shader_variable;
4632 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetType(
4633 ID3D10EffectShaderVariable *iface)
4635 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
4638 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetDesc(ID3D10EffectShaderVariable *iface,
4639 D3D10_EFFECT_VARIABLE_DESC *desc)
4641 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
4644 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetAnnotationByIndex(
4645 ID3D10EffectShaderVariable *iface, UINT index)
4647 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
4650 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetAnnotationByName(
4651 ID3D10EffectShaderVariable *iface, LPCSTR name)
4653 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
4656 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetMemberByIndex(
4657 ID3D10EffectShaderVariable *iface, UINT index)
4659 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
4662 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetMemberByName(
4663 ID3D10EffectShaderVariable *iface, LPCSTR name)
4665 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
4668 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetMemberBySemantic(
4669 ID3D10EffectShaderVariable *iface, LPCSTR semantic)
4671 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
4674 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetElement(
4675 ID3D10EffectShaderVariable *iface, UINT index)
4677 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
4680 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetParentConstantBuffer(
4681 ID3D10EffectShaderVariable *iface)
4683 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
4686 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsScalar(
4687 ID3D10EffectShaderVariable *iface)
4689 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
4692 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsVector(
4693 ID3D10EffectShaderVariable *iface)
4695 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
4698 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsMatrix(
4699 ID3D10EffectShaderVariable *iface)
4701 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
4704 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsString(
4705 ID3D10EffectShaderVariable *iface)
4707 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
4710 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsShaderResource(
4711 ID3D10EffectShaderVariable *iface)
4713 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
4716 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsRenderTargetView(
4717 ID3D10EffectShaderVariable *iface)
4719 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
4722 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsDepthStencilView(
4723 ID3D10EffectShaderVariable *iface)
4725 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
4728 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsConstantBuffer(
4729 ID3D10EffectShaderVariable *iface)
4731 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
4734 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsShader(
4735 ID3D10EffectShaderVariable *iface)
4737 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
4740 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsBlend(
4741 ID3D10EffectShaderVariable *iface)
4743 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
4746 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsDepthStencil(
4747 ID3D10EffectShaderVariable *iface)
4749 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
4752 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsRasterizer(
4753 ID3D10EffectShaderVariable *iface)
4755 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
4758 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsSampler(
4759 ID3D10EffectShaderVariable *iface)
4761 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
4764 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_SetRawValue(
4765 ID3D10EffectShaderVariable *iface, void *data, UINT offset, UINT count)
4767 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4770 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetRawValue(
4771 ID3D10EffectShaderVariable *iface, void *data, UINT offset, UINT count)
4773 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4776 /* ID3D10EffectShaderVariable methods */
4778 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetShaderDesc(
4779 ID3D10EffectShaderVariable *iface, UINT index, D3D10_EFFECT_SHADER_DESC *desc)
4781 FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc);
4786 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetVertexShader(
4787 ID3D10EffectShaderVariable *iface, UINT index, ID3D10VertexShader **shader)
4789 FIXME("iface %p, index %u, shader %p stub!\n", iface, index, shader);
4794 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetGeometryShader(
4795 ID3D10EffectShaderVariable *iface, UINT index, ID3D10GeometryShader **shader)
4797 FIXME("iface %p, index %u, shader %p stub!\n", iface, index, shader);
4802 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetPixelShader(
4803 ID3D10EffectShaderVariable *iface, UINT index, ID3D10PixelShader **shader)
4805 FIXME("iface %p, index %u, shader %p stub!\n", iface, index, shader);
4810 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetInputSignatureElementDesc(
4811 ID3D10EffectShaderVariable *iface, UINT shader_index, UINT element_index,
4812 D3D10_SIGNATURE_PARAMETER_DESC *desc)
4814 FIXME("iface %p, shader_index %u, element_index %u, desc %p stub!\n",
4815 iface, shader_index, element_index, desc);
4820 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetOutputSignatureElementDesc(
4821 ID3D10EffectShaderVariable *iface, UINT shader_index, UINT element_index,
4822 D3D10_SIGNATURE_PARAMETER_DESC *desc)
4824 FIXME("iface %p, shader_index %u, element_index %u, desc %p stub!\n",
4825 iface, shader_index, element_index, desc);
4831 static const struct ID3D10EffectShaderVariableVtbl d3d10_effect_shader_variable_vtbl =
4833 /* ID3D10EffectVariable methods */
4834 d3d10_effect_shader_variable_IsValid,
4835 d3d10_effect_shader_variable_GetType,
4836 d3d10_effect_shader_variable_GetDesc,
4837 d3d10_effect_shader_variable_GetAnnotationByIndex,
4838 d3d10_effect_shader_variable_GetAnnotationByName,
4839 d3d10_effect_shader_variable_GetMemberByIndex,
4840 d3d10_effect_shader_variable_GetMemberByName,
4841 d3d10_effect_shader_variable_GetMemberBySemantic,
4842 d3d10_effect_shader_variable_GetElement,
4843 d3d10_effect_shader_variable_GetParentConstantBuffer,
4844 d3d10_effect_shader_variable_AsScalar,
4845 d3d10_effect_shader_variable_AsVector,
4846 d3d10_effect_shader_variable_AsMatrix,
4847 d3d10_effect_shader_variable_AsString,
4848 d3d10_effect_shader_variable_AsShaderResource,
4849 d3d10_effect_shader_variable_AsRenderTargetView,
4850 d3d10_effect_shader_variable_AsDepthStencilView,
4851 d3d10_effect_shader_variable_AsConstantBuffer,
4852 d3d10_effect_shader_variable_AsShader,
4853 d3d10_effect_shader_variable_AsBlend,
4854 d3d10_effect_shader_variable_AsDepthStencil,
4855 d3d10_effect_shader_variable_AsRasterizer,
4856 d3d10_effect_shader_variable_AsSampler,
4857 d3d10_effect_shader_variable_SetRawValue,
4858 d3d10_effect_shader_variable_GetRawValue,
4859 /* ID3D10EffectShaderVariable methods */
4860 d3d10_effect_shader_variable_GetShaderDesc,
4861 d3d10_effect_shader_variable_GetVertexShader,
4862 d3d10_effect_shader_variable_GetGeometryShader,
4863 d3d10_effect_shader_variable_GetPixelShader,
4864 d3d10_effect_shader_variable_GetInputSignatureElementDesc,
4865 d3d10_effect_shader_variable_GetOutputSignatureElementDesc,
4868 /* ID3D10EffectVariable methods */
4870 static BOOL STDMETHODCALLTYPE d3d10_effect_blend_variable_IsValid(ID3D10EffectBlendVariable *iface)
4872 TRACE("iface %p\n", iface);
4874 return (struct d3d10_effect_variable *)iface != &null_blend_variable;
4877 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetType(
4878 ID3D10EffectBlendVariable *iface)
4880 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
4883 static HRESULT STDMETHODCALLTYPE d3d10_effect_blend_variable_GetDesc(ID3D10EffectBlendVariable *iface,
4884 D3D10_EFFECT_VARIABLE_DESC *desc)
4886 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
4889 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetAnnotationByIndex(
4890 ID3D10EffectBlendVariable *iface, UINT index)
4892 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
4895 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetAnnotationByName(
4896 ID3D10EffectBlendVariable *iface, LPCSTR name)
4898 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
4901 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetMemberByIndex(
4902 ID3D10EffectBlendVariable *iface, UINT index)
4904 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
4907 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetMemberByName(
4908 ID3D10EffectBlendVariable *iface, LPCSTR name)
4910 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
4913 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetMemberBySemantic(
4914 ID3D10EffectBlendVariable *iface, LPCSTR semantic)
4916 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
4919 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetElement(
4920 ID3D10EffectBlendVariable *iface, UINT index)
4922 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
4925 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetParentConstantBuffer(
4926 ID3D10EffectBlendVariable *iface)
4928 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
4931 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsScalar(
4932 ID3D10EffectBlendVariable *iface)
4934 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
4937 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsVector(
4938 ID3D10EffectBlendVariable *iface)
4940 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
4943 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsMatrix(
4944 ID3D10EffectBlendVariable *iface)
4946 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
4949 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsString(
4950 ID3D10EffectBlendVariable *iface)
4952 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
4955 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsShaderResource(
4956 ID3D10EffectBlendVariable *iface)
4958 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
4961 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsRenderTargetView(
4962 ID3D10EffectBlendVariable *iface)
4964 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
4967 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsDepthStencilView(
4968 ID3D10EffectBlendVariable *iface)
4970 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
4973 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsConstantBuffer(
4974 ID3D10EffectBlendVariable *iface)
4976 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
4979 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsShader(
4980 ID3D10EffectBlendVariable *iface)
4982 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
4985 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsBlend(
4986 ID3D10EffectBlendVariable *iface)
4988 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
4991 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsDepthStencil(
4992 ID3D10EffectBlendVariable *iface)
4994 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
4997 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsRasterizer(
4998 ID3D10EffectBlendVariable *iface)
5000 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
5003 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsSampler(
5004 ID3D10EffectBlendVariable *iface)
5006 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
5009 static HRESULT STDMETHODCALLTYPE d3d10_effect_blend_variable_SetRawValue(ID3D10EffectBlendVariable *iface,
5010 void *data, UINT offset, UINT count)
5012 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5015 static HRESULT STDMETHODCALLTYPE d3d10_effect_blend_variable_GetRawValue(ID3D10EffectBlendVariable *iface,
5016 void *data, UINT offset, UINT count)
5018 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5021 /* ID3D10EffectBlendVariable methods */
5023 static HRESULT STDMETHODCALLTYPE d3d10_effect_blend_variable_GetBlendState(ID3D10EffectBlendVariable *iface,
5024 UINT index, ID3D10BlendState **blend_state)
5026 FIXME("iface %p, index %u, blend_state %p stub!\n", iface, index, blend_state);
5031 static HRESULT STDMETHODCALLTYPE d3d10_effect_blend_variable_GetBackingStore(ID3D10EffectBlendVariable *iface,
5032 UINT index, D3D10_BLEND_DESC *desc)
5034 FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc);
5040 static const struct ID3D10EffectBlendVariableVtbl d3d10_effect_blend_variable_vtbl =
5042 /* ID3D10EffectVariable methods */
5043 d3d10_effect_blend_variable_IsValid,
5044 d3d10_effect_blend_variable_GetType,
5045 d3d10_effect_blend_variable_GetDesc,
5046 d3d10_effect_blend_variable_GetAnnotationByIndex,
5047 d3d10_effect_blend_variable_GetAnnotationByName,
5048 d3d10_effect_blend_variable_GetMemberByIndex,
5049 d3d10_effect_blend_variable_GetMemberByName,
5050 d3d10_effect_blend_variable_GetMemberBySemantic,
5051 d3d10_effect_blend_variable_GetElement,
5052 d3d10_effect_blend_variable_GetParentConstantBuffer,
5053 d3d10_effect_blend_variable_AsScalar,
5054 d3d10_effect_blend_variable_AsVector,
5055 d3d10_effect_blend_variable_AsMatrix,
5056 d3d10_effect_blend_variable_AsString,
5057 d3d10_effect_blend_variable_AsShaderResource,
5058 d3d10_effect_blend_variable_AsRenderTargetView,
5059 d3d10_effect_blend_variable_AsDepthStencilView,
5060 d3d10_effect_blend_variable_AsConstantBuffer,
5061 d3d10_effect_blend_variable_AsShader,
5062 d3d10_effect_blend_variable_AsBlend,
5063 d3d10_effect_blend_variable_AsDepthStencil,
5064 d3d10_effect_blend_variable_AsRasterizer,
5065 d3d10_effect_blend_variable_AsSampler,
5066 d3d10_effect_blend_variable_SetRawValue,
5067 d3d10_effect_blend_variable_GetRawValue,
5068 /* ID3D10EffectBlendVariable methods */
5069 d3d10_effect_blend_variable_GetBlendState,
5070 d3d10_effect_blend_variable_GetBackingStore,
5073 /* ID3D10EffectVariable methods */
5075 static BOOL STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_IsValid(ID3D10EffectDepthStencilVariable *iface)
5077 TRACE("iface %p\n", iface);
5079 return (struct d3d10_effect_variable *)iface != &null_depth_stencil_variable;
5082 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetType(
5083 ID3D10EffectDepthStencilVariable *iface)
5085 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
5088 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetDesc(ID3D10EffectDepthStencilVariable *iface,
5089 D3D10_EFFECT_VARIABLE_DESC *desc)
5091 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
5094 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetAnnotationByIndex(
5095 ID3D10EffectDepthStencilVariable *iface, UINT index)
5097 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
5100 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetAnnotationByName(
5101 ID3D10EffectDepthStencilVariable *iface, LPCSTR name)
5103 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
5106 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetMemberByIndex(
5107 ID3D10EffectDepthStencilVariable *iface, UINT index)
5109 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
5112 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetMemberByName(
5113 ID3D10EffectDepthStencilVariable *iface, LPCSTR name)
5115 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
5118 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetMemberBySemantic(
5119 ID3D10EffectDepthStencilVariable *iface, LPCSTR semantic)
5121 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
5124 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetElement(
5125 ID3D10EffectDepthStencilVariable *iface, UINT index)
5127 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
5130 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetParentConstantBuffer(
5131 ID3D10EffectDepthStencilVariable *iface)
5133 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
5136 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsScalar(
5137 ID3D10EffectDepthStencilVariable *iface)
5139 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
5142 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsVector(
5143 ID3D10EffectDepthStencilVariable *iface)
5145 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
5148 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsMatrix(
5149 ID3D10EffectDepthStencilVariable *iface)
5151 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
5154 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsString(
5155 ID3D10EffectDepthStencilVariable *iface)
5157 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
5160 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsShaderResource(
5161 ID3D10EffectDepthStencilVariable *iface)
5163 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
5166 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsRenderTargetView(
5167 ID3D10EffectDepthStencilVariable *iface)
5169 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
5172 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsDepthStencilView(
5173 ID3D10EffectDepthStencilVariable *iface)
5175 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
5178 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsConstantBuffer(
5179 ID3D10EffectDepthStencilVariable *iface)
5181 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
5184 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsShader(
5185 ID3D10EffectDepthStencilVariable *iface)
5187 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
5190 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsBlend(
5191 ID3D10EffectDepthStencilVariable *iface)
5193 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
5196 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsDepthStencil(
5197 ID3D10EffectDepthStencilVariable *iface)
5199 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
5202 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsRasterizer(
5203 ID3D10EffectDepthStencilVariable *iface)
5205 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
5208 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsSampler(
5209 ID3D10EffectDepthStencilVariable *iface)
5211 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
5214 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_SetRawValue(ID3D10EffectDepthStencilVariable *iface,
5215 void *data, UINT offset, UINT count)
5217 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5220 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetRawValue(ID3D10EffectDepthStencilVariable *iface,
5221 void *data, UINT offset, UINT count)
5223 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5226 /* ID3D10EffectDepthStencilVariable methods */
5228 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetDepthStencilState(ID3D10EffectDepthStencilVariable *iface,
5229 UINT index, ID3D10DepthStencilState **depth_stencil_state)
5231 FIXME("iface %p, index %u, depth_stencil_state %p stub!\n", iface, index, depth_stencil_state);
5236 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetBackingStore(ID3D10EffectDepthStencilVariable *iface,
5237 UINT index, D3D10_DEPTH_STENCIL_DESC *desc)
5239 FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc);
5245 static const struct ID3D10EffectDepthStencilVariableVtbl d3d10_effect_depth_stencil_variable_vtbl =
5247 /* ID3D10EffectVariable methods */
5248 d3d10_effect_depth_stencil_variable_IsValid,
5249 d3d10_effect_depth_stencil_variable_GetType,
5250 d3d10_effect_depth_stencil_variable_GetDesc,
5251 d3d10_effect_depth_stencil_variable_GetAnnotationByIndex,
5252 d3d10_effect_depth_stencil_variable_GetAnnotationByName,
5253 d3d10_effect_depth_stencil_variable_GetMemberByIndex,
5254 d3d10_effect_depth_stencil_variable_GetMemberByName,
5255 d3d10_effect_depth_stencil_variable_GetMemberBySemantic,
5256 d3d10_effect_depth_stencil_variable_GetElement,
5257 d3d10_effect_depth_stencil_variable_GetParentConstantBuffer,
5258 d3d10_effect_depth_stencil_variable_AsScalar,
5259 d3d10_effect_depth_stencil_variable_AsVector,
5260 d3d10_effect_depth_stencil_variable_AsMatrix,
5261 d3d10_effect_depth_stencil_variable_AsString,
5262 d3d10_effect_depth_stencil_variable_AsShaderResource,
5263 d3d10_effect_depth_stencil_variable_AsRenderTargetView,
5264 d3d10_effect_depth_stencil_variable_AsDepthStencilView,
5265 d3d10_effect_depth_stencil_variable_AsConstantBuffer,
5266 d3d10_effect_depth_stencil_variable_AsShader,
5267 d3d10_effect_depth_stencil_variable_AsBlend,
5268 d3d10_effect_depth_stencil_variable_AsDepthStencil,
5269 d3d10_effect_depth_stencil_variable_AsRasterizer,
5270 d3d10_effect_depth_stencil_variable_AsSampler,
5271 d3d10_effect_depth_stencil_variable_SetRawValue,
5272 d3d10_effect_depth_stencil_variable_GetRawValue,
5273 /* ID3D10EffectDepthStencilVariable methods */
5274 d3d10_effect_depth_stencil_variable_GetDepthStencilState,
5275 d3d10_effect_depth_stencil_variable_GetBackingStore,
5278 /* ID3D10EffectVariable methods */
5280 static BOOL STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_IsValid(ID3D10EffectRasterizerVariable *iface)
5282 TRACE("iface %p\n", iface);
5284 return (struct d3d10_effect_variable *)iface != &null_rasterizer_variable;
5287 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetType(
5288 ID3D10EffectRasterizerVariable *iface)
5290 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
5293 static HRESULT STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetDesc(ID3D10EffectRasterizerVariable *iface,
5294 D3D10_EFFECT_VARIABLE_DESC *desc)
5296 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
5299 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetAnnotationByIndex(
5300 ID3D10EffectRasterizerVariable *iface, UINT index)
5302 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
5305 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetAnnotationByName(
5306 ID3D10EffectRasterizerVariable *iface, LPCSTR name)
5308 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
5311 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetMemberByIndex(
5312 ID3D10EffectRasterizerVariable *iface, UINT index)
5314 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
5317 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetMemberByName(
5318 ID3D10EffectRasterizerVariable *iface, LPCSTR name)
5320 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
5323 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetMemberBySemantic(
5324 ID3D10EffectRasterizerVariable *iface, LPCSTR semantic)
5326 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
5329 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetElement(
5330 ID3D10EffectRasterizerVariable *iface, UINT index)
5332 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
5335 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetParentConstantBuffer(
5336 ID3D10EffectRasterizerVariable *iface)
5338 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
5341 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsScalar(
5342 ID3D10EffectRasterizerVariable *iface)
5344 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
5347 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsVector(
5348 ID3D10EffectRasterizerVariable *iface)
5350 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
5353 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsMatrix(
5354 ID3D10EffectRasterizerVariable *iface)
5356 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
5359 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsString(
5360 ID3D10EffectRasterizerVariable *iface)
5362 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
5365 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsShaderResource(
5366 ID3D10EffectRasterizerVariable *iface)
5368 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
5371 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsRenderTargetView(
5372 ID3D10EffectRasterizerVariable *iface)
5374 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
5377 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsDepthStencilView(
5378 ID3D10EffectRasterizerVariable *iface)
5380 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
5383 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsConstantBuffer(
5384 ID3D10EffectRasterizerVariable *iface)
5386 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
5389 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsShader(
5390 ID3D10EffectRasterizerVariable *iface)
5392 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
5395 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsBlend(
5396 ID3D10EffectRasterizerVariable *iface)
5398 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
5401 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsDepthStencil(
5402 ID3D10EffectRasterizerVariable *iface)
5404 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
5407 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsRasterizer(
5408 ID3D10EffectRasterizerVariable *iface)
5410 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
5413 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsSampler(
5414 ID3D10EffectRasterizerVariable *iface)
5416 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
5419 static HRESULT STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_SetRawValue(ID3D10EffectRasterizerVariable *iface,
5420 void *data, UINT offset, UINT count)
5422 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5425 static HRESULT STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetRawValue(ID3D10EffectRasterizerVariable *iface,
5426 void *data, UINT offset, UINT count)
5428 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5431 /* ID3D10EffectRasterizerVariable methods */
5433 static HRESULT STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetRasterizerState(ID3D10EffectRasterizerVariable *iface,
5434 UINT index, ID3D10RasterizerState **rasterizer_state)
5436 FIXME("iface %p, index %u, rasterizer_state %p stub!\n", iface, index, rasterizer_state);
5441 static HRESULT STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetBackingStore(ID3D10EffectRasterizerVariable *iface,
5442 UINT index, D3D10_RASTERIZER_DESC *desc)
5444 FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc);
5450 static const struct ID3D10EffectRasterizerVariableVtbl d3d10_effect_rasterizer_variable_vtbl =
5452 /* ID3D10EffectVariable methods */
5453 d3d10_effect_rasterizer_variable_IsValid,
5454 d3d10_effect_rasterizer_variable_GetType,
5455 d3d10_effect_rasterizer_variable_GetDesc,
5456 d3d10_effect_rasterizer_variable_GetAnnotationByIndex,
5457 d3d10_effect_rasterizer_variable_GetAnnotationByName,
5458 d3d10_effect_rasterizer_variable_GetMemberByIndex,
5459 d3d10_effect_rasterizer_variable_GetMemberByName,
5460 d3d10_effect_rasterizer_variable_GetMemberBySemantic,
5461 d3d10_effect_rasterizer_variable_GetElement,
5462 d3d10_effect_rasterizer_variable_GetParentConstantBuffer,
5463 d3d10_effect_rasterizer_variable_AsScalar,
5464 d3d10_effect_rasterizer_variable_AsVector,
5465 d3d10_effect_rasterizer_variable_AsMatrix,
5466 d3d10_effect_rasterizer_variable_AsString,
5467 d3d10_effect_rasterizer_variable_AsShaderResource,
5468 d3d10_effect_rasterizer_variable_AsRenderTargetView,
5469 d3d10_effect_rasterizer_variable_AsDepthStencilView,
5470 d3d10_effect_rasterizer_variable_AsConstantBuffer,
5471 d3d10_effect_rasterizer_variable_AsShader,
5472 d3d10_effect_rasterizer_variable_AsBlend,
5473 d3d10_effect_rasterizer_variable_AsDepthStencil,
5474 d3d10_effect_rasterizer_variable_AsRasterizer,
5475 d3d10_effect_rasterizer_variable_AsSampler,
5476 d3d10_effect_rasterizer_variable_SetRawValue,
5477 d3d10_effect_rasterizer_variable_GetRawValue,
5478 /* ID3D10EffectRasterizerVariable methods */
5479 d3d10_effect_rasterizer_variable_GetRasterizerState,
5480 d3d10_effect_rasterizer_variable_GetBackingStore,
5483 /* ID3D10EffectVariable methods */
5485 static BOOL STDMETHODCALLTYPE d3d10_effect_sampler_variable_IsValid(ID3D10EffectSamplerVariable *iface)
5487 TRACE("iface %p\n", iface);
5489 return (struct d3d10_effect_variable *)iface != &null_sampler_variable;
5492 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetType(
5493 ID3D10EffectSamplerVariable *iface)
5495 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
5498 static HRESULT STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetDesc(ID3D10EffectSamplerVariable *iface,
5499 D3D10_EFFECT_VARIABLE_DESC *desc)
5501 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
5504 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetAnnotationByIndex(
5505 ID3D10EffectSamplerVariable *iface, UINT index)
5507 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
5510 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetAnnotationByName(
5511 ID3D10EffectSamplerVariable *iface, LPCSTR name)
5513 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
5516 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetMemberByIndex(
5517 ID3D10EffectSamplerVariable *iface, UINT index)
5519 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
5522 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetMemberByName(
5523 ID3D10EffectSamplerVariable *iface, LPCSTR name)
5525 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
5528 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetMemberBySemantic(
5529 ID3D10EffectSamplerVariable *iface, LPCSTR semantic)
5531 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
5534 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetElement(
5535 ID3D10EffectSamplerVariable *iface, UINT index)
5537 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
5540 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetParentConstantBuffer(
5541 ID3D10EffectSamplerVariable *iface)
5543 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
5546 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsScalar(
5547 ID3D10EffectSamplerVariable *iface)
5549 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
5552 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsVector(
5553 ID3D10EffectSamplerVariable *iface)
5555 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
5558 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsMatrix(
5559 ID3D10EffectSamplerVariable *iface)
5561 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
5564 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsString(
5565 ID3D10EffectSamplerVariable *iface)
5567 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
5570 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsShaderResource(
5571 ID3D10EffectSamplerVariable *iface)
5573 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
5576 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsRenderTargetView(
5577 ID3D10EffectSamplerVariable *iface)
5579 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
5582 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsDepthStencilView(
5583 ID3D10EffectSamplerVariable *iface)
5585 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
5588 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsConstantBuffer(
5589 ID3D10EffectSamplerVariable *iface)
5591 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
5594 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsShader(
5595 ID3D10EffectSamplerVariable *iface)
5597 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
5600 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsBlend(
5601 ID3D10EffectSamplerVariable *iface)
5603 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
5606 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsDepthStencil(
5607 ID3D10EffectSamplerVariable *iface)
5609 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
5612 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsRasterizer(
5613 ID3D10EffectSamplerVariable *iface)
5615 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
5618 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsSampler(
5619 ID3D10EffectSamplerVariable *iface)
5621 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
5624 static HRESULT STDMETHODCALLTYPE d3d10_effect_sampler_variable_SetRawValue(ID3D10EffectSamplerVariable *iface,
5625 void *data, UINT offset, UINT count)
5627 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5630 static HRESULT STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetRawValue(ID3D10EffectSamplerVariable *iface,
5631 void *data, UINT offset, UINT count)
5633 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5636 /* ID3D10EffectSamplerVariable methods */
5638 static HRESULT STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetSampler(ID3D10EffectSamplerVariable *iface,
5639 UINT index, ID3D10SamplerState **sampler)
5641 FIXME("iface %p, index %u, sampler %p stub!\n", iface, index, sampler);
5646 static HRESULT STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetBackingStore(ID3D10EffectSamplerVariable *iface,
5647 UINT index, D3D10_SAMPLER_DESC *desc)
5649 FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc);
5655 static const struct ID3D10EffectSamplerVariableVtbl d3d10_effect_sampler_variable_vtbl =
5657 /* ID3D10EffectVariable methods */
5658 d3d10_effect_sampler_variable_IsValid,
5659 d3d10_effect_sampler_variable_GetType,
5660 d3d10_effect_sampler_variable_GetDesc,
5661 d3d10_effect_sampler_variable_GetAnnotationByIndex,
5662 d3d10_effect_sampler_variable_GetAnnotationByName,
5663 d3d10_effect_sampler_variable_GetMemberByIndex,
5664 d3d10_effect_sampler_variable_GetMemberByName,
5665 d3d10_effect_sampler_variable_GetMemberBySemantic,
5666 d3d10_effect_sampler_variable_GetElement,
5667 d3d10_effect_sampler_variable_GetParentConstantBuffer,
5668 d3d10_effect_sampler_variable_AsScalar,
5669 d3d10_effect_sampler_variable_AsVector,
5670 d3d10_effect_sampler_variable_AsMatrix,
5671 d3d10_effect_sampler_variable_AsString,
5672 d3d10_effect_sampler_variable_AsShaderResource,
5673 d3d10_effect_sampler_variable_AsRenderTargetView,
5674 d3d10_effect_sampler_variable_AsDepthStencilView,
5675 d3d10_effect_sampler_variable_AsConstantBuffer,
5676 d3d10_effect_sampler_variable_AsShader,
5677 d3d10_effect_sampler_variable_AsBlend,
5678 d3d10_effect_sampler_variable_AsDepthStencil,
5679 d3d10_effect_sampler_variable_AsRasterizer,
5680 d3d10_effect_sampler_variable_AsSampler,
5681 d3d10_effect_sampler_variable_SetRawValue,
5682 d3d10_effect_sampler_variable_GetRawValue,
5683 /* ID3D10EffectSamplerVariable methods */
5684 d3d10_effect_sampler_variable_GetSampler,
5685 d3d10_effect_sampler_variable_GetBackingStore,
5688 /* ID3D10EffectType methods */
5690 static BOOL STDMETHODCALLTYPE d3d10_effect_type_IsValid(ID3D10EffectType *iface)
5692 FIXME("iface %p stub!\n", iface);
5697 static HRESULT STDMETHODCALLTYPE d3d10_effect_type_GetDesc(ID3D10EffectType *iface, D3D10_EFFECT_TYPE_DESC *desc)
5699 struct d3d10_effect_type *This = (struct d3d10_effect_type *)iface;
5701 TRACE("iface %p, desc %p\n", iface, desc);
5703 if (This == &null_type)
5705 WARN("Null type specified\n");
5711 WARN("Invalid argument specified\n");
5712 return E_INVALIDARG;
5715 desc->TypeName = This->name;
5716 desc->Class = This->type_class;
5717 desc->Type = This->basetype;
5718 desc->Elements = This->element_count;
5719 desc->Members = This->member_count;
5720 desc->Rows = This->row_count;
5721 desc->Columns = This->column_count;
5722 desc->PackedSize = This->size_packed;
5723 desc->UnpackedSize = This->size_unpacked;
5724 desc->Stride = This->stride;
5729 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_type_GetMemberTypeByIndex(ID3D10EffectType *iface,
5732 struct d3d10_effect_type *This = (struct d3d10_effect_type *)iface;
5733 struct d3d10_effect_type *t;
5735 TRACE("iface %p, index %u\n", iface, index);
5737 if (index >= This->member_count)
5739 WARN("Invalid index specified\n");
5740 return (ID3D10EffectType *)&null_type;
5743 t = (&This->members[index])->type;
5745 TRACE("Returning member %p, %s\n", t, debugstr_a(t->name));
5747 return (ID3D10EffectType *)t;
5750 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_type_GetMemberTypeByName(ID3D10EffectType *iface,
5753 struct d3d10_effect_type *This = (struct d3d10_effect_type *)iface;
5756 TRACE("iface %p, name %s\n", iface, debugstr_a(name));
5760 WARN("Invalid name specified\n");
5761 return (ID3D10EffectType *)&null_type;
5764 for (i = 0; i < This->member_count; ++i)
5766 struct d3d10_effect_type_member *typem = &This->members[i];
5770 if (!strcmp(typem->name, name))
5772 TRACE("Returning type %p.\n", typem->type);
5773 return (ID3D10EffectType *)typem->type;
5778 WARN("Invalid name specified\n");
5780 return (ID3D10EffectType *)&null_type;
5783 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_type_GetMemberTypeBySemantic(ID3D10EffectType *iface,
5786 struct d3d10_effect_type *This = (struct d3d10_effect_type *)iface;
5789 TRACE("iface %p, semantic %s\n", iface, debugstr_a(semantic));
5793 WARN("Invalid semantic specified\n");
5794 return (ID3D10EffectType *)&null_type;
5797 for (i = 0; i < This->member_count; ++i)
5799 struct d3d10_effect_type_member *typem = &This->members[i];
5801 if (typem->semantic)
5803 if (!strcmp(typem->semantic, semantic))
5805 TRACE("Returning type %p.\n", typem->type);
5806 return (ID3D10EffectType *)typem->type;
5811 WARN("Invalid semantic specified\n");
5813 return (ID3D10EffectType *)&null_type;
5816 static LPCSTR STDMETHODCALLTYPE d3d10_effect_type_GetMemberName(ID3D10EffectType *iface, UINT index)
5818 struct d3d10_effect_type *This = (struct d3d10_effect_type *)iface;
5819 struct d3d10_effect_type_member *typem;
5821 TRACE("iface %p, index %u\n", iface, index);
5823 if (index >= This->member_count)
5825 WARN("Invalid index specified\n");
5829 typem = &This->members[index];
5831 TRACE("Returning name %s\n", debugstr_a(typem->name));
5836 static LPCSTR STDMETHODCALLTYPE d3d10_effect_type_GetMemberSemantic(ID3D10EffectType *iface, UINT index)
5838 struct d3d10_effect_type *This = (struct d3d10_effect_type *)iface;
5839 struct d3d10_effect_type_member *typem;
5841 TRACE("iface %p, index %u\n", iface, index);
5843 if (index >= This->member_count)
5845 WARN("Invalid index specified\n");
5849 typem = &This->members[index];
5851 TRACE("Returning semantic %s\n", debugstr_a(typem->semantic));
5853 return typem->semantic;
5856 static const struct ID3D10EffectTypeVtbl d3d10_effect_type_vtbl =
5858 /* ID3D10EffectType */
5859 d3d10_effect_type_IsValid,
5860 d3d10_effect_type_GetDesc,
5861 d3d10_effect_type_GetMemberTypeByIndex,
5862 d3d10_effect_type_GetMemberTypeByName,
5863 d3d10_effect_type_GetMemberTypeBySemantic,
5864 d3d10_effect_type_GetMemberName,
5865 d3d10_effect_type_GetMemberSemantic,