2 * Copyright 2009 Henri Verbeet for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include "wine/port.h"
23 #include "d3d10_private.h"
25 WINE_DEFAULT_DEBUG_CHANNEL(d3d10
);
27 #define MAKE_TAG(ch0, ch1, ch2, ch3) \
28 ((DWORD)(ch0) | ((DWORD)(ch1) << 8) | \
29 ((DWORD)(ch2) << 16) | ((DWORD)(ch3) << 24 ))
30 #define TAG_DXBC MAKE_TAG('D', 'X', 'B', 'C')
31 #define TAG_FX10 MAKE_TAG('F', 'X', '1', '0')
32 #define TAG_ISGN MAKE_TAG('I', 'S', 'G', 'N')
34 #define D3D10_FX10_TYPE_COLUMN_SHIFT 11
35 #define D3D10_FX10_TYPE_COLUMN_MASK (0x7 << D3D10_FX10_TYPE_COLUMN_SHIFT)
37 #define D3D10_FX10_TYPE_ROW_SHIFT 8
38 #define D3D10_FX10_TYPE_ROW_MASK (0x7 << D3D10_FX10_TYPE_ROW_SHIFT)
40 #define D3D10_FX10_TYPE_BASETYPE_SHIFT 3
41 #define D3D10_FX10_TYPE_BASETYPE_MASK (0x1f << D3D10_FX10_TYPE_BASETYPE_SHIFT)
43 #define D3D10_FX10_TYPE_CLASS_SHIFT 0
44 #define D3D10_FX10_TYPE_CLASS_MASK (0x7 << D3D10_FX10_TYPE_CLASS_SHIFT)
46 #define D3D10_FX10_TYPE_MATRIX_COLUMN_MAJOR_MASK 0x4000
48 static const struct ID3D10EffectTechniqueVtbl d3d10_effect_technique_vtbl
;
49 static const struct ID3D10EffectPassVtbl d3d10_effect_pass_vtbl
;
50 static const struct ID3D10EffectVariableVtbl d3d10_effect_variable_vtbl
;
51 static const struct ID3D10EffectConstantBufferVtbl d3d10_effect_constant_buffer_vtbl
;
52 static const struct ID3D10EffectScalarVariableVtbl d3d10_effect_scalar_variable_vtbl
;
53 static const struct ID3D10EffectVectorVariableVtbl d3d10_effect_vector_variable_vtbl
;
54 static const struct ID3D10EffectMatrixVariableVtbl d3d10_effect_matrix_variable_vtbl
;
55 static const struct ID3D10EffectStringVariableVtbl d3d10_effect_string_variable_vtbl
;
56 static const struct ID3D10EffectShaderResourceVariableVtbl d3d10_effect_shader_resource_variable_vtbl
;
57 static const struct ID3D10EffectRenderTargetViewVariableVtbl d3d10_effect_render_target_view_variable_vtbl
;
58 static const struct ID3D10EffectDepthStencilViewVariableVtbl d3d10_effect_depth_stencil_view_variable_vtbl
;
59 static const struct ID3D10EffectShaderVariableVtbl d3d10_effect_shader_variable_vtbl
;
60 static const struct ID3D10EffectBlendVariableVtbl d3d10_effect_blend_variable_vtbl
;
61 static const struct ID3D10EffectDepthStencilVariableVtbl d3d10_effect_depth_stencil_variable_vtbl
;
62 static const struct ID3D10EffectRasterizerVariableVtbl d3d10_effect_rasterizer_variable_vtbl
;
63 static const struct ID3D10EffectSamplerVariableVtbl d3d10_effect_sampler_variable_vtbl
;
64 static const struct ID3D10EffectTypeVtbl d3d10_effect_type_vtbl
;
66 /* null objects - needed for invalid calls */
67 static struct d3d10_effect_technique null_technique
=
68 {&d3d10_effect_technique_vtbl
, NULL
, NULL
, 0, 0, NULL
, NULL
};
69 static struct d3d10_effect_pass null_pass
=
70 {&d3d10_effect_pass_vtbl
, NULL
, NULL
, 0, 0, 0, NULL
, NULL
};
71 static struct d3d10_effect_type null_type
=
72 {&d3d10_effect_type_vtbl
, 0, {NULL
, NULL
, 0}, NULL
, NULL
, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL
, NULL
};
73 static struct d3d10_effect_variable null_local_buffer
=
74 {(ID3D10EffectVariableVtbl
*)&d3d10_effect_constant_buffer_vtbl
, &null_local_buffer
,
75 NULL
, NULL
, NULL
, 0, 0, 0, 0, &null_type
, NULL
, NULL
, NULL
};
76 static struct d3d10_effect_variable null_variable
=
77 {&d3d10_effect_variable_vtbl
, &null_local_buffer
,
78 NULL
, NULL
, NULL
, 0, 0, 0, 0, &null_type
, NULL
, NULL
, NULL
};
79 static struct d3d10_effect_variable null_scalar_variable
=
80 {(ID3D10EffectVariableVtbl
*)&d3d10_effect_scalar_variable_vtbl
, &null_local_buffer
,
81 NULL
, NULL
, NULL
, 0, 0, 0, 0, &null_type
, NULL
, NULL
, NULL
};
82 static struct d3d10_effect_variable null_vector_variable
=
83 {(ID3D10EffectVariableVtbl
*)&d3d10_effect_vector_variable_vtbl
, &null_local_buffer
,
84 NULL
, NULL
, NULL
, 0, 0, 0, 0, &null_type
, NULL
, NULL
, NULL
};
85 static struct d3d10_effect_variable null_matrix_variable
=
86 {(ID3D10EffectVariableVtbl
*)&d3d10_effect_matrix_variable_vtbl
, &null_local_buffer
,
87 NULL
, NULL
, NULL
, 0, 0, 0, 0, &null_type
, NULL
, NULL
, NULL
};
88 static struct d3d10_effect_variable null_string_variable
=
89 {(ID3D10EffectVariableVtbl
*)&d3d10_effect_string_variable_vtbl
, &null_local_buffer
,
90 NULL
, NULL
, NULL
, 0, 0, 0, 0, &null_type
, NULL
, NULL
, NULL
};
91 static struct d3d10_effect_variable null_shader_resource_variable
=
92 {(ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_resource_variable_vtbl
, &null_local_buffer
,
93 NULL
, NULL
, NULL
, 0, 0, 0, 0, &null_type
, NULL
, NULL
, NULL
};
94 static struct d3d10_effect_variable null_render_target_view_variable
=
95 {(ID3D10EffectVariableVtbl
*)&d3d10_effect_render_target_view_variable_vtbl
, &null_local_buffer
,
96 NULL
, NULL
, NULL
, 0, 0, 0, 0, &null_type
, NULL
, NULL
, NULL
};
97 static struct d3d10_effect_variable null_depth_stencil_view_variable
=
98 {(ID3D10EffectVariableVtbl
*)&d3d10_effect_depth_stencil_view_variable_vtbl
, &null_local_buffer
,
99 NULL
, NULL
, NULL
, 0, 0, 0, 0, &null_type
, NULL
, NULL
, NULL
};
100 static struct d3d10_effect_variable null_shader_variable
=
101 {(ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_variable_vtbl
, &null_local_buffer
,
102 NULL
, NULL
, NULL
, 0, 0, 0, 0, &null_type
, NULL
, NULL
, NULL
};
103 static struct d3d10_effect_variable null_blend_variable
=
104 {(ID3D10EffectVariableVtbl
*)&d3d10_effect_blend_variable_vtbl
, &null_local_buffer
,
105 NULL
, NULL
, NULL
, 0, 0, 0, 0, &null_type
, NULL
, NULL
, NULL
};
106 static struct d3d10_effect_variable null_depth_stencil_variable
=
107 {(ID3D10EffectVariableVtbl
*)&d3d10_effect_depth_stencil_variable_vtbl
, &null_local_buffer
,
108 NULL
, NULL
, NULL
, 0, 0, 0, 0, &null_type
, NULL
, NULL
, NULL
};
109 static struct d3d10_effect_variable null_rasterizer_variable
=
110 {(ID3D10EffectVariableVtbl
*)&d3d10_effect_rasterizer_variable_vtbl
, &null_local_buffer
,
111 NULL
, NULL
, NULL
, 0, 0, 0, 0, &null_type
, NULL
, NULL
, NULL
};
112 static struct d3d10_effect_variable null_sampler_variable
=
113 {(ID3D10EffectVariableVtbl
*)&d3d10_effect_sampler_variable_vtbl
, &null_local_buffer
,
114 NULL
, NULL
, NULL
, 0, 0, 0, 0, &null_type
, NULL
, NULL
, NULL
};
116 static struct d3d10_effect_type
*get_fx10_type(struct d3d10_effect
*effect
, const char *data
, DWORD offset
);
118 static inline void read_dword(const char **ptr
, DWORD
*d
)
120 memcpy(d
, *ptr
, sizeof(*d
));
124 static inline void skip_dword_unknown(const char **ptr
, unsigned int count
)
129 FIXME("Skipping %u unknown DWORDs:\n", count
);
130 for (i
= 0; i
< count
; ++i
)
133 FIXME("\t0x%08x\n", d
);
137 static inline void write_dword(char **ptr
, DWORD d
)
139 memcpy(*ptr
, &d
, sizeof(d
));
143 static inline void write_dword_unknown(char **ptr
, DWORD d
)
145 FIXME("Writing unknown DWORD 0x%08x\n", d
);
149 static HRESULT
parse_dxbc(const char *data
, SIZE_T data_size
,
150 HRESULT (*chunk_handler
)(const char *data
, DWORD data_size
, DWORD tag
, void *ctx
), void *ctx
)
152 const char *ptr
= data
;
159 read_dword(&ptr
, &tag
);
160 TRACE("tag: %s.\n", debugstr_an((const char *)&tag
, 4));
164 WARN("Wrong tag.\n");
169 skip_dword_unknown(&ptr
, 4);
171 skip_dword_unknown(&ptr
, 1);
173 read_dword(&ptr
, &total_size
);
174 TRACE("total size: %#x\n", total_size
);
176 read_dword(&ptr
, &chunk_count
);
177 TRACE("chunk count: %#x\n", chunk_count
);
179 for (i
= 0; i
< chunk_count
; ++i
)
181 DWORD chunk_tag
, chunk_size
;
182 const char *chunk_ptr
;
185 read_dword(&ptr
, &chunk_offset
);
186 TRACE("chunk %u at offset %#x\n", i
, chunk_offset
);
188 chunk_ptr
= data
+ chunk_offset
;
190 read_dword(&chunk_ptr
, &chunk_tag
);
191 read_dword(&chunk_ptr
, &chunk_size
);
193 hr
= chunk_handler(chunk_ptr
, chunk_size
, chunk_tag
, ctx
);
194 if (FAILED(hr
)) break;
200 static BOOL
copy_name(const char *ptr
, char **name
)
204 if (!ptr
) return TRUE
;
206 name_len
= strlen(ptr
) + 1;
212 *name
= HeapAlloc(GetProcessHeap(), 0, name_len
);
215 ERR("Failed to allocate name memory.\n");
219 memcpy(*name
, ptr
, name_len
);
224 static HRESULT
shader_chunk_handler(const char *data
, DWORD data_size
, DWORD tag
, void *ctx
)
226 struct d3d10_effect_shader_variable
*s
= ctx
;
228 TRACE("tag: %s.\n", debugstr_an((const char *)&tag
, 4));
230 TRACE("chunk size: %#x\n", data_size
);
236 /* 32 (DXBC header) + 1 * 4 (chunk index) + 2 * 4 (chunk header) + data_size (chunk data) */
237 UINT size
= 44 + data_size
;
240 s
->input_signature
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, size
);
241 if (!s
->input_signature
)
243 ERR("Failed to allocate input signature data\n");
244 return E_OUTOFMEMORY
;
246 s
->input_signature_size
= size
;
248 ptr
= s
->input_signature
;
250 write_dword(&ptr
, TAG_DXBC
);
253 write_dword_unknown(&ptr
, 0);
254 write_dword_unknown(&ptr
, 0);
255 write_dword_unknown(&ptr
, 0);
256 write_dword_unknown(&ptr
, 0);
258 /* seems to be always 1 */
259 write_dword_unknown(&ptr
, 1);
262 write_dword(&ptr
, size
);
265 write_dword(&ptr
, 1);
268 write_dword(&ptr
, (ptr
- s
->input_signature
) + 4);
271 write_dword(&ptr
, TAG_ISGN
);
272 write_dword(&ptr
, data_size
);
273 memcpy(ptr
, data
, data_size
);
278 FIXME("Unhandled chunk %s.\n", debugstr_an((const char *)&tag
, 4));
285 static HRESULT
parse_shader(struct d3d10_effect_object
*o
, const char *data
)
287 ID3D10Device
*device
= o
->pass
->technique
->effect
->device
;
288 struct d3d10_effect_shader_variable
*s
;
289 const char *ptr
= data
;
293 o
->data
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(struct d3d10_effect_shader_variable
));
296 ERR("Failed to allocate shader variable memory\n");
297 return E_OUTOFMEMORY
;
300 if (!ptr
) return S_OK
;
304 read_dword(&ptr
, &dxbc_size
);
305 TRACE("dxbc size: %#x\n", dxbc_size
);
309 case D3D10_EOT_VERTEXSHADER
:
310 hr
= ID3D10Device_CreateVertexShader(device
, ptr
, dxbc_size
, &s
->shader
.vs
);
311 if (FAILED(hr
)) return hr
;
314 case D3D10_EOT_PIXELSHADER
:
315 hr
= ID3D10Device_CreatePixelShader(device
, ptr
, dxbc_size
, &s
->shader
.ps
);
316 if (FAILED(hr
)) return hr
;
318 case D3D10_EOT_GEOMETRYSHADER
:
319 hr
= ID3D10Device_CreateGeometryShader(device
, ptr
, dxbc_size
, &s
->shader
.gs
);
320 if (FAILED(hr
)) return hr
;
324 return parse_dxbc(ptr
, dxbc_size
, shader_chunk_handler
, s
);
327 static D3D10_SHADER_VARIABLE_CLASS
d3d10_variable_class(DWORD c
, BOOL is_column_major
)
331 case 1: return D3D10_SVC_SCALAR
;
332 case 2: return D3D10_SVC_VECTOR
;
333 case 3: if (is_column_major
) return D3D10_SVC_MATRIX_COLUMNS
;
334 else return D3D10_SVC_MATRIX_ROWS
;
336 FIXME("Unknown variable class %#x.\n", c
);
341 static D3D10_SHADER_VARIABLE_TYPE
d3d10_variable_type(DWORD t
, BOOL is_object
)
347 case 1: return D3D10_SVT_STRING
;
348 case 2: return D3D10_SVT_BLEND
;
349 case 3: return D3D10_SVT_DEPTHSTENCIL
;
350 case 4: return D3D10_SVT_RASTERIZER
;
351 case 5: return D3D10_SVT_PIXELSHADER
;
352 case 6: return D3D10_SVT_VERTEXSHADER
;
353 case 7: return D3D10_SVT_GEOMETRYSHADER
;
355 case 10: return D3D10_SVT_TEXTURE1D
;
356 case 11: return D3D10_SVT_TEXTURE1DARRAY
;
357 case 12: return D3D10_SVT_TEXTURE2D
;
358 case 13: return D3D10_SVT_TEXTURE2DARRAY
;
359 case 14: return D3D10_SVT_TEXTURE2DMS
;
360 case 15: return D3D10_SVT_TEXTURE2DMSARRAY
;
361 case 16: return D3D10_SVT_TEXTURE3D
;
362 case 17: return D3D10_SVT_TEXTURECUBE
;
364 case 19: return D3D10_SVT_RENDERTARGETVIEW
;
365 case 20: return D3D10_SVT_DEPTHSTENCILVIEW
;
366 case 21: return D3D10_SVT_SAMPLER
;
368 FIXME("Unknown variable type %#x.\n", t
);
376 case 1: return D3D10_SVT_FLOAT
;
377 case 2: return D3D10_SVT_INT
;
378 case 3: return D3D10_SVT_UINT
;
379 case 4: return D3D10_SVT_BOOL
;
381 FIXME("Unknown variable type %#x.\n", t
);
387 static HRESULT
parse_fx10_type(struct d3d10_effect_type
*t
, const char *ptr
, const char *data
)
394 read_dword(&ptr
, &offset
);
395 TRACE("Type name at offset %#x.\n", offset
);
397 if (!copy_name(data
+ offset
, &t
->name
))
399 ERR("Failed to copy name.\n");
400 return E_OUTOFMEMORY
;
402 TRACE("Type name: %s.\n", debugstr_a(t
->name
));
404 read_dword(&ptr
, &unknown0
);
405 TRACE("Unknown 0: %u.\n", unknown0
);
407 read_dword(&ptr
, &t
->element_count
);
408 TRACE("Element count: %u.\n", t
->element_count
);
410 read_dword(&ptr
, &t
->size_unpacked
);
411 TRACE("Unpacked size: %#x.\n", t
->size_unpacked
);
413 read_dword(&ptr
, &t
->stride
);
414 TRACE("Stride: %#x.\n", t
->stride
);
416 read_dword(&ptr
, &t
->size_packed
);
417 TRACE("Packed size %#x.\n", t
->size_packed
);
424 read_dword(&ptr
, &typeinfo
);
425 t
->column_count
= (typeinfo
& D3D10_FX10_TYPE_COLUMN_MASK
) >> D3D10_FX10_TYPE_COLUMN_SHIFT
;
426 t
->row_count
= (typeinfo
& D3D10_FX10_TYPE_ROW_MASK
) >> D3D10_FX10_TYPE_ROW_SHIFT
;
427 t
->basetype
= d3d10_variable_type((typeinfo
& D3D10_FX10_TYPE_BASETYPE_MASK
) >> D3D10_FX10_TYPE_BASETYPE_SHIFT
, FALSE
);
428 t
->type_class
= d3d10_variable_class((typeinfo
& D3D10_FX10_TYPE_CLASS_MASK
) >> D3D10_FX10_TYPE_CLASS_SHIFT
, typeinfo
& D3D10_FX10_TYPE_MATRIX_COLUMN_MAJOR_MASK
);
430 TRACE("Type description: %#x.\n", typeinfo
);
431 TRACE("\tcolumns: %u.\n", t
->column_count
);
432 TRACE("\trows: %u.\n", t
->row_count
);
433 TRACE("\tbasetype: %s.\n", debug_d3d10_shader_variable_type(t
->basetype
));
434 TRACE("\tclass: %s.\n", debug_d3d10_shader_variable_class(t
->type_class
));
435 TRACE("\tunknown bits: %#x.\n", typeinfo
& ~(D3D10_FX10_TYPE_COLUMN_MASK
| D3D10_FX10_TYPE_ROW_MASK
436 | D3D10_FX10_TYPE_BASETYPE_MASK
| D3D10_FX10_TYPE_CLASS_MASK
| D3D10_FX10_TYPE_MATRIX_COLUMN_MAJOR_MASK
));
440 TRACE("Type is an object.\n");
445 t
->type_class
= D3D10_SVC_OBJECT
;
447 read_dword(&ptr
, &typeinfo
);
448 t
->basetype
= d3d10_variable_type(typeinfo
, TRUE
);
450 TRACE("Type description: %#x.\n", typeinfo
);
451 TRACE("\tbasetype: %s.\n", debug_d3d10_shader_variable_type(t
->basetype
));
452 TRACE("\tclass: %s.\n", debug_d3d10_shader_variable_class(t
->type_class
));
456 TRACE("Type is a structure.\n");
458 read_dword(&ptr
, &t
->member_count
);
459 TRACE("Member count: %u.\n", t
->member_count
);
464 t
->type_class
= D3D10_SVC_STRUCT
;
466 t
->members
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, t
->member_count
* sizeof(*t
->members
));
469 ERR("Failed to allocate members memory.\n");
470 return E_OUTOFMEMORY
;
473 for (i
= 0; i
< t
->member_count
; ++i
)
475 struct d3d10_effect_type_member
*typem
= &t
->members
[i
];
477 read_dword(&ptr
, &offset
);
478 TRACE("Member name at offset %#x.\n", offset
);
480 if (!copy_name(data
+ offset
, &typem
->name
))
482 ERR("Failed to copy name.\n");
483 return E_OUTOFMEMORY
;
485 TRACE("Member name: %s.\n", debugstr_a(typem
->name
));
487 read_dword(&ptr
, &offset
);
488 TRACE("Member semantic at offset %#x.\n", offset
);
490 if (!copy_name(data
+ offset
, &typem
->semantic
))
492 ERR("Failed to copy semantic.\n");
493 return E_OUTOFMEMORY
;
495 TRACE("Member semantic: %s.\n", debugstr_a(typem
->semantic
));
497 read_dword(&ptr
, &typem
->buffer_offset
);
498 TRACE("Member offset in struct: %#x.\n", typem
->buffer_offset
);
500 read_dword(&ptr
, &offset
);
501 TRACE("Member type info at offset %#x.\n", offset
);
503 typem
->type
= get_fx10_type(t
->effect
, data
, offset
);
506 ERR("Failed to get variable type.\n");
513 FIXME("Unhandled case %#x.\n", unknown0
);
517 if (t
->element_count
)
519 TRACE("Elementtype for type at offset: %#x\n", t
->id
);
521 /* allocate elementtype - we need only one, because all elements have the same type */
522 t
->elementtype
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(*t
->elementtype
));
525 ERR("Failed to allocate members memory.\n");
526 return E_OUTOFMEMORY
;
529 /* create a copy of the original type with some minor changes */
530 t
->elementtype
->vtbl
= &d3d10_effect_type_vtbl
;
531 t
->elementtype
->effect
= t
->effect
;
533 if (!copy_name(t
->name
, &t
->elementtype
->name
))
535 ERR("Failed to copy name.\n");
536 return E_OUTOFMEMORY
;
538 TRACE("\tType name: %s.\n", debugstr_a(t
->elementtype
->name
));
540 t
->elementtype
->element_count
= 0;
541 TRACE("\tElement count: %u.\n", t
->elementtype
->element_count
);
544 * Not sure if this calculation is 100% correct, but a test
545 * show's that these values work.
547 t
->elementtype
->size_unpacked
= t
->size_packed
/ t
->element_count
;
548 TRACE("\tUnpacked size: %#x.\n", t
->elementtype
->size_unpacked
);
550 t
->elementtype
->stride
= t
->stride
;
551 TRACE("\tStride: %#x.\n", t
->elementtype
->stride
);
553 t
->elementtype
->size_packed
= t
->size_packed
/ t
->element_count
;
554 TRACE("\tPacked size: %#x.\n", t
->elementtype
->size_packed
);
556 t
->elementtype
->member_count
= t
->member_count
;
557 TRACE("\tMember count: %u.\n", t
->elementtype
->member_count
);
559 t
->elementtype
->column_count
= t
->column_count
;
560 TRACE("\tColumns: %u.\n", t
->elementtype
->column_count
);
562 t
->elementtype
->row_count
= t
->row_count
;
563 TRACE("\tRows: %u.\n", t
->elementtype
->row_count
);
565 t
->elementtype
->basetype
= t
->basetype
;
566 TRACE("\tBasetype: %s.\n", debug_d3d10_shader_variable_type(t
->elementtype
->basetype
));
568 t
->elementtype
->type_class
= t
->type_class
;
569 TRACE("\tClass: %s.\n", debug_d3d10_shader_variable_class(t
->elementtype
->type_class
));
571 t
->elementtype
->members
= t
->members
;
577 static struct d3d10_effect_type
*get_fx10_type(struct d3d10_effect
*effect
, const char *data
, DWORD offset
)
579 struct d3d10_effect_type
*type
;
580 struct wine_rb_entry
*entry
;
583 entry
= wine_rb_get(&effect
->types
, &offset
);
586 TRACE("Returning existing type.\n");
587 return WINE_RB_ENTRY_VALUE(entry
, struct d3d10_effect_type
, entry
);
590 type
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(*type
));
593 ERR("Failed to allocate type memory.\n");
597 type
->vtbl
= &d3d10_effect_type_vtbl
;
599 type
->effect
= effect
;
600 hr
= parse_fx10_type(type
, data
+ offset
, data
);
603 ERR("Failed to parse type info, hr %#x.\n", hr
);
604 HeapFree(GetProcessHeap(), 0, type
);
608 if (wine_rb_put(&effect
->types
, &offset
, &type
->entry
) == -1)
610 ERR("Failed to insert type entry.\n");
611 HeapFree(GetProcessHeap(), 0, type
);
618 static void set_variable_vtbl(struct d3d10_effect_variable
*v
)
620 switch (v
->type
->type_class
)
622 case D3D10_SVC_SCALAR
:
623 v
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_scalar_variable_vtbl
;
626 case D3D10_SVC_VECTOR
:
627 v
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_vector_variable_vtbl
;
630 case D3D10_SVC_MATRIX_ROWS
:
631 case D3D10_SVC_MATRIX_COLUMNS
:
632 v
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_matrix_variable_vtbl
;
635 case D3D10_SVC_STRUCT
:
636 v
->vtbl
= &d3d10_effect_variable_vtbl
;
639 case D3D10_SVC_OBJECT
:
640 switch(v
->type
->basetype
)
642 case D3D10_SVT_STRING
:
643 v
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_string_variable_vtbl
;
646 case D3D10_SVT_TEXTURE1D
:
647 case D3D10_SVT_TEXTURE1DARRAY
:
648 case D3D10_SVT_TEXTURE2D
:
649 case D3D10_SVT_TEXTURE2DARRAY
:
650 case D3D10_SVT_TEXTURE2DMS
:
651 case D3D10_SVT_TEXTURE2DMSARRAY
:
652 case D3D10_SVT_TEXTURE3D
:
653 case D3D10_SVT_TEXTURECUBE
:
654 v
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_resource_variable_vtbl
;
657 case D3D10_SVT_RENDERTARGETVIEW
:
658 v
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_render_target_view_variable_vtbl
;
661 case D3D10_SVT_DEPTHSTENCILVIEW
:
662 v
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_depth_stencil_view_variable_vtbl
;
665 case D3D10_SVT_DEPTHSTENCIL
:
666 v
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_depth_stencil_variable_vtbl
;
669 case D3D10_SVT_VERTEXSHADER
:
670 case D3D10_SVT_GEOMETRYSHADER
:
671 case D3D10_SVT_PIXELSHADER
:
672 v
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_variable_vtbl
;
675 case D3D10_SVT_BLEND
:
676 v
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_blend_variable_vtbl
;
679 case D3D10_SVT_RASTERIZER
:
680 v
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_rasterizer_variable_vtbl
;
683 case D3D10_SVT_SAMPLER
:
684 v
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_sampler_variable_vtbl
;
688 FIXME("Unhandled basetype %s.\n", debug_d3d10_shader_variable_type(v
->type
->basetype
));
689 v
->vtbl
= &d3d10_effect_variable_vtbl
;
695 FIXME("Unhandled type class %s.\n", debug_d3d10_shader_variable_class(v
->type
->type_class
));
696 v
->vtbl
= &d3d10_effect_variable_vtbl
;
701 static HRESULT
copy_variableinfo_from_type(struct d3d10_effect_variable
*v
)
706 if (v
->type
->member_count
)
708 v
->members
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, v
->type
->member_count
* sizeof(*v
->members
));
711 ERR("Failed to allocate members memory.\n");
712 return E_OUTOFMEMORY
;
715 for (i
= 0; i
< v
->type
->member_count
; ++i
)
717 struct d3d10_effect_variable
*var
= &v
->members
[i
];
718 struct d3d10_effect_type_member
*typem
= &v
->type
->members
[i
];
720 var
->buffer
= v
->buffer
;
721 var
->effect
= v
->effect
;
722 var
->type
= typem
->type
;
723 set_variable_vtbl(var
);
725 if (!copy_name(typem
->name
, &var
->name
))
727 ERR("Failed to copy name.\n");
728 return E_OUTOFMEMORY
;
730 TRACE("Variable name: %s.\n", debugstr_a(var
->name
));
732 if (!copy_name(typem
->semantic
, &var
->semantic
))
734 ERR("Failed to copy name.\n");
735 return E_OUTOFMEMORY
;
737 TRACE("Variable semantic: %s.\n", debugstr_a(var
->semantic
));
739 var
->buffer_offset
= v
->buffer_offset
+ typem
->buffer_offset
;
740 TRACE("Variable buffer offset: %u.\n", var
->buffer_offset
);
742 hr
= copy_variableinfo_from_type(var
);
743 if (FAILED(hr
)) return hr
;
747 if (v
->type
->element_count
)
749 unsigned int bufferoffset
= v
->buffer_offset
;
751 v
->elements
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, v
->type
->element_count
* sizeof(*v
->elements
));
754 ERR("Failed to allocate elements memory.\n");
755 return E_OUTOFMEMORY
;
758 for (i
= 0; i
< v
->type
->element_count
; ++i
)
760 struct d3d10_effect_variable
*var
= &v
->elements
[i
];
762 var
->buffer
= v
->buffer
;
763 var
->effect
= v
->effect
;
764 var
->type
= v
->type
->elementtype
;
765 set_variable_vtbl(var
);
767 if (!copy_name(v
->name
, &var
->name
))
769 ERR("Failed to copy name.\n");
770 return E_OUTOFMEMORY
;
772 TRACE("Variable name: %s.\n", debugstr_a(var
->name
));
774 if (!copy_name(v
->semantic
, &var
->semantic
))
776 ERR("Failed to copy name.\n");
777 return E_OUTOFMEMORY
;
779 TRACE("Variable semantic: %s.\n", debugstr_a(var
->semantic
));
783 bufferoffset
+= v
->type
->stride
;
785 var
->buffer_offset
= bufferoffset
;
786 TRACE("Variable buffer offset: %u.\n", var
->buffer_offset
);
788 hr
= copy_variableinfo_from_type(var
);
789 if (FAILED(hr
)) return hr
;
796 static HRESULT
parse_fx10_variable_head(struct d3d10_effect_variable
*v
, const char **ptr
, const char *data
)
800 read_dword(ptr
, &offset
);
801 TRACE("Variable name at offset %#x.\n", offset
);
803 if (!copy_name(data
+ offset
, &v
->name
))
805 ERR("Failed to copy name.\n");
806 return E_OUTOFMEMORY
;
808 TRACE("Variable name: %s.\n", debugstr_a(v
->name
));
810 read_dword(ptr
, &offset
);
811 TRACE("Variable type info at offset %#x.\n", offset
);
813 v
->type
= get_fx10_type(v
->effect
, data
, offset
);
816 ERR("Failed to get variable type.\n");
819 set_variable_vtbl(v
);
821 return copy_variableinfo_from_type(v
);
824 static HRESULT
parse_fx10_annotation(struct d3d10_effect_variable
*a
, const char **ptr
, const char *data
)
828 hr
= parse_fx10_variable_head(a
, ptr
, data
);
829 if (FAILED(hr
)) return hr
;
831 skip_dword_unknown(ptr
, 1);
836 static HRESULT
parse_fx10_object(struct d3d10_effect_object
*o
, const char **ptr
, const char *data
)
838 const char *data_ptr
;
842 read_dword(ptr
, &o
->type
);
843 TRACE("Effect object is of type %#x.\n", o
->type
);
845 skip_dword_unknown(ptr
, 2);
847 read_dword(ptr
, &offset
);
848 TRACE("Effect object idx is at offset %#x.\n", offset
);
850 data_ptr
= data
+ offset
;
851 read_dword(&data_ptr
, &offset
);
853 TRACE("Effect object starts at offset %#x.\n", offset
);
855 /* FIXME: This probably isn't completely correct. */
858 WARN("Skipping effect object.\n");
863 data_ptr
= data
+ offset
;
868 case D3D10_EOT_VERTEXSHADER
:
869 TRACE("Vertex shader\n");
870 hr
= parse_shader(o
, data_ptr
);
873 case D3D10_EOT_PIXELSHADER
:
874 TRACE("Pixel shader\n");
875 hr
= parse_shader(o
, data_ptr
);
878 case D3D10_EOT_GEOMETRYSHADER
:
879 TRACE("Geometry shader\n");
880 hr
= parse_shader(o
, data_ptr
);
884 FIXME("Unhandled object type %#x\n", o
->type
);
892 static HRESULT
parse_fx10_pass(struct d3d10_effect_pass
*p
, const char **ptr
, const char *data
)
898 read_dword(ptr
, &offset
);
899 TRACE("Pass name at offset %#x.\n", offset
);
901 if (!copy_name(data
+ offset
, &p
->name
))
903 ERR("Failed to copy name.\n");
904 return E_OUTOFMEMORY
;
906 TRACE("Pass name: %s.\n", debugstr_a(p
->name
));
908 read_dword(ptr
, &p
->object_count
);
909 TRACE("Pass has %u effect objects.\n", p
->object_count
);
911 read_dword(ptr
, &p
->annotation_count
);
912 TRACE("Pass has %u annotations.\n", p
->annotation_count
);
914 p
->annotations
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, p
->annotation_count
* sizeof(*p
->annotations
));
917 ERR("Failed to allocate pass annotations memory.\n");
918 return E_OUTOFMEMORY
;
921 for(i
= 0; i
< p
->annotation_count
; ++i
)
923 struct d3d10_effect_variable
*a
= &p
->annotations
[i
];
925 a
->effect
= p
->technique
->effect
;
927 hr
= parse_fx10_annotation(a
, ptr
, data
);
928 if (FAILED(hr
)) return hr
;
931 p
->objects
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, p
->object_count
* sizeof(*p
->objects
));
934 ERR("Failed to allocate effect objects memory.\n");
935 return E_OUTOFMEMORY
;
938 for (i
= 0; i
< p
->object_count
; ++i
)
940 struct d3d10_effect_object
*o
= &p
->objects
[i
];
944 hr
= parse_fx10_object(o
, ptr
, data
);
945 if (FAILED(hr
)) return hr
;
951 static HRESULT
parse_fx10_technique(struct d3d10_effect_technique
*t
, const char **ptr
, const char *data
)
957 read_dword(ptr
, &offset
);
958 TRACE("Technique name at offset %#x.\n", offset
);
960 if (!copy_name(data
+ offset
, &t
->name
))
962 ERR("Failed to copy name.\n");
963 return E_OUTOFMEMORY
;
965 TRACE("Technique name: %s.\n", debugstr_a(t
->name
));
967 read_dword(ptr
, &t
->pass_count
);
968 TRACE("Technique has %u passes\n", t
->pass_count
);
970 read_dword(ptr
, &t
->annotation_count
);
971 TRACE("Technique has %u annotations.\n", t
->annotation_count
);
973 t
->annotations
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, t
->annotation_count
* sizeof(*t
->annotations
));
976 ERR("Failed to allocate technique annotations memory.\n");
977 return E_OUTOFMEMORY
;
980 for(i
= 0; i
< t
->annotation_count
; ++i
)
982 struct d3d10_effect_variable
*a
= &t
->annotations
[i
];
984 a
->effect
= t
->effect
;
986 hr
= parse_fx10_annotation(a
, ptr
, data
);
987 if (FAILED(hr
)) return hr
;
990 t
->passes
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, t
->pass_count
* sizeof(*t
->passes
));
993 ERR("Failed to allocate passes memory\n");
994 return E_OUTOFMEMORY
;
997 for (i
= 0; i
< t
->pass_count
; ++i
)
999 struct d3d10_effect_pass
*p
= &t
->passes
[i
];
1001 p
->vtbl
= &d3d10_effect_pass_vtbl
;
1004 hr
= parse_fx10_pass(p
, ptr
, data
);
1005 if (FAILED(hr
)) return hr
;
1011 static HRESULT
parse_fx10_variable(struct d3d10_effect_variable
*v
, const char **ptr
, const char *data
)
1017 hr
= parse_fx10_variable_head(v
, ptr
, data
);
1018 if (FAILED(hr
)) return hr
;
1020 read_dword(ptr
, &offset
);
1021 TRACE("Variable semantic at offset %#x.\n", offset
);
1023 if (!copy_name(data
+ offset
, &v
->semantic
))
1025 ERR("Failed to copy semantic.\n");
1026 return E_OUTOFMEMORY
;
1028 TRACE("Variable semantic: %s.\n", debugstr_a(v
->semantic
));
1030 read_dword(ptr
, &v
->buffer_offset
);
1031 TRACE("Variable offset in buffer: %#x.\n", v
->buffer_offset
);
1033 skip_dword_unknown(ptr
, 1);
1035 read_dword(ptr
, &v
->flag
);
1036 TRACE("Variable flag: %#x.\n", v
->flag
);
1038 read_dword(ptr
, &v
->annotation_count
);
1039 TRACE("Variable has %u annotations.\n", v
->annotation_count
);
1041 v
->annotations
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, v
->annotation_count
* sizeof(*v
->annotations
));
1042 if (!v
->annotations
)
1044 ERR("Failed to allocate variable annotations memory.\n");
1045 return E_OUTOFMEMORY
;
1048 for (i
= 0; i
< v
->annotation_count
; ++i
)
1050 struct d3d10_effect_variable
*a
= &v
->annotations
[i
];
1052 a
->effect
= v
->effect
;
1054 hr
= parse_fx10_annotation(a
, ptr
, data
);
1055 if (FAILED(hr
)) return hr
;
1061 static HRESULT
parse_fx10_local_variable(struct d3d10_effect_variable
*v
, const char **ptr
, const char *data
)
1066 hr
= parse_fx10_variable_head(v
, ptr
, data
);
1067 if (FAILED(hr
)) return hr
;
1069 skip_dword_unknown(ptr
, 2);
1071 switch (v
->type
->basetype
)
1073 case D3D10_SVT_TEXTURE1D
:
1074 case D3D10_SVT_TEXTURE1DARRAY
:
1075 case D3D10_SVT_TEXTURE2D
:
1076 case D3D10_SVT_TEXTURE2DARRAY
:
1077 case D3D10_SVT_TEXTURE2DMS
:
1078 case D3D10_SVT_TEXTURE2DMSARRAY
:
1079 case D3D10_SVT_TEXTURE3D
:
1080 case D3D10_SVT_TEXTURECUBE
:
1081 case D3D10_SVT_RENDERTARGETVIEW
:
1082 case D3D10_SVT_DEPTHSTENCILVIEW
:
1083 TRACE("SVT could not have elements.\n");
1086 case D3D10_SVT_VERTEXSHADER
:
1087 case D3D10_SVT_PIXELSHADER
:
1088 case D3D10_SVT_GEOMETRYSHADER
:
1089 TRACE("SVT is a shader.\n");
1090 for (i
= 0; i
< max(v
->type
->element_count
, 1); ++i
)
1092 DWORD shader_offset
;
1095 * TODO: Parse the shader
1097 read_dword(ptr
, &shader_offset
);
1098 FIXME("Shader offset: %#x.\n", shader_offset
);
1102 case D3D10_SVT_DEPTHSTENCIL
:
1103 case D3D10_SVT_BLEND
:
1104 case D3D10_SVT_RASTERIZER
:
1105 case D3D10_SVT_SAMPLER
:
1106 TRACE("SVT is a state.\n");
1107 for (i
= 0; i
< max(v
->type
->element_count
, 1); ++i
)
1112 read_dword(ptr
, &object_count
);
1113 TRACE("Object count: %#x.\n", object_count
);
1115 for (j
= 0; j
< object_count
; ++j
)
1117 skip_dword_unknown(ptr
, 4);
1123 FIXME("Unhandled case %s.\n", debug_d3d10_shader_variable_type(v
->type
->basetype
));
1127 read_dword(ptr
, &v
->annotation_count
);
1128 TRACE("Variable has %u annotations.\n", v
->annotation_count
);
1130 v
->annotations
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, v
->annotation_count
* sizeof(*v
->annotations
));
1131 if (!v
->annotations
)
1133 ERR("Failed to allocate variable annotations memory.\n");
1134 return E_OUTOFMEMORY
;
1137 for (i
= 0; i
< v
->annotation_count
; ++i
)
1139 struct d3d10_effect_variable
*a
= &v
->annotations
[i
];
1141 a
->effect
= v
->effect
;
1143 hr
= parse_fx10_annotation(a
, ptr
, data
);
1144 if (FAILED(hr
)) return hr
;
1150 static HRESULT
parse_fx10_local_buffer(struct d3d10_effect_variable
*l
, const char **ptr
, const char *data
)
1154 D3D10_CBUFFER_TYPE d3d10_cbuffer_type
;
1157 /* Generate our own type, it isn't in the fx blob. */
1158 l
->type
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(*l
->type
));
1161 ERR("Failed to allocate local buffer type memory.\n");
1162 return E_OUTOFMEMORY
;
1164 l
->type
->vtbl
= &d3d10_effect_type_vtbl
;
1165 l
->type
->type_class
= D3D10_SVC_OBJECT
;
1166 l
->type
->effect
= l
->effect
;
1168 read_dword(ptr
, &offset
);
1169 TRACE("Local buffer name at offset %#x.\n", offset
);
1171 if (!copy_name(data
+ offset
, &l
->name
))
1173 ERR("Failed to copy name.\n");
1174 return E_OUTOFMEMORY
;
1176 TRACE("Local buffer name: %s.\n", debugstr_a(l
->name
));
1178 read_dword(ptr
, &l
->data_size
);
1179 TRACE("Local buffer data size: %#x.\n", l
->data_size
);
1181 read_dword(ptr
, &d3d10_cbuffer_type
);
1182 TRACE("Local buffer type: %#x.\n", d3d10_cbuffer_type
);
1184 switch(d3d10_cbuffer_type
)
1186 case D3D10_CT_CBUFFER
:
1187 l
->type
->basetype
= D3D10_SVT_CBUFFER
;
1188 if (!copy_name("cbuffer", &l
->type
->name
))
1190 ERR("Failed to copy name.\n");
1191 return E_OUTOFMEMORY
;
1195 case D3D10_CT_TBUFFER
:
1196 l
->type
->basetype
= D3D10_SVT_TBUFFER
;
1197 if (!copy_name("tbuffer", &l
->type
->name
))
1199 ERR("Failed to copy name.\n");
1200 return E_OUTOFMEMORY
;
1205 ERR("Unexpected D3D10_CBUFFER_TYPE %#x!\n", d3d10_cbuffer_type
);
1209 read_dword(ptr
, &l
->type
->member_count
);
1210 TRACE("Local buffer member count: %#x.\n", l
->type
->member_count
);
1212 skip_dword_unknown(ptr
, 1);
1214 read_dword(ptr
, &l
->annotation_count
);
1215 TRACE("Local buffer has %u annotations.\n", l
->annotation_count
);
1217 l
->annotations
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, l
->annotation_count
* sizeof(*l
->annotations
));
1218 if (!l
->annotations
)
1220 ERR("Failed to allocate local buffer annotations memory.\n");
1221 return E_OUTOFMEMORY
;
1224 for(i
= 0; i
< l
->annotation_count
; ++i
)
1226 struct d3d10_effect_variable
*a
= &l
->annotations
[i
];
1228 a
->effect
= l
->effect
;
1230 hr
= parse_fx10_annotation(a
, ptr
, data
);
1231 if (FAILED(hr
)) return hr
;
1234 l
->members
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, l
->type
->member_count
* sizeof(*l
->members
));
1237 ERR("Failed to allocate members memory.\n");
1238 return E_OUTOFMEMORY
;
1241 l
->type
->members
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, l
->type
->member_count
* sizeof(*l
->type
->members
));
1242 if (!l
->type
->members
)
1244 ERR("Failed to allocate type members memory.\n");
1245 return E_OUTOFMEMORY
;
1248 for (i
= 0; i
< l
->type
->member_count
; ++i
)
1250 struct d3d10_effect_variable
*v
= &l
->members
[i
];
1251 struct d3d10_effect_type_member
*typem
= &l
->type
->members
[i
];
1254 v
->effect
= l
->effect
;
1256 hr
= parse_fx10_variable(v
, ptr
, data
);
1257 if (FAILED(hr
)) return hr
;
1260 * Copy the values from the variable type to the constant buffers type
1261 * members structure, because it is our own generated type.
1263 typem
->type
= v
->type
;
1265 if (!copy_name(v
->name
, &typem
->name
))
1267 ERR("Failed to copy name.\n");
1268 return E_OUTOFMEMORY
;
1270 TRACE("Variable name: %s.\n", debugstr_a(typem
->name
));
1272 if (!copy_name(v
->semantic
, &typem
->semantic
))
1274 ERR("Failed to copy name.\n");
1275 return E_OUTOFMEMORY
;
1277 TRACE("Variable semantic: %s.\n", debugstr_a(typem
->semantic
));
1279 typem
->buffer_offset
= v
->buffer_offset
;
1280 TRACE("Variable buffer offset: %u.\n", typem
->buffer_offset
);
1282 l
->type
->size_packed
+= v
->type
->size_packed
;
1283 l
->type
->size_unpacked
+= v
->type
->size_unpacked
;
1285 l
->type
->stride
= l
->type
->size_unpacked
= (l
->type
->size_unpacked
+ 0xf) & ~0xf;
1287 TRACE("Constant buffer:\n");
1288 TRACE("\tType name: %s.\n", debugstr_a(l
->type
->name
));
1289 TRACE("\tElement count: %u.\n", l
->type
->element_count
);
1290 TRACE("\tMember count: %u.\n", l
->type
->member_count
);
1291 TRACE("\tUnpacked size: %#x.\n", l
->type
->size_unpacked
);
1292 TRACE("\tStride: %#x.\n", l
->type
->stride
);
1293 TRACE("\tPacked size %#x.\n", l
->type
->size_packed
);
1294 TRACE("\tBasetype: %s.\n", debug_d3d10_shader_variable_type(l
->type
->basetype
));
1295 TRACE("\tTypeclass: %s.\n", debug_d3d10_shader_variable_class(l
->type
->type_class
));
1300 static int d3d10_effect_type_compare(const void *key
, const struct wine_rb_entry
*entry
)
1302 const struct d3d10_effect_type
*t
= WINE_RB_ENTRY_VALUE(entry
, const struct d3d10_effect_type
, entry
);
1303 const DWORD
*id
= key
;
1308 static void d3d10_effect_type_member_destroy(struct d3d10_effect_type_member
*typem
)
1310 TRACE("effect type member %p.\n", typem
);
1312 /* Do not release typem->type, it will be covered by d3d10_effect_type_destroy(). */
1313 HeapFree(GetProcessHeap(), 0, typem
->semantic
);
1314 HeapFree(GetProcessHeap(), 0, typem
->name
);
1317 static void d3d10_effect_type_destroy(struct wine_rb_entry
*entry
, void *context
)
1319 struct d3d10_effect_type
*t
= WINE_RB_ENTRY_VALUE(entry
, struct d3d10_effect_type
, entry
);
1321 TRACE("effect type %p.\n", t
);
1325 HeapFree(GetProcessHeap(), 0, t
->elementtype
->name
);
1326 HeapFree(GetProcessHeap(), 0, t
->elementtype
);
1333 for (i
= 0; i
< t
->member_count
; ++i
)
1335 d3d10_effect_type_member_destroy(&t
->members
[i
]);
1337 HeapFree(GetProcessHeap(), 0, t
->members
);
1340 HeapFree(GetProcessHeap(), 0, t
->name
);
1341 HeapFree(GetProcessHeap(), 0, t
);
1344 static const struct wine_rb_functions d3d10_effect_type_rb_functions
=
1349 d3d10_effect_type_compare
,
1352 static HRESULT
parse_fx10_body(struct d3d10_effect
*e
, const char *data
, DWORD data_size
)
1354 const char *ptr
= data
+ e
->index_offset
;
1358 if (wine_rb_init(&e
->types
, &d3d10_effect_type_rb_functions
) == -1)
1360 ERR("Failed to initialize type rbtree.\n");
1364 e
->local_buffers
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, e
->local_buffer_count
* sizeof(*e
->local_buffers
));
1365 if (!e
->local_buffers
)
1367 ERR("Failed to allocate local buffer memory.\n");
1368 return E_OUTOFMEMORY
;
1371 e
->local_variables
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, e
->local_variable_count
* sizeof(*e
->local_variables
));
1372 if (!e
->local_variables
)
1374 ERR("Failed to allocate local variable memory.\n");
1375 return E_OUTOFMEMORY
;
1378 e
->techniques
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, e
->technique_count
* sizeof(*e
->techniques
));
1381 ERR("Failed to allocate techniques memory\n");
1382 return E_OUTOFMEMORY
;
1385 for (i
= 0; i
< e
->local_buffer_count
; ++i
)
1387 struct d3d10_effect_variable
*l
= &e
->local_buffers
[i
];
1388 l
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_constant_buffer_vtbl
;
1390 l
->buffer
= &null_local_buffer
;
1392 hr
= parse_fx10_local_buffer(l
, &ptr
, data
);
1393 if (FAILED(hr
)) return hr
;
1396 for (i
= 0; i
< e
->local_variable_count
; ++i
)
1398 struct d3d10_effect_variable
*v
= &e
->local_variables
[i
];
1401 v
->vtbl
= &d3d10_effect_variable_vtbl
;
1403 hr
= parse_fx10_local_variable(v
, &ptr
, data
);
1404 if (FAILED(hr
)) return hr
;
1407 for (i
= 0; i
< e
->technique_count
; ++i
)
1409 struct d3d10_effect_technique
*t
= &e
->techniques
[i
];
1411 t
->vtbl
= &d3d10_effect_technique_vtbl
;
1414 hr
= parse_fx10_technique(t
, &ptr
, data
);
1415 if (FAILED(hr
)) return hr
;
1421 static HRESULT
parse_fx10(struct d3d10_effect
*e
, const char *data
, DWORD data_size
)
1423 const char *ptr
= data
;
1426 /* Compiled target version (e.g. fx_4_0=0xfeff1001, fx_4_1=0xfeff1011). */
1427 read_dword(&ptr
, &e
->version
);
1428 TRACE("Target: %#x\n", e
->version
);
1430 read_dword(&ptr
, &e
->local_buffer_count
);
1431 TRACE("Local buffer count: %u.\n", e
->local_buffer_count
);
1433 read_dword(&ptr
, &e
->variable_count
);
1434 TRACE("Variable count: %u\n", e
->variable_count
);
1436 read_dword(&ptr
, &e
->local_variable_count
);
1437 TRACE("Object count: %u\n", e
->local_variable_count
);
1439 read_dword(&ptr
, &e
->sharedbuffers_count
);
1440 TRACE("Sharedbuffers count: %u\n", e
->sharedbuffers_count
);
1442 /* Number of variables in shared buffers? */
1443 read_dword(&ptr
, &unknown
);
1444 FIXME("Unknown 0: %u\n", unknown
);
1446 read_dword(&ptr
, &e
->sharedobjects_count
);
1447 TRACE("Sharedobjects count: %u\n", e
->sharedobjects_count
);
1449 read_dword(&ptr
, &e
->technique_count
);
1450 TRACE("Technique count: %u\n", e
->technique_count
);
1452 read_dword(&ptr
, &e
->index_offset
);
1453 TRACE("Index offset: %#x\n", e
->index_offset
);
1455 read_dword(&ptr
, &unknown
);
1456 FIXME("Unknown 1: %u\n", unknown
);
1458 read_dword(&ptr
, &e
->texture_count
);
1459 TRACE("Texture count: %u\n", e
->texture_count
);
1461 read_dword(&ptr
, &e
->dephstencilstate_count
);
1462 TRACE("Depthstencilstate count: %u\n", e
->dephstencilstate_count
);
1464 read_dword(&ptr
, &e
->blendstate_count
);
1465 TRACE("Blendstate count: %u\n", e
->blendstate_count
);
1467 read_dword(&ptr
, &e
->rasterizerstate_count
);
1468 TRACE("Rasterizerstate count: %u\n", e
->rasterizerstate_count
);
1470 read_dword(&ptr
, &e
->samplerstate_count
);
1471 TRACE("Samplerstate count: %u\n", e
->samplerstate_count
);
1473 read_dword(&ptr
, &e
->rendertargetview_count
);
1474 TRACE("Rendertargetview count: %u\n", e
->rendertargetview_count
);
1476 read_dword(&ptr
, &e
->depthstencilview_count
);
1477 TRACE("Depthstencilview count: %u\n", e
->depthstencilview_count
);
1479 read_dword(&ptr
, &e
->shader_call_count
);
1480 TRACE("Shader call count: %u\n", e
->shader_call_count
);
1482 read_dword(&ptr
, &e
->shader_compile_count
);
1483 TRACE("Shader compile count: %u\n", e
->shader_compile_count
);
1485 return parse_fx10_body(e
, ptr
, data_size
- (ptr
- data
));
1488 static HRESULT
fx10_chunk_handler(const char *data
, DWORD data_size
, DWORD tag
, void *ctx
)
1490 struct d3d10_effect
*e
= ctx
;
1492 TRACE("tag: %s.\n", debugstr_an((const char *)&tag
, 4));
1494 TRACE("chunk size: %#x\n", data_size
);
1499 return parse_fx10(e
, data
, data_size
);
1502 FIXME("Unhandled chunk %s.\n", debugstr_an((const char *)&tag
, 4));
1507 HRESULT
d3d10_effect_parse(struct d3d10_effect
*This
, const void *data
, SIZE_T data_size
)
1509 return parse_dxbc(data
, data_size
, fx10_chunk_handler
, This
);
1512 static void d3d10_effect_object_destroy(struct d3d10_effect_object
*o
)
1514 TRACE("effect object %p.\n", o
);
1518 case D3D10_EOT_VERTEXSHADER
:
1519 case D3D10_EOT_PIXELSHADER
:
1520 case D3D10_EOT_GEOMETRYSHADER
:
1521 HeapFree(GetProcessHeap(), 0, ((struct d3d10_effect_shader_variable
*)o
->data
)->input_signature
);
1527 HeapFree(GetProcessHeap(), 0, o
->data
);
1530 static HRESULT
d3d10_effect_object_apply(struct d3d10_effect_object
*o
)
1532 ID3D10Device
*device
= o
->pass
->technique
->effect
->device
;
1534 TRACE("effect object %p, type %#x.\n", o
, o
->type
);
1538 case D3D10_EOT_VERTEXSHADER
:
1539 ID3D10Device_VSSetShader(device
, ((struct d3d10_effect_shader_variable
*)o
->data
)->shader
.vs
);
1542 case D3D10_EOT_PIXELSHADER
:
1543 ID3D10Device_PSSetShader(device
, ((struct d3d10_effect_shader_variable
*)o
->data
)->shader
.ps
);
1546 case D3D10_EOT_GEOMETRYSHADER
:
1547 ID3D10Device_GSSetShader(device
, ((struct d3d10_effect_shader_variable
*)o
->data
)->shader
.gs
);
1551 FIXME("Unhandled effect object type %#x.\n", o
->type
);
1556 static void d3d10_effect_variable_destroy(struct d3d10_effect_variable
*v
)
1560 TRACE("variable %p.\n", v
);
1562 HeapFree(GetProcessHeap(), 0, v
->name
);
1563 HeapFree(GetProcessHeap(), 0, v
->semantic
);
1566 for (i
= 0; i
< v
->annotation_count
; ++i
)
1568 d3d10_effect_variable_destroy(&v
->annotations
[i
]);
1570 HeapFree(GetProcessHeap(), 0, v
->annotations
);
1575 for (i
= 0; i
< v
->type
->member_count
; ++i
)
1577 d3d10_effect_variable_destroy(&v
->members
[i
]);
1579 HeapFree(GetProcessHeap(), 0, v
->members
);
1584 for (i
= 0; i
< v
->type
->element_count
; ++i
)
1586 d3d10_effect_variable_destroy(&v
->elements
[i
]);
1588 HeapFree(GetProcessHeap(), 0, v
->elements
);
1592 static void d3d10_effect_pass_destroy(struct d3d10_effect_pass
*p
)
1596 TRACE("pass %p\n", p
);
1598 HeapFree(GetProcessHeap(), 0, p
->name
);
1601 for (i
= 0; i
< p
->object_count
; ++i
)
1603 d3d10_effect_object_destroy(&p
->objects
[i
]);
1605 HeapFree(GetProcessHeap(), 0, p
->objects
);
1610 for (i
= 0; i
< p
->annotation_count
; ++i
)
1612 d3d10_effect_variable_destroy(&p
->annotations
[i
]);
1614 HeapFree(GetProcessHeap(), 0, p
->annotations
);
1619 static void d3d10_effect_technique_destroy(struct d3d10_effect_technique
*t
)
1623 TRACE("technique %p\n", t
);
1625 HeapFree(GetProcessHeap(), 0, t
->name
);
1628 for (i
= 0; i
< t
->pass_count
; ++i
)
1630 d3d10_effect_pass_destroy(&t
->passes
[i
]);
1632 HeapFree(GetProcessHeap(), 0, t
->passes
);
1637 for (i
= 0; i
< t
->annotation_count
; ++i
)
1639 d3d10_effect_variable_destroy(&t
->annotations
[i
]);
1641 HeapFree(GetProcessHeap(), 0, t
->annotations
);
1645 static void d3d10_effect_local_buffer_destroy(struct d3d10_effect_variable
*l
)
1649 TRACE("local buffer %p.\n", l
);
1651 HeapFree(GetProcessHeap(), 0, l
->name
);
1654 for (i
= 0; i
< l
->type
->member_count
; ++i
)
1656 d3d10_effect_variable_destroy(&l
->members
[i
]);
1658 HeapFree(GetProcessHeap(), 0, l
->members
);
1661 if (l
->type
->members
)
1663 for (i
= 0; i
< l
->type
->member_count
; ++i
)
1665 /* Do not release l->type->members[i].type, it will be covered by d3d10_effect_type_destroy(). */
1666 HeapFree(GetProcessHeap(), 0, l
->type
->members
[i
].semantic
);
1667 HeapFree(GetProcessHeap(), 0, l
->type
->members
[i
].name
);
1669 HeapFree(GetProcessHeap(), 0, l
->type
->members
);
1671 HeapFree(GetProcessHeap(), 0, l
->type
->name
);
1672 HeapFree(GetProcessHeap(), 0, l
->type
);
1676 for (i
= 0; i
< l
->annotation_count
; ++i
)
1678 d3d10_effect_variable_destroy(&l
->annotations
[i
]);
1680 HeapFree(GetProcessHeap(), 0, l
->annotations
);
1684 /* IUnknown methods */
1686 static HRESULT STDMETHODCALLTYPE
d3d10_effect_QueryInterface(ID3D10Effect
*iface
, REFIID riid
, void **object
)
1688 TRACE("iface %p, riid %s, object %p\n", iface
, debugstr_guid(riid
), object
);
1690 if (IsEqualGUID(riid
, &IID_ID3D10Effect
)
1691 || IsEqualGUID(riid
, &IID_IUnknown
))
1693 IUnknown_AddRef(iface
);
1698 WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid
));
1701 return E_NOINTERFACE
;
1704 static ULONG STDMETHODCALLTYPE
d3d10_effect_AddRef(ID3D10Effect
*iface
)
1706 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
1707 ULONG refcount
= InterlockedIncrement(&This
->refcount
);
1709 TRACE("%p increasing refcount to %u\n", This
, refcount
);
1714 static ULONG STDMETHODCALLTYPE
d3d10_effect_Release(ID3D10Effect
*iface
)
1716 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
1717 ULONG refcount
= InterlockedDecrement(&This
->refcount
);
1719 TRACE("%p decreasing refcount to %u\n", This
, refcount
);
1725 if (This
->techniques
)
1727 for (i
= 0; i
< This
->technique_count
; ++i
)
1729 d3d10_effect_technique_destroy(&This
->techniques
[i
]);
1731 HeapFree(GetProcessHeap(), 0, This
->techniques
);
1734 if (This
->local_variables
)
1736 for (i
= 0; i
< This
->local_variable_count
; ++i
)
1738 d3d10_effect_variable_destroy(&This
->local_variables
[i
]);
1740 HeapFree(GetProcessHeap(), 0, This
->local_variables
);
1743 if (This
->local_buffers
)
1745 for (i
= 0; i
< This
->local_buffer_count
; ++i
)
1747 d3d10_effect_local_buffer_destroy(&This
->local_buffers
[i
]);
1749 HeapFree(GetProcessHeap(), 0, This
->local_buffers
);
1752 wine_rb_destroy(&This
->types
, d3d10_effect_type_destroy
, NULL
);
1754 ID3D10Device_Release(This
->device
);
1755 HeapFree(GetProcessHeap(), 0, This
);
1761 /* ID3D10Effect methods */
1763 static BOOL STDMETHODCALLTYPE
d3d10_effect_IsValid(ID3D10Effect
*iface
)
1765 FIXME("iface %p stub!\n", iface
);
1770 static BOOL STDMETHODCALLTYPE
d3d10_effect_IsPool(ID3D10Effect
*iface
)
1772 FIXME("iface %p stub!\n", iface
);
1777 static HRESULT STDMETHODCALLTYPE
d3d10_effect_GetDevice(ID3D10Effect
*iface
, ID3D10Device
**device
)
1779 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
1781 TRACE("iface %p, device %p\n", iface
, device
);
1783 ID3D10Device_AddRef(This
->device
);
1784 *device
= This
->device
;
1789 static HRESULT STDMETHODCALLTYPE
d3d10_effect_GetDesc(ID3D10Effect
*iface
, D3D10_EFFECT_DESC
*desc
)
1791 FIXME("iface %p, desc %p stub!\n", iface
, desc
);
1796 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_GetConstantBufferByIndex(ID3D10Effect
*iface
,
1799 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
1800 struct d3d10_effect_variable
*l
;
1802 TRACE("iface %p, index %u\n", iface
, index
);
1804 if (index
>= This
->local_buffer_count
)
1806 WARN("Invalid index specified\n");
1807 return (ID3D10EffectConstantBuffer
*)&null_local_buffer
;
1810 l
= &This
->local_buffers
[index
];
1812 TRACE("Returning buffer %p, %s.\n", l
, debugstr_a(l
->name
));
1814 return (ID3D10EffectConstantBuffer
*)l
;
1817 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_GetConstantBufferByName(ID3D10Effect
*iface
,
1820 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
1823 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
1825 for (i
= 0; i
< This
->local_buffer_count
; ++i
)
1827 struct d3d10_effect_variable
*l
= &This
->local_buffers
[i
];
1829 if (!strcmp(l
->name
, name
))
1831 TRACE("Returning buffer %p.\n", l
);
1832 return (ID3D10EffectConstantBuffer
*)l
;
1836 WARN("Invalid name specified\n");
1838 return (ID3D10EffectConstantBuffer
*)&null_local_buffer
;
1841 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_GetVariableByIndex(ID3D10Effect
*iface
, UINT index
)
1843 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
1846 TRACE("iface %p, index %u\n", iface
, index
);
1848 for (i
= 0; i
< This
->local_buffer_count
; ++i
)
1850 struct d3d10_effect_variable
*l
= &This
->local_buffers
[i
];
1852 if (index
< l
->type
->member_count
)
1854 struct d3d10_effect_variable
*v
= &l
->members
[index
];
1856 TRACE("Returning variable %p.\n", v
);
1857 return (ID3D10EffectVariable
*)v
;
1859 index
-= l
->type
->member_count
;
1862 if (index
< This
->local_variable_count
)
1864 struct d3d10_effect_variable
*v
= &This
->local_variables
[index
];
1866 TRACE("Returning variable %p.\n", v
);
1867 return (ID3D10EffectVariable
*)v
;
1870 WARN("Invalid index specified\n");
1872 return (ID3D10EffectVariable
*)&null_variable
;
1875 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_GetVariableByName(ID3D10Effect
*iface
, LPCSTR name
)
1877 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
1880 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
1882 for (i
= 0; i
< This
->local_buffer_count
; ++i
)
1884 struct d3d10_effect_variable
*l
= &This
->local_buffers
[i
];
1887 for (j
= 0; j
< l
->type
->member_count
; ++j
)
1889 struct d3d10_effect_variable
*v
= &l
->members
[j
];
1891 if (!strcmp(v
->name
, name
))
1893 TRACE("Returning variable %p.\n", v
);
1894 return (ID3D10EffectVariable
*)v
;
1899 for (i
= 0; i
< This
->local_variable_count
; ++i
)
1901 struct d3d10_effect_variable
*v
= &This
->local_variables
[i
];
1903 if (!strcmp(v
->name
, name
))
1905 TRACE("Returning variable %p.\n", v
);
1906 return (ID3D10EffectVariable
*)v
;
1910 WARN("Invalid name specified\n");
1912 return (ID3D10EffectVariable
*)&null_variable
;
1915 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_GetVariableBySemantic(ID3D10Effect
*iface
,
1918 FIXME("iface %p, semantic %s stub!\n", iface
, debugstr_a(semantic
));
1923 static struct ID3D10EffectTechnique
* STDMETHODCALLTYPE
d3d10_effect_GetTechniqueByIndex(ID3D10Effect
*iface
,
1926 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
1927 struct d3d10_effect_technique
*t
;
1929 TRACE("iface %p, index %u\n", iface
, index
);
1931 if (index
>= This
->technique_count
)
1933 WARN("Invalid index specified\n");
1934 return (ID3D10EffectTechnique
*)&null_technique
;
1937 t
= &This
->techniques
[index
];
1939 TRACE("Returning technique %p, %s.\n", t
, debugstr_a(t
->name
));
1941 return (ID3D10EffectTechnique
*)t
;
1944 static struct ID3D10EffectTechnique
* STDMETHODCALLTYPE
d3d10_effect_GetTechniqueByName(ID3D10Effect
*iface
,
1947 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
1950 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
1952 for (i
= 0; i
< This
->technique_count
; ++i
)
1954 struct d3d10_effect_technique
*t
= &This
->techniques
[i
];
1955 if (!strcmp(t
->name
, name
))
1957 TRACE("Returning technique %p\n", t
);
1958 return (ID3D10EffectTechnique
*)t
;
1962 WARN("Invalid name specified\n");
1964 return (ID3D10EffectTechnique
*)&null_technique
;
1967 static HRESULT STDMETHODCALLTYPE
d3d10_effect_Optimize(ID3D10Effect
*iface
)
1969 FIXME("iface %p stub!\n", iface
);
1974 static BOOL STDMETHODCALLTYPE
d3d10_effect_IsOptimized(ID3D10Effect
*iface
)
1976 FIXME("iface %p stub!\n", iface
);
1981 const struct ID3D10EffectVtbl d3d10_effect_vtbl
=
1983 /* IUnknown methods */
1984 d3d10_effect_QueryInterface
,
1985 d3d10_effect_AddRef
,
1986 d3d10_effect_Release
,
1987 /* ID3D10Effect methods */
1988 d3d10_effect_IsValid
,
1989 d3d10_effect_IsPool
,
1990 d3d10_effect_GetDevice
,
1991 d3d10_effect_GetDesc
,
1992 d3d10_effect_GetConstantBufferByIndex
,
1993 d3d10_effect_GetConstantBufferByName
,
1994 d3d10_effect_GetVariableByIndex
,
1995 d3d10_effect_GetVariableByName
,
1996 d3d10_effect_GetVariableBySemantic
,
1997 d3d10_effect_GetTechniqueByIndex
,
1998 d3d10_effect_GetTechniqueByName
,
1999 d3d10_effect_Optimize
,
2000 d3d10_effect_IsOptimized
,
2003 /* ID3D10EffectTechnique methods */
2005 static BOOL STDMETHODCALLTYPE
d3d10_effect_technique_IsValid(ID3D10EffectTechnique
*iface
)
2007 TRACE("iface %p\n", iface
);
2009 return (struct d3d10_effect_technique
*)iface
!= &null_technique
;
2012 static HRESULT STDMETHODCALLTYPE
d3d10_effect_technique_GetDesc(ID3D10EffectTechnique
*iface
,
2013 D3D10_TECHNIQUE_DESC
*desc
)
2015 struct d3d10_effect_technique
*This
= (struct d3d10_effect_technique
*)iface
;
2017 TRACE("iface %p, desc %p\n", iface
, desc
);
2019 if(This
== &null_technique
)
2021 WARN("Null technique specified\n");
2027 WARN("Invalid argument specified\n");
2028 return E_INVALIDARG
;
2031 desc
->Name
= This
->name
;
2032 desc
->Passes
= This
->pass_count
;
2033 desc
->Annotations
= This
->annotation_count
;
2038 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_technique_GetAnnotationByIndex(
2039 ID3D10EffectTechnique
*iface
, UINT index
)
2041 struct d3d10_effect_technique
*This
= (struct d3d10_effect_technique
*)iface
;
2042 struct d3d10_effect_variable
*a
;
2044 TRACE("iface %p, index %u\n", iface
, index
);
2046 if (index
>= This
->annotation_count
)
2048 WARN("Invalid index specified\n");
2049 return (ID3D10EffectVariable
*)&null_variable
;
2052 a
= &This
->annotations
[index
];
2054 TRACE("Returning annotation %p, %s\n", a
, debugstr_a(a
->name
));
2056 return (ID3D10EffectVariable
*)a
;
2059 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_technique_GetAnnotationByName(
2060 ID3D10EffectTechnique
*iface
, LPCSTR name
)
2062 struct d3d10_effect_technique
*This
= (struct d3d10_effect_technique
*)iface
;
2065 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2067 for (i
= 0; i
< This
->annotation_count
; ++i
)
2069 struct d3d10_effect_variable
*a
= &This
->annotations
[i
];
2070 if (!strcmp(a
->name
, name
))
2072 TRACE("Returning annotation %p\n", a
);
2073 return (ID3D10EffectVariable
*)a
;
2077 WARN("Invalid name specified\n");
2079 return (ID3D10EffectVariable
*)&null_variable
;
2082 static struct ID3D10EffectPass
* STDMETHODCALLTYPE
d3d10_effect_technique_GetPassByIndex(ID3D10EffectTechnique
*iface
,
2085 struct d3d10_effect_technique
*This
= (struct d3d10_effect_technique
*)iface
;
2086 struct d3d10_effect_pass
*p
;
2088 TRACE("iface %p, index %u\n", iface
, index
);
2090 if (index
>= This
->pass_count
)
2092 WARN("Invalid index specified\n");
2093 return (ID3D10EffectPass
*)&null_pass
;
2096 p
= &This
->passes
[index
];
2098 TRACE("Returning pass %p, %s.\n", p
, debugstr_a(p
->name
));
2100 return (ID3D10EffectPass
*)p
;
2103 static struct ID3D10EffectPass
* STDMETHODCALLTYPE
d3d10_effect_technique_GetPassByName(ID3D10EffectTechnique
*iface
,
2106 struct d3d10_effect_technique
*This
= (struct d3d10_effect_technique
*)iface
;
2109 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2111 for (i
= 0; i
< This
->pass_count
; ++i
)
2113 struct d3d10_effect_pass
*p
= &This
->passes
[i
];
2114 if (!strcmp(p
->name
, name
))
2116 TRACE("Returning pass %p\n", p
);
2117 return (ID3D10EffectPass
*)p
;
2121 WARN("Invalid name specified\n");
2123 return (ID3D10EffectPass
*)&null_pass
;
2126 static HRESULT STDMETHODCALLTYPE
d3d10_effect_technique_ComputeStateBlockMask(ID3D10EffectTechnique
*iface
,
2127 D3D10_STATE_BLOCK_MASK
*mask
)
2129 FIXME("iface %p,mask %p stub!\n", iface
, mask
);
2134 static const struct ID3D10EffectTechniqueVtbl d3d10_effect_technique_vtbl
=
2136 /* ID3D10EffectTechnique methods */
2137 d3d10_effect_technique_IsValid
,
2138 d3d10_effect_technique_GetDesc
,
2139 d3d10_effect_technique_GetAnnotationByIndex
,
2140 d3d10_effect_technique_GetAnnotationByName
,
2141 d3d10_effect_technique_GetPassByIndex
,
2142 d3d10_effect_technique_GetPassByName
,
2143 d3d10_effect_technique_ComputeStateBlockMask
,
2146 /* ID3D10EffectPass methods */
2148 static BOOL STDMETHODCALLTYPE
d3d10_effect_pass_IsValid(ID3D10EffectPass
*iface
)
2150 TRACE("iface %p\n", iface
);
2152 return (struct d3d10_effect_pass
*)iface
!= &null_pass
;
2155 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_GetDesc(ID3D10EffectPass
*iface
, D3D10_PASS_DESC
*desc
)
2157 struct d3d10_effect_pass
*This
= (struct d3d10_effect_pass
*)iface
;
2160 FIXME("iface %p, desc %p partial stub!\n", iface
, desc
);
2162 if(This
== &null_pass
)
2164 WARN("Null pass specified\n");
2170 WARN("Invalid argument specified\n");
2171 return E_INVALIDARG
;
2174 memset(desc
, 0, sizeof(*desc
));
2175 desc
->Name
= This
->name
;
2176 for (i
= 0; i
< This
->object_count
; ++i
)
2178 struct d3d10_effect_object
*o
= &This
->objects
[i
];
2179 if (o
->type
== D3D10_EOT_VERTEXSHADER
)
2181 struct d3d10_effect_shader_variable
*s
= o
->data
;
2182 desc
->pIAInputSignature
= (BYTE
*)s
->input_signature
;
2183 desc
->IAInputSignatureSize
= s
->input_signature_size
;
2191 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_GetVertexShaderDesc(ID3D10EffectPass
*iface
,
2192 D3D10_PASS_SHADER_DESC
*desc
)
2194 FIXME("iface %p, desc %p stub!\n", iface
, desc
);
2199 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_GetGeometryShaderDesc(ID3D10EffectPass
*iface
,
2200 D3D10_PASS_SHADER_DESC
*desc
)
2202 FIXME("iface %p, desc %p stub!\n", iface
, desc
);
2207 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_GetPixelShaderDesc(ID3D10EffectPass
*iface
,
2208 D3D10_PASS_SHADER_DESC
*desc
)
2210 FIXME("iface %p, desc %p stub!\n", iface
, desc
);
2215 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_pass_GetAnnotationByIndex(ID3D10EffectPass
*iface
,
2218 struct d3d10_effect_pass
*This
= (struct d3d10_effect_pass
*)iface
;
2219 struct d3d10_effect_variable
*a
;
2221 TRACE("iface %p, index %u\n", iface
, index
);
2223 if (index
>= This
->annotation_count
)
2225 WARN("Invalid index specified\n");
2226 return (ID3D10EffectVariable
*)&null_variable
;
2229 a
= &This
->annotations
[index
];
2231 TRACE("Returning annotation %p, %s\n", a
, debugstr_a(a
->name
));
2233 return (ID3D10EffectVariable
*)a
;
2236 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_pass_GetAnnotationByName(ID3D10EffectPass
*iface
,
2239 struct d3d10_effect_pass
*This
= (struct d3d10_effect_pass
*)iface
;
2242 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2244 for (i
= 0; i
< This
->annotation_count
; ++i
)
2246 struct d3d10_effect_variable
*a
= &This
->annotations
[i
];
2247 if (!strcmp(a
->name
, name
))
2249 TRACE("Returning annotation %p\n", a
);
2250 return (ID3D10EffectVariable
*)a
;
2254 WARN("Invalid name specified\n");
2256 return (ID3D10EffectVariable
*)&null_variable
;
2259 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_Apply(ID3D10EffectPass
*iface
, UINT flags
)
2261 struct d3d10_effect_pass
*This
= (struct d3d10_effect_pass
*)iface
;
2265 TRACE("iface %p, flags %#x\n", iface
, flags
);
2267 if (flags
) FIXME("Ignoring flags (%#x)\n", flags
);
2269 for (i
= 0; i
< This
->object_count
; ++i
)
2271 hr
= d3d10_effect_object_apply(&This
->objects
[i
]);
2272 if (FAILED(hr
)) break;
2278 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_ComputeStateBlockMask(ID3D10EffectPass
*iface
,
2279 D3D10_STATE_BLOCK_MASK
*mask
)
2281 FIXME("iface %p, mask %p stub!\n", iface
, mask
);
2286 static const struct ID3D10EffectPassVtbl d3d10_effect_pass_vtbl
=
2288 /* ID3D10EffectPass methods */
2289 d3d10_effect_pass_IsValid
,
2290 d3d10_effect_pass_GetDesc
,
2291 d3d10_effect_pass_GetVertexShaderDesc
,
2292 d3d10_effect_pass_GetGeometryShaderDesc
,
2293 d3d10_effect_pass_GetPixelShaderDesc
,
2294 d3d10_effect_pass_GetAnnotationByIndex
,
2295 d3d10_effect_pass_GetAnnotationByName
,
2296 d3d10_effect_pass_Apply
,
2297 d3d10_effect_pass_ComputeStateBlockMask
,
2300 /* ID3D10EffectVariable methods */
2302 static BOOL STDMETHODCALLTYPE
d3d10_effect_variable_IsValid(ID3D10EffectVariable
*iface
)
2304 TRACE("iface %p\n", iface
);
2306 return (struct d3d10_effect_variable
*)iface
!= &null_variable
;
2309 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_variable_GetType(ID3D10EffectVariable
*iface
)
2311 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2313 TRACE("iface %p\n", iface
);
2315 return (ID3D10EffectType
*)This
->type
;
2318 static HRESULT STDMETHODCALLTYPE
d3d10_effect_variable_GetDesc(ID3D10EffectVariable
*iface
,
2319 D3D10_EFFECT_VARIABLE_DESC
*desc
)
2321 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2323 TRACE("iface %p, desc %p\n", iface
, desc
);
2325 if(This
== &null_variable
)
2327 WARN("Null variable specified\n");
2333 WARN("Invalid argument specified\n");
2334 return E_INVALIDARG
;
2337 memset(desc
, 0, sizeof(*desc
));
2338 desc
->Name
= This
->name
;
2339 desc
->Semantic
= This
->semantic
;
2340 desc
->Flags
= This
->flag
;
2341 desc
->Annotations
= This
->annotation_count
;
2342 desc
->BufferOffset
= This
->buffer_offset
;
2344 if( This
->flag
== D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT
)
2346 desc
->ExplicitBindPoint
= This
->buffer_offset
;
2350 FIXME("Unhandled flag %#x!\n", This
->flag
);
2356 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetAnnotationByIndex(
2357 ID3D10EffectVariable
*iface
, UINT index
)
2359 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2360 struct d3d10_effect_variable
*a
;
2362 TRACE("iface %p, index %u\n", iface
, index
);
2364 if (index
>= This
->annotation_count
)
2366 WARN("Invalid index specified\n");
2367 return (ID3D10EffectVariable
*)&null_variable
;
2370 a
= &This
->annotations
[index
];
2372 TRACE("Returning annotation %p, %s\n", a
, debugstr_a(a
->name
));
2374 return (ID3D10EffectVariable
*)a
;
2377 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetAnnotationByName(
2378 ID3D10EffectVariable
*iface
, LPCSTR name
)
2380 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2383 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2385 for (i
= 0; i
< This
->annotation_count
; ++i
)
2387 struct d3d10_effect_variable
*a
= &This
->annotations
[i
];
2388 if (!strcmp(a
->name
, name
))
2390 TRACE("Returning annotation %p\n", a
);
2391 return (ID3D10EffectVariable
*)a
;
2395 WARN("Invalid name specified\n");
2397 return (ID3D10EffectVariable
*)&null_variable
;
2400 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetMemberByIndex(
2401 ID3D10EffectVariable
*iface
, UINT index
)
2403 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2404 struct d3d10_effect_variable
*m
;
2406 TRACE("iface %p, index %u\n", iface
, index
);
2408 if (index
>= This
->type
->member_count
)
2410 WARN("Invalid index specified\n");
2411 return (ID3D10EffectVariable
*)&null_variable
;
2414 m
= &This
->members
[index
];
2416 TRACE("Returning member %p, %s\n", m
, debugstr_a(m
->name
));
2418 return (ID3D10EffectVariable
*)m
;
2421 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetMemberByName(
2422 ID3D10EffectVariable
*iface
, LPCSTR name
)
2424 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2427 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2431 WARN("Invalid name specified\n");
2432 return (ID3D10EffectVariable
*)&null_variable
;
2435 for (i
= 0; i
< This
->type
->member_count
; ++i
)
2437 struct d3d10_effect_variable
*m
= &This
->members
[i
];
2441 if (!strcmp(m
->name
, name
))
2443 TRACE("Returning member %p\n", m
);
2444 return (ID3D10EffectVariable
*)m
;
2449 WARN("Invalid name specified\n");
2451 return (ID3D10EffectVariable
*)&null_variable
;
2454 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetMemberBySemantic(
2455 ID3D10EffectVariable
*iface
, LPCSTR semantic
)
2457 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2460 TRACE("iface %p, semantic %s.\n", iface
, debugstr_a(semantic
));
2464 WARN("Invalid semantic specified\n");
2465 return (ID3D10EffectVariable
*)&null_variable
;
2468 for (i
= 0; i
< This
->type
->member_count
; ++i
)
2470 struct d3d10_effect_variable
*m
= &This
->members
[i
];
2474 if (!strcmp(m
->semantic
, semantic
))
2476 TRACE("Returning member %p\n", m
);
2477 return (ID3D10EffectVariable
*)m
;
2482 WARN("Invalid semantic specified\n");
2484 return (ID3D10EffectVariable
*)&null_variable
;
2487 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetElement(
2488 ID3D10EffectVariable
*iface
, UINT index
)
2490 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2491 struct d3d10_effect_variable
*v
;
2493 TRACE("iface %p, index %u\n", iface
, index
);
2495 if (index
>= This
->type
->element_count
)
2497 WARN("Invalid index specified\n");
2498 return (ID3D10EffectVariable
*)&null_variable
;
2501 v
= &This
->elements
[index
];
2503 TRACE("Returning element %p, %s\n", v
, debugstr_a(v
->name
));
2505 return (ID3D10EffectVariable
*)v
;
2508 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_variable_GetParentConstantBuffer(
2509 ID3D10EffectVariable
*iface
)
2511 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2513 TRACE("iface %p\n", iface
);
2515 return (ID3D10EffectConstantBuffer
*)This
->buffer
;
2518 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsScalar(
2519 ID3D10EffectVariable
*iface
)
2521 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2523 TRACE("iface %p\n", iface
);
2525 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_scalar_variable_vtbl
)
2526 return (ID3D10EffectScalarVariable
*)This
;
2528 return (ID3D10EffectScalarVariable
*)&null_scalar_variable
;
2531 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsVector(
2532 ID3D10EffectVariable
*iface
)
2534 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2536 TRACE("iface %p\n", iface
);
2538 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_vector_variable_vtbl
)
2539 return (ID3D10EffectVectorVariable
*)This
;
2541 return (ID3D10EffectVectorVariable
*)&null_vector_variable
;
2544 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsMatrix(
2545 ID3D10EffectVariable
*iface
)
2547 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2549 TRACE("iface %p\n", iface
);
2551 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_matrix_variable_vtbl
)
2552 return (ID3D10EffectMatrixVariable
*)This
;
2554 return (ID3D10EffectMatrixVariable
*)&null_matrix_variable
;
2557 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsString(
2558 ID3D10EffectVariable
*iface
)
2560 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2562 TRACE("iface %p\n", iface
);
2564 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_string_variable_vtbl
)
2565 return (ID3D10EffectStringVariable
*)This
;
2567 return (ID3D10EffectStringVariable
*)&null_string_variable
;
2570 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsShaderResource(
2571 ID3D10EffectVariable
*iface
)
2573 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2575 TRACE("iface %p\n", iface
);
2577 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_resource_variable_vtbl
)
2578 return (ID3D10EffectShaderResourceVariable
*)This
;
2580 return (ID3D10EffectShaderResourceVariable
*)&null_shader_resource_variable
;
2583 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsRenderTargetView(
2584 ID3D10EffectVariable
*iface
)
2586 FIXME("iface %p stub!\n", iface
);
2591 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsDepthStencilView(
2592 ID3D10EffectVariable
*iface
)
2594 FIXME("iface %p stub!\n", iface
);
2599 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_variable_AsConstantBuffer(
2600 ID3D10EffectVariable
*iface
)
2602 FIXME("iface %p stub!\n", iface
);
2607 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsShader(
2608 ID3D10EffectVariable
*iface
)
2610 FIXME("iface %p stub!\n", iface
);
2615 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsBlend(ID3D10EffectVariable
*iface
)
2617 FIXME("iface %p stub!\n", iface
);
2622 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsDepthStencil(
2623 ID3D10EffectVariable
*iface
)
2625 FIXME("iface %p stub!\n", iface
);
2630 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsRasterizer(
2631 ID3D10EffectVariable
*iface
)
2633 FIXME("iface %p stub!\n", iface
);
2638 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsSampler(
2639 ID3D10EffectVariable
*iface
)
2641 FIXME("iface %p stub!\n", iface
);
2646 static HRESULT STDMETHODCALLTYPE
d3d10_effect_variable_SetRawValue(ID3D10EffectVariable
*iface
,
2647 void *data
, UINT offset
, UINT count
)
2649 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
2654 static HRESULT STDMETHODCALLTYPE
d3d10_effect_variable_GetRawValue(ID3D10EffectVariable
*iface
,
2655 void *data
, UINT offset
, UINT count
)
2657 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
2662 static const struct ID3D10EffectVariableVtbl d3d10_effect_variable_vtbl
=
2664 /* ID3D10EffectVariable methods */
2665 d3d10_effect_variable_IsValid
,
2666 d3d10_effect_variable_GetType
,
2667 d3d10_effect_variable_GetDesc
,
2668 d3d10_effect_variable_GetAnnotationByIndex
,
2669 d3d10_effect_variable_GetAnnotationByName
,
2670 d3d10_effect_variable_GetMemberByIndex
,
2671 d3d10_effect_variable_GetMemberByName
,
2672 d3d10_effect_variable_GetMemberBySemantic
,
2673 d3d10_effect_variable_GetElement
,
2674 d3d10_effect_variable_GetParentConstantBuffer
,
2675 d3d10_effect_variable_AsScalar
,
2676 d3d10_effect_variable_AsVector
,
2677 d3d10_effect_variable_AsMatrix
,
2678 d3d10_effect_variable_AsString
,
2679 d3d10_effect_variable_AsShaderResource
,
2680 d3d10_effect_variable_AsRenderTargetView
,
2681 d3d10_effect_variable_AsDepthStencilView
,
2682 d3d10_effect_variable_AsConstantBuffer
,
2683 d3d10_effect_variable_AsShader
,
2684 d3d10_effect_variable_AsBlend
,
2685 d3d10_effect_variable_AsDepthStencil
,
2686 d3d10_effect_variable_AsRasterizer
,
2687 d3d10_effect_variable_AsSampler
,
2688 d3d10_effect_variable_SetRawValue
,
2689 d3d10_effect_variable_GetRawValue
,
2692 /* ID3D10EffectVariable methods */
2693 static BOOL STDMETHODCALLTYPE
d3d10_effect_constant_buffer_IsValid(ID3D10EffectConstantBuffer
*iface
)
2695 TRACE("iface %p\n", iface
);
2697 return (struct d3d10_effect_variable
*)iface
!= &null_local_buffer
;
2700 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetType(ID3D10EffectConstantBuffer
*iface
)
2702 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
2705 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetDesc(ID3D10EffectConstantBuffer
*iface
,
2706 D3D10_EFFECT_VARIABLE_DESC
*desc
)
2708 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
2711 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetAnnotationByIndex(
2712 ID3D10EffectConstantBuffer
*iface
, UINT index
)
2714 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
2717 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetAnnotationByName(
2718 ID3D10EffectConstantBuffer
*iface
, LPCSTR name
)
2720 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
2723 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetMemberByIndex(
2724 ID3D10EffectConstantBuffer
*iface
, UINT index
)
2726 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
2729 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetMemberByName(
2730 ID3D10EffectConstantBuffer
*iface
, LPCSTR name
)
2732 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
2735 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetMemberBySemantic(
2736 ID3D10EffectConstantBuffer
*iface
, LPCSTR semantic
)
2738 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
2741 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetElement(
2742 ID3D10EffectConstantBuffer
*iface
, UINT index
)
2744 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
2747 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetParentConstantBuffer(
2748 ID3D10EffectConstantBuffer
*iface
)
2750 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
2753 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsScalar(
2754 ID3D10EffectConstantBuffer
*iface
)
2756 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
2759 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsVector(
2760 ID3D10EffectConstantBuffer
*iface
)
2762 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
2765 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsMatrix(
2766 ID3D10EffectConstantBuffer
*iface
)
2768 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
2771 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsString(
2772 ID3D10EffectConstantBuffer
*iface
)
2774 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
2777 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsShaderResource(
2778 ID3D10EffectConstantBuffer
*iface
)
2780 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
2783 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsRenderTargetView(
2784 ID3D10EffectConstantBuffer
*iface
)
2786 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
2789 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsDepthStencilView(
2790 ID3D10EffectConstantBuffer
*iface
)
2792 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
2795 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsConstantBuffer(
2796 ID3D10EffectConstantBuffer
*iface
)
2798 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
2801 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsShader(
2802 ID3D10EffectConstantBuffer
*iface
)
2804 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
2807 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsBlend(ID3D10EffectConstantBuffer
*iface
)
2809 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
2812 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsDepthStencil(
2813 ID3D10EffectConstantBuffer
*iface
)
2815 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
2818 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsRasterizer(
2819 ID3D10EffectConstantBuffer
*iface
)
2821 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
2824 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsSampler(
2825 ID3D10EffectConstantBuffer
*iface
)
2827 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
2830 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_SetRawValue(ID3D10EffectConstantBuffer
*iface
,
2831 void *data
, UINT offset
, UINT count
)
2833 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
2836 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetRawValue(ID3D10EffectConstantBuffer
*iface
,
2837 void *data
, UINT offset
, UINT count
)
2839 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
2842 /* ID3D10EffectConstantBuffer methods */
2843 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_SetConstantBuffer(ID3D10EffectConstantBuffer
*iface
,
2844 ID3D10Buffer
*buffer
)
2846 FIXME("iface %p, buffer %p stub!\n", iface
, buffer
);
2851 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetConstantBuffer(ID3D10EffectConstantBuffer
*iface
,
2852 ID3D10Buffer
**buffer
)
2854 FIXME("iface %p, buffer %p stub!\n", iface
, buffer
);
2859 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_SetTextureBuffer(ID3D10EffectConstantBuffer
*iface
,
2860 ID3D10ShaderResourceView
*view
)
2862 FIXME("iface %p, view %p stub!\n", iface
, view
);
2867 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetTextureBuffer(ID3D10EffectConstantBuffer
*iface
,
2868 ID3D10ShaderResourceView
**view
)
2870 FIXME("iface %p, view %p stub!\n", iface
, view
);
2875 static const struct ID3D10EffectConstantBufferVtbl d3d10_effect_constant_buffer_vtbl
=
2877 /* ID3D10EffectVariable methods */
2878 d3d10_effect_constant_buffer_IsValid
,
2879 d3d10_effect_constant_buffer_GetType
,
2880 d3d10_effect_constant_buffer_GetDesc
,
2881 d3d10_effect_constant_buffer_GetAnnotationByIndex
,
2882 d3d10_effect_constant_buffer_GetAnnotationByName
,
2883 d3d10_effect_constant_buffer_GetMemberByIndex
,
2884 d3d10_effect_constant_buffer_GetMemberByName
,
2885 d3d10_effect_constant_buffer_GetMemberBySemantic
,
2886 d3d10_effect_constant_buffer_GetElement
,
2887 d3d10_effect_constant_buffer_GetParentConstantBuffer
,
2888 d3d10_effect_constant_buffer_AsScalar
,
2889 d3d10_effect_constant_buffer_AsVector
,
2890 d3d10_effect_constant_buffer_AsMatrix
,
2891 d3d10_effect_constant_buffer_AsString
,
2892 d3d10_effect_constant_buffer_AsShaderResource
,
2893 d3d10_effect_constant_buffer_AsRenderTargetView
,
2894 d3d10_effect_constant_buffer_AsDepthStencilView
,
2895 d3d10_effect_constant_buffer_AsConstantBuffer
,
2896 d3d10_effect_constant_buffer_AsShader
,
2897 d3d10_effect_constant_buffer_AsBlend
,
2898 d3d10_effect_constant_buffer_AsDepthStencil
,
2899 d3d10_effect_constant_buffer_AsRasterizer
,
2900 d3d10_effect_constant_buffer_AsSampler
,
2901 d3d10_effect_constant_buffer_SetRawValue
,
2902 d3d10_effect_constant_buffer_GetRawValue
,
2903 /* ID3D10EffectConstantBuffer methods */
2904 d3d10_effect_constant_buffer_SetConstantBuffer
,
2905 d3d10_effect_constant_buffer_GetConstantBuffer
,
2906 d3d10_effect_constant_buffer_SetTextureBuffer
,
2907 d3d10_effect_constant_buffer_GetTextureBuffer
,
2910 /* ID3D10EffectVariable methods */
2912 static BOOL STDMETHODCALLTYPE
d3d10_effect_scalar_variable_IsValid(ID3D10EffectScalarVariable
*iface
)
2914 TRACE("iface %p\n", iface
);
2916 return (struct d3d10_effect_variable
*)iface
!= &null_scalar_variable
;
2919 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetType(
2920 ID3D10EffectScalarVariable
*iface
)
2922 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
2925 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetDesc(ID3D10EffectScalarVariable
*iface
,
2926 D3D10_EFFECT_VARIABLE_DESC
*desc
)
2928 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
2931 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetAnnotationByIndex(
2932 ID3D10EffectScalarVariable
*iface
, UINT index
)
2934 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
2937 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetAnnotationByName(
2938 ID3D10EffectScalarVariable
*iface
, LPCSTR name
)
2940 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
2943 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetMemberByIndex(
2944 ID3D10EffectScalarVariable
*iface
, UINT index
)
2946 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
2949 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetMemberByName(
2950 ID3D10EffectScalarVariable
*iface
, LPCSTR name
)
2952 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
2955 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetMemberBySemantic(
2956 ID3D10EffectScalarVariable
*iface
, LPCSTR semantic
)
2958 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
2961 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetElement(
2962 ID3D10EffectScalarVariable
*iface
, UINT index
)
2964 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
2967 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetParentConstantBuffer(
2968 ID3D10EffectScalarVariable
*iface
)
2970 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
2973 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsScalar(
2974 ID3D10EffectScalarVariable
*iface
)
2976 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
2979 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsVector(
2980 ID3D10EffectScalarVariable
*iface
)
2982 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
2985 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsMatrix(
2986 ID3D10EffectScalarVariable
*iface
)
2988 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
2991 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsString(
2992 ID3D10EffectScalarVariable
*iface
)
2994 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
2997 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsShaderResource(
2998 ID3D10EffectScalarVariable
*iface
)
3000 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
3003 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsRenderTargetView(
3004 ID3D10EffectScalarVariable
*iface
)
3006 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
3009 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsDepthStencilView(
3010 ID3D10EffectScalarVariable
*iface
)
3012 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
3015 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsConstantBuffer(
3016 ID3D10EffectScalarVariable
*iface
)
3018 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
3021 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsShader(
3022 ID3D10EffectScalarVariable
*iface
)
3024 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
3027 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsBlend(
3028 ID3D10EffectScalarVariable
*iface
)
3030 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
3033 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsDepthStencil(
3034 ID3D10EffectScalarVariable
*iface
)
3036 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
3039 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsRasterizer(
3040 ID3D10EffectScalarVariable
*iface
)
3042 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
3045 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsSampler(
3046 ID3D10EffectScalarVariable
*iface
)
3048 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
3051 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetRawValue(ID3D10EffectScalarVariable
*iface
,
3052 void *data
, UINT offset
, UINT count
)
3054 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3057 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetRawValue(ID3D10EffectScalarVariable
*iface
,
3058 void *data
, UINT offset
, UINT count
)
3060 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3063 /* ID3D10EffectScalarVariable methods */
3065 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetFloat(ID3D10EffectScalarVariable
*iface
,
3068 FIXME("iface %p, value %.8e stub!\n", iface
, value
);
3073 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetFloat(ID3D10EffectScalarVariable
*iface
,
3076 FIXME("iface %p, value %p stub!\n", iface
, value
);
3081 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetFloatArray(ID3D10EffectScalarVariable
*iface
,
3082 float *values
, UINT offset
, UINT count
)
3084 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3089 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetFloatArray(ID3D10EffectScalarVariable
*iface
,
3090 float *values
, UINT offset
, UINT count
)
3092 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3097 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetInt(ID3D10EffectScalarVariable
*iface
,
3100 FIXME("iface %p, value %d stub!\n", iface
, value
);
3105 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetInt(ID3D10EffectScalarVariable
*iface
,
3108 FIXME("iface %p, value %p stub!\n", iface
, value
);
3113 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetIntArray(ID3D10EffectScalarVariable
*iface
,
3114 int *values
, UINT offset
, UINT count
)
3116 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3121 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetIntArray(ID3D10EffectScalarVariable
*iface
,
3122 int *values
, UINT offset
, UINT count
)
3124 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3129 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetBool(ID3D10EffectScalarVariable
*iface
,
3132 FIXME("iface %p, value %d stub!\n", iface
, value
);
3137 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetBool(ID3D10EffectScalarVariable
*iface
,
3140 FIXME("iface %p, value %p stub!\n", iface
, value
);
3145 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetBoolArray(ID3D10EffectScalarVariable
*iface
,
3146 BOOL
*values
, UINT offset
, UINT count
)
3148 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3153 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetBoolArray(ID3D10EffectScalarVariable
*iface
,
3154 BOOL
*values
, UINT offset
, UINT count
)
3156 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3161 static const struct ID3D10EffectScalarVariableVtbl d3d10_effect_scalar_variable_vtbl
=
3163 /* ID3D10EffectVariable methods */
3164 d3d10_effect_scalar_variable_IsValid
,
3165 d3d10_effect_scalar_variable_GetType
,
3166 d3d10_effect_scalar_variable_GetDesc
,
3167 d3d10_effect_scalar_variable_GetAnnotationByIndex
,
3168 d3d10_effect_scalar_variable_GetAnnotationByName
,
3169 d3d10_effect_scalar_variable_GetMemberByIndex
,
3170 d3d10_effect_scalar_variable_GetMemberByName
,
3171 d3d10_effect_scalar_variable_GetMemberBySemantic
,
3172 d3d10_effect_scalar_variable_GetElement
,
3173 d3d10_effect_scalar_variable_GetParentConstantBuffer
,
3174 d3d10_effect_scalar_variable_AsScalar
,
3175 d3d10_effect_scalar_variable_AsVector
,
3176 d3d10_effect_scalar_variable_AsMatrix
,
3177 d3d10_effect_scalar_variable_AsString
,
3178 d3d10_effect_scalar_variable_AsShaderResource
,
3179 d3d10_effect_scalar_variable_AsRenderTargetView
,
3180 d3d10_effect_scalar_variable_AsDepthStencilView
,
3181 d3d10_effect_scalar_variable_AsConstantBuffer
,
3182 d3d10_effect_scalar_variable_AsShader
,
3183 d3d10_effect_scalar_variable_AsBlend
,
3184 d3d10_effect_scalar_variable_AsDepthStencil
,
3185 d3d10_effect_scalar_variable_AsRasterizer
,
3186 d3d10_effect_scalar_variable_AsSampler
,
3187 d3d10_effect_scalar_variable_SetRawValue
,
3188 d3d10_effect_scalar_variable_GetRawValue
,
3189 /* ID3D10EffectScalarVariable methods */
3190 d3d10_effect_scalar_variable_SetFloat
,
3191 d3d10_effect_scalar_variable_GetFloat
,
3192 d3d10_effect_scalar_variable_SetFloatArray
,
3193 d3d10_effect_scalar_variable_GetFloatArray
,
3194 d3d10_effect_scalar_variable_SetInt
,
3195 d3d10_effect_scalar_variable_GetInt
,
3196 d3d10_effect_scalar_variable_SetIntArray
,
3197 d3d10_effect_scalar_variable_GetIntArray
,
3198 d3d10_effect_scalar_variable_SetBool
,
3199 d3d10_effect_scalar_variable_GetBool
,
3200 d3d10_effect_scalar_variable_SetBoolArray
,
3201 d3d10_effect_scalar_variable_GetBoolArray
,
3204 /* ID3D10EffectVariable methods */
3206 static BOOL STDMETHODCALLTYPE
d3d10_effect_vector_variable_IsValid(ID3D10EffectVectorVariable
*iface
)
3208 TRACE("iface %p\n", iface
);
3210 return (struct d3d10_effect_variable
*)iface
!= &null_vector_variable
;
3213 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetType(
3214 ID3D10EffectVectorVariable
*iface
)
3216 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
3219 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetDesc(ID3D10EffectVectorVariable
*iface
,
3220 D3D10_EFFECT_VARIABLE_DESC
*desc
)
3222 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
3225 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetAnnotationByIndex(
3226 ID3D10EffectVectorVariable
*iface
, UINT index
)
3228 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
3231 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetAnnotationByName(
3232 ID3D10EffectVectorVariable
*iface
, LPCSTR name
)
3234 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
3237 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetMemberByIndex(
3238 ID3D10EffectVectorVariable
*iface
, UINT index
)
3240 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
3243 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetMemberByName(
3244 ID3D10EffectVectorVariable
*iface
, LPCSTR name
)
3246 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
3249 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetMemberBySemantic(
3250 ID3D10EffectVectorVariable
*iface
, LPCSTR semantic
)
3252 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
3255 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetElement(
3256 ID3D10EffectVectorVariable
*iface
, UINT index
)
3258 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
3261 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetParentConstantBuffer(
3262 ID3D10EffectVectorVariable
*iface
)
3264 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
3267 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsScalar(
3268 ID3D10EffectVectorVariable
*iface
)
3270 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
3273 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsVector(
3274 ID3D10EffectVectorVariable
*iface
)
3276 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
3279 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsMatrix(
3280 ID3D10EffectVectorVariable
*iface
)
3282 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
3285 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsString(
3286 ID3D10EffectVectorVariable
*iface
)
3288 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
3291 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsShaderResource(
3292 ID3D10EffectVectorVariable
*iface
)
3294 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
3297 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsRenderTargetView(
3298 ID3D10EffectVectorVariable
*iface
)
3300 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
3303 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsDepthStencilView(
3304 ID3D10EffectVectorVariable
*iface
)
3306 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
3309 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsConstantBuffer(
3310 ID3D10EffectVectorVariable
*iface
)
3312 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
3315 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsShader(
3316 ID3D10EffectVectorVariable
*iface
)
3318 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
3321 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsBlend(
3322 ID3D10EffectVectorVariable
*iface
)
3324 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
3327 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsDepthStencil(
3328 ID3D10EffectVectorVariable
*iface
)
3330 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
3333 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsRasterizer(
3334 ID3D10EffectVectorVariable
*iface
)
3336 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
3339 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsSampler(
3340 ID3D10EffectVectorVariable
*iface
)
3342 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
3345 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetRawValue(ID3D10EffectVectorVariable
*iface
,
3346 void *data
, UINT offset
, UINT count
)
3348 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3351 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetRawValue(ID3D10EffectVectorVariable
*iface
,
3352 void *data
, UINT offset
, UINT count
)
3354 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3357 /* ID3D10EffectVectorVariable methods */
3359 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetBoolVector(ID3D10EffectVectorVariable
*iface
,
3362 FIXME("iface %p, value %p stub!\n", iface
, value
);
3367 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetIntVector(ID3D10EffectVectorVariable
*iface
,
3370 FIXME("iface %p, value %p stub!\n", iface
, value
);
3375 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetFloatVector(ID3D10EffectVectorVariable
*iface
,
3378 FIXME("iface %p, value %p stub!\n", iface
, value
);
3383 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetBoolVector(ID3D10EffectVectorVariable
*iface
,
3386 FIXME("iface %p, value %p stub!\n", iface
, value
);
3391 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetIntVector(ID3D10EffectVectorVariable
*iface
,
3394 FIXME("iface %p, value %p stub!\n", iface
, value
);
3399 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetFloatVector(ID3D10EffectVectorVariable
*iface
,
3402 FIXME("iface %p, value %p stub!\n", iface
, value
);
3407 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetBoolVectorArray(ID3D10EffectVectorVariable
*iface
,
3408 BOOL
*values
, UINT offset
, UINT count
)
3410 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3415 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetIntVectorArray(ID3D10EffectVectorVariable
*iface
,
3416 int *values
, UINT offset
, UINT count
)
3418 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3423 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetFloatVectorArray(ID3D10EffectVectorVariable
*iface
,
3424 float *values
, UINT offset
, UINT count
)
3426 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3431 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetBoolVectorArray(ID3D10EffectVectorVariable
*iface
,
3432 BOOL
*values
, UINT offset
, UINT count
)
3434 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3439 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetIntVectorArray(ID3D10EffectVectorVariable
*iface
,
3440 int *values
, UINT offset
, UINT count
)
3442 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3447 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetFloatVectorArray(ID3D10EffectVectorVariable
*iface
,
3448 float *values
, UINT offset
, UINT count
)
3450 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3455 static const struct ID3D10EffectVectorVariableVtbl d3d10_effect_vector_variable_vtbl
=
3457 /* ID3D10EffectVariable methods */
3458 d3d10_effect_vector_variable_IsValid
,
3459 d3d10_effect_vector_variable_GetType
,
3460 d3d10_effect_vector_variable_GetDesc
,
3461 d3d10_effect_vector_variable_GetAnnotationByIndex
,
3462 d3d10_effect_vector_variable_GetAnnotationByName
,
3463 d3d10_effect_vector_variable_GetMemberByIndex
,
3464 d3d10_effect_vector_variable_GetMemberByName
,
3465 d3d10_effect_vector_variable_GetMemberBySemantic
,
3466 d3d10_effect_vector_variable_GetElement
,
3467 d3d10_effect_vector_variable_GetParentConstantBuffer
,
3468 d3d10_effect_vector_variable_AsScalar
,
3469 d3d10_effect_vector_variable_AsVector
,
3470 d3d10_effect_vector_variable_AsMatrix
,
3471 d3d10_effect_vector_variable_AsString
,
3472 d3d10_effect_vector_variable_AsShaderResource
,
3473 d3d10_effect_vector_variable_AsRenderTargetView
,
3474 d3d10_effect_vector_variable_AsDepthStencilView
,
3475 d3d10_effect_vector_variable_AsConstantBuffer
,
3476 d3d10_effect_vector_variable_AsShader
,
3477 d3d10_effect_vector_variable_AsBlend
,
3478 d3d10_effect_vector_variable_AsDepthStencil
,
3479 d3d10_effect_vector_variable_AsRasterizer
,
3480 d3d10_effect_vector_variable_AsSampler
,
3481 d3d10_effect_vector_variable_SetRawValue
,
3482 d3d10_effect_vector_variable_GetRawValue
,
3483 /* ID3D10EffectVectorVariable methods */
3484 d3d10_effect_vector_variable_SetBoolVector
,
3485 d3d10_effect_vector_variable_SetIntVector
,
3486 d3d10_effect_vector_variable_SetFloatVector
,
3487 d3d10_effect_vector_variable_GetBoolVector
,
3488 d3d10_effect_vector_variable_GetIntVector
,
3489 d3d10_effect_vector_variable_GetFloatVector
,
3490 d3d10_effect_vector_variable_SetBoolVectorArray
,
3491 d3d10_effect_vector_variable_SetIntVectorArray
,
3492 d3d10_effect_vector_variable_SetFloatVectorArray
,
3493 d3d10_effect_vector_variable_GetBoolVectorArray
,
3494 d3d10_effect_vector_variable_GetIntVectorArray
,
3495 d3d10_effect_vector_variable_GetFloatVectorArray
,
3498 /* ID3D10EffectVariable methods */
3500 static BOOL STDMETHODCALLTYPE
d3d10_effect_matrix_variable_IsValid(ID3D10EffectMatrixVariable
*iface
)
3502 TRACE("iface %p\n", iface
);
3504 return (struct d3d10_effect_variable
*)iface
!= &null_matrix_variable
;
3507 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetType(
3508 ID3D10EffectMatrixVariable
*iface
)
3510 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
3513 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetDesc(ID3D10EffectMatrixVariable
*iface
,
3514 D3D10_EFFECT_VARIABLE_DESC
*desc
)
3516 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
3519 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetAnnotationByIndex(
3520 ID3D10EffectMatrixVariable
*iface
, UINT index
)
3522 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
3525 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetAnnotationByName(
3526 ID3D10EffectMatrixVariable
*iface
, LPCSTR name
)
3528 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
3531 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMemberByIndex(
3532 ID3D10EffectMatrixVariable
*iface
, UINT index
)
3534 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
3537 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMemberByName(
3538 ID3D10EffectMatrixVariable
*iface
, LPCSTR name
)
3540 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
3543 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMemberBySemantic(
3544 ID3D10EffectMatrixVariable
*iface
, LPCSTR semantic
)
3546 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
3549 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetElement(
3550 ID3D10EffectMatrixVariable
*iface
, UINT index
)
3552 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
3555 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetParentConstantBuffer(
3556 ID3D10EffectMatrixVariable
*iface
)
3558 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
3561 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsScalar(
3562 ID3D10EffectMatrixVariable
*iface
)
3564 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
3567 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsVector(
3568 ID3D10EffectMatrixVariable
*iface
)
3570 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
3573 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsMatrix(
3574 ID3D10EffectMatrixVariable
*iface
)
3576 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
3579 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsString(
3580 ID3D10EffectMatrixVariable
*iface
)
3582 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
3585 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsShaderResource(
3586 ID3D10EffectMatrixVariable
*iface
)
3588 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
3591 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsRenderTargetView(
3592 ID3D10EffectMatrixVariable
*iface
)
3594 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
3597 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsDepthStencilView(
3598 ID3D10EffectMatrixVariable
*iface
)
3600 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
3603 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsConstantBuffer(
3604 ID3D10EffectMatrixVariable
*iface
)
3606 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
3609 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsShader(
3610 ID3D10EffectMatrixVariable
*iface
)
3612 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
3615 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsBlend(
3616 ID3D10EffectMatrixVariable
*iface
)
3618 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
3621 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsDepthStencil(
3622 ID3D10EffectMatrixVariable
*iface
)
3624 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
3627 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsRasterizer(
3628 ID3D10EffectMatrixVariable
*iface
)
3630 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
3633 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsSampler(
3634 ID3D10EffectMatrixVariable
*iface
)
3636 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
3639 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetRawValue(ID3D10EffectMatrixVariable
*iface
,
3640 void *data
, UINT offset
, UINT count
)
3642 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3645 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetRawValue(ID3D10EffectMatrixVariable
*iface
,
3646 void *data
, UINT offset
, UINT count
)
3648 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3651 /* ID3D10EffectMatrixVariable methods */
3653 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetMatrix(ID3D10EffectMatrixVariable
*iface
,
3656 FIXME("iface %p, data %p stub!\n", iface
, data
);
3661 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMatrix(ID3D10EffectMatrixVariable
*iface
,
3664 FIXME("iface %p, data %p stub!\n", iface
, data
);
3669 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetMatrixArray(ID3D10EffectMatrixVariable
*iface
,
3670 float *data
, UINT offset
, UINT count
)
3672 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
3677 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMatrixArray(ID3D10EffectMatrixVariable
*iface
,
3678 float *data
, UINT offset
, UINT count
)
3680 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
3685 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetMatrixTranspose(ID3D10EffectMatrixVariable
*iface
,
3688 FIXME("iface %p, data %p stub!\n", iface
, data
);
3693 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMatrixTranspose(ID3D10EffectMatrixVariable
*iface
,
3696 FIXME("iface %p, data %p stub!\n", iface
, data
);
3701 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetMatrixTransposeArray(ID3D10EffectMatrixVariable
*iface
,
3702 float *data
, UINT offset
, UINT count
)
3704 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
3709 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMatrixTransposeArray(ID3D10EffectMatrixVariable
*iface
,
3710 float *data
, UINT offset
, UINT count
)
3712 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
3718 static const struct ID3D10EffectMatrixVariableVtbl d3d10_effect_matrix_variable_vtbl
=
3720 /* ID3D10EffectVariable methods */
3721 d3d10_effect_matrix_variable_IsValid
,
3722 d3d10_effect_matrix_variable_GetType
,
3723 d3d10_effect_matrix_variable_GetDesc
,
3724 d3d10_effect_matrix_variable_GetAnnotationByIndex
,
3725 d3d10_effect_matrix_variable_GetAnnotationByName
,
3726 d3d10_effect_matrix_variable_GetMemberByIndex
,
3727 d3d10_effect_matrix_variable_GetMemberByName
,
3728 d3d10_effect_matrix_variable_GetMemberBySemantic
,
3729 d3d10_effect_matrix_variable_GetElement
,
3730 d3d10_effect_matrix_variable_GetParentConstantBuffer
,
3731 d3d10_effect_matrix_variable_AsScalar
,
3732 d3d10_effect_matrix_variable_AsVector
,
3733 d3d10_effect_matrix_variable_AsMatrix
,
3734 d3d10_effect_matrix_variable_AsString
,
3735 d3d10_effect_matrix_variable_AsShaderResource
,
3736 d3d10_effect_matrix_variable_AsRenderTargetView
,
3737 d3d10_effect_matrix_variable_AsDepthStencilView
,
3738 d3d10_effect_matrix_variable_AsConstantBuffer
,
3739 d3d10_effect_matrix_variable_AsShader
,
3740 d3d10_effect_matrix_variable_AsBlend
,
3741 d3d10_effect_matrix_variable_AsDepthStencil
,
3742 d3d10_effect_matrix_variable_AsRasterizer
,
3743 d3d10_effect_matrix_variable_AsSampler
,
3744 d3d10_effect_matrix_variable_SetRawValue
,
3745 d3d10_effect_matrix_variable_GetRawValue
,
3746 /* ID3D10EffectMatrixVariable methods */
3747 d3d10_effect_matrix_variable_SetMatrix
,
3748 d3d10_effect_matrix_variable_GetMatrix
,
3749 d3d10_effect_matrix_variable_SetMatrixArray
,
3750 d3d10_effect_matrix_variable_GetMatrixArray
,
3751 d3d10_effect_matrix_variable_SetMatrixTranspose
,
3752 d3d10_effect_matrix_variable_GetMatrixTranspose
,
3753 d3d10_effect_matrix_variable_SetMatrixTransposeArray
,
3754 d3d10_effect_matrix_variable_GetMatrixTransposeArray
,
3757 /* ID3D10EffectVariable methods */
3759 static BOOL STDMETHODCALLTYPE
d3d10_effect_string_variable_IsValid(ID3D10EffectStringVariable
*iface
)
3761 TRACE("iface %p\n", iface
);
3763 return (struct d3d10_effect_variable
*)iface
!= &null_string_variable
;
3766 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetType(
3767 ID3D10EffectStringVariable
*iface
)
3769 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
3772 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_GetDesc(ID3D10EffectStringVariable
*iface
,
3773 D3D10_EFFECT_VARIABLE_DESC
*desc
)
3775 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
3778 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetAnnotationByIndex(
3779 ID3D10EffectStringVariable
*iface
, UINT index
)
3781 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
3784 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetAnnotationByName(
3785 ID3D10EffectStringVariable
*iface
, LPCSTR name
)
3787 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
3790 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetMemberByIndex(
3791 ID3D10EffectStringVariable
*iface
, UINT index
)
3793 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
3796 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetMemberByName(
3797 ID3D10EffectStringVariable
*iface
, LPCSTR name
)
3799 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
3802 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetMemberBySemantic(
3803 ID3D10EffectStringVariable
*iface
, LPCSTR semantic
)
3805 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
3808 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetElement(
3809 ID3D10EffectStringVariable
*iface
, UINT index
)
3811 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
3814 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetParentConstantBuffer(
3815 ID3D10EffectStringVariable
*iface
)
3817 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
3820 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsScalar(
3821 ID3D10EffectStringVariable
*iface
)
3823 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
3826 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsVector(
3827 ID3D10EffectStringVariable
*iface
)
3829 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
3832 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsMatrix(
3833 ID3D10EffectStringVariable
*iface
)
3835 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
3838 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsString(
3839 ID3D10EffectStringVariable
*iface
)
3841 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
3844 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsShaderResource(
3845 ID3D10EffectStringVariable
*iface
)
3847 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
3850 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsRenderTargetView(
3851 ID3D10EffectStringVariable
*iface
)
3853 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
3856 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsDepthStencilView(
3857 ID3D10EffectStringVariable
*iface
)
3859 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
3862 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsConstantBuffer(
3863 ID3D10EffectStringVariable
*iface
)
3865 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
3868 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsShader(
3869 ID3D10EffectStringVariable
*iface
)
3871 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
3874 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsBlend(
3875 ID3D10EffectStringVariable
*iface
)
3877 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
3880 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsDepthStencil(
3881 ID3D10EffectStringVariable
*iface
)
3883 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
3886 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsRasterizer(
3887 ID3D10EffectStringVariable
*iface
)
3889 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
3892 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsSampler(
3893 ID3D10EffectStringVariable
*iface
)
3895 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
3898 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_SetRawValue(ID3D10EffectStringVariable
*iface
,
3899 void *data
, UINT offset
, UINT count
)
3901 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3904 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_GetRawValue(ID3D10EffectStringVariable
*iface
,
3905 void *data
, UINT offset
, UINT count
)
3907 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3910 /* ID3D10EffectStringVariable methods */
3912 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_GetString(ID3D10EffectStringVariable
*iface
,
3915 FIXME("iface %p, str %p stub!\n", iface
, str
);
3920 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_GetStringArray(ID3D10EffectStringVariable
*iface
,
3921 LPCSTR
*strs
, UINT offset
, UINT count
)
3923 FIXME("iface %p, strs %p, offset %u, count %u stub!\n", iface
, strs
, offset
, count
);
3929 static const struct ID3D10EffectStringVariableVtbl d3d10_effect_string_variable_vtbl
=
3931 /* ID3D10EffectVariable methods */
3932 d3d10_effect_string_variable_IsValid
,
3933 d3d10_effect_string_variable_GetType
,
3934 d3d10_effect_string_variable_GetDesc
,
3935 d3d10_effect_string_variable_GetAnnotationByIndex
,
3936 d3d10_effect_string_variable_GetAnnotationByName
,
3937 d3d10_effect_string_variable_GetMemberByIndex
,
3938 d3d10_effect_string_variable_GetMemberByName
,
3939 d3d10_effect_string_variable_GetMemberBySemantic
,
3940 d3d10_effect_string_variable_GetElement
,
3941 d3d10_effect_string_variable_GetParentConstantBuffer
,
3942 d3d10_effect_string_variable_AsScalar
,
3943 d3d10_effect_string_variable_AsVector
,
3944 d3d10_effect_string_variable_AsMatrix
,
3945 d3d10_effect_string_variable_AsString
,
3946 d3d10_effect_string_variable_AsShaderResource
,
3947 d3d10_effect_string_variable_AsRenderTargetView
,
3948 d3d10_effect_string_variable_AsDepthStencilView
,
3949 d3d10_effect_string_variable_AsConstantBuffer
,
3950 d3d10_effect_string_variable_AsShader
,
3951 d3d10_effect_string_variable_AsBlend
,
3952 d3d10_effect_string_variable_AsDepthStencil
,
3953 d3d10_effect_string_variable_AsRasterizer
,
3954 d3d10_effect_string_variable_AsSampler
,
3955 d3d10_effect_string_variable_SetRawValue
,
3956 d3d10_effect_string_variable_GetRawValue
,
3957 /* ID3D10EffectStringVariable methods */
3958 d3d10_effect_string_variable_GetString
,
3959 d3d10_effect_string_variable_GetStringArray
,
3962 /* ID3D10EffectVariable methods */
3964 static BOOL STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_IsValid(ID3D10EffectShaderResourceVariable
*iface
)
3966 TRACE("iface %p\n", iface
);
3968 return (struct d3d10_effect_variable
*)iface
!= &null_shader_resource_variable
;
3971 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetType(
3972 ID3D10EffectShaderResourceVariable
*iface
)
3974 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
3977 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetDesc(
3978 ID3D10EffectShaderResourceVariable
*iface
, D3D10_EFFECT_VARIABLE_DESC
*desc
)
3980 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
3983 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetAnnotationByIndex(
3984 ID3D10EffectShaderResourceVariable
*iface
, UINT index
)
3986 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
3989 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetAnnotationByName(
3990 ID3D10EffectShaderResourceVariable
*iface
, LPCSTR name
)
3992 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
3995 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetMemberByIndex(
3996 ID3D10EffectShaderResourceVariable
*iface
, UINT index
)
3998 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
4001 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetMemberByName(
4002 ID3D10EffectShaderResourceVariable
*iface
, LPCSTR name
)
4004 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
4007 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetMemberBySemantic(
4008 ID3D10EffectShaderResourceVariable
*iface
, LPCSTR semantic
)
4010 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
4013 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetElement(
4014 ID3D10EffectShaderResourceVariable
*iface
, UINT index
)
4016 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
4019 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetParentConstantBuffer(
4020 ID3D10EffectShaderResourceVariable
*iface
)
4022 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
4025 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsScalar(
4026 ID3D10EffectShaderResourceVariable
*iface
)
4028 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
4031 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsVector(
4032 ID3D10EffectShaderResourceVariable
*iface
)
4034 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
4037 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsMatrix(
4038 ID3D10EffectShaderResourceVariable
*iface
)
4040 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
4043 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsString(
4044 ID3D10EffectShaderResourceVariable
*iface
)
4046 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
4049 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsShaderResource(
4050 ID3D10EffectShaderResourceVariable
*iface
)
4052 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
4055 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsRenderTargetView(
4056 ID3D10EffectShaderResourceVariable
*iface
)
4058 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
4061 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsDepthStencilView(
4062 ID3D10EffectShaderResourceVariable
*iface
)
4064 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
4067 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsConstantBuffer(
4068 ID3D10EffectShaderResourceVariable
*iface
)
4070 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
4073 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsShader(
4074 ID3D10EffectShaderResourceVariable
*iface
)
4076 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
4079 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsBlend(
4080 ID3D10EffectShaderResourceVariable
*iface
)
4082 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
4085 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsDepthStencil(
4086 ID3D10EffectShaderResourceVariable
*iface
)
4088 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
4091 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsRasterizer(
4092 ID3D10EffectShaderResourceVariable
*iface
)
4094 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
4097 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsSampler(
4098 ID3D10EffectShaderResourceVariable
*iface
)
4100 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
4103 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_SetRawValue(
4104 ID3D10EffectShaderResourceVariable
*iface
, void *data
, UINT offset
, UINT count
)
4106 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4109 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetRawValue(
4110 ID3D10EffectShaderResourceVariable
*iface
, void *data
, UINT offset
, UINT count
)
4112 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4115 /* ID3D10EffectShaderResourceVariable methods */
4117 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_SetResource(
4118 ID3D10EffectShaderResourceVariable
*iface
, ID3D10ShaderResourceView
*resource
)
4120 FIXME("iface %p, resource %p stub!\n", iface
, resource
);
4125 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetResource(
4126 ID3D10EffectShaderResourceVariable
*iface
, ID3D10ShaderResourceView
**resource
)
4128 FIXME("iface %p, resource %p stub!\n", iface
, resource
);
4133 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_SetResourceArray(
4134 ID3D10EffectShaderResourceVariable
*iface
, ID3D10ShaderResourceView
**resources
, UINT offset
, UINT count
)
4136 FIXME("iface %p, resources %p, offset %u, count %u stub!\n", iface
, resources
, offset
, count
);
4141 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetResourceArray(
4142 ID3D10EffectShaderResourceVariable
*iface
, ID3D10ShaderResourceView
**resources
, UINT offset
, UINT count
)
4144 FIXME("iface %p, resources %p, offset %u, count %u stub!\n", iface
, resources
, offset
, count
);
4150 static const struct ID3D10EffectShaderResourceVariableVtbl d3d10_effect_shader_resource_variable_vtbl
=
4152 /* ID3D10EffectVariable methods */
4153 d3d10_effect_shader_resource_variable_IsValid
,
4154 d3d10_effect_shader_resource_variable_GetType
,
4155 d3d10_effect_shader_resource_variable_GetDesc
,
4156 d3d10_effect_shader_resource_variable_GetAnnotationByIndex
,
4157 d3d10_effect_shader_resource_variable_GetAnnotationByName
,
4158 d3d10_effect_shader_resource_variable_GetMemberByIndex
,
4159 d3d10_effect_shader_resource_variable_GetMemberByName
,
4160 d3d10_effect_shader_resource_variable_GetMemberBySemantic
,
4161 d3d10_effect_shader_resource_variable_GetElement
,
4162 d3d10_effect_shader_resource_variable_GetParentConstantBuffer
,
4163 d3d10_effect_shader_resource_variable_AsScalar
,
4164 d3d10_effect_shader_resource_variable_AsVector
,
4165 d3d10_effect_shader_resource_variable_AsMatrix
,
4166 d3d10_effect_shader_resource_variable_AsString
,
4167 d3d10_effect_shader_resource_variable_AsShaderResource
,
4168 d3d10_effect_shader_resource_variable_AsRenderTargetView
,
4169 d3d10_effect_shader_resource_variable_AsDepthStencilView
,
4170 d3d10_effect_shader_resource_variable_AsConstantBuffer
,
4171 d3d10_effect_shader_resource_variable_AsShader
,
4172 d3d10_effect_shader_resource_variable_AsBlend
,
4173 d3d10_effect_shader_resource_variable_AsDepthStencil
,
4174 d3d10_effect_shader_resource_variable_AsRasterizer
,
4175 d3d10_effect_shader_resource_variable_AsSampler
,
4176 d3d10_effect_shader_resource_variable_SetRawValue
,
4177 d3d10_effect_shader_resource_variable_GetRawValue
,
4178 /* ID3D10EffectShaderResourceVariable methods */
4179 d3d10_effect_shader_resource_variable_SetResource
,
4180 d3d10_effect_shader_resource_variable_GetResource
,
4181 d3d10_effect_shader_resource_variable_SetResourceArray
,
4182 d3d10_effect_shader_resource_variable_GetResourceArray
,
4185 /* ID3D10EffectVariable methods */
4187 static BOOL STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_IsValid(
4188 ID3D10EffectRenderTargetViewVariable
*iface
)
4190 TRACE("iface %p\n", iface
);
4192 return (struct d3d10_effect_variable
*)iface
!= &null_render_target_view_variable
;
4195 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetType(
4196 ID3D10EffectRenderTargetViewVariable
*iface
)
4198 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
4201 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetDesc(
4202 ID3D10EffectRenderTargetViewVariable
*iface
, D3D10_EFFECT_VARIABLE_DESC
*desc
)
4204 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
4207 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetAnnotationByIndex(
4208 ID3D10EffectRenderTargetViewVariable
*iface
, UINT index
)
4210 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
4213 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetAnnotationByName(
4214 ID3D10EffectRenderTargetViewVariable
*iface
, LPCSTR name
)
4216 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
4219 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetMemberByIndex(
4220 ID3D10EffectRenderTargetViewVariable
*iface
, UINT index
)
4222 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
4225 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetMemberByName(
4226 ID3D10EffectRenderTargetViewVariable
*iface
, LPCSTR name
)
4228 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
4231 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetMemberBySemantic(
4232 ID3D10EffectRenderTargetViewVariable
*iface
, LPCSTR semantic
)
4234 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
4237 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetElement(
4238 ID3D10EffectRenderTargetViewVariable
*iface
, UINT index
)
4240 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
4243 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetParentConstantBuffer(
4244 ID3D10EffectRenderTargetViewVariable
*iface
)
4246 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
4249 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsScalar(
4250 ID3D10EffectRenderTargetViewVariable
*iface
)
4252 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
4255 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsVector(
4256 ID3D10EffectRenderTargetViewVariable
*iface
)
4258 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
4261 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsMatrix(
4262 ID3D10EffectRenderTargetViewVariable
*iface
)
4264 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
4267 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsString(
4268 ID3D10EffectRenderTargetViewVariable
*iface
)
4270 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
4273 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsShaderResource(
4274 ID3D10EffectRenderTargetViewVariable
*iface
)
4276 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
4279 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsRenderTargetView(
4280 ID3D10EffectRenderTargetViewVariable
*iface
)
4282 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
4285 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsDepthStencilView(
4286 ID3D10EffectRenderTargetViewVariable
*iface
)
4288 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
4291 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsConstantBuffer(
4292 ID3D10EffectRenderTargetViewVariable
*iface
)
4294 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
4297 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsShader(
4298 ID3D10EffectRenderTargetViewVariable
*iface
)
4300 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
4303 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsBlend(
4304 ID3D10EffectRenderTargetViewVariable
*iface
)
4306 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
4309 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsDepthStencil(
4310 ID3D10EffectRenderTargetViewVariable
*iface
)
4312 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
4315 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsRasterizer(
4316 ID3D10EffectRenderTargetViewVariable
*iface
)
4318 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
4321 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsSampler(
4322 ID3D10EffectRenderTargetViewVariable
*iface
)
4324 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
4327 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_SetRawValue(
4328 ID3D10EffectRenderTargetViewVariable
*iface
, void *data
, UINT offset
, UINT count
)
4330 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4333 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetRawValue(
4334 ID3D10EffectRenderTargetViewVariable
*iface
, void *data
, UINT offset
, UINT count
)
4336 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4339 /* ID3D10EffectRenderTargetViewVariable methods */
4341 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_SetRenderTarget(
4342 ID3D10EffectRenderTargetViewVariable
*iface
, ID3D10RenderTargetView
*view
)
4344 FIXME("iface %p, view %p stub!\n", iface
, view
);
4349 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetRenderTarget(
4350 ID3D10EffectRenderTargetViewVariable
*iface
, ID3D10RenderTargetView
**view
)
4352 FIXME("iface %p, view %p stub!\n", iface
, view
);
4357 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_SetRenderTargetArray(
4358 ID3D10EffectRenderTargetViewVariable
*iface
, ID3D10RenderTargetView
**views
, UINT offset
, UINT count
)
4360 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface
, views
, offset
, count
);
4365 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetRenderTargetArray(
4366 ID3D10EffectRenderTargetViewVariable
*iface
, ID3D10RenderTargetView
**views
, UINT offset
, UINT count
)
4368 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface
, views
, offset
, count
);
4374 static const struct ID3D10EffectRenderTargetViewVariableVtbl d3d10_effect_render_target_view_variable_vtbl
=
4376 /* ID3D10EffectVariable methods */
4377 d3d10_effect_render_target_view_variable_IsValid
,
4378 d3d10_effect_render_target_view_variable_GetType
,
4379 d3d10_effect_render_target_view_variable_GetDesc
,
4380 d3d10_effect_render_target_view_variable_GetAnnotationByIndex
,
4381 d3d10_effect_render_target_view_variable_GetAnnotationByName
,
4382 d3d10_effect_render_target_view_variable_GetMemberByIndex
,
4383 d3d10_effect_render_target_view_variable_GetMemberByName
,
4384 d3d10_effect_render_target_view_variable_GetMemberBySemantic
,
4385 d3d10_effect_render_target_view_variable_GetElement
,
4386 d3d10_effect_render_target_view_variable_GetParentConstantBuffer
,
4387 d3d10_effect_render_target_view_variable_AsScalar
,
4388 d3d10_effect_render_target_view_variable_AsVector
,
4389 d3d10_effect_render_target_view_variable_AsMatrix
,
4390 d3d10_effect_render_target_view_variable_AsString
,
4391 d3d10_effect_render_target_view_variable_AsShaderResource
,
4392 d3d10_effect_render_target_view_variable_AsRenderTargetView
,
4393 d3d10_effect_render_target_view_variable_AsDepthStencilView
,
4394 d3d10_effect_render_target_view_variable_AsConstantBuffer
,
4395 d3d10_effect_render_target_view_variable_AsShader
,
4396 d3d10_effect_render_target_view_variable_AsBlend
,
4397 d3d10_effect_render_target_view_variable_AsDepthStencil
,
4398 d3d10_effect_render_target_view_variable_AsRasterizer
,
4399 d3d10_effect_render_target_view_variable_AsSampler
,
4400 d3d10_effect_render_target_view_variable_SetRawValue
,
4401 d3d10_effect_render_target_view_variable_GetRawValue
,
4402 /* ID3D10EffectRenderTargetViewVariable methods */
4403 d3d10_effect_render_target_view_variable_SetRenderTarget
,
4404 d3d10_effect_render_target_view_variable_GetRenderTarget
,
4405 d3d10_effect_render_target_view_variable_SetRenderTargetArray
,
4406 d3d10_effect_render_target_view_variable_GetRenderTargetArray
,
4409 /* ID3D10EffectVariable methods */
4411 static BOOL STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_IsValid(
4412 ID3D10EffectDepthStencilViewVariable
*iface
)
4414 TRACE("iface %p\n", iface
);
4416 return (struct d3d10_effect_variable
*)iface
!= &null_depth_stencil_view_variable
;
4419 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetType(
4420 ID3D10EffectDepthStencilViewVariable
*iface
)
4422 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
4425 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetDesc(
4426 ID3D10EffectDepthStencilViewVariable
*iface
, D3D10_EFFECT_VARIABLE_DESC
*desc
)
4428 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
4431 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetAnnotationByIndex(
4432 ID3D10EffectDepthStencilViewVariable
*iface
, UINT index
)
4434 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
4437 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetAnnotationByName(
4438 ID3D10EffectDepthStencilViewVariable
*iface
, LPCSTR name
)
4440 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
4443 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetMemberByIndex(
4444 ID3D10EffectDepthStencilViewVariable
*iface
, UINT index
)
4446 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
4449 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetMemberByName(
4450 ID3D10EffectDepthStencilViewVariable
*iface
, LPCSTR name
)
4452 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
4455 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetMemberBySemantic(
4456 ID3D10EffectDepthStencilViewVariable
*iface
, LPCSTR semantic
)
4458 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
4461 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetElement(
4462 ID3D10EffectDepthStencilViewVariable
*iface
, UINT index
)
4464 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
4467 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetParentConstantBuffer(
4468 ID3D10EffectDepthStencilViewVariable
*iface
)
4470 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
4473 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsScalar(
4474 ID3D10EffectDepthStencilViewVariable
*iface
)
4476 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
4479 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsVector(
4480 ID3D10EffectDepthStencilViewVariable
*iface
)
4482 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
4485 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsMatrix(
4486 ID3D10EffectDepthStencilViewVariable
*iface
)
4488 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
4491 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsString(
4492 ID3D10EffectDepthStencilViewVariable
*iface
)
4494 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
4497 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsShaderResource(
4498 ID3D10EffectDepthStencilViewVariable
*iface
)
4500 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
4503 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsRenderTargetView(
4504 ID3D10EffectDepthStencilViewVariable
*iface
)
4506 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
4509 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsDepthStencilView(
4510 ID3D10EffectDepthStencilViewVariable
*iface
)
4512 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
4515 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsConstantBuffer(
4516 ID3D10EffectDepthStencilViewVariable
*iface
)
4518 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
4521 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsShader(
4522 ID3D10EffectDepthStencilViewVariable
*iface
)
4524 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
4527 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsBlend(
4528 ID3D10EffectDepthStencilViewVariable
*iface
)
4530 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
4533 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsDepthStencil(
4534 ID3D10EffectDepthStencilViewVariable
*iface
)
4536 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
4539 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsRasterizer(
4540 ID3D10EffectDepthStencilViewVariable
*iface
)
4542 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
4545 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsSampler(
4546 ID3D10EffectDepthStencilViewVariable
*iface
)
4548 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
4551 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_SetRawValue(
4552 ID3D10EffectDepthStencilViewVariable
*iface
, void *data
, UINT offset
, UINT count
)
4554 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4557 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetRawValue(
4558 ID3D10EffectDepthStencilViewVariable
*iface
, void *data
, UINT offset
, UINT count
)
4560 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4563 /* ID3D10EffectDepthStencilViewVariable methods */
4565 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_SetDepthStencil(
4566 ID3D10EffectDepthStencilViewVariable
*iface
, ID3D10DepthStencilView
*view
)
4568 FIXME("iface %p, view %p stub!\n", iface
, view
);
4573 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetDepthStencil(
4574 ID3D10EffectDepthStencilViewVariable
*iface
, ID3D10DepthStencilView
**view
)
4576 FIXME("iface %p, view %p stub!\n", iface
, view
);
4581 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_SetDepthStencilArray(
4582 ID3D10EffectDepthStencilViewVariable
*iface
, ID3D10DepthStencilView
**views
, UINT offset
, UINT count
)
4584 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface
, views
, offset
, count
);
4589 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetDepthStencilArray(
4590 ID3D10EffectDepthStencilViewVariable
*iface
, ID3D10DepthStencilView
**views
, UINT offset
, UINT count
)
4592 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface
, views
, offset
, count
);
4598 static const struct ID3D10EffectDepthStencilViewVariableVtbl d3d10_effect_depth_stencil_view_variable_vtbl
=
4600 /* ID3D10EffectVariable methods */
4601 d3d10_effect_depth_stencil_view_variable_IsValid
,
4602 d3d10_effect_depth_stencil_view_variable_GetType
,
4603 d3d10_effect_depth_stencil_view_variable_GetDesc
,
4604 d3d10_effect_depth_stencil_view_variable_GetAnnotationByIndex
,
4605 d3d10_effect_depth_stencil_view_variable_GetAnnotationByName
,
4606 d3d10_effect_depth_stencil_view_variable_GetMemberByIndex
,
4607 d3d10_effect_depth_stencil_view_variable_GetMemberByName
,
4608 d3d10_effect_depth_stencil_view_variable_GetMemberBySemantic
,
4609 d3d10_effect_depth_stencil_view_variable_GetElement
,
4610 d3d10_effect_depth_stencil_view_variable_GetParentConstantBuffer
,
4611 d3d10_effect_depth_stencil_view_variable_AsScalar
,
4612 d3d10_effect_depth_stencil_view_variable_AsVector
,
4613 d3d10_effect_depth_stencil_view_variable_AsMatrix
,
4614 d3d10_effect_depth_stencil_view_variable_AsString
,
4615 d3d10_effect_depth_stencil_view_variable_AsShaderResource
,
4616 d3d10_effect_depth_stencil_view_variable_AsRenderTargetView
,
4617 d3d10_effect_depth_stencil_view_variable_AsDepthStencilView
,
4618 d3d10_effect_depth_stencil_view_variable_AsConstantBuffer
,
4619 d3d10_effect_depth_stencil_view_variable_AsShader
,
4620 d3d10_effect_depth_stencil_view_variable_AsBlend
,
4621 d3d10_effect_depth_stencil_view_variable_AsDepthStencil
,
4622 d3d10_effect_depth_stencil_view_variable_AsRasterizer
,
4623 d3d10_effect_depth_stencil_view_variable_AsSampler
,
4624 d3d10_effect_depth_stencil_view_variable_SetRawValue
,
4625 d3d10_effect_depth_stencil_view_variable_GetRawValue
,
4626 /* ID3D10EffectDepthStencilViewVariable methods */
4627 d3d10_effect_depth_stencil_view_variable_SetDepthStencil
,
4628 d3d10_effect_depth_stencil_view_variable_GetDepthStencil
,
4629 d3d10_effect_depth_stencil_view_variable_SetDepthStencilArray
,
4630 d3d10_effect_depth_stencil_view_variable_GetDepthStencilArray
,
4633 /* ID3D10EffectVariable methods */
4635 static BOOL STDMETHODCALLTYPE
d3d10_effect_shader_variable_IsValid(ID3D10EffectShaderVariable
*iface
)
4637 TRACE("iface %p\n", iface
);
4639 return (struct d3d10_effect_variable
*)iface
!= &null_shader_variable
;
4642 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetType(
4643 ID3D10EffectShaderVariable
*iface
)
4645 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
4648 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetDesc(ID3D10EffectShaderVariable
*iface
,
4649 D3D10_EFFECT_VARIABLE_DESC
*desc
)
4651 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
4654 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetAnnotationByIndex(
4655 ID3D10EffectShaderVariable
*iface
, UINT index
)
4657 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
4660 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetAnnotationByName(
4661 ID3D10EffectShaderVariable
*iface
, LPCSTR name
)
4663 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
4666 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetMemberByIndex(
4667 ID3D10EffectShaderVariable
*iface
, UINT index
)
4669 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
4672 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetMemberByName(
4673 ID3D10EffectShaderVariable
*iface
, LPCSTR name
)
4675 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
4678 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetMemberBySemantic(
4679 ID3D10EffectShaderVariable
*iface
, LPCSTR semantic
)
4681 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
4684 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetElement(
4685 ID3D10EffectShaderVariable
*iface
, UINT index
)
4687 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
4690 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetParentConstantBuffer(
4691 ID3D10EffectShaderVariable
*iface
)
4693 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
4696 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsScalar(
4697 ID3D10EffectShaderVariable
*iface
)
4699 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
4702 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsVector(
4703 ID3D10EffectShaderVariable
*iface
)
4705 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
4708 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsMatrix(
4709 ID3D10EffectShaderVariable
*iface
)
4711 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
4714 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsString(
4715 ID3D10EffectShaderVariable
*iface
)
4717 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
4720 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsShaderResource(
4721 ID3D10EffectShaderVariable
*iface
)
4723 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
4726 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsRenderTargetView(
4727 ID3D10EffectShaderVariable
*iface
)
4729 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
4732 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsDepthStencilView(
4733 ID3D10EffectShaderVariable
*iface
)
4735 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
4738 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsConstantBuffer(
4739 ID3D10EffectShaderVariable
*iface
)
4741 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
4744 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsShader(
4745 ID3D10EffectShaderVariable
*iface
)
4747 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
4750 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsBlend(
4751 ID3D10EffectShaderVariable
*iface
)
4753 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
4756 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsDepthStencil(
4757 ID3D10EffectShaderVariable
*iface
)
4759 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
4762 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsRasterizer(
4763 ID3D10EffectShaderVariable
*iface
)
4765 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
4768 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsSampler(
4769 ID3D10EffectShaderVariable
*iface
)
4771 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
4774 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_SetRawValue(
4775 ID3D10EffectShaderVariable
*iface
, void *data
, UINT offset
, UINT count
)
4777 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4780 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetRawValue(
4781 ID3D10EffectShaderVariable
*iface
, void *data
, UINT offset
, UINT count
)
4783 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4786 /* ID3D10EffectShaderVariable methods */
4788 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetShaderDesc(
4789 ID3D10EffectShaderVariable
*iface
, UINT index
, D3D10_EFFECT_SHADER_DESC
*desc
)
4791 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
4796 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetVertexShader(
4797 ID3D10EffectShaderVariable
*iface
, UINT index
, ID3D10VertexShader
**shader
)
4799 FIXME("iface %p, index %u, shader %p stub!\n", iface
, index
, shader
);
4804 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetGeometryShader(
4805 ID3D10EffectShaderVariable
*iface
, UINT index
, ID3D10GeometryShader
**shader
)
4807 FIXME("iface %p, index %u, shader %p stub!\n", iface
, index
, shader
);
4812 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetPixelShader(
4813 ID3D10EffectShaderVariable
*iface
, UINT index
, ID3D10PixelShader
**shader
)
4815 FIXME("iface %p, index %u, shader %p stub!\n", iface
, index
, shader
);
4820 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetInputSignatureElementDesc(
4821 ID3D10EffectShaderVariable
*iface
, UINT shader_index
, UINT element_index
,
4822 D3D10_SIGNATURE_PARAMETER_DESC
*desc
)
4824 FIXME("iface %p, shader_index %u, element_index %u, desc %p stub!\n",
4825 iface
, shader_index
, element_index
, desc
);
4830 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetOutputSignatureElementDesc(
4831 ID3D10EffectShaderVariable
*iface
, UINT shader_index
, UINT element_index
,
4832 D3D10_SIGNATURE_PARAMETER_DESC
*desc
)
4834 FIXME("iface %p, shader_index %u, element_index %u, desc %p stub!\n",
4835 iface
, shader_index
, element_index
, desc
);
4841 static const struct ID3D10EffectShaderVariableVtbl d3d10_effect_shader_variable_vtbl
=
4843 /* ID3D10EffectVariable methods */
4844 d3d10_effect_shader_variable_IsValid
,
4845 d3d10_effect_shader_variable_GetType
,
4846 d3d10_effect_shader_variable_GetDesc
,
4847 d3d10_effect_shader_variable_GetAnnotationByIndex
,
4848 d3d10_effect_shader_variable_GetAnnotationByName
,
4849 d3d10_effect_shader_variable_GetMemberByIndex
,
4850 d3d10_effect_shader_variable_GetMemberByName
,
4851 d3d10_effect_shader_variable_GetMemberBySemantic
,
4852 d3d10_effect_shader_variable_GetElement
,
4853 d3d10_effect_shader_variable_GetParentConstantBuffer
,
4854 d3d10_effect_shader_variable_AsScalar
,
4855 d3d10_effect_shader_variable_AsVector
,
4856 d3d10_effect_shader_variable_AsMatrix
,
4857 d3d10_effect_shader_variable_AsString
,
4858 d3d10_effect_shader_variable_AsShaderResource
,
4859 d3d10_effect_shader_variable_AsRenderTargetView
,
4860 d3d10_effect_shader_variable_AsDepthStencilView
,
4861 d3d10_effect_shader_variable_AsConstantBuffer
,
4862 d3d10_effect_shader_variable_AsShader
,
4863 d3d10_effect_shader_variable_AsBlend
,
4864 d3d10_effect_shader_variable_AsDepthStencil
,
4865 d3d10_effect_shader_variable_AsRasterizer
,
4866 d3d10_effect_shader_variable_AsSampler
,
4867 d3d10_effect_shader_variable_SetRawValue
,
4868 d3d10_effect_shader_variable_GetRawValue
,
4869 /* ID3D10EffectShaderVariable methods */
4870 d3d10_effect_shader_variable_GetShaderDesc
,
4871 d3d10_effect_shader_variable_GetVertexShader
,
4872 d3d10_effect_shader_variable_GetGeometryShader
,
4873 d3d10_effect_shader_variable_GetPixelShader
,
4874 d3d10_effect_shader_variable_GetInputSignatureElementDesc
,
4875 d3d10_effect_shader_variable_GetOutputSignatureElementDesc
,
4878 /* ID3D10EffectVariable methods */
4880 static BOOL STDMETHODCALLTYPE
d3d10_effect_blend_variable_IsValid(ID3D10EffectBlendVariable
*iface
)
4882 TRACE("iface %p\n", iface
);
4884 return (struct d3d10_effect_variable
*)iface
!= &null_blend_variable
;
4887 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetType(
4888 ID3D10EffectBlendVariable
*iface
)
4890 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
4893 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetDesc(ID3D10EffectBlendVariable
*iface
,
4894 D3D10_EFFECT_VARIABLE_DESC
*desc
)
4896 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
4899 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetAnnotationByIndex(
4900 ID3D10EffectBlendVariable
*iface
, UINT index
)
4902 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
4905 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetAnnotationByName(
4906 ID3D10EffectBlendVariable
*iface
, LPCSTR name
)
4908 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
4911 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetMemberByIndex(
4912 ID3D10EffectBlendVariable
*iface
, UINT index
)
4914 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
4917 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetMemberByName(
4918 ID3D10EffectBlendVariable
*iface
, LPCSTR name
)
4920 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
4923 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetMemberBySemantic(
4924 ID3D10EffectBlendVariable
*iface
, LPCSTR semantic
)
4926 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
4929 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetElement(
4930 ID3D10EffectBlendVariable
*iface
, UINT index
)
4932 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
4935 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetParentConstantBuffer(
4936 ID3D10EffectBlendVariable
*iface
)
4938 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
4941 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsScalar(
4942 ID3D10EffectBlendVariable
*iface
)
4944 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
4947 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsVector(
4948 ID3D10EffectBlendVariable
*iface
)
4950 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
4953 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsMatrix(
4954 ID3D10EffectBlendVariable
*iface
)
4956 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
4959 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsString(
4960 ID3D10EffectBlendVariable
*iface
)
4962 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
4965 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsShaderResource(
4966 ID3D10EffectBlendVariable
*iface
)
4968 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
4971 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsRenderTargetView(
4972 ID3D10EffectBlendVariable
*iface
)
4974 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
4977 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsDepthStencilView(
4978 ID3D10EffectBlendVariable
*iface
)
4980 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
4983 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsConstantBuffer(
4984 ID3D10EffectBlendVariable
*iface
)
4986 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
4989 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsShader(
4990 ID3D10EffectBlendVariable
*iface
)
4992 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
4995 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsBlend(
4996 ID3D10EffectBlendVariable
*iface
)
4998 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
5001 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsDepthStencil(
5002 ID3D10EffectBlendVariable
*iface
)
5004 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
5007 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsRasterizer(
5008 ID3D10EffectBlendVariable
*iface
)
5010 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
5013 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsSampler(
5014 ID3D10EffectBlendVariable
*iface
)
5016 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
5019 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_SetRawValue(ID3D10EffectBlendVariable
*iface
,
5020 void *data
, UINT offset
, UINT count
)
5022 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5025 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetRawValue(ID3D10EffectBlendVariable
*iface
,
5026 void *data
, UINT offset
, UINT count
)
5028 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5031 /* ID3D10EffectBlendVariable methods */
5033 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetBlendState(ID3D10EffectBlendVariable
*iface
,
5034 UINT index
, ID3D10BlendState
**blend_state
)
5036 FIXME("iface %p, index %u, blend_state %p stub!\n", iface
, index
, blend_state
);
5041 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetBackingStore(ID3D10EffectBlendVariable
*iface
,
5042 UINT index
, D3D10_BLEND_DESC
*desc
)
5044 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
5050 static const struct ID3D10EffectBlendVariableVtbl d3d10_effect_blend_variable_vtbl
=
5052 /* ID3D10EffectVariable methods */
5053 d3d10_effect_blend_variable_IsValid
,
5054 d3d10_effect_blend_variable_GetType
,
5055 d3d10_effect_blend_variable_GetDesc
,
5056 d3d10_effect_blend_variable_GetAnnotationByIndex
,
5057 d3d10_effect_blend_variable_GetAnnotationByName
,
5058 d3d10_effect_blend_variable_GetMemberByIndex
,
5059 d3d10_effect_blend_variable_GetMemberByName
,
5060 d3d10_effect_blend_variable_GetMemberBySemantic
,
5061 d3d10_effect_blend_variable_GetElement
,
5062 d3d10_effect_blend_variable_GetParentConstantBuffer
,
5063 d3d10_effect_blend_variable_AsScalar
,
5064 d3d10_effect_blend_variable_AsVector
,
5065 d3d10_effect_blend_variable_AsMatrix
,
5066 d3d10_effect_blend_variable_AsString
,
5067 d3d10_effect_blend_variable_AsShaderResource
,
5068 d3d10_effect_blend_variable_AsRenderTargetView
,
5069 d3d10_effect_blend_variable_AsDepthStencilView
,
5070 d3d10_effect_blend_variable_AsConstantBuffer
,
5071 d3d10_effect_blend_variable_AsShader
,
5072 d3d10_effect_blend_variable_AsBlend
,
5073 d3d10_effect_blend_variable_AsDepthStencil
,
5074 d3d10_effect_blend_variable_AsRasterizer
,
5075 d3d10_effect_blend_variable_AsSampler
,
5076 d3d10_effect_blend_variable_SetRawValue
,
5077 d3d10_effect_blend_variable_GetRawValue
,
5078 /* ID3D10EffectBlendVariable methods */
5079 d3d10_effect_blend_variable_GetBlendState
,
5080 d3d10_effect_blend_variable_GetBackingStore
,
5083 /* ID3D10EffectVariable methods */
5085 static BOOL STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_IsValid(ID3D10EffectDepthStencilVariable
*iface
)
5087 TRACE("iface %p\n", iface
);
5089 return (struct d3d10_effect_variable
*)iface
!= &null_depth_stencil_variable
;
5092 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetType(
5093 ID3D10EffectDepthStencilVariable
*iface
)
5095 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
5098 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetDesc(ID3D10EffectDepthStencilVariable
*iface
,
5099 D3D10_EFFECT_VARIABLE_DESC
*desc
)
5101 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
5104 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetAnnotationByIndex(
5105 ID3D10EffectDepthStencilVariable
*iface
, UINT index
)
5107 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
5110 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetAnnotationByName(
5111 ID3D10EffectDepthStencilVariable
*iface
, LPCSTR name
)
5113 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
5116 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetMemberByIndex(
5117 ID3D10EffectDepthStencilVariable
*iface
, UINT index
)
5119 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
5122 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetMemberByName(
5123 ID3D10EffectDepthStencilVariable
*iface
, LPCSTR name
)
5125 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
5128 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetMemberBySemantic(
5129 ID3D10EffectDepthStencilVariable
*iface
, LPCSTR semantic
)
5131 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
5134 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetElement(
5135 ID3D10EffectDepthStencilVariable
*iface
, UINT index
)
5137 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
5140 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetParentConstantBuffer(
5141 ID3D10EffectDepthStencilVariable
*iface
)
5143 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
5146 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsScalar(
5147 ID3D10EffectDepthStencilVariable
*iface
)
5149 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
5152 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsVector(
5153 ID3D10EffectDepthStencilVariable
*iface
)
5155 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
5158 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsMatrix(
5159 ID3D10EffectDepthStencilVariable
*iface
)
5161 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
5164 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsString(
5165 ID3D10EffectDepthStencilVariable
*iface
)
5167 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
5170 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsShaderResource(
5171 ID3D10EffectDepthStencilVariable
*iface
)
5173 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
5176 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsRenderTargetView(
5177 ID3D10EffectDepthStencilVariable
*iface
)
5179 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
5182 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsDepthStencilView(
5183 ID3D10EffectDepthStencilVariable
*iface
)
5185 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
5188 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsConstantBuffer(
5189 ID3D10EffectDepthStencilVariable
*iface
)
5191 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
5194 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsShader(
5195 ID3D10EffectDepthStencilVariable
*iface
)
5197 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
5200 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsBlend(
5201 ID3D10EffectDepthStencilVariable
*iface
)
5203 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
5206 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsDepthStencil(
5207 ID3D10EffectDepthStencilVariable
*iface
)
5209 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
5212 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsRasterizer(
5213 ID3D10EffectDepthStencilVariable
*iface
)
5215 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
5218 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsSampler(
5219 ID3D10EffectDepthStencilVariable
*iface
)
5221 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
5224 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_SetRawValue(ID3D10EffectDepthStencilVariable
*iface
,
5225 void *data
, UINT offset
, UINT count
)
5227 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5230 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetRawValue(ID3D10EffectDepthStencilVariable
*iface
,
5231 void *data
, UINT offset
, UINT count
)
5233 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5236 /* ID3D10EffectDepthStencilVariable methods */
5238 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetDepthStencilState(ID3D10EffectDepthStencilVariable
*iface
,
5239 UINT index
, ID3D10DepthStencilState
**depth_stencil_state
)
5241 FIXME("iface %p, index %u, depth_stencil_state %p stub!\n", iface
, index
, depth_stencil_state
);
5246 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetBackingStore(ID3D10EffectDepthStencilVariable
*iface
,
5247 UINT index
, D3D10_DEPTH_STENCIL_DESC
*desc
)
5249 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
5255 static const struct ID3D10EffectDepthStencilVariableVtbl d3d10_effect_depth_stencil_variable_vtbl
=
5257 /* ID3D10EffectVariable methods */
5258 d3d10_effect_depth_stencil_variable_IsValid
,
5259 d3d10_effect_depth_stencil_variable_GetType
,
5260 d3d10_effect_depth_stencil_variable_GetDesc
,
5261 d3d10_effect_depth_stencil_variable_GetAnnotationByIndex
,
5262 d3d10_effect_depth_stencil_variable_GetAnnotationByName
,
5263 d3d10_effect_depth_stencil_variable_GetMemberByIndex
,
5264 d3d10_effect_depth_stencil_variable_GetMemberByName
,
5265 d3d10_effect_depth_stencil_variable_GetMemberBySemantic
,
5266 d3d10_effect_depth_stencil_variable_GetElement
,
5267 d3d10_effect_depth_stencil_variable_GetParentConstantBuffer
,
5268 d3d10_effect_depth_stencil_variable_AsScalar
,
5269 d3d10_effect_depth_stencil_variable_AsVector
,
5270 d3d10_effect_depth_stencil_variable_AsMatrix
,
5271 d3d10_effect_depth_stencil_variable_AsString
,
5272 d3d10_effect_depth_stencil_variable_AsShaderResource
,
5273 d3d10_effect_depth_stencil_variable_AsRenderTargetView
,
5274 d3d10_effect_depth_stencil_variable_AsDepthStencilView
,
5275 d3d10_effect_depth_stencil_variable_AsConstantBuffer
,
5276 d3d10_effect_depth_stencil_variable_AsShader
,
5277 d3d10_effect_depth_stencil_variable_AsBlend
,
5278 d3d10_effect_depth_stencil_variable_AsDepthStencil
,
5279 d3d10_effect_depth_stencil_variable_AsRasterizer
,
5280 d3d10_effect_depth_stencil_variable_AsSampler
,
5281 d3d10_effect_depth_stencil_variable_SetRawValue
,
5282 d3d10_effect_depth_stencil_variable_GetRawValue
,
5283 /* ID3D10EffectDepthStencilVariable methods */
5284 d3d10_effect_depth_stencil_variable_GetDepthStencilState
,
5285 d3d10_effect_depth_stencil_variable_GetBackingStore
,
5288 /* ID3D10EffectVariable methods */
5290 static BOOL STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_IsValid(ID3D10EffectRasterizerVariable
*iface
)
5292 TRACE("iface %p\n", iface
);
5294 return (struct d3d10_effect_variable
*)iface
!= &null_rasterizer_variable
;
5297 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetType(
5298 ID3D10EffectRasterizerVariable
*iface
)
5300 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
5303 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetDesc(ID3D10EffectRasterizerVariable
*iface
,
5304 D3D10_EFFECT_VARIABLE_DESC
*desc
)
5306 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
5309 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetAnnotationByIndex(
5310 ID3D10EffectRasterizerVariable
*iface
, UINT index
)
5312 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
5315 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetAnnotationByName(
5316 ID3D10EffectRasterizerVariable
*iface
, LPCSTR name
)
5318 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
5321 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetMemberByIndex(
5322 ID3D10EffectRasterizerVariable
*iface
, UINT index
)
5324 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
5327 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetMemberByName(
5328 ID3D10EffectRasterizerVariable
*iface
, LPCSTR name
)
5330 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
5333 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetMemberBySemantic(
5334 ID3D10EffectRasterizerVariable
*iface
, LPCSTR semantic
)
5336 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
5339 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetElement(
5340 ID3D10EffectRasterizerVariable
*iface
, UINT index
)
5342 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
5345 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetParentConstantBuffer(
5346 ID3D10EffectRasterizerVariable
*iface
)
5348 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
5351 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsScalar(
5352 ID3D10EffectRasterizerVariable
*iface
)
5354 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
5357 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsVector(
5358 ID3D10EffectRasterizerVariable
*iface
)
5360 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
5363 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsMatrix(
5364 ID3D10EffectRasterizerVariable
*iface
)
5366 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
5369 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsString(
5370 ID3D10EffectRasterizerVariable
*iface
)
5372 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
5375 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsShaderResource(
5376 ID3D10EffectRasterizerVariable
*iface
)
5378 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
5381 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsRenderTargetView(
5382 ID3D10EffectRasterizerVariable
*iface
)
5384 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
5387 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsDepthStencilView(
5388 ID3D10EffectRasterizerVariable
*iface
)
5390 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
5393 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsConstantBuffer(
5394 ID3D10EffectRasterizerVariable
*iface
)
5396 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
5399 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsShader(
5400 ID3D10EffectRasterizerVariable
*iface
)
5402 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
5405 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsBlend(
5406 ID3D10EffectRasterizerVariable
*iface
)
5408 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
5411 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsDepthStencil(
5412 ID3D10EffectRasterizerVariable
*iface
)
5414 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
5417 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsRasterizer(
5418 ID3D10EffectRasterizerVariable
*iface
)
5420 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
5423 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsSampler(
5424 ID3D10EffectRasterizerVariable
*iface
)
5426 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
5429 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_SetRawValue(ID3D10EffectRasterizerVariable
*iface
,
5430 void *data
, UINT offset
, UINT count
)
5432 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5435 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetRawValue(ID3D10EffectRasterizerVariable
*iface
,
5436 void *data
, UINT offset
, UINT count
)
5438 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5441 /* ID3D10EffectRasterizerVariable methods */
5443 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetRasterizerState(ID3D10EffectRasterizerVariable
*iface
,
5444 UINT index
, ID3D10RasterizerState
**rasterizer_state
)
5446 FIXME("iface %p, index %u, rasterizer_state %p stub!\n", iface
, index
, rasterizer_state
);
5451 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetBackingStore(ID3D10EffectRasterizerVariable
*iface
,
5452 UINT index
, D3D10_RASTERIZER_DESC
*desc
)
5454 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
5460 static const struct ID3D10EffectRasterizerVariableVtbl d3d10_effect_rasterizer_variable_vtbl
=
5462 /* ID3D10EffectVariable methods */
5463 d3d10_effect_rasterizer_variable_IsValid
,
5464 d3d10_effect_rasterizer_variable_GetType
,
5465 d3d10_effect_rasterizer_variable_GetDesc
,
5466 d3d10_effect_rasterizer_variable_GetAnnotationByIndex
,
5467 d3d10_effect_rasterizer_variable_GetAnnotationByName
,
5468 d3d10_effect_rasterizer_variable_GetMemberByIndex
,
5469 d3d10_effect_rasterizer_variable_GetMemberByName
,
5470 d3d10_effect_rasterizer_variable_GetMemberBySemantic
,
5471 d3d10_effect_rasterizer_variable_GetElement
,
5472 d3d10_effect_rasterizer_variable_GetParentConstantBuffer
,
5473 d3d10_effect_rasterizer_variable_AsScalar
,
5474 d3d10_effect_rasterizer_variable_AsVector
,
5475 d3d10_effect_rasterizer_variable_AsMatrix
,
5476 d3d10_effect_rasterizer_variable_AsString
,
5477 d3d10_effect_rasterizer_variable_AsShaderResource
,
5478 d3d10_effect_rasterizer_variable_AsRenderTargetView
,
5479 d3d10_effect_rasterizer_variable_AsDepthStencilView
,
5480 d3d10_effect_rasterizer_variable_AsConstantBuffer
,
5481 d3d10_effect_rasterizer_variable_AsShader
,
5482 d3d10_effect_rasterizer_variable_AsBlend
,
5483 d3d10_effect_rasterizer_variable_AsDepthStencil
,
5484 d3d10_effect_rasterizer_variable_AsRasterizer
,
5485 d3d10_effect_rasterizer_variable_AsSampler
,
5486 d3d10_effect_rasterizer_variable_SetRawValue
,
5487 d3d10_effect_rasterizer_variable_GetRawValue
,
5488 /* ID3D10EffectRasterizerVariable methods */
5489 d3d10_effect_rasterizer_variable_GetRasterizerState
,
5490 d3d10_effect_rasterizer_variable_GetBackingStore
,
5493 /* ID3D10EffectVariable methods */
5495 static BOOL STDMETHODCALLTYPE
d3d10_effect_sampler_variable_IsValid(ID3D10EffectSamplerVariable
*iface
)
5497 TRACE("iface %p\n", iface
);
5499 return (struct d3d10_effect_variable
*)iface
!= &null_sampler_variable
;
5502 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetType(
5503 ID3D10EffectSamplerVariable
*iface
)
5505 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
5508 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetDesc(ID3D10EffectSamplerVariable
*iface
,
5509 D3D10_EFFECT_VARIABLE_DESC
*desc
)
5511 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
5514 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetAnnotationByIndex(
5515 ID3D10EffectSamplerVariable
*iface
, UINT index
)
5517 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
5520 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetAnnotationByName(
5521 ID3D10EffectSamplerVariable
*iface
, LPCSTR name
)
5523 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
5526 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetMemberByIndex(
5527 ID3D10EffectSamplerVariable
*iface
, UINT index
)
5529 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
5532 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetMemberByName(
5533 ID3D10EffectSamplerVariable
*iface
, LPCSTR name
)
5535 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
5538 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetMemberBySemantic(
5539 ID3D10EffectSamplerVariable
*iface
, LPCSTR semantic
)
5541 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
5544 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetElement(
5545 ID3D10EffectSamplerVariable
*iface
, UINT index
)
5547 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
5550 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetParentConstantBuffer(
5551 ID3D10EffectSamplerVariable
*iface
)
5553 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
5556 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsScalar(
5557 ID3D10EffectSamplerVariable
*iface
)
5559 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
5562 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsVector(
5563 ID3D10EffectSamplerVariable
*iface
)
5565 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
5568 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsMatrix(
5569 ID3D10EffectSamplerVariable
*iface
)
5571 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
5574 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsString(
5575 ID3D10EffectSamplerVariable
*iface
)
5577 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
5580 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsShaderResource(
5581 ID3D10EffectSamplerVariable
*iface
)
5583 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
5586 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsRenderTargetView(
5587 ID3D10EffectSamplerVariable
*iface
)
5589 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
5592 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsDepthStencilView(
5593 ID3D10EffectSamplerVariable
*iface
)
5595 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
5598 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsConstantBuffer(
5599 ID3D10EffectSamplerVariable
*iface
)
5601 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
5604 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsShader(
5605 ID3D10EffectSamplerVariable
*iface
)
5607 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
5610 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsBlend(
5611 ID3D10EffectSamplerVariable
*iface
)
5613 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
5616 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsDepthStencil(
5617 ID3D10EffectSamplerVariable
*iface
)
5619 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
5622 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsRasterizer(
5623 ID3D10EffectSamplerVariable
*iface
)
5625 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
5628 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsSampler(
5629 ID3D10EffectSamplerVariable
*iface
)
5631 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
5634 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_SetRawValue(ID3D10EffectSamplerVariable
*iface
,
5635 void *data
, UINT offset
, UINT count
)
5637 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5640 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetRawValue(ID3D10EffectSamplerVariable
*iface
,
5641 void *data
, UINT offset
, UINT count
)
5643 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5646 /* ID3D10EffectSamplerVariable methods */
5648 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetSampler(ID3D10EffectSamplerVariable
*iface
,
5649 UINT index
, ID3D10SamplerState
**sampler
)
5651 FIXME("iface %p, index %u, sampler %p stub!\n", iface
, index
, sampler
);
5656 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetBackingStore(ID3D10EffectSamplerVariable
*iface
,
5657 UINT index
, D3D10_SAMPLER_DESC
*desc
)
5659 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
5665 static const struct ID3D10EffectSamplerVariableVtbl d3d10_effect_sampler_variable_vtbl
=
5667 /* ID3D10EffectVariable methods */
5668 d3d10_effect_sampler_variable_IsValid
,
5669 d3d10_effect_sampler_variable_GetType
,
5670 d3d10_effect_sampler_variable_GetDesc
,
5671 d3d10_effect_sampler_variable_GetAnnotationByIndex
,
5672 d3d10_effect_sampler_variable_GetAnnotationByName
,
5673 d3d10_effect_sampler_variable_GetMemberByIndex
,
5674 d3d10_effect_sampler_variable_GetMemberByName
,
5675 d3d10_effect_sampler_variable_GetMemberBySemantic
,
5676 d3d10_effect_sampler_variable_GetElement
,
5677 d3d10_effect_sampler_variable_GetParentConstantBuffer
,
5678 d3d10_effect_sampler_variable_AsScalar
,
5679 d3d10_effect_sampler_variable_AsVector
,
5680 d3d10_effect_sampler_variable_AsMatrix
,
5681 d3d10_effect_sampler_variable_AsString
,
5682 d3d10_effect_sampler_variable_AsShaderResource
,
5683 d3d10_effect_sampler_variable_AsRenderTargetView
,
5684 d3d10_effect_sampler_variable_AsDepthStencilView
,
5685 d3d10_effect_sampler_variable_AsConstantBuffer
,
5686 d3d10_effect_sampler_variable_AsShader
,
5687 d3d10_effect_sampler_variable_AsBlend
,
5688 d3d10_effect_sampler_variable_AsDepthStencil
,
5689 d3d10_effect_sampler_variable_AsRasterizer
,
5690 d3d10_effect_sampler_variable_AsSampler
,
5691 d3d10_effect_sampler_variable_SetRawValue
,
5692 d3d10_effect_sampler_variable_GetRawValue
,
5693 /* ID3D10EffectSamplerVariable methods */
5694 d3d10_effect_sampler_variable_GetSampler
,
5695 d3d10_effect_sampler_variable_GetBackingStore
,
5698 /* ID3D10EffectType methods */
5700 static BOOL STDMETHODCALLTYPE
d3d10_effect_type_IsValid(ID3D10EffectType
*iface
)
5702 FIXME("iface %p stub!\n", iface
);
5707 static HRESULT STDMETHODCALLTYPE
d3d10_effect_type_GetDesc(ID3D10EffectType
*iface
, D3D10_EFFECT_TYPE_DESC
*desc
)
5709 struct d3d10_effect_type
*This
= (struct d3d10_effect_type
*)iface
;
5711 TRACE("iface %p, desc %p\n", iface
, desc
);
5713 if (This
== &null_type
)
5715 WARN("Null type specified\n");
5721 WARN("Invalid argument specified\n");
5722 return E_INVALIDARG
;
5725 desc
->TypeName
= This
->name
;
5726 desc
->Class
= This
->type_class
;
5727 desc
->Type
= This
->basetype
;
5728 desc
->Elements
= This
->element_count
;
5729 desc
->Members
= This
->member_count
;
5730 desc
->Rows
= This
->row_count
;
5731 desc
->Columns
= This
->column_count
;
5732 desc
->PackedSize
= This
->size_packed
;
5733 desc
->UnpackedSize
= This
->size_unpacked
;
5734 desc
->Stride
= This
->stride
;
5739 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_type_GetMemberTypeByIndex(ID3D10EffectType
*iface
,
5742 struct d3d10_effect_type
*This
= (struct d3d10_effect_type
*)iface
;
5743 struct d3d10_effect_type
*t
;
5745 TRACE("iface %p, index %u\n", iface
, index
);
5747 if (index
>= This
->member_count
)
5749 WARN("Invalid index specified\n");
5750 return (ID3D10EffectType
*)&null_type
;
5753 t
= (&This
->members
[index
])->type
;
5755 TRACE("Returning member %p, %s\n", t
, debugstr_a(t
->name
));
5757 return (ID3D10EffectType
*)t
;
5760 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_type_GetMemberTypeByName(ID3D10EffectType
*iface
,
5763 struct d3d10_effect_type
*This
= (struct d3d10_effect_type
*)iface
;
5766 TRACE("iface %p, name %s\n", iface
, debugstr_a(name
));
5770 WARN("Invalid name specified\n");
5771 return (ID3D10EffectType
*)&null_type
;
5774 for (i
= 0; i
< This
->member_count
; ++i
)
5776 struct d3d10_effect_type_member
*typem
= &This
->members
[i
];
5780 if (!strcmp(typem
->name
, name
))
5782 TRACE("Returning type %p.\n", typem
->type
);
5783 return (ID3D10EffectType
*)typem
->type
;
5788 WARN("Invalid name specified\n");
5790 return (ID3D10EffectType
*)&null_type
;
5793 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_type_GetMemberTypeBySemantic(ID3D10EffectType
*iface
,
5796 struct d3d10_effect_type
*This
= (struct d3d10_effect_type
*)iface
;
5799 TRACE("iface %p, semantic %s\n", iface
, debugstr_a(semantic
));
5803 WARN("Invalid semantic specified\n");
5804 return (ID3D10EffectType
*)&null_type
;
5807 for (i
= 0; i
< This
->member_count
; ++i
)
5809 struct d3d10_effect_type_member
*typem
= &This
->members
[i
];
5811 if (typem
->semantic
)
5813 if (!strcmp(typem
->semantic
, semantic
))
5815 TRACE("Returning type %p.\n", typem
->type
);
5816 return (ID3D10EffectType
*)typem
->type
;
5821 WARN("Invalid semantic specified\n");
5823 return (ID3D10EffectType
*)&null_type
;
5826 static LPCSTR STDMETHODCALLTYPE
d3d10_effect_type_GetMemberName(ID3D10EffectType
*iface
, UINT index
)
5828 struct d3d10_effect_type
*This
= (struct d3d10_effect_type
*)iface
;
5829 struct d3d10_effect_type_member
*typem
;
5831 TRACE("iface %p, index %u\n", iface
, index
);
5833 if (index
>= This
->member_count
)
5835 WARN("Invalid index specified\n");
5839 typem
= &This
->members
[index
];
5841 TRACE("Returning name %s\n", debugstr_a(typem
->name
));
5846 static LPCSTR STDMETHODCALLTYPE
d3d10_effect_type_GetMemberSemantic(ID3D10EffectType
*iface
, UINT index
)
5848 struct d3d10_effect_type
*This
= (struct d3d10_effect_type
*)iface
;
5849 struct d3d10_effect_type_member
*typem
;
5851 TRACE("iface %p, index %u\n", iface
, index
);
5853 if (index
>= This
->member_count
)
5855 WARN("Invalid index specified\n");
5859 typem
= &This
->members
[index
];
5861 TRACE("Returning semantic %s\n", debugstr_a(typem
->semantic
));
5863 return typem
->semantic
;
5866 static const struct ID3D10EffectTypeVtbl d3d10_effect_type_vtbl
=
5868 /* ID3D10EffectType */
5869 d3d10_effect_type_IsValid
,
5870 d3d10_effect_type_GetDesc
,
5871 d3d10_effect_type_GetMemberTypeByIndex
,
5872 d3d10_effect_type_GetMemberTypeByName
,
5873 d3d10_effect_type_GetMemberTypeBySemantic
,
5874 d3d10_effect_type_GetMemberName
,
5875 d3d10_effect_type_GetMemberSemantic
,