2 * Copyright 2009 Henri Verbeet for CodeWeavers
3 * Copyright 2009 Rico Schüller
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #include "wine/port.h"
24 #include "d3d10_private.h"
26 WINE_DEFAULT_DEBUG_CHANNEL(d3d10
);
28 #define MAKE_TAG(ch0, ch1, ch2, ch3) \
29 ((DWORD)(ch0) | ((DWORD)(ch1) << 8) | \
30 ((DWORD)(ch2) << 16) | ((DWORD)(ch3) << 24 ))
31 #define TAG_DXBC MAKE_TAG('D', 'X', 'B', 'C')
32 #define TAG_FX10 MAKE_TAG('F', 'X', '1', '0')
33 #define TAG_ISGN MAKE_TAG('I', 'S', 'G', 'N')
35 #define D3D10_FX10_TYPE_COLUMN_SHIFT 11
36 #define D3D10_FX10_TYPE_COLUMN_MASK (0x7 << D3D10_FX10_TYPE_COLUMN_SHIFT)
38 #define D3D10_FX10_TYPE_ROW_SHIFT 8
39 #define D3D10_FX10_TYPE_ROW_MASK (0x7 << D3D10_FX10_TYPE_ROW_SHIFT)
41 #define D3D10_FX10_TYPE_BASETYPE_SHIFT 3
42 #define D3D10_FX10_TYPE_BASETYPE_MASK (0x1f << D3D10_FX10_TYPE_BASETYPE_SHIFT)
44 #define D3D10_FX10_TYPE_CLASS_SHIFT 0
45 #define D3D10_FX10_TYPE_CLASS_MASK (0x7 << D3D10_FX10_TYPE_CLASS_SHIFT)
47 #define D3D10_FX10_TYPE_MATRIX_COLUMN_MAJOR_MASK 0x4000
49 static const struct ID3D10EffectTechniqueVtbl d3d10_effect_technique_vtbl
;
50 static const struct ID3D10EffectPassVtbl d3d10_effect_pass_vtbl
;
51 static const struct ID3D10EffectVariableVtbl d3d10_effect_variable_vtbl
;
52 static const struct ID3D10EffectConstantBufferVtbl d3d10_effect_constant_buffer_vtbl
;
53 static const struct ID3D10EffectScalarVariableVtbl d3d10_effect_scalar_variable_vtbl
;
54 static const struct ID3D10EffectVectorVariableVtbl d3d10_effect_vector_variable_vtbl
;
55 static const struct ID3D10EffectMatrixVariableVtbl d3d10_effect_matrix_variable_vtbl
;
56 static const struct ID3D10EffectStringVariableVtbl d3d10_effect_string_variable_vtbl
;
57 static const struct ID3D10EffectShaderResourceVariableVtbl d3d10_effect_shader_resource_variable_vtbl
;
58 static const struct ID3D10EffectRenderTargetViewVariableVtbl d3d10_effect_render_target_view_variable_vtbl
;
59 static const struct ID3D10EffectDepthStencilViewVariableVtbl d3d10_effect_depth_stencil_view_variable_vtbl
;
60 static const struct ID3D10EffectShaderVariableVtbl d3d10_effect_shader_variable_vtbl
;
61 static const struct ID3D10EffectBlendVariableVtbl d3d10_effect_blend_variable_vtbl
;
62 static const struct ID3D10EffectDepthStencilVariableVtbl d3d10_effect_depth_stencil_variable_vtbl
;
63 static const struct ID3D10EffectRasterizerVariableVtbl d3d10_effect_rasterizer_variable_vtbl
;
64 static const struct ID3D10EffectSamplerVariableVtbl d3d10_effect_sampler_variable_vtbl
;
65 static const struct ID3D10EffectTypeVtbl d3d10_effect_type_vtbl
;
67 /* null objects - needed for invalid calls */
68 static struct d3d10_effect_technique null_technique
= {&d3d10_effect_technique_vtbl
};
69 static struct d3d10_effect_pass null_pass
= {&d3d10_effect_pass_vtbl
};
70 static struct d3d10_effect_type null_type
= {&d3d10_effect_type_vtbl
};
71 static struct d3d10_effect_variable null_local_buffer
= {(ID3D10EffectVariableVtbl
*)&d3d10_effect_constant_buffer_vtbl
,
72 &null_local_buffer
, &null_type
};
73 static struct d3d10_effect_variable null_variable
= {&d3d10_effect_variable_vtbl
,
74 &null_local_buffer
, &null_type
};
75 static struct d3d10_effect_variable null_scalar_variable
= {(ID3D10EffectVariableVtbl
*)&d3d10_effect_scalar_variable_vtbl
,
76 &null_local_buffer
, &null_type
};
77 static struct d3d10_effect_variable null_vector_variable
= {(ID3D10EffectVariableVtbl
*)&d3d10_effect_vector_variable_vtbl
,
78 &null_local_buffer
, &null_type
};
79 static struct d3d10_effect_variable null_matrix_variable
= {(ID3D10EffectVariableVtbl
*)&d3d10_effect_matrix_variable_vtbl
,
80 &null_local_buffer
, &null_type
};
81 static struct d3d10_effect_variable null_string_variable
= {(ID3D10EffectVariableVtbl
*)&d3d10_effect_string_variable_vtbl
,
82 &null_local_buffer
, &null_type
};
83 static struct d3d10_effect_variable null_shader_resource_variable
= {(ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_resource_variable_vtbl
,
84 &null_local_buffer
, &null_type
};
85 static struct d3d10_effect_variable null_render_target_view_variable
= {(ID3D10EffectVariableVtbl
*)&d3d10_effect_render_target_view_variable_vtbl
,
86 &null_local_buffer
, &null_type
};
87 static struct d3d10_effect_variable null_depth_stencil_view_variable
= {(ID3D10EffectVariableVtbl
*)&d3d10_effect_depth_stencil_view_variable_vtbl
,
88 &null_local_buffer
, &null_type
};
89 static struct d3d10_effect_variable null_shader_variable
= {(ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_variable_vtbl
,
90 &null_local_buffer
, &null_type
};
91 static struct d3d10_effect_variable null_blend_variable
= {(ID3D10EffectVariableVtbl
*)&d3d10_effect_blend_variable_vtbl
,
92 &null_local_buffer
, &null_type
};
93 static struct d3d10_effect_variable null_depth_stencil_variable
= {(ID3D10EffectVariableVtbl
*)&d3d10_effect_depth_stencil_variable_vtbl
,
94 &null_local_buffer
, &null_type
};
95 static struct d3d10_effect_variable null_rasterizer_variable
= {(ID3D10EffectVariableVtbl
*)&d3d10_effect_rasterizer_variable_vtbl
,
96 &null_local_buffer
, &null_type
};
97 static struct d3d10_effect_variable null_sampler_variable
= {(ID3D10EffectVariableVtbl
*)&d3d10_effect_sampler_variable_vtbl
,
98 &null_local_buffer
, &null_type
};
100 static struct d3d10_effect_type
*get_fx10_type(struct d3d10_effect
*effect
, const char *data
, DWORD offset
);
102 static inline void read_dword(const char **ptr
, DWORD
*d
)
104 memcpy(d
, *ptr
, sizeof(*d
));
108 static inline void skip_dword_unknown(const char **ptr
, unsigned int count
)
113 FIXME("Skipping %u unknown DWORDs:\n", count
);
114 for (i
= 0; i
< count
; ++i
)
117 FIXME("\t0x%08x\n", d
);
121 static inline void write_dword(char **ptr
, DWORD d
)
123 memcpy(*ptr
, &d
, sizeof(d
));
127 static inline void write_dword_unknown(char **ptr
, DWORD d
)
129 FIXME("Writing unknown DWORD 0x%08x\n", d
);
133 static HRESULT
parse_dxbc(const char *data
, SIZE_T data_size
,
134 HRESULT (*chunk_handler
)(const char *data
, DWORD data_size
, DWORD tag
, void *ctx
), void *ctx
)
136 const char *ptr
= data
;
143 read_dword(&ptr
, &tag
);
144 TRACE("tag: %s.\n", debugstr_an((const char *)&tag
, 4));
148 WARN("Wrong tag.\n");
153 skip_dword_unknown(&ptr
, 4);
155 skip_dword_unknown(&ptr
, 1);
157 read_dword(&ptr
, &total_size
);
158 TRACE("total size: %#x\n", total_size
);
160 read_dword(&ptr
, &chunk_count
);
161 TRACE("chunk count: %#x\n", chunk_count
);
163 for (i
= 0; i
< chunk_count
; ++i
)
165 DWORD chunk_tag
, chunk_size
;
166 const char *chunk_ptr
;
169 read_dword(&ptr
, &chunk_offset
);
170 TRACE("chunk %u at offset %#x\n", i
, chunk_offset
);
172 chunk_ptr
= data
+ chunk_offset
;
174 read_dword(&chunk_ptr
, &chunk_tag
);
175 read_dword(&chunk_ptr
, &chunk_size
);
177 hr
= chunk_handler(chunk_ptr
, chunk_size
, chunk_tag
, ctx
);
178 if (FAILED(hr
)) break;
184 static BOOL
copy_name(const char *ptr
, char **name
)
188 if (!ptr
) return TRUE
;
190 name_len
= strlen(ptr
) + 1;
196 *name
= HeapAlloc(GetProcessHeap(), 0, name_len
);
199 ERR("Failed to allocate name memory.\n");
203 memcpy(*name
, ptr
, name_len
);
208 static HRESULT
shader_chunk_handler(const char *data
, DWORD data_size
, DWORD tag
, void *ctx
)
210 struct d3d10_effect_shader_variable
*s
= ctx
;
212 TRACE("tag: %s.\n", debugstr_an((const char *)&tag
, 4));
214 TRACE("chunk size: %#x\n", data_size
);
220 /* 32 (DXBC header) + 1 * 4 (chunk index) + 2 * 4 (chunk header) + data_size (chunk data) */
221 UINT size
= 44 + data_size
;
224 s
->input_signature
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, size
);
225 if (!s
->input_signature
)
227 ERR("Failed to allocate input signature data\n");
228 return E_OUTOFMEMORY
;
230 s
->input_signature_size
= size
;
232 ptr
= s
->input_signature
;
234 write_dword(&ptr
, TAG_DXBC
);
237 write_dword_unknown(&ptr
, 0);
238 write_dword_unknown(&ptr
, 0);
239 write_dword_unknown(&ptr
, 0);
240 write_dword_unknown(&ptr
, 0);
242 /* seems to be always 1 */
243 write_dword_unknown(&ptr
, 1);
246 write_dword(&ptr
, size
);
249 write_dword(&ptr
, 1);
252 write_dword(&ptr
, (ptr
- s
->input_signature
) + 4);
255 write_dword(&ptr
, TAG_ISGN
);
256 write_dword(&ptr
, data_size
);
257 memcpy(ptr
, data
, data_size
);
262 FIXME("Unhandled chunk %s.\n", debugstr_an((const char *)&tag
, 4));
269 static HRESULT
parse_shader(struct d3d10_effect_variable
*v
, const char *data
)
271 ID3D10Device
*device
= v
->effect
->device
;
272 struct d3d10_effect_shader_variable
*s
;
273 const char *ptr
= data
;
277 s
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(*s
));
280 ERR("Failed to allocate shader variable memory\n");
281 return E_OUTOFMEMORY
;
286 if (!ptr
) return S_OK
;
288 read_dword(&ptr
, &dxbc_size
);
289 TRACE("dxbc size: %#x\n", dxbc_size
);
291 switch (v
->type
->basetype
)
293 case D3D10_SVT_VERTEXSHADER
:
294 hr
= ID3D10Device_CreateVertexShader(device
, ptr
, dxbc_size
, &s
->shader
.vs
);
295 if (FAILED(hr
)) return hr
;
298 case D3D10_SVT_PIXELSHADER
:
299 hr
= ID3D10Device_CreatePixelShader(device
, ptr
, dxbc_size
, &s
->shader
.ps
);
300 if (FAILED(hr
)) return hr
;
303 case D3D10_SVT_GEOMETRYSHADER
:
304 hr
= ID3D10Device_CreateGeometryShader(device
, ptr
, dxbc_size
, &s
->shader
.gs
);
305 if (FAILED(hr
)) return hr
;
309 ERR("This should not happen!\n");
313 return parse_dxbc(ptr
, dxbc_size
, shader_chunk_handler
, s
);
316 static D3D10_SHADER_VARIABLE_CLASS
d3d10_variable_class(DWORD c
, BOOL is_column_major
)
320 case 1: return D3D10_SVC_SCALAR
;
321 case 2: return D3D10_SVC_VECTOR
;
322 case 3: if (is_column_major
) return D3D10_SVC_MATRIX_COLUMNS
;
323 else return D3D10_SVC_MATRIX_ROWS
;
325 FIXME("Unknown variable class %#x.\n", c
);
330 static D3D10_SHADER_VARIABLE_TYPE
d3d10_variable_type(DWORD t
, BOOL is_object
)
336 case 1: return D3D10_SVT_STRING
;
337 case 2: return D3D10_SVT_BLEND
;
338 case 3: return D3D10_SVT_DEPTHSTENCIL
;
339 case 4: return D3D10_SVT_RASTERIZER
;
340 case 5: return D3D10_SVT_PIXELSHADER
;
341 case 6: return D3D10_SVT_VERTEXSHADER
;
342 case 7: return D3D10_SVT_GEOMETRYSHADER
;
344 case 10: return D3D10_SVT_TEXTURE1D
;
345 case 11: return D3D10_SVT_TEXTURE1DARRAY
;
346 case 12: return D3D10_SVT_TEXTURE2D
;
347 case 13: return D3D10_SVT_TEXTURE2DARRAY
;
348 case 14: return D3D10_SVT_TEXTURE2DMS
;
349 case 15: return D3D10_SVT_TEXTURE2DMSARRAY
;
350 case 16: return D3D10_SVT_TEXTURE3D
;
351 case 17: return D3D10_SVT_TEXTURECUBE
;
353 case 19: return D3D10_SVT_RENDERTARGETVIEW
;
354 case 20: return D3D10_SVT_DEPTHSTENCILVIEW
;
355 case 21: return D3D10_SVT_SAMPLER
;
357 FIXME("Unknown variable type %#x.\n", t
);
365 case 1: return D3D10_SVT_FLOAT
;
366 case 2: return D3D10_SVT_INT
;
367 case 3: return D3D10_SVT_UINT
;
368 case 4: return D3D10_SVT_BOOL
;
370 FIXME("Unknown variable type %#x.\n", t
);
376 static HRESULT
parse_fx10_type(struct d3d10_effect_type
*t
, const char *ptr
, const char *data
)
383 read_dword(&ptr
, &offset
);
384 TRACE("Type name at offset %#x.\n", offset
);
386 if (!copy_name(data
+ offset
, &t
->name
))
388 ERR("Failed to copy name.\n");
389 return E_OUTOFMEMORY
;
391 TRACE("Type name: %s.\n", debugstr_a(t
->name
));
393 read_dword(&ptr
, &unknown0
);
394 TRACE("Unknown 0: %u.\n", unknown0
);
396 read_dword(&ptr
, &t
->element_count
);
397 TRACE("Element count: %u.\n", t
->element_count
);
399 read_dword(&ptr
, &t
->size_unpacked
);
400 TRACE("Unpacked size: %#x.\n", t
->size_unpacked
);
402 read_dword(&ptr
, &t
->stride
);
403 TRACE("Stride: %#x.\n", t
->stride
);
405 read_dword(&ptr
, &t
->size_packed
);
406 TRACE("Packed size %#x.\n", t
->size_packed
);
413 read_dword(&ptr
, &typeinfo
);
414 t
->column_count
= (typeinfo
& D3D10_FX10_TYPE_COLUMN_MASK
) >> D3D10_FX10_TYPE_COLUMN_SHIFT
;
415 t
->row_count
= (typeinfo
& D3D10_FX10_TYPE_ROW_MASK
) >> D3D10_FX10_TYPE_ROW_SHIFT
;
416 t
->basetype
= d3d10_variable_type((typeinfo
& D3D10_FX10_TYPE_BASETYPE_MASK
) >> D3D10_FX10_TYPE_BASETYPE_SHIFT
, FALSE
);
417 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
);
419 TRACE("Type description: %#x.\n", typeinfo
);
420 TRACE("\tcolumns: %u.\n", t
->column_count
);
421 TRACE("\trows: %u.\n", t
->row_count
);
422 TRACE("\tbasetype: %s.\n", debug_d3d10_shader_variable_type(t
->basetype
));
423 TRACE("\tclass: %s.\n", debug_d3d10_shader_variable_class(t
->type_class
));
424 TRACE("\tunknown bits: %#x.\n", typeinfo
& ~(D3D10_FX10_TYPE_COLUMN_MASK
| D3D10_FX10_TYPE_ROW_MASK
425 | D3D10_FX10_TYPE_BASETYPE_MASK
| D3D10_FX10_TYPE_CLASS_MASK
| D3D10_FX10_TYPE_MATRIX_COLUMN_MAJOR_MASK
));
429 TRACE("Type is an object.\n");
434 t
->type_class
= D3D10_SVC_OBJECT
;
436 read_dword(&ptr
, &typeinfo
);
437 t
->basetype
= d3d10_variable_type(typeinfo
, TRUE
);
439 TRACE("Type description: %#x.\n", typeinfo
);
440 TRACE("\tbasetype: %s.\n", debug_d3d10_shader_variable_type(t
->basetype
));
441 TRACE("\tclass: %s.\n", debug_d3d10_shader_variable_class(t
->type_class
));
445 TRACE("Type is a structure.\n");
447 read_dword(&ptr
, &t
->member_count
);
448 TRACE("Member count: %u.\n", t
->member_count
);
453 t
->type_class
= D3D10_SVC_STRUCT
;
455 t
->members
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, t
->member_count
* sizeof(*t
->members
));
458 ERR("Failed to allocate members memory.\n");
459 return E_OUTOFMEMORY
;
462 for (i
= 0; i
< t
->member_count
; ++i
)
464 struct d3d10_effect_type_member
*typem
= &t
->members
[i
];
466 read_dword(&ptr
, &offset
);
467 TRACE("Member name at offset %#x.\n", offset
);
469 if (!copy_name(data
+ offset
, &typem
->name
))
471 ERR("Failed to copy name.\n");
472 return E_OUTOFMEMORY
;
474 TRACE("Member name: %s.\n", debugstr_a(typem
->name
));
476 read_dword(&ptr
, &offset
);
477 TRACE("Member semantic at offset %#x.\n", offset
);
479 if (!copy_name(data
+ offset
, &typem
->semantic
))
481 ERR("Failed to copy semantic.\n");
482 return E_OUTOFMEMORY
;
484 TRACE("Member semantic: %s.\n", debugstr_a(typem
->semantic
));
486 read_dword(&ptr
, &typem
->buffer_offset
);
487 TRACE("Member offset in struct: %#x.\n", typem
->buffer_offset
);
489 read_dword(&ptr
, &offset
);
490 TRACE("Member type info at offset %#x.\n", offset
);
492 typem
->type
= get_fx10_type(t
->effect
, data
, offset
);
495 ERR("Failed to get variable type.\n");
502 FIXME("Unhandled case %#x.\n", unknown0
);
506 if (t
->element_count
)
508 TRACE("Elementtype for type at offset: %#x\n", t
->id
);
510 /* allocate elementtype - we need only one, because all elements have the same type */
511 t
->elementtype
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(*t
->elementtype
));
514 ERR("Failed to allocate members memory.\n");
515 return E_OUTOFMEMORY
;
518 /* create a copy of the original type with some minor changes */
519 t
->elementtype
->vtbl
= &d3d10_effect_type_vtbl
;
520 t
->elementtype
->effect
= t
->effect
;
522 if (!copy_name(t
->name
, &t
->elementtype
->name
))
524 ERR("Failed to copy name.\n");
525 return E_OUTOFMEMORY
;
527 TRACE("\tType name: %s.\n", debugstr_a(t
->elementtype
->name
));
529 t
->elementtype
->element_count
= 0;
530 TRACE("\tElement count: %u.\n", t
->elementtype
->element_count
);
533 * Not sure if this calculation is 100% correct, but a test
534 * show's that these values work.
536 t
->elementtype
->size_unpacked
= t
->size_packed
/ t
->element_count
;
537 TRACE("\tUnpacked size: %#x.\n", t
->elementtype
->size_unpacked
);
539 t
->elementtype
->stride
= t
->stride
;
540 TRACE("\tStride: %#x.\n", t
->elementtype
->stride
);
542 t
->elementtype
->size_packed
= t
->size_packed
/ t
->element_count
;
543 TRACE("\tPacked size: %#x.\n", t
->elementtype
->size_packed
);
545 t
->elementtype
->member_count
= t
->member_count
;
546 TRACE("\tMember count: %u.\n", t
->elementtype
->member_count
);
548 t
->elementtype
->column_count
= t
->column_count
;
549 TRACE("\tColumns: %u.\n", t
->elementtype
->column_count
);
551 t
->elementtype
->row_count
= t
->row_count
;
552 TRACE("\tRows: %u.\n", t
->elementtype
->row_count
);
554 t
->elementtype
->basetype
= t
->basetype
;
555 TRACE("\tBasetype: %s.\n", debug_d3d10_shader_variable_type(t
->elementtype
->basetype
));
557 t
->elementtype
->type_class
= t
->type_class
;
558 TRACE("\tClass: %s.\n", debug_d3d10_shader_variable_class(t
->elementtype
->type_class
));
560 t
->elementtype
->members
= t
->members
;
566 static struct d3d10_effect_type
*get_fx10_type(struct d3d10_effect
*effect
, const char *data
, DWORD offset
)
568 struct d3d10_effect_type
*type
;
569 struct wine_rb_entry
*entry
;
572 entry
= wine_rb_get(&effect
->types
, &offset
);
575 TRACE("Returning existing type.\n");
576 return WINE_RB_ENTRY_VALUE(entry
, struct d3d10_effect_type
, entry
);
579 type
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(*type
));
582 ERR("Failed to allocate type memory.\n");
586 type
->vtbl
= &d3d10_effect_type_vtbl
;
588 type
->effect
= effect
;
589 hr
= parse_fx10_type(type
, data
+ offset
, data
);
592 ERR("Failed to parse type info, hr %#x.\n", hr
);
593 HeapFree(GetProcessHeap(), 0, type
);
597 if (wine_rb_put(&effect
->types
, &offset
, &type
->entry
) == -1)
599 ERR("Failed to insert type entry.\n");
600 HeapFree(GetProcessHeap(), 0, type
);
607 static void set_variable_vtbl(struct d3d10_effect_variable
*v
)
609 switch (v
->type
->type_class
)
611 case D3D10_SVC_SCALAR
:
612 v
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_scalar_variable_vtbl
;
615 case D3D10_SVC_VECTOR
:
616 v
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_vector_variable_vtbl
;
619 case D3D10_SVC_MATRIX_ROWS
:
620 case D3D10_SVC_MATRIX_COLUMNS
:
621 v
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_matrix_variable_vtbl
;
624 case D3D10_SVC_STRUCT
:
625 v
->vtbl
= &d3d10_effect_variable_vtbl
;
628 case D3D10_SVC_OBJECT
:
629 switch(v
->type
->basetype
)
631 case D3D10_SVT_STRING
:
632 v
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_string_variable_vtbl
;
635 case D3D10_SVT_TEXTURE1D
:
636 case D3D10_SVT_TEXTURE1DARRAY
:
637 case D3D10_SVT_TEXTURE2D
:
638 case D3D10_SVT_TEXTURE2DARRAY
:
639 case D3D10_SVT_TEXTURE2DMS
:
640 case D3D10_SVT_TEXTURE2DMSARRAY
:
641 case D3D10_SVT_TEXTURE3D
:
642 case D3D10_SVT_TEXTURECUBE
:
643 v
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_resource_variable_vtbl
;
646 case D3D10_SVT_RENDERTARGETVIEW
:
647 v
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_render_target_view_variable_vtbl
;
650 case D3D10_SVT_DEPTHSTENCILVIEW
:
651 v
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_depth_stencil_view_variable_vtbl
;
654 case D3D10_SVT_DEPTHSTENCIL
:
655 v
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_depth_stencil_variable_vtbl
;
658 case D3D10_SVT_VERTEXSHADER
:
659 case D3D10_SVT_GEOMETRYSHADER
:
660 case D3D10_SVT_PIXELSHADER
:
661 v
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_variable_vtbl
;
664 case D3D10_SVT_BLEND
:
665 v
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_blend_variable_vtbl
;
668 case D3D10_SVT_RASTERIZER
:
669 v
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_rasterizer_variable_vtbl
;
672 case D3D10_SVT_SAMPLER
:
673 v
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_sampler_variable_vtbl
;
677 FIXME("Unhandled basetype %s.\n", debug_d3d10_shader_variable_type(v
->type
->basetype
));
678 v
->vtbl
= &d3d10_effect_variable_vtbl
;
684 FIXME("Unhandled type class %s.\n", debug_d3d10_shader_variable_class(v
->type
->type_class
));
685 v
->vtbl
= &d3d10_effect_variable_vtbl
;
690 static HRESULT
copy_variableinfo_from_type(struct d3d10_effect_variable
*v
)
695 if (v
->type
->member_count
)
697 v
->members
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, v
->type
->member_count
* sizeof(*v
->members
));
700 ERR("Failed to allocate members memory.\n");
701 return E_OUTOFMEMORY
;
704 for (i
= 0; i
< v
->type
->member_count
; ++i
)
706 struct d3d10_effect_variable
*var
= &v
->members
[i
];
707 struct d3d10_effect_type_member
*typem
= &v
->type
->members
[i
];
709 var
->buffer
= v
->buffer
;
710 var
->effect
= v
->effect
;
711 var
->type
= typem
->type
;
712 set_variable_vtbl(var
);
714 if (!copy_name(typem
->name
, &var
->name
))
716 ERR("Failed to copy name.\n");
717 return E_OUTOFMEMORY
;
719 TRACE("Variable name: %s.\n", debugstr_a(var
->name
));
721 if (!copy_name(typem
->semantic
, &var
->semantic
))
723 ERR("Failed to copy name.\n");
724 return E_OUTOFMEMORY
;
726 TRACE("Variable semantic: %s.\n", debugstr_a(var
->semantic
));
728 var
->buffer_offset
= v
->buffer_offset
+ typem
->buffer_offset
;
729 TRACE("Variable buffer offset: %u.\n", var
->buffer_offset
);
731 hr
= copy_variableinfo_from_type(var
);
732 if (FAILED(hr
)) return hr
;
736 if (v
->type
->element_count
)
738 unsigned int bufferoffset
= v
->buffer_offset
;
740 v
->elements
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, v
->type
->element_count
* sizeof(*v
->elements
));
743 ERR("Failed to allocate elements memory.\n");
744 return E_OUTOFMEMORY
;
747 for (i
= 0; i
< v
->type
->element_count
; ++i
)
749 struct d3d10_effect_variable
*var
= &v
->elements
[i
];
751 var
->buffer
= v
->buffer
;
752 var
->effect
= v
->effect
;
753 var
->type
= v
->type
->elementtype
;
754 set_variable_vtbl(var
);
756 if (!copy_name(v
->name
, &var
->name
))
758 ERR("Failed to copy name.\n");
759 return E_OUTOFMEMORY
;
761 TRACE("Variable name: %s.\n", debugstr_a(var
->name
));
763 if (!copy_name(v
->semantic
, &var
->semantic
))
765 ERR("Failed to copy name.\n");
766 return E_OUTOFMEMORY
;
768 TRACE("Variable semantic: %s.\n", debugstr_a(var
->semantic
));
772 bufferoffset
+= v
->type
->stride
;
774 var
->buffer_offset
= bufferoffset
;
775 TRACE("Variable buffer offset: %u.\n", var
->buffer_offset
);
777 hr
= copy_variableinfo_from_type(var
);
778 if (FAILED(hr
)) return hr
;
785 static HRESULT
parse_fx10_variable_head(struct d3d10_effect_variable
*v
, const char **ptr
, const char *data
)
789 read_dword(ptr
, &offset
);
790 TRACE("Variable name at offset %#x.\n", offset
);
792 if (!copy_name(data
+ offset
, &v
->name
))
794 ERR("Failed to copy name.\n");
795 return E_OUTOFMEMORY
;
797 TRACE("Variable name: %s.\n", debugstr_a(v
->name
));
799 read_dword(ptr
, &offset
);
800 TRACE("Variable type info at offset %#x.\n", offset
);
802 v
->type
= get_fx10_type(v
->effect
, data
, offset
);
805 ERR("Failed to get variable type.\n");
808 set_variable_vtbl(v
);
810 return copy_variableinfo_from_type(v
);
813 static HRESULT
parse_fx10_annotation(struct d3d10_effect_variable
*a
, const char **ptr
, const char *data
)
817 hr
= parse_fx10_variable_head(a
, ptr
, data
);
818 if (FAILED(hr
)) return hr
;
820 skip_dword_unknown(ptr
, 1);
822 /* mark the variable as annotation */
823 a
->flag
= D3D10_EFFECT_VARIABLE_ANNOTATION
;
828 static HRESULT
parse_fx10_anonymous_shader(struct d3d10_effect
*e
, struct d3d10_effect_anonymous_shader
*s
,
829 enum d3d10_effect_object_type otype
)
831 struct d3d10_effect_variable
*v
= &s
->shader
;
832 struct d3d10_effect_type
*t
= &s
->type
;
833 const char *shader
= NULL
;
837 case D3D10_EOT_VERTEXSHADER
:
838 shader
= "vertexshader";
839 t
->basetype
= D3D10_SVT_VERTEXSHADER
;
842 case D3D10_EOT_PIXELSHADER
:
843 shader
= "pixelshader";
844 t
->basetype
= D3D10_SVT_PIXELSHADER
;
847 case D3D10_EOT_GEOMETRYSHADER
:
848 shader
= "geometryshader";
849 t
->basetype
= D3D10_SVT_GEOMETRYSHADER
;
853 if (!copy_name(shader
, &t
->name
))
855 ERR("Failed to copy name.\n");
856 return E_OUTOFMEMORY
;
858 TRACE("Type name: %s.\n", debugstr_a(t
->name
));
860 t
->type_class
= D3D10_SVC_OBJECT
;
862 t
->vtbl
= &d3d10_effect_type_vtbl
;
866 set_variable_vtbl(v
);
868 if (!copy_name("$Anonymous", &v
->name
))
870 ERR("Failed to copy semantic.\n");
871 return E_OUTOFMEMORY
;
873 TRACE("Variable name: %s.\n", debugstr_a(v
->name
));
875 if (!copy_name(NULL
, &v
->semantic
))
877 ERR("Failed to copy semantic.\n");
878 return E_OUTOFMEMORY
;
880 TRACE("Variable semantic: %s.\n", debugstr_a(v
->semantic
));
885 static HRESULT
parse_fx10_object(struct d3d10_effect_object
*o
, const char **ptr
, const char *data
)
887 const char *data_ptr
= NULL
;
889 enum d3d10_effect_object_operation operation
;
891 struct d3d10_effect
*effect
= o
->pass
->technique
->effect
;
893 read_dword(ptr
, &o
->type
);
894 TRACE("Effect object is of type %#x.\n", o
->type
);
896 read_dword(ptr
, &index
);
897 TRACE("Effect object index %#x.\n", index
);
899 read_dword(ptr
, &operation
);
900 TRACE("Effect object operation %#x.\n", operation
);
902 read_dword(ptr
, &offset
);
903 TRACE("Effect object idx is at offset %#x.\n", offset
);
907 /* FIXME: This probably isn't completely correct. */
908 case D3D10_EOO_VALUE
:
909 FIXME("Copy variable value\n");
913 case D3D10_EOO_ANONYMOUS_SHADER
:
914 TRACE("Anonymous shader\n");
916 /* check anonymous_shader_current for validity */
917 if (effect
->anonymous_shader_current
>= effect
->anonymous_shader_count
)
919 ERR("Anonymous shader count is wrong!\n");
923 data_ptr
= data
+ offset
;
924 read_dword(&data_ptr
, &offset
);
925 TRACE("Effect object starts at offset %#x.\n", offset
);
927 data_ptr
= data
+ offset
;
929 hr
= parse_fx10_anonymous_shader(effect
, &effect
->anonymous_shaders
[effect
->anonymous_shader_current
], o
->type
);
930 if (FAILED(hr
)) return hr
;
932 o
->data
= &effect
->anonymous_shaders
[effect
->anonymous_shader_current
].shader
;
933 ++effect
->anonymous_shader_current
;
937 case D3D10_EOT_VERTEXSHADER
:
938 TRACE("Vertex shader\n");
939 hr
= parse_shader(o
->data
, data_ptr
);
942 case D3D10_EOT_PIXELSHADER
:
943 TRACE("Pixel shader\n");
944 hr
= parse_shader(o
->data
, data_ptr
);
947 case D3D10_EOT_GEOMETRYSHADER
:
948 TRACE("Geometry shader\n");
949 hr
= parse_shader(o
->data
, data_ptr
);
953 FIXME("Unhandled object type %#x\n", o
->type
);
961 FIXME("Unhandled operation %#x.\n", operation
);
968 static HRESULT
parse_fx10_pass(struct d3d10_effect_pass
*p
, const char **ptr
, const char *data
)
974 read_dword(ptr
, &offset
);
975 TRACE("Pass name at offset %#x.\n", offset
);
977 if (!copy_name(data
+ offset
, &p
->name
))
979 ERR("Failed to copy name.\n");
980 return E_OUTOFMEMORY
;
982 TRACE("Pass name: %s.\n", debugstr_a(p
->name
));
984 read_dword(ptr
, &p
->object_count
);
985 TRACE("Pass has %u effect objects.\n", p
->object_count
);
987 read_dword(ptr
, &p
->annotation_count
);
988 TRACE("Pass has %u annotations.\n", p
->annotation_count
);
990 p
->annotations
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, p
->annotation_count
* sizeof(*p
->annotations
));
993 ERR("Failed to allocate pass annotations memory.\n");
994 return E_OUTOFMEMORY
;
997 for (i
= 0; i
< p
->annotation_count
; ++i
)
999 struct d3d10_effect_variable
*a
= &p
->annotations
[i
];
1001 a
->effect
= p
->technique
->effect
;
1002 a
->buffer
= &null_local_buffer
;
1004 hr
= parse_fx10_annotation(a
, ptr
, data
);
1005 if (FAILED(hr
)) return hr
;
1008 p
->objects
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, p
->object_count
* sizeof(*p
->objects
));
1011 ERR("Failed to allocate effect objects memory.\n");
1012 return E_OUTOFMEMORY
;
1015 for (i
= 0; i
< p
->object_count
; ++i
)
1017 struct d3d10_effect_object
*o
= &p
->objects
[i
];
1021 hr
= parse_fx10_object(o
, ptr
, data
);
1022 if (FAILED(hr
)) return hr
;
1028 static HRESULT
parse_fx10_technique(struct d3d10_effect_technique
*t
, const char **ptr
, const char *data
)
1034 read_dword(ptr
, &offset
);
1035 TRACE("Technique name at offset %#x.\n", offset
);
1037 if (!copy_name(data
+ offset
, &t
->name
))
1039 ERR("Failed to copy name.\n");
1040 return E_OUTOFMEMORY
;
1042 TRACE("Technique name: %s.\n", debugstr_a(t
->name
));
1044 read_dword(ptr
, &t
->pass_count
);
1045 TRACE("Technique has %u passes\n", t
->pass_count
);
1047 read_dword(ptr
, &t
->annotation_count
);
1048 TRACE("Technique has %u annotations.\n", t
->annotation_count
);
1050 t
->annotations
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, t
->annotation_count
* sizeof(*t
->annotations
));
1051 if (!t
->annotations
)
1053 ERR("Failed to allocate technique annotations memory.\n");
1054 return E_OUTOFMEMORY
;
1057 for (i
= 0; i
< t
->annotation_count
; ++i
)
1059 struct d3d10_effect_variable
*a
= &t
->annotations
[i
];
1061 a
->effect
= t
->effect
;
1062 a
->buffer
= &null_local_buffer
;
1064 hr
= parse_fx10_annotation(a
, ptr
, data
);
1065 if (FAILED(hr
)) return hr
;
1068 t
->passes
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, t
->pass_count
* sizeof(*t
->passes
));
1071 ERR("Failed to allocate passes memory\n");
1072 return E_OUTOFMEMORY
;
1075 for (i
= 0; i
< t
->pass_count
; ++i
)
1077 struct d3d10_effect_pass
*p
= &t
->passes
[i
];
1079 p
->vtbl
= &d3d10_effect_pass_vtbl
;
1082 hr
= parse_fx10_pass(p
, ptr
, data
);
1083 if (FAILED(hr
)) return hr
;
1089 static HRESULT
parse_fx10_variable(struct d3d10_effect_variable
*v
, const char **ptr
, const char *data
)
1095 hr
= parse_fx10_variable_head(v
, ptr
, data
);
1096 if (FAILED(hr
)) return hr
;
1098 read_dword(ptr
, &offset
);
1099 TRACE("Variable semantic at offset %#x.\n", offset
);
1101 if (!copy_name(data
+ offset
, &v
->semantic
))
1103 ERR("Failed to copy semantic.\n");
1104 return E_OUTOFMEMORY
;
1106 TRACE("Variable semantic: %s.\n", debugstr_a(v
->semantic
));
1108 read_dword(ptr
, &v
->buffer_offset
);
1109 TRACE("Variable offset in buffer: %#x.\n", v
->buffer_offset
);
1111 skip_dword_unknown(ptr
, 1);
1113 read_dword(ptr
, &v
->flag
);
1114 TRACE("Variable flag: %#x.\n", v
->flag
);
1116 read_dword(ptr
, &v
->annotation_count
);
1117 TRACE("Variable has %u annotations.\n", v
->annotation_count
);
1119 v
->annotations
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, v
->annotation_count
* sizeof(*v
->annotations
));
1120 if (!v
->annotations
)
1122 ERR("Failed to allocate variable annotations memory.\n");
1123 return E_OUTOFMEMORY
;
1126 for (i
= 0; i
< v
->annotation_count
; ++i
)
1128 struct d3d10_effect_variable
*a
= &v
->annotations
[i
];
1130 a
->effect
= v
->effect
;
1131 a
->buffer
= &null_local_buffer
;
1133 hr
= parse_fx10_annotation(a
, ptr
, data
);
1134 if (FAILED(hr
)) return hr
;
1140 static HRESULT
parse_fx10_local_variable(struct d3d10_effect_variable
*v
, const char **ptr
, const char *data
)
1145 hr
= parse_fx10_variable_head(v
, ptr
, data
);
1146 if (FAILED(hr
)) return hr
;
1148 skip_dword_unknown(ptr
, 2);
1150 switch (v
->type
->basetype
)
1152 case D3D10_SVT_TEXTURE1D
:
1153 case D3D10_SVT_TEXTURE1DARRAY
:
1154 case D3D10_SVT_TEXTURE2D
:
1155 case D3D10_SVT_TEXTURE2DARRAY
:
1156 case D3D10_SVT_TEXTURE2DMS
:
1157 case D3D10_SVT_TEXTURE2DMSARRAY
:
1158 case D3D10_SVT_TEXTURE3D
:
1159 case D3D10_SVT_TEXTURECUBE
:
1160 case D3D10_SVT_RENDERTARGETVIEW
:
1161 case D3D10_SVT_DEPTHSTENCILVIEW
:
1162 TRACE("SVT could not have elements.\n");
1165 case D3D10_SVT_VERTEXSHADER
:
1166 case D3D10_SVT_PIXELSHADER
:
1167 case D3D10_SVT_GEOMETRYSHADER
:
1168 TRACE("SVT is a shader.\n");
1169 for (i
= 0; i
< max(v
->type
->element_count
, 1); ++i
)
1171 DWORD shader_offset
;
1174 * TODO: Parse the shader
1176 read_dword(ptr
, &shader_offset
);
1177 FIXME("Shader offset: %#x.\n", shader_offset
);
1181 case D3D10_SVT_DEPTHSTENCIL
:
1182 case D3D10_SVT_BLEND
:
1183 case D3D10_SVT_RASTERIZER
:
1184 case D3D10_SVT_SAMPLER
:
1185 TRACE("SVT is a state.\n");
1186 for (i
= 0; i
< max(v
->type
->element_count
, 1); ++i
)
1191 read_dword(ptr
, &object_count
);
1192 TRACE("Object count: %#x.\n", object_count
);
1194 for (j
= 0; j
< object_count
; ++j
)
1196 skip_dword_unknown(ptr
, 4);
1202 FIXME("Unhandled case %s.\n", debug_d3d10_shader_variable_type(v
->type
->basetype
));
1206 read_dword(ptr
, &v
->annotation_count
);
1207 TRACE("Variable has %u annotations.\n", v
->annotation_count
);
1209 v
->annotations
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, v
->annotation_count
* sizeof(*v
->annotations
));
1210 if (!v
->annotations
)
1212 ERR("Failed to allocate variable annotations memory.\n");
1213 return E_OUTOFMEMORY
;
1216 for (i
= 0; i
< v
->annotation_count
; ++i
)
1218 struct d3d10_effect_variable
*a
= &v
->annotations
[i
];
1220 a
->effect
= v
->effect
;
1221 a
->buffer
= &null_local_buffer
;
1223 hr
= parse_fx10_annotation(a
, ptr
, data
);
1224 if (FAILED(hr
)) return hr
;
1230 static HRESULT
parse_fx10_local_buffer(struct d3d10_effect_variable
*l
, const char **ptr
, const char *data
)
1234 D3D10_CBUFFER_TYPE d3d10_cbuffer_type
;
1236 unsigned int stride
= 0;
1238 /* Generate our own type, it isn't in the fx blob. */
1239 l
->type
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(*l
->type
));
1242 ERR("Failed to allocate local buffer type memory.\n");
1243 return E_OUTOFMEMORY
;
1245 l
->type
->vtbl
= &d3d10_effect_type_vtbl
;
1246 l
->type
->type_class
= D3D10_SVC_OBJECT
;
1247 l
->type
->effect
= l
->effect
;
1249 read_dword(ptr
, &offset
);
1250 TRACE("Local buffer name at offset %#x.\n", offset
);
1252 if (!copy_name(data
+ offset
, &l
->name
))
1254 ERR("Failed to copy name.\n");
1255 return E_OUTOFMEMORY
;
1257 TRACE("Local buffer name: %s.\n", debugstr_a(l
->name
));
1259 read_dword(ptr
, &l
->data_size
);
1260 TRACE("Local buffer data size: %#x.\n", l
->data_size
);
1262 read_dword(ptr
, &d3d10_cbuffer_type
);
1263 TRACE("Local buffer type: %#x.\n", d3d10_cbuffer_type
);
1265 switch(d3d10_cbuffer_type
)
1267 case D3D10_CT_CBUFFER
:
1268 l
->type
->basetype
= D3D10_SVT_CBUFFER
;
1269 if (!copy_name("cbuffer", &l
->type
->name
))
1271 ERR("Failed to copy name.\n");
1272 return E_OUTOFMEMORY
;
1276 case D3D10_CT_TBUFFER
:
1277 l
->type
->basetype
= D3D10_SVT_TBUFFER
;
1278 if (!copy_name("tbuffer", &l
->type
->name
))
1280 ERR("Failed to copy name.\n");
1281 return E_OUTOFMEMORY
;
1286 ERR("Unexpected D3D10_CBUFFER_TYPE %#x!\n", d3d10_cbuffer_type
);
1290 read_dword(ptr
, &l
->type
->member_count
);
1291 TRACE("Local buffer member count: %#x.\n", l
->type
->member_count
);
1293 skip_dword_unknown(ptr
, 1);
1295 read_dword(ptr
, &l
->annotation_count
);
1296 TRACE("Local buffer has %u annotations.\n", l
->annotation_count
);
1298 l
->annotations
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, l
->annotation_count
* sizeof(*l
->annotations
));
1299 if (!l
->annotations
)
1301 ERR("Failed to allocate local buffer annotations memory.\n");
1302 return E_OUTOFMEMORY
;
1305 for (i
= 0; i
< l
->annotation_count
; ++i
)
1307 struct d3d10_effect_variable
*a
= &l
->annotations
[i
];
1309 a
->effect
= l
->effect
;
1310 a
->buffer
= &null_local_buffer
;
1312 hr
= parse_fx10_annotation(a
, ptr
, data
);
1313 if (FAILED(hr
)) return hr
;
1316 l
->members
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, l
->type
->member_count
* sizeof(*l
->members
));
1319 ERR("Failed to allocate members memory.\n");
1320 return E_OUTOFMEMORY
;
1323 l
->type
->members
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, l
->type
->member_count
* sizeof(*l
->type
->members
));
1324 if (!l
->type
->members
)
1326 ERR("Failed to allocate type members memory.\n");
1327 return E_OUTOFMEMORY
;
1330 for (i
= 0; i
< l
->type
->member_count
; ++i
)
1332 struct d3d10_effect_variable
*v
= &l
->members
[i
];
1333 struct d3d10_effect_type_member
*typem
= &l
->type
->members
[i
];
1336 v
->effect
= l
->effect
;
1338 hr
= parse_fx10_variable(v
, ptr
, data
);
1339 if (FAILED(hr
)) return hr
;
1342 * Copy the values from the variable type to the constant buffers type
1343 * members structure, because it is our own generated type.
1345 typem
->type
= v
->type
;
1347 if (!copy_name(v
->name
, &typem
->name
))
1349 ERR("Failed to copy name.\n");
1350 return E_OUTOFMEMORY
;
1352 TRACE("Variable name: %s.\n", debugstr_a(typem
->name
));
1354 if (!copy_name(v
->semantic
, &typem
->semantic
))
1356 ERR("Failed to copy name.\n");
1357 return E_OUTOFMEMORY
;
1359 TRACE("Variable semantic: %s.\n", debugstr_a(typem
->semantic
));
1361 typem
->buffer_offset
= v
->buffer_offset
;
1362 TRACE("Variable buffer offset: %u.\n", typem
->buffer_offset
);
1364 l
->type
->size_packed
+= v
->type
->size_packed
;
1367 * For the complete constantbuffer the size_unpacked = stride,
1368 * the stride is calculated like this:
1370 * 1) if the constant buffer variables are packed with packoffset
1371 * - stride = the highest used constant
1372 * - the complete stride has to be a multiple of 0x10
1374 * 2) if the constant buffer variables are NOT packed with packoffset
1375 * - sum of unpacked size for all variables which fit in a 0x10 part
1376 * - if the size exceeds a 0x10 part, the rest of the old part is skipped
1377 * and a new part is started
1378 * - if the variable is a struct it is always used a new part
1379 * - the complete stride has to be a multiple of 0x10
1382 * 0x4, 0x4, 0x4, 0x8, 0x4, 0x14, 0x4
1383 * part 0x10 0x10 0x20 -> 0x40
1385 if (v
->flag
& D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT
)
1387 if ((v
->type
->size_unpacked
+ v
->buffer_offset
) > stride
)
1389 stride
= v
->type
->size_unpacked
+ v
->buffer_offset
;
1394 if (v
->type
->type_class
== D3D10_SVC_STRUCT
)
1396 stride
= (stride
+ 0xf) & ~0xf;
1399 if ( ((stride
& 0xf) + v
->type
->size_unpacked
) > 0x10)
1401 stride
= (stride
+ 0xf) & ~0xf;
1404 stride
+= v
->type
->size_unpacked
;
1407 l
->type
->stride
= l
->type
->size_unpacked
= (stride
+ 0xf) & ~0xf;
1409 TRACE("Constant buffer:\n");
1410 TRACE("\tType name: %s.\n", debugstr_a(l
->type
->name
));
1411 TRACE("\tElement count: %u.\n", l
->type
->element_count
);
1412 TRACE("\tMember count: %u.\n", l
->type
->member_count
);
1413 TRACE("\tUnpacked size: %#x.\n", l
->type
->size_unpacked
);
1414 TRACE("\tStride: %#x.\n", l
->type
->stride
);
1415 TRACE("\tPacked size %#x.\n", l
->type
->size_packed
);
1416 TRACE("\tBasetype: %s.\n", debug_d3d10_shader_variable_type(l
->type
->basetype
));
1417 TRACE("\tTypeclass: %s.\n", debug_d3d10_shader_variable_class(l
->type
->type_class
));
1422 static int d3d10_effect_type_compare(const void *key
, const struct wine_rb_entry
*entry
)
1424 const struct d3d10_effect_type
*t
= WINE_RB_ENTRY_VALUE(entry
, const struct d3d10_effect_type
, entry
);
1425 const DWORD
*id
= key
;
1430 static void d3d10_effect_type_member_destroy(struct d3d10_effect_type_member
*typem
)
1432 TRACE("effect type member %p.\n", typem
);
1434 /* Do not release typem->type, it will be covered by d3d10_effect_type_destroy(). */
1435 HeapFree(GetProcessHeap(), 0, typem
->semantic
);
1436 HeapFree(GetProcessHeap(), 0, typem
->name
);
1439 static void d3d10_effect_type_destroy(struct wine_rb_entry
*entry
, void *context
)
1441 struct d3d10_effect_type
*t
= WINE_RB_ENTRY_VALUE(entry
, struct d3d10_effect_type
, entry
);
1443 TRACE("effect type %p.\n", t
);
1447 HeapFree(GetProcessHeap(), 0, t
->elementtype
->name
);
1448 HeapFree(GetProcessHeap(), 0, t
->elementtype
);
1455 for (i
= 0; i
< t
->member_count
; ++i
)
1457 d3d10_effect_type_member_destroy(&t
->members
[i
]);
1459 HeapFree(GetProcessHeap(), 0, t
->members
);
1462 HeapFree(GetProcessHeap(), 0, t
->name
);
1463 HeapFree(GetProcessHeap(), 0, t
);
1466 static const struct wine_rb_functions d3d10_effect_type_rb_functions
=
1471 d3d10_effect_type_compare
,
1474 static HRESULT
parse_fx10_body(struct d3d10_effect
*e
, const char *data
, DWORD data_size
)
1476 const char *ptr
= data
+ e
->index_offset
;
1480 if (wine_rb_init(&e
->types
, &d3d10_effect_type_rb_functions
) == -1)
1482 ERR("Failed to initialize type rbtree.\n");
1486 e
->local_buffers
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, e
->local_buffer_count
* sizeof(*e
->local_buffers
));
1487 if (!e
->local_buffers
)
1489 ERR("Failed to allocate local buffer memory.\n");
1490 return E_OUTOFMEMORY
;
1493 e
->local_variables
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, e
->local_variable_count
* sizeof(*e
->local_variables
));
1494 if (!e
->local_variables
)
1496 ERR("Failed to allocate local variable memory.\n");
1497 return E_OUTOFMEMORY
;
1500 e
->anonymous_shaders
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, e
->anonymous_shader_count
* sizeof(*e
->anonymous_shaders
));
1501 if (!e
->anonymous_shaders
)
1503 ERR("Failed to allocate techniques memory\n");
1504 return E_OUTOFMEMORY
;
1507 e
->techniques
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, e
->technique_count
* sizeof(*e
->techniques
));
1510 ERR("Failed to allocate techniques memory\n");
1511 return E_OUTOFMEMORY
;
1514 for (i
= 0; i
< e
->local_buffer_count
; ++i
)
1516 struct d3d10_effect_variable
*l
= &e
->local_buffers
[i
];
1517 l
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_constant_buffer_vtbl
;
1519 l
->buffer
= &null_local_buffer
;
1521 hr
= parse_fx10_local_buffer(l
, &ptr
, data
);
1522 if (FAILED(hr
)) return hr
;
1525 for (i
= 0; i
< e
->local_variable_count
; ++i
)
1527 struct d3d10_effect_variable
*v
= &e
->local_variables
[i
];
1530 v
->vtbl
= &d3d10_effect_variable_vtbl
;
1531 v
->buffer
= &null_local_buffer
;
1533 hr
= parse_fx10_local_variable(v
, &ptr
, data
);
1534 if (FAILED(hr
)) return hr
;
1537 for (i
= 0; i
< e
->technique_count
; ++i
)
1539 struct d3d10_effect_technique
*t
= &e
->techniques
[i
];
1541 t
->vtbl
= &d3d10_effect_technique_vtbl
;
1544 hr
= parse_fx10_technique(t
, &ptr
, data
);
1545 if (FAILED(hr
)) return hr
;
1551 static HRESULT
parse_fx10(struct d3d10_effect
*e
, const char *data
, DWORD data_size
)
1553 const char *ptr
= data
;
1556 /* Compiled target version (e.g. fx_4_0=0xfeff1001, fx_4_1=0xfeff1011). */
1557 read_dword(&ptr
, &e
->version
);
1558 TRACE("Target: %#x\n", e
->version
);
1560 read_dword(&ptr
, &e
->local_buffer_count
);
1561 TRACE("Local buffer count: %u.\n", e
->local_buffer_count
);
1563 read_dword(&ptr
, &e
->variable_count
);
1564 TRACE("Variable count: %u\n", e
->variable_count
);
1566 read_dword(&ptr
, &e
->local_variable_count
);
1567 TRACE("Object count: %u\n", e
->local_variable_count
);
1569 read_dword(&ptr
, &e
->sharedbuffers_count
);
1570 TRACE("Sharedbuffers count: %u\n", e
->sharedbuffers_count
);
1572 /* Number of variables in shared buffers? */
1573 read_dword(&ptr
, &unknown
);
1574 FIXME("Unknown 0: %u\n", unknown
);
1576 read_dword(&ptr
, &e
->sharedobjects_count
);
1577 TRACE("Sharedobjects count: %u\n", e
->sharedobjects_count
);
1579 read_dword(&ptr
, &e
->technique_count
);
1580 TRACE("Technique count: %u\n", e
->technique_count
);
1582 read_dword(&ptr
, &e
->index_offset
);
1583 TRACE("Index offset: %#x\n", e
->index_offset
);
1585 read_dword(&ptr
, &unknown
);
1586 FIXME("Unknown 1: %u\n", unknown
);
1588 read_dword(&ptr
, &e
->texture_count
);
1589 TRACE("Texture count: %u\n", e
->texture_count
);
1591 read_dword(&ptr
, &e
->dephstencilstate_count
);
1592 TRACE("Depthstencilstate count: %u\n", e
->dephstencilstate_count
);
1594 read_dword(&ptr
, &e
->blendstate_count
);
1595 TRACE("Blendstate count: %u\n", e
->blendstate_count
);
1597 read_dword(&ptr
, &e
->rasterizerstate_count
);
1598 TRACE("Rasterizerstate count: %u\n", e
->rasterizerstate_count
);
1600 read_dword(&ptr
, &e
->samplerstate_count
);
1601 TRACE("Samplerstate count: %u\n", e
->samplerstate_count
);
1603 read_dword(&ptr
, &e
->rendertargetview_count
);
1604 TRACE("Rendertargetview count: %u\n", e
->rendertargetview_count
);
1606 read_dword(&ptr
, &e
->depthstencilview_count
);
1607 TRACE("Depthstencilview count: %u\n", e
->depthstencilview_count
);
1609 read_dword(&ptr
, &e
->shader_call_count
);
1610 TRACE("Shader call count: %u\n", e
->shader_call_count
);
1612 read_dword(&ptr
, &e
->anonymous_shader_count
);
1613 TRACE("Anonymous shader count: %u\n", e
->anonymous_shader_count
);
1615 return parse_fx10_body(e
, ptr
, data_size
- (ptr
- data
));
1618 static HRESULT
fx10_chunk_handler(const char *data
, DWORD data_size
, DWORD tag
, void *ctx
)
1620 struct d3d10_effect
*e
= ctx
;
1622 TRACE("tag: %s.\n", debugstr_an((const char *)&tag
, 4));
1624 TRACE("chunk size: %#x\n", data_size
);
1629 return parse_fx10(e
, data
, data_size
);
1632 FIXME("Unhandled chunk %s.\n", debugstr_an((const char *)&tag
, 4));
1637 HRESULT
d3d10_effect_parse(struct d3d10_effect
*This
, const void *data
, SIZE_T data_size
)
1639 return parse_dxbc(data
, data_size
, fx10_chunk_handler
, This
);
1642 static HRESULT
d3d10_effect_object_apply(struct d3d10_effect_object
*o
)
1644 ID3D10Device
*device
= o
->pass
->technique
->effect
->device
;
1645 struct d3d10_effect_variable
*v
= (struct d3d10_effect_variable
*) o
->data
;
1647 TRACE("effect object %p, type %#x.\n", o
, o
->type
);
1651 case D3D10_EOT_VERTEXSHADER
:
1652 ID3D10Device_VSSetShader(device
, ((struct d3d10_effect_shader_variable
*)v
->data
)->shader
.vs
);
1655 case D3D10_EOT_PIXELSHADER
:
1656 ID3D10Device_PSSetShader(device
, ((struct d3d10_effect_shader_variable
*)v
->data
)->shader
.ps
);
1659 case D3D10_EOT_GEOMETRYSHADER
:
1660 ID3D10Device_GSSetShader(device
, ((struct d3d10_effect_shader_variable
*)v
->data
)->shader
.gs
);
1664 FIXME("Unhandled effect object type %#x.\n", o
->type
);
1669 static void d3d10_effect_variable_destroy(struct d3d10_effect_variable
*v
)
1673 TRACE("variable %p.\n", v
);
1675 HeapFree(GetProcessHeap(), 0, v
->name
);
1676 HeapFree(GetProcessHeap(), 0, v
->semantic
);
1679 for (i
= 0; i
< v
->annotation_count
; ++i
)
1681 d3d10_effect_variable_destroy(&v
->annotations
[i
]);
1683 HeapFree(GetProcessHeap(), 0, v
->annotations
);
1688 for (i
= 0; i
< v
->type
->member_count
; ++i
)
1690 d3d10_effect_variable_destroy(&v
->members
[i
]);
1692 HeapFree(GetProcessHeap(), 0, v
->members
);
1697 for (i
= 0; i
< v
->type
->element_count
; ++i
)
1699 d3d10_effect_variable_destroy(&v
->elements
[i
]);
1701 HeapFree(GetProcessHeap(), 0, v
->elements
);
1706 switch(v
->type
->basetype
)
1708 case D3D10_SVT_VERTEXSHADER
:
1709 case D3D10_SVT_PIXELSHADER
:
1710 case D3D10_SVT_GEOMETRYSHADER
:
1711 HeapFree(GetProcessHeap(), 0, ((struct d3d10_effect_shader_variable
*)v
->data
)->input_signature
);
1717 HeapFree(GetProcessHeap(), 0, v
->data
);
1721 static void d3d10_effect_pass_destroy(struct d3d10_effect_pass
*p
)
1725 TRACE("pass %p\n", p
);
1727 HeapFree(GetProcessHeap(), 0, p
->name
);
1728 HeapFree(GetProcessHeap(), 0, p
->objects
);
1732 for (i
= 0; i
< p
->annotation_count
; ++i
)
1734 d3d10_effect_variable_destroy(&p
->annotations
[i
]);
1736 HeapFree(GetProcessHeap(), 0, p
->annotations
);
1740 static void d3d10_effect_technique_destroy(struct d3d10_effect_technique
*t
)
1744 TRACE("technique %p\n", t
);
1746 HeapFree(GetProcessHeap(), 0, t
->name
);
1749 for (i
= 0; i
< t
->pass_count
; ++i
)
1751 d3d10_effect_pass_destroy(&t
->passes
[i
]);
1753 HeapFree(GetProcessHeap(), 0, t
->passes
);
1758 for (i
= 0; i
< t
->annotation_count
; ++i
)
1760 d3d10_effect_variable_destroy(&t
->annotations
[i
]);
1762 HeapFree(GetProcessHeap(), 0, t
->annotations
);
1766 static void d3d10_effect_local_buffer_destroy(struct d3d10_effect_variable
*l
)
1770 TRACE("local buffer %p.\n", l
);
1772 HeapFree(GetProcessHeap(), 0, l
->name
);
1775 for (i
= 0; i
< l
->type
->member_count
; ++i
)
1777 d3d10_effect_variable_destroy(&l
->members
[i
]);
1779 HeapFree(GetProcessHeap(), 0, l
->members
);
1782 if (l
->type
->members
)
1784 for (i
= 0; i
< l
->type
->member_count
; ++i
)
1786 /* Do not release l->type->members[i].type, it will be covered by d3d10_effect_type_destroy(). */
1787 HeapFree(GetProcessHeap(), 0, l
->type
->members
[i
].semantic
);
1788 HeapFree(GetProcessHeap(), 0, l
->type
->members
[i
].name
);
1790 HeapFree(GetProcessHeap(), 0, l
->type
->members
);
1792 HeapFree(GetProcessHeap(), 0, l
->type
->name
);
1793 HeapFree(GetProcessHeap(), 0, l
->type
);
1797 for (i
= 0; i
< l
->annotation_count
; ++i
)
1799 d3d10_effect_variable_destroy(&l
->annotations
[i
]);
1801 HeapFree(GetProcessHeap(), 0, l
->annotations
);
1805 /* IUnknown methods */
1807 static HRESULT STDMETHODCALLTYPE
d3d10_effect_QueryInterface(ID3D10Effect
*iface
, REFIID riid
, void **object
)
1809 TRACE("iface %p, riid %s, object %p\n", iface
, debugstr_guid(riid
), object
);
1811 if (IsEqualGUID(riid
, &IID_ID3D10Effect
)
1812 || IsEqualGUID(riid
, &IID_IUnknown
))
1814 IUnknown_AddRef(iface
);
1819 WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid
));
1822 return E_NOINTERFACE
;
1825 static ULONG STDMETHODCALLTYPE
d3d10_effect_AddRef(ID3D10Effect
*iface
)
1827 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
1828 ULONG refcount
= InterlockedIncrement(&This
->refcount
);
1830 TRACE("%p increasing refcount to %u\n", This
, refcount
);
1835 static ULONG STDMETHODCALLTYPE
d3d10_effect_Release(ID3D10Effect
*iface
)
1837 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
1838 ULONG refcount
= InterlockedDecrement(&This
->refcount
);
1840 TRACE("%p decreasing refcount to %u\n", This
, refcount
);
1846 if (This
->techniques
)
1848 for (i
= 0; i
< This
->technique_count
; ++i
)
1850 d3d10_effect_technique_destroy(&This
->techniques
[i
]);
1852 HeapFree(GetProcessHeap(), 0, This
->techniques
);
1855 if (This
->local_variables
)
1857 for (i
= 0; i
< This
->local_variable_count
; ++i
)
1859 d3d10_effect_variable_destroy(&This
->local_variables
[i
]);
1861 HeapFree(GetProcessHeap(), 0, This
->local_variables
);
1864 if (This
->local_buffers
)
1866 for (i
= 0; i
< This
->local_buffer_count
; ++i
)
1868 d3d10_effect_local_buffer_destroy(&This
->local_buffers
[i
]);
1870 HeapFree(GetProcessHeap(), 0, This
->local_buffers
);
1873 if (This
->anonymous_shaders
)
1875 for (i
= 0; i
< This
->anonymous_shader_count
; ++i
)
1877 d3d10_effect_variable_destroy(&This
->anonymous_shaders
[i
].shader
);
1878 HeapFree(GetProcessHeap(), 0, &This
->anonymous_shaders
[i
].type
.name
);
1880 HeapFree(GetProcessHeap(), 0, This
->anonymous_shaders
);
1883 wine_rb_destroy(&This
->types
, d3d10_effect_type_destroy
, NULL
);
1885 ID3D10Device_Release(This
->device
);
1886 HeapFree(GetProcessHeap(), 0, This
);
1892 /* ID3D10Effect methods */
1894 static BOOL STDMETHODCALLTYPE
d3d10_effect_IsValid(ID3D10Effect
*iface
)
1896 FIXME("iface %p stub!\n", iface
);
1901 static BOOL STDMETHODCALLTYPE
d3d10_effect_IsPool(ID3D10Effect
*iface
)
1903 FIXME("iface %p stub!\n", iface
);
1908 static HRESULT STDMETHODCALLTYPE
d3d10_effect_GetDevice(ID3D10Effect
*iface
, ID3D10Device
**device
)
1910 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
1912 TRACE("iface %p, device %p\n", iface
, device
);
1914 ID3D10Device_AddRef(This
->device
);
1915 *device
= This
->device
;
1920 static HRESULT STDMETHODCALLTYPE
d3d10_effect_GetDesc(ID3D10Effect
*iface
, D3D10_EFFECT_DESC
*desc
)
1922 FIXME("iface %p, desc %p stub!\n", iface
, desc
);
1927 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_GetConstantBufferByIndex(ID3D10Effect
*iface
,
1930 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
1931 struct d3d10_effect_variable
*l
;
1933 TRACE("iface %p, index %u\n", iface
, index
);
1935 if (index
>= This
->local_buffer_count
)
1937 WARN("Invalid index specified\n");
1938 return (ID3D10EffectConstantBuffer
*)&null_local_buffer
;
1941 l
= &This
->local_buffers
[index
];
1943 TRACE("Returning buffer %p, %s.\n", l
, debugstr_a(l
->name
));
1945 return (ID3D10EffectConstantBuffer
*)l
;
1948 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_GetConstantBufferByName(ID3D10Effect
*iface
,
1951 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
1954 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
1956 for (i
= 0; i
< This
->local_buffer_count
; ++i
)
1958 struct d3d10_effect_variable
*l
= &This
->local_buffers
[i
];
1960 if (!strcmp(l
->name
, name
))
1962 TRACE("Returning buffer %p.\n", l
);
1963 return (ID3D10EffectConstantBuffer
*)l
;
1967 WARN("Invalid name specified\n");
1969 return (ID3D10EffectConstantBuffer
*)&null_local_buffer
;
1972 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_GetVariableByIndex(ID3D10Effect
*iface
, UINT index
)
1974 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
1977 TRACE("iface %p, index %u\n", iface
, index
);
1979 for (i
= 0; i
< This
->local_buffer_count
; ++i
)
1981 struct d3d10_effect_variable
*l
= &This
->local_buffers
[i
];
1983 if (index
< l
->type
->member_count
)
1985 struct d3d10_effect_variable
*v
= &l
->members
[index
];
1987 TRACE("Returning variable %p.\n", v
);
1988 return (ID3D10EffectVariable
*)v
;
1990 index
-= l
->type
->member_count
;
1993 if (index
< This
->local_variable_count
)
1995 struct d3d10_effect_variable
*v
= &This
->local_variables
[index
];
1997 TRACE("Returning variable %p.\n", v
);
1998 return (ID3D10EffectVariable
*)v
;
2001 WARN("Invalid index specified\n");
2003 return (ID3D10EffectVariable
*)&null_variable
;
2006 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_GetVariableByName(ID3D10Effect
*iface
, LPCSTR name
)
2008 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
2011 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2013 for (i
= 0; i
< This
->local_buffer_count
; ++i
)
2015 struct d3d10_effect_variable
*l
= &This
->local_buffers
[i
];
2018 for (j
= 0; j
< l
->type
->member_count
; ++j
)
2020 struct d3d10_effect_variable
*v
= &l
->members
[j
];
2022 if (!strcmp(v
->name
, name
))
2024 TRACE("Returning variable %p.\n", v
);
2025 return (ID3D10EffectVariable
*)v
;
2030 for (i
= 0; i
< This
->local_variable_count
; ++i
)
2032 struct d3d10_effect_variable
*v
= &This
->local_variables
[i
];
2034 if (!strcmp(v
->name
, name
))
2036 TRACE("Returning variable %p.\n", v
);
2037 return (ID3D10EffectVariable
*)v
;
2041 WARN("Invalid name specified\n");
2043 return (ID3D10EffectVariable
*)&null_variable
;
2046 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_GetVariableBySemantic(ID3D10Effect
*iface
,
2049 FIXME("iface %p, semantic %s stub!\n", iface
, debugstr_a(semantic
));
2054 static struct ID3D10EffectTechnique
* STDMETHODCALLTYPE
d3d10_effect_GetTechniqueByIndex(ID3D10Effect
*iface
,
2057 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
2058 struct d3d10_effect_technique
*t
;
2060 TRACE("iface %p, index %u\n", iface
, index
);
2062 if (index
>= This
->technique_count
)
2064 WARN("Invalid index specified\n");
2065 return (ID3D10EffectTechnique
*)&null_technique
;
2068 t
= &This
->techniques
[index
];
2070 TRACE("Returning technique %p, %s.\n", t
, debugstr_a(t
->name
));
2072 return (ID3D10EffectTechnique
*)t
;
2075 static struct ID3D10EffectTechnique
* STDMETHODCALLTYPE
d3d10_effect_GetTechniqueByName(ID3D10Effect
*iface
,
2078 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
2081 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2083 for (i
= 0; i
< This
->technique_count
; ++i
)
2085 struct d3d10_effect_technique
*t
= &This
->techniques
[i
];
2086 if (!strcmp(t
->name
, name
))
2088 TRACE("Returning technique %p\n", t
);
2089 return (ID3D10EffectTechnique
*)t
;
2093 WARN("Invalid name specified\n");
2095 return (ID3D10EffectTechnique
*)&null_technique
;
2098 static HRESULT STDMETHODCALLTYPE
d3d10_effect_Optimize(ID3D10Effect
*iface
)
2100 FIXME("iface %p stub!\n", iface
);
2105 static BOOL STDMETHODCALLTYPE
d3d10_effect_IsOptimized(ID3D10Effect
*iface
)
2107 FIXME("iface %p stub!\n", iface
);
2112 const struct ID3D10EffectVtbl d3d10_effect_vtbl
=
2114 /* IUnknown methods */
2115 d3d10_effect_QueryInterface
,
2116 d3d10_effect_AddRef
,
2117 d3d10_effect_Release
,
2118 /* ID3D10Effect methods */
2119 d3d10_effect_IsValid
,
2120 d3d10_effect_IsPool
,
2121 d3d10_effect_GetDevice
,
2122 d3d10_effect_GetDesc
,
2123 d3d10_effect_GetConstantBufferByIndex
,
2124 d3d10_effect_GetConstantBufferByName
,
2125 d3d10_effect_GetVariableByIndex
,
2126 d3d10_effect_GetVariableByName
,
2127 d3d10_effect_GetVariableBySemantic
,
2128 d3d10_effect_GetTechniqueByIndex
,
2129 d3d10_effect_GetTechniqueByName
,
2130 d3d10_effect_Optimize
,
2131 d3d10_effect_IsOptimized
,
2134 /* ID3D10EffectTechnique methods */
2136 static BOOL STDMETHODCALLTYPE
d3d10_effect_technique_IsValid(ID3D10EffectTechnique
*iface
)
2138 TRACE("iface %p\n", iface
);
2140 return (struct d3d10_effect_technique
*)iface
!= &null_technique
;
2143 static HRESULT STDMETHODCALLTYPE
d3d10_effect_technique_GetDesc(ID3D10EffectTechnique
*iface
,
2144 D3D10_TECHNIQUE_DESC
*desc
)
2146 struct d3d10_effect_technique
*This
= (struct d3d10_effect_technique
*)iface
;
2148 TRACE("iface %p, desc %p\n", iface
, desc
);
2150 if(This
== &null_technique
)
2152 WARN("Null technique specified\n");
2158 WARN("Invalid argument specified\n");
2159 return E_INVALIDARG
;
2162 desc
->Name
= This
->name
;
2163 desc
->Passes
= This
->pass_count
;
2164 desc
->Annotations
= This
->annotation_count
;
2169 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_technique_GetAnnotationByIndex(
2170 ID3D10EffectTechnique
*iface
, UINT index
)
2172 struct d3d10_effect_technique
*This
= (struct d3d10_effect_technique
*)iface
;
2173 struct d3d10_effect_variable
*a
;
2175 TRACE("iface %p, index %u\n", iface
, index
);
2177 if (index
>= This
->annotation_count
)
2179 WARN("Invalid index specified\n");
2180 return (ID3D10EffectVariable
*)&null_variable
;
2183 a
= &This
->annotations
[index
];
2185 TRACE("Returning annotation %p, %s\n", a
, debugstr_a(a
->name
));
2187 return (ID3D10EffectVariable
*)a
;
2190 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_technique_GetAnnotationByName(
2191 ID3D10EffectTechnique
*iface
, LPCSTR name
)
2193 struct d3d10_effect_technique
*This
= (struct d3d10_effect_technique
*)iface
;
2196 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2198 for (i
= 0; i
< This
->annotation_count
; ++i
)
2200 struct d3d10_effect_variable
*a
= &This
->annotations
[i
];
2201 if (!strcmp(a
->name
, name
))
2203 TRACE("Returning annotation %p\n", a
);
2204 return (ID3D10EffectVariable
*)a
;
2208 WARN("Invalid name specified\n");
2210 return (ID3D10EffectVariable
*)&null_variable
;
2213 static struct ID3D10EffectPass
* STDMETHODCALLTYPE
d3d10_effect_technique_GetPassByIndex(ID3D10EffectTechnique
*iface
,
2216 struct d3d10_effect_technique
*This
= (struct d3d10_effect_technique
*)iface
;
2217 struct d3d10_effect_pass
*p
;
2219 TRACE("iface %p, index %u\n", iface
, index
);
2221 if (index
>= This
->pass_count
)
2223 WARN("Invalid index specified\n");
2224 return (ID3D10EffectPass
*)&null_pass
;
2227 p
= &This
->passes
[index
];
2229 TRACE("Returning pass %p, %s.\n", p
, debugstr_a(p
->name
));
2231 return (ID3D10EffectPass
*)p
;
2234 static struct ID3D10EffectPass
* STDMETHODCALLTYPE
d3d10_effect_technique_GetPassByName(ID3D10EffectTechnique
*iface
,
2237 struct d3d10_effect_technique
*This
= (struct d3d10_effect_technique
*)iface
;
2240 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2242 for (i
= 0; i
< This
->pass_count
; ++i
)
2244 struct d3d10_effect_pass
*p
= &This
->passes
[i
];
2245 if (!strcmp(p
->name
, name
))
2247 TRACE("Returning pass %p\n", p
);
2248 return (ID3D10EffectPass
*)p
;
2252 WARN("Invalid name specified\n");
2254 return (ID3D10EffectPass
*)&null_pass
;
2257 static HRESULT STDMETHODCALLTYPE
d3d10_effect_technique_ComputeStateBlockMask(ID3D10EffectTechnique
*iface
,
2258 D3D10_STATE_BLOCK_MASK
*mask
)
2260 FIXME("iface %p,mask %p stub!\n", iface
, mask
);
2265 static const struct ID3D10EffectTechniqueVtbl d3d10_effect_technique_vtbl
=
2267 /* ID3D10EffectTechnique methods */
2268 d3d10_effect_technique_IsValid
,
2269 d3d10_effect_technique_GetDesc
,
2270 d3d10_effect_technique_GetAnnotationByIndex
,
2271 d3d10_effect_technique_GetAnnotationByName
,
2272 d3d10_effect_technique_GetPassByIndex
,
2273 d3d10_effect_technique_GetPassByName
,
2274 d3d10_effect_technique_ComputeStateBlockMask
,
2277 /* ID3D10EffectPass methods */
2279 static BOOL STDMETHODCALLTYPE
d3d10_effect_pass_IsValid(ID3D10EffectPass
*iface
)
2281 TRACE("iface %p\n", iface
);
2283 return (struct d3d10_effect_pass
*)iface
!= &null_pass
;
2286 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_GetDesc(ID3D10EffectPass
*iface
, D3D10_PASS_DESC
*desc
)
2288 struct d3d10_effect_pass
*This
= (struct d3d10_effect_pass
*)iface
;
2291 FIXME("iface %p, desc %p partial stub!\n", iface
, desc
);
2293 if(This
== &null_pass
)
2295 WARN("Null pass specified\n");
2301 WARN("Invalid argument specified\n");
2302 return E_INVALIDARG
;
2305 memset(desc
, 0, sizeof(*desc
));
2306 desc
->Name
= This
->name
;
2307 for (i
= 0; i
< This
->object_count
; ++i
)
2309 struct d3d10_effect_object
*o
= &This
->objects
[i
];
2310 if (o
->type
== D3D10_EOT_VERTEXSHADER
)
2312 struct d3d10_effect_variable
*v
= o
->data
;
2313 struct d3d10_effect_shader_variable
*s
= v
->data
;
2314 desc
->pIAInputSignature
= (BYTE
*)s
->input_signature
;
2315 desc
->IAInputSignatureSize
= s
->input_signature_size
;
2323 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_GetVertexShaderDesc(ID3D10EffectPass
*iface
,
2324 D3D10_PASS_SHADER_DESC
*desc
)
2326 FIXME("iface %p, desc %p stub!\n", iface
, desc
);
2331 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_GetGeometryShaderDesc(ID3D10EffectPass
*iface
,
2332 D3D10_PASS_SHADER_DESC
*desc
)
2334 FIXME("iface %p, desc %p stub!\n", iface
, desc
);
2339 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_GetPixelShaderDesc(ID3D10EffectPass
*iface
,
2340 D3D10_PASS_SHADER_DESC
*desc
)
2342 FIXME("iface %p, desc %p stub!\n", iface
, desc
);
2347 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_pass_GetAnnotationByIndex(ID3D10EffectPass
*iface
,
2350 struct d3d10_effect_pass
*This
= (struct d3d10_effect_pass
*)iface
;
2351 struct d3d10_effect_variable
*a
;
2353 TRACE("iface %p, index %u\n", iface
, index
);
2355 if (index
>= This
->annotation_count
)
2357 WARN("Invalid index specified\n");
2358 return (ID3D10EffectVariable
*)&null_variable
;
2361 a
= &This
->annotations
[index
];
2363 TRACE("Returning annotation %p, %s\n", a
, debugstr_a(a
->name
));
2365 return (ID3D10EffectVariable
*)a
;
2368 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_pass_GetAnnotationByName(ID3D10EffectPass
*iface
,
2371 struct d3d10_effect_pass
*This
= (struct d3d10_effect_pass
*)iface
;
2374 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2376 for (i
= 0; i
< This
->annotation_count
; ++i
)
2378 struct d3d10_effect_variable
*a
= &This
->annotations
[i
];
2379 if (!strcmp(a
->name
, name
))
2381 TRACE("Returning annotation %p\n", a
);
2382 return (ID3D10EffectVariable
*)a
;
2386 WARN("Invalid name specified\n");
2388 return (ID3D10EffectVariable
*)&null_variable
;
2391 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_Apply(ID3D10EffectPass
*iface
, UINT flags
)
2393 struct d3d10_effect_pass
*This
= (struct d3d10_effect_pass
*)iface
;
2397 TRACE("iface %p, flags %#x\n", iface
, flags
);
2399 if (flags
) FIXME("Ignoring flags (%#x)\n", flags
);
2401 for (i
= 0; i
< This
->object_count
; ++i
)
2403 hr
= d3d10_effect_object_apply(&This
->objects
[i
]);
2404 if (FAILED(hr
)) break;
2410 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_ComputeStateBlockMask(ID3D10EffectPass
*iface
,
2411 D3D10_STATE_BLOCK_MASK
*mask
)
2413 FIXME("iface %p, mask %p stub!\n", iface
, mask
);
2418 static const struct ID3D10EffectPassVtbl d3d10_effect_pass_vtbl
=
2420 /* ID3D10EffectPass methods */
2421 d3d10_effect_pass_IsValid
,
2422 d3d10_effect_pass_GetDesc
,
2423 d3d10_effect_pass_GetVertexShaderDesc
,
2424 d3d10_effect_pass_GetGeometryShaderDesc
,
2425 d3d10_effect_pass_GetPixelShaderDesc
,
2426 d3d10_effect_pass_GetAnnotationByIndex
,
2427 d3d10_effect_pass_GetAnnotationByName
,
2428 d3d10_effect_pass_Apply
,
2429 d3d10_effect_pass_ComputeStateBlockMask
,
2432 /* ID3D10EffectVariable methods */
2434 static BOOL STDMETHODCALLTYPE
d3d10_effect_variable_IsValid(ID3D10EffectVariable
*iface
)
2436 TRACE("iface %p\n", iface
);
2438 return (struct d3d10_effect_variable
*)iface
!= &null_variable
;
2441 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_variable_GetType(ID3D10EffectVariable
*iface
)
2443 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2445 TRACE("iface %p\n", iface
);
2447 return (ID3D10EffectType
*)This
->type
;
2450 static HRESULT STDMETHODCALLTYPE
d3d10_effect_variable_GetDesc(ID3D10EffectVariable
*iface
,
2451 D3D10_EFFECT_VARIABLE_DESC
*desc
)
2453 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2455 TRACE("iface %p, desc %p\n", iface
, desc
);
2457 if(This
== &null_variable
)
2459 WARN("Null variable specified\n");
2465 WARN("Invalid argument specified\n");
2466 return E_INVALIDARG
;
2469 memset(desc
, 0, sizeof(*desc
));
2470 desc
->Name
= This
->name
;
2471 desc
->Semantic
= This
->semantic
;
2472 desc
->Flags
= This
->flag
;
2473 desc
->Annotations
= This
->annotation_count
;
2474 desc
->BufferOffset
= This
->buffer_offset
;
2476 if( This
->flag
== D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT
)
2478 desc
->ExplicitBindPoint
= This
->buffer_offset
;
2484 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetAnnotationByIndex(
2485 ID3D10EffectVariable
*iface
, UINT index
)
2487 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2488 struct d3d10_effect_variable
*a
;
2490 TRACE("iface %p, index %u\n", iface
, index
);
2492 if (index
>= This
->annotation_count
)
2494 WARN("Invalid index specified\n");
2495 return (ID3D10EffectVariable
*)&null_variable
;
2498 a
= &This
->annotations
[index
];
2500 TRACE("Returning annotation %p, %s\n", a
, debugstr_a(a
->name
));
2502 return (ID3D10EffectVariable
*)a
;
2505 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetAnnotationByName(
2506 ID3D10EffectVariable
*iface
, LPCSTR name
)
2508 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2511 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2513 for (i
= 0; i
< This
->annotation_count
; ++i
)
2515 struct d3d10_effect_variable
*a
= &This
->annotations
[i
];
2516 if (!strcmp(a
->name
, name
))
2518 TRACE("Returning annotation %p\n", a
);
2519 return (ID3D10EffectVariable
*)a
;
2523 WARN("Invalid name specified\n");
2525 return (ID3D10EffectVariable
*)&null_variable
;
2528 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetMemberByIndex(
2529 ID3D10EffectVariable
*iface
, UINT index
)
2531 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2532 struct d3d10_effect_variable
*m
;
2534 TRACE("iface %p, index %u\n", iface
, index
);
2536 if (index
>= This
->type
->member_count
)
2538 WARN("Invalid index specified\n");
2539 return (ID3D10EffectVariable
*)&null_variable
;
2542 m
= &This
->members
[index
];
2544 TRACE("Returning member %p, %s\n", m
, debugstr_a(m
->name
));
2546 return (ID3D10EffectVariable
*)m
;
2549 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetMemberByName(
2550 ID3D10EffectVariable
*iface
, LPCSTR name
)
2552 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2555 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2559 WARN("Invalid name specified\n");
2560 return (ID3D10EffectVariable
*)&null_variable
;
2563 for (i
= 0; i
< This
->type
->member_count
; ++i
)
2565 struct d3d10_effect_variable
*m
= &This
->members
[i
];
2569 if (!strcmp(m
->name
, name
))
2571 TRACE("Returning member %p\n", m
);
2572 return (ID3D10EffectVariable
*)m
;
2577 WARN("Invalid name specified\n");
2579 return (ID3D10EffectVariable
*)&null_variable
;
2582 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetMemberBySemantic(
2583 ID3D10EffectVariable
*iface
, LPCSTR semantic
)
2585 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2588 TRACE("iface %p, semantic %s.\n", iface
, debugstr_a(semantic
));
2592 WARN("Invalid semantic specified\n");
2593 return (ID3D10EffectVariable
*)&null_variable
;
2596 for (i
= 0; i
< This
->type
->member_count
; ++i
)
2598 struct d3d10_effect_variable
*m
= &This
->members
[i
];
2602 if (!strcmp(m
->semantic
, semantic
))
2604 TRACE("Returning member %p\n", m
);
2605 return (ID3D10EffectVariable
*)m
;
2610 WARN("Invalid semantic specified\n");
2612 return (ID3D10EffectVariable
*)&null_variable
;
2615 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetElement(
2616 ID3D10EffectVariable
*iface
, UINT index
)
2618 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2619 struct d3d10_effect_variable
*v
;
2621 TRACE("iface %p, index %u\n", iface
, index
);
2623 if (index
>= This
->type
->element_count
)
2625 WARN("Invalid index specified\n");
2626 return (ID3D10EffectVariable
*)&null_variable
;
2629 v
= &This
->elements
[index
];
2631 TRACE("Returning element %p, %s\n", v
, debugstr_a(v
->name
));
2633 return (ID3D10EffectVariable
*)v
;
2636 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_variable_GetParentConstantBuffer(
2637 ID3D10EffectVariable
*iface
)
2639 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2641 TRACE("iface %p\n", iface
);
2643 return (ID3D10EffectConstantBuffer
*)This
->buffer
;
2646 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsScalar(
2647 ID3D10EffectVariable
*iface
)
2649 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2651 TRACE("iface %p\n", iface
);
2653 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_scalar_variable_vtbl
)
2654 return (ID3D10EffectScalarVariable
*)This
;
2656 return (ID3D10EffectScalarVariable
*)&null_scalar_variable
;
2659 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsVector(
2660 ID3D10EffectVariable
*iface
)
2662 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2664 TRACE("iface %p\n", iface
);
2666 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_vector_variable_vtbl
)
2667 return (ID3D10EffectVectorVariable
*)This
;
2669 return (ID3D10EffectVectorVariable
*)&null_vector_variable
;
2672 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsMatrix(
2673 ID3D10EffectVariable
*iface
)
2675 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2677 TRACE("iface %p\n", iface
);
2679 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_matrix_variable_vtbl
)
2680 return (ID3D10EffectMatrixVariable
*)This
;
2682 return (ID3D10EffectMatrixVariable
*)&null_matrix_variable
;
2685 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsString(
2686 ID3D10EffectVariable
*iface
)
2688 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2690 TRACE("iface %p\n", iface
);
2692 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_string_variable_vtbl
)
2693 return (ID3D10EffectStringVariable
*)This
;
2695 return (ID3D10EffectStringVariable
*)&null_string_variable
;
2698 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsShaderResource(
2699 ID3D10EffectVariable
*iface
)
2701 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2703 TRACE("iface %p\n", iface
);
2705 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_resource_variable_vtbl
)
2706 return (ID3D10EffectShaderResourceVariable
*)This
;
2708 return (ID3D10EffectShaderResourceVariable
*)&null_shader_resource_variable
;
2711 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsRenderTargetView(
2712 ID3D10EffectVariable
*iface
)
2714 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2716 TRACE("iface %p\n", iface
);
2718 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_render_target_view_variable_vtbl
)
2719 return (ID3D10EffectRenderTargetViewVariable
*)This
;
2721 return (ID3D10EffectRenderTargetViewVariable
*)&null_render_target_view_variable
;
2724 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsDepthStencilView(
2725 ID3D10EffectVariable
*iface
)
2727 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2729 TRACE("iface %p\n", iface
);
2731 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_depth_stencil_view_variable_vtbl
)
2732 return (ID3D10EffectDepthStencilViewVariable
*)This
;
2734 return (ID3D10EffectDepthStencilViewVariable
*)&null_depth_stencil_view_variable
;
2737 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_variable_AsConstantBuffer(
2738 ID3D10EffectVariable
*iface
)
2740 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2742 TRACE("iface %p\n", iface
);
2744 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_constant_buffer_vtbl
)
2745 return (ID3D10EffectConstantBuffer
*)This
;
2747 return (ID3D10EffectConstantBuffer
*)&null_local_buffer
;
2750 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsShader(
2751 ID3D10EffectVariable
*iface
)
2753 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2755 TRACE("iface %p\n", iface
);
2757 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_variable_vtbl
)
2758 return (ID3D10EffectShaderVariable
*)This
;
2760 return (ID3D10EffectShaderVariable
*)&null_shader_variable
;
2763 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsBlend(ID3D10EffectVariable
*iface
)
2765 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2767 TRACE("iface %p\n", iface
);
2769 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_blend_variable_vtbl
)
2770 return (ID3D10EffectBlendVariable
*)This
;
2772 return (ID3D10EffectBlendVariable
*)&null_blend_variable
;
2775 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsDepthStencil(
2776 ID3D10EffectVariable
*iface
)
2778 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2780 TRACE("iface %p\n", iface
);
2782 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_depth_stencil_variable_vtbl
)
2783 return (ID3D10EffectDepthStencilVariable
*)This
;
2785 return (ID3D10EffectDepthStencilVariable
*)&null_depth_stencil_variable
;
2788 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsRasterizer(
2789 ID3D10EffectVariable
*iface
)
2791 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2793 TRACE("iface %p\n", iface
);
2795 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_rasterizer_variable_vtbl
)
2796 return (ID3D10EffectRasterizerVariable
*)This
;
2798 return (ID3D10EffectRasterizerVariable
*)&null_rasterizer_variable
;
2801 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsSampler(
2802 ID3D10EffectVariable
*iface
)
2804 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2806 TRACE("iface %p\n", iface
);
2808 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_sampler_variable_vtbl
)
2809 return (ID3D10EffectSamplerVariable
*)This
;
2811 return (ID3D10EffectSamplerVariable
*)&null_sampler_variable
;
2814 static HRESULT STDMETHODCALLTYPE
d3d10_effect_variable_SetRawValue(ID3D10EffectVariable
*iface
,
2815 void *data
, UINT offset
, UINT count
)
2817 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
2822 static HRESULT STDMETHODCALLTYPE
d3d10_effect_variable_GetRawValue(ID3D10EffectVariable
*iface
,
2823 void *data
, UINT offset
, UINT count
)
2825 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
2830 static const struct ID3D10EffectVariableVtbl d3d10_effect_variable_vtbl
=
2832 /* ID3D10EffectVariable methods */
2833 d3d10_effect_variable_IsValid
,
2834 d3d10_effect_variable_GetType
,
2835 d3d10_effect_variable_GetDesc
,
2836 d3d10_effect_variable_GetAnnotationByIndex
,
2837 d3d10_effect_variable_GetAnnotationByName
,
2838 d3d10_effect_variable_GetMemberByIndex
,
2839 d3d10_effect_variable_GetMemberByName
,
2840 d3d10_effect_variable_GetMemberBySemantic
,
2841 d3d10_effect_variable_GetElement
,
2842 d3d10_effect_variable_GetParentConstantBuffer
,
2843 d3d10_effect_variable_AsScalar
,
2844 d3d10_effect_variable_AsVector
,
2845 d3d10_effect_variable_AsMatrix
,
2846 d3d10_effect_variable_AsString
,
2847 d3d10_effect_variable_AsShaderResource
,
2848 d3d10_effect_variable_AsRenderTargetView
,
2849 d3d10_effect_variable_AsDepthStencilView
,
2850 d3d10_effect_variable_AsConstantBuffer
,
2851 d3d10_effect_variable_AsShader
,
2852 d3d10_effect_variable_AsBlend
,
2853 d3d10_effect_variable_AsDepthStencil
,
2854 d3d10_effect_variable_AsRasterizer
,
2855 d3d10_effect_variable_AsSampler
,
2856 d3d10_effect_variable_SetRawValue
,
2857 d3d10_effect_variable_GetRawValue
,
2860 /* ID3D10EffectVariable methods */
2861 static BOOL STDMETHODCALLTYPE
d3d10_effect_constant_buffer_IsValid(ID3D10EffectConstantBuffer
*iface
)
2863 TRACE("iface %p\n", iface
);
2865 return (struct d3d10_effect_variable
*)iface
!= &null_local_buffer
;
2868 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetType(ID3D10EffectConstantBuffer
*iface
)
2870 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
2873 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetDesc(ID3D10EffectConstantBuffer
*iface
,
2874 D3D10_EFFECT_VARIABLE_DESC
*desc
)
2876 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
2879 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetAnnotationByIndex(
2880 ID3D10EffectConstantBuffer
*iface
, UINT index
)
2882 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
2885 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetAnnotationByName(
2886 ID3D10EffectConstantBuffer
*iface
, LPCSTR name
)
2888 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
2891 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetMemberByIndex(
2892 ID3D10EffectConstantBuffer
*iface
, UINT index
)
2894 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
2897 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetMemberByName(
2898 ID3D10EffectConstantBuffer
*iface
, LPCSTR name
)
2900 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
2903 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetMemberBySemantic(
2904 ID3D10EffectConstantBuffer
*iface
, LPCSTR semantic
)
2906 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
2909 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetElement(
2910 ID3D10EffectConstantBuffer
*iface
, UINT index
)
2912 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
2915 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetParentConstantBuffer(
2916 ID3D10EffectConstantBuffer
*iface
)
2918 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
2921 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsScalar(
2922 ID3D10EffectConstantBuffer
*iface
)
2924 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
2927 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsVector(
2928 ID3D10EffectConstantBuffer
*iface
)
2930 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
2933 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsMatrix(
2934 ID3D10EffectConstantBuffer
*iface
)
2936 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
2939 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsString(
2940 ID3D10EffectConstantBuffer
*iface
)
2942 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
2945 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsShaderResource(
2946 ID3D10EffectConstantBuffer
*iface
)
2948 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
2951 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsRenderTargetView(
2952 ID3D10EffectConstantBuffer
*iface
)
2954 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
2957 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsDepthStencilView(
2958 ID3D10EffectConstantBuffer
*iface
)
2960 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
2963 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsConstantBuffer(
2964 ID3D10EffectConstantBuffer
*iface
)
2966 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
2969 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsShader(
2970 ID3D10EffectConstantBuffer
*iface
)
2972 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
2975 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsBlend(ID3D10EffectConstantBuffer
*iface
)
2977 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
2980 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsDepthStencil(
2981 ID3D10EffectConstantBuffer
*iface
)
2983 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
2986 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsRasterizer(
2987 ID3D10EffectConstantBuffer
*iface
)
2989 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
2992 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsSampler(
2993 ID3D10EffectConstantBuffer
*iface
)
2995 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
2998 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_SetRawValue(ID3D10EffectConstantBuffer
*iface
,
2999 void *data
, UINT offset
, UINT count
)
3001 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3004 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetRawValue(ID3D10EffectConstantBuffer
*iface
,
3005 void *data
, UINT offset
, UINT count
)
3007 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3010 /* ID3D10EffectConstantBuffer methods */
3011 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_SetConstantBuffer(ID3D10EffectConstantBuffer
*iface
,
3012 ID3D10Buffer
*buffer
)
3014 FIXME("iface %p, buffer %p stub!\n", iface
, buffer
);
3019 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetConstantBuffer(ID3D10EffectConstantBuffer
*iface
,
3020 ID3D10Buffer
**buffer
)
3022 FIXME("iface %p, buffer %p stub!\n", iface
, buffer
);
3027 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_SetTextureBuffer(ID3D10EffectConstantBuffer
*iface
,
3028 ID3D10ShaderResourceView
*view
)
3030 FIXME("iface %p, view %p stub!\n", iface
, view
);
3035 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetTextureBuffer(ID3D10EffectConstantBuffer
*iface
,
3036 ID3D10ShaderResourceView
**view
)
3038 FIXME("iface %p, view %p stub!\n", iface
, view
);
3043 static const struct ID3D10EffectConstantBufferVtbl d3d10_effect_constant_buffer_vtbl
=
3045 /* ID3D10EffectVariable methods */
3046 d3d10_effect_constant_buffer_IsValid
,
3047 d3d10_effect_constant_buffer_GetType
,
3048 d3d10_effect_constant_buffer_GetDesc
,
3049 d3d10_effect_constant_buffer_GetAnnotationByIndex
,
3050 d3d10_effect_constant_buffer_GetAnnotationByName
,
3051 d3d10_effect_constant_buffer_GetMemberByIndex
,
3052 d3d10_effect_constant_buffer_GetMemberByName
,
3053 d3d10_effect_constant_buffer_GetMemberBySemantic
,
3054 d3d10_effect_constant_buffer_GetElement
,
3055 d3d10_effect_constant_buffer_GetParentConstantBuffer
,
3056 d3d10_effect_constant_buffer_AsScalar
,
3057 d3d10_effect_constant_buffer_AsVector
,
3058 d3d10_effect_constant_buffer_AsMatrix
,
3059 d3d10_effect_constant_buffer_AsString
,
3060 d3d10_effect_constant_buffer_AsShaderResource
,
3061 d3d10_effect_constant_buffer_AsRenderTargetView
,
3062 d3d10_effect_constant_buffer_AsDepthStencilView
,
3063 d3d10_effect_constant_buffer_AsConstantBuffer
,
3064 d3d10_effect_constant_buffer_AsShader
,
3065 d3d10_effect_constant_buffer_AsBlend
,
3066 d3d10_effect_constant_buffer_AsDepthStencil
,
3067 d3d10_effect_constant_buffer_AsRasterizer
,
3068 d3d10_effect_constant_buffer_AsSampler
,
3069 d3d10_effect_constant_buffer_SetRawValue
,
3070 d3d10_effect_constant_buffer_GetRawValue
,
3071 /* ID3D10EffectConstantBuffer methods */
3072 d3d10_effect_constant_buffer_SetConstantBuffer
,
3073 d3d10_effect_constant_buffer_GetConstantBuffer
,
3074 d3d10_effect_constant_buffer_SetTextureBuffer
,
3075 d3d10_effect_constant_buffer_GetTextureBuffer
,
3078 /* ID3D10EffectVariable methods */
3080 static BOOL STDMETHODCALLTYPE
d3d10_effect_scalar_variable_IsValid(ID3D10EffectScalarVariable
*iface
)
3082 TRACE("iface %p\n", iface
);
3084 return (struct d3d10_effect_variable
*)iface
!= &null_scalar_variable
;
3087 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetType(
3088 ID3D10EffectScalarVariable
*iface
)
3090 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
3093 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetDesc(ID3D10EffectScalarVariable
*iface
,
3094 D3D10_EFFECT_VARIABLE_DESC
*desc
)
3096 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
3099 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetAnnotationByIndex(
3100 ID3D10EffectScalarVariable
*iface
, UINT index
)
3102 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
3105 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetAnnotationByName(
3106 ID3D10EffectScalarVariable
*iface
, LPCSTR name
)
3108 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
3111 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetMemberByIndex(
3112 ID3D10EffectScalarVariable
*iface
, UINT index
)
3114 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
3117 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetMemberByName(
3118 ID3D10EffectScalarVariable
*iface
, LPCSTR name
)
3120 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
3123 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetMemberBySemantic(
3124 ID3D10EffectScalarVariable
*iface
, LPCSTR semantic
)
3126 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
3129 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetElement(
3130 ID3D10EffectScalarVariable
*iface
, UINT index
)
3132 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
3135 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetParentConstantBuffer(
3136 ID3D10EffectScalarVariable
*iface
)
3138 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
3141 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsScalar(
3142 ID3D10EffectScalarVariable
*iface
)
3144 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
3147 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsVector(
3148 ID3D10EffectScalarVariable
*iface
)
3150 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
3153 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsMatrix(
3154 ID3D10EffectScalarVariable
*iface
)
3156 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
3159 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsString(
3160 ID3D10EffectScalarVariable
*iface
)
3162 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
3165 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsShaderResource(
3166 ID3D10EffectScalarVariable
*iface
)
3168 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
3171 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsRenderTargetView(
3172 ID3D10EffectScalarVariable
*iface
)
3174 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
3177 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsDepthStencilView(
3178 ID3D10EffectScalarVariable
*iface
)
3180 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
3183 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsConstantBuffer(
3184 ID3D10EffectScalarVariable
*iface
)
3186 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
3189 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsShader(
3190 ID3D10EffectScalarVariable
*iface
)
3192 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
3195 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsBlend(
3196 ID3D10EffectScalarVariable
*iface
)
3198 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
3201 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsDepthStencil(
3202 ID3D10EffectScalarVariable
*iface
)
3204 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
3207 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsRasterizer(
3208 ID3D10EffectScalarVariable
*iface
)
3210 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
3213 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsSampler(
3214 ID3D10EffectScalarVariable
*iface
)
3216 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
3219 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetRawValue(ID3D10EffectScalarVariable
*iface
,
3220 void *data
, UINT offset
, UINT count
)
3222 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3225 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetRawValue(ID3D10EffectScalarVariable
*iface
,
3226 void *data
, UINT offset
, UINT count
)
3228 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3231 /* ID3D10EffectScalarVariable methods */
3233 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetFloat(ID3D10EffectScalarVariable
*iface
,
3236 FIXME("iface %p, value %.8e stub!\n", iface
, value
);
3241 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetFloat(ID3D10EffectScalarVariable
*iface
,
3244 FIXME("iface %p, value %p stub!\n", iface
, value
);
3249 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetFloatArray(ID3D10EffectScalarVariable
*iface
,
3250 float *values
, UINT offset
, UINT count
)
3252 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3257 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetFloatArray(ID3D10EffectScalarVariable
*iface
,
3258 float *values
, UINT offset
, UINT count
)
3260 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3265 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetInt(ID3D10EffectScalarVariable
*iface
,
3268 FIXME("iface %p, value %d stub!\n", iface
, value
);
3273 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetInt(ID3D10EffectScalarVariable
*iface
,
3276 FIXME("iface %p, value %p stub!\n", iface
, value
);
3281 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetIntArray(ID3D10EffectScalarVariable
*iface
,
3282 int *values
, UINT offset
, UINT count
)
3284 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3289 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetIntArray(ID3D10EffectScalarVariable
*iface
,
3290 int *values
, UINT offset
, UINT count
)
3292 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3297 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetBool(ID3D10EffectScalarVariable
*iface
,
3300 FIXME("iface %p, value %d stub!\n", iface
, value
);
3305 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetBool(ID3D10EffectScalarVariable
*iface
,
3308 FIXME("iface %p, value %p stub!\n", iface
, value
);
3313 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetBoolArray(ID3D10EffectScalarVariable
*iface
,
3314 BOOL
*values
, UINT offset
, UINT count
)
3316 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3321 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetBoolArray(ID3D10EffectScalarVariable
*iface
,
3322 BOOL
*values
, UINT offset
, UINT count
)
3324 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3329 static const struct ID3D10EffectScalarVariableVtbl d3d10_effect_scalar_variable_vtbl
=
3331 /* ID3D10EffectVariable methods */
3332 d3d10_effect_scalar_variable_IsValid
,
3333 d3d10_effect_scalar_variable_GetType
,
3334 d3d10_effect_scalar_variable_GetDesc
,
3335 d3d10_effect_scalar_variable_GetAnnotationByIndex
,
3336 d3d10_effect_scalar_variable_GetAnnotationByName
,
3337 d3d10_effect_scalar_variable_GetMemberByIndex
,
3338 d3d10_effect_scalar_variable_GetMemberByName
,
3339 d3d10_effect_scalar_variable_GetMemberBySemantic
,
3340 d3d10_effect_scalar_variable_GetElement
,
3341 d3d10_effect_scalar_variable_GetParentConstantBuffer
,
3342 d3d10_effect_scalar_variable_AsScalar
,
3343 d3d10_effect_scalar_variable_AsVector
,
3344 d3d10_effect_scalar_variable_AsMatrix
,
3345 d3d10_effect_scalar_variable_AsString
,
3346 d3d10_effect_scalar_variable_AsShaderResource
,
3347 d3d10_effect_scalar_variable_AsRenderTargetView
,
3348 d3d10_effect_scalar_variable_AsDepthStencilView
,
3349 d3d10_effect_scalar_variable_AsConstantBuffer
,
3350 d3d10_effect_scalar_variable_AsShader
,
3351 d3d10_effect_scalar_variable_AsBlend
,
3352 d3d10_effect_scalar_variable_AsDepthStencil
,
3353 d3d10_effect_scalar_variable_AsRasterizer
,
3354 d3d10_effect_scalar_variable_AsSampler
,
3355 d3d10_effect_scalar_variable_SetRawValue
,
3356 d3d10_effect_scalar_variable_GetRawValue
,
3357 /* ID3D10EffectScalarVariable methods */
3358 d3d10_effect_scalar_variable_SetFloat
,
3359 d3d10_effect_scalar_variable_GetFloat
,
3360 d3d10_effect_scalar_variable_SetFloatArray
,
3361 d3d10_effect_scalar_variable_GetFloatArray
,
3362 d3d10_effect_scalar_variable_SetInt
,
3363 d3d10_effect_scalar_variable_GetInt
,
3364 d3d10_effect_scalar_variable_SetIntArray
,
3365 d3d10_effect_scalar_variable_GetIntArray
,
3366 d3d10_effect_scalar_variable_SetBool
,
3367 d3d10_effect_scalar_variable_GetBool
,
3368 d3d10_effect_scalar_variable_SetBoolArray
,
3369 d3d10_effect_scalar_variable_GetBoolArray
,
3372 /* ID3D10EffectVariable methods */
3374 static BOOL STDMETHODCALLTYPE
d3d10_effect_vector_variable_IsValid(ID3D10EffectVectorVariable
*iface
)
3376 TRACE("iface %p\n", iface
);
3378 return (struct d3d10_effect_variable
*)iface
!= &null_vector_variable
;
3381 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetType(
3382 ID3D10EffectVectorVariable
*iface
)
3384 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
3387 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetDesc(ID3D10EffectVectorVariable
*iface
,
3388 D3D10_EFFECT_VARIABLE_DESC
*desc
)
3390 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
3393 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetAnnotationByIndex(
3394 ID3D10EffectVectorVariable
*iface
, UINT index
)
3396 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
3399 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetAnnotationByName(
3400 ID3D10EffectVectorVariable
*iface
, LPCSTR name
)
3402 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
3405 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetMemberByIndex(
3406 ID3D10EffectVectorVariable
*iface
, UINT index
)
3408 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
3411 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetMemberByName(
3412 ID3D10EffectVectorVariable
*iface
, LPCSTR name
)
3414 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
3417 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetMemberBySemantic(
3418 ID3D10EffectVectorVariable
*iface
, LPCSTR semantic
)
3420 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
3423 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetElement(
3424 ID3D10EffectVectorVariable
*iface
, UINT index
)
3426 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
3429 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetParentConstantBuffer(
3430 ID3D10EffectVectorVariable
*iface
)
3432 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
3435 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsScalar(
3436 ID3D10EffectVectorVariable
*iface
)
3438 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
3441 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsVector(
3442 ID3D10EffectVectorVariable
*iface
)
3444 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
3447 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsMatrix(
3448 ID3D10EffectVectorVariable
*iface
)
3450 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
3453 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsString(
3454 ID3D10EffectVectorVariable
*iface
)
3456 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
3459 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsShaderResource(
3460 ID3D10EffectVectorVariable
*iface
)
3462 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
3465 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsRenderTargetView(
3466 ID3D10EffectVectorVariable
*iface
)
3468 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
3471 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsDepthStencilView(
3472 ID3D10EffectVectorVariable
*iface
)
3474 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
3477 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsConstantBuffer(
3478 ID3D10EffectVectorVariable
*iface
)
3480 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
3483 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsShader(
3484 ID3D10EffectVectorVariable
*iface
)
3486 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
3489 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsBlend(
3490 ID3D10EffectVectorVariable
*iface
)
3492 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
3495 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsDepthStencil(
3496 ID3D10EffectVectorVariable
*iface
)
3498 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
3501 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsRasterizer(
3502 ID3D10EffectVectorVariable
*iface
)
3504 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
3507 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsSampler(
3508 ID3D10EffectVectorVariable
*iface
)
3510 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
3513 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetRawValue(ID3D10EffectVectorVariable
*iface
,
3514 void *data
, UINT offset
, UINT count
)
3516 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3519 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetRawValue(ID3D10EffectVectorVariable
*iface
,
3520 void *data
, UINT offset
, UINT count
)
3522 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3525 /* ID3D10EffectVectorVariable methods */
3527 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetBoolVector(ID3D10EffectVectorVariable
*iface
,
3530 FIXME("iface %p, value %p stub!\n", iface
, value
);
3535 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetIntVector(ID3D10EffectVectorVariable
*iface
,
3538 FIXME("iface %p, value %p stub!\n", iface
, value
);
3543 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetFloatVector(ID3D10EffectVectorVariable
*iface
,
3546 FIXME("iface %p, value %p stub!\n", iface
, value
);
3551 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetBoolVector(ID3D10EffectVectorVariable
*iface
,
3554 FIXME("iface %p, value %p stub!\n", iface
, value
);
3559 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetIntVector(ID3D10EffectVectorVariable
*iface
,
3562 FIXME("iface %p, value %p stub!\n", iface
, value
);
3567 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetFloatVector(ID3D10EffectVectorVariable
*iface
,
3570 FIXME("iface %p, value %p stub!\n", iface
, value
);
3575 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetBoolVectorArray(ID3D10EffectVectorVariable
*iface
,
3576 BOOL
*values
, UINT offset
, UINT count
)
3578 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3583 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetIntVectorArray(ID3D10EffectVectorVariable
*iface
,
3584 int *values
, UINT offset
, UINT count
)
3586 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3591 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetFloatVectorArray(ID3D10EffectVectorVariable
*iface
,
3592 float *values
, UINT offset
, UINT count
)
3594 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3599 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetBoolVectorArray(ID3D10EffectVectorVariable
*iface
,
3600 BOOL
*values
, UINT offset
, UINT count
)
3602 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3607 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetIntVectorArray(ID3D10EffectVectorVariable
*iface
,
3608 int *values
, UINT offset
, UINT count
)
3610 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3615 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetFloatVectorArray(ID3D10EffectVectorVariable
*iface
,
3616 float *values
, UINT offset
, UINT count
)
3618 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3623 static const struct ID3D10EffectVectorVariableVtbl d3d10_effect_vector_variable_vtbl
=
3625 /* ID3D10EffectVariable methods */
3626 d3d10_effect_vector_variable_IsValid
,
3627 d3d10_effect_vector_variable_GetType
,
3628 d3d10_effect_vector_variable_GetDesc
,
3629 d3d10_effect_vector_variable_GetAnnotationByIndex
,
3630 d3d10_effect_vector_variable_GetAnnotationByName
,
3631 d3d10_effect_vector_variable_GetMemberByIndex
,
3632 d3d10_effect_vector_variable_GetMemberByName
,
3633 d3d10_effect_vector_variable_GetMemberBySemantic
,
3634 d3d10_effect_vector_variable_GetElement
,
3635 d3d10_effect_vector_variable_GetParentConstantBuffer
,
3636 d3d10_effect_vector_variable_AsScalar
,
3637 d3d10_effect_vector_variable_AsVector
,
3638 d3d10_effect_vector_variable_AsMatrix
,
3639 d3d10_effect_vector_variable_AsString
,
3640 d3d10_effect_vector_variable_AsShaderResource
,
3641 d3d10_effect_vector_variable_AsRenderTargetView
,
3642 d3d10_effect_vector_variable_AsDepthStencilView
,
3643 d3d10_effect_vector_variable_AsConstantBuffer
,
3644 d3d10_effect_vector_variable_AsShader
,
3645 d3d10_effect_vector_variable_AsBlend
,
3646 d3d10_effect_vector_variable_AsDepthStencil
,
3647 d3d10_effect_vector_variable_AsRasterizer
,
3648 d3d10_effect_vector_variable_AsSampler
,
3649 d3d10_effect_vector_variable_SetRawValue
,
3650 d3d10_effect_vector_variable_GetRawValue
,
3651 /* ID3D10EffectVectorVariable methods */
3652 d3d10_effect_vector_variable_SetBoolVector
,
3653 d3d10_effect_vector_variable_SetIntVector
,
3654 d3d10_effect_vector_variable_SetFloatVector
,
3655 d3d10_effect_vector_variable_GetBoolVector
,
3656 d3d10_effect_vector_variable_GetIntVector
,
3657 d3d10_effect_vector_variable_GetFloatVector
,
3658 d3d10_effect_vector_variable_SetBoolVectorArray
,
3659 d3d10_effect_vector_variable_SetIntVectorArray
,
3660 d3d10_effect_vector_variable_SetFloatVectorArray
,
3661 d3d10_effect_vector_variable_GetBoolVectorArray
,
3662 d3d10_effect_vector_variable_GetIntVectorArray
,
3663 d3d10_effect_vector_variable_GetFloatVectorArray
,
3666 /* ID3D10EffectVariable methods */
3668 static BOOL STDMETHODCALLTYPE
d3d10_effect_matrix_variable_IsValid(ID3D10EffectMatrixVariable
*iface
)
3670 TRACE("iface %p\n", iface
);
3672 return (struct d3d10_effect_variable
*)iface
!= &null_matrix_variable
;
3675 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetType(
3676 ID3D10EffectMatrixVariable
*iface
)
3678 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
3681 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetDesc(ID3D10EffectMatrixVariable
*iface
,
3682 D3D10_EFFECT_VARIABLE_DESC
*desc
)
3684 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
3687 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetAnnotationByIndex(
3688 ID3D10EffectMatrixVariable
*iface
, UINT index
)
3690 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
3693 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetAnnotationByName(
3694 ID3D10EffectMatrixVariable
*iface
, LPCSTR name
)
3696 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
3699 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMemberByIndex(
3700 ID3D10EffectMatrixVariable
*iface
, UINT index
)
3702 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
3705 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMemberByName(
3706 ID3D10EffectMatrixVariable
*iface
, LPCSTR name
)
3708 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
3711 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMemberBySemantic(
3712 ID3D10EffectMatrixVariable
*iface
, LPCSTR semantic
)
3714 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
3717 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetElement(
3718 ID3D10EffectMatrixVariable
*iface
, UINT index
)
3720 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
3723 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetParentConstantBuffer(
3724 ID3D10EffectMatrixVariable
*iface
)
3726 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
3729 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsScalar(
3730 ID3D10EffectMatrixVariable
*iface
)
3732 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
3735 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsVector(
3736 ID3D10EffectMatrixVariable
*iface
)
3738 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
3741 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsMatrix(
3742 ID3D10EffectMatrixVariable
*iface
)
3744 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
3747 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsString(
3748 ID3D10EffectMatrixVariable
*iface
)
3750 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
3753 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsShaderResource(
3754 ID3D10EffectMatrixVariable
*iface
)
3756 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
3759 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsRenderTargetView(
3760 ID3D10EffectMatrixVariable
*iface
)
3762 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
3765 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsDepthStencilView(
3766 ID3D10EffectMatrixVariable
*iface
)
3768 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
3771 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsConstantBuffer(
3772 ID3D10EffectMatrixVariable
*iface
)
3774 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
3777 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsShader(
3778 ID3D10EffectMatrixVariable
*iface
)
3780 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
3783 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsBlend(
3784 ID3D10EffectMatrixVariable
*iface
)
3786 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
3789 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsDepthStencil(
3790 ID3D10EffectMatrixVariable
*iface
)
3792 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
3795 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsRasterizer(
3796 ID3D10EffectMatrixVariable
*iface
)
3798 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
3801 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsSampler(
3802 ID3D10EffectMatrixVariable
*iface
)
3804 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
3807 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetRawValue(ID3D10EffectMatrixVariable
*iface
,
3808 void *data
, UINT offset
, UINT count
)
3810 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3813 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetRawValue(ID3D10EffectMatrixVariable
*iface
,
3814 void *data
, UINT offset
, UINT count
)
3816 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3819 /* ID3D10EffectMatrixVariable methods */
3821 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetMatrix(ID3D10EffectMatrixVariable
*iface
,
3824 FIXME("iface %p, data %p stub!\n", iface
, data
);
3829 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMatrix(ID3D10EffectMatrixVariable
*iface
,
3832 FIXME("iface %p, data %p stub!\n", iface
, data
);
3837 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetMatrixArray(ID3D10EffectMatrixVariable
*iface
,
3838 float *data
, UINT offset
, UINT count
)
3840 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
3845 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMatrixArray(ID3D10EffectMatrixVariable
*iface
,
3846 float *data
, UINT offset
, UINT count
)
3848 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
3853 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetMatrixTranspose(ID3D10EffectMatrixVariable
*iface
,
3856 FIXME("iface %p, data %p stub!\n", iface
, data
);
3861 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMatrixTranspose(ID3D10EffectMatrixVariable
*iface
,
3864 FIXME("iface %p, data %p stub!\n", iface
, data
);
3869 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetMatrixTransposeArray(ID3D10EffectMatrixVariable
*iface
,
3870 float *data
, UINT offset
, UINT count
)
3872 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
3877 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMatrixTransposeArray(ID3D10EffectMatrixVariable
*iface
,
3878 float *data
, UINT offset
, UINT count
)
3880 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
3886 static const struct ID3D10EffectMatrixVariableVtbl d3d10_effect_matrix_variable_vtbl
=
3888 /* ID3D10EffectVariable methods */
3889 d3d10_effect_matrix_variable_IsValid
,
3890 d3d10_effect_matrix_variable_GetType
,
3891 d3d10_effect_matrix_variable_GetDesc
,
3892 d3d10_effect_matrix_variable_GetAnnotationByIndex
,
3893 d3d10_effect_matrix_variable_GetAnnotationByName
,
3894 d3d10_effect_matrix_variable_GetMemberByIndex
,
3895 d3d10_effect_matrix_variable_GetMemberByName
,
3896 d3d10_effect_matrix_variable_GetMemberBySemantic
,
3897 d3d10_effect_matrix_variable_GetElement
,
3898 d3d10_effect_matrix_variable_GetParentConstantBuffer
,
3899 d3d10_effect_matrix_variable_AsScalar
,
3900 d3d10_effect_matrix_variable_AsVector
,
3901 d3d10_effect_matrix_variable_AsMatrix
,
3902 d3d10_effect_matrix_variable_AsString
,
3903 d3d10_effect_matrix_variable_AsShaderResource
,
3904 d3d10_effect_matrix_variable_AsRenderTargetView
,
3905 d3d10_effect_matrix_variable_AsDepthStencilView
,
3906 d3d10_effect_matrix_variable_AsConstantBuffer
,
3907 d3d10_effect_matrix_variable_AsShader
,
3908 d3d10_effect_matrix_variable_AsBlend
,
3909 d3d10_effect_matrix_variable_AsDepthStencil
,
3910 d3d10_effect_matrix_variable_AsRasterizer
,
3911 d3d10_effect_matrix_variable_AsSampler
,
3912 d3d10_effect_matrix_variable_SetRawValue
,
3913 d3d10_effect_matrix_variable_GetRawValue
,
3914 /* ID3D10EffectMatrixVariable methods */
3915 d3d10_effect_matrix_variable_SetMatrix
,
3916 d3d10_effect_matrix_variable_GetMatrix
,
3917 d3d10_effect_matrix_variable_SetMatrixArray
,
3918 d3d10_effect_matrix_variable_GetMatrixArray
,
3919 d3d10_effect_matrix_variable_SetMatrixTranspose
,
3920 d3d10_effect_matrix_variable_GetMatrixTranspose
,
3921 d3d10_effect_matrix_variable_SetMatrixTransposeArray
,
3922 d3d10_effect_matrix_variable_GetMatrixTransposeArray
,
3925 /* ID3D10EffectVariable methods */
3927 static BOOL STDMETHODCALLTYPE
d3d10_effect_string_variable_IsValid(ID3D10EffectStringVariable
*iface
)
3929 TRACE("iface %p\n", iface
);
3931 return (struct d3d10_effect_variable
*)iface
!= &null_string_variable
;
3934 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetType(
3935 ID3D10EffectStringVariable
*iface
)
3937 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
3940 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_GetDesc(ID3D10EffectStringVariable
*iface
,
3941 D3D10_EFFECT_VARIABLE_DESC
*desc
)
3943 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
3946 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetAnnotationByIndex(
3947 ID3D10EffectStringVariable
*iface
, UINT index
)
3949 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
3952 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetAnnotationByName(
3953 ID3D10EffectStringVariable
*iface
, LPCSTR name
)
3955 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
3958 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetMemberByIndex(
3959 ID3D10EffectStringVariable
*iface
, UINT index
)
3961 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
3964 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetMemberByName(
3965 ID3D10EffectStringVariable
*iface
, LPCSTR name
)
3967 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
3970 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetMemberBySemantic(
3971 ID3D10EffectStringVariable
*iface
, LPCSTR semantic
)
3973 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
3976 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetElement(
3977 ID3D10EffectStringVariable
*iface
, UINT index
)
3979 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
3982 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetParentConstantBuffer(
3983 ID3D10EffectStringVariable
*iface
)
3985 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
3988 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsScalar(
3989 ID3D10EffectStringVariable
*iface
)
3991 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
3994 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsVector(
3995 ID3D10EffectStringVariable
*iface
)
3997 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
4000 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsMatrix(
4001 ID3D10EffectStringVariable
*iface
)
4003 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
4006 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsString(
4007 ID3D10EffectStringVariable
*iface
)
4009 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
4012 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsShaderResource(
4013 ID3D10EffectStringVariable
*iface
)
4015 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
4018 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsRenderTargetView(
4019 ID3D10EffectStringVariable
*iface
)
4021 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
4024 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsDepthStencilView(
4025 ID3D10EffectStringVariable
*iface
)
4027 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
4030 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsConstantBuffer(
4031 ID3D10EffectStringVariable
*iface
)
4033 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
4036 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsShader(
4037 ID3D10EffectStringVariable
*iface
)
4039 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
4042 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsBlend(
4043 ID3D10EffectStringVariable
*iface
)
4045 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
4048 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsDepthStencil(
4049 ID3D10EffectStringVariable
*iface
)
4051 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
4054 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsRasterizer(
4055 ID3D10EffectStringVariable
*iface
)
4057 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
4060 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsSampler(
4061 ID3D10EffectStringVariable
*iface
)
4063 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
4066 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_SetRawValue(ID3D10EffectStringVariable
*iface
,
4067 void *data
, UINT offset
, UINT count
)
4069 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4072 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_GetRawValue(ID3D10EffectStringVariable
*iface
,
4073 void *data
, UINT offset
, UINT count
)
4075 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4078 /* ID3D10EffectStringVariable methods */
4080 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_GetString(ID3D10EffectStringVariable
*iface
,
4083 FIXME("iface %p, str %p stub!\n", iface
, str
);
4088 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_GetStringArray(ID3D10EffectStringVariable
*iface
,
4089 LPCSTR
*strs
, UINT offset
, UINT count
)
4091 FIXME("iface %p, strs %p, offset %u, count %u stub!\n", iface
, strs
, offset
, count
);
4097 static const struct ID3D10EffectStringVariableVtbl d3d10_effect_string_variable_vtbl
=
4099 /* ID3D10EffectVariable methods */
4100 d3d10_effect_string_variable_IsValid
,
4101 d3d10_effect_string_variable_GetType
,
4102 d3d10_effect_string_variable_GetDesc
,
4103 d3d10_effect_string_variable_GetAnnotationByIndex
,
4104 d3d10_effect_string_variable_GetAnnotationByName
,
4105 d3d10_effect_string_variable_GetMemberByIndex
,
4106 d3d10_effect_string_variable_GetMemberByName
,
4107 d3d10_effect_string_variable_GetMemberBySemantic
,
4108 d3d10_effect_string_variable_GetElement
,
4109 d3d10_effect_string_variable_GetParentConstantBuffer
,
4110 d3d10_effect_string_variable_AsScalar
,
4111 d3d10_effect_string_variable_AsVector
,
4112 d3d10_effect_string_variable_AsMatrix
,
4113 d3d10_effect_string_variable_AsString
,
4114 d3d10_effect_string_variable_AsShaderResource
,
4115 d3d10_effect_string_variable_AsRenderTargetView
,
4116 d3d10_effect_string_variable_AsDepthStencilView
,
4117 d3d10_effect_string_variable_AsConstantBuffer
,
4118 d3d10_effect_string_variable_AsShader
,
4119 d3d10_effect_string_variable_AsBlend
,
4120 d3d10_effect_string_variable_AsDepthStencil
,
4121 d3d10_effect_string_variable_AsRasterizer
,
4122 d3d10_effect_string_variable_AsSampler
,
4123 d3d10_effect_string_variable_SetRawValue
,
4124 d3d10_effect_string_variable_GetRawValue
,
4125 /* ID3D10EffectStringVariable methods */
4126 d3d10_effect_string_variable_GetString
,
4127 d3d10_effect_string_variable_GetStringArray
,
4130 /* ID3D10EffectVariable methods */
4132 static BOOL STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_IsValid(ID3D10EffectShaderResourceVariable
*iface
)
4134 TRACE("iface %p\n", iface
);
4136 return (struct d3d10_effect_variable
*)iface
!= &null_shader_resource_variable
;
4139 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetType(
4140 ID3D10EffectShaderResourceVariable
*iface
)
4142 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
4145 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetDesc(
4146 ID3D10EffectShaderResourceVariable
*iface
, D3D10_EFFECT_VARIABLE_DESC
*desc
)
4148 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
4151 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetAnnotationByIndex(
4152 ID3D10EffectShaderResourceVariable
*iface
, UINT index
)
4154 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
4157 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetAnnotationByName(
4158 ID3D10EffectShaderResourceVariable
*iface
, LPCSTR name
)
4160 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
4163 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetMemberByIndex(
4164 ID3D10EffectShaderResourceVariable
*iface
, UINT index
)
4166 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
4169 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetMemberByName(
4170 ID3D10EffectShaderResourceVariable
*iface
, LPCSTR name
)
4172 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
4175 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetMemberBySemantic(
4176 ID3D10EffectShaderResourceVariable
*iface
, LPCSTR semantic
)
4178 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
4181 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetElement(
4182 ID3D10EffectShaderResourceVariable
*iface
, UINT index
)
4184 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
4187 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetParentConstantBuffer(
4188 ID3D10EffectShaderResourceVariable
*iface
)
4190 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
4193 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsScalar(
4194 ID3D10EffectShaderResourceVariable
*iface
)
4196 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
4199 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsVector(
4200 ID3D10EffectShaderResourceVariable
*iface
)
4202 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
4205 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsMatrix(
4206 ID3D10EffectShaderResourceVariable
*iface
)
4208 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
4211 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsString(
4212 ID3D10EffectShaderResourceVariable
*iface
)
4214 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
4217 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsShaderResource(
4218 ID3D10EffectShaderResourceVariable
*iface
)
4220 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
4223 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsRenderTargetView(
4224 ID3D10EffectShaderResourceVariable
*iface
)
4226 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
4229 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsDepthStencilView(
4230 ID3D10EffectShaderResourceVariable
*iface
)
4232 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
4235 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsConstantBuffer(
4236 ID3D10EffectShaderResourceVariable
*iface
)
4238 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
4241 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsShader(
4242 ID3D10EffectShaderResourceVariable
*iface
)
4244 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
4247 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsBlend(
4248 ID3D10EffectShaderResourceVariable
*iface
)
4250 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
4253 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsDepthStencil(
4254 ID3D10EffectShaderResourceVariable
*iface
)
4256 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
4259 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsRasterizer(
4260 ID3D10EffectShaderResourceVariable
*iface
)
4262 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
4265 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsSampler(
4266 ID3D10EffectShaderResourceVariable
*iface
)
4268 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
4271 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_SetRawValue(
4272 ID3D10EffectShaderResourceVariable
*iface
, void *data
, UINT offset
, UINT count
)
4274 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4277 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetRawValue(
4278 ID3D10EffectShaderResourceVariable
*iface
, void *data
, UINT offset
, UINT count
)
4280 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4283 /* ID3D10EffectShaderResourceVariable methods */
4285 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_SetResource(
4286 ID3D10EffectShaderResourceVariable
*iface
, ID3D10ShaderResourceView
*resource
)
4288 FIXME("iface %p, resource %p stub!\n", iface
, resource
);
4293 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetResource(
4294 ID3D10EffectShaderResourceVariable
*iface
, ID3D10ShaderResourceView
**resource
)
4296 FIXME("iface %p, resource %p stub!\n", iface
, resource
);
4301 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_SetResourceArray(
4302 ID3D10EffectShaderResourceVariable
*iface
, ID3D10ShaderResourceView
**resources
, UINT offset
, UINT count
)
4304 FIXME("iface %p, resources %p, offset %u, count %u stub!\n", iface
, resources
, offset
, count
);
4309 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetResourceArray(
4310 ID3D10EffectShaderResourceVariable
*iface
, ID3D10ShaderResourceView
**resources
, UINT offset
, UINT count
)
4312 FIXME("iface %p, resources %p, offset %u, count %u stub!\n", iface
, resources
, offset
, count
);
4318 static const struct ID3D10EffectShaderResourceVariableVtbl d3d10_effect_shader_resource_variable_vtbl
=
4320 /* ID3D10EffectVariable methods */
4321 d3d10_effect_shader_resource_variable_IsValid
,
4322 d3d10_effect_shader_resource_variable_GetType
,
4323 d3d10_effect_shader_resource_variable_GetDesc
,
4324 d3d10_effect_shader_resource_variable_GetAnnotationByIndex
,
4325 d3d10_effect_shader_resource_variable_GetAnnotationByName
,
4326 d3d10_effect_shader_resource_variable_GetMemberByIndex
,
4327 d3d10_effect_shader_resource_variable_GetMemberByName
,
4328 d3d10_effect_shader_resource_variable_GetMemberBySemantic
,
4329 d3d10_effect_shader_resource_variable_GetElement
,
4330 d3d10_effect_shader_resource_variable_GetParentConstantBuffer
,
4331 d3d10_effect_shader_resource_variable_AsScalar
,
4332 d3d10_effect_shader_resource_variable_AsVector
,
4333 d3d10_effect_shader_resource_variable_AsMatrix
,
4334 d3d10_effect_shader_resource_variable_AsString
,
4335 d3d10_effect_shader_resource_variable_AsShaderResource
,
4336 d3d10_effect_shader_resource_variable_AsRenderTargetView
,
4337 d3d10_effect_shader_resource_variable_AsDepthStencilView
,
4338 d3d10_effect_shader_resource_variable_AsConstantBuffer
,
4339 d3d10_effect_shader_resource_variable_AsShader
,
4340 d3d10_effect_shader_resource_variable_AsBlend
,
4341 d3d10_effect_shader_resource_variable_AsDepthStencil
,
4342 d3d10_effect_shader_resource_variable_AsRasterizer
,
4343 d3d10_effect_shader_resource_variable_AsSampler
,
4344 d3d10_effect_shader_resource_variable_SetRawValue
,
4345 d3d10_effect_shader_resource_variable_GetRawValue
,
4346 /* ID3D10EffectShaderResourceVariable methods */
4347 d3d10_effect_shader_resource_variable_SetResource
,
4348 d3d10_effect_shader_resource_variable_GetResource
,
4349 d3d10_effect_shader_resource_variable_SetResourceArray
,
4350 d3d10_effect_shader_resource_variable_GetResourceArray
,
4353 /* ID3D10EffectVariable methods */
4355 static BOOL STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_IsValid(
4356 ID3D10EffectRenderTargetViewVariable
*iface
)
4358 TRACE("iface %p\n", iface
);
4360 return (struct d3d10_effect_variable
*)iface
!= &null_render_target_view_variable
;
4363 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetType(
4364 ID3D10EffectRenderTargetViewVariable
*iface
)
4366 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
4369 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetDesc(
4370 ID3D10EffectRenderTargetViewVariable
*iface
, D3D10_EFFECT_VARIABLE_DESC
*desc
)
4372 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
4375 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetAnnotationByIndex(
4376 ID3D10EffectRenderTargetViewVariable
*iface
, UINT index
)
4378 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
4381 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetAnnotationByName(
4382 ID3D10EffectRenderTargetViewVariable
*iface
, LPCSTR name
)
4384 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
4387 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetMemberByIndex(
4388 ID3D10EffectRenderTargetViewVariable
*iface
, UINT index
)
4390 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
4393 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetMemberByName(
4394 ID3D10EffectRenderTargetViewVariable
*iface
, LPCSTR name
)
4396 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
4399 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetMemberBySemantic(
4400 ID3D10EffectRenderTargetViewVariable
*iface
, LPCSTR semantic
)
4402 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
4405 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetElement(
4406 ID3D10EffectRenderTargetViewVariable
*iface
, UINT index
)
4408 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
4411 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetParentConstantBuffer(
4412 ID3D10EffectRenderTargetViewVariable
*iface
)
4414 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
4417 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsScalar(
4418 ID3D10EffectRenderTargetViewVariable
*iface
)
4420 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
4423 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsVector(
4424 ID3D10EffectRenderTargetViewVariable
*iface
)
4426 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
4429 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsMatrix(
4430 ID3D10EffectRenderTargetViewVariable
*iface
)
4432 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
4435 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsString(
4436 ID3D10EffectRenderTargetViewVariable
*iface
)
4438 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
4441 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsShaderResource(
4442 ID3D10EffectRenderTargetViewVariable
*iface
)
4444 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
4447 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsRenderTargetView(
4448 ID3D10EffectRenderTargetViewVariable
*iface
)
4450 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
4453 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsDepthStencilView(
4454 ID3D10EffectRenderTargetViewVariable
*iface
)
4456 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
4459 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsConstantBuffer(
4460 ID3D10EffectRenderTargetViewVariable
*iface
)
4462 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
4465 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsShader(
4466 ID3D10EffectRenderTargetViewVariable
*iface
)
4468 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
4471 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsBlend(
4472 ID3D10EffectRenderTargetViewVariable
*iface
)
4474 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
4477 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsDepthStencil(
4478 ID3D10EffectRenderTargetViewVariable
*iface
)
4480 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
4483 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsRasterizer(
4484 ID3D10EffectRenderTargetViewVariable
*iface
)
4486 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
4489 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsSampler(
4490 ID3D10EffectRenderTargetViewVariable
*iface
)
4492 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
4495 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_SetRawValue(
4496 ID3D10EffectRenderTargetViewVariable
*iface
, void *data
, UINT offset
, UINT count
)
4498 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4501 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetRawValue(
4502 ID3D10EffectRenderTargetViewVariable
*iface
, void *data
, UINT offset
, UINT count
)
4504 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4507 /* ID3D10EffectRenderTargetViewVariable methods */
4509 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_SetRenderTarget(
4510 ID3D10EffectRenderTargetViewVariable
*iface
, ID3D10RenderTargetView
*view
)
4512 FIXME("iface %p, view %p stub!\n", iface
, view
);
4517 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetRenderTarget(
4518 ID3D10EffectRenderTargetViewVariable
*iface
, ID3D10RenderTargetView
**view
)
4520 FIXME("iface %p, view %p stub!\n", iface
, view
);
4525 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_SetRenderTargetArray(
4526 ID3D10EffectRenderTargetViewVariable
*iface
, ID3D10RenderTargetView
**views
, UINT offset
, UINT count
)
4528 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface
, views
, offset
, count
);
4533 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetRenderTargetArray(
4534 ID3D10EffectRenderTargetViewVariable
*iface
, ID3D10RenderTargetView
**views
, UINT offset
, UINT count
)
4536 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface
, views
, offset
, count
);
4542 static const struct ID3D10EffectRenderTargetViewVariableVtbl d3d10_effect_render_target_view_variable_vtbl
=
4544 /* ID3D10EffectVariable methods */
4545 d3d10_effect_render_target_view_variable_IsValid
,
4546 d3d10_effect_render_target_view_variable_GetType
,
4547 d3d10_effect_render_target_view_variable_GetDesc
,
4548 d3d10_effect_render_target_view_variable_GetAnnotationByIndex
,
4549 d3d10_effect_render_target_view_variable_GetAnnotationByName
,
4550 d3d10_effect_render_target_view_variable_GetMemberByIndex
,
4551 d3d10_effect_render_target_view_variable_GetMemberByName
,
4552 d3d10_effect_render_target_view_variable_GetMemberBySemantic
,
4553 d3d10_effect_render_target_view_variable_GetElement
,
4554 d3d10_effect_render_target_view_variable_GetParentConstantBuffer
,
4555 d3d10_effect_render_target_view_variable_AsScalar
,
4556 d3d10_effect_render_target_view_variable_AsVector
,
4557 d3d10_effect_render_target_view_variable_AsMatrix
,
4558 d3d10_effect_render_target_view_variable_AsString
,
4559 d3d10_effect_render_target_view_variable_AsShaderResource
,
4560 d3d10_effect_render_target_view_variable_AsRenderTargetView
,
4561 d3d10_effect_render_target_view_variable_AsDepthStencilView
,
4562 d3d10_effect_render_target_view_variable_AsConstantBuffer
,
4563 d3d10_effect_render_target_view_variable_AsShader
,
4564 d3d10_effect_render_target_view_variable_AsBlend
,
4565 d3d10_effect_render_target_view_variable_AsDepthStencil
,
4566 d3d10_effect_render_target_view_variable_AsRasterizer
,
4567 d3d10_effect_render_target_view_variable_AsSampler
,
4568 d3d10_effect_render_target_view_variable_SetRawValue
,
4569 d3d10_effect_render_target_view_variable_GetRawValue
,
4570 /* ID3D10EffectRenderTargetViewVariable methods */
4571 d3d10_effect_render_target_view_variable_SetRenderTarget
,
4572 d3d10_effect_render_target_view_variable_GetRenderTarget
,
4573 d3d10_effect_render_target_view_variable_SetRenderTargetArray
,
4574 d3d10_effect_render_target_view_variable_GetRenderTargetArray
,
4577 /* ID3D10EffectVariable methods */
4579 static BOOL STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_IsValid(
4580 ID3D10EffectDepthStencilViewVariable
*iface
)
4582 TRACE("iface %p\n", iface
);
4584 return (struct d3d10_effect_variable
*)iface
!= &null_depth_stencil_view_variable
;
4587 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetType(
4588 ID3D10EffectDepthStencilViewVariable
*iface
)
4590 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
4593 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetDesc(
4594 ID3D10EffectDepthStencilViewVariable
*iface
, D3D10_EFFECT_VARIABLE_DESC
*desc
)
4596 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
4599 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetAnnotationByIndex(
4600 ID3D10EffectDepthStencilViewVariable
*iface
, UINT index
)
4602 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
4605 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetAnnotationByName(
4606 ID3D10EffectDepthStencilViewVariable
*iface
, LPCSTR name
)
4608 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
4611 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetMemberByIndex(
4612 ID3D10EffectDepthStencilViewVariable
*iface
, UINT index
)
4614 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
4617 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetMemberByName(
4618 ID3D10EffectDepthStencilViewVariable
*iface
, LPCSTR name
)
4620 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
4623 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetMemberBySemantic(
4624 ID3D10EffectDepthStencilViewVariable
*iface
, LPCSTR semantic
)
4626 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
4629 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetElement(
4630 ID3D10EffectDepthStencilViewVariable
*iface
, UINT index
)
4632 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
4635 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetParentConstantBuffer(
4636 ID3D10EffectDepthStencilViewVariable
*iface
)
4638 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
4641 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsScalar(
4642 ID3D10EffectDepthStencilViewVariable
*iface
)
4644 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
4647 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsVector(
4648 ID3D10EffectDepthStencilViewVariable
*iface
)
4650 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
4653 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsMatrix(
4654 ID3D10EffectDepthStencilViewVariable
*iface
)
4656 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
4659 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsString(
4660 ID3D10EffectDepthStencilViewVariable
*iface
)
4662 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
4665 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsShaderResource(
4666 ID3D10EffectDepthStencilViewVariable
*iface
)
4668 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
4671 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsRenderTargetView(
4672 ID3D10EffectDepthStencilViewVariable
*iface
)
4674 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
4677 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsDepthStencilView(
4678 ID3D10EffectDepthStencilViewVariable
*iface
)
4680 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
4683 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsConstantBuffer(
4684 ID3D10EffectDepthStencilViewVariable
*iface
)
4686 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
4689 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsShader(
4690 ID3D10EffectDepthStencilViewVariable
*iface
)
4692 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
4695 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsBlend(
4696 ID3D10EffectDepthStencilViewVariable
*iface
)
4698 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
4701 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsDepthStencil(
4702 ID3D10EffectDepthStencilViewVariable
*iface
)
4704 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
4707 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsRasterizer(
4708 ID3D10EffectDepthStencilViewVariable
*iface
)
4710 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
4713 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsSampler(
4714 ID3D10EffectDepthStencilViewVariable
*iface
)
4716 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
4719 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_SetRawValue(
4720 ID3D10EffectDepthStencilViewVariable
*iface
, void *data
, UINT offset
, UINT count
)
4722 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4725 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetRawValue(
4726 ID3D10EffectDepthStencilViewVariable
*iface
, void *data
, UINT offset
, UINT count
)
4728 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4731 /* ID3D10EffectDepthStencilViewVariable methods */
4733 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_SetDepthStencil(
4734 ID3D10EffectDepthStencilViewVariable
*iface
, ID3D10DepthStencilView
*view
)
4736 FIXME("iface %p, view %p stub!\n", iface
, view
);
4741 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetDepthStencil(
4742 ID3D10EffectDepthStencilViewVariable
*iface
, ID3D10DepthStencilView
**view
)
4744 FIXME("iface %p, view %p stub!\n", iface
, view
);
4749 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_SetDepthStencilArray(
4750 ID3D10EffectDepthStencilViewVariable
*iface
, ID3D10DepthStencilView
**views
, UINT offset
, UINT count
)
4752 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface
, views
, offset
, count
);
4757 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetDepthStencilArray(
4758 ID3D10EffectDepthStencilViewVariable
*iface
, ID3D10DepthStencilView
**views
, UINT offset
, UINT count
)
4760 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface
, views
, offset
, count
);
4766 static const struct ID3D10EffectDepthStencilViewVariableVtbl d3d10_effect_depth_stencil_view_variable_vtbl
=
4768 /* ID3D10EffectVariable methods */
4769 d3d10_effect_depth_stencil_view_variable_IsValid
,
4770 d3d10_effect_depth_stencil_view_variable_GetType
,
4771 d3d10_effect_depth_stencil_view_variable_GetDesc
,
4772 d3d10_effect_depth_stencil_view_variable_GetAnnotationByIndex
,
4773 d3d10_effect_depth_stencil_view_variable_GetAnnotationByName
,
4774 d3d10_effect_depth_stencil_view_variable_GetMemberByIndex
,
4775 d3d10_effect_depth_stencil_view_variable_GetMemberByName
,
4776 d3d10_effect_depth_stencil_view_variable_GetMemberBySemantic
,
4777 d3d10_effect_depth_stencil_view_variable_GetElement
,
4778 d3d10_effect_depth_stencil_view_variable_GetParentConstantBuffer
,
4779 d3d10_effect_depth_stencil_view_variable_AsScalar
,
4780 d3d10_effect_depth_stencil_view_variable_AsVector
,
4781 d3d10_effect_depth_stencil_view_variable_AsMatrix
,
4782 d3d10_effect_depth_stencil_view_variable_AsString
,
4783 d3d10_effect_depth_stencil_view_variable_AsShaderResource
,
4784 d3d10_effect_depth_stencil_view_variable_AsRenderTargetView
,
4785 d3d10_effect_depth_stencil_view_variable_AsDepthStencilView
,
4786 d3d10_effect_depth_stencil_view_variable_AsConstantBuffer
,
4787 d3d10_effect_depth_stencil_view_variable_AsShader
,
4788 d3d10_effect_depth_stencil_view_variable_AsBlend
,
4789 d3d10_effect_depth_stencil_view_variable_AsDepthStencil
,
4790 d3d10_effect_depth_stencil_view_variable_AsRasterizer
,
4791 d3d10_effect_depth_stencil_view_variable_AsSampler
,
4792 d3d10_effect_depth_stencil_view_variable_SetRawValue
,
4793 d3d10_effect_depth_stencil_view_variable_GetRawValue
,
4794 /* ID3D10EffectDepthStencilViewVariable methods */
4795 d3d10_effect_depth_stencil_view_variable_SetDepthStencil
,
4796 d3d10_effect_depth_stencil_view_variable_GetDepthStencil
,
4797 d3d10_effect_depth_stencil_view_variable_SetDepthStencilArray
,
4798 d3d10_effect_depth_stencil_view_variable_GetDepthStencilArray
,
4801 /* ID3D10EffectVariable methods */
4803 static BOOL STDMETHODCALLTYPE
d3d10_effect_shader_variable_IsValid(ID3D10EffectShaderVariable
*iface
)
4805 TRACE("iface %p\n", iface
);
4807 return (struct d3d10_effect_variable
*)iface
!= &null_shader_variable
;
4810 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetType(
4811 ID3D10EffectShaderVariable
*iface
)
4813 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
4816 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetDesc(ID3D10EffectShaderVariable
*iface
,
4817 D3D10_EFFECT_VARIABLE_DESC
*desc
)
4819 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
4822 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetAnnotationByIndex(
4823 ID3D10EffectShaderVariable
*iface
, UINT index
)
4825 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
4828 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetAnnotationByName(
4829 ID3D10EffectShaderVariable
*iface
, LPCSTR name
)
4831 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
4834 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetMemberByIndex(
4835 ID3D10EffectShaderVariable
*iface
, UINT index
)
4837 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
4840 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetMemberByName(
4841 ID3D10EffectShaderVariable
*iface
, LPCSTR name
)
4843 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
4846 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetMemberBySemantic(
4847 ID3D10EffectShaderVariable
*iface
, LPCSTR semantic
)
4849 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
4852 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetElement(
4853 ID3D10EffectShaderVariable
*iface
, UINT index
)
4855 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
4858 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetParentConstantBuffer(
4859 ID3D10EffectShaderVariable
*iface
)
4861 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
4864 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsScalar(
4865 ID3D10EffectShaderVariable
*iface
)
4867 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
4870 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsVector(
4871 ID3D10EffectShaderVariable
*iface
)
4873 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
4876 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsMatrix(
4877 ID3D10EffectShaderVariable
*iface
)
4879 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
4882 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsString(
4883 ID3D10EffectShaderVariable
*iface
)
4885 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
4888 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsShaderResource(
4889 ID3D10EffectShaderVariable
*iface
)
4891 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
4894 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsRenderTargetView(
4895 ID3D10EffectShaderVariable
*iface
)
4897 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
4900 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsDepthStencilView(
4901 ID3D10EffectShaderVariable
*iface
)
4903 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
4906 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsConstantBuffer(
4907 ID3D10EffectShaderVariable
*iface
)
4909 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
4912 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsShader(
4913 ID3D10EffectShaderVariable
*iface
)
4915 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
4918 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsBlend(
4919 ID3D10EffectShaderVariable
*iface
)
4921 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
4924 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsDepthStencil(
4925 ID3D10EffectShaderVariable
*iface
)
4927 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
4930 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsRasterizer(
4931 ID3D10EffectShaderVariable
*iface
)
4933 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
4936 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsSampler(
4937 ID3D10EffectShaderVariable
*iface
)
4939 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
4942 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_SetRawValue(
4943 ID3D10EffectShaderVariable
*iface
, void *data
, UINT offset
, UINT count
)
4945 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4948 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetRawValue(
4949 ID3D10EffectShaderVariable
*iface
, void *data
, UINT offset
, UINT count
)
4951 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4954 /* ID3D10EffectShaderVariable methods */
4956 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetShaderDesc(
4957 ID3D10EffectShaderVariable
*iface
, UINT index
, D3D10_EFFECT_SHADER_DESC
*desc
)
4959 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
4964 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetVertexShader(
4965 ID3D10EffectShaderVariable
*iface
, UINT index
, ID3D10VertexShader
**shader
)
4967 FIXME("iface %p, index %u, shader %p stub!\n", iface
, index
, shader
);
4972 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetGeometryShader(
4973 ID3D10EffectShaderVariable
*iface
, UINT index
, ID3D10GeometryShader
**shader
)
4975 FIXME("iface %p, index %u, shader %p stub!\n", iface
, index
, shader
);
4980 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetPixelShader(
4981 ID3D10EffectShaderVariable
*iface
, UINT index
, ID3D10PixelShader
**shader
)
4983 FIXME("iface %p, index %u, shader %p stub!\n", iface
, index
, shader
);
4988 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetInputSignatureElementDesc(
4989 ID3D10EffectShaderVariable
*iface
, UINT shader_index
, UINT element_index
,
4990 D3D10_SIGNATURE_PARAMETER_DESC
*desc
)
4992 FIXME("iface %p, shader_index %u, element_index %u, desc %p stub!\n",
4993 iface
, shader_index
, element_index
, desc
);
4998 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetOutputSignatureElementDesc(
4999 ID3D10EffectShaderVariable
*iface
, UINT shader_index
, UINT element_index
,
5000 D3D10_SIGNATURE_PARAMETER_DESC
*desc
)
5002 FIXME("iface %p, shader_index %u, element_index %u, desc %p stub!\n",
5003 iface
, shader_index
, element_index
, desc
);
5009 static const struct ID3D10EffectShaderVariableVtbl d3d10_effect_shader_variable_vtbl
=
5011 /* ID3D10EffectVariable methods */
5012 d3d10_effect_shader_variable_IsValid
,
5013 d3d10_effect_shader_variable_GetType
,
5014 d3d10_effect_shader_variable_GetDesc
,
5015 d3d10_effect_shader_variable_GetAnnotationByIndex
,
5016 d3d10_effect_shader_variable_GetAnnotationByName
,
5017 d3d10_effect_shader_variable_GetMemberByIndex
,
5018 d3d10_effect_shader_variable_GetMemberByName
,
5019 d3d10_effect_shader_variable_GetMemberBySemantic
,
5020 d3d10_effect_shader_variable_GetElement
,
5021 d3d10_effect_shader_variable_GetParentConstantBuffer
,
5022 d3d10_effect_shader_variable_AsScalar
,
5023 d3d10_effect_shader_variable_AsVector
,
5024 d3d10_effect_shader_variable_AsMatrix
,
5025 d3d10_effect_shader_variable_AsString
,
5026 d3d10_effect_shader_variable_AsShaderResource
,
5027 d3d10_effect_shader_variable_AsRenderTargetView
,
5028 d3d10_effect_shader_variable_AsDepthStencilView
,
5029 d3d10_effect_shader_variable_AsConstantBuffer
,
5030 d3d10_effect_shader_variable_AsShader
,
5031 d3d10_effect_shader_variable_AsBlend
,
5032 d3d10_effect_shader_variable_AsDepthStencil
,
5033 d3d10_effect_shader_variable_AsRasterizer
,
5034 d3d10_effect_shader_variable_AsSampler
,
5035 d3d10_effect_shader_variable_SetRawValue
,
5036 d3d10_effect_shader_variable_GetRawValue
,
5037 /* ID3D10EffectShaderVariable methods */
5038 d3d10_effect_shader_variable_GetShaderDesc
,
5039 d3d10_effect_shader_variable_GetVertexShader
,
5040 d3d10_effect_shader_variable_GetGeometryShader
,
5041 d3d10_effect_shader_variable_GetPixelShader
,
5042 d3d10_effect_shader_variable_GetInputSignatureElementDesc
,
5043 d3d10_effect_shader_variable_GetOutputSignatureElementDesc
,
5046 /* ID3D10EffectVariable methods */
5048 static BOOL STDMETHODCALLTYPE
d3d10_effect_blend_variable_IsValid(ID3D10EffectBlendVariable
*iface
)
5050 TRACE("iface %p\n", iface
);
5052 return (struct d3d10_effect_variable
*)iface
!= &null_blend_variable
;
5055 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetType(
5056 ID3D10EffectBlendVariable
*iface
)
5058 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
5061 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetDesc(ID3D10EffectBlendVariable
*iface
,
5062 D3D10_EFFECT_VARIABLE_DESC
*desc
)
5064 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
5067 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetAnnotationByIndex(
5068 ID3D10EffectBlendVariable
*iface
, UINT index
)
5070 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
5073 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetAnnotationByName(
5074 ID3D10EffectBlendVariable
*iface
, LPCSTR name
)
5076 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
5079 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetMemberByIndex(
5080 ID3D10EffectBlendVariable
*iface
, UINT index
)
5082 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
5085 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetMemberByName(
5086 ID3D10EffectBlendVariable
*iface
, LPCSTR name
)
5088 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
5091 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetMemberBySemantic(
5092 ID3D10EffectBlendVariable
*iface
, LPCSTR semantic
)
5094 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
5097 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetElement(
5098 ID3D10EffectBlendVariable
*iface
, UINT index
)
5100 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
5103 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetParentConstantBuffer(
5104 ID3D10EffectBlendVariable
*iface
)
5106 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
5109 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsScalar(
5110 ID3D10EffectBlendVariable
*iface
)
5112 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
5115 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsVector(
5116 ID3D10EffectBlendVariable
*iface
)
5118 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
5121 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsMatrix(
5122 ID3D10EffectBlendVariable
*iface
)
5124 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
5127 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsString(
5128 ID3D10EffectBlendVariable
*iface
)
5130 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
5133 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsShaderResource(
5134 ID3D10EffectBlendVariable
*iface
)
5136 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
5139 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsRenderTargetView(
5140 ID3D10EffectBlendVariable
*iface
)
5142 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
5145 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsDepthStencilView(
5146 ID3D10EffectBlendVariable
*iface
)
5148 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
5151 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsConstantBuffer(
5152 ID3D10EffectBlendVariable
*iface
)
5154 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
5157 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsShader(
5158 ID3D10EffectBlendVariable
*iface
)
5160 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
5163 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsBlend(
5164 ID3D10EffectBlendVariable
*iface
)
5166 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
5169 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsDepthStencil(
5170 ID3D10EffectBlendVariable
*iface
)
5172 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
5175 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsRasterizer(
5176 ID3D10EffectBlendVariable
*iface
)
5178 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
5181 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsSampler(
5182 ID3D10EffectBlendVariable
*iface
)
5184 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
5187 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_SetRawValue(ID3D10EffectBlendVariable
*iface
,
5188 void *data
, UINT offset
, UINT count
)
5190 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5193 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetRawValue(ID3D10EffectBlendVariable
*iface
,
5194 void *data
, UINT offset
, UINT count
)
5196 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5199 /* ID3D10EffectBlendVariable methods */
5201 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetBlendState(ID3D10EffectBlendVariable
*iface
,
5202 UINT index
, ID3D10BlendState
**blend_state
)
5204 FIXME("iface %p, index %u, blend_state %p stub!\n", iface
, index
, blend_state
);
5209 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetBackingStore(ID3D10EffectBlendVariable
*iface
,
5210 UINT index
, D3D10_BLEND_DESC
*desc
)
5212 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
5218 static const struct ID3D10EffectBlendVariableVtbl d3d10_effect_blend_variable_vtbl
=
5220 /* ID3D10EffectVariable methods */
5221 d3d10_effect_blend_variable_IsValid
,
5222 d3d10_effect_blend_variable_GetType
,
5223 d3d10_effect_blend_variable_GetDesc
,
5224 d3d10_effect_blend_variable_GetAnnotationByIndex
,
5225 d3d10_effect_blend_variable_GetAnnotationByName
,
5226 d3d10_effect_blend_variable_GetMemberByIndex
,
5227 d3d10_effect_blend_variable_GetMemberByName
,
5228 d3d10_effect_blend_variable_GetMemberBySemantic
,
5229 d3d10_effect_blend_variable_GetElement
,
5230 d3d10_effect_blend_variable_GetParentConstantBuffer
,
5231 d3d10_effect_blend_variable_AsScalar
,
5232 d3d10_effect_blend_variable_AsVector
,
5233 d3d10_effect_blend_variable_AsMatrix
,
5234 d3d10_effect_blend_variable_AsString
,
5235 d3d10_effect_blend_variable_AsShaderResource
,
5236 d3d10_effect_blend_variable_AsRenderTargetView
,
5237 d3d10_effect_blend_variable_AsDepthStencilView
,
5238 d3d10_effect_blend_variable_AsConstantBuffer
,
5239 d3d10_effect_blend_variable_AsShader
,
5240 d3d10_effect_blend_variable_AsBlend
,
5241 d3d10_effect_blend_variable_AsDepthStencil
,
5242 d3d10_effect_blend_variable_AsRasterizer
,
5243 d3d10_effect_blend_variable_AsSampler
,
5244 d3d10_effect_blend_variable_SetRawValue
,
5245 d3d10_effect_blend_variable_GetRawValue
,
5246 /* ID3D10EffectBlendVariable methods */
5247 d3d10_effect_blend_variable_GetBlendState
,
5248 d3d10_effect_blend_variable_GetBackingStore
,
5251 /* ID3D10EffectVariable methods */
5253 static BOOL STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_IsValid(ID3D10EffectDepthStencilVariable
*iface
)
5255 TRACE("iface %p\n", iface
);
5257 return (struct d3d10_effect_variable
*)iface
!= &null_depth_stencil_variable
;
5260 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetType(
5261 ID3D10EffectDepthStencilVariable
*iface
)
5263 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
5266 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetDesc(ID3D10EffectDepthStencilVariable
*iface
,
5267 D3D10_EFFECT_VARIABLE_DESC
*desc
)
5269 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
5272 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetAnnotationByIndex(
5273 ID3D10EffectDepthStencilVariable
*iface
, UINT index
)
5275 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
5278 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetAnnotationByName(
5279 ID3D10EffectDepthStencilVariable
*iface
, LPCSTR name
)
5281 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
5284 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetMemberByIndex(
5285 ID3D10EffectDepthStencilVariable
*iface
, UINT index
)
5287 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
5290 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetMemberByName(
5291 ID3D10EffectDepthStencilVariable
*iface
, LPCSTR name
)
5293 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
5296 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetMemberBySemantic(
5297 ID3D10EffectDepthStencilVariable
*iface
, LPCSTR semantic
)
5299 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
5302 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetElement(
5303 ID3D10EffectDepthStencilVariable
*iface
, UINT index
)
5305 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
5308 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetParentConstantBuffer(
5309 ID3D10EffectDepthStencilVariable
*iface
)
5311 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
5314 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsScalar(
5315 ID3D10EffectDepthStencilVariable
*iface
)
5317 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
5320 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsVector(
5321 ID3D10EffectDepthStencilVariable
*iface
)
5323 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
5326 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsMatrix(
5327 ID3D10EffectDepthStencilVariable
*iface
)
5329 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
5332 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsString(
5333 ID3D10EffectDepthStencilVariable
*iface
)
5335 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
5338 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsShaderResource(
5339 ID3D10EffectDepthStencilVariable
*iface
)
5341 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
5344 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsRenderTargetView(
5345 ID3D10EffectDepthStencilVariable
*iface
)
5347 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
5350 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsDepthStencilView(
5351 ID3D10EffectDepthStencilVariable
*iface
)
5353 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
5356 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsConstantBuffer(
5357 ID3D10EffectDepthStencilVariable
*iface
)
5359 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
5362 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsShader(
5363 ID3D10EffectDepthStencilVariable
*iface
)
5365 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
5368 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsBlend(
5369 ID3D10EffectDepthStencilVariable
*iface
)
5371 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
5374 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsDepthStencil(
5375 ID3D10EffectDepthStencilVariable
*iface
)
5377 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
5380 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsRasterizer(
5381 ID3D10EffectDepthStencilVariable
*iface
)
5383 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
5386 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsSampler(
5387 ID3D10EffectDepthStencilVariable
*iface
)
5389 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
5392 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_SetRawValue(ID3D10EffectDepthStencilVariable
*iface
,
5393 void *data
, UINT offset
, UINT count
)
5395 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5398 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetRawValue(ID3D10EffectDepthStencilVariable
*iface
,
5399 void *data
, UINT offset
, UINT count
)
5401 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5404 /* ID3D10EffectDepthStencilVariable methods */
5406 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetDepthStencilState(ID3D10EffectDepthStencilVariable
*iface
,
5407 UINT index
, ID3D10DepthStencilState
**depth_stencil_state
)
5409 FIXME("iface %p, index %u, depth_stencil_state %p stub!\n", iface
, index
, depth_stencil_state
);
5414 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetBackingStore(ID3D10EffectDepthStencilVariable
*iface
,
5415 UINT index
, D3D10_DEPTH_STENCIL_DESC
*desc
)
5417 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
5423 static const struct ID3D10EffectDepthStencilVariableVtbl d3d10_effect_depth_stencil_variable_vtbl
=
5425 /* ID3D10EffectVariable methods */
5426 d3d10_effect_depth_stencil_variable_IsValid
,
5427 d3d10_effect_depth_stencil_variable_GetType
,
5428 d3d10_effect_depth_stencil_variable_GetDesc
,
5429 d3d10_effect_depth_stencil_variable_GetAnnotationByIndex
,
5430 d3d10_effect_depth_stencil_variable_GetAnnotationByName
,
5431 d3d10_effect_depth_stencil_variable_GetMemberByIndex
,
5432 d3d10_effect_depth_stencil_variable_GetMemberByName
,
5433 d3d10_effect_depth_stencil_variable_GetMemberBySemantic
,
5434 d3d10_effect_depth_stencil_variable_GetElement
,
5435 d3d10_effect_depth_stencil_variable_GetParentConstantBuffer
,
5436 d3d10_effect_depth_stencil_variable_AsScalar
,
5437 d3d10_effect_depth_stencil_variable_AsVector
,
5438 d3d10_effect_depth_stencil_variable_AsMatrix
,
5439 d3d10_effect_depth_stencil_variable_AsString
,
5440 d3d10_effect_depth_stencil_variable_AsShaderResource
,
5441 d3d10_effect_depth_stencil_variable_AsRenderTargetView
,
5442 d3d10_effect_depth_stencil_variable_AsDepthStencilView
,
5443 d3d10_effect_depth_stencil_variable_AsConstantBuffer
,
5444 d3d10_effect_depth_stencil_variable_AsShader
,
5445 d3d10_effect_depth_stencil_variable_AsBlend
,
5446 d3d10_effect_depth_stencil_variable_AsDepthStencil
,
5447 d3d10_effect_depth_stencil_variable_AsRasterizer
,
5448 d3d10_effect_depth_stencil_variable_AsSampler
,
5449 d3d10_effect_depth_stencil_variable_SetRawValue
,
5450 d3d10_effect_depth_stencil_variable_GetRawValue
,
5451 /* ID3D10EffectDepthStencilVariable methods */
5452 d3d10_effect_depth_stencil_variable_GetDepthStencilState
,
5453 d3d10_effect_depth_stencil_variable_GetBackingStore
,
5456 /* ID3D10EffectVariable methods */
5458 static BOOL STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_IsValid(ID3D10EffectRasterizerVariable
*iface
)
5460 TRACE("iface %p\n", iface
);
5462 return (struct d3d10_effect_variable
*)iface
!= &null_rasterizer_variable
;
5465 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetType(
5466 ID3D10EffectRasterizerVariable
*iface
)
5468 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
5471 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetDesc(ID3D10EffectRasterizerVariable
*iface
,
5472 D3D10_EFFECT_VARIABLE_DESC
*desc
)
5474 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
5477 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetAnnotationByIndex(
5478 ID3D10EffectRasterizerVariable
*iface
, UINT index
)
5480 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
5483 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetAnnotationByName(
5484 ID3D10EffectRasterizerVariable
*iface
, LPCSTR name
)
5486 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
5489 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetMemberByIndex(
5490 ID3D10EffectRasterizerVariable
*iface
, UINT index
)
5492 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
5495 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetMemberByName(
5496 ID3D10EffectRasterizerVariable
*iface
, LPCSTR name
)
5498 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
5501 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetMemberBySemantic(
5502 ID3D10EffectRasterizerVariable
*iface
, LPCSTR semantic
)
5504 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
5507 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetElement(
5508 ID3D10EffectRasterizerVariable
*iface
, UINT index
)
5510 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
5513 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetParentConstantBuffer(
5514 ID3D10EffectRasterizerVariable
*iface
)
5516 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
5519 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsScalar(
5520 ID3D10EffectRasterizerVariable
*iface
)
5522 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
5525 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsVector(
5526 ID3D10EffectRasterizerVariable
*iface
)
5528 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
5531 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsMatrix(
5532 ID3D10EffectRasterizerVariable
*iface
)
5534 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
5537 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsString(
5538 ID3D10EffectRasterizerVariable
*iface
)
5540 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
5543 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsShaderResource(
5544 ID3D10EffectRasterizerVariable
*iface
)
5546 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
5549 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsRenderTargetView(
5550 ID3D10EffectRasterizerVariable
*iface
)
5552 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
5555 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsDepthStencilView(
5556 ID3D10EffectRasterizerVariable
*iface
)
5558 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
5561 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsConstantBuffer(
5562 ID3D10EffectRasterizerVariable
*iface
)
5564 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
5567 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsShader(
5568 ID3D10EffectRasterizerVariable
*iface
)
5570 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
5573 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsBlend(
5574 ID3D10EffectRasterizerVariable
*iface
)
5576 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
5579 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsDepthStencil(
5580 ID3D10EffectRasterizerVariable
*iface
)
5582 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
5585 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsRasterizer(
5586 ID3D10EffectRasterizerVariable
*iface
)
5588 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
5591 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsSampler(
5592 ID3D10EffectRasterizerVariable
*iface
)
5594 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
5597 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_SetRawValue(ID3D10EffectRasterizerVariable
*iface
,
5598 void *data
, UINT offset
, UINT count
)
5600 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5603 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetRawValue(ID3D10EffectRasterizerVariable
*iface
,
5604 void *data
, UINT offset
, UINT count
)
5606 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5609 /* ID3D10EffectRasterizerVariable methods */
5611 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetRasterizerState(ID3D10EffectRasterizerVariable
*iface
,
5612 UINT index
, ID3D10RasterizerState
**rasterizer_state
)
5614 FIXME("iface %p, index %u, rasterizer_state %p stub!\n", iface
, index
, rasterizer_state
);
5619 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetBackingStore(ID3D10EffectRasterizerVariable
*iface
,
5620 UINT index
, D3D10_RASTERIZER_DESC
*desc
)
5622 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
5628 static const struct ID3D10EffectRasterizerVariableVtbl d3d10_effect_rasterizer_variable_vtbl
=
5630 /* ID3D10EffectVariable methods */
5631 d3d10_effect_rasterizer_variable_IsValid
,
5632 d3d10_effect_rasterizer_variable_GetType
,
5633 d3d10_effect_rasterizer_variable_GetDesc
,
5634 d3d10_effect_rasterizer_variable_GetAnnotationByIndex
,
5635 d3d10_effect_rasterizer_variable_GetAnnotationByName
,
5636 d3d10_effect_rasterizer_variable_GetMemberByIndex
,
5637 d3d10_effect_rasterizer_variable_GetMemberByName
,
5638 d3d10_effect_rasterizer_variable_GetMemberBySemantic
,
5639 d3d10_effect_rasterizer_variable_GetElement
,
5640 d3d10_effect_rasterizer_variable_GetParentConstantBuffer
,
5641 d3d10_effect_rasterizer_variable_AsScalar
,
5642 d3d10_effect_rasterizer_variable_AsVector
,
5643 d3d10_effect_rasterizer_variable_AsMatrix
,
5644 d3d10_effect_rasterizer_variable_AsString
,
5645 d3d10_effect_rasterizer_variable_AsShaderResource
,
5646 d3d10_effect_rasterizer_variable_AsRenderTargetView
,
5647 d3d10_effect_rasterizer_variable_AsDepthStencilView
,
5648 d3d10_effect_rasterizer_variable_AsConstantBuffer
,
5649 d3d10_effect_rasterizer_variable_AsShader
,
5650 d3d10_effect_rasterizer_variable_AsBlend
,
5651 d3d10_effect_rasterizer_variable_AsDepthStencil
,
5652 d3d10_effect_rasterizer_variable_AsRasterizer
,
5653 d3d10_effect_rasterizer_variable_AsSampler
,
5654 d3d10_effect_rasterizer_variable_SetRawValue
,
5655 d3d10_effect_rasterizer_variable_GetRawValue
,
5656 /* ID3D10EffectRasterizerVariable methods */
5657 d3d10_effect_rasterizer_variable_GetRasterizerState
,
5658 d3d10_effect_rasterizer_variable_GetBackingStore
,
5661 /* ID3D10EffectVariable methods */
5663 static BOOL STDMETHODCALLTYPE
d3d10_effect_sampler_variable_IsValid(ID3D10EffectSamplerVariable
*iface
)
5665 TRACE("iface %p\n", iface
);
5667 return (struct d3d10_effect_variable
*)iface
!= &null_sampler_variable
;
5670 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetType(
5671 ID3D10EffectSamplerVariable
*iface
)
5673 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
5676 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetDesc(ID3D10EffectSamplerVariable
*iface
,
5677 D3D10_EFFECT_VARIABLE_DESC
*desc
)
5679 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
5682 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetAnnotationByIndex(
5683 ID3D10EffectSamplerVariable
*iface
, UINT index
)
5685 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
5688 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetAnnotationByName(
5689 ID3D10EffectSamplerVariable
*iface
, LPCSTR name
)
5691 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
5694 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetMemberByIndex(
5695 ID3D10EffectSamplerVariable
*iface
, UINT index
)
5697 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
5700 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetMemberByName(
5701 ID3D10EffectSamplerVariable
*iface
, LPCSTR name
)
5703 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
5706 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetMemberBySemantic(
5707 ID3D10EffectSamplerVariable
*iface
, LPCSTR semantic
)
5709 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
5712 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetElement(
5713 ID3D10EffectSamplerVariable
*iface
, UINT index
)
5715 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
5718 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetParentConstantBuffer(
5719 ID3D10EffectSamplerVariable
*iface
)
5721 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
5724 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsScalar(
5725 ID3D10EffectSamplerVariable
*iface
)
5727 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
5730 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsVector(
5731 ID3D10EffectSamplerVariable
*iface
)
5733 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
5736 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsMatrix(
5737 ID3D10EffectSamplerVariable
*iface
)
5739 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
5742 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsString(
5743 ID3D10EffectSamplerVariable
*iface
)
5745 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
5748 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsShaderResource(
5749 ID3D10EffectSamplerVariable
*iface
)
5751 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
5754 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsRenderTargetView(
5755 ID3D10EffectSamplerVariable
*iface
)
5757 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
5760 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsDepthStencilView(
5761 ID3D10EffectSamplerVariable
*iface
)
5763 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
5766 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsConstantBuffer(
5767 ID3D10EffectSamplerVariable
*iface
)
5769 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
5772 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsShader(
5773 ID3D10EffectSamplerVariable
*iface
)
5775 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
5778 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsBlend(
5779 ID3D10EffectSamplerVariable
*iface
)
5781 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
5784 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsDepthStencil(
5785 ID3D10EffectSamplerVariable
*iface
)
5787 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
5790 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsRasterizer(
5791 ID3D10EffectSamplerVariable
*iface
)
5793 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
5796 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsSampler(
5797 ID3D10EffectSamplerVariable
*iface
)
5799 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
5802 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_SetRawValue(ID3D10EffectSamplerVariable
*iface
,
5803 void *data
, UINT offset
, UINT count
)
5805 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5808 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetRawValue(ID3D10EffectSamplerVariable
*iface
,
5809 void *data
, UINT offset
, UINT count
)
5811 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5814 /* ID3D10EffectSamplerVariable methods */
5816 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetSampler(ID3D10EffectSamplerVariable
*iface
,
5817 UINT index
, ID3D10SamplerState
**sampler
)
5819 FIXME("iface %p, index %u, sampler %p stub!\n", iface
, index
, sampler
);
5824 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetBackingStore(ID3D10EffectSamplerVariable
*iface
,
5825 UINT index
, D3D10_SAMPLER_DESC
*desc
)
5827 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
5833 static const struct ID3D10EffectSamplerVariableVtbl d3d10_effect_sampler_variable_vtbl
=
5835 /* ID3D10EffectVariable methods */
5836 d3d10_effect_sampler_variable_IsValid
,
5837 d3d10_effect_sampler_variable_GetType
,
5838 d3d10_effect_sampler_variable_GetDesc
,
5839 d3d10_effect_sampler_variable_GetAnnotationByIndex
,
5840 d3d10_effect_sampler_variable_GetAnnotationByName
,
5841 d3d10_effect_sampler_variable_GetMemberByIndex
,
5842 d3d10_effect_sampler_variable_GetMemberByName
,
5843 d3d10_effect_sampler_variable_GetMemberBySemantic
,
5844 d3d10_effect_sampler_variable_GetElement
,
5845 d3d10_effect_sampler_variable_GetParentConstantBuffer
,
5846 d3d10_effect_sampler_variable_AsScalar
,
5847 d3d10_effect_sampler_variable_AsVector
,
5848 d3d10_effect_sampler_variable_AsMatrix
,
5849 d3d10_effect_sampler_variable_AsString
,
5850 d3d10_effect_sampler_variable_AsShaderResource
,
5851 d3d10_effect_sampler_variable_AsRenderTargetView
,
5852 d3d10_effect_sampler_variable_AsDepthStencilView
,
5853 d3d10_effect_sampler_variable_AsConstantBuffer
,
5854 d3d10_effect_sampler_variable_AsShader
,
5855 d3d10_effect_sampler_variable_AsBlend
,
5856 d3d10_effect_sampler_variable_AsDepthStencil
,
5857 d3d10_effect_sampler_variable_AsRasterizer
,
5858 d3d10_effect_sampler_variable_AsSampler
,
5859 d3d10_effect_sampler_variable_SetRawValue
,
5860 d3d10_effect_sampler_variable_GetRawValue
,
5861 /* ID3D10EffectSamplerVariable methods */
5862 d3d10_effect_sampler_variable_GetSampler
,
5863 d3d10_effect_sampler_variable_GetBackingStore
,
5866 /* ID3D10EffectType methods */
5868 static BOOL STDMETHODCALLTYPE
d3d10_effect_type_IsValid(ID3D10EffectType
*iface
)
5870 FIXME("iface %p stub!\n", iface
);
5875 static HRESULT STDMETHODCALLTYPE
d3d10_effect_type_GetDesc(ID3D10EffectType
*iface
, D3D10_EFFECT_TYPE_DESC
*desc
)
5877 struct d3d10_effect_type
*This
= (struct d3d10_effect_type
*)iface
;
5879 TRACE("iface %p, desc %p\n", iface
, desc
);
5881 if (This
== &null_type
)
5883 WARN("Null type specified\n");
5889 WARN("Invalid argument specified\n");
5890 return E_INVALIDARG
;
5893 desc
->TypeName
= This
->name
;
5894 desc
->Class
= This
->type_class
;
5895 desc
->Type
= This
->basetype
;
5896 desc
->Elements
= This
->element_count
;
5897 desc
->Members
= This
->member_count
;
5898 desc
->Rows
= This
->row_count
;
5899 desc
->Columns
= This
->column_count
;
5900 desc
->PackedSize
= This
->size_packed
;
5901 desc
->UnpackedSize
= This
->size_unpacked
;
5902 desc
->Stride
= This
->stride
;
5907 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_type_GetMemberTypeByIndex(ID3D10EffectType
*iface
,
5910 struct d3d10_effect_type
*This
= (struct d3d10_effect_type
*)iface
;
5911 struct d3d10_effect_type
*t
;
5913 TRACE("iface %p, index %u\n", iface
, index
);
5915 if (index
>= This
->member_count
)
5917 WARN("Invalid index specified\n");
5918 return (ID3D10EffectType
*)&null_type
;
5921 t
= (&This
->members
[index
])->type
;
5923 TRACE("Returning member %p, %s\n", t
, debugstr_a(t
->name
));
5925 return (ID3D10EffectType
*)t
;
5928 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_type_GetMemberTypeByName(ID3D10EffectType
*iface
,
5931 struct d3d10_effect_type
*This
= (struct d3d10_effect_type
*)iface
;
5934 TRACE("iface %p, name %s\n", iface
, debugstr_a(name
));
5938 WARN("Invalid name specified\n");
5939 return (ID3D10EffectType
*)&null_type
;
5942 for (i
= 0; i
< This
->member_count
; ++i
)
5944 struct d3d10_effect_type_member
*typem
= &This
->members
[i
];
5948 if (!strcmp(typem
->name
, name
))
5950 TRACE("Returning type %p.\n", typem
->type
);
5951 return (ID3D10EffectType
*)typem
->type
;
5956 WARN("Invalid name specified\n");
5958 return (ID3D10EffectType
*)&null_type
;
5961 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_type_GetMemberTypeBySemantic(ID3D10EffectType
*iface
,
5964 struct d3d10_effect_type
*This
= (struct d3d10_effect_type
*)iface
;
5967 TRACE("iface %p, semantic %s\n", iface
, debugstr_a(semantic
));
5971 WARN("Invalid semantic specified\n");
5972 return (ID3D10EffectType
*)&null_type
;
5975 for (i
= 0; i
< This
->member_count
; ++i
)
5977 struct d3d10_effect_type_member
*typem
= &This
->members
[i
];
5979 if (typem
->semantic
)
5981 if (!strcmp(typem
->semantic
, semantic
))
5983 TRACE("Returning type %p.\n", typem
->type
);
5984 return (ID3D10EffectType
*)typem
->type
;
5989 WARN("Invalid semantic specified\n");
5991 return (ID3D10EffectType
*)&null_type
;
5994 static LPCSTR STDMETHODCALLTYPE
d3d10_effect_type_GetMemberName(ID3D10EffectType
*iface
, UINT index
)
5996 struct d3d10_effect_type
*This
= (struct d3d10_effect_type
*)iface
;
5997 struct d3d10_effect_type_member
*typem
;
5999 TRACE("iface %p, index %u\n", iface
, index
);
6001 if (index
>= This
->member_count
)
6003 WARN("Invalid index specified\n");
6007 typem
= &This
->members
[index
];
6009 TRACE("Returning name %s\n", debugstr_a(typem
->name
));
6014 static LPCSTR STDMETHODCALLTYPE
d3d10_effect_type_GetMemberSemantic(ID3D10EffectType
*iface
, UINT index
)
6016 struct d3d10_effect_type
*This
= (struct d3d10_effect_type
*)iface
;
6017 struct d3d10_effect_type_member
*typem
;
6019 TRACE("iface %p, index %u\n", iface
, index
);
6021 if (index
>= This
->member_count
)
6023 WARN("Invalid index specified\n");
6027 typem
= &This
->members
[index
];
6029 TRACE("Returning semantic %s\n", debugstr_a(typem
->semantic
));
6031 return typem
->semantic
;
6034 static const struct ID3D10EffectTypeVtbl d3d10_effect_type_vtbl
=
6036 /* ID3D10EffectType */
6037 d3d10_effect_type_IsValid
,
6038 d3d10_effect_type_GetDesc
,
6039 d3d10_effect_type_GetMemberTypeByIndex
,
6040 d3d10_effect_type_GetMemberTypeByName
,
6041 d3d10_effect_type_GetMemberTypeBySemantic
,
6042 d3d10_effect_type_GetMemberName
,
6043 d3d10_effect_type_GetMemberSemantic
,