2 * Copyright 2009 Henri Verbeet for CodeWeavers
3 * Copyright 2009 Rico Schüller
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #include "wine/port.h"
24 #include "d3d10_private.h"
26 WINE_DEFAULT_DEBUG_CHANNEL(d3d10);
28 #define MAKE_TAG(ch0, ch1, ch2, ch3) \
29 ((DWORD)(ch0) | ((DWORD)(ch1) << 8) | \
30 ((DWORD)(ch2) << 16) | ((DWORD)(ch3) << 24 ))
31 #define TAG_DXBC MAKE_TAG('D', 'X', 'B', 'C')
32 #define TAG_FX10 MAKE_TAG('F', 'X', '1', '0')
33 #define TAG_ISGN MAKE_TAG('I', 'S', 'G', 'N')
34 #define TAG_OSGN MAKE_TAG('O', 'S', 'G', 'N')
36 #define D3D10_FX10_TYPE_COLUMN_SHIFT 11
37 #define D3D10_FX10_TYPE_COLUMN_MASK (0x7 << D3D10_FX10_TYPE_COLUMN_SHIFT)
39 #define D3D10_FX10_TYPE_ROW_SHIFT 8
40 #define D3D10_FX10_TYPE_ROW_MASK (0x7 << D3D10_FX10_TYPE_ROW_SHIFT)
42 #define D3D10_FX10_TYPE_BASETYPE_SHIFT 3
43 #define D3D10_FX10_TYPE_BASETYPE_MASK (0x1f << D3D10_FX10_TYPE_BASETYPE_SHIFT)
45 #define D3D10_FX10_TYPE_CLASS_SHIFT 0
46 #define D3D10_FX10_TYPE_CLASS_MASK (0x7 << D3D10_FX10_TYPE_CLASS_SHIFT)
48 #define D3D10_FX10_TYPE_MATRIX_COLUMN_MAJOR_MASK 0x4000
50 static const struct ID3D10EffectTechniqueVtbl d3d10_effect_technique_vtbl;
51 static const struct ID3D10EffectPassVtbl d3d10_effect_pass_vtbl;
52 static const struct ID3D10EffectVariableVtbl d3d10_effect_variable_vtbl;
53 static const struct ID3D10EffectConstantBufferVtbl d3d10_effect_constant_buffer_vtbl;
54 static const struct ID3D10EffectScalarVariableVtbl d3d10_effect_scalar_variable_vtbl;
55 static const struct ID3D10EffectVectorVariableVtbl d3d10_effect_vector_variable_vtbl;
56 static const struct ID3D10EffectMatrixVariableVtbl d3d10_effect_matrix_variable_vtbl;
57 static const struct ID3D10EffectStringVariableVtbl d3d10_effect_string_variable_vtbl;
58 static const struct ID3D10EffectShaderResourceVariableVtbl d3d10_effect_shader_resource_variable_vtbl;
59 static const struct ID3D10EffectRenderTargetViewVariableVtbl d3d10_effect_render_target_view_variable_vtbl;
60 static const struct ID3D10EffectDepthStencilViewVariableVtbl d3d10_effect_depth_stencil_view_variable_vtbl;
61 static const struct ID3D10EffectShaderVariableVtbl d3d10_effect_shader_variable_vtbl;
62 static const struct ID3D10EffectBlendVariableVtbl d3d10_effect_blend_variable_vtbl;
63 static const struct ID3D10EffectDepthStencilVariableVtbl d3d10_effect_depth_stencil_variable_vtbl;
64 static const struct ID3D10EffectRasterizerVariableVtbl d3d10_effect_rasterizer_variable_vtbl;
65 static const struct ID3D10EffectSamplerVariableVtbl d3d10_effect_sampler_variable_vtbl;
66 static const struct ID3D10EffectTypeVtbl d3d10_effect_type_vtbl;
68 /* null objects - needed for invalid calls */
69 static struct d3d10_effect_technique null_technique = {&d3d10_effect_technique_vtbl};
70 static struct d3d10_effect_pass null_pass = {&d3d10_effect_pass_vtbl};
71 static struct d3d10_effect_type null_type = {&d3d10_effect_type_vtbl};
72 static struct d3d10_effect_variable null_local_buffer = {(const ID3D10EffectVariableVtbl *)&d3d10_effect_constant_buffer_vtbl,
73 &null_local_buffer, &null_type};
74 static struct d3d10_effect_variable null_variable = {&d3d10_effect_variable_vtbl,
75 &null_local_buffer, &null_type};
76 static struct d3d10_effect_variable null_scalar_variable = {(const ID3D10EffectVariableVtbl *)&d3d10_effect_scalar_variable_vtbl,
77 &null_local_buffer, &null_type};
78 static struct d3d10_effect_variable null_vector_variable = {(const ID3D10EffectVariableVtbl *)&d3d10_effect_vector_variable_vtbl,
79 &null_local_buffer, &null_type};
80 static struct d3d10_effect_variable null_matrix_variable = {(const ID3D10EffectVariableVtbl *)&d3d10_effect_matrix_variable_vtbl,
81 &null_local_buffer, &null_type};
82 static struct d3d10_effect_variable null_string_variable = {(const ID3D10EffectVariableVtbl *)&d3d10_effect_string_variable_vtbl,
83 &null_local_buffer, &null_type};
84 static struct d3d10_effect_variable null_shader_resource_variable = {(const ID3D10EffectVariableVtbl *)&d3d10_effect_shader_resource_variable_vtbl,
85 &null_local_buffer, &null_type};
86 static struct d3d10_effect_variable null_render_target_view_variable = {(const ID3D10EffectVariableVtbl *)&d3d10_effect_render_target_view_variable_vtbl,
87 &null_local_buffer, &null_type};
88 static struct d3d10_effect_variable null_depth_stencil_view_variable = {(const ID3D10EffectVariableVtbl *)&d3d10_effect_depth_stencil_view_variable_vtbl,
89 &null_local_buffer, &null_type};
90 static struct d3d10_effect_variable null_shader_variable = {(const ID3D10EffectVariableVtbl *)&d3d10_effect_shader_variable_vtbl,
91 &null_local_buffer, &null_type};
92 static struct d3d10_effect_variable null_blend_variable = {(const ID3D10EffectVariableVtbl *)&d3d10_effect_blend_variable_vtbl,
93 &null_local_buffer, &null_type};
94 static struct d3d10_effect_variable null_depth_stencil_variable = {(const ID3D10EffectVariableVtbl *)&d3d10_effect_depth_stencil_variable_vtbl,
95 &null_local_buffer, &null_type};
96 static struct d3d10_effect_variable null_rasterizer_variable = {(const ID3D10EffectVariableVtbl *)&d3d10_effect_rasterizer_variable_vtbl,
97 &null_local_buffer, &null_type};
98 static struct d3d10_effect_variable null_sampler_variable = {(const ID3D10EffectVariableVtbl *)&d3d10_effect_sampler_variable_vtbl,
99 &null_local_buffer, &null_type};
101 /* anonymous_shader_type and anonymous_shader */
102 static char anonymous_name[] = "$Anonymous";
103 static char anonymous_vertexshader_name[] = "vertexshader";
104 static char anonymous_pixelshader_name[] = "pixelshader";
105 static char anonymous_geometryshader_name[] = "geometryshader";
106 static struct d3d10_effect_type anonymous_vs_type = {&d3d10_effect_type_vtbl, anonymous_vertexshader_name,
107 D3D10_SVT_VERTEXSHADER, D3D10_SVC_OBJECT};
108 static struct d3d10_effect_type anonymous_ps_type = {&d3d10_effect_type_vtbl, anonymous_pixelshader_name,
109 D3D10_SVT_PIXELSHADER, D3D10_SVC_OBJECT};
110 static struct d3d10_effect_type anonymous_gs_type = {&d3d10_effect_type_vtbl, anonymous_geometryshader_name,
111 D3D10_SVT_GEOMETRYSHADER, D3D10_SVC_OBJECT};
112 static struct d3d10_effect_variable anonymous_vs = {(const ID3D10EffectVariableVtbl *)&d3d10_effect_shader_variable_vtbl,
113 &null_local_buffer, &anonymous_vs_type, &null_shader_variable, anonymous_name};
114 static struct d3d10_effect_variable anonymous_ps = {(const ID3D10EffectVariableVtbl *)&d3d10_effect_shader_variable_vtbl,
115 &null_local_buffer, &anonymous_ps_type, &null_shader_variable, anonymous_name};
116 static struct d3d10_effect_variable anonymous_gs = {(const ID3D10EffectVariableVtbl *)&d3d10_effect_shader_variable_vtbl,
117 &null_local_buffer, &anonymous_gs_type, &null_shader_variable, anonymous_name};
119 static struct d3d10_effect_type *get_fx10_type(struct d3d10_effect *effect, const char *data, DWORD offset);
121 static inline void read_dword(const char **ptr, DWORD *d)
123 memcpy(d, *ptr, sizeof(*d));
127 static inline void skip_dword_unknown(const char **ptr, unsigned int count)
132 FIXME("Skipping %u unknown DWORDs:\n", count);
133 for (i = 0; i < count; ++i)
136 FIXME("\t0x%08x\n", d);
140 static inline void write_dword(char **ptr, DWORD d)
142 memcpy(*ptr, &d, sizeof(d));
146 static inline void write_dword_unknown(char **ptr, DWORD d)
148 FIXME("Writing unknown DWORD 0x%08x\n", d);
152 static HRESULT parse_dxbc(const char *data, SIZE_T data_size,
153 HRESULT (*chunk_handler)(const char *data, DWORD data_size, DWORD tag, void *ctx), void *ctx)
155 const char *ptr = data;
162 read_dword(&ptr, &tag);
163 TRACE("tag: %s.\n", debugstr_an((const char *)&tag, 4));
167 WARN("Wrong tag.\n");
172 skip_dword_unknown(&ptr, 4);
174 skip_dword_unknown(&ptr, 1);
176 read_dword(&ptr, &total_size);
177 TRACE("total size: %#x\n", total_size);
179 read_dword(&ptr, &chunk_count);
180 TRACE("chunk count: %#x\n", chunk_count);
182 for (i = 0; i < chunk_count; ++i)
184 DWORD chunk_tag, chunk_size;
185 const char *chunk_ptr;
188 read_dword(&ptr, &chunk_offset);
189 TRACE("chunk %u at offset %#x\n", i, chunk_offset);
191 chunk_ptr = data + chunk_offset;
193 read_dword(&chunk_ptr, &chunk_tag);
194 read_dword(&chunk_ptr, &chunk_size);
196 hr = chunk_handler(chunk_ptr, chunk_size, chunk_tag, ctx);
197 if (FAILED(hr)) break;
203 static BOOL copy_name(const char *ptr, char **name)
207 if (!ptr) return TRUE;
209 name_len = strlen(ptr) + 1;
215 *name = HeapAlloc(GetProcessHeap(), 0, name_len);
218 ERR("Failed to allocate name memory.\n");
222 memcpy(*name, ptr, name_len);
227 static HRESULT shader_parse_signature(const char *data, DWORD data_size, struct d3d10_effect_shader_signature *s)
229 D3D10_SIGNATURE_PARAMETER_DESC *e;
230 const char *ptr = data;
234 read_dword(&ptr, &count);
235 TRACE("%u elements\n", count);
237 skip_dword_unknown(&ptr, 1);
239 e = HeapAlloc(GetProcessHeap(), 0, count * sizeof(*e));
242 ERR("Failed to allocate signature memory.\n");
243 return E_OUTOFMEMORY;
246 for (i = 0; i < count; ++i)
251 read_dword(&ptr, &name_offset);
252 e[i].SemanticName = data + name_offset;
253 read_dword(&ptr, &e[i].SemanticIndex);
254 read_dword(&ptr, &e[i].SystemValueType);
255 read_dword(&ptr, &e[i].ComponentType);
256 read_dword(&ptr, &e[i].Register);
257 read_dword(&ptr, &mask);
259 e[i].ReadWriteMask = mask >> 8;
260 e[i].Mask = mask & 0xff;
262 TRACE("semantic: %s, semantic idx: %u, sysval_semantic %#x, "
263 "type %u, register idx: %u, use_mask %#x, input_mask %#x\n",
264 debugstr_a(e[i].SemanticName), e[i].SemanticIndex, e[i].SystemValueType,
265 e[i].ComponentType, e[i].Register, e[i].Mask, e[i].ReadWriteMask);
269 s->element_count = count;
274 static void shader_free_signature(struct d3d10_effect_shader_signature *s)
276 HeapFree(GetProcessHeap(), 0, s->signature);
277 HeapFree(GetProcessHeap(), 0, s->elements);
280 static HRESULT shader_chunk_handler(const char *data, DWORD data_size, DWORD tag, void *ctx)
282 struct d3d10_effect_shader_variable *s = ctx;
285 TRACE("tag: %s.\n", debugstr_an((const char *)&tag, 4));
287 TRACE("chunk size: %#x\n", data_size);
294 /* 32 (DXBC header) + 1 * 4 (chunk index) + 2 * 4 (chunk header) + data_size (chunk data) */
295 UINT size = 44 + data_size;
296 struct d3d10_effect_shader_signature *sig;
299 if (tag == TAG_ISGN) sig = &s->input_signature;
300 else sig = &s->output_signature;
302 sig->signature = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size);
305 ERR("Failed to allocate input signature data\n");
306 return E_OUTOFMEMORY;
308 sig->signature_size = size;
310 ptr = sig->signature;
312 write_dword(&ptr, TAG_DXBC);
315 write_dword_unknown(&ptr, 0);
316 write_dword_unknown(&ptr, 0);
317 write_dword_unknown(&ptr, 0);
318 write_dword_unknown(&ptr, 0);
320 /* seems to be always 1 */
321 write_dword_unknown(&ptr, 1);
324 write_dword(&ptr, size);
327 write_dword(&ptr, 1);
330 write_dword(&ptr, (ptr - sig->signature) + 4);
333 write_dword(&ptr, tag);
334 write_dword(&ptr, data_size);
335 memcpy(ptr, data, data_size);
337 hr = shader_parse_signature(ptr, data_size, sig);
340 ERR("Failed to parse shader, hr %#x\n", hr);
341 shader_free_signature(sig);
348 FIXME("Unhandled chunk %s.\n", debugstr_an((const char *)&tag, 4));
355 static HRESULT parse_shader(struct d3d10_effect_variable *v, const char *data)
357 ID3D10Device *device = v->effect->device;
358 struct d3d10_effect_shader_variable *s;
359 const char *ptr = data;
363 s = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*s));
366 ERR("Failed to allocate shader variable memory\n");
367 return E_OUTOFMEMORY;
372 if (v->effect->used_shader_current >= v->effect->used_shader_count)
374 WARN("Invalid shader? Used shader current(%u) >= used shader count(%u)\n", v->effect->used_shader_current, v->effect->used_shader_count);
378 v->effect->used_shaders[v->effect->used_shader_current] = v;
379 ++v->effect->used_shader_current;
381 if (!ptr) return S_OK;
383 read_dword(&ptr, &dxbc_size);
384 TRACE("dxbc size: %#x\n", dxbc_size);
386 /* We got a shader VertexShader vs = NULL, so it is fine to skip this. */
387 if (!dxbc_size) return S_OK;
389 switch (v->type->basetype)
391 case D3D10_SVT_VERTEXSHADER:
392 hr = ID3D10Device_CreateVertexShader(device, ptr, dxbc_size, &s->shader.vs);
393 if (FAILED(hr)) return hr;
396 case D3D10_SVT_PIXELSHADER:
397 hr = ID3D10Device_CreatePixelShader(device, ptr, dxbc_size, &s->shader.ps);
398 if (FAILED(hr)) return hr;
401 case D3D10_SVT_GEOMETRYSHADER:
402 hr = ID3D10Device_CreateGeometryShader(device, ptr, dxbc_size, &s->shader.gs);
403 if (FAILED(hr)) return hr;
407 ERR("This should not happen!\n");
411 return parse_dxbc(ptr, dxbc_size, shader_chunk_handler, s);
414 static D3D10_SHADER_VARIABLE_CLASS d3d10_variable_class(DWORD c, BOOL is_column_major)
418 case 1: return D3D10_SVC_SCALAR;
419 case 2: return D3D10_SVC_VECTOR;
420 case 3: if (is_column_major) return D3D10_SVC_MATRIX_COLUMNS;
421 else return D3D10_SVC_MATRIX_ROWS;
423 FIXME("Unknown variable class %#x.\n", c);
428 static D3D10_SHADER_VARIABLE_TYPE d3d10_variable_type(DWORD t, BOOL is_object)
434 case 1: return D3D10_SVT_STRING;
435 case 2: return D3D10_SVT_BLEND;
436 case 3: return D3D10_SVT_DEPTHSTENCIL;
437 case 4: return D3D10_SVT_RASTERIZER;
438 case 5: return D3D10_SVT_PIXELSHADER;
439 case 6: return D3D10_SVT_VERTEXSHADER;
440 case 7: return D3D10_SVT_GEOMETRYSHADER;
442 case 10: return D3D10_SVT_TEXTURE1D;
443 case 11: return D3D10_SVT_TEXTURE1DARRAY;
444 case 12: return D3D10_SVT_TEXTURE2D;
445 case 13: return D3D10_SVT_TEXTURE2DARRAY;
446 case 14: return D3D10_SVT_TEXTURE2DMS;
447 case 15: return D3D10_SVT_TEXTURE2DMSARRAY;
448 case 16: return D3D10_SVT_TEXTURE3D;
449 case 17: return D3D10_SVT_TEXTURECUBE;
451 case 19: return D3D10_SVT_RENDERTARGETVIEW;
452 case 20: return D3D10_SVT_DEPTHSTENCILVIEW;
453 case 21: return D3D10_SVT_SAMPLER;
455 FIXME("Unknown variable type %#x.\n", t);
463 case 1: return D3D10_SVT_FLOAT;
464 case 2: return D3D10_SVT_INT;
465 case 3: return D3D10_SVT_UINT;
466 case 4: return D3D10_SVT_BOOL;
468 FIXME("Unknown variable type %#x.\n", t);
474 static HRESULT parse_fx10_type(struct d3d10_effect_type *t, const char *ptr, const char *data)
481 read_dword(&ptr, &offset);
482 TRACE("Type name at offset %#x.\n", offset);
484 if (!copy_name(data + offset, &t->name))
486 ERR("Failed to copy name.\n");
487 return E_OUTOFMEMORY;
489 TRACE("Type name: %s.\n", debugstr_a(t->name));
491 read_dword(&ptr, &unknown0);
492 TRACE("Unknown 0: %u.\n", unknown0);
494 read_dword(&ptr, &t->element_count);
495 TRACE("Element count: %u.\n", t->element_count);
497 read_dword(&ptr, &t->size_unpacked);
498 TRACE("Unpacked size: %#x.\n", t->size_unpacked);
500 read_dword(&ptr, &t->stride);
501 TRACE("Stride: %#x.\n", t->stride);
503 read_dword(&ptr, &t->size_packed);
504 TRACE("Packed size %#x.\n", t->size_packed);
511 read_dword(&ptr, &typeinfo);
512 t->column_count = (typeinfo & D3D10_FX10_TYPE_COLUMN_MASK) >> D3D10_FX10_TYPE_COLUMN_SHIFT;
513 t->row_count = (typeinfo & D3D10_FX10_TYPE_ROW_MASK) >> D3D10_FX10_TYPE_ROW_SHIFT;
514 t->basetype = d3d10_variable_type((typeinfo & D3D10_FX10_TYPE_BASETYPE_MASK) >> D3D10_FX10_TYPE_BASETYPE_SHIFT, FALSE);
515 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);
517 TRACE("Type description: %#x.\n", typeinfo);
518 TRACE("\tcolumns: %u.\n", t->column_count);
519 TRACE("\trows: %u.\n", t->row_count);
520 TRACE("\tbasetype: %s.\n", debug_d3d10_shader_variable_type(t->basetype));
521 TRACE("\tclass: %s.\n", debug_d3d10_shader_variable_class(t->type_class));
522 TRACE("\tunknown bits: %#x.\n", typeinfo & ~(D3D10_FX10_TYPE_COLUMN_MASK | D3D10_FX10_TYPE_ROW_MASK
523 | D3D10_FX10_TYPE_BASETYPE_MASK | D3D10_FX10_TYPE_CLASS_MASK | D3D10_FX10_TYPE_MATRIX_COLUMN_MAJOR_MASK));
527 TRACE("Type is an object.\n");
532 t->type_class = D3D10_SVC_OBJECT;
534 read_dword(&ptr, &typeinfo);
535 t->basetype = d3d10_variable_type(typeinfo, TRUE);
537 TRACE("Type description: %#x.\n", typeinfo);
538 TRACE("\tbasetype: %s.\n", debug_d3d10_shader_variable_type(t->basetype));
539 TRACE("\tclass: %s.\n", debug_d3d10_shader_variable_class(t->type_class));
543 TRACE("Type is a structure.\n");
545 read_dword(&ptr, &t->member_count);
546 TRACE("Member count: %u.\n", t->member_count);
551 t->type_class = D3D10_SVC_STRUCT;
553 t->members = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, t->member_count * sizeof(*t->members));
556 ERR("Failed to allocate members memory.\n");
557 return E_OUTOFMEMORY;
560 for (i = 0; i < t->member_count; ++i)
562 struct d3d10_effect_type_member *typem = &t->members[i];
564 read_dword(&ptr, &offset);
565 TRACE("Member name at offset %#x.\n", offset);
567 if (!copy_name(data + offset, &typem->name))
569 ERR("Failed to copy name.\n");
570 return E_OUTOFMEMORY;
572 TRACE("Member name: %s.\n", debugstr_a(typem->name));
574 read_dword(&ptr, &offset);
575 TRACE("Member semantic at offset %#x.\n", offset);
577 if (!copy_name(data + offset, &typem->semantic))
579 ERR("Failed to copy semantic.\n");
580 return E_OUTOFMEMORY;
582 TRACE("Member semantic: %s.\n", debugstr_a(typem->semantic));
584 read_dword(&ptr, &typem->buffer_offset);
585 TRACE("Member offset in struct: %#x.\n", typem->buffer_offset);
587 read_dword(&ptr, &offset);
588 TRACE("Member type info at offset %#x.\n", offset);
590 typem->type = get_fx10_type(t->effect, data, offset);
593 ERR("Failed to get variable type.\n");
600 FIXME("Unhandled case %#x.\n", unknown0);
604 if (t->element_count)
606 TRACE("Elementtype for type at offset: %#x\n", t->id);
608 /* allocate elementtype - we need only one, because all elements have the same type */
609 t->elementtype = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*t->elementtype));
612 ERR("Failed to allocate members memory.\n");
613 return E_OUTOFMEMORY;
616 /* create a copy of the original type with some minor changes */
617 t->elementtype->vtbl = &d3d10_effect_type_vtbl;
618 t->elementtype->effect = t->effect;
620 if (!copy_name(t->name, &t->elementtype->name))
622 ERR("Failed to copy name.\n");
623 return E_OUTOFMEMORY;
625 TRACE("\tType name: %s.\n", debugstr_a(t->elementtype->name));
627 t->elementtype->element_count = 0;
628 TRACE("\tElement count: %u.\n", t->elementtype->element_count);
631 * Not sure if this calculation is 100% correct, but a test
632 * show's that these values work.
634 t->elementtype->size_unpacked = t->size_packed / t->element_count;
635 TRACE("\tUnpacked size: %#x.\n", t->elementtype->size_unpacked);
637 t->elementtype->stride = t->stride;
638 TRACE("\tStride: %#x.\n", t->elementtype->stride);
640 t->elementtype->size_packed = t->size_packed / t->element_count;
641 TRACE("\tPacked size: %#x.\n", t->elementtype->size_packed);
643 t->elementtype->member_count = t->member_count;
644 TRACE("\tMember count: %u.\n", t->elementtype->member_count);
646 t->elementtype->column_count = t->column_count;
647 TRACE("\tColumns: %u.\n", t->elementtype->column_count);
649 t->elementtype->row_count = t->row_count;
650 TRACE("\tRows: %u.\n", t->elementtype->row_count);
652 t->elementtype->basetype = t->basetype;
653 TRACE("\tBasetype: %s.\n", debug_d3d10_shader_variable_type(t->elementtype->basetype));
655 t->elementtype->type_class = t->type_class;
656 TRACE("\tClass: %s.\n", debug_d3d10_shader_variable_class(t->elementtype->type_class));
658 t->elementtype->members = t->members;
664 static struct d3d10_effect_type *get_fx10_type(struct d3d10_effect *effect, const char *data, DWORD offset)
666 struct d3d10_effect_type *type;
667 struct wine_rb_entry *entry;
670 entry = wine_rb_get(&effect->types, &offset);
673 TRACE("Returning existing type.\n");
674 return WINE_RB_ENTRY_VALUE(entry, struct d3d10_effect_type, entry);
677 type = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*type));
680 ERR("Failed to allocate type memory.\n");
684 type->vtbl = &d3d10_effect_type_vtbl;
686 type->effect = effect;
687 hr = parse_fx10_type(type, data + offset, data);
690 ERR("Failed to parse type info, hr %#x.\n", hr);
691 HeapFree(GetProcessHeap(), 0, type);
695 if (wine_rb_put(&effect->types, &offset, &type->entry) == -1)
697 ERR("Failed to insert type entry.\n");
698 HeapFree(GetProcessHeap(), 0, type);
705 static void set_variable_vtbl(struct d3d10_effect_variable *v)
707 switch (v->type->type_class)
709 case D3D10_SVC_SCALAR:
710 v->vtbl = (const ID3D10EffectVariableVtbl *)&d3d10_effect_scalar_variable_vtbl;
713 case D3D10_SVC_VECTOR:
714 v->vtbl = (const ID3D10EffectVariableVtbl *)&d3d10_effect_vector_variable_vtbl;
717 case D3D10_SVC_MATRIX_ROWS:
718 case D3D10_SVC_MATRIX_COLUMNS:
719 v->vtbl = (const ID3D10EffectVariableVtbl *)&d3d10_effect_matrix_variable_vtbl;
722 case D3D10_SVC_STRUCT:
723 v->vtbl = &d3d10_effect_variable_vtbl;
726 case D3D10_SVC_OBJECT:
727 switch(v->type->basetype)
729 case D3D10_SVT_STRING:
730 v->vtbl = (const ID3D10EffectVariableVtbl *)&d3d10_effect_string_variable_vtbl;
733 case D3D10_SVT_TEXTURE1D:
734 case D3D10_SVT_TEXTURE1DARRAY:
735 case D3D10_SVT_TEXTURE2D:
736 case D3D10_SVT_TEXTURE2DARRAY:
737 case D3D10_SVT_TEXTURE2DMS:
738 case D3D10_SVT_TEXTURE2DMSARRAY:
739 case D3D10_SVT_TEXTURE3D:
740 case D3D10_SVT_TEXTURECUBE:
741 v->vtbl = (const ID3D10EffectVariableVtbl *)&d3d10_effect_shader_resource_variable_vtbl;
744 case D3D10_SVT_RENDERTARGETVIEW:
745 v->vtbl = (const ID3D10EffectVariableVtbl *)&d3d10_effect_render_target_view_variable_vtbl;
748 case D3D10_SVT_DEPTHSTENCILVIEW:
749 v->vtbl = (const ID3D10EffectVariableVtbl *)&d3d10_effect_depth_stencil_view_variable_vtbl;
752 case D3D10_SVT_DEPTHSTENCIL:
753 v->vtbl = (const ID3D10EffectVariableVtbl *)&d3d10_effect_depth_stencil_variable_vtbl;
756 case D3D10_SVT_VERTEXSHADER:
757 case D3D10_SVT_GEOMETRYSHADER:
758 case D3D10_SVT_PIXELSHADER:
759 v->vtbl = (const ID3D10EffectVariableVtbl *)&d3d10_effect_shader_variable_vtbl;
762 case D3D10_SVT_BLEND:
763 v->vtbl = (const ID3D10EffectVariableVtbl *)&d3d10_effect_blend_variable_vtbl;
766 case D3D10_SVT_RASTERIZER:
767 v->vtbl = (const ID3D10EffectVariableVtbl *)&d3d10_effect_rasterizer_variable_vtbl;
770 case D3D10_SVT_SAMPLER:
771 v->vtbl = (const ID3D10EffectVariableVtbl *)&d3d10_effect_sampler_variable_vtbl;
775 FIXME("Unhandled basetype %s.\n", debug_d3d10_shader_variable_type(v->type->basetype));
776 v->vtbl = &d3d10_effect_variable_vtbl;
782 FIXME("Unhandled type class %s.\n", debug_d3d10_shader_variable_class(v->type->type_class));
783 v->vtbl = &d3d10_effect_variable_vtbl;
788 static HRESULT copy_variableinfo_from_type(struct d3d10_effect_variable *v)
793 if (v->type->member_count)
795 v->members = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, v->type->member_count * sizeof(*v->members));
798 ERR("Failed to allocate members memory.\n");
799 return E_OUTOFMEMORY;
802 for (i = 0; i < v->type->member_count; ++i)
804 struct d3d10_effect_variable *var = &v->members[i];
805 struct d3d10_effect_type_member *typem = &v->type->members[i];
807 var->buffer = v->buffer;
808 var->effect = v->effect;
809 var->type = typem->type;
810 set_variable_vtbl(var);
812 if (!copy_name(typem->name, &var->name))
814 ERR("Failed to copy name.\n");
815 return E_OUTOFMEMORY;
817 TRACE("Variable name: %s.\n", debugstr_a(var->name));
819 if (!copy_name(typem->semantic, &var->semantic))
821 ERR("Failed to copy name.\n");
822 return E_OUTOFMEMORY;
824 TRACE("Variable semantic: %s.\n", debugstr_a(var->semantic));
826 var->buffer_offset = v->buffer_offset + typem->buffer_offset;
827 TRACE("Variable buffer offset: %u.\n", var->buffer_offset);
829 hr = copy_variableinfo_from_type(var);
830 if (FAILED(hr)) return hr;
834 if (v->type->element_count)
836 unsigned int bufferoffset = v->buffer_offset;
838 v->elements = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, v->type->element_count * sizeof(*v->elements));
841 ERR("Failed to allocate elements memory.\n");
842 return E_OUTOFMEMORY;
845 for (i = 0; i < v->type->element_count; ++i)
847 struct d3d10_effect_variable *var = &v->elements[i];
849 var->buffer = v->buffer;
850 var->effect = v->effect;
851 var->type = v->type->elementtype;
852 set_variable_vtbl(var);
854 if (!copy_name(v->name, &var->name))
856 ERR("Failed to copy name.\n");
857 return E_OUTOFMEMORY;
859 TRACE("Variable name: %s.\n", debugstr_a(var->name));
861 if (!copy_name(v->semantic, &var->semantic))
863 ERR("Failed to copy name.\n");
864 return E_OUTOFMEMORY;
866 TRACE("Variable semantic: %s.\n", debugstr_a(var->semantic));
870 bufferoffset += v->type->stride;
872 var->buffer_offset = bufferoffset;
873 TRACE("Variable buffer offset: %u.\n", var->buffer_offset);
875 hr = copy_variableinfo_from_type(var);
876 if (FAILED(hr)) return hr;
883 static HRESULT parse_fx10_variable_head(struct d3d10_effect_variable *v, const char **ptr, const char *data)
887 read_dword(ptr, &offset);
888 TRACE("Variable name at offset %#x.\n", offset);
890 if (!copy_name(data + offset, &v->name))
892 ERR("Failed to copy name.\n");
893 return E_OUTOFMEMORY;
895 TRACE("Variable name: %s.\n", debugstr_a(v->name));
897 read_dword(ptr, &offset);
898 TRACE("Variable type info at offset %#x.\n", offset);
900 v->type = get_fx10_type(v->effect, data, offset);
903 ERR("Failed to get variable type.\n");
906 set_variable_vtbl(v);
908 return copy_variableinfo_from_type(v);
911 static HRESULT parse_fx10_annotation(struct d3d10_effect_variable *a, const char **ptr, const char *data)
915 hr = parse_fx10_variable_head(a, ptr, data);
916 if (FAILED(hr)) return hr;
918 skip_dword_unknown(ptr, 1);
920 /* mark the variable as annotation */
921 a->flag = D3D10_EFFECT_VARIABLE_ANNOTATION;
926 static HRESULT parse_fx10_anonymous_shader(struct d3d10_effect *e, struct d3d10_effect_anonymous_shader *s,
927 enum d3d10_effect_object_type otype)
929 struct d3d10_effect_variable *v = &s->shader;
930 struct d3d10_effect_type *t = &s->type;
931 const char *shader = NULL;
935 case D3D10_EOT_VERTEXSHADER:
936 shader = "vertexshader";
937 t->basetype = D3D10_SVT_VERTEXSHADER;
940 case D3D10_EOT_PIXELSHADER:
941 shader = "pixelshader";
942 t->basetype = D3D10_SVT_PIXELSHADER;
945 case D3D10_EOT_GEOMETRYSHADER:
946 shader = "geometryshader";
947 t->basetype = D3D10_SVT_GEOMETRYSHADER;
951 if (!copy_name(shader, &t->name))
953 ERR("Failed to copy name.\n");
954 return E_OUTOFMEMORY;
956 TRACE("Type name: %s.\n", debugstr_a(t->name));
958 t->type_class = D3D10_SVC_OBJECT;
960 t->vtbl = &d3d10_effect_type_vtbl;
964 set_variable_vtbl(v);
966 if (!copy_name("$Anonymous", &v->name))
968 ERR("Failed to copy semantic.\n");
969 return E_OUTOFMEMORY;
971 TRACE("Variable name: %s.\n", debugstr_a(v->name));
973 if (!copy_name(NULL, &v->semantic))
975 ERR("Failed to copy semantic.\n");
976 return E_OUTOFMEMORY;
978 TRACE("Variable semantic: %s.\n", debugstr_a(v->semantic));
983 static HRESULT parse_fx10_object(struct d3d10_effect_object *o, const char **ptr, const char *data)
985 const char *data_ptr = NULL;
987 enum d3d10_effect_object_operation operation;
989 struct d3d10_effect *effect = o->pass->technique->effect;
990 ID3D10Effect *e = (ID3D10Effect *)effect;
992 read_dword(ptr, &o->type);
993 TRACE("Effect object is of type %#x.\n", o->type);
995 read_dword(ptr, &o->index);
996 TRACE("Effect object index %#x.\n", o->index);
998 read_dword(ptr, &operation);
999 TRACE("Effect object operation %#x.\n", operation);
1001 read_dword(ptr, &offset);
1002 TRACE("Effect object idx is at offset %#x.\n", offset);
1006 case D3D10_EOO_VALUE:
1007 TRACE("Copy variable values\n");
1012 case D3D10_EOT_VERTEXSHADER:
1013 TRACE("Vertex shader\n");
1014 o->data = &anonymous_vs;
1018 case D3D10_EOT_PIXELSHADER:
1019 TRACE("Pixel shader\n");
1020 o->data = &anonymous_ps;
1024 case D3D10_EOT_GEOMETRYSHADER:
1025 TRACE("Geometry shader\n");
1026 o->data = &anonymous_gs;
1031 FIXME("Unhandled object type %#x\n", o->type);
1037 case D3D10_EOO_PARSED_OBJECT:
1038 /* This is a local object, we've parsed in parse_fx10_local_object. */
1039 TRACE("Shader = %s.\n", data + offset);
1041 o->data = e->lpVtbl->GetVariableByName(e, data + offset);
1045 case D3D10_EOO_PARSED_OBJECT_INDEX:
1046 /* This is a local object, we've parsed in parse_fx10_local_object, which has an array index. */
1047 data_ptr = data + offset;
1048 read_dword(&data_ptr, &offset);
1049 read_dword(&data_ptr, &o->index);
1050 TRACE("Shader = %s[%u].\n", data + offset, o->index);
1052 o->data = e->lpVtbl->GetVariableByName(e, data + offset);
1056 case D3D10_EOO_ANONYMOUS_SHADER:
1057 TRACE("Anonymous shader\n");
1059 /* check anonymous_shader_current for validity */
1060 if (effect->anonymous_shader_current >= effect->anonymous_shader_count)
1062 ERR("Anonymous shader count is wrong!\n");
1066 data_ptr = data + offset;
1067 read_dword(&data_ptr, &offset);
1068 TRACE("Effect object starts at offset %#x.\n", offset);
1070 data_ptr = data + offset;
1072 hr = parse_fx10_anonymous_shader(effect, &effect->anonymous_shaders[effect->anonymous_shader_current], o->type);
1073 if (FAILED(hr)) return hr;
1075 o->data = &effect->anonymous_shaders[effect->anonymous_shader_current].shader;
1076 ++effect->anonymous_shader_current;
1080 case D3D10_EOT_VERTEXSHADER:
1081 TRACE("Vertex shader\n");
1082 hr = parse_shader(o->data, data_ptr);
1085 case D3D10_EOT_PIXELSHADER:
1086 TRACE("Pixel shader\n");
1087 hr = parse_shader(o->data, data_ptr);
1090 case D3D10_EOT_GEOMETRYSHADER:
1091 TRACE("Geometry shader\n");
1092 hr = parse_shader(o->data, data_ptr);
1096 FIXME("Unhandled object type %#x\n", o->type);
1104 FIXME("Unhandled operation %#x.\n", operation);
1111 static HRESULT parse_fx10_pass(struct d3d10_effect_pass *p, const char **ptr, const char *data)
1117 read_dword(ptr, &offset);
1118 TRACE("Pass name at offset %#x.\n", offset);
1120 if (!copy_name(data + offset, &p->name))
1122 ERR("Failed to copy name.\n");
1123 return E_OUTOFMEMORY;
1125 TRACE("Pass name: %s.\n", debugstr_a(p->name));
1127 read_dword(ptr, &p->object_count);
1128 TRACE("Pass has %u effect objects.\n", p->object_count);
1130 read_dword(ptr, &p->annotation_count);
1131 TRACE("Pass has %u annotations.\n", p->annotation_count);
1133 p->annotations = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, p->annotation_count * sizeof(*p->annotations));
1134 if (!p->annotations)
1136 ERR("Failed to allocate pass annotations memory.\n");
1137 return E_OUTOFMEMORY;
1140 for (i = 0; i < p->annotation_count; ++i)
1142 struct d3d10_effect_variable *a = &p->annotations[i];
1144 a->effect = p->technique->effect;
1145 a->buffer = &null_local_buffer;
1147 hr = parse_fx10_annotation(a, ptr, data);
1148 if (FAILED(hr)) return hr;
1151 p->objects = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, p->object_count * sizeof(*p->objects));
1154 ERR("Failed to allocate effect objects memory.\n");
1155 return E_OUTOFMEMORY;
1158 for (i = 0; i < p->object_count; ++i)
1160 struct d3d10_effect_object *o = &p->objects[i];
1164 hr = parse_fx10_object(o, ptr, data);
1165 if (FAILED(hr)) return hr;
1171 static HRESULT parse_fx10_technique(struct d3d10_effect_technique *t, const char **ptr, const char *data)
1177 read_dword(ptr, &offset);
1178 TRACE("Technique name at offset %#x.\n", offset);
1180 if (!copy_name(data + offset, &t->name))
1182 ERR("Failed to copy name.\n");
1183 return E_OUTOFMEMORY;
1185 TRACE("Technique name: %s.\n", debugstr_a(t->name));
1187 read_dword(ptr, &t->pass_count);
1188 TRACE("Technique has %u passes\n", t->pass_count);
1190 read_dword(ptr, &t->annotation_count);
1191 TRACE("Technique has %u annotations.\n", t->annotation_count);
1193 t->annotations = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, t->annotation_count * sizeof(*t->annotations));
1194 if (!t->annotations)
1196 ERR("Failed to allocate technique annotations memory.\n");
1197 return E_OUTOFMEMORY;
1200 for (i = 0; i < t->annotation_count; ++i)
1202 struct d3d10_effect_variable *a = &t->annotations[i];
1204 a->effect = t->effect;
1205 a->buffer = &null_local_buffer;
1207 hr = parse_fx10_annotation(a, ptr, data);
1208 if (FAILED(hr)) return hr;
1211 t->passes = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, t->pass_count * sizeof(*t->passes));
1214 ERR("Failed to allocate passes memory\n");
1215 return E_OUTOFMEMORY;
1218 for (i = 0; i < t->pass_count; ++i)
1220 struct d3d10_effect_pass *p = &t->passes[i];
1222 p->vtbl = &d3d10_effect_pass_vtbl;
1225 hr = parse_fx10_pass(p, ptr, data);
1226 if (FAILED(hr)) return hr;
1232 static HRESULT parse_fx10_variable(struct d3d10_effect_variable *v, const char **ptr, const char *data)
1238 hr = parse_fx10_variable_head(v, ptr, data);
1239 if (FAILED(hr)) return hr;
1241 read_dword(ptr, &offset);
1242 TRACE("Variable semantic at offset %#x.\n", offset);
1244 if (!copy_name(data + offset, &v->semantic))
1246 ERR("Failed to copy semantic.\n");
1247 return E_OUTOFMEMORY;
1249 TRACE("Variable semantic: %s.\n", debugstr_a(v->semantic));
1251 read_dword(ptr, &v->buffer_offset);
1252 TRACE("Variable offset in buffer: %#x.\n", v->buffer_offset);
1254 skip_dword_unknown(ptr, 1);
1256 read_dword(ptr, &v->flag);
1257 TRACE("Variable flag: %#x.\n", v->flag);
1259 read_dword(ptr, &v->annotation_count);
1260 TRACE("Variable has %u annotations.\n", v->annotation_count);
1262 v->annotations = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, v->annotation_count * sizeof(*v->annotations));
1263 if (!v->annotations)
1265 ERR("Failed to allocate variable annotations memory.\n");
1266 return E_OUTOFMEMORY;
1269 for (i = 0; i < v->annotation_count; ++i)
1271 struct d3d10_effect_variable *a = &v->annotations[i];
1273 a->effect = v->effect;
1274 a->buffer = &null_local_buffer;
1276 hr = parse_fx10_annotation(a, ptr, data);
1277 if (FAILED(hr)) return hr;
1283 static HRESULT parse_fx10_local_variable(struct d3d10_effect_variable *v, const char **ptr, const char *data)
1289 hr = parse_fx10_variable_head(v, ptr, data);
1290 if (FAILED(hr)) return hr;
1292 read_dword(ptr, &offset);
1293 TRACE("Variable semantic at offset %#x.\n", offset);
1295 if (!copy_name(data + offset, &v->semantic))
1297 ERR("Failed to copy semantic.\n");
1298 return E_OUTOFMEMORY;
1300 TRACE("Variable semantic: %s.\n", debugstr_a(v->semantic));
1302 skip_dword_unknown(ptr, 1);
1304 switch (v->type->basetype)
1306 case D3D10_SVT_TEXTURE1D:
1307 case D3D10_SVT_TEXTURE1DARRAY:
1308 case D3D10_SVT_TEXTURE2D:
1309 case D3D10_SVT_TEXTURE2DARRAY:
1310 case D3D10_SVT_TEXTURE2DMS:
1311 case D3D10_SVT_TEXTURE2DMSARRAY:
1312 case D3D10_SVT_TEXTURE3D:
1313 case D3D10_SVT_TEXTURECUBE:
1314 case D3D10_SVT_RENDERTARGETVIEW:
1315 case D3D10_SVT_DEPTHSTENCILVIEW:
1316 TRACE("SVT could not have elements.\n");
1319 case D3D10_SVT_VERTEXSHADER:
1320 case D3D10_SVT_PIXELSHADER:
1321 case D3D10_SVT_GEOMETRYSHADER:
1322 TRACE("Shader type is %s\n", debug_d3d10_shader_variable_type(v->type->basetype));
1323 for (i = 0; i < max(v->type->element_count, 1); ++i)
1325 DWORD shader_offset;
1326 struct d3d10_effect_variable *var;
1328 if (!v->type->element_count)
1334 var = &v->elements[i];
1337 read_dword(ptr, &shader_offset);
1338 TRACE("Shader offset: %#x.\n", shader_offset);
1340 hr = parse_shader(var, data + shader_offset);
1341 if (FAILED(hr)) return hr;
1345 case D3D10_SVT_DEPTHSTENCIL:
1346 case D3D10_SVT_BLEND:
1347 case D3D10_SVT_RASTERIZER:
1348 case D3D10_SVT_SAMPLER:
1349 TRACE("SVT is a state.\n");
1350 for (i = 0; i < max(v->type->element_count, 1); ++i)
1355 read_dword(ptr, &object_count);
1356 TRACE("Object count: %#x.\n", object_count);
1358 for (j = 0; j < object_count; ++j)
1360 skip_dword_unknown(ptr, 4);
1366 FIXME("Unhandled case %s.\n", debug_d3d10_shader_variable_type(v->type->basetype));
1370 read_dword(ptr, &v->annotation_count);
1371 TRACE("Variable has %u annotations.\n", v->annotation_count);
1373 v->annotations = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, v->annotation_count * sizeof(*v->annotations));
1374 if (!v->annotations)
1376 ERR("Failed to allocate variable annotations memory.\n");
1377 return E_OUTOFMEMORY;
1380 for (i = 0; i < v->annotation_count; ++i)
1382 struct d3d10_effect_variable *a = &v->annotations[i];
1384 a->effect = v->effect;
1385 a->buffer = &null_local_buffer;
1387 hr = parse_fx10_annotation(a, ptr, data);
1388 if (FAILED(hr)) return hr;
1394 static HRESULT parse_fx10_local_buffer(struct d3d10_effect_variable *l, const char **ptr, const char *data)
1398 D3D10_CBUFFER_TYPE d3d10_cbuffer_type;
1400 unsigned int stride = 0;
1402 /* Generate our own type, it isn't in the fx blob. */
1403 l->type = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*l->type));
1406 ERR("Failed to allocate local buffer type memory.\n");
1407 return E_OUTOFMEMORY;
1409 l->type->vtbl = &d3d10_effect_type_vtbl;
1410 l->type->type_class = D3D10_SVC_OBJECT;
1411 l->type->effect = l->effect;
1413 read_dword(ptr, &offset);
1414 TRACE("Local buffer name at offset %#x.\n", offset);
1416 if (!copy_name(data + offset, &l->name))
1418 ERR("Failed to copy name.\n");
1419 return E_OUTOFMEMORY;
1421 TRACE("Local buffer name: %s.\n", debugstr_a(l->name));
1423 read_dword(ptr, &l->data_size);
1424 TRACE("Local buffer data size: %#x.\n", l->data_size);
1426 read_dword(ptr, &d3d10_cbuffer_type);
1427 TRACE("Local buffer type: %#x.\n", d3d10_cbuffer_type);
1429 switch(d3d10_cbuffer_type)
1431 case D3D10_CT_CBUFFER:
1432 l->type->basetype = D3D10_SVT_CBUFFER;
1433 if (!copy_name("cbuffer", &l->type->name))
1435 ERR("Failed to copy name.\n");
1436 return E_OUTOFMEMORY;
1440 case D3D10_CT_TBUFFER:
1441 l->type->basetype = D3D10_SVT_TBUFFER;
1442 if (!copy_name("tbuffer", &l->type->name))
1444 ERR("Failed to copy name.\n");
1445 return E_OUTOFMEMORY;
1450 ERR("Unexpected D3D10_CBUFFER_TYPE %#x!\n", d3d10_cbuffer_type);
1454 read_dword(ptr, &l->type->member_count);
1455 TRACE("Local buffer member count: %#x.\n", l->type->member_count);
1457 skip_dword_unknown(ptr, 1);
1459 read_dword(ptr, &l->annotation_count);
1460 TRACE("Local buffer has %u annotations.\n", l->annotation_count);
1462 l->annotations = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, l->annotation_count * sizeof(*l->annotations));
1463 if (!l->annotations)
1465 ERR("Failed to allocate local buffer annotations memory.\n");
1466 return E_OUTOFMEMORY;
1469 for (i = 0; i < l->annotation_count; ++i)
1471 struct d3d10_effect_variable *a = &l->annotations[i];
1473 a->effect = l->effect;
1474 a->buffer = &null_local_buffer;
1476 hr = parse_fx10_annotation(a, ptr, data);
1477 if (FAILED(hr)) return hr;
1480 l->members = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, l->type->member_count * sizeof(*l->members));
1483 ERR("Failed to allocate members memory.\n");
1484 return E_OUTOFMEMORY;
1487 l->type->members = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, l->type->member_count * sizeof(*l->type->members));
1488 if (!l->type->members)
1490 ERR("Failed to allocate type members memory.\n");
1491 return E_OUTOFMEMORY;
1494 for (i = 0; i < l->type->member_count; ++i)
1496 struct d3d10_effect_variable *v = &l->members[i];
1497 struct d3d10_effect_type_member *typem = &l->type->members[i];
1500 v->effect = l->effect;
1502 hr = parse_fx10_variable(v, ptr, data);
1503 if (FAILED(hr)) return hr;
1506 * Copy the values from the variable type to the constant buffers type
1507 * members structure, because it is our own generated type.
1509 typem->type = v->type;
1511 if (!copy_name(v->name, &typem->name))
1513 ERR("Failed to copy name.\n");
1514 return E_OUTOFMEMORY;
1516 TRACE("Variable name: %s.\n", debugstr_a(typem->name));
1518 if (!copy_name(v->semantic, &typem->semantic))
1520 ERR("Failed to copy name.\n");
1521 return E_OUTOFMEMORY;
1523 TRACE("Variable semantic: %s.\n", debugstr_a(typem->semantic));
1525 typem->buffer_offset = v->buffer_offset;
1526 TRACE("Variable buffer offset: %u.\n", typem->buffer_offset);
1528 l->type->size_packed += v->type->size_packed;
1531 * For the complete constantbuffer the size_unpacked = stride,
1532 * the stride is calculated like this:
1534 * 1) if the constant buffer variables are packed with packoffset
1535 * - stride = the highest used constant
1536 * - the complete stride has to be a multiple of 0x10
1538 * 2) if the constant buffer variables are NOT packed with packoffset
1539 * - sum of unpacked size for all variables which fit in a 0x10 part
1540 * - if the size exceeds a 0x10 part, the rest of the old part is skipped
1541 * and a new part is started
1542 * - if the variable is a struct it is always used a new part
1543 * - the complete stride has to be a multiple of 0x10
1546 * 0x4, 0x4, 0x4, 0x8, 0x4, 0x14, 0x4
1547 * part 0x10 0x10 0x20 -> 0x40
1549 if (v->flag & D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT)
1551 if ((v->type->size_unpacked + v->buffer_offset) > stride)
1553 stride = v->type->size_unpacked + v->buffer_offset;
1558 if (v->type->type_class == D3D10_SVC_STRUCT)
1560 stride = (stride + 0xf) & ~0xf;
1563 if ( ((stride & 0xf) + v->type->size_unpacked) > 0x10)
1565 stride = (stride + 0xf) & ~0xf;
1568 stride += v->type->size_unpacked;
1571 l->type->stride = l->type->size_unpacked = (stride + 0xf) & ~0xf;
1573 TRACE("Constant buffer:\n");
1574 TRACE("\tType name: %s.\n", debugstr_a(l->type->name));
1575 TRACE("\tElement count: %u.\n", l->type->element_count);
1576 TRACE("\tMember count: %u.\n", l->type->member_count);
1577 TRACE("\tUnpacked size: %#x.\n", l->type->size_unpacked);
1578 TRACE("\tStride: %#x.\n", l->type->stride);
1579 TRACE("\tPacked size %#x.\n", l->type->size_packed);
1580 TRACE("\tBasetype: %s.\n", debug_d3d10_shader_variable_type(l->type->basetype));
1581 TRACE("\tTypeclass: %s.\n", debug_d3d10_shader_variable_class(l->type->type_class));
1586 static int d3d10_effect_type_compare(const void *key, const struct wine_rb_entry *entry)
1588 const struct d3d10_effect_type *t = WINE_RB_ENTRY_VALUE(entry, const struct d3d10_effect_type, entry);
1589 const DWORD *id = key;
1594 static void d3d10_effect_type_member_destroy(struct d3d10_effect_type_member *typem)
1596 TRACE("effect type member %p.\n", typem);
1598 /* Do not release typem->type, it will be covered by d3d10_effect_type_destroy(). */
1599 HeapFree(GetProcessHeap(), 0, typem->semantic);
1600 HeapFree(GetProcessHeap(), 0, typem->name);
1603 static void d3d10_effect_type_destroy(struct wine_rb_entry *entry, void *context)
1605 struct d3d10_effect_type *t = WINE_RB_ENTRY_VALUE(entry, struct d3d10_effect_type, entry);
1607 TRACE("effect type %p.\n", t);
1611 HeapFree(GetProcessHeap(), 0, t->elementtype->name);
1612 HeapFree(GetProcessHeap(), 0, t->elementtype);
1619 for (i = 0; i < t->member_count; ++i)
1621 d3d10_effect_type_member_destroy(&t->members[i]);
1623 HeapFree(GetProcessHeap(), 0, t->members);
1626 HeapFree(GetProcessHeap(), 0, t->name);
1627 HeapFree(GetProcessHeap(), 0, t);
1630 static const struct wine_rb_functions d3d10_effect_type_rb_functions =
1635 d3d10_effect_type_compare,
1638 static HRESULT parse_fx10_body(struct d3d10_effect *e, const char *data, DWORD data_size)
1640 const char *ptr = data + e->index_offset;
1644 if (wine_rb_init(&e->types, &d3d10_effect_type_rb_functions) == -1)
1646 ERR("Failed to initialize type rbtree.\n");
1650 e->local_buffers = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, e->local_buffer_count * sizeof(*e->local_buffers));
1651 if (!e->local_buffers)
1653 ERR("Failed to allocate local buffer memory.\n");
1654 return E_OUTOFMEMORY;
1657 e->local_variables = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, e->local_variable_count * sizeof(*e->local_variables));
1658 if (!e->local_variables)
1660 ERR("Failed to allocate local variable memory.\n");
1661 return E_OUTOFMEMORY;
1664 e->anonymous_shaders = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, e->anonymous_shader_count * sizeof(*e->anonymous_shaders));
1665 if (!e->anonymous_shaders)
1667 ERR("Failed to allocate anonymous shaders memory\n");
1668 return E_OUTOFMEMORY;
1671 e->used_shaders = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, e->used_shader_count * sizeof(*e->used_shaders));
1672 if (!e->used_shaders)
1674 ERR("Failed to allocate used shaders memory\n");
1675 return E_OUTOFMEMORY;
1678 e->techniques = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, e->technique_count * sizeof(*e->techniques));
1681 ERR("Failed to allocate techniques memory\n");
1682 return E_OUTOFMEMORY;
1685 for (i = 0; i < e->local_buffer_count; ++i)
1687 struct d3d10_effect_variable *l = &e->local_buffers[i];
1688 l->vtbl = (const ID3D10EffectVariableVtbl *)&d3d10_effect_constant_buffer_vtbl;
1690 l->buffer = &null_local_buffer;
1692 hr = parse_fx10_local_buffer(l, &ptr, data);
1693 if (FAILED(hr)) return hr;
1696 for (i = 0; i < e->local_variable_count; ++i)
1698 struct d3d10_effect_variable *v = &e->local_variables[i];
1701 v->vtbl = &d3d10_effect_variable_vtbl;
1702 v->buffer = &null_local_buffer;
1704 hr = parse_fx10_local_variable(v, &ptr, data);
1705 if (FAILED(hr)) return hr;
1708 for (i = 0; i < e->technique_count; ++i)
1710 struct d3d10_effect_technique *t = &e->techniques[i];
1712 t->vtbl = &d3d10_effect_technique_vtbl;
1715 hr = parse_fx10_technique(t, &ptr, data);
1716 if (FAILED(hr)) return hr;
1722 static HRESULT parse_fx10(struct d3d10_effect *e, const char *data, DWORD data_size)
1724 const char *ptr = data;
1727 /* Compiled target version (e.g. fx_4_0=0xfeff1001, fx_4_1=0xfeff1011). */
1728 read_dword(&ptr, &e->version);
1729 TRACE("Target: %#x\n", e->version);
1731 read_dword(&ptr, &e->local_buffer_count);
1732 TRACE("Local buffer count: %u.\n", e->local_buffer_count);
1734 read_dword(&ptr, &e->variable_count);
1735 TRACE("Variable count: %u\n", e->variable_count);
1737 read_dword(&ptr, &e->local_variable_count);
1738 TRACE("Object count: %u\n", e->local_variable_count);
1740 read_dword(&ptr, &e->sharedbuffers_count);
1741 TRACE("Sharedbuffers count: %u\n", e->sharedbuffers_count);
1743 /* Number of variables in shared buffers? */
1744 read_dword(&ptr, &unknown);
1745 FIXME("Unknown 0: %u\n", unknown);
1747 read_dword(&ptr, &e->sharedobjects_count);
1748 TRACE("Sharedobjects count: %u\n", e->sharedobjects_count);
1750 read_dword(&ptr, &e->technique_count);
1751 TRACE("Technique count: %u\n", e->technique_count);
1753 read_dword(&ptr, &e->index_offset);
1754 TRACE("Index offset: %#x\n", e->index_offset);
1756 read_dword(&ptr, &unknown);
1757 FIXME("Unknown 1: %u\n", unknown);
1759 read_dword(&ptr, &e->texture_count);
1760 TRACE("Texture count: %u\n", e->texture_count);
1762 read_dword(&ptr, &e->dephstencilstate_count);
1763 TRACE("Depthstencilstate count: %u\n", e->dephstencilstate_count);
1765 read_dword(&ptr, &e->blendstate_count);
1766 TRACE("Blendstate count: %u\n", e->blendstate_count);
1768 read_dword(&ptr, &e->rasterizerstate_count);
1769 TRACE("Rasterizerstate count: %u\n", e->rasterizerstate_count);
1771 read_dword(&ptr, &e->samplerstate_count);
1772 TRACE("Samplerstate count: %u\n", e->samplerstate_count);
1774 read_dword(&ptr, &e->rendertargetview_count);
1775 TRACE("Rendertargetview count: %u\n", e->rendertargetview_count);
1777 read_dword(&ptr, &e->depthstencilview_count);
1778 TRACE("Depthstencilview count: %u\n", e->depthstencilview_count);
1780 read_dword(&ptr, &e->used_shader_count);
1781 TRACE("Used shader count: %u\n", e->used_shader_count);
1783 read_dword(&ptr, &e->anonymous_shader_count);
1784 TRACE("Anonymous shader count: %u\n", e->anonymous_shader_count);
1786 return parse_fx10_body(e, ptr, data_size - (ptr - data));
1789 static HRESULT fx10_chunk_handler(const char *data, DWORD data_size, DWORD tag, void *ctx)
1791 struct d3d10_effect *e = ctx;
1793 TRACE("tag: %s.\n", debugstr_an((const char *)&tag, 4));
1795 TRACE("chunk size: %#x\n", data_size);
1800 return parse_fx10(e, data, data_size);
1803 FIXME("Unhandled chunk %s.\n", debugstr_an((const char *)&tag, 4));
1808 HRESULT d3d10_effect_parse(struct d3d10_effect *This, const void *data, SIZE_T data_size)
1810 return parse_dxbc(data, data_size, fx10_chunk_handler, This);
1813 static HRESULT d3d10_effect_object_apply(struct d3d10_effect_object *o)
1815 ID3D10Device *device = o->pass->technique->effect->device;
1816 struct d3d10_effect_variable *v = (struct d3d10_effect_variable*) o->data;
1818 TRACE("effect object %p, type %#x.\n", o, o->type);
1822 case D3D10_EOT_VERTEXSHADER:
1823 ID3D10Device_VSSetShader(device, ((struct d3d10_effect_shader_variable *)v->data)->shader.vs);
1826 case D3D10_EOT_PIXELSHADER:
1827 ID3D10Device_PSSetShader(device, ((struct d3d10_effect_shader_variable *)v->data)->shader.ps);
1830 case D3D10_EOT_GEOMETRYSHADER:
1831 ID3D10Device_GSSetShader(device, ((struct d3d10_effect_shader_variable *)v->data)->shader.gs);
1835 FIXME("Unhandled effect object type %#x.\n", o->type);
1840 static void d3d10_effect_variable_destroy(struct d3d10_effect_variable *v)
1844 TRACE("variable %p.\n", v);
1846 HeapFree(GetProcessHeap(), 0, v->name);
1847 HeapFree(GetProcessHeap(), 0, v->semantic);
1850 for (i = 0; i < v->annotation_count; ++i)
1852 d3d10_effect_variable_destroy(&v->annotations[i]);
1854 HeapFree(GetProcessHeap(), 0, v->annotations);
1859 for (i = 0; i < v->type->member_count; ++i)
1861 d3d10_effect_variable_destroy(&v->members[i]);
1863 HeapFree(GetProcessHeap(), 0, v->members);
1868 for (i = 0; i < v->type->element_count; ++i)
1870 d3d10_effect_variable_destroy(&v->elements[i]);
1872 HeapFree(GetProcessHeap(), 0, v->elements);
1877 switch(v->type->basetype)
1879 case D3D10_SVT_VERTEXSHADER:
1880 case D3D10_SVT_PIXELSHADER:
1881 case D3D10_SVT_GEOMETRYSHADER:
1882 shader_free_signature(&((struct d3d10_effect_shader_variable *)v->data)->input_signature);
1883 shader_free_signature(&((struct d3d10_effect_shader_variable *)v->data)->output_signature);
1889 HeapFree(GetProcessHeap(), 0, v->data);
1893 static void d3d10_effect_pass_destroy(struct d3d10_effect_pass *p)
1897 TRACE("pass %p\n", p);
1899 HeapFree(GetProcessHeap(), 0, p->name);
1900 HeapFree(GetProcessHeap(), 0, p->objects);
1904 for (i = 0; i < p->annotation_count; ++i)
1906 d3d10_effect_variable_destroy(&p->annotations[i]);
1908 HeapFree(GetProcessHeap(), 0, p->annotations);
1912 static void d3d10_effect_technique_destroy(struct d3d10_effect_technique *t)
1916 TRACE("technique %p\n", t);
1918 HeapFree(GetProcessHeap(), 0, t->name);
1921 for (i = 0; i < t->pass_count; ++i)
1923 d3d10_effect_pass_destroy(&t->passes[i]);
1925 HeapFree(GetProcessHeap(), 0, t->passes);
1930 for (i = 0; i < t->annotation_count; ++i)
1932 d3d10_effect_variable_destroy(&t->annotations[i]);
1934 HeapFree(GetProcessHeap(), 0, t->annotations);
1938 static void d3d10_effect_local_buffer_destroy(struct d3d10_effect_variable *l)
1942 TRACE("local buffer %p.\n", l);
1944 HeapFree(GetProcessHeap(), 0, l->name);
1947 for (i = 0; i < l->type->member_count; ++i)
1949 d3d10_effect_variable_destroy(&l->members[i]);
1951 HeapFree(GetProcessHeap(), 0, l->members);
1954 if (l->type->members)
1956 for (i = 0; i < l->type->member_count; ++i)
1958 /* Do not release l->type->members[i].type, it will be covered by d3d10_effect_type_destroy(). */
1959 HeapFree(GetProcessHeap(), 0, l->type->members[i].semantic);
1960 HeapFree(GetProcessHeap(), 0, l->type->members[i].name);
1962 HeapFree(GetProcessHeap(), 0, l->type->members);
1964 HeapFree(GetProcessHeap(), 0, l->type->name);
1965 HeapFree(GetProcessHeap(), 0, l->type);
1969 for (i = 0; i < l->annotation_count; ++i)
1971 d3d10_effect_variable_destroy(&l->annotations[i]);
1973 HeapFree(GetProcessHeap(), 0, l->annotations);
1977 /* IUnknown methods */
1979 static HRESULT STDMETHODCALLTYPE d3d10_effect_QueryInterface(ID3D10Effect *iface, REFIID riid, void **object)
1981 TRACE("iface %p, riid %s, object %p\n", iface, debugstr_guid(riid), object);
1983 if (IsEqualGUID(riid, &IID_ID3D10Effect)
1984 || IsEqualGUID(riid, &IID_IUnknown))
1986 IUnknown_AddRef(iface);
1991 WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid));
1994 return E_NOINTERFACE;
1997 static ULONG STDMETHODCALLTYPE d3d10_effect_AddRef(ID3D10Effect *iface)
1999 struct d3d10_effect *This = (struct d3d10_effect *)iface;
2000 ULONG refcount = InterlockedIncrement(&This->refcount);
2002 TRACE("%p increasing refcount to %u\n", This, refcount);
2007 static ULONG STDMETHODCALLTYPE d3d10_effect_Release(ID3D10Effect *iface)
2009 struct d3d10_effect *This = (struct d3d10_effect *)iface;
2010 ULONG refcount = InterlockedDecrement(&This->refcount);
2012 TRACE("%p decreasing refcount to %u\n", This, refcount);
2018 if (This->techniques)
2020 for (i = 0; i < This->technique_count; ++i)
2022 d3d10_effect_technique_destroy(&This->techniques[i]);
2024 HeapFree(GetProcessHeap(), 0, This->techniques);
2027 if (This->local_variables)
2029 for (i = 0; i < This->local_variable_count; ++i)
2031 d3d10_effect_variable_destroy(&This->local_variables[i]);
2033 HeapFree(GetProcessHeap(), 0, This->local_variables);
2036 if (This->local_buffers)
2038 for (i = 0; i < This->local_buffer_count; ++i)
2040 d3d10_effect_local_buffer_destroy(&This->local_buffers[i]);
2042 HeapFree(GetProcessHeap(), 0, This->local_buffers);
2045 if (This->anonymous_shaders)
2047 for (i = 0; i < This->anonymous_shader_count; ++i)
2049 d3d10_effect_variable_destroy(&This->anonymous_shaders[i].shader);
2050 HeapFree(GetProcessHeap(), 0, This->anonymous_shaders[i].type.name);
2052 HeapFree(GetProcessHeap(), 0, This->anonymous_shaders);
2055 HeapFree(GetProcessHeap(), 0, This->used_shaders);
2057 wine_rb_destroy(&This->types, d3d10_effect_type_destroy, NULL);
2059 ID3D10Device_Release(This->device);
2060 HeapFree(GetProcessHeap(), 0, This);
2066 /* ID3D10Effect methods */
2068 static BOOL STDMETHODCALLTYPE d3d10_effect_IsValid(ID3D10Effect *iface)
2070 FIXME("iface %p stub!\n", iface);
2075 static BOOL STDMETHODCALLTYPE d3d10_effect_IsPool(ID3D10Effect *iface)
2077 FIXME("iface %p stub!\n", iface);
2082 static HRESULT STDMETHODCALLTYPE d3d10_effect_GetDevice(ID3D10Effect *iface, ID3D10Device **device)
2084 struct d3d10_effect *This = (struct d3d10_effect *)iface;
2086 TRACE("iface %p, device %p\n", iface, device);
2088 ID3D10Device_AddRef(This->device);
2089 *device = This->device;
2094 static HRESULT STDMETHODCALLTYPE d3d10_effect_GetDesc(ID3D10Effect *iface, D3D10_EFFECT_DESC *desc)
2096 FIXME("iface %p, desc %p stub!\n", iface, desc);
2101 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_GetConstantBufferByIndex(ID3D10Effect *iface,
2104 struct d3d10_effect *This = (struct d3d10_effect *)iface;
2105 struct d3d10_effect_variable *l;
2107 TRACE("iface %p, index %u\n", iface, index);
2109 if (index >= This->local_buffer_count)
2111 WARN("Invalid index specified\n");
2112 return (ID3D10EffectConstantBuffer *)&null_local_buffer;
2115 l = &This->local_buffers[index];
2117 TRACE("Returning buffer %p, %s.\n", l, debugstr_a(l->name));
2119 return (ID3D10EffectConstantBuffer *)l;
2122 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_GetConstantBufferByName(ID3D10Effect *iface,
2125 struct d3d10_effect *This = (struct d3d10_effect *)iface;
2128 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
2130 for (i = 0; i < This->local_buffer_count; ++i)
2132 struct d3d10_effect_variable *l = &This->local_buffers[i];
2134 if (!strcmp(l->name, name))
2136 TRACE("Returning buffer %p.\n", l);
2137 return (ID3D10EffectConstantBuffer *)l;
2141 WARN("Invalid name specified\n");
2143 return (ID3D10EffectConstantBuffer *)&null_local_buffer;
2146 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableByIndex(ID3D10Effect *iface, UINT index)
2148 struct d3d10_effect *This = (struct d3d10_effect *)iface;
2151 TRACE("iface %p, index %u\n", iface, index);
2153 for (i = 0; i < This->local_buffer_count; ++i)
2155 struct d3d10_effect_variable *l = &This->local_buffers[i];
2157 if (index < l->type->member_count)
2159 struct d3d10_effect_variable *v = &l->members[index];
2161 TRACE("Returning variable %p.\n", v);
2162 return (ID3D10EffectVariable *)v;
2164 index -= l->type->member_count;
2167 if (index < This->local_variable_count)
2169 struct d3d10_effect_variable *v = &This->local_variables[index];
2171 TRACE("Returning variable %p.\n", v);
2172 return (ID3D10EffectVariable *)v;
2175 WARN("Invalid index specified\n");
2177 return (ID3D10EffectVariable *)&null_variable;
2180 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableByName(ID3D10Effect *iface, LPCSTR name)
2182 struct d3d10_effect *This = (struct d3d10_effect *)iface;
2185 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
2189 WARN("Invalid name specified\n");
2190 return (ID3D10EffectVariable *)&null_variable;
2193 for (i = 0; i < This->local_buffer_count; ++i)
2195 struct d3d10_effect_variable *l = &This->local_buffers[i];
2198 for (j = 0; j < l->type->member_count; ++j)
2200 struct d3d10_effect_variable *v = &l->members[j];
2202 if (!strcmp(v->name, name))
2204 TRACE("Returning variable %p.\n", v);
2205 return (ID3D10EffectVariable *)v;
2210 for (i = 0; i < This->local_variable_count; ++i)
2212 struct d3d10_effect_variable *v = &This->local_variables[i];
2214 if (!strcmp(v->name, name))
2216 TRACE("Returning variable %p.\n", v);
2217 return (ID3D10EffectVariable *)v;
2221 WARN("Invalid name specified\n");
2223 return (ID3D10EffectVariable *)&null_variable;
2226 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableBySemantic(ID3D10Effect *iface,
2229 struct d3d10_effect *This = (struct d3d10_effect *)iface;
2232 TRACE("iface %p, semantic %s\n", iface, debugstr_a(semantic));
2236 WARN("Invalid semantic specified\n");
2237 return (ID3D10EffectVariable *)&null_variable;
2240 for (i = 0; i < This->local_buffer_count; ++i)
2242 struct d3d10_effect_variable *l = &This->local_buffers[i];
2245 for (j = 0; j < l->type->member_count; ++j)
2247 struct d3d10_effect_variable *v = &l->members[j];
2249 if (!strcmp(v->semantic, semantic))
2251 TRACE("Returning variable %p.\n", v);
2252 return (ID3D10EffectVariable *)v;
2257 for (i = 0; i < This->local_variable_count; ++i)
2259 struct d3d10_effect_variable *v = &This->local_variables[i];
2261 if (!strcmp(v->semantic, semantic))
2263 TRACE("Returning variable %p.\n", v);
2264 return (ID3D10EffectVariable *)v;
2268 WARN("Invalid semantic specified\n");
2270 return (ID3D10EffectVariable *)&null_variable;
2273 static struct ID3D10EffectTechnique * STDMETHODCALLTYPE d3d10_effect_GetTechniqueByIndex(ID3D10Effect *iface,
2276 struct d3d10_effect *This = (struct d3d10_effect *)iface;
2277 struct d3d10_effect_technique *t;
2279 TRACE("iface %p, index %u\n", iface, index);
2281 if (index >= This->technique_count)
2283 WARN("Invalid index specified\n");
2284 return (ID3D10EffectTechnique *)&null_technique;
2287 t = &This->techniques[index];
2289 TRACE("Returning technique %p, %s.\n", t, debugstr_a(t->name));
2291 return (ID3D10EffectTechnique *)t;
2294 static struct ID3D10EffectTechnique * STDMETHODCALLTYPE d3d10_effect_GetTechniqueByName(ID3D10Effect *iface,
2297 struct d3d10_effect *This = (struct d3d10_effect *)iface;
2300 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
2304 WARN("Invalid name specified\n");
2305 return (ID3D10EffectTechnique *)&null_technique;
2308 for (i = 0; i < This->technique_count; ++i)
2310 struct d3d10_effect_technique *t = &This->techniques[i];
2311 if (!strcmp(t->name, name))
2313 TRACE("Returning technique %p\n", t);
2314 return (ID3D10EffectTechnique *)t;
2318 WARN("Invalid name specified\n");
2320 return (ID3D10EffectTechnique *)&null_technique;
2323 static HRESULT STDMETHODCALLTYPE d3d10_effect_Optimize(ID3D10Effect *iface)
2325 FIXME("iface %p stub!\n", iface);
2330 static BOOL STDMETHODCALLTYPE d3d10_effect_IsOptimized(ID3D10Effect *iface)
2332 FIXME("iface %p stub!\n", iface);
2337 const struct ID3D10EffectVtbl d3d10_effect_vtbl =
2339 /* IUnknown methods */
2340 d3d10_effect_QueryInterface,
2341 d3d10_effect_AddRef,
2342 d3d10_effect_Release,
2343 /* ID3D10Effect methods */
2344 d3d10_effect_IsValid,
2345 d3d10_effect_IsPool,
2346 d3d10_effect_GetDevice,
2347 d3d10_effect_GetDesc,
2348 d3d10_effect_GetConstantBufferByIndex,
2349 d3d10_effect_GetConstantBufferByName,
2350 d3d10_effect_GetVariableByIndex,
2351 d3d10_effect_GetVariableByName,
2352 d3d10_effect_GetVariableBySemantic,
2353 d3d10_effect_GetTechniqueByIndex,
2354 d3d10_effect_GetTechniqueByName,
2355 d3d10_effect_Optimize,
2356 d3d10_effect_IsOptimized,
2359 /* ID3D10EffectTechnique methods */
2361 static BOOL STDMETHODCALLTYPE d3d10_effect_technique_IsValid(ID3D10EffectTechnique *iface)
2363 TRACE("iface %p\n", iface);
2365 return (struct d3d10_effect_technique *)iface != &null_technique;
2368 static HRESULT STDMETHODCALLTYPE d3d10_effect_technique_GetDesc(ID3D10EffectTechnique *iface,
2369 D3D10_TECHNIQUE_DESC *desc)
2371 struct d3d10_effect_technique *This = (struct d3d10_effect_technique *)iface;
2373 TRACE("iface %p, desc %p\n", iface, desc);
2375 if(This == &null_technique)
2377 WARN("Null technique specified\n");
2383 WARN("Invalid argument specified\n");
2384 return E_INVALIDARG;
2387 desc->Name = This->name;
2388 desc->Passes = This->pass_count;
2389 desc->Annotations = This->annotation_count;
2394 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_technique_GetAnnotationByIndex(
2395 ID3D10EffectTechnique *iface, UINT index)
2397 struct d3d10_effect_technique *This = (struct d3d10_effect_technique *)iface;
2398 struct d3d10_effect_variable *a;
2400 TRACE("iface %p, index %u\n", iface, index);
2402 if (index >= This->annotation_count)
2404 WARN("Invalid index specified\n");
2405 return (ID3D10EffectVariable *)&null_variable;
2408 a = &This->annotations[index];
2410 TRACE("Returning annotation %p, %s\n", a, debugstr_a(a->name));
2412 return (ID3D10EffectVariable *)a;
2415 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_technique_GetAnnotationByName(
2416 ID3D10EffectTechnique *iface, LPCSTR name)
2418 struct d3d10_effect_technique *This = (struct d3d10_effect_technique *)iface;
2421 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
2423 for (i = 0; i < This->annotation_count; ++i)
2425 struct d3d10_effect_variable *a = &This->annotations[i];
2426 if (!strcmp(a->name, name))
2428 TRACE("Returning annotation %p\n", a);
2429 return (ID3D10EffectVariable *)a;
2433 WARN("Invalid name specified\n");
2435 return (ID3D10EffectVariable *)&null_variable;
2438 static struct ID3D10EffectPass * STDMETHODCALLTYPE d3d10_effect_technique_GetPassByIndex(ID3D10EffectTechnique *iface,
2441 struct d3d10_effect_technique *This = (struct d3d10_effect_technique *)iface;
2442 struct d3d10_effect_pass *p;
2444 TRACE("iface %p, index %u\n", iface, index);
2446 if (index >= This->pass_count)
2448 WARN("Invalid index specified\n");
2449 return (ID3D10EffectPass *)&null_pass;
2452 p = &This->passes[index];
2454 TRACE("Returning pass %p, %s.\n", p, debugstr_a(p->name));
2456 return (ID3D10EffectPass *)p;
2459 static struct ID3D10EffectPass * STDMETHODCALLTYPE d3d10_effect_technique_GetPassByName(ID3D10EffectTechnique *iface,
2462 struct d3d10_effect_technique *This = (struct d3d10_effect_technique *)iface;
2465 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
2467 /* Do not check for name==NULL, W7/DX10 crashes in that case. */
2469 for (i = 0; i < This->pass_count; ++i)
2471 struct d3d10_effect_pass *p = &This->passes[i];
2472 if (!strcmp(p->name, name))
2474 TRACE("Returning pass %p\n", p);
2475 return (ID3D10EffectPass *)p;
2479 WARN("Invalid name specified\n");
2481 return (ID3D10EffectPass *)&null_pass;
2484 static HRESULT STDMETHODCALLTYPE d3d10_effect_technique_ComputeStateBlockMask(ID3D10EffectTechnique *iface,
2485 D3D10_STATE_BLOCK_MASK *mask)
2487 FIXME("iface %p,mask %p stub!\n", iface, mask);
2492 static const struct ID3D10EffectTechniqueVtbl d3d10_effect_technique_vtbl =
2494 /* ID3D10EffectTechnique methods */
2495 d3d10_effect_technique_IsValid,
2496 d3d10_effect_technique_GetDesc,
2497 d3d10_effect_technique_GetAnnotationByIndex,
2498 d3d10_effect_technique_GetAnnotationByName,
2499 d3d10_effect_technique_GetPassByIndex,
2500 d3d10_effect_technique_GetPassByName,
2501 d3d10_effect_technique_ComputeStateBlockMask,
2504 /* ID3D10EffectPass methods */
2506 static BOOL STDMETHODCALLTYPE d3d10_effect_pass_IsValid(ID3D10EffectPass *iface)
2508 TRACE("iface %p\n", iface);
2510 return (struct d3d10_effect_pass *)iface != &null_pass;
2513 static HRESULT STDMETHODCALLTYPE d3d10_effect_pass_GetDesc(ID3D10EffectPass *iface, D3D10_PASS_DESC *desc)
2515 struct d3d10_effect_pass *This = (struct d3d10_effect_pass *)iface;
2518 FIXME("iface %p, desc %p partial stub!\n", iface, desc);
2520 if(This == &null_pass)
2522 WARN("Null pass specified\n");
2528 WARN("Invalid argument specified\n");
2529 return E_INVALIDARG;
2532 memset(desc, 0, sizeof(*desc));
2533 desc->Name = This->name;
2534 for (i = 0; i < This->object_count; ++i)
2536 struct d3d10_effect_object *o = &This->objects[i];
2537 if (o->type == D3D10_EOT_VERTEXSHADER)
2539 struct d3d10_effect_variable *v = o->data;
2540 struct d3d10_effect_shader_variable *s = v->data;
2541 desc->pIAInputSignature = (BYTE *)s->input_signature.signature;
2542 desc->IAInputSignatureSize = s->input_signature.signature_size;
2550 static HRESULT STDMETHODCALLTYPE d3d10_effect_pass_GetVertexShaderDesc(ID3D10EffectPass *iface,
2551 D3D10_PASS_SHADER_DESC *desc)
2553 struct d3d10_effect_pass *This = (struct d3d10_effect_pass *)iface;
2556 TRACE("iface %p, desc %p\n", iface, desc);
2558 if (This == &null_pass)
2560 WARN("Null pass specified\n");
2566 WARN("Invalid argument specified\n");
2567 return E_INVALIDARG;
2570 for (i = 0; i < This->object_count; ++i)
2572 struct d3d10_effect_object *o = &This->objects[i];
2574 if (o->type == D3D10_EOT_VERTEXSHADER)
2576 desc->pShaderVariable = o->data;
2577 desc->ShaderIndex = o->index;
2582 TRACE("Returning null_shader_variable\n");
2583 desc->pShaderVariable = (ID3D10EffectShaderVariable *)&null_shader_variable;
2584 desc->ShaderIndex = 0;
2589 static HRESULT STDMETHODCALLTYPE d3d10_effect_pass_GetGeometryShaderDesc(ID3D10EffectPass *iface,
2590 D3D10_PASS_SHADER_DESC *desc)
2592 struct d3d10_effect_pass *This = (struct d3d10_effect_pass *)iface;
2595 TRACE("iface %p, desc %p\n", iface, desc);
2597 if (This == &null_pass)
2599 WARN("Null pass specified\n");
2605 WARN("Invalid argument specified\n");
2606 return E_INVALIDARG;
2609 for (i = 0; i < This->object_count; ++i)
2611 struct d3d10_effect_object *o = &This->objects[i];
2613 if (o->type == D3D10_EOT_GEOMETRYSHADER)
2615 desc->pShaderVariable = o->data;
2616 desc->ShaderIndex = o->index;
2621 TRACE("Returning null_shader_variable\n");
2622 desc->pShaderVariable = (ID3D10EffectShaderVariable *)&null_shader_variable;
2623 desc->ShaderIndex = 0;
2628 static HRESULT STDMETHODCALLTYPE d3d10_effect_pass_GetPixelShaderDesc(ID3D10EffectPass *iface,
2629 D3D10_PASS_SHADER_DESC *desc)
2631 struct d3d10_effect_pass *This = (struct d3d10_effect_pass *)iface;
2634 TRACE("iface %p, desc %p\n", iface, desc);
2636 if (This == &null_pass)
2638 WARN("Null pass specified\n");
2644 WARN("Invalid argument specified\n");
2645 return E_INVALIDARG;
2648 for (i = 0; i < This->object_count; ++i)
2650 struct d3d10_effect_object *o = &This->objects[i];
2652 if (o->type == D3D10_EOT_PIXELSHADER)
2654 desc->pShaderVariable = o->data;
2655 desc->ShaderIndex = o->index;
2660 TRACE("Returning null_shader_variable\n");
2661 desc->pShaderVariable = (ID3D10EffectShaderVariable *)&null_shader_variable;
2662 desc->ShaderIndex = 0;
2667 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_pass_GetAnnotationByIndex(ID3D10EffectPass *iface,
2670 struct d3d10_effect_pass *This = (struct d3d10_effect_pass *)iface;
2671 struct d3d10_effect_variable *a;
2673 TRACE("iface %p, index %u\n", iface, index);
2675 if (index >= This->annotation_count)
2677 WARN("Invalid index specified\n");
2678 return (ID3D10EffectVariable *)&null_variable;
2681 a = &This->annotations[index];
2683 TRACE("Returning annotation %p, %s\n", a, debugstr_a(a->name));
2685 return (ID3D10EffectVariable *)a;
2688 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_pass_GetAnnotationByName(ID3D10EffectPass *iface,
2691 struct d3d10_effect_pass *This = (struct d3d10_effect_pass *)iface;
2694 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
2696 for (i = 0; i < This->annotation_count; ++i)
2698 struct d3d10_effect_variable *a = &This->annotations[i];
2699 if (!strcmp(a->name, name))
2701 TRACE("Returning annotation %p\n", a);
2702 return (ID3D10EffectVariable *)a;
2706 WARN("Invalid name specified\n");
2708 return (ID3D10EffectVariable *)&null_variable;
2711 static HRESULT STDMETHODCALLTYPE d3d10_effect_pass_Apply(ID3D10EffectPass *iface, UINT flags)
2713 struct d3d10_effect_pass *This = (struct d3d10_effect_pass *)iface;
2717 TRACE("iface %p, flags %#x\n", iface, flags);
2719 if (flags) FIXME("Ignoring flags (%#x)\n", flags);
2721 for (i = 0; i < This->object_count; ++i)
2723 hr = d3d10_effect_object_apply(&This->objects[i]);
2724 if (FAILED(hr)) break;
2730 static HRESULT STDMETHODCALLTYPE d3d10_effect_pass_ComputeStateBlockMask(ID3D10EffectPass *iface,
2731 D3D10_STATE_BLOCK_MASK *mask)
2733 FIXME("iface %p, mask %p stub!\n", iface, mask);
2738 static const struct ID3D10EffectPassVtbl d3d10_effect_pass_vtbl =
2740 /* ID3D10EffectPass methods */
2741 d3d10_effect_pass_IsValid,
2742 d3d10_effect_pass_GetDesc,
2743 d3d10_effect_pass_GetVertexShaderDesc,
2744 d3d10_effect_pass_GetGeometryShaderDesc,
2745 d3d10_effect_pass_GetPixelShaderDesc,
2746 d3d10_effect_pass_GetAnnotationByIndex,
2747 d3d10_effect_pass_GetAnnotationByName,
2748 d3d10_effect_pass_Apply,
2749 d3d10_effect_pass_ComputeStateBlockMask,
2752 /* ID3D10EffectVariable methods */
2754 static BOOL STDMETHODCALLTYPE d3d10_effect_variable_IsValid(ID3D10EffectVariable *iface)
2756 TRACE("iface %p\n", iface);
2758 return (struct d3d10_effect_variable *)iface != &null_variable;
2761 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_variable_GetType(ID3D10EffectVariable *iface)
2763 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2765 TRACE("iface %p\n", iface);
2767 return (ID3D10EffectType *)This->type;
2770 static HRESULT STDMETHODCALLTYPE d3d10_effect_variable_GetDesc(ID3D10EffectVariable *iface,
2771 D3D10_EFFECT_VARIABLE_DESC *desc)
2773 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2775 TRACE("iface %p, desc %p\n", iface, desc);
2777 if (!iface->lpVtbl->IsValid(iface))
2779 WARN("Null variable specified\n");
2785 WARN("Invalid argument specified\n");
2786 return E_INVALIDARG;
2789 /* FIXME: This isn't correct. Anonymous shaders let desc->ExplicitBindPoint untouched, but normal shaders set it! */
2790 memset(desc, 0, sizeof(*desc));
2791 desc->Name = This->name;
2792 desc->Semantic = This->semantic;
2793 desc->Flags = This->flag;
2794 desc->Annotations = This->annotation_count;
2795 desc->BufferOffset = This->buffer_offset;
2797 if (This->flag & D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT)
2799 desc->ExplicitBindPoint = This->buffer_offset;
2805 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_variable_GetAnnotationByIndex(
2806 ID3D10EffectVariable *iface, UINT index)
2808 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2809 struct d3d10_effect_variable *a;
2811 TRACE("iface %p, index %u\n", iface, index);
2813 if (index >= This->annotation_count)
2815 WARN("Invalid index specified\n");
2816 return (ID3D10EffectVariable *)&null_variable;
2819 a = &This->annotations[index];
2821 TRACE("Returning annotation %p, %s\n", a, debugstr_a(a->name));
2823 return (ID3D10EffectVariable *)a;
2826 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_variable_GetAnnotationByName(
2827 ID3D10EffectVariable *iface, LPCSTR name)
2829 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2832 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
2834 for (i = 0; i < This->annotation_count; ++i)
2836 struct d3d10_effect_variable *a = &This->annotations[i];
2837 if (!strcmp(a->name, name))
2839 TRACE("Returning annotation %p\n", a);
2840 return (ID3D10EffectVariable *)a;
2844 WARN("Invalid name specified\n");
2846 return (ID3D10EffectVariable *)&null_variable;
2849 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_variable_GetMemberByIndex(
2850 ID3D10EffectVariable *iface, UINT index)
2852 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2853 struct d3d10_effect_variable *m;
2855 TRACE("iface %p, index %u\n", iface, index);
2857 if (index >= This->type->member_count)
2859 WARN("Invalid index specified\n");
2860 return (ID3D10EffectVariable *)&null_variable;
2863 m = &This->members[index];
2865 TRACE("Returning member %p, %s\n", m, debugstr_a(m->name));
2867 return (ID3D10EffectVariable *)m;
2870 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_variable_GetMemberByName(
2871 ID3D10EffectVariable *iface, LPCSTR name)
2873 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2876 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
2880 WARN("Invalid name specified\n");
2881 return (ID3D10EffectVariable *)&null_variable;
2884 for (i = 0; i < This->type->member_count; ++i)
2886 struct d3d10_effect_variable *m = &This->members[i];
2890 if (!strcmp(m->name, name))
2892 TRACE("Returning member %p\n", m);
2893 return (ID3D10EffectVariable *)m;
2898 WARN("Invalid name specified\n");
2900 return (ID3D10EffectVariable *)&null_variable;
2903 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_variable_GetMemberBySemantic(
2904 ID3D10EffectVariable *iface, LPCSTR semantic)
2906 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2909 TRACE("iface %p, semantic %s.\n", iface, debugstr_a(semantic));
2913 WARN("Invalid semantic specified\n");
2914 return (ID3D10EffectVariable *)&null_variable;
2917 for (i = 0; i < This->type->member_count; ++i)
2919 struct d3d10_effect_variable *m = &This->members[i];
2923 if (!strcmp(m->semantic, semantic))
2925 TRACE("Returning member %p\n", m);
2926 return (ID3D10EffectVariable *)m;
2931 WARN("Invalid semantic specified\n");
2933 return (ID3D10EffectVariable *)&null_variable;
2936 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_variable_GetElement(
2937 ID3D10EffectVariable *iface, UINT index)
2939 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2940 struct d3d10_effect_variable *v;
2942 TRACE("iface %p, index %u\n", iface, index);
2944 if (index >= This->type->element_count)
2946 WARN("Invalid index specified\n");
2947 return (ID3D10EffectVariable *)&null_variable;
2950 v = &This->elements[index];
2952 TRACE("Returning element %p, %s\n", v, debugstr_a(v->name));
2954 return (ID3D10EffectVariable *)v;
2957 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_variable_GetParentConstantBuffer(
2958 ID3D10EffectVariable *iface)
2960 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2962 TRACE("iface %p\n", iface);
2964 return (ID3D10EffectConstantBuffer *)This->buffer;
2967 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsScalar(
2968 ID3D10EffectVariable *iface)
2970 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2972 TRACE("iface %p\n", iface);
2974 if (This->vtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_scalar_variable_vtbl)
2975 return (ID3D10EffectScalarVariable *)This;
2977 return (ID3D10EffectScalarVariable *)&null_scalar_variable;
2980 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsVector(
2981 ID3D10EffectVariable *iface)
2983 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2985 TRACE("iface %p\n", iface);
2987 if (This->vtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_vector_variable_vtbl)
2988 return (ID3D10EffectVectorVariable *)This;
2990 return (ID3D10EffectVectorVariable *)&null_vector_variable;
2993 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsMatrix(
2994 ID3D10EffectVariable *iface)
2996 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
2998 TRACE("iface %p\n", iface);
3000 if (This->vtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_matrix_variable_vtbl)
3001 return (ID3D10EffectMatrixVariable *)This;
3003 return (ID3D10EffectMatrixVariable *)&null_matrix_variable;
3006 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsString(
3007 ID3D10EffectVariable *iface)
3009 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
3011 TRACE("iface %p\n", iface);
3013 if (This->vtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_string_variable_vtbl)
3014 return (ID3D10EffectStringVariable *)This;
3016 return (ID3D10EffectStringVariable *)&null_string_variable;
3019 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsShaderResource(
3020 ID3D10EffectVariable *iface)
3022 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
3024 TRACE("iface %p\n", iface);
3026 if (This->vtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_shader_resource_variable_vtbl)
3027 return (ID3D10EffectShaderResourceVariable *)This;
3029 return (ID3D10EffectShaderResourceVariable *)&null_shader_resource_variable;
3032 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsRenderTargetView(
3033 ID3D10EffectVariable *iface)
3035 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
3037 TRACE("iface %p\n", iface);
3039 if (This->vtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_render_target_view_variable_vtbl)
3040 return (ID3D10EffectRenderTargetViewVariable *)This;
3042 return (ID3D10EffectRenderTargetViewVariable *)&null_render_target_view_variable;
3045 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsDepthStencilView(
3046 ID3D10EffectVariable *iface)
3048 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
3050 TRACE("iface %p\n", iface);
3052 if (This->vtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_depth_stencil_view_variable_vtbl)
3053 return (ID3D10EffectDepthStencilViewVariable *)This;
3055 return (ID3D10EffectDepthStencilViewVariable *)&null_depth_stencil_view_variable;
3058 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_variable_AsConstantBuffer(
3059 ID3D10EffectVariable *iface)
3061 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
3063 TRACE("iface %p\n", iface);
3065 if (This->vtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_constant_buffer_vtbl)
3066 return (ID3D10EffectConstantBuffer *)This;
3068 return (ID3D10EffectConstantBuffer *)&null_local_buffer;
3071 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsShader(
3072 ID3D10EffectVariable *iface)
3074 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
3076 TRACE("iface %p\n", iface);
3078 if (This->vtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_shader_variable_vtbl)
3079 return (ID3D10EffectShaderVariable *)This;
3081 return (ID3D10EffectShaderVariable *)&null_shader_variable;
3084 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsBlend(ID3D10EffectVariable *iface)
3086 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
3088 TRACE("iface %p\n", iface);
3090 if (This->vtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_blend_variable_vtbl)
3091 return (ID3D10EffectBlendVariable *)This;
3093 return (ID3D10EffectBlendVariable *)&null_blend_variable;
3096 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsDepthStencil(
3097 ID3D10EffectVariable *iface)
3099 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
3101 TRACE("iface %p\n", iface);
3103 if (This->vtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_depth_stencil_variable_vtbl)
3104 return (ID3D10EffectDepthStencilVariable *)This;
3106 return (ID3D10EffectDepthStencilVariable *)&null_depth_stencil_variable;
3109 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsRasterizer(
3110 ID3D10EffectVariable *iface)
3112 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
3114 TRACE("iface %p\n", iface);
3116 if (This->vtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_rasterizer_variable_vtbl)
3117 return (ID3D10EffectRasterizerVariable *)This;
3119 return (ID3D10EffectRasterizerVariable *)&null_rasterizer_variable;
3122 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsSampler(
3123 ID3D10EffectVariable *iface)
3125 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
3127 TRACE("iface %p\n", iface);
3129 if (This->vtbl == (const ID3D10EffectVariableVtbl *)&d3d10_effect_sampler_variable_vtbl)
3130 return (ID3D10EffectSamplerVariable *)This;
3132 return (ID3D10EffectSamplerVariable *)&null_sampler_variable;
3135 static HRESULT STDMETHODCALLTYPE d3d10_effect_variable_SetRawValue(ID3D10EffectVariable *iface,
3136 void *data, UINT offset, UINT count)
3138 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface, data, offset, count);
3143 static HRESULT STDMETHODCALLTYPE d3d10_effect_variable_GetRawValue(ID3D10EffectVariable *iface,
3144 void *data, UINT offset, UINT count)
3146 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface, data, offset, count);
3151 static const struct ID3D10EffectVariableVtbl d3d10_effect_variable_vtbl =
3153 /* ID3D10EffectVariable methods */
3154 d3d10_effect_variable_IsValid,
3155 d3d10_effect_variable_GetType,
3156 d3d10_effect_variable_GetDesc,
3157 d3d10_effect_variable_GetAnnotationByIndex,
3158 d3d10_effect_variable_GetAnnotationByName,
3159 d3d10_effect_variable_GetMemberByIndex,
3160 d3d10_effect_variable_GetMemberByName,
3161 d3d10_effect_variable_GetMemberBySemantic,
3162 d3d10_effect_variable_GetElement,
3163 d3d10_effect_variable_GetParentConstantBuffer,
3164 d3d10_effect_variable_AsScalar,
3165 d3d10_effect_variable_AsVector,
3166 d3d10_effect_variable_AsMatrix,
3167 d3d10_effect_variable_AsString,
3168 d3d10_effect_variable_AsShaderResource,
3169 d3d10_effect_variable_AsRenderTargetView,
3170 d3d10_effect_variable_AsDepthStencilView,
3171 d3d10_effect_variable_AsConstantBuffer,
3172 d3d10_effect_variable_AsShader,
3173 d3d10_effect_variable_AsBlend,
3174 d3d10_effect_variable_AsDepthStencil,
3175 d3d10_effect_variable_AsRasterizer,
3176 d3d10_effect_variable_AsSampler,
3177 d3d10_effect_variable_SetRawValue,
3178 d3d10_effect_variable_GetRawValue,
3181 /* ID3D10EffectVariable methods */
3182 static BOOL STDMETHODCALLTYPE d3d10_effect_constant_buffer_IsValid(ID3D10EffectConstantBuffer *iface)
3184 TRACE("iface %p\n", iface);
3186 return (struct d3d10_effect_variable *)iface != &null_local_buffer;
3189 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetType(ID3D10EffectConstantBuffer *iface)
3191 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
3194 static HRESULT STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetDesc(ID3D10EffectConstantBuffer *iface,
3195 D3D10_EFFECT_VARIABLE_DESC *desc)
3197 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
3200 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetAnnotationByIndex(
3201 ID3D10EffectConstantBuffer *iface, UINT index)
3203 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
3206 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetAnnotationByName(
3207 ID3D10EffectConstantBuffer *iface, LPCSTR name)
3209 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
3212 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetMemberByIndex(
3213 ID3D10EffectConstantBuffer *iface, UINT index)
3215 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
3218 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetMemberByName(
3219 ID3D10EffectConstantBuffer *iface, LPCSTR name)
3221 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
3224 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetMemberBySemantic(
3225 ID3D10EffectConstantBuffer *iface, LPCSTR semantic)
3227 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
3230 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetElement(
3231 ID3D10EffectConstantBuffer *iface, UINT index)
3233 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
3236 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetParentConstantBuffer(
3237 ID3D10EffectConstantBuffer *iface)
3239 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
3242 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsScalar(
3243 ID3D10EffectConstantBuffer *iface)
3245 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
3248 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsVector(
3249 ID3D10EffectConstantBuffer *iface)
3251 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
3254 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsMatrix(
3255 ID3D10EffectConstantBuffer *iface)
3257 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
3260 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsString(
3261 ID3D10EffectConstantBuffer *iface)
3263 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
3266 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsShaderResource(
3267 ID3D10EffectConstantBuffer *iface)
3269 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
3272 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsRenderTargetView(
3273 ID3D10EffectConstantBuffer *iface)
3275 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
3278 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsDepthStencilView(
3279 ID3D10EffectConstantBuffer *iface)
3281 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
3284 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsConstantBuffer(
3285 ID3D10EffectConstantBuffer *iface)
3287 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
3290 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsShader(
3291 ID3D10EffectConstantBuffer *iface)
3293 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
3296 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsBlend(ID3D10EffectConstantBuffer *iface)
3298 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
3301 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsDepthStencil(
3302 ID3D10EffectConstantBuffer *iface)
3304 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
3307 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsRasterizer(
3308 ID3D10EffectConstantBuffer *iface)
3310 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
3313 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_AsSampler(
3314 ID3D10EffectConstantBuffer *iface)
3316 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
3319 static HRESULT STDMETHODCALLTYPE d3d10_effect_constant_buffer_SetRawValue(ID3D10EffectConstantBuffer *iface,
3320 void *data, UINT offset, UINT count)
3322 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
3325 static HRESULT STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetRawValue(ID3D10EffectConstantBuffer *iface,
3326 void *data, UINT offset, UINT count)
3328 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
3331 /* ID3D10EffectConstantBuffer methods */
3332 static HRESULT STDMETHODCALLTYPE d3d10_effect_constant_buffer_SetConstantBuffer(ID3D10EffectConstantBuffer *iface,
3333 ID3D10Buffer *buffer)
3335 FIXME("iface %p, buffer %p stub!\n", iface, buffer);
3340 static HRESULT STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetConstantBuffer(ID3D10EffectConstantBuffer *iface,
3341 ID3D10Buffer **buffer)
3343 FIXME("iface %p, buffer %p stub!\n", iface, buffer);
3348 static HRESULT STDMETHODCALLTYPE d3d10_effect_constant_buffer_SetTextureBuffer(ID3D10EffectConstantBuffer *iface,
3349 ID3D10ShaderResourceView *view)
3351 FIXME("iface %p, view %p stub!\n", iface, view);
3356 static HRESULT STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetTextureBuffer(ID3D10EffectConstantBuffer *iface,
3357 ID3D10ShaderResourceView **view)
3359 FIXME("iface %p, view %p stub!\n", iface, view);
3364 static const struct ID3D10EffectConstantBufferVtbl d3d10_effect_constant_buffer_vtbl =
3366 /* ID3D10EffectVariable methods */
3367 d3d10_effect_constant_buffer_IsValid,
3368 d3d10_effect_constant_buffer_GetType,
3369 d3d10_effect_constant_buffer_GetDesc,
3370 d3d10_effect_constant_buffer_GetAnnotationByIndex,
3371 d3d10_effect_constant_buffer_GetAnnotationByName,
3372 d3d10_effect_constant_buffer_GetMemberByIndex,
3373 d3d10_effect_constant_buffer_GetMemberByName,
3374 d3d10_effect_constant_buffer_GetMemberBySemantic,
3375 d3d10_effect_constant_buffer_GetElement,
3376 d3d10_effect_constant_buffer_GetParentConstantBuffer,
3377 d3d10_effect_constant_buffer_AsScalar,
3378 d3d10_effect_constant_buffer_AsVector,
3379 d3d10_effect_constant_buffer_AsMatrix,
3380 d3d10_effect_constant_buffer_AsString,
3381 d3d10_effect_constant_buffer_AsShaderResource,
3382 d3d10_effect_constant_buffer_AsRenderTargetView,
3383 d3d10_effect_constant_buffer_AsDepthStencilView,
3384 d3d10_effect_constant_buffer_AsConstantBuffer,
3385 d3d10_effect_constant_buffer_AsShader,
3386 d3d10_effect_constant_buffer_AsBlend,
3387 d3d10_effect_constant_buffer_AsDepthStencil,
3388 d3d10_effect_constant_buffer_AsRasterizer,
3389 d3d10_effect_constant_buffer_AsSampler,
3390 d3d10_effect_constant_buffer_SetRawValue,
3391 d3d10_effect_constant_buffer_GetRawValue,
3392 /* ID3D10EffectConstantBuffer methods */
3393 d3d10_effect_constant_buffer_SetConstantBuffer,
3394 d3d10_effect_constant_buffer_GetConstantBuffer,
3395 d3d10_effect_constant_buffer_SetTextureBuffer,
3396 d3d10_effect_constant_buffer_GetTextureBuffer,
3399 /* ID3D10EffectVariable methods */
3401 static BOOL STDMETHODCALLTYPE d3d10_effect_scalar_variable_IsValid(ID3D10EffectScalarVariable *iface)
3403 TRACE("iface %p\n", iface);
3405 return (struct d3d10_effect_variable *)iface != &null_scalar_variable;
3408 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetType(
3409 ID3D10EffectScalarVariable *iface)
3411 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
3414 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetDesc(ID3D10EffectScalarVariable *iface,
3415 D3D10_EFFECT_VARIABLE_DESC *desc)
3417 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
3420 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetAnnotationByIndex(
3421 ID3D10EffectScalarVariable *iface, UINT index)
3423 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
3426 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetAnnotationByName(
3427 ID3D10EffectScalarVariable *iface, LPCSTR name)
3429 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
3432 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetMemberByIndex(
3433 ID3D10EffectScalarVariable *iface, UINT index)
3435 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
3438 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetMemberByName(
3439 ID3D10EffectScalarVariable *iface, LPCSTR name)
3441 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
3444 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetMemberBySemantic(
3445 ID3D10EffectScalarVariable *iface, LPCSTR semantic)
3447 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
3450 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetElement(
3451 ID3D10EffectScalarVariable *iface, UINT index)
3453 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
3456 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetParentConstantBuffer(
3457 ID3D10EffectScalarVariable *iface)
3459 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
3462 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsScalar(
3463 ID3D10EffectScalarVariable *iface)
3465 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
3468 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsVector(
3469 ID3D10EffectScalarVariable *iface)
3471 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
3474 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsMatrix(
3475 ID3D10EffectScalarVariable *iface)
3477 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
3480 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsString(
3481 ID3D10EffectScalarVariable *iface)
3483 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
3486 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsShaderResource(
3487 ID3D10EffectScalarVariable *iface)
3489 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
3492 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsRenderTargetView(
3493 ID3D10EffectScalarVariable *iface)
3495 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
3498 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsDepthStencilView(
3499 ID3D10EffectScalarVariable *iface)
3501 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
3504 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsConstantBuffer(
3505 ID3D10EffectScalarVariable *iface)
3507 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
3510 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsShader(
3511 ID3D10EffectScalarVariable *iface)
3513 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
3516 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsBlend(
3517 ID3D10EffectScalarVariable *iface)
3519 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
3522 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsDepthStencil(
3523 ID3D10EffectScalarVariable *iface)
3525 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
3528 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsRasterizer(
3529 ID3D10EffectScalarVariable *iface)
3531 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
3534 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_scalar_variable_AsSampler(
3535 ID3D10EffectScalarVariable *iface)
3537 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
3540 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetRawValue(ID3D10EffectScalarVariable *iface,
3541 void *data, UINT offset, UINT count)
3543 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
3546 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetRawValue(ID3D10EffectScalarVariable *iface,
3547 void *data, UINT offset, UINT count)
3549 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
3552 /* ID3D10EffectScalarVariable methods */
3554 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetFloat(ID3D10EffectScalarVariable *iface,
3557 FIXME("iface %p, value %.8e stub!\n", iface, value);
3562 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetFloat(ID3D10EffectScalarVariable *iface,
3565 FIXME("iface %p, value %p stub!\n", iface, value);
3570 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetFloatArray(ID3D10EffectScalarVariable *iface,
3571 float *values, UINT offset, UINT count)
3573 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3578 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetFloatArray(ID3D10EffectScalarVariable *iface,
3579 float *values, UINT offset, UINT count)
3581 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3586 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetInt(ID3D10EffectScalarVariable *iface,
3589 FIXME("iface %p, value %d stub!\n", iface, value);
3594 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetInt(ID3D10EffectScalarVariable *iface,
3597 FIXME("iface %p, value %p stub!\n", iface, value);
3602 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetIntArray(ID3D10EffectScalarVariable *iface,
3603 int *values, UINT offset, UINT count)
3605 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3610 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetIntArray(ID3D10EffectScalarVariable *iface,
3611 int *values, UINT offset, UINT count)
3613 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3618 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetBool(ID3D10EffectScalarVariable *iface,
3621 FIXME("iface %p, value %d stub!\n", iface, value);
3626 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetBool(ID3D10EffectScalarVariable *iface,
3629 FIXME("iface %p, value %p stub!\n", iface, value);
3634 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetBoolArray(ID3D10EffectScalarVariable *iface,
3635 BOOL *values, UINT offset, UINT count)
3637 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3642 static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetBoolArray(ID3D10EffectScalarVariable *iface,
3643 BOOL *values, UINT offset, UINT count)
3645 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3650 static const struct ID3D10EffectScalarVariableVtbl d3d10_effect_scalar_variable_vtbl =
3652 /* ID3D10EffectVariable methods */
3653 d3d10_effect_scalar_variable_IsValid,
3654 d3d10_effect_scalar_variable_GetType,
3655 d3d10_effect_scalar_variable_GetDesc,
3656 d3d10_effect_scalar_variable_GetAnnotationByIndex,
3657 d3d10_effect_scalar_variable_GetAnnotationByName,
3658 d3d10_effect_scalar_variable_GetMemberByIndex,
3659 d3d10_effect_scalar_variable_GetMemberByName,
3660 d3d10_effect_scalar_variable_GetMemberBySemantic,
3661 d3d10_effect_scalar_variable_GetElement,
3662 d3d10_effect_scalar_variable_GetParentConstantBuffer,
3663 d3d10_effect_scalar_variable_AsScalar,
3664 d3d10_effect_scalar_variable_AsVector,
3665 d3d10_effect_scalar_variable_AsMatrix,
3666 d3d10_effect_scalar_variable_AsString,
3667 d3d10_effect_scalar_variable_AsShaderResource,
3668 d3d10_effect_scalar_variable_AsRenderTargetView,
3669 d3d10_effect_scalar_variable_AsDepthStencilView,
3670 d3d10_effect_scalar_variable_AsConstantBuffer,
3671 d3d10_effect_scalar_variable_AsShader,
3672 d3d10_effect_scalar_variable_AsBlend,
3673 d3d10_effect_scalar_variable_AsDepthStencil,
3674 d3d10_effect_scalar_variable_AsRasterizer,
3675 d3d10_effect_scalar_variable_AsSampler,
3676 d3d10_effect_scalar_variable_SetRawValue,
3677 d3d10_effect_scalar_variable_GetRawValue,
3678 /* ID3D10EffectScalarVariable methods */
3679 d3d10_effect_scalar_variable_SetFloat,
3680 d3d10_effect_scalar_variable_GetFloat,
3681 d3d10_effect_scalar_variable_SetFloatArray,
3682 d3d10_effect_scalar_variable_GetFloatArray,
3683 d3d10_effect_scalar_variable_SetInt,
3684 d3d10_effect_scalar_variable_GetInt,
3685 d3d10_effect_scalar_variable_SetIntArray,
3686 d3d10_effect_scalar_variable_GetIntArray,
3687 d3d10_effect_scalar_variable_SetBool,
3688 d3d10_effect_scalar_variable_GetBool,
3689 d3d10_effect_scalar_variable_SetBoolArray,
3690 d3d10_effect_scalar_variable_GetBoolArray,
3693 /* ID3D10EffectVariable methods */
3695 static BOOL STDMETHODCALLTYPE d3d10_effect_vector_variable_IsValid(ID3D10EffectVectorVariable *iface)
3697 TRACE("iface %p\n", iface);
3699 return (struct d3d10_effect_variable *)iface != &null_vector_variable;
3702 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetType(
3703 ID3D10EffectVectorVariable *iface)
3705 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
3708 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetDesc(ID3D10EffectVectorVariable *iface,
3709 D3D10_EFFECT_VARIABLE_DESC *desc)
3711 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
3714 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetAnnotationByIndex(
3715 ID3D10EffectVectorVariable *iface, UINT index)
3717 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
3720 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetAnnotationByName(
3721 ID3D10EffectVectorVariable *iface, LPCSTR name)
3723 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
3726 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetMemberByIndex(
3727 ID3D10EffectVectorVariable *iface, UINT index)
3729 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
3732 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetMemberByName(
3733 ID3D10EffectVectorVariable *iface, LPCSTR name)
3735 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
3738 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetMemberBySemantic(
3739 ID3D10EffectVectorVariable *iface, LPCSTR semantic)
3741 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
3744 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetElement(
3745 ID3D10EffectVectorVariable *iface, UINT index)
3747 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
3750 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_vector_variable_GetParentConstantBuffer(
3751 ID3D10EffectVectorVariable *iface)
3753 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
3756 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsScalar(
3757 ID3D10EffectVectorVariable *iface)
3759 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
3762 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsVector(
3763 ID3D10EffectVectorVariable *iface)
3765 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
3768 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsMatrix(
3769 ID3D10EffectVectorVariable *iface)
3771 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
3774 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsString(
3775 ID3D10EffectVectorVariable *iface)
3777 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
3780 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsShaderResource(
3781 ID3D10EffectVectorVariable *iface)
3783 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
3786 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsRenderTargetView(
3787 ID3D10EffectVectorVariable *iface)
3789 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
3792 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsDepthStencilView(
3793 ID3D10EffectVectorVariable *iface)
3795 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
3798 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsConstantBuffer(
3799 ID3D10EffectVectorVariable *iface)
3801 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
3804 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsShader(
3805 ID3D10EffectVectorVariable *iface)
3807 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
3810 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsBlend(
3811 ID3D10EffectVectorVariable *iface)
3813 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
3816 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsDepthStencil(
3817 ID3D10EffectVectorVariable *iface)
3819 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
3822 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsRasterizer(
3823 ID3D10EffectVectorVariable *iface)
3825 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
3828 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_vector_variable_AsSampler(
3829 ID3D10EffectVectorVariable *iface)
3831 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
3834 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_SetRawValue(ID3D10EffectVectorVariable *iface,
3835 void *data, UINT offset, UINT count)
3837 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
3840 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetRawValue(ID3D10EffectVectorVariable *iface,
3841 void *data, UINT offset, UINT count)
3843 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
3846 /* ID3D10EffectVectorVariable methods */
3848 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_SetBoolVector(ID3D10EffectVectorVariable *iface,
3851 FIXME("iface %p, value %p stub!\n", iface, value);
3856 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_SetIntVector(ID3D10EffectVectorVariable *iface,
3859 FIXME("iface %p, value %p stub!\n", iface, value);
3864 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_SetFloatVector(ID3D10EffectVectorVariable *iface,
3867 FIXME("iface %p, value %p stub!\n", iface, value);
3872 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetBoolVector(ID3D10EffectVectorVariable *iface,
3875 FIXME("iface %p, value %p stub!\n", iface, value);
3880 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetIntVector(ID3D10EffectVectorVariable *iface,
3883 FIXME("iface %p, value %p stub!\n", iface, value);
3888 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetFloatVector(ID3D10EffectVectorVariable *iface,
3891 FIXME("iface %p, value %p stub!\n", iface, value);
3896 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_SetBoolVectorArray(ID3D10EffectVectorVariable *iface,
3897 BOOL *values, UINT offset, UINT count)
3899 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3904 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_SetIntVectorArray(ID3D10EffectVectorVariable *iface,
3905 int *values, UINT offset, UINT count)
3907 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3912 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_SetFloatVectorArray(ID3D10EffectVectorVariable *iface,
3913 float *values, UINT offset, UINT count)
3915 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3920 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetBoolVectorArray(ID3D10EffectVectorVariable *iface,
3921 BOOL *values, UINT offset, UINT count)
3923 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3928 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetIntVectorArray(ID3D10EffectVectorVariable *iface,
3929 int *values, UINT offset, UINT count)
3931 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3936 static HRESULT STDMETHODCALLTYPE d3d10_effect_vector_variable_GetFloatVectorArray(ID3D10EffectVectorVariable *iface,
3937 float *values, UINT offset, UINT count)
3939 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
3944 static const struct ID3D10EffectVectorVariableVtbl d3d10_effect_vector_variable_vtbl =
3946 /* ID3D10EffectVariable methods */
3947 d3d10_effect_vector_variable_IsValid,
3948 d3d10_effect_vector_variable_GetType,
3949 d3d10_effect_vector_variable_GetDesc,
3950 d3d10_effect_vector_variable_GetAnnotationByIndex,
3951 d3d10_effect_vector_variable_GetAnnotationByName,
3952 d3d10_effect_vector_variable_GetMemberByIndex,
3953 d3d10_effect_vector_variable_GetMemberByName,
3954 d3d10_effect_vector_variable_GetMemberBySemantic,
3955 d3d10_effect_vector_variable_GetElement,
3956 d3d10_effect_vector_variable_GetParentConstantBuffer,
3957 d3d10_effect_vector_variable_AsScalar,
3958 d3d10_effect_vector_variable_AsVector,
3959 d3d10_effect_vector_variable_AsMatrix,
3960 d3d10_effect_vector_variable_AsString,
3961 d3d10_effect_vector_variable_AsShaderResource,
3962 d3d10_effect_vector_variable_AsRenderTargetView,
3963 d3d10_effect_vector_variable_AsDepthStencilView,
3964 d3d10_effect_vector_variable_AsConstantBuffer,
3965 d3d10_effect_vector_variable_AsShader,
3966 d3d10_effect_vector_variable_AsBlend,
3967 d3d10_effect_vector_variable_AsDepthStencil,
3968 d3d10_effect_vector_variable_AsRasterizer,
3969 d3d10_effect_vector_variable_AsSampler,
3970 d3d10_effect_vector_variable_SetRawValue,
3971 d3d10_effect_vector_variable_GetRawValue,
3972 /* ID3D10EffectVectorVariable methods */
3973 d3d10_effect_vector_variable_SetBoolVector,
3974 d3d10_effect_vector_variable_SetIntVector,
3975 d3d10_effect_vector_variable_SetFloatVector,
3976 d3d10_effect_vector_variable_GetBoolVector,
3977 d3d10_effect_vector_variable_GetIntVector,
3978 d3d10_effect_vector_variable_GetFloatVector,
3979 d3d10_effect_vector_variable_SetBoolVectorArray,
3980 d3d10_effect_vector_variable_SetIntVectorArray,
3981 d3d10_effect_vector_variable_SetFloatVectorArray,
3982 d3d10_effect_vector_variable_GetBoolVectorArray,
3983 d3d10_effect_vector_variable_GetIntVectorArray,
3984 d3d10_effect_vector_variable_GetFloatVectorArray,
3987 /* ID3D10EffectVariable methods */
3989 static BOOL STDMETHODCALLTYPE d3d10_effect_matrix_variable_IsValid(ID3D10EffectMatrixVariable *iface)
3991 TRACE("iface %p\n", iface);
3993 return (struct d3d10_effect_variable *)iface != &null_matrix_variable;
3996 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetType(
3997 ID3D10EffectMatrixVariable *iface)
3999 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
4002 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetDesc(ID3D10EffectMatrixVariable *iface,
4003 D3D10_EFFECT_VARIABLE_DESC *desc)
4005 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
4008 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetAnnotationByIndex(
4009 ID3D10EffectMatrixVariable *iface, UINT index)
4011 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
4014 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetAnnotationByName(
4015 ID3D10EffectMatrixVariable *iface, LPCSTR name)
4017 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
4020 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetMemberByIndex(
4021 ID3D10EffectMatrixVariable *iface, UINT index)
4023 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
4026 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetMemberByName(
4027 ID3D10EffectMatrixVariable *iface, LPCSTR name)
4029 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
4032 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetMemberBySemantic(
4033 ID3D10EffectMatrixVariable *iface, LPCSTR semantic)
4035 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
4038 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetElement(
4039 ID3D10EffectMatrixVariable *iface, UINT index)
4041 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
4044 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetParentConstantBuffer(
4045 ID3D10EffectMatrixVariable *iface)
4047 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
4050 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsScalar(
4051 ID3D10EffectMatrixVariable *iface)
4053 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
4056 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsVector(
4057 ID3D10EffectMatrixVariable *iface)
4059 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
4062 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsMatrix(
4063 ID3D10EffectMatrixVariable *iface)
4065 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
4068 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsString(
4069 ID3D10EffectMatrixVariable *iface)
4071 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
4074 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsShaderResource(
4075 ID3D10EffectMatrixVariable *iface)
4077 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
4080 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsRenderTargetView(
4081 ID3D10EffectMatrixVariable *iface)
4083 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
4086 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsDepthStencilView(
4087 ID3D10EffectMatrixVariable *iface)
4089 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
4092 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsConstantBuffer(
4093 ID3D10EffectMatrixVariable *iface)
4095 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
4098 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsShader(
4099 ID3D10EffectMatrixVariable *iface)
4101 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
4104 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsBlend(
4105 ID3D10EffectMatrixVariable *iface)
4107 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
4110 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsDepthStencil(
4111 ID3D10EffectMatrixVariable *iface)
4113 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
4116 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsRasterizer(
4117 ID3D10EffectMatrixVariable *iface)
4119 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
4122 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_matrix_variable_AsSampler(
4123 ID3D10EffectMatrixVariable *iface)
4125 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
4128 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_SetRawValue(ID3D10EffectMatrixVariable *iface,
4129 void *data, UINT offset, UINT count)
4131 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4134 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetRawValue(ID3D10EffectMatrixVariable *iface,
4135 void *data, UINT offset, UINT count)
4137 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4140 /* ID3D10EffectMatrixVariable methods */
4142 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_SetMatrix(ID3D10EffectMatrixVariable *iface,
4145 FIXME("iface %p, data %p stub!\n", iface, data);
4150 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetMatrix(ID3D10EffectMatrixVariable *iface,
4153 FIXME("iface %p, data %p stub!\n", iface, data);
4158 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_SetMatrixArray(ID3D10EffectMatrixVariable *iface,
4159 float *data, UINT offset, UINT count)
4161 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface, data, offset, count);
4166 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetMatrixArray(ID3D10EffectMatrixVariable *iface,
4167 float *data, UINT offset, UINT count)
4169 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface, data, offset, count);
4174 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_SetMatrixTranspose(ID3D10EffectMatrixVariable *iface,
4177 FIXME("iface %p, data %p stub!\n", iface, data);
4182 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetMatrixTranspose(ID3D10EffectMatrixVariable *iface,
4185 FIXME("iface %p, data %p stub!\n", iface, data);
4190 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_SetMatrixTransposeArray(ID3D10EffectMatrixVariable *iface,
4191 float *data, UINT offset, UINT count)
4193 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface, data, offset, count);
4198 static HRESULT STDMETHODCALLTYPE d3d10_effect_matrix_variable_GetMatrixTransposeArray(ID3D10EffectMatrixVariable *iface,
4199 float *data, UINT offset, UINT count)
4201 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface, data, offset, count);
4207 static const struct ID3D10EffectMatrixVariableVtbl d3d10_effect_matrix_variable_vtbl =
4209 /* ID3D10EffectVariable methods */
4210 d3d10_effect_matrix_variable_IsValid,
4211 d3d10_effect_matrix_variable_GetType,
4212 d3d10_effect_matrix_variable_GetDesc,
4213 d3d10_effect_matrix_variable_GetAnnotationByIndex,
4214 d3d10_effect_matrix_variable_GetAnnotationByName,
4215 d3d10_effect_matrix_variable_GetMemberByIndex,
4216 d3d10_effect_matrix_variable_GetMemberByName,
4217 d3d10_effect_matrix_variable_GetMemberBySemantic,
4218 d3d10_effect_matrix_variable_GetElement,
4219 d3d10_effect_matrix_variable_GetParentConstantBuffer,
4220 d3d10_effect_matrix_variable_AsScalar,
4221 d3d10_effect_matrix_variable_AsVector,
4222 d3d10_effect_matrix_variable_AsMatrix,
4223 d3d10_effect_matrix_variable_AsString,
4224 d3d10_effect_matrix_variable_AsShaderResource,
4225 d3d10_effect_matrix_variable_AsRenderTargetView,
4226 d3d10_effect_matrix_variable_AsDepthStencilView,
4227 d3d10_effect_matrix_variable_AsConstantBuffer,
4228 d3d10_effect_matrix_variable_AsShader,
4229 d3d10_effect_matrix_variable_AsBlend,
4230 d3d10_effect_matrix_variable_AsDepthStencil,
4231 d3d10_effect_matrix_variable_AsRasterizer,
4232 d3d10_effect_matrix_variable_AsSampler,
4233 d3d10_effect_matrix_variable_SetRawValue,
4234 d3d10_effect_matrix_variable_GetRawValue,
4235 /* ID3D10EffectMatrixVariable methods */
4236 d3d10_effect_matrix_variable_SetMatrix,
4237 d3d10_effect_matrix_variable_GetMatrix,
4238 d3d10_effect_matrix_variable_SetMatrixArray,
4239 d3d10_effect_matrix_variable_GetMatrixArray,
4240 d3d10_effect_matrix_variable_SetMatrixTranspose,
4241 d3d10_effect_matrix_variable_GetMatrixTranspose,
4242 d3d10_effect_matrix_variable_SetMatrixTransposeArray,
4243 d3d10_effect_matrix_variable_GetMatrixTransposeArray,
4246 /* ID3D10EffectVariable methods */
4248 static BOOL STDMETHODCALLTYPE d3d10_effect_string_variable_IsValid(ID3D10EffectStringVariable *iface)
4250 TRACE("iface %p\n", iface);
4252 return (struct d3d10_effect_variable *)iface != &null_string_variable;
4255 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_string_variable_GetType(
4256 ID3D10EffectStringVariable *iface)
4258 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
4261 static HRESULT STDMETHODCALLTYPE d3d10_effect_string_variable_GetDesc(ID3D10EffectStringVariable *iface,
4262 D3D10_EFFECT_VARIABLE_DESC *desc)
4264 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
4267 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_GetAnnotationByIndex(
4268 ID3D10EffectStringVariable *iface, UINT index)
4270 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
4273 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_GetAnnotationByName(
4274 ID3D10EffectStringVariable *iface, LPCSTR name)
4276 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
4279 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_GetMemberByIndex(
4280 ID3D10EffectStringVariable *iface, UINT index)
4282 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
4285 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_GetMemberByName(
4286 ID3D10EffectStringVariable *iface, LPCSTR name)
4288 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
4291 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_GetMemberBySemantic(
4292 ID3D10EffectStringVariable *iface, LPCSTR semantic)
4294 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
4297 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_GetElement(
4298 ID3D10EffectStringVariable *iface, UINT index)
4300 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
4303 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_string_variable_GetParentConstantBuffer(
4304 ID3D10EffectStringVariable *iface)
4306 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
4309 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsScalar(
4310 ID3D10EffectStringVariable *iface)
4312 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
4315 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsVector(
4316 ID3D10EffectStringVariable *iface)
4318 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
4321 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsMatrix(
4322 ID3D10EffectStringVariable *iface)
4324 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
4327 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsString(
4328 ID3D10EffectStringVariable *iface)
4330 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
4333 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsShaderResource(
4334 ID3D10EffectStringVariable *iface)
4336 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
4339 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsRenderTargetView(
4340 ID3D10EffectStringVariable *iface)
4342 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
4345 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsDepthStencilView(
4346 ID3D10EffectStringVariable *iface)
4348 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
4351 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_string_variable_AsConstantBuffer(
4352 ID3D10EffectStringVariable *iface)
4354 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
4357 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsShader(
4358 ID3D10EffectStringVariable *iface)
4360 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
4363 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsBlend(
4364 ID3D10EffectStringVariable *iface)
4366 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
4369 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsDepthStencil(
4370 ID3D10EffectStringVariable *iface)
4372 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
4375 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsRasterizer(
4376 ID3D10EffectStringVariable *iface)
4378 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
4381 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_string_variable_AsSampler(
4382 ID3D10EffectStringVariable *iface)
4384 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
4387 static HRESULT STDMETHODCALLTYPE d3d10_effect_string_variable_SetRawValue(ID3D10EffectStringVariable *iface,
4388 void *data, UINT offset, UINT count)
4390 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4393 static HRESULT STDMETHODCALLTYPE d3d10_effect_string_variable_GetRawValue(ID3D10EffectStringVariable *iface,
4394 void *data, UINT offset, UINT count)
4396 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4399 /* ID3D10EffectStringVariable methods */
4401 static HRESULT STDMETHODCALLTYPE d3d10_effect_string_variable_GetString(ID3D10EffectStringVariable *iface,
4404 FIXME("iface %p, str %p stub!\n", iface, str);
4409 static HRESULT STDMETHODCALLTYPE d3d10_effect_string_variable_GetStringArray(ID3D10EffectStringVariable *iface,
4410 LPCSTR *strs, UINT offset, UINT count)
4412 FIXME("iface %p, strs %p, offset %u, count %u stub!\n", iface, strs, offset, count);
4418 static const struct ID3D10EffectStringVariableVtbl d3d10_effect_string_variable_vtbl =
4420 /* ID3D10EffectVariable methods */
4421 d3d10_effect_string_variable_IsValid,
4422 d3d10_effect_string_variable_GetType,
4423 d3d10_effect_string_variable_GetDesc,
4424 d3d10_effect_string_variable_GetAnnotationByIndex,
4425 d3d10_effect_string_variable_GetAnnotationByName,
4426 d3d10_effect_string_variable_GetMemberByIndex,
4427 d3d10_effect_string_variable_GetMemberByName,
4428 d3d10_effect_string_variable_GetMemberBySemantic,
4429 d3d10_effect_string_variable_GetElement,
4430 d3d10_effect_string_variable_GetParentConstantBuffer,
4431 d3d10_effect_string_variable_AsScalar,
4432 d3d10_effect_string_variable_AsVector,
4433 d3d10_effect_string_variable_AsMatrix,
4434 d3d10_effect_string_variable_AsString,
4435 d3d10_effect_string_variable_AsShaderResource,
4436 d3d10_effect_string_variable_AsRenderTargetView,
4437 d3d10_effect_string_variable_AsDepthStencilView,
4438 d3d10_effect_string_variable_AsConstantBuffer,
4439 d3d10_effect_string_variable_AsShader,
4440 d3d10_effect_string_variable_AsBlend,
4441 d3d10_effect_string_variable_AsDepthStencil,
4442 d3d10_effect_string_variable_AsRasterizer,
4443 d3d10_effect_string_variable_AsSampler,
4444 d3d10_effect_string_variable_SetRawValue,
4445 d3d10_effect_string_variable_GetRawValue,
4446 /* ID3D10EffectStringVariable methods */
4447 d3d10_effect_string_variable_GetString,
4448 d3d10_effect_string_variable_GetStringArray,
4451 /* ID3D10EffectVariable methods */
4453 static BOOL STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_IsValid(ID3D10EffectShaderResourceVariable *iface)
4455 TRACE("iface %p\n", iface);
4457 return (struct d3d10_effect_variable *)iface != &null_shader_resource_variable;
4460 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetType(
4461 ID3D10EffectShaderResourceVariable *iface)
4463 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
4466 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetDesc(
4467 ID3D10EffectShaderResourceVariable *iface, D3D10_EFFECT_VARIABLE_DESC *desc)
4469 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
4472 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetAnnotationByIndex(
4473 ID3D10EffectShaderResourceVariable *iface, UINT index)
4475 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
4478 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetAnnotationByName(
4479 ID3D10EffectShaderResourceVariable *iface, LPCSTR name)
4481 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
4484 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetMemberByIndex(
4485 ID3D10EffectShaderResourceVariable *iface, UINT index)
4487 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
4490 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetMemberByName(
4491 ID3D10EffectShaderResourceVariable *iface, LPCSTR name)
4493 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
4496 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetMemberBySemantic(
4497 ID3D10EffectShaderResourceVariable *iface, LPCSTR semantic)
4499 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
4502 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetElement(
4503 ID3D10EffectShaderResourceVariable *iface, UINT index)
4505 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
4508 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetParentConstantBuffer(
4509 ID3D10EffectShaderResourceVariable *iface)
4511 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
4514 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsScalar(
4515 ID3D10EffectShaderResourceVariable *iface)
4517 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
4520 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsVector(
4521 ID3D10EffectShaderResourceVariable *iface)
4523 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
4526 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsMatrix(
4527 ID3D10EffectShaderResourceVariable *iface)
4529 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
4532 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsString(
4533 ID3D10EffectShaderResourceVariable *iface)
4535 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
4538 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsShaderResource(
4539 ID3D10EffectShaderResourceVariable *iface)
4541 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
4544 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsRenderTargetView(
4545 ID3D10EffectShaderResourceVariable *iface)
4547 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
4550 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsDepthStencilView(
4551 ID3D10EffectShaderResourceVariable *iface)
4553 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
4556 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsConstantBuffer(
4557 ID3D10EffectShaderResourceVariable *iface)
4559 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
4562 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsShader(
4563 ID3D10EffectShaderResourceVariable *iface)
4565 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
4568 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsBlend(
4569 ID3D10EffectShaderResourceVariable *iface)
4571 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
4574 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsDepthStencil(
4575 ID3D10EffectShaderResourceVariable *iface)
4577 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
4580 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsRasterizer(
4581 ID3D10EffectShaderResourceVariable *iface)
4583 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
4586 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_AsSampler(
4587 ID3D10EffectShaderResourceVariable *iface)
4589 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
4592 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_SetRawValue(
4593 ID3D10EffectShaderResourceVariable *iface, void *data, UINT offset, UINT count)
4595 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4598 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetRawValue(
4599 ID3D10EffectShaderResourceVariable *iface, void *data, UINT offset, UINT count)
4601 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4604 /* ID3D10EffectShaderResourceVariable methods */
4606 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_SetResource(
4607 ID3D10EffectShaderResourceVariable *iface, ID3D10ShaderResourceView *resource)
4609 FIXME("iface %p, resource %p stub!\n", iface, resource);
4614 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetResource(
4615 ID3D10EffectShaderResourceVariable *iface, ID3D10ShaderResourceView **resource)
4617 FIXME("iface %p, resource %p stub!\n", iface, resource);
4622 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_SetResourceArray(
4623 ID3D10EffectShaderResourceVariable *iface, ID3D10ShaderResourceView **resources, UINT offset, UINT count)
4625 FIXME("iface %p, resources %p, offset %u, count %u stub!\n", iface, resources, offset, count);
4630 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_GetResourceArray(
4631 ID3D10EffectShaderResourceVariable *iface, ID3D10ShaderResourceView **resources, UINT offset, UINT count)
4633 FIXME("iface %p, resources %p, offset %u, count %u stub!\n", iface, resources, offset, count);
4639 static const struct ID3D10EffectShaderResourceVariableVtbl d3d10_effect_shader_resource_variable_vtbl =
4641 /* ID3D10EffectVariable methods */
4642 d3d10_effect_shader_resource_variable_IsValid,
4643 d3d10_effect_shader_resource_variable_GetType,
4644 d3d10_effect_shader_resource_variable_GetDesc,
4645 d3d10_effect_shader_resource_variable_GetAnnotationByIndex,
4646 d3d10_effect_shader_resource_variable_GetAnnotationByName,
4647 d3d10_effect_shader_resource_variable_GetMemberByIndex,
4648 d3d10_effect_shader_resource_variable_GetMemberByName,
4649 d3d10_effect_shader_resource_variable_GetMemberBySemantic,
4650 d3d10_effect_shader_resource_variable_GetElement,
4651 d3d10_effect_shader_resource_variable_GetParentConstantBuffer,
4652 d3d10_effect_shader_resource_variable_AsScalar,
4653 d3d10_effect_shader_resource_variable_AsVector,
4654 d3d10_effect_shader_resource_variable_AsMatrix,
4655 d3d10_effect_shader_resource_variable_AsString,
4656 d3d10_effect_shader_resource_variable_AsShaderResource,
4657 d3d10_effect_shader_resource_variable_AsRenderTargetView,
4658 d3d10_effect_shader_resource_variable_AsDepthStencilView,
4659 d3d10_effect_shader_resource_variable_AsConstantBuffer,
4660 d3d10_effect_shader_resource_variable_AsShader,
4661 d3d10_effect_shader_resource_variable_AsBlend,
4662 d3d10_effect_shader_resource_variable_AsDepthStencil,
4663 d3d10_effect_shader_resource_variable_AsRasterizer,
4664 d3d10_effect_shader_resource_variable_AsSampler,
4665 d3d10_effect_shader_resource_variable_SetRawValue,
4666 d3d10_effect_shader_resource_variable_GetRawValue,
4667 /* ID3D10EffectShaderResourceVariable methods */
4668 d3d10_effect_shader_resource_variable_SetResource,
4669 d3d10_effect_shader_resource_variable_GetResource,
4670 d3d10_effect_shader_resource_variable_SetResourceArray,
4671 d3d10_effect_shader_resource_variable_GetResourceArray,
4674 /* ID3D10EffectVariable methods */
4676 static BOOL STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_IsValid(
4677 ID3D10EffectRenderTargetViewVariable *iface)
4679 TRACE("iface %p\n", iface);
4681 return (struct d3d10_effect_variable *)iface != &null_render_target_view_variable;
4684 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetType(
4685 ID3D10EffectRenderTargetViewVariable *iface)
4687 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
4690 static HRESULT STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetDesc(
4691 ID3D10EffectRenderTargetViewVariable *iface, D3D10_EFFECT_VARIABLE_DESC *desc)
4693 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
4696 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetAnnotationByIndex(
4697 ID3D10EffectRenderTargetViewVariable *iface, UINT index)
4699 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
4702 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetAnnotationByName(
4703 ID3D10EffectRenderTargetViewVariable *iface, LPCSTR name)
4705 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
4708 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetMemberByIndex(
4709 ID3D10EffectRenderTargetViewVariable *iface, UINT index)
4711 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
4714 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetMemberByName(
4715 ID3D10EffectRenderTargetViewVariable *iface, LPCSTR name)
4717 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
4720 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetMemberBySemantic(
4721 ID3D10EffectRenderTargetViewVariable *iface, LPCSTR semantic)
4723 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
4726 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetElement(
4727 ID3D10EffectRenderTargetViewVariable *iface, UINT index)
4729 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
4732 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetParentConstantBuffer(
4733 ID3D10EffectRenderTargetViewVariable *iface)
4735 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
4738 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsScalar(
4739 ID3D10EffectRenderTargetViewVariable *iface)
4741 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
4744 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsVector(
4745 ID3D10EffectRenderTargetViewVariable *iface)
4747 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
4750 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsMatrix(
4751 ID3D10EffectRenderTargetViewVariable *iface)
4753 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
4756 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsString(
4757 ID3D10EffectRenderTargetViewVariable *iface)
4759 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
4762 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsShaderResource(
4763 ID3D10EffectRenderTargetViewVariable *iface)
4765 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
4768 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsRenderTargetView(
4769 ID3D10EffectRenderTargetViewVariable *iface)
4771 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
4774 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsDepthStencilView(
4775 ID3D10EffectRenderTargetViewVariable *iface)
4777 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
4780 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsConstantBuffer(
4781 ID3D10EffectRenderTargetViewVariable *iface)
4783 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
4786 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsShader(
4787 ID3D10EffectRenderTargetViewVariable *iface)
4789 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
4792 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsBlend(
4793 ID3D10EffectRenderTargetViewVariable *iface)
4795 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
4798 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsDepthStencil(
4799 ID3D10EffectRenderTargetViewVariable *iface)
4801 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
4804 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsRasterizer(
4805 ID3D10EffectRenderTargetViewVariable *iface)
4807 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
4810 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_AsSampler(
4811 ID3D10EffectRenderTargetViewVariable *iface)
4813 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
4816 static HRESULT STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_SetRawValue(
4817 ID3D10EffectRenderTargetViewVariable *iface, void *data, UINT offset, UINT count)
4819 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4822 static HRESULT STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetRawValue(
4823 ID3D10EffectRenderTargetViewVariable *iface, void *data, UINT offset, UINT count)
4825 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
4828 /* ID3D10EffectRenderTargetViewVariable methods */
4830 static HRESULT STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_SetRenderTarget(
4831 ID3D10EffectRenderTargetViewVariable *iface, ID3D10RenderTargetView *view)
4833 FIXME("iface %p, view %p stub!\n", iface, view);
4838 static HRESULT STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetRenderTarget(
4839 ID3D10EffectRenderTargetViewVariable *iface, ID3D10RenderTargetView **view)
4841 FIXME("iface %p, view %p stub!\n", iface, view);
4846 static HRESULT STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_SetRenderTargetArray(
4847 ID3D10EffectRenderTargetViewVariable *iface, ID3D10RenderTargetView **views, UINT offset, UINT count)
4849 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface, views, offset, count);
4854 static HRESULT STDMETHODCALLTYPE d3d10_effect_render_target_view_variable_GetRenderTargetArray(
4855 ID3D10EffectRenderTargetViewVariable *iface, ID3D10RenderTargetView **views, UINT offset, UINT count)
4857 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface, views, offset, count);
4863 static const struct ID3D10EffectRenderTargetViewVariableVtbl d3d10_effect_render_target_view_variable_vtbl =
4865 /* ID3D10EffectVariable methods */
4866 d3d10_effect_render_target_view_variable_IsValid,
4867 d3d10_effect_render_target_view_variable_GetType,
4868 d3d10_effect_render_target_view_variable_GetDesc,
4869 d3d10_effect_render_target_view_variable_GetAnnotationByIndex,
4870 d3d10_effect_render_target_view_variable_GetAnnotationByName,
4871 d3d10_effect_render_target_view_variable_GetMemberByIndex,
4872 d3d10_effect_render_target_view_variable_GetMemberByName,
4873 d3d10_effect_render_target_view_variable_GetMemberBySemantic,
4874 d3d10_effect_render_target_view_variable_GetElement,
4875 d3d10_effect_render_target_view_variable_GetParentConstantBuffer,
4876 d3d10_effect_render_target_view_variable_AsScalar,
4877 d3d10_effect_render_target_view_variable_AsVector,
4878 d3d10_effect_render_target_view_variable_AsMatrix,
4879 d3d10_effect_render_target_view_variable_AsString,
4880 d3d10_effect_render_target_view_variable_AsShaderResource,
4881 d3d10_effect_render_target_view_variable_AsRenderTargetView,
4882 d3d10_effect_render_target_view_variable_AsDepthStencilView,
4883 d3d10_effect_render_target_view_variable_AsConstantBuffer,
4884 d3d10_effect_render_target_view_variable_AsShader,
4885 d3d10_effect_render_target_view_variable_AsBlend,
4886 d3d10_effect_render_target_view_variable_AsDepthStencil,
4887 d3d10_effect_render_target_view_variable_AsRasterizer,
4888 d3d10_effect_render_target_view_variable_AsSampler,
4889 d3d10_effect_render_target_view_variable_SetRawValue,
4890 d3d10_effect_render_target_view_variable_GetRawValue,
4891 /* ID3D10EffectRenderTargetViewVariable methods */
4892 d3d10_effect_render_target_view_variable_SetRenderTarget,
4893 d3d10_effect_render_target_view_variable_GetRenderTarget,
4894 d3d10_effect_render_target_view_variable_SetRenderTargetArray,
4895 d3d10_effect_render_target_view_variable_GetRenderTargetArray,
4898 /* ID3D10EffectVariable methods */
4900 static BOOL STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_IsValid(
4901 ID3D10EffectDepthStencilViewVariable *iface)
4903 TRACE("iface %p\n", iface);
4905 return (struct d3d10_effect_variable *)iface != &null_depth_stencil_view_variable;
4908 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetType(
4909 ID3D10EffectDepthStencilViewVariable *iface)
4911 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
4914 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetDesc(
4915 ID3D10EffectDepthStencilViewVariable *iface, D3D10_EFFECT_VARIABLE_DESC *desc)
4917 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
4920 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetAnnotationByIndex(
4921 ID3D10EffectDepthStencilViewVariable *iface, UINT index)
4923 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
4926 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetAnnotationByName(
4927 ID3D10EffectDepthStencilViewVariable *iface, LPCSTR name)
4929 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
4932 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetMemberByIndex(
4933 ID3D10EffectDepthStencilViewVariable *iface, UINT index)
4935 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
4938 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetMemberByName(
4939 ID3D10EffectDepthStencilViewVariable *iface, LPCSTR name)
4941 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
4944 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetMemberBySemantic(
4945 ID3D10EffectDepthStencilViewVariable *iface, LPCSTR semantic)
4947 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
4950 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetElement(
4951 ID3D10EffectDepthStencilViewVariable *iface, UINT index)
4953 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
4956 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetParentConstantBuffer(
4957 ID3D10EffectDepthStencilViewVariable *iface)
4959 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
4962 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsScalar(
4963 ID3D10EffectDepthStencilViewVariable *iface)
4965 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
4968 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsVector(
4969 ID3D10EffectDepthStencilViewVariable *iface)
4971 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
4974 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsMatrix(
4975 ID3D10EffectDepthStencilViewVariable *iface)
4977 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
4980 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsString(
4981 ID3D10EffectDepthStencilViewVariable *iface)
4983 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
4986 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsShaderResource(
4987 ID3D10EffectDepthStencilViewVariable *iface)
4989 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
4992 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsRenderTargetView(
4993 ID3D10EffectDepthStencilViewVariable *iface)
4995 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
4998 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsDepthStencilView(
4999 ID3D10EffectDepthStencilViewVariable *iface)
5001 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
5004 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsConstantBuffer(
5005 ID3D10EffectDepthStencilViewVariable *iface)
5007 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
5010 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsShader(
5011 ID3D10EffectDepthStencilViewVariable *iface)
5013 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
5016 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsBlend(
5017 ID3D10EffectDepthStencilViewVariable *iface)
5019 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
5022 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsDepthStencil(
5023 ID3D10EffectDepthStencilViewVariable *iface)
5025 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
5028 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsRasterizer(
5029 ID3D10EffectDepthStencilViewVariable *iface)
5031 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
5034 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_AsSampler(
5035 ID3D10EffectDepthStencilViewVariable *iface)
5037 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
5040 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_SetRawValue(
5041 ID3D10EffectDepthStencilViewVariable *iface, void *data, UINT offset, UINT count)
5043 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5046 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetRawValue(
5047 ID3D10EffectDepthStencilViewVariable *iface, void *data, UINT offset, UINT count)
5049 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5052 /* ID3D10EffectDepthStencilViewVariable methods */
5054 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_SetDepthStencil(
5055 ID3D10EffectDepthStencilViewVariable *iface, ID3D10DepthStencilView *view)
5057 FIXME("iface %p, view %p stub!\n", iface, view);
5062 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetDepthStencil(
5063 ID3D10EffectDepthStencilViewVariable *iface, ID3D10DepthStencilView **view)
5065 FIXME("iface %p, view %p stub!\n", iface, view);
5070 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_SetDepthStencilArray(
5071 ID3D10EffectDepthStencilViewVariable *iface, ID3D10DepthStencilView **views, UINT offset, UINT count)
5073 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface, views, offset, count);
5078 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_view_variable_GetDepthStencilArray(
5079 ID3D10EffectDepthStencilViewVariable *iface, ID3D10DepthStencilView **views, UINT offset, UINT count)
5081 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface, views, offset, count);
5087 static const struct ID3D10EffectDepthStencilViewVariableVtbl d3d10_effect_depth_stencil_view_variable_vtbl =
5089 /* ID3D10EffectVariable methods */
5090 d3d10_effect_depth_stencil_view_variable_IsValid,
5091 d3d10_effect_depth_stencil_view_variable_GetType,
5092 d3d10_effect_depth_stencil_view_variable_GetDesc,
5093 d3d10_effect_depth_stencil_view_variable_GetAnnotationByIndex,
5094 d3d10_effect_depth_stencil_view_variable_GetAnnotationByName,
5095 d3d10_effect_depth_stencil_view_variable_GetMemberByIndex,
5096 d3d10_effect_depth_stencil_view_variable_GetMemberByName,
5097 d3d10_effect_depth_stencil_view_variable_GetMemberBySemantic,
5098 d3d10_effect_depth_stencil_view_variable_GetElement,
5099 d3d10_effect_depth_stencil_view_variable_GetParentConstantBuffer,
5100 d3d10_effect_depth_stencil_view_variable_AsScalar,
5101 d3d10_effect_depth_stencil_view_variable_AsVector,
5102 d3d10_effect_depth_stencil_view_variable_AsMatrix,
5103 d3d10_effect_depth_stencil_view_variable_AsString,
5104 d3d10_effect_depth_stencil_view_variable_AsShaderResource,
5105 d3d10_effect_depth_stencil_view_variable_AsRenderTargetView,
5106 d3d10_effect_depth_stencil_view_variable_AsDepthStencilView,
5107 d3d10_effect_depth_stencil_view_variable_AsConstantBuffer,
5108 d3d10_effect_depth_stencil_view_variable_AsShader,
5109 d3d10_effect_depth_stencil_view_variable_AsBlend,
5110 d3d10_effect_depth_stencil_view_variable_AsDepthStencil,
5111 d3d10_effect_depth_stencil_view_variable_AsRasterizer,
5112 d3d10_effect_depth_stencil_view_variable_AsSampler,
5113 d3d10_effect_depth_stencil_view_variable_SetRawValue,
5114 d3d10_effect_depth_stencil_view_variable_GetRawValue,
5115 /* ID3D10EffectDepthStencilViewVariable methods */
5116 d3d10_effect_depth_stencil_view_variable_SetDepthStencil,
5117 d3d10_effect_depth_stencil_view_variable_GetDepthStencil,
5118 d3d10_effect_depth_stencil_view_variable_SetDepthStencilArray,
5119 d3d10_effect_depth_stencil_view_variable_GetDepthStencilArray,
5122 /* ID3D10EffectVariable methods */
5124 static BOOL STDMETHODCALLTYPE d3d10_effect_shader_variable_IsValid(ID3D10EffectShaderVariable *iface)
5126 TRACE("iface %p\n", iface);
5128 return (struct d3d10_effect_variable *)iface != &null_shader_variable;
5131 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetType(
5132 ID3D10EffectShaderVariable *iface)
5134 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
5137 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetDesc(ID3D10EffectShaderVariable *iface,
5138 D3D10_EFFECT_VARIABLE_DESC *desc)
5140 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
5143 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetAnnotationByIndex(
5144 ID3D10EffectShaderVariable *iface, UINT index)
5146 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
5149 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetAnnotationByName(
5150 ID3D10EffectShaderVariable *iface, LPCSTR name)
5152 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
5155 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetMemberByIndex(
5156 ID3D10EffectShaderVariable *iface, UINT index)
5158 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
5161 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetMemberByName(
5162 ID3D10EffectShaderVariable *iface, LPCSTR name)
5164 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
5167 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetMemberBySemantic(
5168 ID3D10EffectShaderVariable *iface, LPCSTR semantic)
5170 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
5173 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetElement(
5174 ID3D10EffectShaderVariable *iface, UINT index)
5176 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
5179 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_shader_variable_GetParentConstantBuffer(
5180 ID3D10EffectShaderVariable *iface)
5182 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
5185 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsScalar(
5186 ID3D10EffectShaderVariable *iface)
5188 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
5191 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsVector(
5192 ID3D10EffectShaderVariable *iface)
5194 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
5197 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsMatrix(
5198 ID3D10EffectShaderVariable *iface)
5200 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
5203 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsString(
5204 ID3D10EffectShaderVariable *iface)
5206 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
5209 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsShaderResource(
5210 ID3D10EffectShaderVariable *iface)
5212 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
5215 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsRenderTargetView(
5216 ID3D10EffectShaderVariable *iface)
5218 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
5221 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsDepthStencilView(
5222 ID3D10EffectShaderVariable *iface)
5224 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
5227 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsConstantBuffer(
5228 ID3D10EffectShaderVariable *iface)
5230 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
5233 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsShader(
5234 ID3D10EffectShaderVariable *iface)
5236 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
5239 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsBlend(
5240 ID3D10EffectShaderVariable *iface)
5242 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
5245 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsDepthStencil(
5246 ID3D10EffectShaderVariable *iface)
5248 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
5251 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsRasterizer(
5252 ID3D10EffectShaderVariable *iface)
5254 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
5257 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_shader_variable_AsSampler(
5258 ID3D10EffectShaderVariable *iface)
5260 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
5263 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_SetRawValue(
5264 ID3D10EffectShaderVariable *iface, void *data, UINT offset, UINT count)
5266 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5269 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetRawValue(
5270 ID3D10EffectShaderVariable *iface, void *data, UINT offset, UINT count)
5272 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5275 /* ID3D10EffectShaderVariable methods */
5277 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetShaderDesc(
5278 ID3D10EffectShaderVariable *iface, UINT index, D3D10_EFFECT_SHADER_DESC *desc)
5280 FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc);
5285 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetVertexShader(
5286 ID3D10EffectShaderVariable *iface, UINT index, ID3D10VertexShader **shader)
5288 FIXME("iface %p, index %u, shader %p stub!\n", iface, index, shader);
5293 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetGeometryShader(
5294 ID3D10EffectShaderVariable *iface, UINT index, ID3D10GeometryShader **shader)
5296 FIXME("iface %p, index %u, shader %p stub!\n", iface, index, shader);
5301 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetPixelShader(
5302 ID3D10EffectShaderVariable *iface, UINT index, ID3D10PixelShader **shader)
5304 FIXME("iface %p, index %u, shader %p stub!\n", iface, index, shader);
5309 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetInputSignatureElementDesc(
5310 ID3D10EffectShaderVariable *iface, UINT shader_index, UINT element_index,
5311 D3D10_SIGNATURE_PARAMETER_DESC *desc)
5313 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
5314 struct d3d10_effect_shader_variable *s;
5315 D3D10_SIGNATURE_PARAMETER_DESC *d;
5317 TRACE("iface %p, shader_index %u, element_index %u, desc %p\n",
5318 iface, shader_index, element_index, desc);
5320 if (!iface->lpVtbl->IsValid(iface))
5322 WARN("Null variable specified\n");
5326 /* Check shader_index, this crashes on W7/DX10 */
5327 if (shader_index >= This->effect->used_shader_count)
5329 WARN("This should crash on W7/DX10!\n");
5333 s = This->effect->used_shaders[shader_index]->data;
5334 if (!s->input_signature.signature)
5336 WARN("No shader signature\n");
5337 return D3DERR_INVALIDCALL;
5340 /* Check desc for NULL, this crashes on W7/DX10 */
5343 WARN("This should crash on W7/DX10!\n");
5347 if (element_index >= s->input_signature.element_count)
5349 WARN("Invalid element index specified\n");
5350 return E_INVALIDARG;
5353 d = &s->input_signature.elements[element_index];
5354 desc->SemanticName = d->SemanticName;
5355 desc->SemanticIndex = d->SemanticIndex;
5356 desc->SystemValueType = d->SystemValueType;
5357 desc->ComponentType = d->ComponentType;
5358 desc->Register = d->Register;
5359 desc->ReadWriteMask = d->ReadWriteMask;
5360 desc->Mask = d->Mask;
5365 static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetOutputSignatureElementDesc(
5366 ID3D10EffectShaderVariable *iface, UINT shader_index, UINT element_index,
5367 D3D10_SIGNATURE_PARAMETER_DESC *desc)
5369 struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
5370 struct d3d10_effect_shader_variable *s;
5371 D3D10_SIGNATURE_PARAMETER_DESC *d;
5373 TRACE("iface %p, shader_index %u, element_index %u, desc %p\n",
5374 iface, shader_index, element_index, desc);
5376 if (!iface->lpVtbl->IsValid(iface))
5378 WARN("Null variable specified\n");
5382 /* Check shader_index, this crashes on W7/DX10 */
5383 if (shader_index >= This->effect->used_shader_count)
5385 WARN("This should crash on W7/DX10!\n");
5389 s = This->effect->used_shaders[shader_index]->data;
5390 if (!s->output_signature.signature)
5392 WARN("No shader signature\n");
5393 return D3DERR_INVALIDCALL;
5396 /* Check desc for NULL, this crashes on W7/DX10 */
5399 WARN("This should crash on W7/DX10!\n");
5403 if (element_index >= s->output_signature.element_count)
5405 WARN("Invalid element index specified\n");
5406 return E_INVALIDARG;
5409 d = &s->output_signature.elements[element_index];
5410 desc->SemanticName = d->SemanticName;
5411 desc->SemanticIndex = d->SemanticIndex;
5412 desc->SystemValueType = d->SystemValueType;
5413 desc->ComponentType = d->ComponentType;
5414 desc->Register = d->Register;
5415 desc->ReadWriteMask = d->ReadWriteMask;
5416 desc->Mask = d->Mask;
5422 static const struct ID3D10EffectShaderVariableVtbl d3d10_effect_shader_variable_vtbl =
5424 /* ID3D10EffectVariable methods */
5425 d3d10_effect_shader_variable_IsValid,
5426 d3d10_effect_shader_variable_GetType,
5427 d3d10_effect_shader_variable_GetDesc,
5428 d3d10_effect_shader_variable_GetAnnotationByIndex,
5429 d3d10_effect_shader_variable_GetAnnotationByName,
5430 d3d10_effect_shader_variable_GetMemberByIndex,
5431 d3d10_effect_shader_variable_GetMemberByName,
5432 d3d10_effect_shader_variable_GetMemberBySemantic,
5433 d3d10_effect_shader_variable_GetElement,
5434 d3d10_effect_shader_variable_GetParentConstantBuffer,
5435 d3d10_effect_shader_variable_AsScalar,
5436 d3d10_effect_shader_variable_AsVector,
5437 d3d10_effect_shader_variable_AsMatrix,
5438 d3d10_effect_shader_variable_AsString,
5439 d3d10_effect_shader_variable_AsShaderResource,
5440 d3d10_effect_shader_variable_AsRenderTargetView,
5441 d3d10_effect_shader_variable_AsDepthStencilView,
5442 d3d10_effect_shader_variable_AsConstantBuffer,
5443 d3d10_effect_shader_variable_AsShader,
5444 d3d10_effect_shader_variable_AsBlend,
5445 d3d10_effect_shader_variable_AsDepthStencil,
5446 d3d10_effect_shader_variable_AsRasterizer,
5447 d3d10_effect_shader_variable_AsSampler,
5448 d3d10_effect_shader_variable_SetRawValue,
5449 d3d10_effect_shader_variable_GetRawValue,
5450 /* ID3D10EffectShaderVariable methods */
5451 d3d10_effect_shader_variable_GetShaderDesc,
5452 d3d10_effect_shader_variable_GetVertexShader,
5453 d3d10_effect_shader_variable_GetGeometryShader,
5454 d3d10_effect_shader_variable_GetPixelShader,
5455 d3d10_effect_shader_variable_GetInputSignatureElementDesc,
5456 d3d10_effect_shader_variable_GetOutputSignatureElementDesc,
5459 /* ID3D10EffectVariable methods */
5461 static BOOL STDMETHODCALLTYPE d3d10_effect_blend_variable_IsValid(ID3D10EffectBlendVariable *iface)
5463 TRACE("iface %p\n", iface);
5465 return (struct d3d10_effect_variable *)iface != &null_blend_variable;
5468 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetType(
5469 ID3D10EffectBlendVariable *iface)
5471 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
5474 static HRESULT STDMETHODCALLTYPE d3d10_effect_blend_variable_GetDesc(ID3D10EffectBlendVariable *iface,
5475 D3D10_EFFECT_VARIABLE_DESC *desc)
5477 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
5480 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetAnnotationByIndex(
5481 ID3D10EffectBlendVariable *iface, UINT index)
5483 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
5486 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetAnnotationByName(
5487 ID3D10EffectBlendVariable *iface, LPCSTR name)
5489 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
5492 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetMemberByIndex(
5493 ID3D10EffectBlendVariable *iface, UINT index)
5495 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
5498 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetMemberByName(
5499 ID3D10EffectBlendVariable *iface, LPCSTR name)
5501 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
5504 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetMemberBySemantic(
5505 ID3D10EffectBlendVariable *iface, LPCSTR semantic)
5507 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
5510 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetElement(
5511 ID3D10EffectBlendVariable *iface, UINT index)
5513 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
5516 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_blend_variable_GetParentConstantBuffer(
5517 ID3D10EffectBlendVariable *iface)
5519 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
5522 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsScalar(
5523 ID3D10EffectBlendVariable *iface)
5525 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
5528 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsVector(
5529 ID3D10EffectBlendVariable *iface)
5531 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
5534 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsMatrix(
5535 ID3D10EffectBlendVariable *iface)
5537 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
5540 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsString(
5541 ID3D10EffectBlendVariable *iface)
5543 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
5546 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsShaderResource(
5547 ID3D10EffectBlendVariable *iface)
5549 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
5552 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsRenderTargetView(
5553 ID3D10EffectBlendVariable *iface)
5555 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
5558 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsDepthStencilView(
5559 ID3D10EffectBlendVariable *iface)
5561 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
5564 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsConstantBuffer(
5565 ID3D10EffectBlendVariable *iface)
5567 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
5570 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsShader(
5571 ID3D10EffectBlendVariable *iface)
5573 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
5576 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsBlend(
5577 ID3D10EffectBlendVariable *iface)
5579 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
5582 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsDepthStencil(
5583 ID3D10EffectBlendVariable *iface)
5585 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
5588 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsRasterizer(
5589 ID3D10EffectBlendVariable *iface)
5591 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
5594 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_blend_variable_AsSampler(
5595 ID3D10EffectBlendVariable *iface)
5597 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
5600 static HRESULT STDMETHODCALLTYPE d3d10_effect_blend_variable_SetRawValue(ID3D10EffectBlendVariable *iface,
5601 void *data, UINT offset, UINT count)
5603 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5606 static HRESULT STDMETHODCALLTYPE d3d10_effect_blend_variable_GetRawValue(ID3D10EffectBlendVariable *iface,
5607 void *data, UINT offset, UINT count)
5609 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5612 /* ID3D10EffectBlendVariable methods */
5614 static HRESULT STDMETHODCALLTYPE d3d10_effect_blend_variable_GetBlendState(ID3D10EffectBlendVariable *iface,
5615 UINT index, ID3D10BlendState **blend_state)
5617 FIXME("iface %p, index %u, blend_state %p stub!\n", iface, index, blend_state);
5622 static HRESULT STDMETHODCALLTYPE d3d10_effect_blend_variable_GetBackingStore(ID3D10EffectBlendVariable *iface,
5623 UINT index, D3D10_BLEND_DESC *desc)
5625 FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc);
5631 static const struct ID3D10EffectBlendVariableVtbl d3d10_effect_blend_variable_vtbl =
5633 /* ID3D10EffectVariable methods */
5634 d3d10_effect_blend_variable_IsValid,
5635 d3d10_effect_blend_variable_GetType,
5636 d3d10_effect_blend_variable_GetDesc,
5637 d3d10_effect_blend_variable_GetAnnotationByIndex,
5638 d3d10_effect_blend_variable_GetAnnotationByName,
5639 d3d10_effect_blend_variable_GetMemberByIndex,
5640 d3d10_effect_blend_variable_GetMemberByName,
5641 d3d10_effect_blend_variable_GetMemberBySemantic,
5642 d3d10_effect_blend_variable_GetElement,
5643 d3d10_effect_blend_variable_GetParentConstantBuffer,
5644 d3d10_effect_blend_variable_AsScalar,
5645 d3d10_effect_blend_variable_AsVector,
5646 d3d10_effect_blend_variable_AsMatrix,
5647 d3d10_effect_blend_variable_AsString,
5648 d3d10_effect_blend_variable_AsShaderResource,
5649 d3d10_effect_blend_variable_AsRenderTargetView,
5650 d3d10_effect_blend_variable_AsDepthStencilView,
5651 d3d10_effect_blend_variable_AsConstantBuffer,
5652 d3d10_effect_blend_variable_AsShader,
5653 d3d10_effect_blend_variable_AsBlend,
5654 d3d10_effect_blend_variable_AsDepthStencil,
5655 d3d10_effect_blend_variable_AsRasterizer,
5656 d3d10_effect_blend_variable_AsSampler,
5657 d3d10_effect_blend_variable_SetRawValue,
5658 d3d10_effect_blend_variable_GetRawValue,
5659 /* ID3D10EffectBlendVariable methods */
5660 d3d10_effect_blend_variable_GetBlendState,
5661 d3d10_effect_blend_variable_GetBackingStore,
5664 /* ID3D10EffectVariable methods */
5666 static BOOL STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_IsValid(ID3D10EffectDepthStencilVariable *iface)
5668 TRACE("iface %p\n", iface);
5670 return (struct d3d10_effect_variable *)iface != &null_depth_stencil_variable;
5673 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetType(
5674 ID3D10EffectDepthStencilVariable *iface)
5676 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
5679 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetDesc(ID3D10EffectDepthStencilVariable *iface,
5680 D3D10_EFFECT_VARIABLE_DESC *desc)
5682 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
5685 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetAnnotationByIndex(
5686 ID3D10EffectDepthStencilVariable *iface, UINT index)
5688 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
5691 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetAnnotationByName(
5692 ID3D10EffectDepthStencilVariable *iface, LPCSTR name)
5694 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
5697 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetMemberByIndex(
5698 ID3D10EffectDepthStencilVariable *iface, UINT index)
5700 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
5703 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetMemberByName(
5704 ID3D10EffectDepthStencilVariable *iface, LPCSTR name)
5706 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
5709 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetMemberBySemantic(
5710 ID3D10EffectDepthStencilVariable *iface, LPCSTR semantic)
5712 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
5715 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetElement(
5716 ID3D10EffectDepthStencilVariable *iface, UINT index)
5718 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
5721 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetParentConstantBuffer(
5722 ID3D10EffectDepthStencilVariable *iface)
5724 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
5727 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsScalar(
5728 ID3D10EffectDepthStencilVariable *iface)
5730 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
5733 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsVector(
5734 ID3D10EffectDepthStencilVariable *iface)
5736 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
5739 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsMatrix(
5740 ID3D10EffectDepthStencilVariable *iface)
5742 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
5745 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsString(
5746 ID3D10EffectDepthStencilVariable *iface)
5748 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
5751 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsShaderResource(
5752 ID3D10EffectDepthStencilVariable *iface)
5754 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
5757 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsRenderTargetView(
5758 ID3D10EffectDepthStencilVariable *iface)
5760 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
5763 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsDepthStencilView(
5764 ID3D10EffectDepthStencilVariable *iface)
5766 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
5769 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsConstantBuffer(
5770 ID3D10EffectDepthStencilVariable *iface)
5772 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
5775 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsShader(
5776 ID3D10EffectDepthStencilVariable *iface)
5778 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
5781 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsBlend(
5782 ID3D10EffectDepthStencilVariable *iface)
5784 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
5787 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsDepthStencil(
5788 ID3D10EffectDepthStencilVariable *iface)
5790 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
5793 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsRasterizer(
5794 ID3D10EffectDepthStencilVariable *iface)
5796 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
5799 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_AsSampler(
5800 ID3D10EffectDepthStencilVariable *iface)
5802 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
5805 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_SetRawValue(ID3D10EffectDepthStencilVariable *iface,
5806 void *data, UINT offset, UINT count)
5808 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5811 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetRawValue(ID3D10EffectDepthStencilVariable *iface,
5812 void *data, UINT offset, UINT count)
5814 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
5817 /* ID3D10EffectDepthStencilVariable methods */
5819 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetDepthStencilState(ID3D10EffectDepthStencilVariable *iface,
5820 UINT index, ID3D10DepthStencilState **depth_stencil_state)
5822 FIXME("iface %p, index %u, depth_stencil_state %p stub!\n", iface, index, depth_stencil_state);
5827 static HRESULT STDMETHODCALLTYPE d3d10_effect_depth_stencil_variable_GetBackingStore(ID3D10EffectDepthStencilVariable *iface,
5828 UINT index, D3D10_DEPTH_STENCIL_DESC *desc)
5830 FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc);
5836 static const struct ID3D10EffectDepthStencilVariableVtbl d3d10_effect_depth_stencil_variable_vtbl =
5838 /* ID3D10EffectVariable methods */
5839 d3d10_effect_depth_stencil_variable_IsValid,
5840 d3d10_effect_depth_stencil_variable_GetType,
5841 d3d10_effect_depth_stencil_variable_GetDesc,
5842 d3d10_effect_depth_stencil_variable_GetAnnotationByIndex,
5843 d3d10_effect_depth_stencil_variable_GetAnnotationByName,
5844 d3d10_effect_depth_stencil_variable_GetMemberByIndex,
5845 d3d10_effect_depth_stencil_variable_GetMemberByName,
5846 d3d10_effect_depth_stencil_variable_GetMemberBySemantic,
5847 d3d10_effect_depth_stencil_variable_GetElement,
5848 d3d10_effect_depth_stencil_variable_GetParentConstantBuffer,
5849 d3d10_effect_depth_stencil_variable_AsScalar,
5850 d3d10_effect_depth_stencil_variable_AsVector,
5851 d3d10_effect_depth_stencil_variable_AsMatrix,
5852 d3d10_effect_depth_stencil_variable_AsString,
5853 d3d10_effect_depth_stencil_variable_AsShaderResource,
5854 d3d10_effect_depth_stencil_variable_AsRenderTargetView,
5855 d3d10_effect_depth_stencil_variable_AsDepthStencilView,
5856 d3d10_effect_depth_stencil_variable_AsConstantBuffer,
5857 d3d10_effect_depth_stencil_variable_AsShader,
5858 d3d10_effect_depth_stencil_variable_AsBlend,
5859 d3d10_effect_depth_stencil_variable_AsDepthStencil,
5860 d3d10_effect_depth_stencil_variable_AsRasterizer,
5861 d3d10_effect_depth_stencil_variable_AsSampler,
5862 d3d10_effect_depth_stencil_variable_SetRawValue,
5863 d3d10_effect_depth_stencil_variable_GetRawValue,
5864 /* ID3D10EffectDepthStencilVariable methods */
5865 d3d10_effect_depth_stencil_variable_GetDepthStencilState,
5866 d3d10_effect_depth_stencil_variable_GetBackingStore,
5869 /* ID3D10EffectVariable methods */
5871 static BOOL STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_IsValid(ID3D10EffectRasterizerVariable *iface)
5873 TRACE("iface %p\n", iface);
5875 return (struct d3d10_effect_variable *)iface != &null_rasterizer_variable;
5878 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetType(
5879 ID3D10EffectRasterizerVariable *iface)
5881 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
5884 static HRESULT STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetDesc(ID3D10EffectRasterizerVariable *iface,
5885 D3D10_EFFECT_VARIABLE_DESC *desc)
5887 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
5890 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetAnnotationByIndex(
5891 ID3D10EffectRasterizerVariable *iface, UINT index)
5893 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
5896 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetAnnotationByName(
5897 ID3D10EffectRasterizerVariable *iface, LPCSTR name)
5899 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
5902 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetMemberByIndex(
5903 ID3D10EffectRasterizerVariable *iface, UINT index)
5905 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
5908 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetMemberByName(
5909 ID3D10EffectRasterizerVariable *iface, LPCSTR name)
5911 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
5914 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetMemberBySemantic(
5915 ID3D10EffectRasterizerVariable *iface, LPCSTR semantic)
5917 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
5920 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetElement(
5921 ID3D10EffectRasterizerVariable *iface, UINT index)
5923 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
5926 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetParentConstantBuffer(
5927 ID3D10EffectRasterizerVariable *iface)
5929 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
5932 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsScalar(
5933 ID3D10EffectRasterizerVariable *iface)
5935 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
5938 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsVector(
5939 ID3D10EffectRasterizerVariable *iface)
5941 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
5944 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsMatrix(
5945 ID3D10EffectRasterizerVariable *iface)
5947 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
5950 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsString(
5951 ID3D10EffectRasterizerVariable *iface)
5953 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
5956 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsShaderResource(
5957 ID3D10EffectRasterizerVariable *iface)
5959 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
5962 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsRenderTargetView(
5963 ID3D10EffectRasterizerVariable *iface)
5965 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
5968 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsDepthStencilView(
5969 ID3D10EffectRasterizerVariable *iface)
5971 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
5974 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsConstantBuffer(
5975 ID3D10EffectRasterizerVariable *iface)
5977 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
5980 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsShader(
5981 ID3D10EffectRasterizerVariable *iface)
5983 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
5986 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsBlend(
5987 ID3D10EffectRasterizerVariable *iface)
5989 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
5992 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsDepthStencil(
5993 ID3D10EffectRasterizerVariable *iface)
5995 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
5998 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsRasterizer(
5999 ID3D10EffectRasterizerVariable *iface)
6001 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
6004 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_AsSampler(
6005 ID3D10EffectRasterizerVariable *iface)
6007 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
6010 static HRESULT STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_SetRawValue(ID3D10EffectRasterizerVariable *iface,
6011 void *data, UINT offset, UINT count)
6013 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
6016 static HRESULT STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetRawValue(ID3D10EffectRasterizerVariable *iface,
6017 void *data, UINT offset, UINT count)
6019 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
6022 /* ID3D10EffectRasterizerVariable methods */
6024 static HRESULT STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetRasterizerState(ID3D10EffectRasterizerVariable *iface,
6025 UINT index, ID3D10RasterizerState **rasterizer_state)
6027 FIXME("iface %p, index %u, rasterizer_state %p stub!\n", iface, index, rasterizer_state);
6032 static HRESULT STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetBackingStore(ID3D10EffectRasterizerVariable *iface,
6033 UINT index, D3D10_RASTERIZER_DESC *desc)
6035 FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc);
6041 static const struct ID3D10EffectRasterizerVariableVtbl d3d10_effect_rasterizer_variable_vtbl =
6043 /* ID3D10EffectVariable methods */
6044 d3d10_effect_rasterizer_variable_IsValid,
6045 d3d10_effect_rasterizer_variable_GetType,
6046 d3d10_effect_rasterizer_variable_GetDesc,
6047 d3d10_effect_rasterizer_variable_GetAnnotationByIndex,
6048 d3d10_effect_rasterizer_variable_GetAnnotationByName,
6049 d3d10_effect_rasterizer_variable_GetMemberByIndex,
6050 d3d10_effect_rasterizer_variable_GetMemberByName,
6051 d3d10_effect_rasterizer_variable_GetMemberBySemantic,
6052 d3d10_effect_rasterizer_variable_GetElement,
6053 d3d10_effect_rasterizer_variable_GetParentConstantBuffer,
6054 d3d10_effect_rasterizer_variable_AsScalar,
6055 d3d10_effect_rasterizer_variable_AsVector,
6056 d3d10_effect_rasterizer_variable_AsMatrix,
6057 d3d10_effect_rasterizer_variable_AsString,
6058 d3d10_effect_rasterizer_variable_AsShaderResource,
6059 d3d10_effect_rasterizer_variable_AsRenderTargetView,
6060 d3d10_effect_rasterizer_variable_AsDepthStencilView,
6061 d3d10_effect_rasterizer_variable_AsConstantBuffer,
6062 d3d10_effect_rasterizer_variable_AsShader,
6063 d3d10_effect_rasterizer_variable_AsBlend,
6064 d3d10_effect_rasterizer_variable_AsDepthStencil,
6065 d3d10_effect_rasterizer_variable_AsRasterizer,
6066 d3d10_effect_rasterizer_variable_AsSampler,
6067 d3d10_effect_rasterizer_variable_SetRawValue,
6068 d3d10_effect_rasterizer_variable_GetRawValue,
6069 /* ID3D10EffectRasterizerVariable methods */
6070 d3d10_effect_rasterizer_variable_GetRasterizerState,
6071 d3d10_effect_rasterizer_variable_GetBackingStore,
6074 /* ID3D10EffectVariable methods */
6076 static BOOL STDMETHODCALLTYPE d3d10_effect_sampler_variable_IsValid(ID3D10EffectSamplerVariable *iface)
6078 TRACE("iface %p\n", iface);
6080 return (struct d3d10_effect_variable *)iface != &null_sampler_variable;
6083 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetType(
6084 ID3D10EffectSamplerVariable *iface)
6086 return d3d10_effect_variable_GetType((ID3D10EffectVariable *)iface);
6089 static HRESULT STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetDesc(ID3D10EffectSamplerVariable *iface,
6090 D3D10_EFFECT_VARIABLE_DESC *desc)
6092 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable *)iface, desc);
6095 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetAnnotationByIndex(
6096 ID3D10EffectSamplerVariable *iface, UINT index)
6098 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable *)iface, index);
6101 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetAnnotationByName(
6102 ID3D10EffectSamplerVariable *iface, LPCSTR name)
6104 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable *)iface, name);
6107 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetMemberByIndex(
6108 ID3D10EffectSamplerVariable *iface, UINT index)
6110 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable *)iface, index);
6113 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetMemberByName(
6114 ID3D10EffectSamplerVariable *iface, LPCSTR name)
6116 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable *)iface, name);
6119 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetMemberBySemantic(
6120 ID3D10EffectSamplerVariable *iface, LPCSTR semantic)
6122 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable *)iface, semantic);
6125 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetElement(
6126 ID3D10EffectSamplerVariable *iface, UINT index)
6128 return d3d10_effect_variable_GetElement((ID3D10EffectVariable *)iface, index);
6131 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetParentConstantBuffer(
6132 ID3D10EffectSamplerVariable *iface)
6134 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable *)iface);
6137 static struct ID3D10EffectScalarVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsScalar(
6138 ID3D10EffectSamplerVariable *iface)
6140 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable *)iface);
6143 static struct ID3D10EffectVectorVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsVector(
6144 ID3D10EffectSamplerVariable *iface)
6146 return d3d10_effect_variable_AsVector((ID3D10EffectVariable *)iface);
6149 static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsMatrix(
6150 ID3D10EffectSamplerVariable *iface)
6152 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable *)iface);
6155 static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsString(
6156 ID3D10EffectSamplerVariable *iface)
6158 return d3d10_effect_variable_AsString((ID3D10EffectVariable *)iface);
6161 static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsShaderResource(
6162 ID3D10EffectSamplerVariable *iface)
6164 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable *)iface);
6167 static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsRenderTargetView(
6168 ID3D10EffectSamplerVariable *iface)
6170 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable *)iface);
6173 static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsDepthStencilView(
6174 ID3D10EffectSamplerVariable *iface)
6176 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable *)iface);
6179 static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsConstantBuffer(
6180 ID3D10EffectSamplerVariable *iface)
6182 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable *)iface);
6185 static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsShader(
6186 ID3D10EffectSamplerVariable *iface)
6188 return d3d10_effect_variable_AsShader((ID3D10EffectVariable *)iface);
6191 static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsBlend(
6192 ID3D10EffectSamplerVariable *iface)
6194 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable *)iface);
6197 static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsDepthStencil(
6198 ID3D10EffectSamplerVariable *iface)
6200 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable *)iface);
6203 static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsRasterizer(
6204 ID3D10EffectSamplerVariable *iface)
6206 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable *)iface);
6209 static struct ID3D10EffectSamplerVariable * STDMETHODCALLTYPE d3d10_effect_sampler_variable_AsSampler(
6210 ID3D10EffectSamplerVariable *iface)
6212 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable *)iface);
6215 static HRESULT STDMETHODCALLTYPE d3d10_effect_sampler_variable_SetRawValue(ID3D10EffectSamplerVariable *iface,
6216 void *data, UINT offset, UINT count)
6218 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
6221 static HRESULT STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetRawValue(ID3D10EffectSamplerVariable *iface,
6222 void *data, UINT offset, UINT count)
6224 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable *)iface, data, offset, count);
6227 /* ID3D10EffectSamplerVariable methods */
6229 static HRESULT STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetSampler(ID3D10EffectSamplerVariable *iface,
6230 UINT index, ID3D10SamplerState **sampler)
6232 FIXME("iface %p, index %u, sampler %p stub!\n", iface, index, sampler);
6237 static HRESULT STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetBackingStore(ID3D10EffectSamplerVariable *iface,
6238 UINT index, D3D10_SAMPLER_DESC *desc)
6240 FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc);
6246 static const struct ID3D10EffectSamplerVariableVtbl d3d10_effect_sampler_variable_vtbl =
6248 /* ID3D10EffectVariable methods */
6249 d3d10_effect_sampler_variable_IsValid,
6250 d3d10_effect_sampler_variable_GetType,
6251 d3d10_effect_sampler_variable_GetDesc,
6252 d3d10_effect_sampler_variable_GetAnnotationByIndex,
6253 d3d10_effect_sampler_variable_GetAnnotationByName,
6254 d3d10_effect_sampler_variable_GetMemberByIndex,
6255 d3d10_effect_sampler_variable_GetMemberByName,
6256 d3d10_effect_sampler_variable_GetMemberBySemantic,
6257 d3d10_effect_sampler_variable_GetElement,
6258 d3d10_effect_sampler_variable_GetParentConstantBuffer,
6259 d3d10_effect_sampler_variable_AsScalar,
6260 d3d10_effect_sampler_variable_AsVector,
6261 d3d10_effect_sampler_variable_AsMatrix,
6262 d3d10_effect_sampler_variable_AsString,
6263 d3d10_effect_sampler_variable_AsShaderResource,
6264 d3d10_effect_sampler_variable_AsRenderTargetView,
6265 d3d10_effect_sampler_variable_AsDepthStencilView,
6266 d3d10_effect_sampler_variable_AsConstantBuffer,
6267 d3d10_effect_sampler_variable_AsShader,
6268 d3d10_effect_sampler_variable_AsBlend,
6269 d3d10_effect_sampler_variable_AsDepthStencil,
6270 d3d10_effect_sampler_variable_AsRasterizer,
6271 d3d10_effect_sampler_variable_AsSampler,
6272 d3d10_effect_sampler_variable_SetRawValue,
6273 d3d10_effect_sampler_variable_GetRawValue,
6274 /* ID3D10EffectSamplerVariable methods */
6275 d3d10_effect_sampler_variable_GetSampler,
6276 d3d10_effect_sampler_variable_GetBackingStore,
6279 /* ID3D10EffectType methods */
6281 static BOOL STDMETHODCALLTYPE d3d10_effect_type_IsValid(ID3D10EffectType *iface)
6283 TRACE("iface %p\n", iface);
6285 return (struct d3d10_effect_type *)iface != &null_type;
6288 static HRESULT STDMETHODCALLTYPE d3d10_effect_type_GetDesc(ID3D10EffectType *iface, D3D10_EFFECT_TYPE_DESC *desc)
6290 struct d3d10_effect_type *This = (struct d3d10_effect_type *)iface;
6292 TRACE("iface %p, desc %p\n", iface, desc);
6294 if (This == &null_type)
6296 WARN("Null type specified\n");
6302 WARN("Invalid argument specified\n");
6303 return E_INVALIDARG;
6306 desc->TypeName = This->name;
6307 desc->Class = This->type_class;
6308 desc->Type = This->basetype;
6309 desc->Elements = This->element_count;
6310 desc->Members = This->member_count;
6311 desc->Rows = This->row_count;
6312 desc->Columns = This->column_count;
6313 desc->PackedSize = This->size_packed;
6314 desc->UnpackedSize = This->size_unpacked;
6315 desc->Stride = This->stride;
6320 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_type_GetMemberTypeByIndex(ID3D10EffectType *iface,
6323 struct d3d10_effect_type *This = (struct d3d10_effect_type *)iface;
6324 struct d3d10_effect_type *t;
6326 TRACE("iface %p, index %u\n", iface, index);
6328 if (index >= This->member_count)
6330 WARN("Invalid index specified\n");
6331 return (ID3D10EffectType *)&null_type;
6334 t = (&This->members[index])->type;
6336 TRACE("Returning member %p, %s\n", t, debugstr_a(t->name));
6338 return (ID3D10EffectType *)t;
6341 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_type_GetMemberTypeByName(ID3D10EffectType *iface,
6344 struct d3d10_effect_type *This = (struct d3d10_effect_type *)iface;
6347 TRACE("iface %p, name %s\n", iface, debugstr_a(name));
6351 WARN("Invalid name specified\n");
6352 return (ID3D10EffectType *)&null_type;
6355 for (i = 0; i < This->member_count; ++i)
6357 struct d3d10_effect_type_member *typem = &This->members[i];
6361 if (!strcmp(typem->name, name))
6363 TRACE("Returning type %p.\n", typem->type);
6364 return (ID3D10EffectType *)typem->type;
6369 WARN("Invalid name specified\n");
6371 return (ID3D10EffectType *)&null_type;
6374 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_type_GetMemberTypeBySemantic(ID3D10EffectType *iface,
6377 struct d3d10_effect_type *This = (struct d3d10_effect_type *)iface;
6380 TRACE("iface %p, semantic %s\n", iface, debugstr_a(semantic));
6384 WARN("Invalid semantic specified\n");
6385 return (ID3D10EffectType *)&null_type;
6388 for (i = 0; i < This->member_count; ++i)
6390 struct d3d10_effect_type_member *typem = &This->members[i];
6392 if (typem->semantic)
6394 if (!strcmp(typem->semantic, semantic))
6396 TRACE("Returning type %p.\n", typem->type);
6397 return (ID3D10EffectType *)typem->type;
6402 WARN("Invalid semantic specified\n");
6404 return (ID3D10EffectType *)&null_type;
6407 static LPCSTR STDMETHODCALLTYPE d3d10_effect_type_GetMemberName(ID3D10EffectType *iface, UINT index)
6409 struct d3d10_effect_type *This = (struct d3d10_effect_type *)iface;
6410 struct d3d10_effect_type_member *typem;
6412 TRACE("iface %p, index %u\n", iface, index);
6414 if (index >= This->member_count)
6416 WARN("Invalid index specified\n");
6420 typem = &This->members[index];
6422 TRACE("Returning name %s\n", debugstr_a(typem->name));
6427 static LPCSTR STDMETHODCALLTYPE d3d10_effect_type_GetMemberSemantic(ID3D10EffectType *iface, UINT index)
6429 struct d3d10_effect_type *This = (struct d3d10_effect_type *)iface;
6430 struct d3d10_effect_type_member *typem;
6432 TRACE("iface %p, index %u\n", iface, index);
6434 if (index >= This->member_count)
6436 WARN("Invalid index specified\n");
6440 typem = &This->members[index];
6442 TRACE("Returning semantic %s\n", debugstr_a(typem->semantic));
6444 return typem->semantic;
6447 static const struct ID3D10EffectTypeVtbl d3d10_effect_type_vtbl =
6449 /* ID3D10EffectType */
6450 d3d10_effect_type_IsValid,
6451 d3d10_effect_type_GetDesc,
6452 d3d10_effect_type_GetMemberTypeByIndex,
6453 d3d10_effect_type_GetMemberTypeByName,
6454 d3d10_effect_type_GetMemberTypeBySemantic,
6455 d3d10_effect_type_GetMemberName,
6456 d3d10_effect_type_GetMemberSemantic,