2 * Copyright 2009 Henri Verbeet for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include "wine/port.h"
23 #include "d3d10_private.h"
25 WINE_DEFAULT_DEBUG_CHANNEL(d3d10
);
27 #define MAKE_TAG(ch0, ch1, ch2, ch3) \
28 ((DWORD)(ch0) | ((DWORD)(ch1) << 8) | \
29 ((DWORD)(ch2) << 16) | ((DWORD)(ch3) << 24 ))
30 #define TAG_DXBC MAKE_TAG('D', 'X', 'B', 'C')
31 #define TAG_FX10 MAKE_TAG('F', 'X', '1', '0')
32 #define TAG_ISGN MAKE_TAG('I', 'S', 'G', 'N')
34 #define D3D10_FX10_TYPE_COLUMN_SHIFT 11
35 #define D3D10_FX10_TYPE_COLUMN_MASK (0x7 << D3D10_FX10_TYPE_COLUMN_SHIFT)
37 #define D3D10_FX10_TYPE_ROW_SHIFT 8
38 #define D3D10_FX10_TYPE_ROW_MASK (0x7 << D3D10_FX10_TYPE_ROW_SHIFT)
40 #define D3D10_FX10_TYPE_BASETYPE_SHIFT 3
41 #define D3D10_FX10_TYPE_BASETYPE_MASK (0x1f << D3D10_FX10_TYPE_BASETYPE_SHIFT)
43 #define D3D10_FX10_TYPE_CLASS_SHIFT 0
44 #define D3D10_FX10_TYPE_CLASS_MASK (0x7 << D3D10_FX10_TYPE_CLASS_SHIFT)
46 #define D3D10_FX10_TYPE_MATRIX_COLUMN_MAJOR_MASK 0x4000
48 static const struct ID3D10EffectTechniqueVtbl d3d10_effect_technique_vtbl
;
49 static const struct ID3D10EffectPassVtbl d3d10_effect_pass_vtbl
;
50 static const struct ID3D10EffectVariableVtbl d3d10_effect_variable_vtbl
;
51 static const struct ID3D10EffectConstantBufferVtbl d3d10_effect_constant_buffer_vtbl
;
52 static const struct ID3D10EffectScalarVariableVtbl d3d10_effect_scalar_variable_vtbl
;
53 static const struct ID3D10EffectVectorVariableVtbl d3d10_effect_vector_variable_vtbl
;
54 static const struct ID3D10EffectMatrixVariableVtbl d3d10_effect_matrix_variable_vtbl
;
55 static const struct ID3D10EffectStringVariableVtbl d3d10_effect_string_variable_vtbl
;
56 static const struct ID3D10EffectShaderResourceVariableVtbl d3d10_effect_shader_resource_variable_vtbl
;
57 static const struct ID3D10EffectRenderTargetViewVariableVtbl d3d10_effect_render_target_view_variable_vtbl
;
58 static const struct ID3D10EffectDepthStencilViewVariableVtbl d3d10_effect_depth_stencil_view_variable_vtbl
;
59 static const struct ID3D10EffectShaderVariableVtbl d3d10_effect_shader_variable_vtbl
;
60 static const struct ID3D10EffectBlendVariableVtbl d3d10_effect_blend_variable_vtbl
;
61 static const struct ID3D10EffectDepthStencilVariableVtbl d3d10_effect_depth_stencil_variable_vtbl
;
62 static const struct ID3D10EffectRasterizerVariableVtbl d3d10_effect_rasterizer_variable_vtbl
;
63 static const struct ID3D10EffectSamplerVariableVtbl d3d10_effect_sampler_variable_vtbl
;
64 static const struct ID3D10EffectTypeVtbl d3d10_effect_type_vtbl
;
66 /* null objects - needed for invalid calls */
67 static struct d3d10_effect_technique null_technique
=
68 {&d3d10_effect_technique_vtbl
, NULL
, NULL
, 0, 0, NULL
, NULL
};
69 static struct d3d10_effect_pass null_pass
=
70 {&d3d10_effect_pass_vtbl
, NULL
, NULL
, 0, 0, 0, NULL
, NULL
};
71 static struct d3d10_effect_type null_type
=
72 {&d3d10_effect_type_vtbl
, 0, {NULL
, NULL
, 0}, NULL
, NULL
, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL
, NULL
};
73 static struct d3d10_effect_variable null_local_buffer
=
74 {(ID3D10EffectVariableVtbl
*)&d3d10_effect_constant_buffer_vtbl
, &null_local_buffer
,
75 NULL
, NULL
, NULL
, 0, 0, 0, 0, &null_type
, NULL
, NULL
, NULL
};
76 static struct d3d10_effect_variable null_variable
=
77 {&d3d10_effect_variable_vtbl
, &null_local_buffer
,
78 NULL
, NULL
, NULL
, 0, 0, 0, 0, &null_type
, NULL
, NULL
, NULL
};
79 static struct d3d10_effect_variable null_scalar_variable
=
80 {(ID3D10EffectVariableVtbl
*)&d3d10_effect_scalar_variable_vtbl
, &null_local_buffer
,
81 NULL
, NULL
, NULL
, 0, 0, 0, 0, &null_type
, NULL
, NULL
, NULL
};
82 static struct d3d10_effect_variable null_vector_variable
=
83 {(ID3D10EffectVariableVtbl
*)&d3d10_effect_vector_variable_vtbl
, &null_local_buffer
,
84 NULL
, NULL
, NULL
, 0, 0, 0, 0, &null_type
, NULL
, NULL
, NULL
};
85 static struct d3d10_effect_variable null_matrix_variable
=
86 {(ID3D10EffectVariableVtbl
*)&d3d10_effect_matrix_variable_vtbl
, &null_local_buffer
,
87 NULL
, NULL
, NULL
, 0, 0, 0, 0, &null_type
, NULL
, NULL
, NULL
};
88 static struct d3d10_effect_variable null_string_variable
=
89 {(ID3D10EffectVariableVtbl
*)&d3d10_effect_string_variable_vtbl
, &null_local_buffer
,
90 NULL
, NULL
, NULL
, 0, 0, 0, 0, &null_type
, NULL
, NULL
, NULL
};
91 static struct d3d10_effect_variable null_shader_resource_variable
=
92 {(ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_resource_variable_vtbl
, &null_local_buffer
,
93 NULL
, NULL
, NULL
, 0, 0, 0, 0, &null_type
, NULL
, NULL
, NULL
};
94 static struct d3d10_effect_variable null_render_target_view_variable
=
95 {(ID3D10EffectVariableVtbl
*)&d3d10_effect_render_target_view_variable_vtbl
, &null_local_buffer
,
96 NULL
, NULL
, NULL
, 0, 0, 0, 0, &null_type
, NULL
, NULL
, NULL
};
97 static struct d3d10_effect_variable null_depth_stencil_view_variable
=
98 {(ID3D10EffectVariableVtbl
*)&d3d10_effect_depth_stencil_view_variable_vtbl
, &null_local_buffer
,
99 NULL
, NULL
, NULL
, 0, 0, 0, 0, &null_type
, NULL
, NULL
, NULL
};
100 static struct d3d10_effect_variable null_shader_variable
=
101 {(ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_variable_vtbl
, &null_local_buffer
,
102 NULL
, NULL
, NULL
, 0, 0, 0, 0, &null_type
, NULL
, NULL
, NULL
};
103 static struct d3d10_effect_variable null_blend_variable
=
104 {(ID3D10EffectVariableVtbl
*)&d3d10_effect_blend_variable_vtbl
, &null_local_buffer
,
105 NULL
, NULL
, NULL
, 0, 0, 0, 0, &null_type
, NULL
, NULL
, NULL
};
106 static struct d3d10_effect_variable null_depth_stencil_variable
=
107 {(ID3D10EffectVariableVtbl
*)&d3d10_effect_depth_stencil_variable_vtbl
, &null_local_buffer
,
108 NULL
, NULL
, NULL
, 0, 0, 0, 0, &null_type
, NULL
, NULL
, NULL
};
109 static struct d3d10_effect_variable null_rasterizer_variable
=
110 {(ID3D10EffectVariableVtbl
*)&d3d10_effect_rasterizer_variable_vtbl
, &null_local_buffer
,
111 NULL
, NULL
, NULL
, 0, 0, 0, 0, &null_type
, NULL
, NULL
, NULL
};
112 static struct d3d10_effect_variable null_sampler_variable
=
113 {(ID3D10EffectVariableVtbl
*)&d3d10_effect_sampler_variable_vtbl
, &null_local_buffer
,
114 NULL
, NULL
, NULL
, 0, 0, 0, 0, &null_type
, NULL
, NULL
, NULL
};
116 static struct d3d10_effect_type
*get_fx10_type(struct d3d10_effect
*effect
, const char *data
, DWORD offset
);
118 static inline void read_dword(const char **ptr
, DWORD
*d
)
120 memcpy(d
, *ptr
, sizeof(*d
));
124 static inline void skip_dword_unknown(const char **ptr
, unsigned int count
)
129 FIXME("Skipping %u unknown DWORDs:\n", count
);
130 for (i
= 0; i
< count
; ++i
)
133 FIXME("\t0x%08x\n", d
);
137 static inline void write_dword(char **ptr
, DWORD d
)
139 memcpy(*ptr
, &d
, sizeof(d
));
143 static inline void write_dword_unknown(char **ptr
, DWORD d
)
145 FIXME("Writing unknown DWORD 0x%08x\n", d
);
149 static HRESULT
parse_dxbc(const char *data
, SIZE_T data_size
,
150 HRESULT (*chunk_handler
)(const char *data
, DWORD data_size
, DWORD tag
, void *ctx
), void *ctx
)
152 const char *ptr
= data
;
159 read_dword(&ptr
, &tag
);
160 TRACE("tag: %s.\n", debugstr_an((const char *)&tag
, 4));
164 WARN("Wrong tag.\n");
169 skip_dword_unknown(&ptr
, 4);
171 skip_dword_unknown(&ptr
, 1);
173 read_dword(&ptr
, &total_size
);
174 TRACE("total size: %#x\n", total_size
);
176 read_dword(&ptr
, &chunk_count
);
177 TRACE("chunk count: %#x\n", chunk_count
);
179 for (i
= 0; i
< chunk_count
; ++i
)
181 DWORD chunk_tag
, chunk_size
;
182 const char *chunk_ptr
;
185 read_dword(&ptr
, &chunk_offset
);
186 TRACE("chunk %u at offset %#x\n", i
, chunk_offset
);
188 chunk_ptr
= data
+ chunk_offset
;
190 read_dword(&chunk_ptr
, &chunk_tag
);
191 read_dword(&chunk_ptr
, &chunk_size
);
193 hr
= chunk_handler(chunk_ptr
, chunk_size
, chunk_tag
, ctx
);
194 if (FAILED(hr
)) break;
200 static BOOL
copy_name(const char *ptr
, char **name
)
204 if (!ptr
) return TRUE
;
206 name_len
= strlen(ptr
) + 1;
212 *name
= HeapAlloc(GetProcessHeap(), 0, name_len
);
215 ERR("Failed to allocate name memory.\n");
219 memcpy(*name
, ptr
, name_len
);
224 static HRESULT
shader_chunk_handler(const char *data
, DWORD data_size
, DWORD tag
, void *ctx
)
226 struct d3d10_effect_shader_variable
*s
= ctx
;
228 TRACE("tag: %s.\n", debugstr_an((const char *)&tag
, 4));
230 TRACE("chunk size: %#x\n", data_size
);
236 /* 32 (DXBC header) + 1 * 4 (chunk index) + 2 * 4 (chunk header) + data_size (chunk data) */
237 UINT size
= 44 + data_size
;
240 s
->input_signature
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, size
);
241 if (!s
->input_signature
)
243 ERR("Failed to allocate input signature data\n");
244 return E_OUTOFMEMORY
;
246 s
->input_signature_size
= size
;
248 ptr
= s
->input_signature
;
250 write_dword(&ptr
, TAG_DXBC
);
253 write_dword_unknown(&ptr
, 0);
254 write_dword_unknown(&ptr
, 0);
255 write_dword_unknown(&ptr
, 0);
256 write_dword_unknown(&ptr
, 0);
258 /* seems to be always 1 */
259 write_dword_unknown(&ptr
, 1);
262 write_dword(&ptr
, size
);
265 write_dword(&ptr
, 1);
268 write_dword(&ptr
, (ptr
- s
->input_signature
) + 4);
271 write_dword(&ptr
, TAG_ISGN
);
272 write_dword(&ptr
, data_size
);
273 memcpy(ptr
, data
, data_size
);
278 FIXME("Unhandled chunk %s.\n", debugstr_an((const char *)&tag
, 4));
285 static HRESULT
parse_shader(struct d3d10_effect_object
*o
, const char *data
)
287 ID3D10Device
*device
= o
->pass
->technique
->effect
->device
;
288 struct d3d10_effect_shader_variable
*s
;
289 const char *ptr
= data
;
293 o
->data
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(struct d3d10_effect_shader_variable
));
296 ERR("Failed to allocate shader variable memory\n");
297 return E_OUTOFMEMORY
;
300 if (!ptr
) return S_OK
;
304 read_dword(&ptr
, &dxbc_size
);
305 TRACE("dxbc size: %#x\n", dxbc_size
);
309 case D3D10_EOT_VERTEXSHADER
:
310 hr
= ID3D10Device_CreateVertexShader(device
, ptr
, dxbc_size
, &s
->shader
.vs
);
311 if (FAILED(hr
)) return hr
;
314 case D3D10_EOT_PIXELSHADER
:
315 hr
= ID3D10Device_CreatePixelShader(device
, ptr
, dxbc_size
, &s
->shader
.ps
);
316 if (FAILED(hr
)) return hr
;
318 case D3D10_EOT_GEOMETRYSHADER
:
319 hr
= ID3D10Device_CreateGeometryShader(device
, ptr
, dxbc_size
, &s
->shader
.gs
);
320 if (FAILED(hr
)) return hr
;
324 return parse_dxbc(ptr
, dxbc_size
, shader_chunk_handler
, s
);
327 static D3D10_SHADER_VARIABLE_CLASS
d3d10_variable_class(DWORD c
, BOOL is_column_major
)
331 case 1: return D3D10_SVC_SCALAR
;
332 case 2: return D3D10_SVC_VECTOR
;
333 case 3: if (is_column_major
) return D3D10_SVC_MATRIX_COLUMNS
;
334 else return D3D10_SVC_MATRIX_ROWS
;
336 FIXME("Unknown variable class %#x.\n", c
);
341 static D3D10_SHADER_VARIABLE_TYPE
d3d10_variable_type(DWORD t
, BOOL is_object
)
347 case 1: return D3D10_SVT_STRING
;
348 case 2: return D3D10_SVT_BLEND
;
349 case 3: return D3D10_SVT_DEPTHSTENCIL
;
350 case 4: return D3D10_SVT_RASTERIZER
;
351 case 5: return D3D10_SVT_PIXELSHADER
;
352 case 6: return D3D10_SVT_VERTEXSHADER
;
353 case 7: return D3D10_SVT_GEOMETRYSHADER
;
355 case 10: return D3D10_SVT_TEXTURE1D
;
356 case 11: return D3D10_SVT_TEXTURE1DARRAY
;
357 case 12: return D3D10_SVT_TEXTURE2D
;
358 case 13: return D3D10_SVT_TEXTURE2DARRAY
;
359 case 14: return D3D10_SVT_TEXTURE2DMS
;
360 case 15: return D3D10_SVT_TEXTURE2DMSARRAY
;
361 case 16: return D3D10_SVT_TEXTURE3D
;
362 case 17: return D3D10_SVT_TEXTURECUBE
;
364 case 19: return D3D10_SVT_RENDERTARGETVIEW
;
365 case 20: return D3D10_SVT_DEPTHSTENCILVIEW
;
366 case 21: return D3D10_SVT_SAMPLER
;
368 FIXME("Unknown variable type %#x.\n", t
);
376 case 1: return D3D10_SVT_FLOAT
;
377 case 2: return D3D10_SVT_INT
;
378 case 3: return D3D10_SVT_UINT
;
379 case 4: return D3D10_SVT_BOOL
;
381 FIXME("Unknown variable type %#x.\n", t
);
387 static HRESULT
parse_fx10_type(struct d3d10_effect_type
*t
, const char *ptr
, const char *data
)
394 read_dword(&ptr
, &offset
);
395 TRACE("Type name at offset %#x.\n", offset
);
397 if (!copy_name(data
+ offset
, &t
->name
))
399 ERR("Failed to copy name.\n");
400 return E_OUTOFMEMORY
;
402 TRACE("Type name: %s.\n", debugstr_a(t
->name
));
404 read_dword(&ptr
, &unknown0
);
405 TRACE("Unknown 0: %u.\n", unknown0
);
407 read_dword(&ptr
, &t
->element_count
);
408 TRACE("Element count: %u.\n", t
->element_count
);
410 read_dword(&ptr
, &t
->size_unpacked
);
411 TRACE("Unpacked size: %#x.\n", t
->size_unpacked
);
413 read_dword(&ptr
, &t
->stride
);
414 TRACE("Stride: %#x.\n", t
->stride
);
416 read_dword(&ptr
, &t
->size_packed
);
417 TRACE("Packed size %#x.\n", t
->size_packed
);
424 read_dword(&ptr
, &typeinfo
);
425 t
->column_count
= (typeinfo
& D3D10_FX10_TYPE_COLUMN_MASK
) >> D3D10_FX10_TYPE_COLUMN_SHIFT
;
426 t
->row_count
= (typeinfo
& D3D10_FX10_TYPE_ROW_MASK
) >> D3D10_FX10_TYPE_ROW_SHIFT
;
427 t
->basetype
= d3d10_variable_type((typeinfo
& D3D10_FX10_TYPE_BASETYPE_MASK
) >> D3D10_FX10_TYPE_BASETYPE_SHIFT
, FALSE
);
428 t
->type_class
= d3d10_variable_class((typeinfo
& D3D10_FX10_TYPE_CLASS_MASK
) >> D3D10_FX10_TYPE_CLASS_SHIFT
, typeinfo
& D3D10_FX10_TYPE_MATRIX_COLUMN_MAJOR_MASK
);
430 TRACE("Type description: %#x.\n", typeinfo
);
431 TRACE("\tcolumns: %u.\n", t
->column_count
);
432 TRACE("\trows: %u.\n", t
->row_count
);
433 TRACE("\tbasetype: %s.\n", debug_d3d10_shader_variable_type(t
->basetype
));
434 TRACE("\tclass: %s.\n", debug_d3d10_shader_variable_class(t
->type_class
));
435 TRACE("\tunknown bits: %#x.\n", typeinfo
& ~(D3D10_FX10_TYPE_COLUMN_MASK
| D3D10_FX10_TYPE_ROW_MASK
436 | D3D10_FX10_TYPE_BASETYPE_MASK
| D3D10_FX10_TYPE_CLASS_MASK
| D3D10_FX10_TYPE_MATRIX_COLUMN_MAJOR_MASK
));
440 TRACE("Type is an object.\n");
445 t
->type_class
= D3D10_SVC_OBJECT
;
447 read_dword(&ptr
, &typeinfo
);
448 t
->basetype
= d3d10_variable_type(typeinfo
, TRUE
);
450 TRACE("Type description: %#x.\n", typeinfo
);
451 TRACE("\tbasetype: %s.\n", debug_d3d10_shader_variable_type(t
->basetype
));
452 TRACE("\tclass: %s.\n", debug_d3d10_shader_variable_class(t
->type_class
));
456 TRACE("Type is a structure.\n");
458 read_dword(&ptr
, &t
->member_count
);
459 TRACE("Member count: %u.\n", t
->member_count
);
464 t
->type_class
= D3D10_SVC_STRUCT
;
466 t
->members
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, t
->member_count
* sizeof(*t
->members
));
469 ERR("Failed to allocate members memory.\n");
470 return E_OUTOFMEMORY
;
473 for (i
= 0; i
< t
->member_count
; ++i
)
475 struct d3d10_effect_type_member
*typem
= &t
->members
[i
];
477 read_dword(&ptr
, &offset
);
478 TRACE("Member name at offset %#x.\n", offset
);
480 if (!copy_name(data
+ offset
, &typem
->name
))
482 ERR("Failed to copy name.\n");
483 return E_OUTOFMEMORY
;
485 TRACE("Member name: %s.\n", debugstr_a(typem
->name
));
487 read_dword(&ptr
, &offset
);
488 TRACE("Member semantic at offset %#x.\n", offset
);
490 if (!copy_name(data
+ offset
, &typem
->semantic
))
492 ERR("Failed to copy semantic.\n");
493 return E_OUTOFMEMORY
;
495 TRACE("Member semantic: %s.\n", debugstr_a(typem
->semantic
));
497 read_dword(&ptr
, &typem
->buffer_offset
);
498 TRACE("Member offset in struct: %#x.\n", typem
->buffer_offset
);
500 read_dword(&ptr
, &offset
);
501 TRACE("Member type info at offset %#x.\n", offset
);
503 typem
->type
= get_fx10_type(t
->effect
, data
, offset
);
506 ERR("Failed to get variable type.\n");
513 FIXME("Unhandled case %#x.\n", unknown0
);
517 if (t
->element_count
)
519 TRACE("Elementtype for type at offset: %#x\n", t
->id
);
521 /* allocate elementtype - we need only one, because all elements have the same type */
522 t
->elementtype
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(*t
->elementtype
));
525 ERR("Failed to allocate members memory.\n");
526 return E_OUTOFMEMORY
;
529 /* create a copy of the original type with some minor changes */
530 t
->elementtype
->vtbl
= &d3d10_effect_type_vtbl
;
531 t
->elementtype
->effect
= t
->effect
;
533 if (!copy_name(t
->name
, &t
->elementtype
->name
))
535 ERR("Failed to copy name.\n");
536 return E_OUTOFMEMORY
;
538 TRACE("\tType name: %s.\n", debugstr_a(t
->elementtype
->name
));
540 t
->elementtype
->element_count
= 0;
541 TRACE("\tElement count: %u.\n", t
->elementtype
->element_count
);
544 * Not sure if this calculation is 100% correct, but a test
545 * show's that these values work.
547 t
->elementtype
->size_unpacked
= t
->size_packed
/ t
->element_count
;
548 TRACE("\tUnpacked size: %#x.\n", t
->elementtype
->size_unpacked
);
550 t
->elementtype
->stride
= t
->stride
;
551 TRACE("\tStride: %#x.\n", t
->elementtype
->stride
);
553 t
->elementtype
->size_packed
= t
->size_packed
/ t
->element_count
;
554 TRACE("\tPacked size: %#x.\n", t
->elementtype
->size_packed
);
556 t
->elementtype
->member_count
= t
->member_count
;
557 TRACE("\tMember count: %u.\n", t
->elementtype
->member_count
);
559 t
->elementtype
->column_count
= t
->column_count
;
560 TRACE("\tColumns: %u.\n", t
->elementtype
->column_count
);
562 t
->elementtype
->row_count
= t
->row_count
;
563 TRACE("\tRows: %u.\n", t
->elementtype
->row_count
);
565 t
->elementtype
->basetype
= t
->basetype
;
566 TRACE("\tBasetype: %s.\n", debug_d3d10_shader_variable_type(t
->elementtype
->basetype
));
568 t
->elementtype
->type_class
= t
->type_class
;
569 TRACE("\tClass: %s.\n", debug_d3d10_shader_variable_class(t
->elementtype
->type_class
));
571 t
->elementtype
->members
= t
->members
;
577 static struct d3d10_effect_type
*get_fx10_type(struct d3d10_effect
*effect
, const char *data
, DWORD offset
)
579 struct d3d10_effect_type
*type
;
580 struct wine_rb_entry
*entry
;
583 entry
= wine_rb_get(&effect
->types
, &offset
);
586 TRACE("Returning existing type.\n");
587 return WINE_RB_ENTRY_VALUE(entry
, struct d3d10_effect_type
, entry
);
590 type
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(*type
));
593 ERR("Failed to allocate type memory.\n");
597 type
->vtbl
= &d3d10_effect_type_vtbl
;
599 type
->effect
= effect
;
600 hr
= parse_fx10_type(type
, data
+ offset
, data
);
603 ERR("Failed to parse type info, hr %#x.\n", hr
);
604 HeapFree(GetProcessHeap(), 0, type
);
608 if (wine_rb_put(&effect
->types
, &offset
, &type
->entry
) == -1)
610 ERR("Failed to insert type entry.\n");
611 HeapFree(GetProcessHeap(), 0, type
);
618 static void set_variable_vtbl(struct d3d10_effect_variable
*v
)
620 switch (v
->type
->type_class
)
622 case D3D10_SVC_SCALAR
:
623 v
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_scalar_variable_vtbl
;
626 case D3D10_SVC_VECTOR
:
627 v
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_vector_variable_vtbl
;
630 case D3D10_SVC_MATRIX_ROWS
:
631 case D3D10_SVC_MATRIX_COLUMNS
:
632 v
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_matrix_variable_vtbl
;
635 case D3D10_SVC_STRUCT
:
636 v
->vtbl
= &d3d10_effect_variable_vtbl
;
639 case D3D10_SVC_OBJECT
:
640 switch(v
->type
->basetype
)
642 case D3D10_SVT_STRING
:
643 v
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_string_variable_vtbl
;
646 case D3D10_SVT_TEXTURE1D
:
647 case D3D10_SVT_TEXTURE1DARRAY
:
648 case D3D10_SVT_TEXTURE2D
:
649 case D3D10_SVT_TEXTURE2DARRAY
:
650 case D3D10_SVT_TEXTURE2DMS
:
651 case D3D10_SVT_TEXTURE2DMSARRAY
:
652 case D3D10_SVT_TEXTURE3D
:
653 case D3D10_SVT_TEXTURECUBE
:
654 v
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_resource_variable_vtbl
;
657 case D3D10_SVT_RENDERTARGETVIEW
:
658 v
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_render_target_view_variable_vtbl
;
661 case D3D10_SVT_DEPTHSTENCILVIEW
:
662 v
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_depth_stencil_view_variable_vtbl
;
665 case D3D10_SVT_DEPTHSTENCIL
:
666 v
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_depth_stencil_variable_vtbl
;
669 case D3D10_SVT_VERTEXSHADER
:
670 case D3D10_SVT_GEOMETRYSHADER
:
671 case D3D10_SVT_PIXELSHADER
:
672 v
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_variable_vtbl
;
675 case D3D10_SVT_BLEND
:
676 v
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_blend_variable_vtbl
;
679 case D3D10_SVT_RASTERIZER
:
680 v
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_rasterizer_variable_vtbl
;
683 case D3D10_SVT_SAMPLER
:
684 v
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_sampler_variable_vtbl
;
688 FIXME("Unhandled basetype %s.\n", debug_d3d10_shader_variable_type(v
->type
->basetype
));
689 v
->vtbl
= &d3d10_effect_variable_vtbl
;
695 FIXME("Unhandled type class %s.\n", debug_d3d10_shader_variable_class(v
->type
->type_class
));
696 v
->vtbl
= &d3d10_effect_variable_vtbl
;
701 static HRESULT
copy_variableinfo_from_type(struct d3d10_effect_variable
*v
)
706 if (v
->type
->member_count
)
708 v
->members
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, v
->type
->member_count
* sizeof(*v
->members
));
711 ERR("Failed to allocate members memory.\n");
712 return E_OUTOFMEMORY
;
715 for (i
= 0; i
< v
->type
->member_count
; ++i
)
717 struct d3d10_effect_variable
*var
= &v
->members
[i
];
718 struct d3d10_effect_type_member
*typem
= &v
->type
->members
[i
];
720 var
->buffer
= v
->buffer
;
721 var
->effect
= v
->effect
;
722 var
->type
= typem
->type
;
723 set_variable_vtbl(var
);
725 if (!copy_name(typem
->name
, &var
->name
))
727 ERR("Failed to copy name.\n");
728 return E_OUTOFMEMORY
;
730 TRACE("Variable name: %s.\n", debugstr_a(var
->name
));
732 if (!copy_name(typem
->semantic
, &var
->semantic
))
734 ERR("Failed to copy name.\n");
735 return E_OUTOFMEMORY
;
737 TRACE("Variable semantic: %s.\n", debugstr_a(var
->semantic
));
739 var
->buffer_offset
= v
->buffer_offset
+ typem
->buffer_offset
;
740 TRACE("Variable buffer offset: %u.\n", var
->buffer_offset
);
742 hr
= copy_variableinfo_from_type(var
);
743 if (FAILED(hr
)) return hr
;
747 if (v
->type
->element_count
)
749 unsigned int bufferoffset
= v
->buffer_offset
;
751 v
->elements
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, v
->type
->element_count
* sizeof(*v
->elements
));
754 ERR("Failed to allocate elements memory.\n");
755 return E_OUTOFMEMORY
;
758 for (i
= 0; i
< v
->type
->element_count
; ++i
)
760 struct d3d10_effect_variable
*var
= &v
->elements
[i
];
762 var
->buffer
= v
->buffer
;
763 var
->effect
= v
->effect
;
764 var
->type
= v
->type
->elementtype
;
765 set_variable_vtbl(var
);
767 if (!copy_name(v
->name
, &var
->name
))
769 ERR("Failed to copy name.\n");
770 return E_OUTOFMEMORY
;
772 TRACE("Variable name: %s.\n", debugstr_a(var
->name
));
774 if (!copy_name(v
->semantic
, &var
->semantic
))
776 ERR("Failed to copy name.\n");
777 return E_OUTOFMEMORY
;
779 TRACE("Variable semantic: %s.\n", debugstr_a(var
->semantic
));
783 bufferoffset
+= v
->type
->stride
;
785 var
->buffer_offset
= bufferoffset
;
786 TRACE("Variable buffer offset: %u.\n", var
->buffer_offset
);
788 hr
= copy_variableinfo_from_type(var
);
789 if (FAILED(hr
)) return hr
;
796 static HRESULT
parse_fx10_variable_head(struct d3d10_effect_variable
*v
, const char **ptr
, const char *data
)
800 read_dword(ptr
, &offset
);
801 TRACE("Variable name at offset %#x.\n", offset
);
803 if (!copy_name(data
+ offset
, &v
->name
))
805 ERR("Failed to copy name.\n");
806 return E_OUTOFMEMORY
;
808 TRACE("Variable name: %s.\n", debugstr_a(v
->name
));
810 read_dword(ptr
, &offset
);
811 TRACE("Variable type info at offset %#x.\n", offset
);
813 v
->type
= get_fx10_type(v
->effect
, data
, offset
);
816 ERR("Failed to get variable type.\n");
819 set_variable_vtbl(v
);
821 return copy_variableinfo_from_type(v
);
824 static HRESULT
parse_fx10_annotation(struct d3d10_effect_variable
*a
, const char **ptr
, const char *data
)
828 hr
= parse_fx10_variable_head(a
, ptr
, data
);
829 if (FAILED(hr
)) return hr
;
831 skip_dword_unknown(ptr
, 1);
833 /* mark the variable as annotation */
834 a
->flag
= D3D10_EFFECT_VARIABLE_ANNOTATION
;
839 static HRESULT
parse_fx10_object(struct d3d10_effect_object
*o
, const char **ptr
, const char *data
)
841 const char *data_ptr
;
845 read_dword(ptr
, &o
->type
);
846 TRACE("Effect object is of type %#x.\n", o
->type
);
848 skip_dword_unknown(ptr
, 2);
850 read_dword(ptr
, &offset
);
851 TRACE("Effect object idx is at offset %#x.\n", offset
);
853 data_ptr
= data
+ offset
;
854 read_dword(&data_ptr
, &offset
);
856 TRACE("Effect object starts at offset %#x.\n", offset
);
858 /* FIXME: This probably isn't completely correct. */
861 WARN("Skipping effect object.\n");
866 data_ptr
= data
+ offset
;
871 case D3D10_EOT_VERTEXSHADER
:
872 TRACE("Vertex shader\n");
873 hr
= parse_shader(o
, data_ptr
);
876 case D3D10_EOT_PIXELSHADER
:
877 TRACE("Pixel shader\n");
878 hr
= parse_shader(o
, data_ptr
);
881 case D3D10_EOT_GEOMETRYSHADER
:
882 TRACE("Geometry shader\n");
883 hr
= parse_shader(o
, data_ptr
);
887 FIXME("Unhandled object type %#x\n", o
->type
);
895 static HRESULT
parse_fx10_pass(struct d3d10_effect_pass
*p
, const char **ptr
, const char *data
)
901 read_dword(ptr
, &offset
);
902 TRACE("Pass name at offset %#x.\n", offset
);
904 if (!copy_name(data
+ offset
, &p
->name
))
906 ERR("Failed to copy name.\n");
907 return E_OUTOFMEMORY
;
909 TRACE("Pass name: %s.\n", debugstr_a(p
->name
));
911 read_dword(ptr
, &p
->object_count
);
912 TRACE("Pass has %u effect objects.\n", p
->object_count
);
914 read_dword(ptr
, &p
->annotation_count
);
915 TRACE("Pass has %u annotations.\n", p
->annotation_count
);
917 p
->annotations
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, p
->annotation_count
* sizeof(*p
->annotations
));
920 ERR("Failed to allocate pass annotations memory.\n");
921 return E_OUTOFMEMORY
;
924 for(i
= 0; i
< p
->annotation_count
; ++i
)
926 struct d3d10_effect_variable
*a
= &p
->annotations
[i
];
928 a
->effect
= p
->technique
->effect
;
930 hr
= parse_fx10_annotation(a
, ptr
, data
);
931 if (FAILED(hr
)) return hr
;
934 p
->objects
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, p
->object_count
* sizeof(*p
->objects
));
937 ERR("Failed to allocate effect objects memory.\n");
938 return E_OUTOFMEMORY
;
941 for (i
= 0; i
< p
->object_count
; ++i
)
943 struct d3d10_effect_object
*o
= &p
->objects
[i
];
947 hr
= parse_fx10_object(o
, ptr
, data
);
948 if (FAILED(hr
)) return hr
;
954 static HRESULT
parse_fx10_technique(struct d3d10_effect_technique
*t
, const char **ptr
, const char *data
)
960 read_dword(ptr
, &offset
);
961 TRACE("Technique name at offset %#x.\n", offset
);
963 if (!copy_name(data
+ offset
, &t
->name
))
965 ERR("Failed to copy name.\n");
966 return E_OUTOFMEMORY
;
968 TRACE("Technique name: %s.\n", debugstr_a(t
->name
));
970 read_dword(ptr
, &t
->pass_count
);
971 TRACE("Technique has %u passes\n", t
->pass_count
);
973 read_dword(ptr
, &t
->annotation_count
);
974 TRACE("Technique has %u annotations.\n", t
->annotation_count
);
976 t
->annotations
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, t
->annotation_count
* sizeof(*t
->annotations
));
979 ERR("Failed to allocate technique annotations memory.\n");
980 return E_OUTOFMEMORY
;
983 for(i
= 0; i
< t
->annotation_count
; ++i
)
985 struct d3d10_effect_variable
*a
= &t
->annotations
[i
];
987 a
->effect
= t
->effect
;
989 hr
= parse_fx10_annotation(a
, ptr
, data
);
990 if (FAILED(hr
)) return hr
;
993 t
->passes
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, t
->pass_count
* sizeof(*t
->passes
));
996 ERR("Failed to allocate passes memory\n");
997 return E_OUTOFMEMORY
;
1000 for (i
= 0; i
< t
->pass_count
; ++i
)
1002 struct d3d10_effect_pass
*p
= &t
->passes
[i
];
1004 p
->vtbl
= &d3d10_effect_pass_vtbl
;
1007 hr
= parse_fx10_pass(p
, ptr
, data
);
1008 if (FAILED(hr
)) return hr
;
1014 static HRESULT
parse_fx10_variable(struct d3d10_effect_variable
*v
, const char **ptr
, const char *data
)
1020 hr
= parse_fx10_variable_head(v
, ptr
, data
);
1021 if (FAILED(hr
)) return hr
;
1023 read_dword(ptr
, &offset
);
1024 TRACE("Variable semantic at offset %#x.\n", offset
);
1026 if (!copy_name(data
+ offset
, &v
->semantic
))
1028 ERR("Failed to copy semantic.\n");
1029 return E_OUTOFMEMORY
;
1031 TRACE("Variable semantic: %s.\n", debugstr_a(v
->semantic
));
1033 read_dword(ptr
, &v
->buffer_offset
);
1034 TRACE("Variable offset in buffer: %#x.\n", v
->buffer_offset
);
1036 skip_dword_unknown(ptr
, 1);
1038 read_dword(ptr
, &v
->flag
);
1039 TRACE("Variable flag: %#x.\n", v
->flag
);
1041 read_dword(ptr
, &v
->annotation_count
);
1042 TRACE("Variable has %u annotations.\n", v
->annotation_count
);
1044 v
->annotations
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, v
->annotation_count
* sizeof(*v
->annotations
));
1045 if (!v
->annotations
)
1047 ERR("Failed to allocate variable annotations memory.\n");
1048 return E_OUTOFMEMORY
;
1051 for (i
= 0; i
< v
->annotation_count
; ++i
)
1053 struct d3d10_effect_variable
*a
= &v
->annotations
[i
];
1055 a
->effect
= v
->effect
;
1057 hr
= parse_fx10_annotation(a
, ptr
, data
);
1058 if (FAILED(hr
)) return hr
;
1064 static HRESULT
parse_fx10_local_variable(struct d3d10_effect_variable
*v
, const char **ptr
, const char *data
)
1069 hr
= parse_fx10_variable_head(v
, ptr
, data
);
1070 if (FAILED(hr
)) return hr
;
1072 skip_dword_unknown(ptr
, 2);
1074 switch (v
->type
->basetype
)
1076 case D3D10_SVT_TEXTURE1D
:
1077 case D3D10_SVT_TEXTURE1DARRAY
:
1078 case D3D10_SVT_TEXTURE2D
:
1079 case D3D10_SVT_TEXTURE2DARRAY
:
1080 case D3D10_SVT_TEXTURE2DMS
:
1081 case D3D10_SVT_TEXTURE2DMSARRAY
:
1082 case D3D10_SVT_TEXTURE3D
:
1083 case D3D10_SVT_TEXTURECUBE
:
1084 case D3D10_SVT_RENDERTARGETVIEW
:
1085 case D3D10_SVT_DEPTHSTENCILVIEW
:
1086 TRACE("SVT could not have elements.\n");
1089 case D3D10_SVT_VERTEXSHADER
:
1090 case D3D10_SVT_PIXELSHADER
:
1091 case D3D10_SVT_GEOMETRYSHADER
:
1092 TRACE("SVT is a shader.\n");
1093 for (i
= 0; i
< max(v
->type
->element_count
, 1); ++i
)
1095 DWORD shader_offset
;
1098 * TODO: Parse the shader
1100 read_dword(ptr
, &shader_offset
);
1101 FIXME("Shader offset: %#x.\n", shader_offset
);
1105 case D3D10_SVT_DEPTHSTENCIL
:
1106 case D3D10_SVT_BLEND
:
1107 case D3D10_SVT_RASTERIZER
:
1108 case D3D10_SVT_SAMPLER
:
1109 TRACE("SVT is a state.\n");
1110 for (i
= 0; i
< max(v
->type
->element_count
, 1); ++i
)
1115 read_dword(ptr
, &object_count
);
1116 TRACE("Object count: %#x.\n", object_count
);
1118 for (j
= 0; j
< object_count
; ++j
)
1120 skip_dword_unknown(ptr
, 4);
1126 FIXME("Unhandled case %s.\n", debug_d3d10_shader_variable_type(v
->type
->basetype
));
1130 read_dword(ptr
, &v
->annotation_count
);
1131 TRACE("Variable has %u annotations.\n", v
->annotation_count
);
1133 v
->annotations
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, v
->annotation_count
* sizeof(*v
->annotations
));
1134 if (!v
->annotations
)
1136 ERR("Failed to allocate variable annotations memory.\n");
1137 return E_OUTOFMEMORY
;
1140 for (i
= 0; i
< v
->annotation_count
; ++i
)
1142 struct d3d10_effect_variable
*a
= &v
->annotations
[i
];
1144 a
->effect
= v
->effect
;
1146 hr
= parse_fx10_annotation(a
, ptr
, data
);
1147 if (FAILED(hr
)) return hr
;
1153 static HRESULT
parse_fx10_local_buffer(struct d3d10_effect_variable
*l
, const char **ptr
, const char *data
)
1157 D3D10_CBUFFER_TYPE d3d10_cbuffer_type
;
1160 /* Generate our own type, it isn't in the fx blob. */
1161 l
->type
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(*l
->type
));
1164 ERR("Failed to allocate local buffer type memory.\n");
1165 return E_OUTOFMEMORY
;
1167 l
->type
->vtbl
= &d3d10_effect_type_vtbl
;
1168 l
->type
->type_class
= D3D10_SVC_OBJECT
;
1169 l
->type
->effect
= l
->effect
;
1171 read_dword(ptr
, &offset
);
1172 TRACE("Local buffer name at offset %#x.\n", offset
);
1174 if (!copy_name(data
+ offset
, &l
->name
))
1176 ERR("Failed to copy name.\n");
1177 return E_OUTOFMEMORY
;
1179 TRACE("Local buffer name: %s.\n", debugstr_a(l
->name
));
1181 read_dword(ptr
, &l
->data_size
);
1182 TRACE("Local buffer data size: %#x.\n", l
->data_size
);
1184 read_dword(ptr
, &d3d10_cbuffer_type
);
1185 TRACE("Local buffer type: %#x.\n", d3d10_cbuffer_type
);
1187 switch(d3d10_cbuffer_type
)
1189 case D3D10_CT_CBUFFER
:
1190 l
->type
->basetype
= D3D10_SVT_CBUFFER
;
1191 if (!copy_name("cbuffer", &l
->type
->name
))
1193 ERR("Failed to copy name.\n");
1194 return E_OUTOFMEMORY
;
1198 case D3D10_CT_TBUFFER
:
1199 l
->type
->basetype
= D3D10_SVT_TBUFFER
;
1200 if (!copy_name("tbuffer", &l
->type
->name
))
1202 ERR("Failed to copy name.\n");
1203 return E_OUTOFMEMORY
;
1208 ERR("Unexpected D3D10_CBUFFER_TYPE %#x!\n", d3d10_cbuffer_type
);
1212 read_dword(ptr
, &l
->type
->member_count
);
1213 TRACE("Local buffer member count: %#x.\n", l
->type
->member_count
);
1215 skip_dword_unknown(ptr
, 1);
1217 read_dword(ptr
, &l
->annotation_count
);
1218 TRACE("Local buffer has %u annotations.\n", l
->annotation_count
);
1220 l
->annotations
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, l
->annotation_count
* sizeof(*l
->annotations
));
1221 if (!l
->annotations
)
1223 ERR("Failed to allocate local buffer annotations memory.\n");
1224 return E_OUTOFMEMORY
;
1227 for(i
= 0; i
< l
->annotation_count
; ++i
)
1229 struct d3d10_effect_variable
*a
= &l
->annotations
[i
];
1231 a
->effect
= l
->effect
;
1233 hr
= parse_fx10_annotation(a
, ptr
, data
);
1234 if (FAILED(hr
)) return hr
;
1237 l
->members
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, l
->type
->member_count
* sizeof(*l
->members
));
1240 ERR("Failed to allocate members memory.\n");
1241 return E_OUTOFMEMORY
;
1244 l
->type
->members
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, l
->type
->member_count
* sizeof(*l
->type
->members
));
1245 if (!l
->type
->members
)
1247 ERR("Failed to allocate type members memory.\n");
1248 return E_OUTOFMEMORY
;
1251 for (i
= 0; i
< l
->type
->member_count
; ++i
)
1253 struct d3d10_effect_variable
*v
= &l
->members
[i
];
1254 struct d3d10_effect_type_member
*typem
= &l
->type
->members
[i
];
1257 v
->effect
= l
->effect
;
1259 hr
= parse_fx10_variable(v
, ptr
, data
);
1260 if (FAILED(hr
)) return hr
;
1263 * Copy the values from the variable type to the constant buffers type
1264 * members structure, because it is our own generated type.
1266 typem
->type
= v
->type
;
1268 if (!copy_name(v
->name
, &typem
->name
))
1270 ERR("Failed to copy name.\n");
1271 return E_OUTOFMEMORY
;
1273 TRACE("Variable name: %s.\n", debugstr_a(typem
->name
));
1275 if (!copy_name(v
->semantic
, &typem
->semantic
))
1277 ERR("Failed to copy name.\n");
1278 return E_OUTOFMEMORY
;
1280 TRACE("Variable semantic: %s.\n", debugstr_a(typem
->semantic
));
1282 typem
->buffer_offset
= v
->buffer_offset
;
1283 TRACE("Variable buffer offset: %u.\n", typem
->buffer_offset
);
1285 l
->type
->size_packed
+= v
->type
->size_packed
;
1286 l
->type
->size_unpacked
+= v
->type
->size_unpacked
;
1288 l
->type
->stride
= l
->type
->size_unpacked
= (l
->type
->size_unpacked
+ 0xf) & ~0xf;
1290 TRACE("Constant buffer:\n");
1291 TRACE("\tType name: %s.\n", debugstr_a(l
->type
->name
));
1292 TRACE("\tElement count: %u.\n", l
->type
->element_count
);
1293 TRACE("\tMember count: %u.\n", l
->type
->member_count
);
1294 TRACE("\tUnpacked size: %#x.\n", l
->type
->size_unpacked
);
1295 TRACE("\tStride: %#x.\n", l
->type
->stride
);
1296 TRACE("\tPacked size %#x.\n", l
->type
->size_packed
);
1297 TRACE("\tBasetype: %s.\n", debug_d3d10_shader_variable_type(l
->type
->basetype
));
1298 TRACE("\tTypeclass: %s.\n", debug_d3d10_shader_variable_class(l
->type
->type_class
));
1303 static int d3d10_effect_type_compare(const void *key
, const struct wine_rb_entry
*entry
)
1305 const struct d3d10_effect_type
*t
= WINE_RB_ENTRY_VALUE(entry
, const struct d3d10_effect_type
, entry
);
1306 const DWORD
*id
= key
;
1311 static void d3d10_effect_type_member_destroy(struct d3d10_effect_type_member
*typem
)
1313 TRACE("effect type member %p.\n", typem
);
1315 /* Do not release typem->type, it will be covered by d3d10_effect_type_destroy(). */
1316 HeapFree(GetProcessHeap(), 0, typem
->semantic
);
1317 HeapFree(GetProcessHeap(), 0, typem
->name
);
1320 static void d3d10_effect_type_destroy(struct wine_rb_entry
*entry
, void *context
)
1322 struct d3d10_effect_type
*t
= WINE_RB_ENTRY_VALUE(entry
, struct d3d10_effect_type
, entry
);
1324 TRACE("effect type %p.\n", t
);
1328 HeapFree(GetProcessHeap(), 0, t
->elementtype
->name
);
1329 HeapFree(GetProcessHeap(), 0, t
->elementtype
);
1336 for (i
= 0; i
< t
->member_count
; ++i
)
1338 d3d10_effect_type_member_destroy(&t
->members
[i
]);
1340 HeapFree(GetProcessHeap(), 0, t
->members
);
1343 HeapFree(GetProcessHeap(), 0, t
->name
);
1344 HeapFree(GetProcessHeap(), 0, t
);
1347 static const struct wine_rb_functions d3d10_effect_type_rb_functions
=
1352 d3d10_effect_type_compare
,
1355 static HRESULT
parse_fx10_body(struct d3d10_effect
*e
, const char *data
, DWORD data_size
)
1357 const char *ptr
= data
+ e
->index_offset
;
1361 if (wine_rb_init(&e
->types
, &d3d10_effect_type_rb_functions
) == -1)
1363 ERR("Failed to initialize type rbtree.\n");
1367 e
->local_buffers
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, e
->local_buffer_count
* sizeof(*e
->local_buffers
));
1368 if (!e
->local_buffers
)
1370 ERR("Failed to allocate local buffer memory.\n");
1371 return E_OUTOFMEMORY
;
1374 e
->local_variables
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, e
->local_variable_count
* sizeof(*e
->local_variables
));
1375 if (!e
->local_variables
)
1377 ERR("Failed to allocate local variable memory.\n");
1378 return E_OUTOFMEMORY
;
1381 e
->techniques
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, e
->technique_count
* sizeof(*e
->techniques
));
1384 ERR("Failed to allocate techniques memory\n");
1385 return E_OUTOFMEMORY
;
1388 for (i
= 0; i
< e
->local_buffer_count
; ++i
)
1390 struct d3d10_effect_variable
*l
= &e
->local_buffers
[i
];
1391 l
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_constant_buffer_vtbl
;
1393 l
->buffer
= &null_local_buffer
;
1395 hr
= parse_fx10_local_buffer(l
, &ptr
, data
);
1396 if (FAILED(hr
)) return hr
;
1399 for (i
= 0; i
< e
->local_variable_count
; ++i
)
1401 struct d3d10_effect_variable
*v
= &e
->local_variables
[i
];
1404 v
->vtbl
= &d3d10_effect_variable_vtbl
;
1406 hr
= parse_fx10_local_variable(v
, &ptr
, data
);
1407 if (FAILED(hr
)) return hr
;
1410 for (i
= 0; i
< e
->technique_count
; ++i
)
1412 struct d3d10_effect_technique
*t
= &e
->techniques
[i
];
1414 t
->vtbl
= &d3d10_effect_technique_vtbl
;
1417 hr
= parse_fx10_technique(t
, &ptr
, data
);
1418 if (FAILED(hr
)) return hr
;
1424 static HRESULT
parse_fx10(struct d3d10_effect
*e
, const char *data
, DWORD data_size
)
1426 const char *ptr
= data
;
1429 /* Compiled target version (e.g. fx_4_0=0xfeff1001, fx_4_1=0xfeff1011). */
1430 read_dword(&ptr
, &e
->version
);
1431 TRACE("Target: %#x\n", e
->version
);
1433 read_dword(&ptr
, &e
->local_buffer_count
);
1434 TRACE("Local buffer count: %u.\n", e
->local_buffer_count
);
1436 read_dword(&ptr
, &e
->variable_count
);
1437 TRACE("Variable count: %u\n", e
->variable_count
);
1439 read_dword(&ptr
, &e
->local_variable_count
);
1440 TRACE("Object count: %u\n", e
->local_variable_count
);
1442 read_dword(&ptr
, &e
->sharedbuffers_count
);
1443 TRACE("Sharedbuffers count: %u\n", e
->sharedbuffers_count
);
1445 /* Number of variables in shared buffers? */
1446 read_dword(&ptr
, &unknown
);
1447 FIXME("Unknown 0: %u\n", unknown
);
1449 read_dword(&ptr
, &e
->sharedobjects_count
);
1450 TRACE("Sharedobjects count: %u\n", e
->sharedobjects_count
);
1452 read_dword(&ptr
, &e
->technique_count
);
1453 TRACE("Technique count: %u\n", e
->technique_count
);
1455 read_dword(&ptr
, &e
->index_offset
);
1456 TRACE("Index offset: %#x\n", e
->index_offset
);
1458 read_dword(&ptr
, &unknown
);
1459 FIXME("Unknown 1: %u\n", unknown
);
1461 read_dword(&ptr
, &e
->texture_count
);
1462 TRACE("Texture count: %u\n", e
->texture_count
);
1464 read_dword(&ptr
, &e
->dephstencilstate_count
);
1465 TRACE("Depthstencilstate count: %u\n", e
->dephstencilstate_count
);
1467 read_dword(&ptr
, &e
->blendstate_count
);
1468 TRACE("Blendstate count: %u\n", e
->blendstate_count
);
1470 read_dword(&ptr
, &e
->rasterizerstate_count
);
1471 TRACE("Rasterizerstate count: %u\n", e
->rasterizerstate_count
);
1473 read_dword(&ptr
, &e
->samplerstate_count
);
1474 TRACE("Samplerstate count: %u\n", e
->samplerstate_count
);
1476 read_dword(&ptr
, &e
->rendertargetview_count
);
1477 TRACE("Rendertargetview count: %u\n", e
->rendertargetview_count
);
1479 read_dword(&ptr
, &e
->depthstencilview_count
);
1480 TRACE("Depthstencilview count: %u\n", e
->depthstencilview_count
);
1482 read_dword(&ptr
, &e
->shader_call_count
);
1483 TRACE("Shader call count: %u\n", e
->shader_call_count
);
1485 read_dword(&ptr
, &e
->shader_compile_count
);
1486 TRACE("Shader compile count: %u\n", e
->shader_compile_count
);
1488 return parse_fx10_body(e
, ptr
, data_size
- (ptr
- data
));
1491 static HRESULT
fx10_chunk_handler(const char *data
, DWORD data_size
, DWORD tag
, void *ctx
)
1493 struct d3d10_effect
*e
= ctx
;
1495 TRACE("tag: %s.\n", debugstr_an((const char *)&tag
, 4));
1497 TRACE("chunk size: %#x\n", data_size
);
1502 return parse_fx10(e
, data
, data_size
);
1505 FIXME("Unhandled chunk %s.\n", debugstr_an((const char *)&tag
, 4));
1510 HRESULT
d3d10_effect_parse(struct d3d10_effect
*This
, const void *data
, SIZE_T data_size
)
1512 return parse_dxbc(data
, data_size
, fx10_chunk_handler
, This
);
1515 static void d3d10_effect_object_destroy(struct d3d10_effect_object
*o
)
1517 TRACE("effect object %p.\n", o
);
1521 case D3D10_EOT_VERTEXSHADER
:
1522 case D3D10_EOT_PIXELSHADER
:
1523 case D3D10_EOT_GEOMETRYSHADER
:
1524 HeapFree(GetProcessHeap(), 0, ((struct d3d10_effect_shader_variable
*)o
->data
)->input_signature
);
1530 HeapFree(GetProcessHeap(), 0, o
->data
);
1533 static HRESULT
d3d10_effect_object_apply(struct d3d10_effect_object
*o
)
1535 ID3D10Device
*device
= o
->pass
->technique
->effect
->device
;
1537 TRACE("effect object %p, type %#x.\n", o
, o
->type
);
1541 case D3D10_EOT_VERTEXSHADER
:
1542 ID3D10Device_VSSetShader(device
, ((struct d3d10_effect_shader_variable
*)o
->data
)->shader
.vs
);
1545 case D3D10_EOT_PIXELSHADER
:
1546 ID3D10Device_PSSetShader(device
, ((struct d3d10_effect_shader_variable
*)o
->data
)->shader
.ps
);
1549 case D3D10_EOT_GEOMETRYSHADER
:
1550 ID3D10Device_GSSetShader(device
, ((struct d3d10_effect_shader_variable
*)o
->data
)->shader
.gs
);
1554 FIXME("Unhandled effect object type %#x.\n", o
->type
);
1559 static void d3d10_effect_variable_destroy(struct d3d10_effect_variable
*v
)
1563 TRACE("variable %p.\n", v
);
1565 HeapFree(GetProcessHeap(), 0, v
->name
);
1566 HeapFree(GetProcessHeap(), 0, v
->semantic
);
1569 for (i
= 0; i
< v
->annotation_count
; ++i
)
1571 d3d10_effect_variable_destroy(&v
->annotations
[i
]);
1573 HeapFree(GetProcessHeap(), 0, v
->annotations
);
1578 for (i
= 0; i
< v
->type
->member_count
; ++i
)
1580 d3d10_effect_variable_destroy(&v
->members
[i
]);
1582 HeapFree(GetProcessHeap(), 0, v
->members
);
1587 for (i
= 0; i
< v
->type
->element_count
; ++i
)
1589 d3d10_effect_variable_destroy(&v
->elements
[i
]);
1591 HeapFree(GetProcessHeap(), 0, v
->elements
);
1595 static void d3d10_effect_pass_destroy(struct d3d10_effect_pass
*p
)
1599 TRACE("pass %p\n", p
);
1601 HeapFree(GetProcessHeap(), 0, p
->name
);
1604 for (i
= 0; i
< p
->object_count
; ++i
)
1606 d3d10_effect_object_destroy(&p
->objects
[i
]);
1608 HeapFree(GetProcessHeap(), 0, p
->objects
);
1613 for (i
= 0; i
< p
->annotation_count
; ++i
)
1615 d3d10_effect_variable_destroy(&p
->annotations
[i
]);
1617 HeapFree(GetProcessHeap(), 0, p
->annotations
);
1622 static void d3d10_effect_technique_destroy(struct d3d10_effect_technique
*t
)
1626 TRACE("technique %p\n", t
);
1628 HeapFree(GetProcessHeap(), 0, t
->name
);
1631 for (i
= 0; i
< t
->pass_count
; ++i
)
1633 d3d10_effect_pass_destroy(&t
->passes
[i
]);
1635 HeapFree(GetProcessHeap(), 0, t
->passes
);
1640 for (i
= 0; i
< t
->annotation_count
; ++i
)
1642 d3d10_effect_variable_destroy(&t
->annotations
[i
]);
1644 HeapFree(GetProcessHeap(), 0, t
->annotations
);
1648 static void d3d10_effect_local_buffer_destroy(struct d3d10_effect_variable
*l
)
1652 TRACE("local buffer %p.\n", l
);
1654 HeapFree(GetProcessHeap(), 0, l
->name
);
1657 for (i
= 0; i
< l
->type
->member_count
; ++i
)
1659 d3d10_effect_variable_destroy(&l
->members
[i
]);
1661 HeapFree(GetProcessHeap(), 0, l
->members
);
1664 if (l
->type
->members
)
1666 for (i
= 0; i
< l
->type
->member_count
; ++i
)
1668 /* Do not release l->type->members[i].type, it will be covered by d3d10_effect_type_destroy(). */
1669 HeapFree(GetProcessHeap(), 0, l
->type
->members
[i
].semantic
);
1670 HeapFree(GetProcessHeap(), 0, l
->type
->members
[i
].name
);
1672 HeapFree(GetProcessHeap(), 0, l
->type
->members
);
1674 HeapFree(GetProcessHeap(), 0, l
->type
->name
);
1675 HeapFree(GetProcessHeap(), 0, l
->type
);
1679 for (i
= 0; i
< l
->annotation_count
; ++i
)
1681 d3d10_effect_variable_destroy(&l
->annotations
[i
]);
1683 HeapFree(GetProcessHeap(), 0, l
->annotations
);
1687 /* IUnknown methods */
1689 static HRESULT STDMETHODCALLTYPE
d3d10_effect_QueryInterface(ID3D10Effect
*iface
, REFIID riid
, void **object
)
1691 TRACE("iface %p, riid %s, object %p\n", iface
, debugstr_guid(riid
), object
);
1693 if (IsEqualGUID(riid
, &IID_ID3D10Effect
)
1694 || IsEqualGUID(riid
, &IID_IUnknown
))
1696 IUnknown_AddRef(iface
);
1701 WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid
));
1704 return E_NOINTERFACE
;
1707 static ULONG STDMETHODCALLTYPE
d3d10_effect_AddRef(ID3D10Effect
*iface
)
1709 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
1710 ULONG refcount
= InterlockedIncrement(&This
->refcount
);
1712 TRACE("%p increasing refcount to %u\n", This
, refcount
);
1717 static ULONG STDMETHODCALLTYPE
d3d10_effect_Release(ID3D10Effect
*iface
)
1719 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
1720 ULONG refcount
= InterlockedDecrement(&This
->refcount
);
1722 TRACE("%p decreasing refcount to %u\n", This
, refcount
);
1728 if (This
->techniques
)
1730 for (i
= 0; i
< This
->technique_count
; ++i
)
1732 d3d10_effect_technique_destroy(&This
->techniques
[i
]);
1734 HeapFree(GetProcessHeap(), 0, This
->techniques
);
1737 if (This
->local_variables
)
1739 for (i
= 0; i
< This
->local_variable_count
; ++i
)
1741 d3d10_effect_variable_destroy(&This
->local_variables
[i
]);
1743 HeapFree(GetProcessHeap(), 0, This
->local_variables
);
1746 if (This
->local_buffers
)
1748 for (i
= 0; i
< This
->local_buffer_count
; ++i
)
1750 d3d10_effect_local_buffer_destroy(&This
->local_buffers
[i
]);
1752 HeapFree(GetProcessHeap(), 0, This
->local_buffers
);
1755 wine_rb_destroy(&This
->types
, d3d10_effect_type_destroy
, NULL
);
1757 ID3D10Device_Release(This
->device
);
1758 HeapFree(GetProcessHeap(), 0, This
);
1764 /* ID3D10Effect methods */
1766 static BOOL STDMETHODCALLTYPE
d3d10_effect_IsValid(ID3D10Effect
*iface
)
1768 FIXME("iface %p stub!\n", iface
);
1773 static BOOL STDMETHODCALLTYPE
d3d10_effect_IsPool(ID3D10Effect
*iface
)
1775 FIXME("iface %p stub!\n", iface
);
1780 static HRESULT STDMETHODCALLTYPE
d3d10_effect_GetDevice(ID3D10Effect
*iface
, ID3D10Device
**device
)
1782 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
1784 TRACE("iface %p, device %p\n", iface
, device
);
1786 ID3D10Device_AddRef(This
->device
);
1787 *device
= This
->device
;
1792 static HRESULT STDMETHODCALLTYPE
d3d10_effect_GetDesc(ID3D10Effect
*iface
, D3D10_EFFECT_DESC
*desc
)
1794 FIXME("iface %p, desc %p stub!\n", iface
, desc
);
1799 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_GetConstantBufferByIndex(ID3D10Effect
*iface
,
1802 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
1803 struct d3d10_effect_variable
*l
;
1805 TRACE("iface %p, index %u\n", iface
, index
);
1807 if (index
>= This
->local_buffer_count
)
1809 WARN("Invalid index specified\n");
1810 return (ID3D10EffectConstantBuffer
*)&null_local_buffer
;
1813 l
= &This
->local_buffers
[index
];
1815 TRACE("Returning buffer %p, %s.\n", l
, debugstr_a(l
->name
));
1817 return (ID3D10EffectConstantBuffer
*)l
;
1820 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_GetConstantBufferByName(ID3D10Effect
*iface
,
1823 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
1826 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
1828 for (i
= 0; i
< This
->local_buffer_count
; ++i
)
1830 struct d3d10_effect_variable
*l
= &This
->local_buffers
[i
];
1832 if (!strcmp(l
->name
, name
))
1834 TRACE("Returning buffer %p.\n", l
);
1835 return (ID3D10EffectConstantBuffer
*)l
;
1839 WARN("Invalid name specified\n");
1841 return (ID3D10EffectConstantBuffer
*)&null_local_buffer
;
1844 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_GetVariableByIndex(ID3D10Effect
*iface
, UINT index
)
1846 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
1849 TRACE("iface %p, index %u\n", iface
, index
);
1851 for (i
= 0; i
< This
->local_buffer_count
; ++i
)
1853 struct d3d10_effect_variable
*l
= &This
->local_buffers
[i
];
1855 if (index
< l
->type
->member_count
)
1857 struct d3d10_effect_variable
*v
= &l
->members
[index
];
1859 TRACE("Returning variable %p.\n", v
);
1860 return (ID3D10EffectVariable
*)v
;
1862 index
-= l
->type
->member_count
;
1865 if (index
< This
->local_variable_count
)
1867 struct d3d10_effect_variable
*v
= &This
->local_variables
[index
];
1869 TRACE("Returning variable %p.\n", v
);
1870 return (ID3D10EffectVariable
*)v
;
1873 WARN("Invalid index specified\n");
1875 return (ID3D10EffectVariable
*)&null_variable
;
1878 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_GetVariableByName(ID3D10Effect
*iface
, LPCSTR name
)
1880 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
1883 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
1885 for (i
= 0; i
< This
->local_buffer_count
; ++i
)
1887 struct d3d10_effect_variable
*l
= &This
->local_buffers
[i
];
1890 for (j
= 0; j
< l
->type
->member_count
; ++j
)
1892 struct d3d10_effect_variable
*v
= &l
->members
[j
];
1894 if (!strcmp(v
->name
, name
))
1896 TRACE("Returning variable %p.\n", v
);
1897 return (ID3D10EffectVariable
*)v
;
1902 for (i
= 0; i
< This
->local_variable_count
; ++i
)
1904 struct d3d10_effect_variable
*v
= &This
->local_variables
[i
];
1906 if (!strcmp(v
->name
, name
))
1908 TRACE("Returning variable %p.\n", v
);
1909 return (ID3D10EffectVariable
*)v
;
1913 WARN("Invalid name specified\n");
1915 return (ID3D10EffectVariable
*)&null_variable
;
1918 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_GetVariableBySemantic(ID3D10Effect
*iface
,
1921 FIXME("iface %p, semantic %s stub!\n", iface
, debugstr_a(semantic
));
1926 static struct ID3D10EffectTechnique
* STDMETHODCALLTYPE
d3d10_effect_GetTechniqueByIndex(ID3D10Effect
*iface
,
1929 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
1930 struct d3d10_effect_technique
*t
;
1932 TRACE("iface %p, index %u\n", iface
, index
);
1934 if (index
>= This
->technique_count
)
1936 WARN("Invalid index specified\n");
1937 return (ID3D10EffectTechnique
*)&null_technique
;
1940 t
= &This
->techniques
[index
];
1942 TRACE("Returning technique %p, %s.\n", t
, debugstr_a(t
->name
));
1944 return (ID3D10EffectTechnique
*)t
;
1947 static struct ID3D10EffectTechnique
* STDMETHODCALLTYPE
d3d10_effect_GetTechniqueByName(ID3D10Effect
*iface
,
1950 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
1953 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
1955 for (i
= 0; i
< This
->technique_count
; ++i
)
1957 struct d3d10_effect_technique
*t
= &This
->techniques
[i
];
1958 if (!strcmp(t
->name
, name
))
1960 TRACE("Returning technique %p\n", t
);
1961 return (ID3D10EffectTechnique
*)t
;
1965 WARN("Invalid name specified\n");
1967 return (ID3D10EffectTechnique
*)&null_technique
;
1970 static HRESULT STDMETHODCALLTYPE
d3d10_effect_Optimize(ID3D10Effect
*iface
)
1972 FIXME("iface %p stub!\n", iface
);
1977 static BOOL STDMETHODCALLTYPE
d3d10_effect_IsOptimized(ID3D10Effect
*iface
)
1979 FIXME("iface %p stub!\n", iface
);
1984 const struct ID3D10EffectVtbl d3d10_effect_vtbl
=
1986 /* IUnknown methods */
1987 d3d10_effect_QueryInterface
,
1988 d3d10_effect_AddRef
,
1989 d3d10_effect_Release
,
1990 /* ID3D10Effect methods */
1991 d3d10_effect_IsValid
,
1992 d3d10_effect_IsPool
,
1993 d3d10_effect_GetDevice
,
1994 d3d10_effect_GetDesc
,
1995 d3d10_effect_GetConstantBufferByIndex
,
1996 d3d10_effect_GetConstantBufferByName
,
1997 d3d10_effect_GetVariableByIndex
,
1998 d3d10_effect_GetVariableByName
,
1999 d3d10_effect_GetVariableBySemantic
,
2000 d3d10_effect_GetTechniqueByIndex
,
2001 d3d10_effect_GetTechniqueByName
,
2002 d3d10_effect_Optimize
,
2003 d3d10_effect_IsOptimized
,
2006 /* ID3D10EffectTechnique methods */
2008 static BOOL STDMETHODCALLTYPE
d3d10_effect_technique_IsValid(ID3D10EffectTechnique
*iface
)
2010 TRACE("iface %p\n", iface
);
2012 return (struct d3d10_effect_technique
*)iface
!= &null_technique
;
2015 static HRESULT STDMETHODCALLTYPE
d3d10_effect_technique_GetDesc(ID3D10EffectTechnique
*iface
,
2016 D3D10_TECHNIQUE_DESC
*desc
)
2018 struct d3d10_effect_technique
*This
= (struct d3d10_effect_technique
*)iface
;
2020 TRACE("iface %p, desc %p\n", iface
, desc
);
2022 if(This
== &null_technique
)
2024 WARN("Null technique specified\n");
2030 WARN("Invalid argument specified\n");
2031 return E_INVALIDARG
;
2034 desc
->Name
= This
->name
;
2035 desc
->Passes
= This
->pass_count
;
2036 desc
->Annotations
= This
->annotation_count
;
2041 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_technique_GetAnnotationByIndex(
2042 ID3D10EffectTechnique
*iface
, UINT index
)
2044 struct d3d10_effect_technique
*This
= (struct d3d10_effect_technique
*)iface
;
2045 struct d3d10_effect_variable
*a
;
2047 TRACE("iface %p, index %u\n", iface
, index
);
2049 if (index
>= This
->annotation_count
)
2051 WARN("Invalid index specified\n");
2052 return (ID3D10EffectVariable
*)&null_variable
;
2055 a
= &This
->annotations
[index
];
2057 TRACE("Returning annotation %p, %s\n", a
, debugstr_a(a
->name
));
2059 return (ID3D10EffectVariable
*)a
;
2062 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_technique_GetAnnotationByName(
2063 ID3D10EffectTechnique
*iface
, LPCSTR name
)
2065 struct d3d10_effect_technique
*This
= (struct d3d10_effect_technique
*)iface
;
2068 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2070 for (i
= 0; i
< This
->annotation_count
; ++i
)
2072 struct d3d10_effect_variable
*a
= &This
->annotations
[i
];
2073 if (!strcmp(a
->name
, name
))
2075 TRACE("Returning annotation %p\n", a
);
2076 return (ID3D10EffectVariable
*)a
;
2080 WARN("Invalid name specified\n");
2082 return (ID3D10EffectVariable
*)&null_variable
;
2085 static struct ID3D10EffectPass
* STDMETHODCALLTYPE
d3d10_effect_technique_GetPassByIndex(ID3D10EffectTechnique
*iface
,
2088 struct d3d10_effect_technique
*This
= (struct d3d10_effect_technique
*)iface
;
2089 struct d3d10_effect_pass
*p
;
2091 TRACE("iface %p, index %u\n", iface
, index
);
2093 if (index
>= This
->pass_count
)
2095 WARN("Invalid index specified\n");
2096 return (ID3D10EffectPass
*)&null_pass
;
2099 p
= &This
->passes
[index
];
2101 TRACE("Returning pass %p, %s.\n", p
, debugstr_a(p
->name
));
2103 return (ID3D10EffectPass
*)p
;
2106 static struct ID3D10EffectPass
* STDMETHODCALLTYPE
d3d10_effect_technique_GetPassByName(ID3D10EffectTechnique
*iface
,
2109 struct d3d10_effect_technique
*This
= (struct d3d10_effect_technique
*)iface
;
2112 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2114 for (i
= 0; i
< This
->pass_count
; ++i
)
2116 struct d3d10_effect_pass
*p
= &This
->passes
[i
];
2117 if (!strcmp(p
->name
, name
))
2119 TRACE("Returning pass %p\n", p
);
2120 return (ID3D10EffectPass
*)p
;
2124 WARN("Invalid name specified\n");
2126 return (ID3D10EffectPass
*)&null_pass
;
2129 static HRESULT STDMETHODCALLTYPE
d3d10_effect_technique_ComputeStateBlockMask(ID3D10EffectTechnique
*iface
,
2130 D3D10_STATE_BLOCK_MASK
*mask
)
2132 FIXME("iface %p,mask %p stub!\n", iface
, mask
);
2137 static const struct ID3D10EffectTechniqueVtbl d3d10_effect_technique_vtbl
=
2139 /* ID3D10EffectTechnique methods */
2140 d3d10_effect_technique_IsValid
,
2141 d3d10_effect_technique_GetDesc
,
2142 d3d10_effect_technique_GetAnnotationByIndex
,
2143 d3d10_effect_technique_GetAnnotationByName
,
2144 d3d10_effect_technique_GetPassByIndex
,
2145 d3d10_effect_technique_GetPassByName
,
2146 d3d10_effect_technique_ComputeStateBlockMask
,
2149 /* ID3D10EffectPass methods */
2151 static BOOL STDMETHODCALLTYPE
d3d10_effect_pass_IsValid(ID3D10EffectPass
*iface
)
2153 TRACE("iface %p\n", iface
);
2155 return (struct d3d10_effect_pass
*)iface
!= &null_pass
;
2158 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_GetDesc(ID3D10EffectPass
*iface
, D3D10_PASS_DESC
*desc
)
2160 struct d3d10_effect_pass
*This
= (struct d3d10_effect_pass
*)iface
;
2163 FIXME("iface %p, desc %p partial stub!\n", iface
, desc
);
2165 if(This
== &null_pass
)
2167 WARN("Null pass specified\n");
2173 WARN("Invalid argument specified\n");
2174 return E_INVALIDARG
;
2177 memset(desc
, 0, sizeof(*desc
));
2178 desc
->Name
= This
->name
;
2179 for (i
= 0; i
< This
->object_count
; ++i
)
2181 struct d3d10_effect_object
*o
= &This
->objects
[i
];
2182 if (o
->type
== D3D10_EOT_VERTEXSHADER
)
2184 struct d3d10_effect_shader_variable
*s
= o
->data
;
2185 desc
->pIAInputSignature
= (BYTE
*)s
->input_signature
;
2186 desc
->IAInputSignatureSize
= s
->input_signature_size
;
2194 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_GetVertexShaderDesc(ID3D10EffectPass
*iface
,
2195 D3D10_PASS_SHADER_DESC
*desc
)
2197 FIXME("iface %p, desc %p stub!\n", iface
, desc
);
2202 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_GetGeometryShaderDesc(ID3D10EffectPass
*iface
,
2203 D3D10_PASS_SHADER_DESC
*desc
)
2205 FIXME("iface %p, desc %p stub!\n", iface
, desc
);
2210 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_GetPixelShaderDesc(ID3D10EffectPass
*iface
,
2211 D3D10_PASS_SHADER_DESC
*desc
)
2213 FIXME("iface %p, desc %p stub!\n", iface
, desc
);
2218 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_pass_GetAnnotationByIndex(ID3D10EffectPass
*iface
,
2221 struct d3d10_effect_pass
*This
= (struct d3d10_effect_pass
*)iface
;
2222 struct d3d10_effect_variable
*a
;
2224 TRACE("iface %p, index %u\n", iface
, index
);
2226 if (index
>= This
->annotation_count
)
2228 WARN("Invalid index specified\n");
2229 return (ID3D10EffectVariable
*)&null_variable
;
2232 a
= &This
->annotations
[index
];
2234 TRACE("Returning annotation %p, %s\n", a
, debugstr_a(a
->name
));
2236 return (ID3D10EffectVariable
*)a
;
2239 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_pass_GetAnnotationByName(ID3D10EffectPass
*iface
,
2242 struct d3d10_effect_pass
*This
= (struct d3d10_effect_pass
*)iface
;
2245 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2247 for (i
= 0; i
< This
->annotation_count
; ++i
)
2249 struct d3d10_effect_variable
*a
= &This
->annotations
[i
];
2250 if (!strcmp(a
->name
, name
))
2252 TRACE("Returning annotation %p\n", a
);
2253 return (ID3D10EffectVariable
*)a
;
2257 WARN("Invalid name specified\n");
2259 return (ID3D10EffectVariable
*)&null_variable
;
2262 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_Apply(ID3D10EffectPass
*iface
, UINT flags
)
2264 struct d3d10_effect_pass
*This
= (struct d3d10_effect_pass
*)iface
;
2268 TRACE("iface %p, flags %#x\n", iface
, flags
);
2270 if (flags
) FIXME("Ignoring flags (%#x)\n", flags
);
2272 for (i
= 0; i
< This
->object_count
; ++i
)
2274 hr
= d3d10_effect_object_apply(&This
->objects
[i
]);
2275 if (FAILED(hr
)) break;
2281 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_ComputeStateBlockMask(ID3D10EffectPass
*iface
,
2282 D3D10_STATE_BLOCK_MASK
*mask
)
2284 FIXME("iface %p, mask %p stub!\n", iface
, mask
);
2289 static const struct ID3D10EffectPassVtbl d3d10_effect_pass_vtbl
=
2291 /* ID3D10EffectPass methods */
2292 d3d10_effect_pass_IsValid
,
2293 d3d10_effect_pass_GetDesc
,
2294 d3d10_effect_pass_GetVertexShaderDesc
,
2295 d3d10_effect_pass_GetGeometryShaderDesc
,
2296 d3d10_effect_pass_GetPixelShaderDesc
,
2297 d3d10_effect_pass_GetAnnotationByIndex
,
2298 d3d10_effect_pass_GetAnnotationByName
,
2299 d3d10_effect_pass_Apply
,
2300 d3d10_effect_pass_ComputeStateBlockMask
,
2303 /* ID3D10EffectVariable methods */
2305 static BOOL STDMETHODCALLTYPE
d3d10_effect_variable_IsValid(ID3D10EffectVariable
*iface
)
2307 TRACE("iface %p\n", iface
);
2309 return (struct d3d10_effect_variable
*)iface
!= &null_variable
;
2312 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_variable_GetType(ID3D10EffectVariable
*iface
)
2314 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2316 TRACE("iface %p\n", iface
);
2318 return (ID3D10EffectType
*)This
->type
;
2321 static HRESULT STDMETHODCALLTYPE
d3d10_effect_variable_GetDesc(ID3D10EffectVariable
*iface
,
2322 D3D10_EFFECT_VARIABLE_DESC
*desc
)
2324 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2326 TRACE("iface %p, desc %p\n", iface
, desc
);
2328 if(This
== &null_variable
)
2330 WARN("Null variable specified\n");
2336 WARN("Invalid argument specified\n");
2337 return E_INVALIDARG
;
2340 memset(desc
, 0, sizeof(*desc
));
2341 desc
->Name
= This
->name
;
2342 desc
->Semantic
= This
->semantic
;
2343 desc
->Flags
= This
->flag
;
2344 desc
->Annotations
= This
->annotation_count
;
2345 desc
->BufferOffset
= This
->buffer_offset
;
2347 if( This
->flag
== D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT
)
2349 desc
->ExplicitBindPoint
= This
->buffer_offset
;
2355 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetAnnotationByIndex(
2356 ID3D10EffectVariable
*iface
, UINT index
)
2358 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2359 struct d3d10_effect_variable
*a
;
2361 TRACE("iface %p, index %u\n", iface
, index
);
2363 if (index
>= This
->annotation_count
)
2365 WARN("Invalid index specified\n");
2366 return (ID3D10EffectVariable
*)&null_variable
;
2369 a
= &This
->annotations
[index
];
2371 TRACE("Returning annotation %p, %s\n", a
, debugstr_a(a
->name
));
2373 return (ID3D10EffectVariable
*)a
;
2376 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetAnnotationByName(
2377 ID3D10EffectVariable
*iface
, LPCSTR name
)
2379 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2382 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2384 for (i
= 0; i
< This
->annotation_count
; ++i
)
2386 struct d3d10_effect_variable
*a
= &This
->annotations
[i
];
2387 if (!strcmp(a
->name
, name
))
2389 TRACE("Returning annotation %p\n", a
);
2390 return (ID3D10EffectVariable
*)a
;
2394 WARN("Invalid name specified\n");
2396 return (ID3D10EffectVariable
*)&null_variable
;
2399 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetMemberByIndex(
2400 ID3D10EffectVariable
*iface
, UINT index
)
2402 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2403 struct d3d10_effect_variable
*m
;
2405 TRACE("iface %p, index %u\n", iface
, index
);
2407 if (index
>= This
->type
->member_count
)
2409 WARN("Invalid index specified\n");
2410 return (ID3D10EffectVariable
*)&null_variable
;
2413 m
= &This
->members
[index
];
2415 TRACE("Returning member %p, %s\n", m
, debugstr_a(m
->name
));
2417 return (ID3D10EffectVariable
*)m
;
2420 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetMemberByName(
2421 ID3D10EffectVariable
*iface
, LPCSTR name
)
2423 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2426 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2430 WARN("Invalid name specified\n");
2431 return (ID3D10EffectVariable
*)&null_variable
;
2434 for (i
= 0; i
< This
->type
->member_count
; ++i
)
2436 struct d3d10_effect_variable
*m
= &This
->members
[i
];
2440 if (!strcmp(m
->name
, name
))
2442 TRACE("Returning member %p\n", m
);
2443 return (ID3D10EffectVariable
*)m
;
2448 WARN("Invalid name specified\n");
2450 return (ID3D10EffectVariable
*)&null_variable
;
2453 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetMemberBySemantic(
2454 ID3D10EffectVariable
*iface
, LPCSTR semantic
)
2456 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2459 TRACE("iface %p, semantic %s.\n", iface
, debugstr_a(semantic
));
2463 WARN("Invalid semantic specified\n");
2464 return (ID3D10EffectVariable
*)&null_variable
;
2467 for (i
= 0; i
< This
->type
->member_count
; ++i
)
2469 struct d3d10_effect_variable
*m
= &This
->members
[i
];
2473 if (!strcmp(m
->semantic
, semantic
))
2475 TRACE("Returning member %p\n", m
);
2476 return (ID3D10EffectVariable
*)m
;
2481 WARN("Invalid semantic specified\n");
2483 return (ID3D10EffectVariable
*)&null_variable
;
2486 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetElement(
2487 ID3D10EffectVariable
*iface
, UINT index
)
2489 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2490 struct d3d10_effect_variable
*v
;
2492 TRACE("iface %p, index %u\n", iface
, index
);
2494 if (index
>= This
->type
->element_count
)
2496 WARN("Invalid index specified\n");
2497 return (ID3D10EffectVariable
*)&null_variable
;
2500 v
= &This
->elements
[index
];
2502 TRACE("Returning element %p, %s\n", v
, debugstr_a(v
->name
));
2504 return (ID3D10EffectVariable
*)v
;
2507 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_variable_GetParentConstantBuffer(
2508 ID3D10EffectVariable
*iface
)
2510 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2512 TRACE("iface %p\n", iface
);
2514 return (ID3D10EffectConstantBuffer
*)This
->buffer
;
2517 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsScalar(
2518 ID3D10EffectVariable
*iface
)
2520 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2522 TRACE("iface %p\n", iface
);
2524 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_scalar_variable_vtbl
)
2525 return (ID3D10EffectScalarVariable
*)This
;
2527 return (ID3D10EffectScalarVariable
*)&null_scalar_variable
;
2530 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsVector(
2531 ID3D10EffectVariable
*iface
)
2533 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2535 TRACE("iface %p\n", iface
);
2537 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_vector_variable_vtbl
)
2538 return (ID3D10EffectVectorVariable
*)This
;
2540 return (ID3D10EffectVectorVariable
*)&null_vector_variable
;
2543 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsMatrix(
2544 ID3D10EffectVariable
*iface
)
2546 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2548 TRACE("iface %p\n", iface
);
2550 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_matrix_variable_vtbl
)
2551 return (ID3D10EffectMatrixVariable
*)This
;
2553 return (ID3D10EffectMatrixVariable
*)&null_matrix_variable
;
2556 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsString(
2557 ID3D10EffectVariable
*iface
)
2559 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2561 TRACE("iface %p\n", iface
);
2563 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_string_variable_vtbl
)
2564 return (ID3D10EffectStringVariable
*)This
;
2566 return (ID3D10EffectStringVariable
*)&null_string_variable
;
2569 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsShaderResource(
2570 ID3D10EffectVariable
*iface
)
2572 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2574 TRACE("iface %p\n", iface
);
2576 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_resource_variable_vtbl
)
2577 return (ID3D10EffectShaderResourceVariable
*)This
;
2579 return (ID3D10EffectShaderResourceVariable
*)&null_shader_resource_variable
;
2582 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsRenderTargetView(
2583 ID3D10EffectVariable
*iface
)
2585 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2587 TRACE("iface %p\n", iface
);
2589 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_render_target_view_variable_vtbl
)
2590 return (ID3D10EffectRenderTargetViewVariable
*)This
;
2592 return (ID3D10EffectRenderTargetViewVariable
*)&null_render_target_view_variable
;
2595 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsDepthStencilView(
2596 ID3D10EffectVariable
*iface
)
2598 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2600 TRACE("iface %p\n", iface
);
2602 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_depth_stencil_view_variable_vtbl
)
2603 return (ID3D10EffectDepthStencilViewVariable
*)This
;
2605 return (ID3D10EffectDepthStencilViewVariable
*)&null_depth_stencil_view_variable
;
2608 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_variable_AsConstantBuffer(
2609 ID3D10EffectVariable
*iface
)
2611 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2613 TRACE("iface %p\n", iface
);
2615 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_constant_buffer_vtbl
)
2616 return (ID3D10EffectConstantBuffer
*)This
;
2618 return (ID3D10EffectConstantBuffer
*)&null_local_buffer
;
2621 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsShader(
2622 ID3D10EffectVariable
*iface
)
2624 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2626 TRACE("iface %p\n", iface
);
2628 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_variable_vtbl
)
2629 return (ID3D10EffectShaderVariable
*)This
;
2631 return (ID3D10EffectShaderVariable
*)&null_shader_variable
;
2634 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsBlend(ID3D10EffectVariable
*iface
)
2636 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2638 TRACE("iface %p\n", iface
);
2640 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_blend_variable_vtbl
)
2641 return (ID3D10EffectBlendVariable
*)This
;
2643 return (ID3D10EffectBlendVariable
*)&null_blend_variable
;
2646 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsDepthStencil(
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_depth_stencil_variable_vtbl
)
2654 return (ID3D10EffectDepthStencilVariable
*)This
;
2656 return (ID3D10EffectDepthStencilVariable
*)&null_depth_stencil_variable
;
2659 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsRasterizer(
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_rasterizer_variable_vtbl
)
2667 return (ID3D10EffectRasterizerVariable
*)This
;
2669 return (ID3D10EffectRasterizerVariable
*)&null_rasterizer_variable
;
2672 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsSampler(
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_sampler_variable_vtbl
)
2680 return (ID3D10EffectSamplerVariable
*)This
;
2682 return (ID3D10EffectSamplerVariable
*)&null_sampler_variable
;
2685 static HRESULT STDMETHODCALLTYPE
d3d10_effect_variable_SetRawValue(ID3D10EffectVariable
*iface
,
2686 void *data
, UINT offset
, UINT count
)
2688 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
2693 static HRESULT STDMETHODCALLTYPE
d3d10_effect_variable_GetRawValue(ID3D10EffectVariable
*iface
,
2694 void *data
, UINT offset
, UINT count
)
2696 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
2701 static const struct ID3D10EffectVariableVtbl d3d10_effect_variable_vtbl
=
2703 /* ID3D10EffectVariable methods */
2704 d3d10_effect_variable_IsValid
,
2705 d3d10_effect_variable_GetType
,
2706 d3d10_effect_variable_GetDesc
,
2707 d3d10_effect_variable_GetAnnotationByIndex
,
2708 d3d10_effect_variable_GetAnnotationByName
,
2709 d3d10_effect_variable_GetMemberByIndex
,
2710 d3d10_effect_variable_GetMemberByName
,
2711 d3d10_effect_variable_GetMemberBySemantic
,
2712 d3d10_effect_variable_GetElement
,
2713 d3d10_effect_variable_GetParentConstantBuffer
,
2714 d3d10_effect_variable_AsScalar
,
2715 d3d10_effect_variable_AsVector
,
2716 d3d10_effect_variable_AsMatrix
,
2717 d3d10_effect_variable_AsString
,
2718 d3d10_effect_variable_AsShaderResource
,
2719 d3d10_effect_variable_AsRenderTargetView
,
2720 d3d10_effect_variable_AsDepthStencilView
,
2721 d3d10_effect_variable_AsConstantBuffer
,
2722 d3d10_effect_variable_AsShader
,
2723 d3d10_effect_variable_AsBlend
,
2724 d3d10_effect_variable_AsDepthStencil
,
2725 d3d10_effect_variable_AsRasterizer
,
2726 d3d10_effect_variable_AsSampler
,
2727 d3d10_effect_variable_SetRawValue
,
2728 d3d10_effect_variable_GetRawValue
,
2731 /* ID3D10EffectVariable methods */
2732 static BOOL STDMETHODCALLTYPE
d3d10_effect_constant_buffer_IsValid(ID3D10EffectConstantBuffer
*iface
)
2734 TRACE("iface %p\n", iface
);
2736 return (struct d3d10_effect_variable
*)iface
!= &null_local_buffer
;
2739 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetType(ID3D10EffectConstantBuffer
*iface
)
2741 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
2744 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetDesc(ID3D10EffectConstantBuffer
*iface
,
2745 D3D10_EFFECT_VARIABLE_DESC
*desc
)
2747 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
2750 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetAnnotationByIndex(
2751 ID3D10EffectConstantBuffer
*iface
, UINT index
)
2753 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
2756 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetAnnotationByName(
2757 ID3D10EffectConstantBuffer
*iface
, LPCSTR name
)
2759 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
2762 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetMemberByIndex(
2763 ID3D10EffectConstantBuffer
*iface
, UINT index
)
2765 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
2768 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetMemberByName(
2769 ID3D10EffectConstantBuffer
*iface
, LPCSTR name
)
2771 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
2774 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetMemberBySemantic(
2775 ID3D10EffectConstantBuffer
*iface
, LPCSTR semantic
)
2777 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
2780 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetElement(
2781 ID3D10EffectConstantBuffer
*iface
, UINT index
)
2783 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
2786 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetParentConstantBuffer(
2787 ID3D10EffectConstantBuffer
*iface
)
2789 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
2792 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsScalar(
2793 ID3D10EffectConstantBuffer
*iface
)
2795 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
2798 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsVector(
2799 ID3D10EffectConstantBuffer
*iface
)
2801 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
2804 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsMatrix(
2805 ID3D10EffectConstantBuffer
*iface
)
2807 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
2810 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsString(
2811 ID3D10EffectConstantBuffer
*iface
)
2813 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
2816 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsShaderResource(
2817 ID3D10EffectConstantBuffer
*iface
)
2819 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
2822 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsRenderTargetView(
2823 ID3D10EffectConstantBuffer
*iface
)
2825 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
2828 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsDepthStencilView(
2829 ID3D10EffectConstantBuffer
*iface
)
2831 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
2834 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsConstantBuffer(
2835 ID3D10EffectConstantBuffer
*iface
)
2837 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
2840 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsShader(
2841 ID3D10EffectConstantBuffer
*iface
)
2843 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
2846 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsBlend(ID3D10EffectConstantBuffer
*iface
)
2848 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
2851 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsDepthStencil(
2852 ID3D10EffectConstantBuffer
*iface
)
2854 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
2857 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsRasterizer(
2858 ID3D10EffectConstantBuffer
*iface
)
2860 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
2863 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsSampler(
2864 ID3D10EffectConstantBuffer
*iface
)
2866 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
2869 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_SetRawValue(ID3D10EffectConstantBuffer
*iface
,
2870 void *data
, UINT offset
, UINT count
)
2872 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
2875 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetRawValue(ID3D10EffectConstantBuffer
*iface
,
2876 void *data
, UINT offset
, UINT count
)
2878 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
2881 /* ID3D10EffectConstantBuffer methods */
2882 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_SetConstantBuffer(ID3D10EffectConstantBuffer
*iface
,
2883 ID3D10Buffer
*buffer
)
2885 FIXME("iface %p, buffer %p stub!\n", iface
, buffer
);
2890 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetConstantBuffer(ID3D10EffectConstantBuffer
*iface
,
2891 ID3D10Buffer
**buffer
)
2893 FIXME("iface %p, buffer %p stub!\n", iface
, buffer
);
2898 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_SetTextureBuffer(ID3D10EffectConstantBuffer
*iface
,
2899 ID3D10ShaderResourceView
*view
)
2901 FIXME("iface %p, view %p stub!\n", iface
, view
);
2906 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetTextureBuffer(ID3D10EffectConstantBuffer
*iface
,
2907 ID3D10ShaderResourceView
**view
)
2909 FIXME("iface %p, view %p stub!\n", iface
, view
);
2914 static const struct ID3D10EffectConstantBufferVtbl d3d10_effect_constant_buffer_vtbl
=
2916 /* ID3D10EffectVariable methods */
2917 d3d10_effect_constant_buffer_IsValid
,
2918 d3d10_effect_constant_buffer_GetType
,
2919 d3d10_effect_constant_buffer_GetDesc
,
2920 d3d10_effect_constant_buffer_GetAnnotationByIndex
,
2921 d3d10_effect_constant_buffer_GetAnnotationByName
,
2922 d3d10_effect_constant_buffer_GetMemberByIndex
,
2923 d3d10_effect_constant_buffer_GetMemberByName
,
2924 d3d10_effect_constant_buffer_GetMemberBySemantic
,
2925 d3d10_effect_constant_buffer_GetElement
,
2926 d3d10_effect_constant_buffer_GetParentConstantBuffer
,
2927 d3d10_effect_constant_buffer_AsScalar
,
2928 d3d10_effect_constant_buffer_AsVector
,
2929 d3d10_effect_constant_buffer_AsMatrix
,
2930 d3d10_effect_constant_buffer_AsString
,
2931 d3d10_effect_constant_buffer_AsShaderResource
,
2932 d3d10_effect_constant_buffer_AsRenderTargetView
,
2933 d3d10_effect_constant_buffer_AsDepthStencilView
,
2934 d3d10_effect_constant_buffer_AsConstantBuffer
,
2935 d3d10_effect_constant_buffer_AsShader
,
2936 d3d10_effect_constant_buffer_AsBlend
,
2937 d3d10_effect_constant_buffer_AsDepthStencil
,
2938 d3d10_effect_constant_buffer_AsRasterizer
,
2939 d3d10_effect_constant_buffer_AsSampler
,
2940 d3d10_effect_constant_buffer_SetRawValue
,
2941 d3d10_effect_constant_buffer_GetRawValue
,
2942 /* ID3D10EffectConstantBuffer methods */
2943 d3d10_effect_constant_buffer_SetConstantBuffer
,
2944 d3d10_effect_constant_buffer_GetConstantBuffer
,
2945 d3d10_effect_constant_buffer_SetTextureBuffer
,
2946 d3d10_effect_constant_buffer_GetTextureBuffer
,
2949 /* ID3D10EffectVariable methods */
2951 static BOOL STDMETHODCALLTYPE
d3d10_effect_scalar_variable_IsValid(ID3D10EffectScalarVariable
*iface
)
2953 TRACE("iface %p\n", iface
);
2955 return (struct d3d10_effect_variable
*)iface
!= &null_scalar_variable
;
2958 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetType(
2959 ID3D10EffectScalarVariable
*iface
)
2961 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
2964 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetDesc(ID3D10EffectScalarVariable
*iface
,
2965 D3D10_EFFECT_VARIABLE_DESC
*desc
)
2967 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
2970 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetAnnotationByIndex(
2971 ID3D10EffectScalarVariable
*iface
, UINT index
)
2973 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
2976 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetAnnotationByName(
2977 ID3D10EffectScalarVariable
*iface
, LPCSTR name
)
2979 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
2982 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetMemberByIndex(
2983 ID3D10EffectScalarVariable
*iface
, UINT index
)
2985 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
2988 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetMemberByName(
2989 ID3D10EffectScalarVariable
*iface
, LPCSTR name
)
2991 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
2994 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetMemberBySemantic(
2995 ID3D10EffectScalarVariable
*iface
, LPCSTR semantic
)
2997 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
3000 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetElement(
3001 ID3D10EffectScalarVariable
*iface
, UINT index
)
3003 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
3006 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetParentConstantBuffer(
3007 ID3D10EffectScalarVariable
*iface
)
3009 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
3012 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsScalar(
3013 ID3D10EffectScalarVariable
*iface
)
3015 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
3018 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsVector(
3019 ID3D10EffectScalarVariable
*iface
)
3021 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
3024 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsMatrix(
3025 ID3D10EffectScalarVariable
*iface
)
3027 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
3030 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsString(
3031 ID3D10EffectScalarVariable
*iface
)
3033 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
3036 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsShaderResource(
3037 ID3D10EffectScalarVariable
*iface
)
3039 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
3042 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsRenderTargetView(
3043 ID3D10EffectScalarVariable
*iface
)
3045 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
3048 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsDepthStencilView(
3049 ID3D10EffectScalarVariable
*iface
)
3051 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
3054 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsConstantBuffer(
3055 ID3D10EffectScalarVariable
*iface
)
3057 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
3060 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsShader(
3061 ID3D10EffectScalarVariable
*iface
)
3063 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
3066 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsBlend(
3067 ID3D10EffectScalarVariable
*iface
)
3069 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
3072 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsDepthStencil(
3073 ID3D10EffectScalarVariable
*iface
)
3075 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
3078 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsRasterizer(
3079 ID3D10EffectScalarVariable
*iface
)
3081 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
3084 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsSampler(
3085 ID3D10EffectScalarVariable
*iface
)
3087 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
3090 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetRawValue(ID3D10EffectScalarVariable
*iface
,
3091 void *data
, UINT offset
, UINT count
)
3093 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3096 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetRawValue(ID3D10EffectScalarVariable
*iface
,
3097 void *data
, UINT offset
, UINT count
)
3099 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3102 /* ID3D10EffectScalarVariable methods */
3104 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetFloat(ID3D10EffectScalarVariable
*iface
,
3107 FIXME("iface %p, value %.8e stub!\n", iface
, value
);
3112 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetFloat(ID3D10EffectScalarVariable
*iface
,
3115 FIXME("iface %p, value %p stub!\n", iface
, value
);
3120 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetFloatArray(ID3D10EffectScalarVariable
*iface
,
3121 float *values
, UINT offset
, UINT count
)
3123 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3128 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetFloatArray(ID3D10EffectScalarVariable
*iface
,
3129 float *values
, UINT offset
, UINT count
)
3131 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3136 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetInt(ID3D10EffectScalarVariable
*iface
,
3139 FIXME("iface %p, value %d stub!\n", iface
, value
);
3144 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetInt(ID3D10EffectScalarVariable
*iface
,
3147 FIXME("iface %p, value %p stub!\n", iface
, value
);
3152 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetIntArray(ID3D10EffectScalarVariable
*iface
,
3153 int *values
, UINT offset
, UINT count
)
3155 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3160 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetIntArray(ID3D10EffectScalarVariable
*iface
,
3161 int *values
, UINT offset
, UINT count
)
3163 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3168 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetBool(ID3D10EffectScalarVariable
*iface
,
3171 FIXME("iface %p, value %d stub!\n", iface
, value
);
3176 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetBool(ID3D10EffectScalarVariable
*iface
,
3179 FIXME("iface %p, value %p stub!\n", iface
, value
);
3184 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetBoolArray(ID3D10EffectScalarVariable
*iface
,
3185 BOOL
*values
, UINT offset
, UINT count
)
3187 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3192 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetBoolArray(ID3D10EffectScalarVariable
*iface
,
3193 BOOL
*values
, UINT offset
, UINT count
)
3195 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3200 static const struct ID3D10EffectScalarVariableVtbl d3d10_effect_scalar_variable_vtbl
=
3202 /* ID3D10EffectVariable methods */
3203 d3d10_effect_scalar_variable_IsValid
,
3204 d3d10_effect_scalar_variable_GetType
,
3205 d3d10_effect_scalar_variable_GetDesc
,
3206 d3d10_effect_scalar_variable_GetAnnotationByIndex
,
3207 d3d10_effect_scalar_variable_GetAnnotationByName
,
3208 d3d10_effect_scalar_variable_GetMemberByIndex
,
3209 d3d10_effect_scalar_variable_GetMemberByName
,
3210 d3d10_effect_scalar_variable_GetMemberBySemantic
,
3211 d3d10_effect_scalar_variable_GetElement
,
3212 d3d10_effect_scalar_variable_GetParentConstantBuffer
,
3213 d3d10_effect_scalar_variable_AsScalar
,
3214 d3d10_effect_scalar_variable_AsVector
,
3215 d3d10_effect_scalar_variable_AsMatrix
,
3216 d3d10_effect_scalar_variable_AsString
,
3217 d3d10_effect_scalar_variable_AsShaderResource
,
3218 d3d10_effect_scalar_variable_AsRenderTargetView
,
3219 d3d10_effect_scalar_variable_AsDepthStencilView
,
3220 d3d10_effect_scalar_variable_AsConstantBuffer
,
3221 d3d10_effect_scalar_variable_AsShader
,
3222 d3d10_effect_scalar_variable_AsBlend
,
3223 d3d10_effect_scalar_variable_AsDepthStencil
,
3224 d3d10_effect_scalar_variable_AsRasterizer
,
3225 d3d10_effect_scalar_variable_AsSampler
,
3226 d3d10_effect_scalar_variable_SetRawValue
,
3227 d3d10_effect_scalar_variable_GetRawValue
,
3228 /* ID3D10EffectScalarVariable methods */
3229 d3d10_effect_scalar_variable_SetFloat
,
3230 d3d10_effect_scalar_variable_GetFloat
,
3231 d3d10_effect_scalar_variable_SetFloatArray
,
3232 d3d10_effect_scalar_variable_GetFloatArray
,
3233 d3d10_effect_scalar_variable_SetInt
,
3234 d3d10_effect_scalar_variable_GetInt
,
3235 d3d10_effect_scalar_variable_SetIntArray
,
3236 d3d10_effect_scalar_variable_GetIntArray
,
3237 d3d10_effect_scalar_variable_SetBool
,
3238 d3d10_effect_scalar_variable_GetBool
,
3239 d3d10_effect_scalar_variable_SetBoolArray
,
3240 d3d10_effect_scalar_variable_GetBoolArray
,
3243 /* ID3D10EffectVariable methods */
3245 static BOOL STDMETHODCALLTYPE
d3d10_effect_vector_variable_IsValid(ID3D10EffectVectorVariable
*iface
)
3247 TRACE("iface %p\n", iface
);
3249 return (struct d3d10_effect_variable
*)iface
!= &null_vector_variable
;
3252 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetType(
3253 ID3D10EffectVectorVariable
*iface
)
3255 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
3258 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetDesc(ID3D10EffectVectorVariable
*iface
,
3259 D3D10_EFFECT_VARIABLE_DESC
*desc
)
3261 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
3264 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetAnnotationByIndex(
3265 ID3D10EffectVectorVariable
*iface
, UINT index
)
3267 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
3270 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetAnnotationByName(
3271 ID3D10EffectVectorVariable
*iface
, LPCSTR name
)
3273 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
3276 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetMemberByIndex(
3277 ID3D10EffectVectorVariable
*iface
, UINT index
)
3279 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
3282 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetMemberByName(
3283 ID3D10EffectVectorVariable
*iface
, LPCSTR name
)
3285 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
3288 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetMemberBySemantic(
3289 ID3D10EffectVectorVariable
*iface
, LPCSTR semantic
)
3291 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
3294 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetElement(
3295 ID3D10EffectVectorVariable
*iface
, UINT index
)
3297 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
3300 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetParentConstantBuffer(
3301 ID3D10EffectVectorVariable
*iface
)
3303 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
3306 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsScalar(
3307 ID3D10EffectVectorVariable
*iface
)
3309 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
3312 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsVector(
3313 ID3D10EffectVectorVariable
*iface
)
3315 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
3318 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsMatrix(
3319 ID3D10EffectVectorVariable
*iface
)
3321 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
3324 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsString(
3325 ID3D10EffectVectorVariable
*iface
)
3327 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
3330 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsShaderResource(
3331 ID3D10EffectVectorVariable
*iface
)
3333 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
3336 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsRenderTargetView(
3337 ID3D10EffectVectorVariable
*iface
)
3339 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
3342 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsDepthStencilView(
3343 ID3D10EffectVectorVariable
*iface
)
3345 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
3348 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsConstantBuffer(
3349 ID3D10EffectVectorVariable
*iface
)
3351 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
3354 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsShader(
3355 ID3D10EffectVectorVariable
*iface
)
3357 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
3360 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsBlend(
3361 ID3D10EffectVectorVariable
*iface
)
3363 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
3366 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsDepthStencil(
3367 ID3D10EffectVectorVariable
*iface
)
3369 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
3372 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsRasterizer(
3373 ID3D10EffectVectorVariable
*iface
)
3375 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
3378 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsSampler(
3379 ID3D10EffectVectorVariable
*iface
)
3381 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
3384 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetRawValue(ID3D10EffectVectorVariable
*iface
,
3385 void *data
, UINT offset
, UINT count
)
3387 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3390 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetRawValue(ID3D10EffectVectorVariable
*iface
,
3391 void *data
, UINT offset
, UINT count
)
3393 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3396 /* ID3D10EffectVectorVariable methods */
3398 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetBoolVector(ID3D10EffectVectorVariable
*iface
,
3401 FIXME("iface %p, value %p stub!\n", iface
, value
);
3406 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetIntVector(ID3D10EffectVectorVariable
*iface
,
3409 FIXME("iface %p, value %p stub!\n", iface
, value
);
3414 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetFloatVector(ID3D10EffectVectorVariable
*iface
,
3417 FIXME("iface %p, value %p stub!\n", iface
, value
);
3422 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetBoolVector(ID3D10EffectVectorVariable
*iface
,
3425 FIXME("iface %p, value %p stub!\n", iface
, value
);
3430 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetIntVector(ID3D10EffectVectorVariable
*iface
,
3433 FIXME("iface %p, value %p stub!\n", iface
, value
);
3438 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetFloatVector(ID3D10EffectVectorVariable
*iface
,
3441 FIXME("iface %p, value %p stub!\n", iface
, value
);
3446 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetBoolVectorArray(ID3D10EffectVectorVariable
*iface
,
3447 BOOL
*values
, UINT offset
, UINT count
)
3449 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3454 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetIntVectorArray(ID3D10EffectVectorVariable
*iface
,
3455 int *values
, UINT offset
, UINT count
)
3457 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3462 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetFloatVectorArray(ID3D10EffectVectorVariable
*iface
,
3463 float *values
, UINT offset
, UINT count
)
3465 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3470 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetBoolVectorArray(ID3D10EffectVectorVariable
*iface
,
3471 BOOL
*values
, UINT offset
, UINT count
)
3473 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3478 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetIntVectorArray(ID3D10EffectVectorVariable
*iface
,
3479 int *values
, UINT offset
, UINT count
)
3481 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3486 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetFloatVectorArray(ID3D10EffectVectorVariable
*iface
,
3487 float *values
, UINT offset
, UINT count
)
3489 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3494 static const struct ID3D10EffectVectorVariableVtbl d3d10_effect_vector_variable_vtbl
=
3496 /* ID3D10EffectVariable methods */
3497 d3d10_effect_vector_variable_IsValid
,
3498 d3d10_effect_vector_variable_GetType
,
3499 d3d10_effect_vector_variable_GetDesc
,
3500 d3d10_effect_vector_variable_GetAnnotationByIndex
,
3501 d3d10_effect_vector_variable_GetAnnotationByName
,
3502 d3d10_effect_vector_variable_GetMemberByIndex
,
3503 d3d10_effect_vector_variable_GetMemberByName
,
3504 d3d10_effect_vector_variable_GetMemberBySemantic
,
3505 d3d10_effect_vector_variable_GetElement
,
3506 d3d10_effect_vector_variable_GetParentConstantBuffer
,
3507 d3d10_effect_vector_variable_AsScalar
,
3508 d3d10_effect_vector_variable_AsVector
,
3509 d3d10_effect_vector_variable_AsMatrix
,
3510 d3d10_effect_vector_variable_AsString
,
3511 d3d10_effect_vector_variable_AsShaderResource
,
3512 d3d10_effect_vector_variable_AsRenderTargetView
,
3513 d3d10_effect_vector_variable_AsDepthStencilView
,
3514 d3d10_effect_vector_variable_AsConstantBuffer
,
3515 d3d10_effect_vector_variable_AsShader
,
3516 d3d10_effect_vector_variable_AsBlend
,
3517 d3d10_effect_vector_variable_AsDepthStencil
,
3518 d3d10_effect_vector_variable_AsRasterizer
,
3519 d3d10_effect_vector_variable_AsSampler
,
3520 d3d10_effect_vector_variable_SetRawValue
,
3521 d3d10_effect_vector_variable_GetRawValue
,
3522 /* ID3D10EffectVectorVariable methods */
3523 d3d10_effect_vector_variable_SetBoolVector
,
3524 d3d10_effect_vector_variable_SetIntVector
,
3525 d3d10_effect_vector_variable_SetFloatVector
,
3526 d3d10_effect_vector_variable_GetBoolVector
,
3527 d3d10_effect_vector_variable_GetIntVector
,
3528 d3d10_effect_vector_variable_GetFloatVector
,
3529 d3d10_effect_vector_variable_SetBoolVectorArray
,
3530 d3d10_effect_vector_variable_SetIntVectorArray
,
3531 d3d10_effect_vector_variable_SetFloatVectorArray
,
3532 d3d10_effect_vector_variable_GetBoolVectorArray
,
3533 d3d10_effect_vector_variable_GetIntVectorArray
,
3534 d3d10_effect_vector_variable_GetFloatVectorArray
,
3537 /* ID3D10EffectVariable methods */
3539 static BOOL STDMETHODCALLTYPE
d3d10_effect_matrix_variable_IsValid(ID3D10EffectMatrixVariable
*iface
)
3541 TRACE("iface %p\n", iface
);
3543 return (struct d3d10_effect_variable
*)iface
!= &null_matrix_variable
;
3546 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetType(
3547 ID3D10EffectMatrixVariable
*iface
)
3549 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
3552 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetDesc(ID3D10EffectMatrixVariable
*iface
,
3553 D3D10_EFFECT_VARIABLE_DESC
*desc
)
3555 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
3558 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetAnnotationByIndex(
3559 ID3D10EffectMatrixVariable
*iface
, UINT index
)
3561 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
3564 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetAnnotationByName(
3565 ID3D10EffectMatrixVariable
*iface
, LPCSTR name
)
3567 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
3570 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMemberByIndex(
3571 ID3D10EffectMatrixVariable
*iface
, UINT index
)
3573 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
3576 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMemberByName(
3577 ID3D10EffectMatrixVariable
*iface
, LPCSTR name
)
3579 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
3582 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMemberBySemantic(
3583 ID3D10EffectMatrixVariable
*iface
, LPCSTR semantic
)
3585 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
3588 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetElement(
3589 ID3D10EffectMatrixVariable
*iface
, UINT index
)
3591 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
3594 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetParentConstantBuffer(
3595 ID3D10EffectMatrixVariable
*iface
)
3597 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
3600 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsScalar(
3601 ID3D10EffectMatrixVariable
*iface
)
3603 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
3606 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsVector(
3607 ID3D10EffectMatrixVariable
*iface
)
3609 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
3612 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsMatrix(
3613 ID3D10EffectMatrixVariable
*iface
)
3615 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
3618 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsString(
3619 ID3D10EffectMatrixVariable
*iface
)
3621 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
3624 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsShaderResource(
3625 ID3D10EffectMatrixVariable
*iface
)
3627 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
3630 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsRenderTargetView(
3631 ID3D10EffectMatrixVariable
*iface
)
3633 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
3636 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsDepthStencilView(
3637 ID3D10EffectMatrixVariable
*iface
)
3639 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
3642 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsConstantBuffer(
3643 ID3D10EffectMatrixVariable
*iface
)
3645 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
3648 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsShader(
3649 ID3D10EffectMatrixVariable
*iface
)
3651 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
3654 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsBlend(
3655 ID3D10EffectMatrixVariable
*iface
)
3657 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
3660 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsDepthStencil(
3661 ID3D10EffectMatrixVariable
*iface
)
3663 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
3666 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsRasterizer(
3667 ID3D10EffectMatrixVariable
*iface
)
3669 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
3672 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsSampler(
3673 ID3D10EffectMatrixVariable
*iface
)
3675 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
3678 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetRawValue(ID3D10EffectMatrixVariable
*iface
,
3679 void *data
, UINT offset
, UINT count
)
3681 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3684 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetRawValue(ID3D10EffectMatrixVariable
*iface
,
3685 void *data
, UINT offset
, UINT count
)
3687 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3690 /* ID3D10EffectMatrixVariable methods */
3692 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetMatrix(ID3D10EffectMatrixVariable
*iface
,
3695 FIXME("iface %p, data %p stub!\n", iface
, data
);
3700 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMatrix(ID3D10EffectMatrixVariable
*iface
,
3703 FIXME("iface %p, data %p stub!\n", iface
, data
);
3708 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetMatrixArray(ID3D10EffectMatrixVariable
*iface
,
3709 float *data
, UINT offset
, UINT count
)
3711 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
3716 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMatrixArray(ID3D10EffectMatrixVariable
*iface
,
3717 float *data
, UINT offset
, UINT count
)
3719 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
3724 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetMatrixTranspose(ID3D10EffectMatrixVariable
*iface
,
3727 FIXME("iface %p, data %p stub!\n", iface
, data
);
3732 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMatrixTranspose(ID3D10EffectMatrixVariable
*iface
,
3735 FIXME("iface %p, data %p stub!\n", iface
, data
);
3740 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetMatrixTransposeArray(ID3D10EffectMatrixVariable
*iface
,
3741 float *data
, UINT offset
, UINT count
)
3743 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
3748 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMatrixTransposeArray(ID3D10EffectMatrixVariable
*iface
,
3749 float *data
, UINT offset
, UINT count
)
3751 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
3757 static const struct ID3D10EffectMatrixVariableVtbl d3d10_effect_matrix_variable_vtbl
=
3759 /* ID3D10EffectVariable methods */
3760 d3d10_effect_matrix_variable_IsValid
,
3761 d3d10_effect_matrix_variable_GetType
,
3762 d3d10_effect_matrix_variable_GetDesc
,
3763 d3d10_effect_matrix_variable_GetAnnotationByIndex
,
3764 d3d10_effect_matrix_variable_GetAnnotationByName
,
3765 d3d10_effect_matrix_variable_GetMemberByIndex
,
3766 d3d10_effect_matrix_variable_GetMemberByName
,
3767 d3d10_effect_matrix_variable_GetMemberBySemantic
,
3768 d3d10_effect_matrix_variable_GetElement
,
3769 d3d10_effect_matrix_variable_GetParentConstantBuffer
,
3770 d3d10_effect_matrix_variable_AsScalar
,
3771 d3d10_effect_matrix_variable_AsVector
,
3772 d3d10_effect_matrix_variable_AsMatrix
,
3773 d3d10_effect_matrix_variable_AsString
,
3774 d3d10_effect_matrix_variable_AsShaderResource
,
3775 d3d10_effect_matrix_variable_AsRenderTargetView
,
3776 d3d10_effect_matrix_variable_AsDepthStencilView
,
3777 d3d10_effect_matrix_variable_AsConstantBuffer
,
3778 d3d10_effect_matrix_variable_AsShader
,
3779 d3d10_effect_matrix_variable_AsBlend
,
3780 d3d10_effect_matrix_variable_AsDepthStencil
,
3781 d3d10_effect_matrix_variable_AsRasterizer
,
3782 d3d10_effect_matrix_variable_AsSampler
,
3783 d3d10_effect_matrix_variable_SetRawValue
,
3784 d3d10_effect_matrix_variable_GetRawValue
,
3785 /* ID3D10EffectMatrixVariable methods */
3786 d3d10_effect_matrix_variable_SetMatrix
,
3787 d3d10_effect_matrix_variable_GetMatrix
,
3788 d3d10_effect_matrix_variable_SetMatrixArray
,
3789 d3d10_effect_matrix_variable_GetMatrixArray
,
3790 d3d10_effect_matrix_variable_SetMatrixTranspose
,
3791 d3d10_effect_matrix_variable_GetMatrixTranspose
,
3792 d3d10_effect_matrix_variable_SetMatrixTransposeArray
,
3793 d3d10_effect_matrix_variable_GetMatrixTransposeArray
,
3796 /* ID3D10EffectVariable methods */
3798 static BOOL STDMETHODCALLTYPE
d3d10_effect_string_variable_IsValid(ID3D10EffectStringVariable
*iface
)
3800 TRACE("iface %p\n", iface
);
3802 return (struct d3d10_effect_variable
*)iface
!= &null_string_variable
;
3805 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetType(
3806 ID3D10EffectStringVariable
*iface
)
3808 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
3811 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_GetDesc(ID3D10EffectStringVariable
*iface
,
3812 D3D10_EFFECT_VARIABLE_DESC
*desc
)
3814 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
3817 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetAnnotationByIndex(
3818 ID3D10EffectStringVariable
*iface
, UINT index
)
3820 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
3823 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetAnnotationByName(
3824 ID3D10EffectStringVariable
*iface
, LPCSTR name
)
3826 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
3829 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetMemberByIndex(
3830 ID3D10EffectStringVariable
*iface
, UINT index
)
3832 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
3835 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetMemberByName(
3836 ID3D10EffectStringVariable
*iface
, LPCSTR name
)
3838 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
3841 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetMemberBySemantic(
3842 ID3D10EffectStringVariable
*iface
, LPCSTR semantic
)
3844 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
3847 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetElement(
3848 ID3D10EffectStringVariable
*iface
, UINT index
)
3850 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
3853 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetParentConstantBuffer(
3854 ID3D10EffectStringVariable
*iface
)
3856 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
3859 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsScalar(
3860 ID3D10EffectStringVariable
*iface
)
3862 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
3865 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsVector(
3866 ID3D10EffectStringVariable
*iface
)
3868 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
3871 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsMatrix(
3872 ID3D10EffectStringVariable
*iface
)
3874 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
3877 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsString(
3878 ID3D10EffectStringVariable
*iface
)
3880 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
3883 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsShaderResource(
3884 ID3D10EffectStringVariable
*iface
)
3886 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
3889 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsRenderTargetView(
3890 ID3D10EffectStringVariable
*iface
)
3892 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
3895 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsDepthStencilView(
3896 ID3D10EffectStringVariable
*iface
)
3898 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
3901 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsConstantBuffer(
3902 ID3D10EffectStringVariable
*iface
)
3904 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
3907 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsShader(
3908 ID3D10EffectStringVariable
*iface
)
3910 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
3913 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsBlend(
3914 ID3D10EffectStringVariable
*iface
)
3916 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
3919 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsDepthStencil(
3920 ID3D10EffectStringVariable
*iface
)
3922 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
3925 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsRasterizer(
3926 ID3D10EffectStringVariable
*iface
)
3928 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
3931 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsSampler(
3932 ID3D10EffectStringVariable
*iface
)
3934 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
3937 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_SetRawValue(ID3D10EffectStringVariable
*iface
,
3938 void *data
, UINT offset
, UINT count
)
3940 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3943 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_GetRawValue(ID3D10EffectStringVariable
*iface
,
3944 void *data
, UINT offset
, UINT count
)
3946 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3949 /* ID3D10EffectStringVariable methods */
3951 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_GetString(ID3D10EffectStringVariable
*iface
,
3954 FIXME("iface %p, str %p stub!\n", iface
, str
);
3959 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_GetStringArray(ID3D10EffectStringVariable
*iface
,
3960 LPCSTR
*strs
, UINT offset
, UINT count
)
3962 FIXME("iface %p, strs %p, offset %u, count %u stub!\n", iface
, strs
, offset
, count
);
3968 static const struct ID3D10EffectStringVariableVtbl d3d10_effect_string_variable_vtbl
=
3970 /* ID3D10EffectVariable methods */
3971 d3d10_effect_string_variable_IsValid
,
3972 d3d10_effect_string_variable_GetType
,
3973 d3d10_effect_string_variable_GetDesc
,
3974 d3d10_effect_string_variable_GetAnnotationByIndex
,
3975 d3d10_effect_string_variable_GetAnnotationByName
,
3976 d3d10_effect_string_variable_GetMemberByIndex
,
3977 d3d10_effect_string_variable_GetMemberByName
,
3978 d3d10_effect_string_variable_GetMemberBySemantic
,
3979 d3d10_effect_string_variable_GetElement
,
3980 d3d10_effect_string_variable_GetParentConstantBuffer
,
3981 d3d10_effect_string_variable_AsScalar
,
3982 d3d10_effect_string_variable_AsVector
,
3983 d3d10_effect_string_variable_AsMatrix
,
3984 d3d10_effect_string_variable_AsString
,
3985 d3d10_effect_string_variable_AsShaderResource
,
3986 d3d10_effect_string_variable_AsRenderTargetView
,
3987 d3d10_effect_string_variable_AsDepthStencilView
,
3988 d3d10_effect_string_variable_AsConstantBuffer
,
3989 d3d10_effect_string_variable_AsShader
,
3990 d3d10_effect_string_variable_AsBlend
,
3991 d3d10_effect_string_variable_AsDepthStencil
,
3992 d3d10_effect_string_variable_AsRasterizer
,
3993 d3d10_effect_string_variable_AsSampler
,
3994 d3d10_effect_string_variable_SetRawValue
,
3995 d3d10_effect_string_variable_GetRawValue
,
3996 /* ID3D10EffectStringVariable methods */
3997 d3d10_effect_string_variable_GetString
,
3998 d3d10_effect_string_variable_GetStringArray
,
4001 /* ID3D10EffectVariable methods */
4003 static BOOL STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_IsValid(ID3D10EffectShaderResourceVariable
*iface
)
4005 TRACE("iface %p\n", iface
);
4007 return (struct d3d10_effect_variable
*)iface
!= &null_shader_resource_variable
;
4010 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetType(
4011 ID3D10EffectShaderResourceVariable
*iface
)
4013 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
4016 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetDesc(
4017 ID3D10EffectShaderResourceVariable
*iface
, D3D10_EFFECT_VARIABLE_DESC
*desc
)
4019 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
4022 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetAnnotationByIndex(
4023 ID3D10EffectShaderResourceVariable
*iface
, UINT index
)
4025 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
4028 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetAnnotationByName(
4029 ID3D10EffectShaderResourceVariable
*iface
, LPCSTR name
)
4031 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
4034 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetMemberByIndex(
4035 ID3D10EffectShaderResourceVariable
*iface
, UINT index
)
4037 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
4040 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetMemberByName(
4041 ID3D10EffectShaderResourceVariable
*iface
, LPCSTR name
)
4043 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
4046 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetMemberBySemantic(
4047 ID3D10EffectShaderResourceVariable
*iface
, LPCSTR semantic
)
4049 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
4052 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetElement(
4053 ID3D10EffectShaderResourceVariable
*iface
, UINT index
)
4055 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
4058 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetParentConstantBuffer(
4059 ID3D10EffectShaderResourceVariable
*iface
)
4061 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
4064 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsScalar(
4065 ID3D10EffectShaderResourceVariable
*iface
)
4067 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
4070 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsVector(
4071 ID3D10EffectShaderResourceVariable
*iface
)
4073 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
4076 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsMatrix(
4077 ID3D10EffectShaderResourceVariable
*iface
)
4079 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
4082 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsString(
4083 ID3D10EffectShaderResourceVariable
*iface
)
4085 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
4088 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsShaderResource(
4089 ID3D10EffectShaderResourceVariable
*iface
)
4091 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
4094 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsRenderTargetView(
4095 ID3D10EffectShaderResourceVariable
*iface
)
4097 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
4100 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsDepthStencilView(
4101 ID3D10EffectShaderResourceVariable
*iface
)
4103 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
4106 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsConstantBuffer(
4107 ID3D10EffectShaderResourceVariable
*iface
)
4109 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
4112 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsShader(
4113 ID3D10EffectShaderResourceVariable
*iface
)
4115 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
4118 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsBlend(
4119 ID3D10EffectShaderResourceVariable
*iface
)
4121 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
4124 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsDepthStencil(
4125 ID3D10EffectShaderResourceVariable
*iface
)
4127 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
4130 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsRasterizer(
4131 ID3D10EffectShaderResourceVariable
*iface
)
4133 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
4136 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsSampler(
4137 ID3D10EffectShaderResourceVariable
*iface
)
4139 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
4142 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_SetRawValue(
4143 ID3D10EffectShaderResourceVariable
*iface
, void *data
, UINT offset
, UINT count
)
4145 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4148 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetRawValue(
4149 ID3D10EffectShaderResourceVariable
*iface
, void *data
, UINT offset
, UINT count
)
4151 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4154 /* ID3D10EffectShaderResourceVariable methods */
4156 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_SetResource(
4157 ID3D10EffectShaderResourceVariable
*iface
, ID3D10ShaderResourceView
*resource
)
4159 FIXME("iface %p, resource %p stub!\n", iface
, resource
);
4164 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetResource(
4165 ID3D10EffectShaderResourceVariable
*iface
, ID3D10ShaderResourceView
**resource
)
4167 FIXME("iface %p, resource %p stub!\n", iface
, resource
);
4172 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_SetResourceArray(
4173 ID3D10EffectShaderResourceVariable
*iface
, ID3D10ShaderResourceView
**resources
, UINT offset
, UINT count
)
4175 FIXME("iface %p, resources %p, offset %u, count %u stub!\n", iface
, resources
, offset
, count
);
4180 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetResourceArray(
4181 ID3D10EffectShaderResourceVariable
*iface
, ID3D10ShaderResourceView
**resources
, UINT offset
, UINT count
)
4183 FIXME("iface %p, resources %p, offset %u, count %u stub!\n", iface
, resources
, offset
, count
);
4189 static const struct ID3D10EffectShaderResourceVariableVtbl d3d10_effect_shader_resource_variable_vtbl
=
4191 /* ID3D10EffectVariable methods */
4192 d3d10_effect_shader_resource_variable_IsValid
,
4193 d3d10_effect_shader_resource_variable_GetType
,
4194 d3d10_effect_shader_resource_variable_GetDesc
,
4195 d3d10_effect_shader_resource_variable_GetAnnotationByIndex
,
4196 d3d10_effect_shader_resource_variable_GetAnnotationByName
,
4197 d3d10_effect_shader_resource_variable_GetMemberByIndex
,
4198 d3d10_effect_shader_resource_variable_GetMemberByName
,
4199 d3d10_effect_shader_resource_variable_GetMemberBySemantic
,
4200 d3d10_effect_shader_resource_variable_GetElement
,
4201 d3d10_effect_shader_resource_variable_GetParentConstantBuffer
,
4202 d3d10_effect_shader_resource_variable_AsScalar
,
4203 d3d10_effect_shader_resource_variable_AsVector
,
4204 d3d10_effect_shader_resource_variable_AsMatrix
,
4205 d3d10_effect_shader_resource_variable_AsString
,
4206 d3d10_effect_shader_resource_variable_AsShaderResource
,
4207 d3d10_effect_shader_resource_variable_AsRenderTargetView
,
4208 d3d10_effect_shader_resource_variable_AsDepthStencilView
,
4209 d3d10_effect_shader_resource_variable_AsConstantBuffer
,
4210 d3d10_effect_shader_resource_variable_AsShader
,
4211 d3d10_effect_shader_resource_variable_AsBlend
,
4212 d3d10_effect_shader_resource_variable_AsDepthStencil
,
4213 d3d10_effect_shader_resource_variable_AsRasterizer
,
4214 d3d10_effect_shader_resource_variable_AsSampler
,
4215 d3d10_effect_shader_resource_variable_SetRawValue
,
4216 d3d10_effect_shader_resource_variable_GetRawValue
,
4217 /* ID3D10EffectShaderResourceVariable methods */
4218 d3d10_effect_shader_resource_variable_SetResource
,
4219 d3d10_effect_shader_resource_variable_GetResource
,
4220 d3d10_effect_shader_resource_variable_SetResourceArray
,
4221 d3d10_effect_shader_resource_variable_GetResourceArray
,
4224 /* ID3D10EffectVariable methods */
4226 static BOOL STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_IsValid(
4227 ID3D10EffectRenderTargetViewVariable
*iface
)
4229 TRACE("iface %p\n", iface
);
4231 return (struct d3d10_effect_variable
*)iface
!= &null_render_target_view_variable
;
4234 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetType(
4235 ID3D10EffectRenderTargetViewVariable
*iface
)
4237 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
4240 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetDesc(
4241 ID3D10EffectRenderTargetViewVariable
*iface
, D3D10_EFFECT_VARIABLE_DESC
*desc
)
4243 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
4246 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetAnnotationByIndex(
4247 ID3D10EffectRenderTargetViewVariable
*iface
, UINT index
)
4249 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
4252 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetAnnotationByName(
4253 ID3D10EffectRenderTargetViewVariable
*iface
, LPCSTR name
)
4255 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
4258 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetMemberByIndex(
4259 ID3D10EffectRenderTargetViewVariable
*iface
, UINT index
)
4261 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
4264 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetMemberByName(
4265 ID3D10EffectRenderTargetViewVariable
*iface
, LPCSTR name
)
4267 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
4270 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetMemberBySemantic(
4271 ID3D10EffectRenderTargetViewVariable
*iface
, LPCSTR semantic
)
4273 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
4276 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetElement(
4277 ID3D10EffectRenderTargetViewVariable
*iface
, UINT index
)
4279 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
4282 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetParentConstantBuffer(
4283 ID3D10EffectRenderTargetViewVariable
*iface
)
4285 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
4288 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsScalar(
4289 ID3D10EffectRenderTargetViewVariable
*iface
)
4291 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
4294 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsVector(
4295 ID3D10EffectRenderTargetViewVariable
*iface
)
4297 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
4300 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsMatrix(
4301 ID3D10EffectRenderTargetViewVariable
*iface
)
4303 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
4306 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsString(
4307 ID3D10EffectRenderTargetViewVariable
*iface
)
4309 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
4312 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsShaderResource(
4313 ID3D10EffectRenderTargetViewVariable
*iface
)
4315 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
4318 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsRenderTargetView(
4319 ID3D10EffectRenderTargetViewVariable
*iface
)
4321 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
4324 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsDepthStencilView(
4325 ID3D10EffectRenderTargetViewVariable
*iface
)
4327 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
4330 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsConstantBuffer(
4331 ID3D10EffectRenderTargetViewVariable
*iface
)
4333 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
4336 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsShader(
4337 ID3D10EffectRenderTargetViewVariable
*iface
)
4339 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
4342 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsBlend(
4343 ID3D10EffectRenderTargetViewVariable
*iface
)
4345 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
4348 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsDepthStencil(
4349 ID3D10EffectRenderTargetViewVariable
*iface
)
4351 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
4354 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsRasterizer(
4355 ID3D10EffectRenderTargetViewVariable
*iface
)
4357 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
4360 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsSampler(
4361 ID3D10EffectRenderTargetViewVariable
*iface
)
4363 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
4366 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_SetRawValue(
4367 ID3D10EffectRenderTargetViewVariable
*iface
, void *data
, UINT offset
, UINT count
)
4369 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4372 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetRawValue(
4373 ID3D10EffectRenderTargetViewVariable
*iface
, void *data
, UINT offset
, UINT count
)
4375 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4378 /* ID3D10EffectRenderTargetViewVariable methods */
4380 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_SetRenderTarget(
4381 ID3D10EffectRenderTargetViewVariable
*iface
, ID3D10RenderTargetView
*view
)
4383 FIXME("iface %p, view %p stub!\n", iface
, view
);
4388 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetRenderTarget(
4389 ID3D10EffectRenderTargetViewVariable
*iface
, ID3D10RenderTargetView
**view
)
4391 FIXME("iface %p, view %p stub!\n", iface
, view
);
4396 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_SetRenderTargetArray(
4397 ID3D10EffectRenderTargetViewVariable
*iface
, ID3D10RenderTargetView
**views
, UINT offset
, UINT count
)
4399 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface
, views
, offset
, count
);
4404 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetRenderTargetArray(
4405 ID3D10EffectRenderTargetViewVariable
*iface
, ID3D10RenderTargetView
**views
, UINT offset
, UINT count
)
4407 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface
, views
, offset
, count
);
4413 static const struct ID3D10EffectRenderTargetViewVariableVtbl d3d10_effect_render_target_view_variable_vtbl
=
4415 /* ID3D10EffectVariable methods */
4416 d3d10_effect_render_target_view_variable_IsValid
,
4417 d3d10_effect_render_target_view_variable_GetType
,
4418 d3d10_effect_render_target_view_variable_GetDesc
,
4419 d3d10_effect_render_target_view_variable_GetAnnotationByIndex
,
4420 d3d10_effect_render_target_view_variable_GetAnnotationByName
,
4421 d3d10_effect_render_target_view_variable_GetMemberByIndex
,
4422 d3d10_effect_render_target_view_variable_GetMemberByName
,
4423 d3d10_effect_render_target_view_variable_GetMemberBySemantic
,
4424 d3d10_effect_render_target_view_variable_GetElement
,
4425 d3d10_effect_render_target_view_variable_GetParentConstantBuffer
,
4426 d3d10_effect_render_target_view_variable_AsScalar
,
4427 d3d10_effect_render_target_view_variable_AsVector
,
4428 d3d10_effect_render_target_view_variable_AsMatrix
,
4429 d3d10_effect_render_target_view_variable_AsString
,
4430 d3d10_effect_render_target_view_variable_AsShaderResource
,
4431 d3d10_effect_render_target_view_variable_AsRenderTargetView
,
4432 d3d10_effect_render_target_view_variable_AsDepthStencilView
,
4433 d3d10_effect_render_target_view_variable_AsConstantBuffer
,
4434 d3d10_effect_render_target_view_variable_AsShader
,
4435 d3d10_effect_render_target_view_variable_AsBlend
,
4436 d3d10_effect_render_target_view_variable_AsDepthStencil
,
4437 d3d10_effect_render_target_view_variable_AsRasterizer
,
4438 d3d10_effect_render_target_view_variable_AsSampler
,
4439 d3d10_effect_render_target_view_variable_SetRawValue
,
4440 d3d10_effect_render_target_view_variable_GetRawValue
,
4441 /* ID3D10EffectRenderTargetViewVariable methods */
4442 d3d10_effect_render_target_view_variable_SetRenderTarget
,
4443 d3d10_effect_render_target_view_variable_GetRenderTarget
,
4444 d3d10_effect_render_target_view_variable_SetRenderTargetArray
,
4445 d3d10_effect_render_target_view_variable_GetRenderTargetArray
,
4448 /* ID3D10EffectVariable methods */
4450 static BOOL STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_IsValid(
4451 ID3D10EffectDepthStencilViewVariable
*iface
)
4453 TRACE("iface %p\n", iface
);
4455 return (struct d3d10_effect_variable
*)iface
!= &null_depth_stencil_view_variable
;
4458 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetType(
4459 ID3D10EffectDepthStencilViewVariable
*iface
)
4461 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
4464 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetDesc(
4465 ID3D10EffectDepthStencilViewVariable
*iface
, D3D10_EFFECT_VARIABLE_DESC
*desc
)
4467 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
4470 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetAnnotationByIndex(
4471 ID3D10EffectDepthStencilViewVariable
*iface
, UINT index
)
4473 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
4476 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetAnnotationByName(
4477 ID3D10EffectDepthStencilViewVariable
*iface
, LPCSTR name
)
4479 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
4482 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetMemberByIndex(
4483 ID3D10EffectDepthStencilViewVariable
*iface
, UINT index
)
4485 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
4488 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetMemberByName(
4489 ID3D10EffectDepthStencilViewVariable
*iface
, LPCSTR name
)
4491 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
4494 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetMemberBySemantic(
4495 ID3D10EffectDepthStencilViewVariable
*iface
, LPCSTR semantic
)
4497 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
4500 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetElement(
4501 ID3D10EffectDepthStencilViewVariable
*iface
, UINT index
)
4503 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
4506 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetParentConstantBuffer(
4507 ID3D10EffectDepthStencilViewVariable
*iface
)
4509 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
4512 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsScalar(
4513 ID3D10EffectDepthStencilViewVariable
*iface
)
4515 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
4518 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsVector(
4519 ID3D10EffectDepthStencilViewVariable
*iface
)
4521 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
4524 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsMatrix(
4525 ID3D10EffectDepthStencilViewVariable
*iface
)
4527 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
4530 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsString(
4531 ID3D10EffectDepthStencilViewVariable
*iface
)
4533 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
4536 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsShaderResource(
4537 ID3D10EffectDepthStencilViewVariable
*iface
)
4539 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
4542 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsRenderTargetView(
4543 ID3D10EffectDepthStencilViewVariable
*iface
)
4545 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
4548 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsDepthStencilView(
4549 ID3D10EffectDepthStencilViewVariable
*iface
)
4551 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
4554 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsConstantBuffer(
4555 ID3D10EffectDepthStencilViewVariable
*iface
)
4557 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
4560 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsShader(
4561 ID3D10EffectDepthStencilViewVariable
*iface
)
4563 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
4566 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsBlend(
4567 ID3D10EffectDepthStencilViewVariable
*iface
)
4569 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
4572 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsDepthStencil(
4573 ID3D10EffectDepthStencilViewVariable
*iface
)
4575 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
4578 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsRasterizer(
4579 ID3D10EffectDepthStencilViewVariable
*iface
)
4581 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
4584 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsSampler(
4585 ID3D10EffectDepthStencilViewVariable
*iface
)
4587 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
4590 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_SetRawValue(
4591 ID3D10EffectDepthStencilViewVariable
*iface
, void *data
, UINT offset
, UINT count
)
4593 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4596 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetRawValue(
4597 ID3D10EffectDepthStencilViewVariable
*iface
, void *data
, UINT offset
, UINT count
)
4599 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4602 /* ID3D10EffectDepthStencilViewVariable methods */
4604 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_SetDepthStencil(
4605 ID3D10EffectDepthStencilViewVariable
*iface
, ID3D10DepthStencilView
*view
)
4607 FIXME("iface %p, view %p stub!\n", iface
, view
);
4612 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetDepthStencil(
4613 ID3D10EffectDepthStencilViewVariable
*iface
, ID3D10DepthStencilView
**view
)
4615 FIXME("iface %p, view %p stub!\n", iface
, view
);
4620 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_SetDepthStencilArray(
4621 ID3D10EffectDepthStencilViewVariable
*iface
, ID3D10DepthStencilView
**views
, UINT offset
, UINT count
)
4623 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface
, views
, offset
, count
);
4628 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetDepthStencilArray(
4629 ID3D10EffectDepthStencilViewVariable
*iface
, ID3D10DepthStencilView
**views
, UINT offset
, UINT count
)
4631 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface
, views
, offset
, count
);
4637 static const struct ID3D10EffectDepthStencilViewVariableVtbl d3d10_effect_depth_stencil_view_variable_vtbl
=
4639 /* ID3D10EffectVariable methods */
4640 d3d10_effect_depth_stencil_view_variable_IsValid
,
4641 d3d10_effect_depth_stencil_view_variable_GetType
,
4642 d3d10_effect_depth_stencil_view_variable_GetDesc
,
4643 d3d10_effect_depth_stencil_view_variable_GetAnnotationByIndex
,
4644 d3d10_effect_depth_stencil_view_variable_GetAnnotationByName
,
4645 d3d10_effect_depth_stencil_view_variable_GetMemberByIndex
,
4646 d3d10_effect_depth_stencil_view_variable_GetMemberByName
,
4647 d3d10_effect_depth_stencil_view_variable_GetMemberBySemantic
,
4648 d3d10_effect_depth_stencil_view_variable_GetElement
,
4649 d3d10_effect_depth_stencil_view_variable_GetParentConstantBuffer
,
4650 d3d10_effect_depth_stencil_view_variable_AsScalar
,
4651 d3d10_effect_depth_stencil_view_variable_AsVector
,
4652 d3d10_effect_depth_stencil_view_variable_AsMatrix
,
4653 d3d10_effect_depth_stencil_view_variable_AsString
,
4654 d3d10_effect_depth_stencil_view_variable_AsShaderResource
,
4655 d3d10_effect_depth_stencil_view_variable_AsRenderTargetView
,
4656 d3d10_effect_depth_stencil_view_variable_AsDepthStencilView
,
4657 d3d10_effect_depth_stencil_view_variable_AsConstantBuffer
,
4658 d3d10_effect_depth_stencil_view_variable_AsShader
,
4659 d3d10_effect_depth_stencil_view_variable_AsBlend
,
4660 d3d10_effect_depth_stencil_view_variable_AsDepthStencil
,
4661 d3d10_effect_depth_stencil_view_variable_AsRasterizer
,
4662 d3d10_effect_depth_stencil_view_variable_AsSampler
,
4663 d3d10_effect_depth_stencil_view_variable_SetRawValue
,
4664 d3d10_effect_depth_stencil_view_variable_GetRawValue
,
4665 /* ID3D10EffectDepthStencilViewVariable methods */
4666 d3d10_effect_depth_stencil_view_variable_SetDepthStencil
,
4667 d3d10_effect_depth_stencil_view_variable_GetDepthStencil
,
4668 d3d10_effect_depth_stencil_view_variable_SetDepthStencilArray
,
4669 d3d10_effect_depth_stencil_view_variable_GetDepthStencilArray
,
4672 /* ID3D10EffectVariable methods */
4674 static BOOL STDMETHODCALLTYPE
d3d10_effect_shader_variable_IsValid(ID3D10EffectShaderVariable
*iface
)
4676 TRACE("iface %p\n", iface
);
4678 return (struct d3d10_effect_variable
*)iface
!= &null_shader_variable
;
4681 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetType(
4682 ID3D10EffectShaderVariable
*iface
)
4684 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
4687 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetDesc(ID3D10EffectShaderVariable
*iface
,
4688 D3D10_EFFECT_VARIABLE_DESC
*desc
)
4690 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
4693 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetAnnotationByIndex(
4694 ID3D10EffectShaderVariable
*iface
, UINT index
)
4696 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
4699 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetAnnotationByName(
4700 ID3D10EffectShaderVariable
*iface
, LPCSTR name
)
4702 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
4705 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetMemberByIndex(
4706 ID3D10EffectShaderVariable
*iface
, UINT index
)
4708 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
4711 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetMemberByName(
4712 ID3D10EffectShaderVariable
*iface
, LPCSTR name
)
4714 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
4717 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetMemberBySemantic(
4718 ID3D10EffectShaderVariable
*iface
, LPCSTR semantic
)
4720 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
4723 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetElement(
4724 ID3D10EffectShaderVariable
*iface
, UINT index
)
4726 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
4729 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetParentConstantBuffer(
4730 ID3D10EffectShaderVariable
*iface
)
4732 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
4735 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsScalar(
4736 ID3D10EffectShaderVariable
*iface
)
4738 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
4741 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsVector(
4742 ID3D10EffectShaderVariable
*iface
)
4744 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
4747 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsMatrix(
4748 ID3D10EffectShaderVariable
*iface
)
4750 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
4753 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsString(
4754 ID3D10EffectShaderVariable
*iface
)
4756 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
4759 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsShaderResource(
4760 ID3D10EffectShaderVariable
*iface
)
4762 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
4765 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsRenderTargetView(
4766 ID3D10EffectShaderVariable
*iface
)
4768 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
4771 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsDepthStencilView(
4772 ID3D10EffectShaderVariable
*iface
)
4774 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
4777 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsConstantBuffer(
4778 ID3D10EffectShaderVariable
*iface
)
4780 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
4783 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsShader(
4784 ID3D10EffectShaderVariable
*iface
)
4786 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
4789 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsBlend(
4790 ID3D10EffectShaderVariable
*iface
)
4792 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
4795 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsDepthStencil(
4796 ID3D10EffectShaderVariable
*iface
)
4798 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
4801 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsRasterizer(
4802 ID3D10EffectShaderVariable
*iface
)
4804 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
4807 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsSampler(
4808 ID3D10EffectShaderVariable
*iface
)
4810 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
4813 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_SetRawValue(
4814 ID3D10EffectShaderVariable
*iface
, void *data
, UINT offset
, UINT count
)
4816 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4819 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetRawValue(
4820 ID3D10EffectShaderVariable
*iface
, void *data
, UINT offset
, UINT count
)
4822 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4825 /* ID3D10EffectShaderVariable methods */
4827 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetShaderDesc(
4828 ID3D10EffectShaderVariable
*iface
, UINT index
, D3D10_EFFECT_SHADER_DESC
*desc
)
4830 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
4835 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetVertexShader(
4836 ID3D10EffectShaderVariable
*iface
, UINT index
, ID3D10VertexShader
**shader
)
4838 FIXME("iface %p, index %u, shader %p stub!\n", iface
, index
, shader
);
4843 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetGeometryShader(
4844 ID3D10EffectShaderVariable
*iface
, UINT index
, ID3D10GeometryShader
**shader
)
4846 FIXME("iface %p, index %u, shader %p stub!\n", iface
, index
, shader
);
4851 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetPixelShader(
4852 ID3D10EffectShaderVariable
*iface
, UINT index
, ID3D10PixelShader
**shader
)
4854 FIXME("iface %p, index %u, shader %p stub!\n", iface
, index
, shader
);
4859 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetInputSignatureElementDesc(
4860 ID3D10EffectShaderVariable
*iface
, UINT shader_index
, UINT element_index
,
4861 D3D10_SIGNATURE_PARAMETER_DESC
*desc
)
4863 FIXME("iface %p, shader_index %u, element_index %u, desc %p stub!\n",
4864 iface
, shader_index
, element_index
, desc
);
4869 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetOutputSignatureElementDesc(
4870 ID3D10EffectShaderVariable
*iface
, UINT shader_index
, UINT element_index
,
4871 D3D10_SIGNATURE_PARAMETER_DESC
*desc
)
4873 FIXME("iface %p, shader_index %u, element_index %u, desc %p stub!\n",
4874 iface
, shader_index
, element_index
, desc
);
4880 static const struct ID3D10EffectShaderVariableVtbl d3d10_effect_shader_variable_vtbl
=
4882 /* ID3D10EffectVariable methods */
4883 d3d10_effect_shader_variable_IsValid
,
4884 d3d10_effect_shader_variable_GetType
,
4885 d3d10_effect_shader_variable_GetDesc
,
4886 d3d10_effect_shader_variable_GetAnnotationByIndex
,
4887 d3d10_effect_shader_variable_GetAnnotationByName
,
4888 d3d10_effect_shader_variable_GetMemberByIndex
,
4889 d3d10_effect_shader_variable_GetMemberByName
,
4890 d3d10_effect_shader_variable_GetMemberBySemantic
,
4891 d3d10_effect_shader_variable_GetElement
,
4892 d3d10_effect_shader_variable_GetParentConstantBuffer
,
4893 d3d10_effect_shader_variable_AsScalar
,
4894 d3d10_effect_shader_variable_AsVector
,
4895 d3d10_effect_shader_variable_AsMatrix
,
4896 d3d10_effect_shader_variable_AsString
,
4897 d3d10_effect_shader_variable_AsShaderResource
,
4898 d3d10_effect_shader_variable_AsRenderTargetView
,
4899 d3d10_effect_shader_variable_AsDepthStencilView
,
4900 d3d10_effect_shader_variable_AsConstantBuffer
,
4901 d3d10_effect_shader_variable_AsShader
,
4902 d3d10_effect_shader_variable_AsBlend
,
4903 d3d10_effect_shader_variable_AsDepthStencil
,
4904 d3d10_effect_shader_variable_AsRasterizer
,
4905 d3d10_effect_shader_variable_AsSampler
,
4906 d3d10_effect_shader_variable_SetRawValue
,
4907 d3d10_effect_shader_variable_GetRawValue
,
4908 /* ID3D10EffectShaderVariable methods */
4909 d3d10_effect_shader_variable_GetShaderDesc
,
4910 d3d10_effect_shader_variable_GetVertexShader
,
4911 d3d10_effect_shader_variable_GetGeometryShader
,
4912 d3d10_effect_shader_variable_GetPixelShader
,
4913 d3d10_effect_shader_variable_GetInputSignatureElementDesc
,
4914 d3d10_effect_shader_variable_GetOutputSignatureElementDesc
,
4917 /* ID3D10EffectVariable methods */
4919 static BOOL STDMETHODCALLTYPE
d3d10_effect_blend_variable_IsValid(ID3D10EffectBlendVariable
*iface
)
4921 TRACE("iface %p\n", iface
);
4923 return (struct d3d10_effect_variable
*)iface
!= &null_blend_variable
;
4926 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetType(
4927 ID3D10EffectBlendVariable
*iface
)
4929 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
4932 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetDesc(ID3D10EffectBlendVariable
*iface
,
4933 D3D10_EFFECT_VARIABLE_DESC
*desc
)
4935 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
4938 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetAnnotationByIndex(
4939 ID3D10EffectBlendVariable
*iface
, UINT index
)
4941 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
4944 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetAnnotationByName(
4945 ID3D10EffectBlendVariable
*iface
, LPCSTR name
)
4947 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
4950 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetMemberByIndex(
4951 ID3D10EffectBlendVariable
*iface
, UINT index
)
4953 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
4956 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetMemberByName(
4957 ID3D10EffectBlendVariable
*iface
, LPCSTR name
)
4959 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
4962 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetMemberBySemantic(
4963 ID3D10EffectBlendVariable
*iface
, LPCSTR semantic
)
4965 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
4968 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetElement(
4969 ID3D10EffectBlendVariable
*iface
, UINT index
)
4971 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
4974 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetParentConstantBuffer(
4975 ID3D10EffectBlendVariable
*iface
)
4977 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
4980 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsScalar(
4981 ID3D10EffectBlendVariable
*iface
)
4983 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
4986 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsVector(
4987 ID3D10EffectBlendVariable
*iface
)
4989 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
4992 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsMatrix(
4993 ID3D10EffectBlendVariable
*iface
)
4995 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
4998 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsString(
4999 ID3D10EffectBlendVariable
*iface
)
5001 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
5004 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsShaderResource(
5005 ID3D10EffectBlendVariable
*iface
)
5007 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
5010 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsRenderTargetView(
5011 ID3D10EffectBlendVariable
*iface
)
5013 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
5016 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsDepthStencilView(
5017 ID3D10EffectBlendVariable
*iface
)
5019 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
5022 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsConstantBuffer(
5023 ID3D10EffectBlendVariable
*iface
)
5025 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
5028 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsShader(
5029 ID3D10EffectBlendVariable
*iface
)
5031 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
5034 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsBlend(
5035 ID3D10EffectBlendVariable
*iface
)
5037 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
5040 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsDepthStencil(
5041 ID3D10EffectBlendVariable
*iface
)
5043 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
5046 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsRasterizer(
5047 ID3D10EffectBlendVariable
*iface
)
5049 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
5052 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsSampler(
5053 ID3D10EffectBlendVariable
*iface
)
5055 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
5058 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_SetRawValue(ID3D10EffectBlendVariable
*iface
,
5059 void *data
, UINT offset
, UINT count
)
5061 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5064 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetRawValue(ID3D10EffectBlendVariable
*iface
,
5065 void *data
, UINT offset
, UINT count
)
5067 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5070 /* ID3D10EffectBlendVariable methods */
5072 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetBlendState(ID3D10EffectBlendVariable
*iface
,
5073 UINT index
, ID3D10BlendState
**blend_state
)
5075 FIXME("iface %p, index %u, blend_state %p stub!\n", iface
, index
, blend_state
);
5080 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetBackingStore(ID3D10EffectBlendVariable
*iface
,
5081 UINT index
, D3D10_BLEND_DESC
*desc
)
5083 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
5089 static const struct ID3D10EffectBlendVariableVtbl d3d10_effect_blend_variable_vtbl
=
5091 /* ID3D10EffectVariable methods */
5092 d3d10_effect_blend_variable_IsValid
,
5093 d3d10_effect_blend_variable_GetType
,
5094 d3d10_effect_blend_variable_GetDesc
,
5095 d3d10_effect_blend_variable_GetAnnotationByIndex
,
5096 d3d10_effect_blend_variable_GetAnnotationByName
,
5097 d3d10_effect_blend_variable_GetMemberByIndex
,
5098 d3d10_effect_blend_variable_GetMemberByName
,
5099 d3d10_effect_blend_variable_GetMemberBySemantic
,
5100 d3d10_effect_blend_variable_GetElement
,
5101 d3d10_effect_blend_variable_GetParentConstantBuffer
,
5102 d3d10_effect_blend_variable_AsScalar
,
5103 d3d10_effect_blend_variable_AsVector
,
5104 d3d10_effect_blend_variable_AsMatrix
,
5105 d3d10_effect_blend_variable_AsString
,
5106 d3d10_effect_blend_variable_AsShaderResource
,
5107 d3d10_effect_blend_variable_AsRenderTargetView
,
5108 d3d10_effect_blend_variable_AsDepthStencilView
,
5109 d3d10_effect_blend_variable_AsConstantBuffer
,
5110 d3d10_effect_blend_variable_AsShader
,
5111 d3d10_effect_blend_variable_AsBlend
,
5112 d3d10_effect_blend_variable_AsDepthStencil
,
5113 d3d10_effect_blend_variable_AsRasterizer
,
5114 d3d10_effect_blend_variable_AsSampler
,
5115 d3d10_effect_blend_variable_SetRawValue
,
5116 d3d10_effect_blend_variable_GetRawValue
,
5117 /* ID3D10EffectBlendVariable methods */
5118 d3d10_effect_blend_variable_GetBlendState
,
5119 d3d10_effect_blend_variable_GetBackingStore
,
5122 /* ID3D10EffectVariable methods */
5124 static BOOL STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_IsValid(ID3D10EffectDepthStencilVariable
*iface
)
5126 TRACE("iface %p\n", iface
);
5128 return (struct d3d10_effect_variable
*)iface
!= &null_depth_stencil_variable
;
5131 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetType(
5132 ID3D10EffectDepthStencilVariable
*iface
)
5134 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
5137 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetDesc(ID3D10EffectDepthStencilVariable
*iface
,
5138 D3D10_EFFECT_VARIABLE_DESC
*desc
)
5140 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
5143 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetAnnotationByIndex(
5144 ID3D10EffectDepthStencilVariable
*iface
, UINT index
)
5146 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
5149 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetAnnotationByName(
5150 ID3D10EffectDepthStencilVariable
*iface
, LPCSTR name
)
5152 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
5155 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetMemberByIndex(
5156 ID3D10EffectDepthStencilVariable
*iface
, UINT index
)
5158 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
5161 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetMemberByName(
5162 ID3D10EffectDepthStencilVariable
*iface
, LPCSTR name
)
5164 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
5167 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetMemberBySemantic(
5168 ID3D10EffectDepthStencilVariable
*iface
, LPCSTR semantic
)
5170 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
5173 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetElement(
5174 ID3D10EffectDepthStencilVariable
*iface
, UINT index
)
5176 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
5179 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetParentConstantBuffer(
5180 ID3D10EffectDepthStencilVariable
*iface
)
5182 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
5185 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsScalar(
5186 ID3D10EffectDepthStencilVariable
*iface
)
5188 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
5191 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsVector(
5192 ID3D10EffectDepthStencilVariable
*iface
)
5194 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
5197 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsMatrix(
5198 ID3D10EffectDepthStencilVariable
*iface
)
5200 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
5203 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsString(
5204 ID3D10EffectDepthStencilVariable
*iface
)
5206 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
5209 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsShaderResource(
5210 ID3D10EffectDepthStencilVariable
*iface
)
5212 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
5215 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsRenderTargetView(
5216 ID3D10EffectDepthStencilVariable
*iface
)
5218 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
5221 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsDepthStencilView(
5222 ID3D10EffectDepthStencilVariable
*iface
)
5224 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
5227 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsConstantBuffer(
5228 ID3D10EffectDepthStencilVariable
*iface
)
5230 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
5233 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsShader(
5234 ID3D10EffectDepthStencilVariable
*iface
)
5236 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
5239 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsBlend(
5240 ID3D10EffectDepthStencilVariable
*iface
)
5242 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
5245 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsDepthStencil(
5246 ID3D10EffectDepthStencilVariable
*iface
)
5248 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
5251 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsRasterizer(
5252 ID3D10EffectDepthStencilVariable
*iface
)
5254 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
5257 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsSampler(
5258 ID3D10EffectDepthStencilVariable
*iface
)
5260 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
5263 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_SetRawValue(ID3D10EffectDepthStencilVariable
*iface
,
5264 void *data
, UINT offset
, UINT count
)
5266 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5269 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetRawValue(ID3D10EffectDepthStencilVariable
*iface
,
5270 void *data
, UINT offset
, UINT count
)
5272 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5275 /* ID3D10EffectDepthStencilVariable methods */
5277 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetDepthStencilState(ID3D10EffectDepthStencilVariable
*iface
,
5278 UINT index
, ID3D10DepthStencilState
**depth_stencil_state
)
5280 FIXME("iface %p, index %u, depth_stencil_state %p stub!\n", iface
, index
, depth_stencil_state
);
5285 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetBackingStore(ID3D10EffectDepthStencilVariable
*iface
,
5286 UINT index
, D3D10_DEPTH_STENCIL_DESC
*desc
)
5288 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
5294 static const struct ID3D10EffectDepthStencilVariableVtbl d3d10_effect_depth_stencil_variable_vtbl
=
5296 /* ID3D10EffectVariable methods */
5297 d3d10_effect_depth_stencil_variable_IsValid
,
5298 d3d10_effect_depth_stencil_variable_GetType
,
5299 d3d10_effect_depth_stencil_variable_GetDesc
,
5300 d3d10_effect_depth_stencil_variable_GetAnnotationByIndex
,
5301 d3d10_effect_depth_stencil_variable_GetAnnotationByName
,
5302 d3d10_effect_depth_stencil_variable_GetMemberByIndex
,
5303 d3d10_effect_depth_stencil_variable_GetMemberByName
,
5304 d3d10_effect_depth_stencil_variable_GetMemberBySemantic
,
5305 d3d10_effect_depth_stencil_variable_GetElement
,
5306 d3d10_effect_depth_stencil_variable_GetParentConstantBuffer
,
5307 d3d10_effect_depth_stencil_variable_AsScalar
,
5308 d3d10_effect_depth_stencil_variable_AsVector
,
5309 d3d10_effect_depth_stencil_variable_AsMatrix
,
5310 d3d10_effect_depth_stencil_variable_AsString
,
5311 d3d10_effect_depth_stencil_variable_AsShaderResource
,
5312 d3d10_effect_depth_stencil_variable_AsRenderTargetView
,
5313 d3d10_effect_depth_stencil_variable_AsDepthStencilView
,
5314 d3d10_effect_depth_stencil_variable_AsConstantBuffer
,
5315 d3d10_effect_depth_stencil_variable_AsShader
,
5316 d3d10_effect_depth_stencil_variable_AsBlend
,
5317 d3d10_effect_depth_stencil_variable_AsDepthStencil
,
5318 d3d10_effect_depth_stencil_variable_AsRasterizer
,
5319 d3d10_effect_depth_stencil_variable_AsSampler
,
5320 d3d10_effect_depth_stencil_variable_SetRawValue
,
5321 d3d10_effect_depth_stencil_variable_GetRawValue
,
5322 /* ID3D10EffectDepthStencilVariable methods */
5323 d3d10_effect_depth_stencil_variable_GetDepthStencilState
,
5324 d3d10_effect_depth_stencil_variable_GetBackingStore
,
5327 /* ID3D10EffectVariable methods */
5329 static BOOL STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_IsValid(ID3D10EffectRasterizerVariable
*iface
)
5331 TRACE("iface %p\n", iface
);
5333 return (struct d3d10_effect_variable
*)iface
!= &null_rasterizer_variable
;
5336 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetType(
5337 ID3D10EffectRasterizerVariable
*iface
)
5339 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
5342 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetDesc(ID3D10EffectRasterizerVariable
*iface
,
5343 D3D10_EFFECT_VARIABLE_DESC
*desc
)
5345 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
5348 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetAnnotationByIndex(
5349 ID3D10EffectRasterizerVariable
*iface
, UINT index
)
5351 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
5354 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetAnnotationByName(
5355 ID3D10EffectRasterizerVariable
*iface
, LPCSTR name
)
5357 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
5360 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetMemberByIndex(
5361 ID3D10EffectRasterizerVariable
*iface
, UINT index
)
5363 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
5366 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetMemberByName(
5367 ID3D10EffectRasterizerVariable
*iface
, LPCSTR name
)
5369 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
5372 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetMemberBySemantic(
5373 ID3D10EffectRasterizerVariable
*iface
, LPCSTR semantic
)
5375 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
5378 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetElement(
5379 ID3D10EffectRasterizerVariable
*iface
, UINT index
)
5381 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
5384 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetParentConstantBuffer(
5385 ID3D10EffectRasterizerVariable
*iface
)
5387 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
5390 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsScalar(
5391 ID3D10EffectRasterizerVariable
*iface
)
5393 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
5396 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsVector(
5397 ID3D10EffectRasterizerVariable
*iface
)
5399 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
5402 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsMatrix(
5403 ID3D10EffectRasterizerVariable
*iface
)
5405 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
5408 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsString(
5409 ID3D10EffectRasterizerVariable
*iface
)
5411 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
5414 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsShaderResource(
5415 ID3D10EffectRasterizerVariable
*iface
)
5417 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
5420 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsRenderTargetView(
5421 ID3D10EffectRasterizerVariable
*iface
)
5423 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
5426 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsDepthStencilView(
5427 ID3D10EffectRasterizerVariable
*iface
)
5429 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
5432 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsConstantBuffer(
5433 ID3D10EffectRasterizerVariable
*iface
)
5435 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
5438 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsShader(
5439 ID3D10EffectRasterizerVariable
*iface
)
5441 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
5444 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsBlend(
5445 ID3D10EffectRasterizerVariable
*iface
)
5447 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
5450 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsDepthStencil(
5451 ID3D10EffectRasterizerVariable
*iface
)
5453 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
5456 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsRasterizer(
5457 ID3D10EffectRasterizerVariable
*iface
)
5459 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
5462 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsSampler(
5463 ID3D10EffectRasterizerVariable
*iface
)
5465 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
5468 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_SetRawValue(ID3D10EffectRasterizerVariable
*iface
,
5469 void *data
, UINT offset
, UINT count
)
5471 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5474 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetRawValue(ID3D10EffectRasterizerVariable
*iface
,
5475 void *data
, UINT offset
, UINT count
)
5477 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5480 /* ID3D10EffectRasterizerVariable methods */
5482 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetRasterizerState(ID3D10EffectRasterizerVariable
*iface
,
5483 UINT index
, ID3D10RasterizerState
**rasterizer_state
)
5485 FIXME("iface %p, index %u, rasterizer_state %p stub!\n", iface
, index
, rasterizer_state
);
5490 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetBackingStore(ID3D10EffectRasterizerVariable
*iface
,
5491 UINT index
, D3D10_RASTERIZER_DESC
*desc
)
5493 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
5499 static const struct ID3D10EffectRasterizerVariableVtbl d3d10_effect_rasterizer_variable_vtbl
=
5501 /* ID3D10EffectVariable methods */
5502 d3d10_effect_rasterizer_variable_IsValid
,
5503 d3d10_effect_rasterizer_variable_GetType
,
5504 d3d10_effect_rasterizer_variable_GetDesc
,
5505 d3d10_effect_rasterizer_variable_GetAnnotationByIndex
,
5506 d3d10_effect_rasterizer_variable_GetAnnotationByName
,
5507 d3d10_effect_rasterizer_variable_GetMemberByIndex
,
5508 d3d10_effect_rasterizer_variable_GetMemberByName
,
5509 d3d10_effect_rasterizer_variable_GetMemberBySemantic
,
5510 d3d10_effect_rasterizer_variable_GetElement
,
5511 d3d10_effect_rasterizer_variable_GetParentConstantBuffer
,
5512 d3d10_effect_rasterizer_variable_AsScalar
,
5513 d3d10_effect_rasterizer_variable_AsVector
,
5514 d3d10_effect_rasterizer_variable_AsMatrix
,
5515 d3d10_effect_rasterizer_variable_AsString
,
5516 d3d10_effect_rasterizer_variable_AsShaderResource
,
5517 d3d10_effect_rasterizer_variable_AsRenderTargetView
,
5518 d3d10_effect_rasterizer_variable_AsDepthStencilView
,
5519 d3d10_effect_rasterizer_variable_AsConstantBuffer
,
5520 d3d10_effect_rasterizer_variable_AsShader
,
5521 d3d10_effect_rasterizer_variable_AsBlend
,
5522 d3d10_effect_rasterizer_variable_AsDepthStencil
,
5523 d3d10_effect_rasterizer_variable_AsRasterizer
,
5524 d3d10_effect_rasterizer_variable_AsSampler
,
5525 d3d10_effect_rasterizer_variable_SetRawValue
,
5526 d3d10_effect_rasterizer_variable_GetRawValue
,
5527 /* ID3D10EffectRasterizerVariable methods */
5528 d3d10_effect_rasterizer_variable_GetRasterizerState
,
5529 d3d10_effect_rasterizer_variable_GetBackingStore
,
5532 /* ID3D10EffectVariable methods */
5534 static BOOL STDMETHODCALLTYPE
d3d10_effect_sampler_variable_IsValid(ID3D10EffectSamplerVariable
*iface
)
5536 TRACE("iface %p\n", iface
);
5538 return (struct d3d10_effect_variable
*)iface
!= &null_sampler_variable
;
5541 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetType(
5542 ID3D10EffectSamplerVariable
*iface
)
5544 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
5547 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetDesc(ID3D10EffectSamplerVariable
*iface
,
5548 D3D10_EFFECT_VARIABLE_DESC
*desc
)
5550 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
5553 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetAnnotationByIndex(
5554 ID3D10EffectSamplerVariable
*iface
, UINT index
)
5556 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
5559 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetAnnotationByName(
5560 ID3D10EffectSamplerVariable
*iface
, LPCSTR name
)
5562 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
5565 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetMemberByIndex(
5566 ID3D10EffectSamplerVariable
*iface
, UINT index
)
5568 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
5571 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetMemberByName(
5572 ID3D10EffectSamplerVariable
*iface
, LPCSTR name
)
5574 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
5577 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetMemberBySemantic(
5578 ID3D10EffectSamplerVariable
*iface
, LPCSTR semantic
)
5580 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
5583 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetElement(
5584 ID3D10EffectSamplerVariable
*iface
, UINT index
)
5586 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
5589 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetParentConstantBuffer(
5590 ID3D10EffectSamplerVariable
*iface
)
5592 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
5595 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsScalar(
5596 ID3D10EffectSamplerVariable
*iface
)
5598 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
5601 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsVector(
5602 ID3D10EffectSamplerVariable
*iface
)
5604 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
5607 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsMatrix(
5608 ID3D10EffectSamplerVariable
*iface
)
5610 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
5613 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsString(
5614 ID3D10EffectSamplerVariable
*iface
)
5616 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
5619 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsShaderResource(
5620 ID3D10EffectSamplerVariable
*iface
)
5622 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
5625 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsRenderTargetView(
5626 ID3D10EffectSamplerVariable
*iface
)
5628 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
5631 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsDepthStencilView(
5632 ID3D10EffectSamplerVariable
*iface
)
5634 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
5637 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsConstantBuffer(
5638 ID3D10EffectSamplerVariable
*iface
)
5640 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
5643 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsShader(
5644 ID3D10EffectSamplerVariable
*iface
)
5646 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
5649 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsBlend(
5650 ID3D10EffectSamplerVariable
*iface
)
5652 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
5655 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsDepthStencil(
5656 ID3D10EffectSamplerVariable
*iface
)
5658 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
5661 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsRasterizer(
5662 ID3D10EffectSamplerVariable
*iface
)
5664 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
5667 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsSampler(
5668 ID3D10EffectSamplerVariable
*iface
)
5670 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
5673 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_SetRawValue(ID3D10EffectSamplerVariable
*iface
,
5674 void *data
, UINT offset
, UINT count
)
5676 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5679 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetRawValue(ID3D10EffectSamplerVariable
*iface
,
5680 void *data
, UINT offset
, UINT count
)
5682 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5685 /* ID3D10EffectSamplerVariable methods */
5687 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetSampler(ID3D10EffectSamplerVariable
*iface
,
5688 UINT index
, ID3D10SamplerState
**sampler
)
5690 FIXME("iface %p, index %u, sampler %p stub!\n", iface
, index
, sampler
);
5695 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetBackingStore(ID3D10EffectSamplerVariable
*iface
,
5696 UINT index
, D3D10_SAMPLER_DESC
*desc
)
5698 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
5704 static const struct ID3D10EffectSamplerVariableVtbl d3d10_effect_sampler_variable_vtbl
=
5706 /* ID3D10EffectVariable methods */
5707 d3d10_effect_sampler_variable_IsValid
,
5708 d3d10_effect_sampler_variable_GetType
,
5709 d3d10_effect_sampler_variable_GetDesc
,
5710 d3d10_effect_sampler_variable_GetAnnotationByIndex
,
5711 d3d10_effect_sampler_variable_GetAnnotationByName
,
5712 d3d10_effect_sampler_variable_GetMemberByIndex
,
5713 d3d10_effect_sampler_variable_GetMemberByName
,
5714 d3d10_effect_sampler_variable_GetMemberBySemantic
,
5715 d3d10_effect_sampler_variable_GetElement
,
5716 d3d10_effect_sampler_variable_GetParentConstantBuffer
,
5717 d3d10_effect_sampler_variable_AsScalar
,
5718 d3d10_effect_sampler_variable_AsVector
,
5719 d3d10_effect_sampler_variable_AsMatrix
,
5720 d3d10_effect_sampler_variable_AsString
,
5721 d3d10_effect_sampler_variable_AsShaderResource
,
5722 d3d10_effect_sampler_variable_AsRenderTargetView
,
5723 d3d10_effect_sampler_variable_AsDepthStencilView
,
5724 d3d10_effect_sampler_variable_AsConstantBuffer
,
5725 d3d10_effect_sampler_variable_AsShader
,
5726 d3d10_effect_sampler_variable_AsBlend
,
5727 d3d10_effect_sampler_variable_AsDepthStencil
,
5728 d3d10_effect_sampler_variable_AsRasterizer
,
5729 d3d10_effect_sampler_variable_AsSampler
,
5730 d3d10_effect_sampler_variable_SetRawValue
,
5731 d3d10_effect_sampler_variable_GetRawValue
,
5732 /* ID3D10EffectSamplerVariable methods */
5733 d3d10_effect_sampler_variable_GetSampler
,
5734 d3d10_effect_sampler_variable_GetBackingStore
,
5737 /* ID3D10EffectType methods */
5739 static BOOL STDMETHODCALLTYPE
d3d10_effect_type_IsValid(ID3D10EffectType
*iface
)
5741 FIXME("iface %p stub!\n", iface
);
5746 static HRESULT STDMETHODCALLTYPE
d3d10_effect_type_GetDesc(ID3D10EffectType
*iface
, D3D10_EFFECT_TYPE_DESC
*desc
)
5748 struct d3d10_effect_type
*This
= (struct d3d10_effect_type
*)iface
;
5750 TRACE("iface %p, desc %p\n", iface
, desc
);
5752 if (This
== &null_type
)
5754 WARN("Null type specified\n");
5760 WARN("Invalid argument specified\n");
5761 return E_INVALIDARG
;
5764 desc
->TypeName
= This
->name
;
5765 desc
->Class
= This
->type_class
;
5766 desc
->Type
= This
->basetype
;
5767 desc
->Elements
= This
->element_count
;
5768 desc
->Members
= This
->member_count
;
5769 desc
->Rows
= This
->row_count
;
5770 desc
->Columns
= This
->column_count
;
5771 desc
->PackedSize
= This
->size_packed
;
5772 desc
->UnpackedSize
= This
->size_unpacked
;
5773 desc
->Stride
= This
->stride
;
5778 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_type_GetMemberTypeByIndex(ID3D10EffectType
*iface
,
5781 struct d3d10_effect_type
*This
= (struct d3d10_effect_type
*)iface
;
5782 struct d3d10_effect_type
*t
;
5784 TRACE("iface %p, index %u\n", iface
, index
);
5786 if (index
>= This
->member_count
)
5788 WARN("Invalid index specified\n");
5789 return (ID3D10EffectType
*)&null_type
;
5792 t
= (&This
->members
[index
])->type
;
5794 TRACE("Returning member %p, %s\n", t
, debugstr_a(t
->name
));
5796 return (ID3D10EffectType
*)t
;
5799 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_type_GetMemberTypeByName(ID3D10EffectType
*iface
,
5802 struct d3d10_effect_type
*This
= (struct d3d10_effect_type
*)iface
;
5805 TRACE("iface %p, name %s\n", iface
, debugstr_a(name
));
5809 WARN("Invalid name specified\n");
5810 return (ID3D10EffectType
*)&null_type
;
5813 for (i
= 0; i
< This
->member_count
; ++i
)
5815 struct d3d10_effect_type_member
*typem
= &This
->members
[i
];
5819 if (!strcmp(typem
->name
, name
))
5821 TRACE("Returning type %p.\n", typem
->type
);
5822 return (ID3D10EffectType
*)typem
->type
;
5827 WARN("Invalid name specified\n");
5829 return (ID3D10EffectType
*)&null_type
;
5832 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_type_GetMemberTypeBySemantic(ID3D10EffectType
*iface
,
5835 struct d3d10_effect_type
*This
= (struct d3d10_effect_type
*)iface
;
5838 TRACE("iface %p, semantic %s\n", iface
, debugstr_a(semantic
));
5842 WARN("Invalid semantic specified\n");
5843 return (ID3D10EffectType
*)&null_type
;
5846 for (i
= 0; i
< This
->member_count
; ++i
)
5848 struct d3d10_effect_type_member
*typem
= &This
->members
[i
];
5850 if (typem
->semantic
)
5852 if (!strcmp(typem
->semantic
, semantic
))
5854 TRACE("Returning type %p.\n", typem
->type
);
5855 return (ID3D10EffectType
*)typem
->type
;
5860 WARN("Invalid semantic specified\n");
5862 return (ID3D10EffectType
*)&null_type
;
5865 static LPCSTR STDMETHODCALLTYPE
d3d10_effect_type_GetMemberName(ID3D10EffectType
*iface
, UINT index
)
5867 struct d3d10_effect_type
*This
= (struct d3d10_effect_type
*)iface
;
5868 struct d3d10_effect_type_member
*typem
;
5870 TRACE("iface %p, index %u\n", iface
, index
);
5872 if (index
>= This
->member_count
)
5874 WARN("Invalid index specified\n");
5878 typem
= &This
->members
[index
];
5880 TRACE("Returning name %s\n", debugstr_a(typem
->name
));
5885 static LPCSTR STDMETHODCALLTYPE
d3d10_effect_type_GetMemberSemantic(ID3D10EffectType
*iface
, UINT index
)
5887 struct d3d10_effect_type
*This
= (struct d3d10_effect_type
*)iface
;
5888 struct d3d10_effect_type_member
*typem
;
5890 TRACE("iface %p, index %u\n", iface
, index
);
5892 if (index
>= This
->member_count
)
5894 WARN("Invalid index specified\n");
5898 typem
= &This
->members
[index
];
5900 TRACE("Returning semantic %s\n", debugstr_a(typem
->semantic
));
5902 return typem
->semantic
;
5905 static const struct ID3D10EffectTypeVtbl d3d10_effect_type_vtbl
=
5907 /* ID3D10EffectType */
5908 d3d10_effect_type_IsValid
,
5909 d3d10_effect_type_GetDesc
,
5910 d3d10_effect_type_GetMemberTypeByIndex
,
5911 d3d10_effect_type_GetMemberTypeByName
,
5912 d3d10_effect_type_GetMemberTypeBySemantic
,
5913 d3d10_effect_type_GetMemberName
,
5914 d3d10_effect_type_GetMemberSemantic
,