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
;
929 a
->buffer
= &null_local_buffer
;
931 hr
= parse_fx10_annotation(a
, ptr
, data
);
932 if (FAILED(hr
)) return hr
;
935 p
->objects
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, p
->object_count
* sizeof(*p
->objects
));
938 ERR("Failed to allocate effect objects memory.\n");
939 return E_OUTOFMEMORY
;
942 for (i
= 0; i
< p
->object_count
; ++i
)
944 struct d3d10_effect_object
*o
= &p
->objects
[i
];
948 hr
= parse_fx10_object(o
, ptr
, data
);
949 if (FAILED(hr
)) return hr
;
955 static HRESULT
parse_fx10_technique(struct d3d10_effect_technique
*t
, const char **ptr
, const char *data
)
961 read_dword(ptr
, &offset
);
962 TRACE("Technique name at offset %#x.\n", offset
);
964 if (!copy_name(data
+ offset
, &t
->name
))
966 ERR("Failed to copy name.\n");
967 return E_OUTOFMEMORY
;
969 TRACE("Technique name: %s.\n", debugstr_a(t
->name
));
971 read_dword(ptr
, &t
->pass_count
);
972 TRACE("Technique has %u passes\n", t
->pass_count
);
974 read_dword(ptr
, &t
->annotation_count
);
975 TRACE("Technique has %u annotations.\n", t
->annotation_count
);
977 t
->annotations
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, t
->annotation_count
* sizeof(*t
->annotations
));
980 ERR("Failed to allocate technique annotations memory.\n");
981 return E_OUTOFMEMORY
;
984 for (i
= 0; i
< t
->annotation_count
; ++i
)
986 struct d3d10_effect_variable
*a
= &t
->annotations
[i
];
988 a
->effect
= t
->effect
;
989 a
->buffer
= &null_local_buffer
;
991 hr
= parse_fx10_annotation(a
, ptr
, data
);
992 if (FAILED(hr
)) return hr
;
995 t
->passes
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, t
->pass_count
* sizeof(*t
->passes
));
998 ERR("Failed to allocate passes memory\n");
999 return E_OUTOFMEMORY
;
1002 for (i
= 0; i
< t
->pass_count
; ++i
)
1004 struct d3d10_effect_pass
*p
= &t
->passes
[i
];
1006 p
->vtbl
= &d3d10_effect_pass_vtbl
;
1009 hr
= parse_fx10_pass(p
, ptr
, data
);
1010 if (FAILED(hr
)) return hr
;
1016 static HRESULT
parse_fx10_variable(struct d3d10_effect_variable
*v
, const char **ptr
, const char *data
)
1022 hr
= parse_fx10_variable_head(v
, ptr
, data
);
1023 if (FAILED(hr
)) return hr
;
1025 read_dword(ptr
, &offset
);
1026 TRACE("Variable semantic at offset %#x.\n", offset
);
1028 if (!copy_name(data
+ offset
, &v
->semantic
))
1030 ERR("Failed to copy semantic.\n");
1031 return E_OUTOFMEMORY
;
1033 TRACE("Variable semantic: %s.\n", debugstr_a(v
->semantic
));
1035 read_dword(ptr
, &v
->buffer_offset
);
1036 TRACE("Variable offset in buffer: %#x.\n", v
->buffer_offset
);
1038 skip_dword_unknown(ptr
, 1);
1040 read_dword(ptr
, &v
->flag
);
1041 TRACE("Variable flag: %#x.\n", v
->flag
);
1043 read_dword(ptr
, &v
->annotation_count
);
1044 TRACE("Variable has %u annotations.\n", v
->annotation_count
);
1046 v
->annotations
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, v
->annotation_count
* sizeof(*v
->annotations
));
1047 if (!v
->annotations
)
1049 ERR("Failed to allocate variable annotations memory.\n");
1050 return E_OUTOFMEMORY
;
1053 for (i
= 0; i
< v
->annotation_count
; ++i
)
1055 struct d3d10_effect_variable
*a
= &v
->annotations
[i
];
1057 a
->effect
= v
->effect
;
1058 a
->buffer
= &null_local_buffer
;
1060 hr
= parse_fx10_annotation(a
, ptr
, data
);
1061 if (FAILED(hr
)) return hr
;
1067 static HRESULT
parse_fx10_local_variable(struct d3d10_effect_variable
*v
, const char **ptr
, const char *data
)
1072 hr
= parse_fx10_variable_head(v
, ptr
, data
);
1073 if (FAILED(hr
)) return hr
;
1075 skip_dword_unknown(ptr
, 2);
1077 switch (v
->type
->basetype
)
1079 case D3D10_SVT_TEXTURE1D
:
1080 case D3D10_SVT_TEXTURE1DARRAY
:
1081 case D3D10_SVT_TEXTURE2D
:
1082 case D3D10_SVT_TEXTURE2DARRAY
:
1083 case D3D10_SVT_TEXTURE2DMS
:
1084 case D3D10_SVT_TEXTURE2DMSARRAY
:
1085 case D3D10_SVT_TEXTURE3D
:
1086 case D3D10_SVT_TEXTURECUBE
:
1087 case D3D10_SVT_RENDERTARGETVIEW
:
1088 case D3D10_SVT_DEPTHSTENCILVIEW
:
1089 TRACE("SVT could not have elements.\n");
1092 case D3D10_SVT_VERTEXSHADER
:
1093 case D3D10_SVT_PIXELSHADER
:
1094 case D3D10_SVT_GEOMETRYSHADER
:
1095 TRACE("SVT is a shader.\n");
1096 for (i
= 0; i
< max(v
->type
->element_count
, 1); ++i
)
1098 DWORD shader_offset
;
1101 * TODO: Parse the shader
1103 read_dword(ptr
, &shader_offset
);
1104 FIXME("Shader offset: %#x.\n", shader_offset
);
1108 case D3D10_SVT_DEPTHSTENCIL
:
1109 case D3D10_SVT_BLEND
:
1110 case D3D10_SVT_RASTERIZER
:
1111 case D3D10_SVT_SAMPLER
:
1112 TRACE("SVT is a state.\n");
1113 for (i
= 0; i
< max(v
->type
->element_count
, 1); ++i
)
1118 read_dword(ptr
, &object_count
);
1119 TRACE("Object count: %#x.\n", object_count
);
1121 for (j
= 0; j
< object_count
; ++j
)
1123 skip_dword_unknown(ptr
, 4);
1129 FIXME("Unhandled case %s.\n", debug_d3d10_shader_variable_type(v
->type
->basetype
));
1133 read_dword(ptr
, &v
->annotation_count
);
1134 TRACE("Variable has %u annotations.\n", v
->annotation_count
);
1136 v
->annotations
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, v
->annotation_count
* sizeof(*v
->annotations
));
1137 if (!v
->annotations
)
1139 ERR("Failed to allocate variable annotations memory.\n");
1140 return E_OUTOFMEMORY
;
1143 for (i
= 0; i
< v
->annotation_count
; ++i
)
1145 struct d3d10_effect_variable
*a
= &v
->annotations
[i
];
1147 a
->effect
= v
->effect
;
1148 a
->buffer
= &null_local_buffer
;
1150 hr
= parse_fx10_annotation(a
, ptr
, data
);
1151 if (FAILED(hr
)) return hr
;
1157 static HRESULT
parse_fx10_local_buffer(struct d3d10_effect_variable
*l
, const char **ptr
, const char *data
)
1161 D3D10_CBUFFER_TYPE d3d10_cbuffer_type
;
1163 unsigned int stride
= 0;
1165 /* Generate our own type, it isn't in the fx blob. */
1166 l
->type
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(*l
->type
));
1169 ERR("Failed to allocate local buffer type memory.\n");
1170 return E_OUTOFMEMORY
;
1172 l
->type
->vtbl
= &d3d10_effect_type_vtbl
;
1173 l
->type
->type_class
= D3D10_SVC_OBJECT
;
1174 l
->type
->effect
= l
->effect
;
1176 read_dword(ptr
, &offset
);
1177 TRACE("Local buffer name at offset %#x.\n", offset
);
1179 if (!copy_name(data
+ offset
, &l
->name
))
1181 ERR("Failed to copy name.\n");
1182 return E_OUTOFMEMORY
;
1184 TRACE("Local buffer name: %s.\n", debugstr_a(l
->name
));
1186 read_dword(ptr
, &l
->data_size
);
1187 TRACE("Local buffer data size: %#x.\n", l
->data_size
);
1189 read_dword(ptr
, &d3d10_cbuffer_type
);
1190 TRACE("Local buffer type: %#x.\n", d3d10_cbuffer_type
);
1192 switch(d3d10_cbuffer_type
)
1194 case D3D10_CT_CBUFFER
:
1195 l
->type
->basetype
= D3D10_SVT_CBUFFER
;
1196 if (!copy_name("cbuffer", &l
->type
->name
))
1198 ERR("Failed to copy name.\n");
1199 return E_OUTOFMEMORY
;
1203 case D3D10_CT_TBUFFER
:
1204 l
->type
->basetype
= D3D10_SVT_TBUFFER
;
1205 if (!copy_name("tbuffer", &l
->type
->name
))
1207 ERR("Failed to copy name.\n");
1208 return E_OUTOFMEMORY
;
1213 ERR("Unexpected D3D10_CBUFFER_TYPE %#x!\n", d3d10_cbuffer_type
);
1217 read_dword(ptr
, &l
->type
->member_count
);
1218 TRACE("Local buffer member count: %#x.\n", l
->type
->member_count
);
1220 skip_dword_unknown(ptr
, 1);
1222 read_dword(ptr
, &l
->annotation_count
);
1223 TRACE("Local buffer has %u annotations.\n", l
->annotation_count
);
1225 l
->annotations
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, l
->annotation_count
* sizeof(*l
->annotations
));
1226 if (!l
->annotations
)
1228 ERR("Failed to allocate local buffer annotations memory.\n");
1229 return E_OUTOFMEMORY
;
1232 for (i
= 0; i
< l
->annotation_count
; ++i
)
1234 struct d3d10_effect_variable
*a
= &l
->annotations
[i
];
1236 a
->effect
= l
->effect
;
1237 a
->buffer
= &null_local_buffer
;
1239 hr
= parse_fx10_annotation(a
, ptr
, data
);
1240 if (FAILED(hr
)) return hr
;
1243 l
->members
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, l
->type
->member_count
* sizeof(*l
->members
));
1246 ERR("Failed to allocate members memory.\n");
1247 return E_OUTOFMEMORY
;
1250 l
->type
->members
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, l
->type
->member_count
* sizeof(*l
->type
->members
));
1251 if (!l
->type
->members
)
1253 ERR("Failed to allocate type members memory.\n");
1254 return E_OUTOFMEMORY
;
1257 for (i
= 0; i
< l
->type
->member_count
; ++i
)
1259 struct d3d10_effect_variable
*v
= &l
->members
[i
];
1260 struct d3d10_effect_type_member
*typem
= &l
->type
->members
[i
];
1263 v
->effect
= l
->effect
;
1265 hr
= parse_fx10_variable(v
, ptr
, data
);
1266 if (FAILED(hr
)) return hr
;
1269 * Copy the values from the variable type to the constant buffers type
1270 * members structure, because it is our own generated type.
1272 typem
->type
= v
->type
;
1274 if (!copy_name(v
->name
, &typem
->name
))
1276 ERR("Failed to copy name.\n");
1277 return E_OUTOFMEMORY
;
1279 TRACE("Variable name: %s.\n", debugstr_a(typem
->name
));
1281 if (!copy_name(v
->semantic
, &typem
->semantic
))
1283 ERR("Failed to copy name.\n");
1284 return E_OUTOFMEMORY
;
1286 TRACE("Variable semantic: %s.\n", debugstr_a(typem
->semantic
));
1288 typem
->buffer_offset
= v
->buffer_offset
;
1289 TRACE("Variable buffer offset: %u.\n", typem
->buffer_offset
);
1291 l
->type
->size_packed
+= v
->type
->size_packed
;
1294 * For the complete constantbuffer the size_unpacked = stride,
1295 * the stride is calculated like this:
1297 * 1) if the constant buffer variables are packed with packoffset
1298 * - stride = the highest used constant
1299 * - the complete stride has to be a multiple of 0x10
1301 * 2) if the constant buffer variables are NOT packed with packoffset
1302 * - sum of unpacked size for all variables which fit in a 0x10 part
1303 * - if the size exceeds a 0x10 part, the rest of the old part is skipped
1304 * and a new part is started
1305 * - if the variable is a struct it is always used a new part
1306 * - the complete stride has to be a multiple of 0x10
1309 * 0x4, 0x4, 0x4, 0x8, 0x4, 0x14, 0x4
1310 * part 0x10 0x10 0x20 -> 0x40
1312 if (v
->flag
& D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT
)
1314 if ((v
->type
->size_unpacked
+ v
->buffer_offset
) > stride
)
1316 stride
= v
->type
->size_unpacked
+ v
->buffer_offset
;
1321 if (v
->type
->type_class
== D3D10_SVC_STRUCT
)
1323 stride
= (stride
+ 0xf) & ~0xf;
1326 if ( ((stride
& 0xf) + v
->type
->size_unpacked
) > 0x10)
1328 stride
= (stride
+ 0xf) & ~0xf;
1331 stride
+= v
->type
->size_unpacked
;
1334 l
->type
->stride
= l
->type
->size_unpacked
= (stride
+ 0xf) & ~0xf;
1336 TRACE("Constant buffer:\n");
1337 TRACE("\tType name: %s.\n", debugstr_a(l
->type
->name
));
1338 TRACE("\tElement count: %u.\n", l
->type
->element_count
);
1339 TRACE("\tMember count: %u.\n", l
->type
->member_count
);
1340 TRACE("\tUnpacked size: %#x.\n", l
->type
->size_unpacked
);
1341 TRACE("\tStride: %#x.\n", l
->type
->stride
);
1342 TRACE("\tPacked size %#x.\n", l
->type
->size_packed
);
1343 TRACE("\tBasetype: %s.\n", debug_d3d10_shader_variable_type(l
->type
->basetype
));
1344 TRACE("\tTypeclass: %s.\n", debug_d3d10_shader_variable_class(l
->type
->type_class
));
1349 static int d3d10_effect_type_compare(const void *key
, const struct wine_rb_entry
*entry
)
1351 const struct d3d10_effect_type
*t
= WINE_RB_ENTRY_VALUE(entry
, const struct d3d10_effect_type
, entry
);
1352 const DWORD
*id
= key
;
1357 static void d3d10_effect_type_member_destroy(struct d3d10_effect_type_member
*typem
)
1359 TRACE("effect type member %p.\n", typem
);
1361 /* Do not release typem->type, it will be covered by d3d10_effect_type_destroy(). */
1362 HeapFree(GetProcessHeap(), 0, typem
->semantic
);
1363 HeapFree(GetProcessHeap(), 0, typem
->name
);
1366 static void d3d10_effect_type_destroy(struct wine_rb_entry
*entry
, void *context
)
1368 struct d3d10_effect_type
*t
= WINE_RB_ENTRY_VALUE(entry
, struct d3d10_effect_type
, entry
);
1370 TRACE("effect type %p.\n", t
);
1374 HeapFree(GetProcessHeap(), 0, t
->elementtype
->name
);
1375 HeapFree(GetProcessHeap(), 0, t
->elementtype
);
1382 for (i
= 0; i
< t
->member_count
; ++i
)
1384 d3d10_effect_type_member_destroy(&t
->members
[i
]);
1386 HeapFree(GetProcessHeap(), 0, t
->members
);
1389 HeapFree(GetProcessHeap(), 0, t
->name
);
1390 HeapFree(GetProcessHeap(), 0, t
);
1393 static const struct wine_rb_functions d3d10_effect_type_rb_functions
=
1398 d3d10_effect_type_compare
,
1401 static HRESULT
parse_fx10_body(struct d3d10_effect
*e
, const char *data
, DWORD data_size
)
1403 const char *ptr
= data
+ e
->index_offset
;
1407 if (wine_rb_init(&e
->types
, &d3d10_effect_type_rb_functions
) == -1)
1409 ERR("Failed to initialize type rbtree.\n");
1413 e
->local_buffers
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, e
->local_buffer_count
* sizeof(*e
->local_buffers
));
1414 if (!e
->local_buffers
)
1416 ERR("Failed to allocate local buffer memory.\n");
1417 return E_OUTOFMEMORY
;
1420 e
->local_variables
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, e
->local_variable_count
* sizeof(*e
->local_variables
));
1421 if (!e
->local_variables
)
1423 ERR("Failed to allocate local variable memory.\n");
1424 return E_OUTOFMEMORY
;
1427 e
->techniques
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, e
->technique_count
* sizeof(*e
->techniques
));
1430 ERR("Failed to allocate techniques memory\n");
1431 return E_OUTOFMEMORY
;
1434 for (i
= 0; i
< e
->local_buffer_count
; ++i
)
1436 struct d3d10_effect_variable
*l
= &e
->local_buffers
[i
];
1437 l
->vtbl
= (ID3D10EffectVariableVtbl
*)&d3d10_effect_constant_buffer_vtbl
;
1439 l
->buffer
= &null_local_buffer
;
1441 hr
= parse_fx10_local_buffer(l
, &ptr
, data
);
1442 if (FAILED(hr
)) return hr
;
1445 for (i
= 0; i
< e
->local_variable_count
; ++i
)
1447 struct d3d10_effect_variable
*v
= &e
->local_variables
[i
];
1450 v
->vtbl
= &d3d10_effect_variable_vtbl
;
1451 v
->buffer
= &null_local_buffer
;
1453 hr
= parse_fx10_local_variable(v
, &ptr
, data
);
1454 if (FAILED(hr
)) return hr
;
1457 for (i
= 0; i
< e
->technique_count
; ++i
)
1459 struct d3d10_effect_technique
*t
= &e
->techniques
[i
];
1461 t
->vtbl
= &d3d10_effect_technique_vtbl
;
1464 hr
= parse_fx10_technique(t
, &ptr
, data
);
1465 if (FAILED(hr
)) return hr
;
1471 static HRESULT
parse_fx10(struct d3d10_effect
*e
, const char *data
, DWORD data_size
)
1473 const char *ptr
= data
;
1476 /* Compiled target version (e.g. fx_4_0=0xfeff1001, fx_4_1=0xfeff1011). */
1477 read_dword(&ptr
, &e
->version
);
1478 TRACE("Target: %#x\n", e
->version
);
1480 read_dword(&ptr
, &e
->local_buffer_count
);
1481 TRACE("Local buffer count: %u.\n", e
->local_buffer_count
);
1483 read_dword(&ptr
, &e
->variable_count
);
1484 TRACE("Variable count: %u\n", e
->variable_count
);
1486 read_dword(&ptr
, &e
->local_variable_count
);
1487 TRACE("Object count: %u\n", e
->local_variable_count
);
1489 read_dword(&ptr
, &e
->sharedbuffers_count
);
1490 TRACE("Sharedbuffers count: %u\n", e
->sharedbuffers_count
);
1492 /* Number of variables in shared buffers? */
1493 read_dword(&ptr
, &unknown
);
1494 FIXME("Unknown 0: %u\n", unknown
);
1496 read_dword(&ptr
, &e
->sharedobjects_count
);
1497 TRACE("Sharedobjects count: %u\n", e
->sharedobjects_count
);
1499 read_dword(&ptr
, &e
->technique_count
);
1500 TRACE("Technique count: %u\n", e
->technique_count
);
1502 read_dword(&ptr
, &e
->index_offset
);
1503 TRACE("Index offset: %#x\n", e
->index_offset
);
1505 read_dword(&ptr
, &unknown
);
1506 FIXME("Unknown 1: %u\n", unknown
);
1508 read_dword(&ptr
, &e
->texture_count
);
1509 TRACE("Texture count: %u\n", e
->texture_count
);
1511 read_dword(&ptr
, &e
->dephstencilstate_count
);
1512 TRACE("Depthstencilstate count: %u\n", e
->dephstencilstate_count
);
1514 read_dword(&ptr
, &e
->blendstate_count
);
1515 TRACE("Blendstate count: %u\n", e
->blendstate_count
);
1517 read_dword(&ptr
, &e
->rasterizerstate_count
);
1518 TRACE("Rasterizerstate count: %u\n", e
->rasterizerstate_count
);
1520 read_dword(&ptr
, &e
->samplerstate_count
);
1521 TRACE("Samplerstate count: %u\n", e
->samplerstate_count
);
1523 read_dword(&ptr
, &e
->rendertargetview_count
);
1524 TRACE("Rendertargetview count: %u\n", e
->rendertargetview_count
);
1526 read_dword(&ptr
, &e
->depthstencilview_count
);
1527 TRACE("Depthstencilview count: %u\n", e
->depthstencilview_count
);
1529 read_dword(&ptr
, &e
->shader_call_count
);
1530 TRACE("Shader call count: %u\n", e
->shader_call_count
);
1532 read_dword(&ptr
, &e
->shader_compile_count
);
1533 TRACE("Shader compile count: %u\n", e
->shader_compile_count
);
1535 return parse_fx10_body(e
, ptr
, data_size
- (ptr
- data
));
1538 static HRESULT
fx10_chunk_handler(const char *data
, DWORD data_size
, DWORD tag
, void *ctx
)
1540 struct d3d10_effect
*e
= ctx
;
1542 TRACE("tag: %s.\n", debugstr_an((const char *)&tag
, 4));
1544 TRACE("chunk size: %#x\n", data_size
);
1549 return parse_fx10(e
, data
, data_size
);
1552 FIXME("Unhandled chunk %s.\n", debugstr_an((const char *)&tag
, 4));
1557 HRESULT
d3d10_effect_parse(struct d3d10_effect
*This
, const void *data
, SIZE_T data_size
)
1559 return parse_dxbc(data
, data_size
, fx10_chunk_handler
, This
);
1562 static void d3d10_effect_object_destroy(struct d3d10_effect_object
*o
)
1564 TRACE("effect object %p.\n", o
);
1568 case D3D10_EOT_VERTEXSHADER
:
1569 case D3D10_EOT_PIXELSHADER
:
1570 case D3D10_EOT_GEOMETRYSHADER
:
1571 HeapFree(GetProcessHeap(), 0, ((struct d3d10_effect_shader_variable
*)o
->data
)->input_signature
);
1577 HeapFree(GetProcessHeap(), 0, o
->data
);
1580 static HRESULT
d3d10_effect_object_apply(struct d3d10_effect_object
*o
)
1582 ID3D10Device
*device
= o
->pass
->technique
->effect
->device
;
1584 TRACE("effect object %p, type %#x.\n", o
, o
->type
);
1588 case D3D10_EOT_VERTEXSHADER
:
1589 ID3D10Device_VSSetShader(device
, ((struct d3d10_effect_shader_variable
*)o
->data
)->shader
.vs
);
1592 case D3D10_EOT_PIXELSHADER
:
1593 ID3D10Device_PSSetShader(device
, ((struct d3d10_effect_shader_variable
*)o
->data
)->shader
.ps
);
1596 case D3D10_EOT_GEOMETRYSHADER
:
1597 ID3D10Device_GSSetShader(device
, ((struct d3d10_effect_shader_variable
*)o
->data
)->shader
.gs
);
1601 FIXME("Unhandled effect object type %#x.\n", o
->type
);
1606 static void d3d10_effect_variable_destroy(struct d3d10_effect_variable
*v
)
1610 TRACE("variable %p.\n", v
);
1612 HeapFree(GetProcessHeap(), 0, v
->name
);
1613 HeapFree(GetProcessHeap(), 0, v
->semantic
);
1616 for (i
= 0; i
< v
->annotation_count
; ++i
)
1618 d3d10_effect_variable_destroy(&v
->annotations
[i
]);
1620 HeapFree(GetProcessHeap(), 0, v
->annotations
);
1625 for (i
= 0; i
< v
->type
->member_count
; ++i
)
1627 d3d10_effect_variable_destroy(&v
->members
[i
]);
1629 HeapFree(GetProcessHeap(), 0, v
->members
);
1634 for (i
= 0; i
< v
->type
->element_count
; ++i
)
1636 d3d10_effect_variable_destroy(&v
->elements
[i
]);
1638 HeapFree(GetProcessHeap(), 0, v
->elements
);
1642 static void d3d10_effect_pass_destroy(struct d3d10_effect_pass
*p
)
1646 TRACE("pass %p\n", p
);
1648 HeapFree(GetProcessHeap(), 0, p
->name
);
1651 for (i
= 0; i
< p
->object_count
; ++i
)
1653 d3d10_effect_object_destroy(&p
->objects
[i
]);
1655 HeapFree(GetProcessHeap(), 0, p
->objects
);
1660 for (i
= 0; i
< p
->annotation_count
; ++i
)
1662 d3d10_effect_variable_destroy(&p
->annotations
[i
]);
1664 HeapFree(GetProcessHeap(), 0, p
->annotations
);
1669 static void d3d10_effect_technique_destroy(struct d3d10_effect_technique
*t
)
1673 TRACE("technique %p\n", t
);
1675 HeapFree(GetProcessHeap(), 0, t
->name
);
1678 for (i
= 0; i
< t
->pass_count
; ++i
)
1680 d3d10_effect_pass_destroy(&t
->passes
[i
]);
1682 HeapFree(GetProcessHeap(), 0, t
->passes
);
1687 for (i
= 0; i
< t
->annotation_count
; ++i
)
1689 d3d10_effect_variable_destroy(&t
->annotations
[i
]);
1691 HeapFree(GetProcessHeap(), 0, t
->annotations
);
1695 static void d3d10_effect_local_buffer_destroy(struct d3d10_effect_variable
*l
)
1699 TRACE("local buffer %p.\n", l
);
1701 HeapFree(GetProcessHeap(), 0, l
->name
);
1704 for (i
= 0; i
< l
->type
->member_count
; ++i
)
1706 d3d10_effect_variable_destroy(&l
->members
[i
]);
1708 HeapFree(GetProcessHeap(), 0, l
->members
);
1711 if (l
->type
->members
)
1713 for (i
= 0; i
< l
->type
->member_count
; ++i
)
1715 /* Do not release l->type->members[i].type, it will be covered by d3d10_effect_type_destroy(). */
1716 HeapFree(GetProcessHeap(), 0, l
->type
->members
[i
].semantic
);
1717 HeapFree(GetProcessHeap(), 0, l
->type
->members
[i
].name
);
1719 HeapFree(GetProcessHeap(), 0, l
->type
->members
);
1721 HeapFree(GetProcessHeap(), 0, l
->type
->name
);
1722 HeapFree(GetProcessHeap(), 0, l
->type
);
1726 for (i
= 0; i
< l
->annotation_count
; ++i
)
1728 d3d10_effect_variable_destroy(&l
->annotations
[i
]);
1730 HeapFree(GetProcessHeap(), 0, l
->annotations
);
1734 /* IUnknown methods */
1736 static HRESULT STDMETHODCALLTYPE
d3d10_effect_QueryInterface(ID3D10Effect
*iface
, REFIID riid
, void **object
)
1738 TRACE("iface %p, riid %s, object %p\n", iface
, debugstr_guid(riid
), object
);
1740 if (IsEqualGUID(riid
, &IID_ID3D10Effect
)
1741 || IsEqualGUID(riid
, &IID_IUnknown
))
1743 IUnknown_AddRef(iface
);
1748 WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid
));
1751 return E_NOINTERFACE
;
1754 static ULONG STDMETHODCALLTYPE
d3d10_effect_AddRef(ID3D10Effect
*iface
)
1756 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
1757 ULONG refcount
= InterlockedIncrement(&This
->refcount
);
1759 TRACE("%p increasing refcount to %u\n", This
, refcount
);
1764 static ULONG STDMETHODCALLTYPE
d3d10_effect_Release(ID3D10Effect
*iface
)
1766 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
1767 ULONG refcount
= InterlockedDecrement(&This
->refcount
);
1769 TRACE("%p decreasing refcount to %u\n", This
, refcount
);
1775 if (This
->techniques
)
1777 for (i
= 0; i
< This
->technique_count
; ++i
)
1779 d3d10_effect_technique_destroy(&This
->techniques
[i
]);
1781 HeapFree(GetProcessHeap(), 0, This
->techniques
);
1784 if (This
->local_variables
)
1786 for (i
= 0; i
< This
->local_variable_count
; ++i
)
1788 d3d10_effect_variable_destroy(&This
->local_variables
[i
]);
1790 HeapFree(GetProcessHeap(), 0, This
->local_variables
);
1793 if (This
->local_buffers
)
1795 for (i
= 0; i
< This
->local_buffer_count
; ++i
)
1797 d3d10_effect_local_buffer_destroy(&This
->local_buffers
[i
]);
1799 HeapFree(GetProcessHeap(), 0, This
->local_buffers
);
1802 wine_rb_destroy(&This
->types
, d3d10_effect_type_destroy
, NULL
);
1804 ID3D10Device_Release(This
->device
);
1805 HeapFree(GetProcessHeap(), 0, This
);
1811 /* ID3D10Effect methods */
1813 static BOOL STDMETHODCALLTYPE
d3d10_effect_IsValid(ID3D10Effect
*iface
)
1815 FIXME("iface %p stub!\n", iface
);
1820 static BOOL STDMETHODCALLTYPE
d3d10_effect_IsPool(ID3D10Effect
*iface
)
1822 FIXME("iface %p stub!\n", iface
);
1827 static HRESULT STDMETHODCALLTYPE
d3d10_effect_GetDevice(ID3D10Effect
*iface
, ID3D10Device
**device
)
1829 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
1831 TRACE("iface %p, device %p\n", iface
, device
);
1833 ID3D10Device_AddRef(This
->device
);
1834 *device
= This
->device
;
1839 static HRESULT STDMETHODCALLTYPE
d3d10_effect_GetDesc(ID3D10Effect
*iface
, D3D10_EFFECT_DESC
*desc
)
1841 FIXME("iface %p, desc %p stub!\n", iface
, desc
);
1846 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_GetConstantBufferByIndex(ID3D10Effect
*iface
,
1849 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
1850 struct d3d10_effect_variable
*l
;
1852 TRACE("iface %p, index %u\n", iface
, index
);
1854 if (index
>= This
->local_buffer_count
)
1856 WARN("Invalid index specified\n");
1857 return (ID3D10EffectConstantBuffer
*)&null_local_buffer
;
1860 l
= &This
->local_buffers
[index
];
1862 TRACE("Returning buffer %p, %s.\n", l
, debugstr_a(l
->name
));
1864 return (ID3D10EffectConstantBuffer
*)l
;
1867 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_GetConstantBufferByName(ID3D10Effect
*iface
,
1870 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
1873 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
1875 for (i
= 0; i
< This
->local_buffer_count
; ++i
)
1877 struct d3d10_effect_variable
*l
= &This
->local_buffers
[i
];
1879 if (!strcmp(l
->name
, name
))
1881 TRACE("Returning buffer %p.\n", l
);
1882 return (ID3D10EffectConstantBuffer
*)l
;
1886 WARN("Invalid name specified\n");
1888 return (ID3D10EffectConstantBuffer
*)&null_local_buffer
;
1891 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_GetVariableByIndex(ID3D10Effect
*iface
, UINT index
)
1893 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
1896 TRACE("iface %p, index %u\n", iface
, index
);
1898 for (i
= 0; i
< This
->local_buffer_count
; ++i
)
1900 struct d3d10_effect_variable
*l
= &This
->local_buffers
[i
];
1902 if (index
< l
->type
->member_count
)
1904 struct d3d10_effect_variable
*v
= &l
->members
[index
];
1906 TRACE("Returning variable %p.\n", v
);
1907 return (ID3D10EffectVariable
*)v
;
1909 index
-= l
->type
->member_count
;
1912 if (index
< This
->local_variable_count
)
1914 struct d3d10_effect_variable
*v
= &This
->local_variables
[index
];
1916 TRACE("Returning variable %p.\n", v
);
1917 return (ID3D10EffectVariable
*)v
;
1920 WARN("Invalid index specified\n");
1922 return (ID3D10EffectVariable
*)&null_variable
;
1925 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_GetVariableByName(ID3D10Effect
*iface
, LPCSTR name
)
1927 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
1930 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
1932 for (i
= 0; i
< This
->local_buffer_count
; ++i
)
1934 struct d3d10_effect_variable
*l
= &This
->local_buffers
[i
];
1937 for (j
= 0; j
< l
->type
->member_count
; ++j
)
1939 struct d3d10_effect_variable
*v
= &l
->members
[j
];
1941 if (!strcmp(v
->name
, name
))
1943 TRACE("Returning variable %p.\n", v
);
1944 return (ID3D10EffectVariable
*)v
;
1949 for (i
= 0; i
< This
->local_variable_count
; ++i
)
1951 struct d3d10_effect_variable
*v
= &This
->local_variables
[i
];
1953 if (!strcmp(v
->name
, name
))
1955 TRACE("Returning variable %p.\n", v
);
1956 return (ID3D10EffectVariable
*)v
;
1960 WARN("Invalid name specified\n");
1962 return (ID3D10EffectVariable
*)&null_variable
;
1965 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_GetVariableBySemantic(ID3D10Effect
*iface
,
1968 FIXME("iface %p, semantic %s stub!\n", iface
, debugstr_a(semantic
));
1973 static struct ID3D10EffectTechnique
* STDMETHODCALLTYPE
d3d10_effect_GetTechniqueByIndex(ID3D10Effect
*iface
,
1976 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
1977 struct d3d10_effect_technique
*t
;
1979 TRACE("iface %p, index %u\n", iface
, index
);
1981 if (index
>= This
->technique_count
)
1983 WARN("Invalid index specified\n");
1984 return (ID3D10EffectTechnique
*)&null_technique
;
1987 t
= &This
->techniques
[index
];
1989 TRACE("Returning technique %p, %s.\n", t
, debugstr_a(t
->name
));
1991 return (ID3D10EffectTechnique
*)t
;
1994 static struct ID3D10EffectTechnique
* STDMETHODCALLTYPE
d3d10_effect_GetTechniqueByName(ID3D10Effect
*iface
,
1997 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
2000 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2002 for (i
= 0; i
< This
->technique_count
; ++i
)
2004 struct d3d10_effect_technique
*t
= &This
->techniques
[i
];
2005 if (!strcmp(t
->name
, name
))
2007 TRACE("Returning technique %p\n", t
);
2008 return (ID3D10EffectTechnique
*)t
;
2012 WARN("Invalid name specified\n");
2014 return (ID3D10EffectTechnique
*)&null_technique
;
2017 static HRESULT STDMETHODCALLTYPE
d3d10_effect_Optimize(ID3D10Effect
*iface
)
2019 FIXME("iface %p stub!\n", iface
);
2024 static BOOL STDMETHODCALLTYPE
d3d10_effect_IsOptimized(ID3D10Effect
*iface
)
2026 FIXME("iface %p stub!\n", iface
);
2031 const struct ID3D10EffectVtbl d3d10_effect_vtbl
=
2033 /* IUnknown methods */
2034 d3d10_effect_QueryInterface
,
2035 d3d10_effect_AddRef
,
2036 d3d10_effect_Release
,
2037 /* ID3D10Effect methods */
2038 d3d10_effect_IsValid
,
2039 d3d10_effect_IsPool
,
2040 d3d10_effect_GetDevice
,
2041 d3d10_effect_GetDesc
,
2042 d3d10_effect_GetConstantBufferByIndex
,
2043 d3d10_effect_GetConstantBufferByName
,
2044 d3d10_effect_GetVariableByIndex
,
2045 d3d10_effect_GetVariableByName
,
2046 d3d10_effect_GetVariableBySemantic
,
2047 d3d10_effect_GetTechniqueByIndex
,
2048 d3d10_effect_GetTechniqueByName
,
2049 d3d10_effect_Optimize
,
2050 d3d10_effect_IsOptimized
,
2053 /* ID3D10EffectTechnique methods */
2055 static BOOL STDMETHODCALLTYPE
d3d10_effect_technique_IsValid(ID3D10EffectTechnique
*iface
)
2057 TRACE("iface %p\n", iface
);
2059 return (struct d3d10_effect_technique
*)iface
!= &null_technique
;
2062 static HRESULT STDMETHODCALLTYPE
d3d10_effect_technique_GetDesc(ID3D10EffectTechnique
*iface
,
2063 D3D10_TECHNIQUE_DESC
*desc
)
2065 struct d3d10_effect_technique
*This
= (struct d3d10_effect_technique
*)iface
;
2067 TRACE("iface %p, desc %p\n", iface
, desc
);
2069 if(This
== &null_technique
)
2071 WARN("Null technique specified\n");
2077 WARN("Invalid argument specified\n");
2078 return E_INVALIDARG
;
2081 desc
->Name
= This
->name
;
2082 desc
->Passes
= This
->pass_count
;
2083 desc
->Annotations
= This
->annotation_count
;
2088 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_technique_GetAnnotationByIndex(
2089 ID3D10EffectTechnique
*iface
, UINT index
)
2091 struct d3d10_effect_technique
*This
= (struct d3d10_effect_technique
*)iface
;
2092 struct d3d10_effect_variable
*a
;
2094 TRACE("iface %p, index %u\n", iface
, index
);
2096 if (index
>= This
->annotation_count
)
2098 WARN("Invalid index specified\n");
2099 return (ID3D10EffectVariable
*)&null_variable
;
2102 a
= &This
->annotations
[index
];
2104 TRACE("Returning annotation %p, %s\n", a
, debugstr_a(a
->name
));
2106 return (ID3D10EffectVariable
*)a
;
2109 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_technique_GetAnnotationByName(
2110 ID3D10EffectTechnique
*iface
, LPCSTR name
)
2112 struct d3d10_effect_technique
*This
= (struct d3d10_effect_technique
*)iface
;
2115 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2117 for (i
= 0; i
< This
->annotation_count
; ++i
)
2119 struct d3d10_effect_variable
*a
= &This
->annotations
[i
];
2120 if (!strcmp(a
->name
, name
))
2122 TRACE("Returning annotation %p\n", a
);
2123 return (ID3D10EffectVariable
*)a
;
2127 WARN("Invalid name specified\n");
2129 return (ID3D10EffectVariable
*)&null_variable
;
2132 static struct ID3D10EffectPass
* STDMETHODCALLTYPE
d3d10_effect_technique_GetPassByIndex(ID3D10EffectTechnique
*iface
,
2135 struct d3d10_effect_technique
*This
= (struct d3d10_effect_technique
*)iface
;
2136 struct d3d10_effect_pass
*p
;
2138 TRACE("iface %p, index %u\n", iface
, index
);
2140 if (index
>= This
->pass_count
)
2142 WARN("Invalid index specified\n");
2143 return (ID3D10EffectPass
*)&null_pass
;
2146 p
= &This
->passes
[index
];
2148 TRACE("Returning pass %p, %s.\n", p
, debugstr_a(p
->name
));
2150 return (ID3D10EffectPass
*)p
;
2153 static struct ID3D10EffectPass
* STDMETHODCALLTYPE
d3d10_effect_technique_GetPassByName(ID3D10EffectTechnique
*iface
,
2156 struct d3d10_effect_technique
*This
= (struct d3d10_effect_technique
*)iface
;
2159 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2161 for (i
= 0; i
< This
->pass_count
; ++i
)
2163 struct d3d10_effect_pass
*p
= &This
->passes
[i
];
2164 if (!strcmp(p
->name
, name
))
2166 TRACE("Returning pass %p\n", p
);
2167 return (ID3D10EffectPass
*)p
;
2171 WARN("Invalid name specified\n");
2173 return (ID3D10EffectPass
*)&null_pass
;
2176 static HRESULT STDMETHODCALLTYPE
d3d10_effect_technique_ComputeStateBlockMask(ID3D10EffectTechnique
*iface
,
2177 D3D10_STATE_BLOCK_MASK
*mask
)
2179 FIXME("iface %p,mask %p stub!\n", iface
, mask
);
2184 static const struct ID3D10EffectTechniqueVtbl d3d10_effect_technique_vtbl
=
2186 /* ID3D10EffectTechnique methods */
2187 d3d10_effect_technique_IsValid
,
2188 d3d10_effect_technique_GetDesc
,
2189 d3d10_effect_technique_GetAnnotationByIndex
,
2190 d3d10_effect_technique_GetAnnotationByName
,
2191 d3d10_effect_technique_GetPassByIndex
,
2192 d3d10_effect_technique_GetPassByName
,
2193 d3d10_effect_technique_ComputeStateBlockMask
,
2196 /* ID3D10EffectPass methods */
2198 static BOOL STDMETHODCALLTYPE
d3d10_effect_pass_IsValid(ID3D10EffectPass
*iface
)
2200 TRACE("iface %p\n", iface
);
2202 return (struct d3d10_effect_pass
*)iface
!= &null_pass
;
2205 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_GetDesc(ID3D10EffectPass
*iface
, D3D10_PASS_DESC
*desc
)
2207 struct d3d10_effect_pass
*This
= (struct d3d10_effect_pass
*)iface
;
2210 FIXME("iface %p, desc %p partial stub!\n", iface
, desc
);
2212 if(This
== &null_pass
)
2214 WARN("Null pass specified\n");
2220 WARN("Invalid argument specified\n");
2221 return E_INVALIDARG
;
2224 memset(desc
, 0, sizeof(*desc
));
2225 desc
->Name
= This
->name
;
2226 for (i
= 0; i
< This
->object_count
; ++i
)
2228 struct d3d10_effect_object
*o
= &This
->objects
[i
];
2229 if (o
->type
== D3D10_EOT_VERTEXSHADER
)
2231 struct d3d10_effect_shader_variable
*s
= o
->data
;
2232 desc
->pIAInputSignature
= (BYTE
*)s
->input_signature
;
2233 desc
->IAInputSignatureSize
= s
->input_signature_size
;
2241 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_GetVertexShaderDesc(ID3D10EffectPass
*iface
,
2242 D3D10_PASS_SHADER_DESC
*desc
)
2244 FIXME("iface %p, desc %p stub!\n", iface
, desc
);
2249 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_GetGeometryShaderDesc(ID3D10EffectPass
*iface
,
2250 D3D10_PASS_SHADER_DESC
*desc
)
2252 FIXME("iface %p, desc %p stub!\n", iface
, desc
);
2257 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_GetPixelShaderDesc(ID3D10EffectPass
*iface
,
2258 D3D10_PASS_SHADER_DESC
*desc
)
2260 FIXME("iface %p, desc %p stub!\n", iface
, desc
);
2265 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_pass_GetAnnotationByIndex(ID3D10EffectPass
*iface
,
2268 struct d3d10_effect_pass
*This
= (struct d3d10_effect_pass
*)iface
;
2269 struct d3d10_effect_variable
*a
;
2271 TRACE("iface %p, index %u\n", iface
, index
);
2273 if (index
>= This
->annotation_count
)
2275 WARN("Invalid index specified\n");
2276 return (ID3D10EffectVariable
*)&null_variable
;
2279 a
= &This
->annotations
[index
];
2281 TRACE("Returning annotation %p, %s\n", a
, debugstr_a(a
->name
));
2283 return (ID3D10EffectVariable
*)a
;
2286 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_pass_GetAnnotationByName(ID3D10EffectPass
*iface
,
2289 struct d3d10_effect_pass
*This
= (struct d3d10_effect_pass
*)iface
;
2292 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2294 for (i
= 0; i
< This
->annotation_count
; ++i
)
2296 struct d3d10_effect_variable
*a
= &This
->annotations
[i
];
2297 if (!strcmp(a
->name
, name
))
2299 TRACE("Returning annotation %p\n", a
);
2300 return (ID3D10EffectVariable
*)a
;
2304 WARN("Invalid name specified\n");
2306 return (ID3D10EffectVariable
*)&null_variable
;
2309 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_Apply(ID3D10EffectPass
*iface
, UINT flags
)
2311 struct d3d10_effect_pass
*This
= (struct d3d10_effect_pass
*)iface
;
2315 TRACE("iface %p, flags %#x\n", iface
, flags
);
2317 if (flags
) FIXME("Ignoring flags (%#x)\n", flags
);
2319 for (i
= 0; i
< This
->object_count
; ++i
)
2321 hr
= d3d10_effect_object_apply(&This
->objects
[i
]);
2322 if (FAILED(hr
)) break;
2328 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_ComputeStateBlockMask(ID3D10EffectPass
*iface
,
2329 D3D10_STATE_BLOCK_MASK
*mask
)
2331 FIXME("iface %p, mask %p stub!\n", iface
, mask
);
2336 static const struct ID3D10EffectPassVtbl d3d10_effect_pass_vtbl
=
2338 /* ID3D10EffectPass methods */
2339 d3d10_effect_pass_IsValid
,
2340 d3d10_effect_pass_GetDesc
,
2341 d3d10_effect_pass_GetVertexShaderDesc
,
2342 d3d10_effect_pass_GetGeometryShaderDesc
,
2343 d3d10_effect_pass_GetPixelShaderDesc
,
2344 d3d10_effect_pass_GetAnnotationByIndex
,
2345 d3d10_effect_pass_GetAnnotationByName
,
2346 d3d10_effect_pass_Apply
,
2347 d3d10_effect_pass_ComputeStateBlockMask
,
2350 /* ID3D10EffectVariable methods */
2352 static BOOL STDMETHODCALLTYPE
d3d10_effect_variable_IsValid(ID3D10EffectVariable
*iface
)
2354 TRACE("iface %p\n", iface
);
2356 return (struct d3d10_effect_variable
*)iface
!= &null_variable
;
2359 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_variable_GetType(ID3D10EffectVariable
*iface
)
2361 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2363 TRACE("iface %p\n", iface
);
2365 return (ID3D10EffectType
*)This
->type
;
2368 static HRESULT STDMETHODCALLTYPE
d3d10_effect_variable_GetDesc(ID3D10EffectVariable
*iface
,
2369 D3D10_EFFECT_VARIABLE_DESC
*desc
)
2371 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2373 TRACE("iface %p, desc %p\n", iface
, desc
);
2375 if(This
== &null_variable
)
2377 WARN("Null variable specified\n");
2383 WARN("Invalid argument specified\n");
2384 return E_INVALIDARG
;
2387 memset(desc
, 0, sizeof(*desc
));
2388 desc
->Name
= This
->name
;
2389 desc
->Semantic
= This
->semantic
;
2390 desc
->Flags
= This
->flag
;
2391 desc
->Annotations
= This
->annotation_count
;
2392 desc
->BufferOffset
= This
->buffer_offset
;
2394 if( This
->flag
== D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT
)
2396 desc
->ExplicitBindPoint
= This
->buffer_offset
;
2402 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetAnnotationByIndex(
2403 ID3D10EffectVariable
*iface
, UINT index
)
2405 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2406 struct d3d10_effect_variable
*a
;
2408 TRACE("iface %p, index %u\n", iface
, index
);
2410 if (index
>= This
->annotation_count
)
2412 WARN("Invalid index specified\n");
2413 return (ID3D10EffectVariable
*)&null_variable
;
2416 a
= &This
->annotations
[index
];
2418 TRACE("Returning annotation %p, %s\n", a
, debugstr_a(a
->name
));
2420 return (ID3D10EffectVariable
*)a
;
2423 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetAnnotationByName(
2424 ID3D10EffectVariable
*iface
, LPCSTR name
)
2426 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2429 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2431 for (i
= 0; i
< This
->annotation_count
; ++i
)
2433 struct d3d10_effect_variable
*a
= &This
->annotations
[i
];
2434 if (!strcmp(a
->name
, name
))
2436 TRACE("Returning annotation %p\n", a
);
2437 return (ID3D10EffectVariable
*)a
;
2441 WARN("Invalid name specified\n");
2443 return (ID3D10EffectVariable
*)&null_variable
;
2446 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetMemberByIndex(
2447 ID3D10EffectVariable
*iface
, UINT index
)
2449 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2450 struct d3d10_effect_variable
*m
;
2452 TRACE("iface %p, index %u\n", iface
, index
);
2454 if (index
>= This
->type
->member_count
)
2456 WARN("Invalid index specified\n");
2457 return (ID3D10EffectVariable
*)&null_variable
;
2460 m
= &This
->members
[index
];
2462 TRACE("Returning member %p, %s\n", m
, debugstr_a(m
->name
));
2464 return (ID3D10EffectVariable
*)m
;
2467 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetMemberByName(
2468 ID3D10EffectVariable
*iface
, LPCSTR name
)
2470 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2473 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2477 WARN("Invalid name specified\n");
2478 return (ID3D10EffectVariable
*)&null_variable
;
2481 for (i
= 0; i
< This
->type
->member_count
; ++i
)
2483 struct d3d10_effect_variable
*m
= &This
->members
[i
];
2487 if (!strcmp(m
->name
, name
))
2489 TRACE("Returning member %p\n", m
);
2490 return (ID3D10EffectVariable
*)m
;
2495 WARN("Invalid name specified\n");
2497 return (ID3D10EffectVariable
*)&null_variable
;
2500 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetMemberBySemantic(
2501 ID3D10EffectVariable
*iface
, LPCSTR semantic
)
2503 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2506 TRACE("iface %p, semantic %s.\n", iface
, debugstr_a(semantic
));
2510 WARN("Invalid semantic specified\n");
2511 return (ID3D10EffectVariable
*)&null_variable
;
2514 for (i
= 0; i
< This
->type
->member_count
; ++i
)
2516 struct d3d10_effect_variable
*m
= &This
->members
[i
];
2520 if (!strcmp(m
->semantic
, semantic
))
2522 TRACE("Returning member %p\n", m
);
2523 return (ID3D10EffectVariable
*)m
;
2528 WARN("Invalid semantic specified\n");
2530 return (ID3D10EffectVariable
*)&null_variable
;
2533 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetElement(
2534 ID3D10EffectVariable
*iface
, UINT index
)
2536 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2537 struct d3d10_effect_variable
*v
;
2539 TRACE("iface %p, index %u\n", iface
, index
);
2541 if (index
>= This
->type
->element_count
)
2543 WARN("Invalid index specified\n");
2544 return (ID3D10EffectVariable
*)&null_variable
;
2547 v
= &This
->elements
[index
];
2549 TRACE("Returning element %p, %s\n", v
, debugstr_a(v
->name
));
2551 return (ID3D10EffectVariable
*)v
;
2554 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_variable_GetParentConstantBuffer(
2555 ID3D10EffectVariable
*iface
)
2557 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2559 TRACE("iface %p\n", iface
);
2561 return (ID3D10EffectConstantBuffer
*)This
->buffer
;
2564 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsScalar(
2565 ID3D10EffectVariable
*iface
)
2567 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2569 TRACE("iface %p\n", iface
);
2571 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_scalar_variable_vtbl
)
2572 return (ID3D10EffectScalarVariable
*)This
;
2574 return (ID3D10EffectScalarVariable
*)&null_scalar_variable
;
2577 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsVector(
2578 ID3D10EffectVariable
*iface
)
2580 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2582 TRACE("iface %p\n", iface
);
2584 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_vector_variable_vtbl
)
2585 return (ID3D10EffectVectorVariable
*)This
;
2587 return (ID3D10EffectVectorVariable
*)&null_vector_variable
;
2590 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsMatrix(
2591 ID3D10EffectVariable
*iface
)
2593 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2595 TRACE("iface %p\n", iface
);
2597 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_matrix_variable_vtbl
)
2598 return (ID3D10EffectMatrixVariable
*)This
;
2600 return (ID3D10EffectMatrixVariable
*)&null_matrix_variable
;
2603 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsString(
2604 ID3D10EffectVariable
*iface
)
2606 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2608 TRACE("iface %p\n", iface
);
2610 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_string_variable_vtbl
)
2611 return (ID3D10EffectStringVariable
*)This
;
2613 return (ID3D10EffectStringVariable
*)&null_string_variable
;
2616 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsShaderResource(
2617 ID3D10EffectVariable
*iface
)
2619 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2621 TRACE("iface %p\n", iface
);
2623 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_resource_variable_vtbl
)
2624 return (ID3D10EffectShaderResourceVariable
*)This
;
2626 return (ID3D10EffectShaderResourceVariable
*)&null_shader_resource_variable
;
2629 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsRenderTargetView(
2630 ID3D10EffectVariable
*iface
)
2632 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2634 TRACE("iface %p\n", iface
);
2636 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_render_target_view_variable_vtbl
)
2637 return (ID3D10EffectRenderTargetViewVariable
*)This
;
2639 return (ID3D10EffectRenderTargetViewVariable
*)&null_render_target_view_variable
;
2642 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsDepthStencilView(
2643 ID3D10EffectVariable
*iface
)
2645 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2647 TRACE("iface %p\n", iface
);
2649 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_depth_stencil_view_variable_vtbl
)
2650 return (ID3D10EffectDepthStencilViewVariable
*)This
;
2652 return (ID3D10EffectDepthStencilViewVariable
*)&null_depth_stencil_view_variable
;
2655 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_variable_AsConstantBuffer(
2656 ID3D10EffectVariable
*iface
)
2658 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2660 TRACE("iface %p\n", iface
);
2662 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_constant_buffer_vtbl
)
2663 return (ID3D10EffectConstantBuffer
*)This
;
2665 return (ID3D10EffectConstantBuffer
*)&null_local_buffer
;
2668 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsShader(
2669 ID3D10EffectVariable
*iface
)
2671 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2673 TRACE("iface %p\n", iface
);
2675 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_variable_vtbl
)
2676 return (ID3D10EffectShaderVariable
*)This
;
2678 return (ID3D10EffectShaderVariable
*)&null_shader_variable
;
2681 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsBlend(ID3D10EffectVariable
*iface
)
2683 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2685 TRACE("iface %p\n", iface
);
2687 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_blend_variable_vtbl
)
2688 return (ID3D10EffectBlendVariable
*)This
;
2690 return (ID3D10EffectBlendVariable
*)&null_blend_variable
;
2693 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsDepthStencil(
2694 ID3D10EffectVariable
*iface
)
2696 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2698 TRACE("iface %p\n", iface
);
2700 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_depth_stencil_variable_vtbl
)
2701 return (ID3D10EffectDepthStencilVariable
*)This
;
2703 return (ID3D10EffectDepthStencilVariable
*)&null_depth_stencil_variable
;
2706 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsRasterizer(
2707 ID3D10EffectVariable
*iface
)
2709 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2711 TRACE("iface %p\n", iface
);
2713 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_rasterizer_variable_vtbl
)
2714 return (ID3D10EffectRasterizerVariable
*)This
;
2716 return (ID3D10EffectRasterizerVariable
*)&null_rasterizer_variable
;
2719 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsSampler(
2720 ID3D10EffectVariable
*iface
)
2722 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2724 TRACE("iface %p\n", iface
);
2726 if (This
->vtbl
== (ID3D10EffectVariableVtbl
*)&d3d10_effect_sampler_variable_vtbl
)
2727 return (ID3D10EffectSamplerVariable
*)This
;
2729 return (ID3D10EffectSamplerVariable
*)&null_sampler_variable
;
2732 static HRESULT STDMETHODCALLTYPE
d3d10_effect_variable_SetRawValue(ID3D10EffectVariable
*iface
,
2733 void *data
, UINT offset
, UINT count
)
2735 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
2740 static HRESULT STDMETHODCALLTYPE
d3d10_effect_variable_GetRawValue(ID3D10EffectVariable
*iface
,
2741 void *data
, UINT offset
, UINT count
)
2743 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
2748 static const struct ID3D10EffectVariableVtbl d3d10_effect_variable_vtbl
=
2750 /* ID3D10EffectVariable methods */
2751 d3d10_effect_variable_IsValid
,
2752 d3d10_effect_variable_GetType
,
2753 d3d10_effect_variable_GetDesc
,
2754 d3d10_effect_variable_GetAnnotationByIndex
,
2755 d3d10_effect_variable_GetAnnotationByName
,
2756 d3d10_effect_variable_GetMemberByIndex
,
2757 d3d10_effect_variable_GetMemberByName
,
2758 d3d10_effect_variable_GetMemberBySemantic
,
2759 d3d10_effect_variable_GetElement
,
2760 d3d10_effect_variable_GetParentConstantBuffer
,
2761 d3d10_effect_variable_AsScalar
,
2762 d3d10_effect_variable_AsVector
,
2763 d3d10_effect_variable_AsMatrix
,
2764 d3d10_effect_variable_AsString
,
2765 d3d10_effect_variable_AsShaderResource
,
2766 d3d10_effect_variable_AsRenderTargetView
,
2767 d3d10_effect_variable_AsDepthStencilView
,
2768 d3d10_effect_variable_AsConstantBuffer
,
2769 d3d10_effect_variable_AsShader
,
2770 d3d10_effect_variable_AsBlend
,
2771 d3d10_effect_variable_AsDepthStencil
,
2772 d3d10_effect_variable_AsRasterizer
,
2773 d3d10_effect_variable_AsSampler
,
2774 d3d10_effect_variable_SetRawValue
,
2775 d3d10_effect_variable_GetRawValue
,
2778 /* ID3D10EffectVariable methods */
2779 static BOOL STDMETHODCALLTYPE
d3d10_effect_constant_buffer_IsValid(ID3D10EffectConstantBuffer
*iface
)
2781 TRACE("iface %p\n", iface
);
2783 return (struct d3d10_effect_variable
*)iface
!= &null_local_buffer
;
2786 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetType(ID3D10EffectConstantBuffer
*iface
)
2788 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
2791 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetDesc(ID3D10EffectConstantBuffer
*iface
,
2792 D3D10_EFFECT_VARIABLE_DESC
*desc
)
2794 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
2797 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetAnnotationByIndex(
2798 ID3D10EffectConstantBuffer
*iface
, UINT index
)
2800 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
2803 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetAnnotationByName(
2804 ID3D10EffectConstantBuffer
*iface
, LPCSTR name
)
2806 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
2809 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetMemberByIndex(
2810 ID3D10EffectConstantBuffer
*iface
, UINT index
)
2812 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
2815 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetMemberByName(
2816 ID3D10EffectConstantBuffer
*iface
, LPCSTR name
)
2818 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
2821 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetMemberBySemantic(
2822 ID3D10EffectConstantBuffer
*iface
, LPCSTR semantic
)
2824 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
2827 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetElement(
2828 ID3D10EffectConstantBuffer
*iface
, UINT index
)
2830 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
2833 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetParentConstantBuffer(
2834 ID3D10EffectConstantBuffer
*iface
)
2836 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
2839 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsScalar(
2840 ID3D10EffectConstantBuffer
*iface
)
2842 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
2845 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsVector(
2846 ID3D10EffectConstantBuffer
*iface
)
2848 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
2851 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsMatrix(
2852 ID3D10EffectConstantBuffer
*iface
)
2854 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
2857 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsString(
2858 ID3D10EffectConstantBuffer
*iface
)
2860 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
2863 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsShaderResource(
2864 ID3D10EffectConstantBuffer
*iface
)
2866 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
2869 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsRenderTargetView(
2870 ID3D10EffectConstantBuffer
*iface
)
2872 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
2875 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsDepthStencilView(
2876 ID3D10EffectConstantBuffer
*iface
)
2878 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
2881 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsConstantBuffer(
2882 ID3D10EffectConstantBuffer
*iface
)
2884 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
2887 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsShader(
2888 ID3D10EffectConstantBuffer
*iface
)
2890 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
2893 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsBlend(ID3D10EffectConstantBuffer
*iface
)
2895 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
2898 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsDepthStencil(
2899 ID3D10EffectConstantBuffer
*iface
)
2901 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
2904 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsRasterizer(
2905 ID3D10EffectConstantBuffer
*iface
)
2907 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
2910 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsSampler(
2911 ID3D10EffectConstantBuffer
*iface
)
2913 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
2916 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_SetRawValue(ID3D10EffectConstantBuffer
*iface
,
2917 void *data
, UINT offset
, UINT count
)
2919 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
2922 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetRawValue(ID3D10EffectConstantBuffer
*iface
,
2923 void *data
, UINT offset
, UINT count
)
2925 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
2928 /* ID3D10EffectConstantBuffer methods */
2929 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_SetConstantBuffer(ID3D10EffectConstantBuffer
*iface
,
2930 ID3D10Buffer
*buffer
)
2932 FIXME("iface %p, buffer %p stub!\n", iface
, buffer
);
2937 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetConstantBuffer(ID3D10EffectConstantBuffer
*iface
,
2938 ID3D10Buffer
**buffer
)
2940 FIXME("iface %p, buffer %p stub!\n", iface
, buffer
);
2945 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_SetTextureBuffer(ID3D10EffectConstantBuffer
*iface
,
2946 ID3D10ShaderResourceView
*view
)
2948 FIXME("iface %p, view %p stub!\n", iface
, view
);
2953 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetTextureBuffer(ID3D10EffectConstantBuffer
*iface
,
2954 ID3D10ShaderResourceView
**view
)
2956 FIXME("iface %p, view %p stub!\n", iface
, view
);
2961 static const struct ID3D10EffectConstantBufferVtbl d3d10_effect_constant_buffer_vtbl
=
2963 /* ID3D10EffectVariable methods */
2964 d3d10_effect_constant_buffer_IsValid
,
2965 d3d10_effect_constant_buffer_GetType
,
2966 d3d10_effect_constant_buffer_GetDesc
,
2967 d3d10_effect_constant_buffer_GetAnnotationByIndex
,
2968 d3d10_effect_constant_buffer_GetAnnotationByName
,
2969 d3d10_effect_constant_buffer_GetMemberByIndex
,
2970 d3d10_effect_constant_buffer_GetMemberByName
,
2971 d3d10_effect_constant_buffer_GetMemberBySemantic
,
2972 d3d10_effect_constant_buffer_GetElement
,
2973 d3d10_effect_constant_buffer_GetParentConstantBuffer
,
2974 d3d10_effect_constant_buffer_AsScalar
,
2975 d3d10_effect_constant_buffer_AsVector
,
2976 d3d10_effect_constant_buffer_AsMatrix
,
2977 d3d10_effect_constant_buffer_AsString
,
2978 d3d10_effect_constant_buffer_AsShaderResource
,
2979 d3d10_effect_constant_buffer_AsRenderTargetView
,
2980 d3d10_effect_constant_buffer_AsDepthStencilView
,
2981 d3d10_effect_constant_buffer_AsConstantBuffer
,
2982 d3d10_effect_constant_buffer_AsShader
,
2983 d3d10_effect_constant_buffer_AsBlend
,
2984 d3d10_effect_constant_buffer_AsDepthStencil
,
2985 d3d10_effect_constant_buffer_AsRasterizer
,
2986 d3d10_effect_constant_buffer_AsSampler
,
2987 d3d10_effect_constant_buffer_SetRawValue
,
2988 d3d10_effect_constant_buffer_GetRawValue
,
2989 /* ID3D10EffectConstantBuffer methods */
2990 d3d10_effect_constant_buffer_SetConstantBuffer
,
2991 d3d10_effect_constant_buffer_GetConstantBuffer
,
2992 d3d10_effect_constant_buffer_SetTextureBuffer
,
2993 d3d10_effect_constant_buffer_GetTextureBuffer
,
2996 /* ID3D10EffectVariable methods */
2998 static BOOL STDMETHODCALLTYPE
d3d10_effect_scalar_variable_IsValid(ID3D10EffectScalarVariable
*iface
)
3000 TRACE("iface %p\n", iface
);
3002 return (struct d3d10_effect_variable
*)iface
!= &null_scalar_variable
;
3005 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetType(
3006 ID3D10EffectScalarVariable
*iface
)
3008 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
3011 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetDesc(ID3D10EffectScalarVariable
*iface
,
3012 D3D10_EFFECT_VARIABLE_DESC
*desc
)
3014 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
3017 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetAnnotationByIndex(
3018 ID3D10EffectScalarVariable
*iface
, UINT index
)
3020 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
3023 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetAnnotationByName(
3024 ID3D10EffectScalarVariable
*iface
, LPCSTR name
)
3026 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
3029 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetMemberByIndex(
3030 ID3D10EffectScalarVariable
*iface
, UINT index
)
3032 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
3035 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetMemberByName(
3036 ID3D10EffectScalarVariable
*iface
, LPCSTR name
)
3038 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
3041 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetMemberBySemantic(
3042 ID3D10EffectScalarVariable
*iface
, LPCSTR semantic
)
3044 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
3047 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetElement(
3048 ID3D10EffectScalarVariable
*iface
, UINT index
)
3050 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
3053 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetParentConstantBuffer(
3054 ID3D10EffectScalarVariable
*iface
)
3056 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
3059 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsScalar(
3060 ID3D10EffectScalarVariable
*iface
)
3062 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
3065 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsVector(
3066 ID3D10EffectScalarVariable
*iface
)
3068 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
3071 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsMatrix(
3072 ID3D10EffectScalarVariable
*iface
)
3074 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
3077 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsString(
3078 ID3D10EffectScalarVariable
*iface
)
3080 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
3083 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsShaderResource(
3084 ID3D10EffectScalarVariable
*iface
)
3086 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
3089 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsRenderTargetView(
3090 ID3D10EffectScalarVariable
*iface
)
3092 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
3095 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsDepthStencilView(
3096 ID3D10EffectScalarVariable
*iface
)
3098 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
3101 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsConstantBuffer(
3102 ID3D10EffectScalarVariable
*iface
)
3104 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
3107 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsShader(
3108 ID3D10EffectScalarVariable
*iface
)
3110 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
3113 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsBlend(
3114 ID3D10EffectScalarVariable
*iface
)
3116 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
3119 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsDepthStencil(
3120 ID3D10EffectScalarVariable
*iface
)
3122 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
3125 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsRasterizer(
3126 ID3D10EffectScalarVariable
*iface
)
3128 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
3131 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsSampler(
3132 ID3D10EffectScalarVariable
*iface
)
3134 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
3137 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetRawValue(ID3D10EffectScalarVariable
*iface
,
3138 void *data
, UINT offset
, UINT count
)
3140 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3143 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetRawValue(ID3D10EffectScalarVariable
*iface
,
3144 void *data
, UINT offset
, UINT count
)
3146 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3149 /* ID3D10EffectScalarVariable methods */
3151 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetFloat(ID3D10EffectScalarVariable
*iface
,
3154 FIXME("iface %p, value %.8e stub!\n", iface
, value
);
3159 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetFloat(ID3D10EffectScalarVariable
*iface
,
3162 FIXME("iface %p, value %p stub!\n", iface
, value
);
3167 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetFloatArray(ID3D10EffectScalarVariable
*iface
,
3168 float *values
, UINT offset
, UINT count
)
3170 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3175 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetFloatArray(ID3D10EffectScalarVariable
*iface
,
3176 float *values
, UINT offset
, UINT count
)
3178 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3183 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetInt(ID3D10EffectScalarVariable
*iface
,
3186 FIXME("iface %p, value %d stub!\n", iface
, value
);
3191 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetInt(ID3D10EffectScalarVariable
*iface
,
3194 FIXME("iface %p, value %p stub!\n", iface
, value
);
3199 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetIntArray(ID3D10EffectScalarVariable
*iface
,
3200 int *values
, UINT offset
, UINT count
)
3202 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3207 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetIntArray(ID3D10EffectScalarVariable
*iface
,
3208 int *values
, UINT offset
, UINT count
)
3210 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3215 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetBool(ID3D10EffectScalarVariable
*iface
,
3218 FIXME("iface %p, value %d stub!\n", iface
, value
);
3223 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetBool(ID3D10EffectScalarVariable
*iface
,
3226 FIXME("iface %p, value %p stub!\n", iface
, value
);
3231 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetBoolArray(ID3D10EffectScalarVariable
*iface
,
3232 BOOL
*values
, UINT offset
, UINT count
)
3234 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3239 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetBoolArray(ID3D10EffectScalarVariable
*iface
,
3240 BOOL
*values
, UINT offset
, UINT count
)
3242 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3247 static const struct ID3D10EffectScalarVariableVtbl d3d10_effect_scalar_variable_vtbl
=
3249 /* ID3D10EffectVariable methods */
3250 d3d10_effect_scalar_variable_IsValid
,
3251 d3d10_effect_scalar_variable_GetType
,
3252 d3d10_effect_scalar_variable_GetDesc
,
3253 d3d10_effect_scalar_variable_GetAnnotationByIndex
,
3254 d3d10_effect_scalar_variable_GetAnnotationByName
,
3255 d3d10_effect_scalar_variable_GetMemberByIndex
,
3256 d3d10_effect_scalar_variable_GetMemberByName
,
3257 d3d10_effect_scalar_variable_GetMemberBySemantic
,
3258 d3d10_effect_scalar_variable_GetElement
,
3259 d3d10_effect_scalar_variable_GetParentConstantBuffer
,
3260 d3d10_effect_scalar_variable_AsScalar
,
3261 d3d10_effect_scalar_variable_AsVector
,
3262 d3d10_effect_scalar_variable_AsMatrix
,
3263 d3d10_effect_scalar_variable_AsString
,
3264 d3d10_effect_scalar_variable_AsShaderResource
,
3265 d3d10_effect_scalar_variable_AsRenderTargetView
,
3266 d3d10_effect_scalar_variable_AsDepthStencilView
,
3267 d3d10_effect_scalar_variable_AsConstantBuffer
,
3268 d3d10_effect_scalar_variable_AsShader
,
3269 d3d10_effect_scalar_variable_AsBlend
,
3270 d3d10_effect_scalar_variable_AsDepthStencil
,
3271 d3d10_effect_scalar_variable_AsRasterizer
,
3272 d3d10_effect_scalar_variable_AsSampler
,
3273 d3d10_effect_scalar_variable_SetRawValue
,
3274 d3d10_effect_scalar_variable_GetRawValue
,
3275 /* ID3D10EffectScalarVariable methods */
3276 d3d10_effect_scalar_variable_SetFloat
,
3277 d3d10_effect_scalar_variable_GetFloat
,
3278 d3d10_effect_scalar_variable_SetFloatArray
,
3279 d3d10_effect_scalar_variable_GetFloatArray
,
3280 d3d10_effect_scalar_variable_SetInt
,
3281 d3d10_effect_scalar_variable_GetInt
,
3282 d3d10_effect_scalar_variable_SetIntArray
,
3283 d3d10_effect_scalar_variable_GetIntArray
,
3284 d3d10_effect_scalar_variable_SetBool
,
3285 d3d10_effect_scalar_variable_GetBool
,
3286 d3d10_effect_scalar_variable_SetBoolArray
,
3287 d3d10_effect_scalar_variable_GetBoolArray
,
3290 /* ID3D10EffectVariable methods */
3292 static BOOL STDMETHODCALLTYPE
d3d10_effect_vector_variable_IsValid(ID3D10EffectVectorVariable
*iface
)
3294 TRACE("iface %p\n", iface
);
3296 return (struct d3d10_effect_variable
*)iface
!= &null_vector_variable
;
3299 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetType(
3300 ID3D10EffectVectorVariable
*iface
)
3302 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
3305 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetDesc(ID3D10EffectVectorVariable
*iface
,
3306 D3D10_EFFECT_VARIABLE_DESC
*desc
)
3308 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
3311 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetAnnotationByIndex(
3312 ID3D10EffectVectorVariable
*iface
, UINT index
)
3314 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
3317 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetAnnotationByName(
3318 ID3D10EffectVectorVariable
*iface
, LPCSTR name
)
3320 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
3323 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetMemberByIndex(
3324 ID3D10EffectVectorVariable
*iface
, UINT index
)
3326 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
3329 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetMemberByName(
3330 ID3D10EffectVectorVariable
*iface
, LPCSTR name
)
3332 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
3335 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetMemberBySemantic(
3336 ID3D10EffectVectorVariable
*iface
, LPCSTR semantic
)
3338 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
3341 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetElement(
3342 ID3D10EffectVectorVariable
*iface
, UINT index
)
3344 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
3347 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetParentConstantBuffer(
3348 ID3D10EffectVectorVariable
*iface
)
3350 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
3353 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsScalar(
3354 ID3D10EffectVectorVariable
*iface
)
3356 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
3359 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsVector(
3360 ID3D10EffectVectorVariable
*iface
)
3362 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
3365 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsMatrix(
3366 ID3D10EffectVectorVariable
*iface
)
3368 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
3371 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsString(
3372 ID3D10EffectVectorVariable
*iface
)
3374 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
3377 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsShaderResource(
3378 ID3D10EffectVectorVariable
*iface
)
3380 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
3383 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsRenderTargetView(
3384 ID3D10EffectVectorVariable
*iface
)
3386 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
3389 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsDepthStencilView(
3390 ID3D10EffectVectorVariable
*iface
)
3392 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
3395 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsConstantBuffer(
3396 ID3D10EffectVectorVariable
*iface
)
3398 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
3401 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsShader(
3402 ID3D10EffectVectorVariable
*iface
)
3404 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
3407 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsBlend(
3408 ID3D10EffectVectorVariable
*iface
)
3410 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
3413 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsDepthStencil(
3414 ID3D10EffectVectorVariable
*iface
)
3416 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
3419 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsRasterizer(
3420 ID3D10EffectVectorVariable
*iface
)
3422 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
3425 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsSampler(
3426 ID3D10EffectVectorVariable
*iface
)
3428 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
3431 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetRawValue(ID3D10EffectVectorVariable
*iface
,
3432 void *data
, UINT offset
, UINT count
)
3434 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3437 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetRawValue(ID3D10EffectVectorVariable
*iface
,
3438 void *data
, UINT offset
, UINT count
)
3440 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3443 /* ID3D10EffectVectorVariable methods */
3445 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetBoolVector(ID3D10EffectVectorVariable
*iface
,
3448 FIXME("iface %p, value %p stub!\n", iface
, value
);
3453 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetIntVector(ID3D10EffectVectorVariable
*iface
,
3456 FIXME("iface %p, value %p stub!\n", iface
, value
);
3461 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetFloatVector(ID3D10EffectVectorVariable
*iface
,
3464 FIXME("iface %p, value %p stub!\n", iface
, value
);
3469 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetBoolVector(ID3D10EffectVectorVariable
*iface
,
3472 FIXME("iface %p, value %p stub!\n", iface
, value
);
3477 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetIntVector(ID3D10EffectVectorVariable
*iface
,
3480 FIXME("iface %p, value %p stub!\n", iface
, value
);
3485 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetFloatVector(ID3D10EffectVectorVariable
*iface
,
3488 FIXME("iface %p, value %p stub!\n", iface
, value
);
3493 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetBoolVectorArray(ID3D10EffectVectorVariable
*iface
,
3494 BOOL
*values
, UINT offset
, UINT count
)
3496 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3501 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetIntVectorArray(ID3D10EffectVectorVariable
*iface
,
3502 int *values
, UINT offset
, UINT count
)
3504 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3509 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetFloatVectorArray(ID3D10EffectVectorVariable
*iface
,
3510 float *values
, UINT offset
, UINT count
)
3512 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3517 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetBoolVectorArray(ID3D10EffectVectorVariable
*iface
,
3518 BOOL
*values
, UINT offset
, UINT count
)
3520 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3525 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetIntVectorArray(ID3D10EffectVectorVariable
*iface
,
3526 int *values
, UINT offset
, UINT count
)
3528 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3533 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetFloatVectorArray(ID3D10EffectVectorVariable
*iface
,
3534 float *values
, UINT offset
, UINT count
)
3536 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3541 static const struct ID3D10EffectVectorVariableVtbl d3d10_effect_vector_variable_vtbl
=
3543 /* ID3D10EffectVariable methods */
3544 d3d10_effect_vector_variable_IsValid
,
3545 d3d10_effect_vector_variable_GetType
,
3546 d3d10_effect_vector_variable_GetDesc
,
3547 d3d10_effect_vector_variable_GetAnnotationByIndex
,
3548 d3d10_effect_vector_variable_GetAnnotationByName
,
3549 d3d10_effect_vector_variable_GetMemberByIndex
,
3550 d3d10_effect_vector_variable_GetMemberByName
,
3551 d3d10_effect_vector_variable_GetMemberBySemantic
,
3552 d3d10_effect_vector_variable_GetElement
,
3553 d3d10_effect_vector_variable_GetParentConstantBuffer
,
3554 d3d10_effect_vector_variable_AsScalar
,
3555 d3d10_effect_vector_variable_AsVector
,
3556 d3d10_effect_vector_variable_AsMatrix
,
3557 d3d10_effect_vector_variable_AsString
,
3558 d3d10_effect_vector_variable_AsShaderResource
,
3559 d3d10_effect_vector_variable_AsRenderTargetView
,
3560 d3d10_effect_vector_variable_AsDepthStencilView
,
3561 d3d10_effect_vector_variable_AsConstantBuffer
,
3562 d3d10_effect_vector_variable_AsShader
,
3563 d3d10_effect_vector_variable_AsBlend
,
3564 d3d10_effect_vector_variable_AsDepthStencil
,
3565 d3d10_effect_vector_variable_AsRasterizer
,
3566 d3d10_effect_vector_variable_AsSampler
,
3567 d3d10_effect_vector_variable_SetRawValue
,
3568 d3d10_effect_vector_variable_GetRawValue
,
3569 /* ID3D10EffectVectorVariable methods */
3570 d3d10_effect_vector_variable_SetBoolVector
,
3571 d3d10_effect_vector_variable_SetIntVector
,
3572 d3d10_effect_vector_variable_SetFloatVector
,
3573 d3d10_effect_vector_variable_GetBoolVector
,
3574 d3d10_effect_vector_variable_GetIntVector
,
3575 d3d10_effect_vector_variable_GetFloatVector
,
3576 d3d10_effect_vector_variable_SetBoolVectorArray
,
3577 d3d10_effect_vector_variable_SetIntVectorArray
,
3578 d3d10_effect_vector_variable_SetFloatVectorArray
,
3579 d3d10_effect_vector_variable_GetBoolVectorArray
,
3580 d3d10_effect_vector_variable_GetIntVectorArray
,
3581 d3d10_effect_vector_variable_GetFloatVectorArray
,
3584 /* ID3D10EffectVariable methods */
3586 static BOOL STDMETHODCALLTYPE
d3d10_effect_matrix_variable_IsValid(ID3D10EffectMatrixVariable
*iface
)
3588 TRACE("iface %p\n", iface
);
3590 return (struct d3d10_effect_variable
*)iface
!= &null_matrix_variable
;
3593 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetType(
3594 ID3D10EffectMatrixVariable
*iface
)
3596 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
3599 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetDesc(ID3D10EffectMatrixVariable
*iface
,
3600 D3D10_EFFECT_VARIABLE_DESC
*desc
)
3602 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
3605 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetAnnotationByIndex(
3606 ID3D10EffectMatrixVariable
*iface
, UINT index
)
3608 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
3611 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetAnnotationByName(
3612 ID3D10EffectMatrixVariable
*iface
, LPCSTR name
)
3614 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
3617 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMemberByIndex(
3618 ID3D10EffectMatrixVariable
*iface
, UINT index
)
3620 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
3623 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMemberByName(
3624 ID3D10EffectMatrixVariable
*iface
, LPCSTR name
)
3626 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
3629 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMemberBySemantic(
3630 ID3D10EffectMatrixVariable
*iface
, LPCSTR semantic
)
3632 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
3635 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetElement(
3636 ID3D10EffectMatrixVariable
*iface
, UINT index
)
3638 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
3641 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetParentConstantBuffer(
3642 ID3D10EffectMatrixVariable
*iface
)
3644 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
3647 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsScalar(
3648 ID3D10EffectMatrixVariable
*iface
)
3650 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
3653 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsVector(
3654 ID3D10EffectMatrixVariable
*iface
)
3656 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
3659 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsMatrix(
3660 ID3D10EffectMatrixVariable
*iface
)
3662 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
3665 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsString(
3666 ID3D10EffectMatrixVariable
*iface
)
3668 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
3671 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsShaderResource(
3672 ID3D10EffectMatrixVariable
*iface
)
3674 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
3677 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsRenderTargetView(
3678 ID3D10EffectMatrixVariable
*iface
)
3680 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
3683 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsDepthStencilView(
3684 ID3D10EffectMatrixVariable
*iface
)
3686 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
3689 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsConstantBuffer(
3690 ID3D10EffectMatrixVariable
*iface
)
3692 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
3695 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsShader(
3696 ID3D10EffectMatrixVariable
*iface
)
3698 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
3701 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsBlend(
3702 ID3D10EffectMatrixVariable
*iface
)
3704 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
3707 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsDepthStencil(
3708 ID3D10EffectMatrixVariable
*iface
)
3710 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
3713 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsRasterizer(
3714 ID3D10EffectMatrixVariable
*iface
)
3716 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
3719 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsSampler(
3720 ID3D10EffectMatrixVariable
*iface
)
3722 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
3725 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetRawValue(ID3D10EffectMatrixVariable
*iface
,
3726 void *data
, UINT offset
, UINT count
)
3728 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3731 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetRawValue(ID3D10EffectMatrixVariable
*iface
,
3732 void *data
, UINT offset
, UINT count
)
3734 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3737 /* ID3D10EffectMatrixVariable methods */
3739 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetMatrix(ID3D10EffectMatrixVariable
*iface
,
3742 FIXME("iface %p, data %p stub!\n", iface
, data
);
3747 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMatrix(ID3D10EffectMatrixVariable
*iface
,
3750 FIXME("iface %p, data %p stub!\n", iface
, data
);
3755 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetMatrixArray(ID3D10EffectMatrixVariable
*iface
,
3756 float *data
, UINT offset
, UINT count
)
3758 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
3763 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMatrixArray(ID3D10EffectMatrixVariable
*iface
,
3764 float *data
, UINT offset
, UINT count
)
3766 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
3771 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetMatrixTranspose(ID3D10EffectMatrixVariable
*iface
,
3774 FIXME("iface %p, data %p stub!\n", iface
, data
);
3779 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMatrixTranspose(ID3D10EffectMatrixVariable
*iface
,
3782 FIXME("iface %p, data %p stub!\n", iface
, data
);
3787 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetMatrixTransposeArray(ID3D10EffectMatrixVariable
*iface
,
3788 float *data
, UINT offset
, UINT count
)
3790 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
3795 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMatrixTransposeArray(ID3D10EffectMatrixVariable
*iface
,
3796 float *data
, UINT offset
, UINT count
)
3798 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
3804 static const struct ID3D10EffectMatrixVariableVtbl d3d10_effect_matrix_variable_vtbl
=
3806 /* ID3D10EffectVariable methods */
3807 d3d10_effect_matrix_variable_IsValid
,
3808 d3d10_effect_matrix_variable_GetType
,
3809 d3d10_effect_matrix_variable_GetDesc
,
3810 d3d10_effect_matrix_variable_GetAnnotationByIndex
,
3811 d3d10_effect_matrix_variable_GetAnnotationByName
,
3812 d3d10_effect_matrix_variable_GetMemberByIndex
,
3813 d3d10_effect_matrix_variable_GetMemberByName
,
3814 d3d10_effect_matrix_variable_GetMemberBySemantic
,
3815 d3d10_effect_matrix_variable_GetElement
,
3816 d3d10_effect_matrix_variable_GetParentConstantBuffer
,
3817 d3d10_effect_matrix_variable_AsScalar
,
3818 d3d10_effect_matrix_variable_AsVector
,
3819 d3d10_effect_matrix_variable_AsMatrix
,
3820 d3d10_effect_matrix_variable_AsString
,
3821 d3d10_effect_matrix_variable_AsShaderResource
,
3822 d3d10_effect_matrix_variable_AsRenderTargetView
,
3823 d3d10_effect_matrix_variable_AsDepthStencilView
,
3824 d3d10_effect_matrix_variable_AsConstantBuffer
,
3825 d3d10_effect_matrix_variable_AsShader
,
3826 d3d10_effect_matrix_variable_AsBlend
,
3827 d3d10_effect_matrix_variable_AsDepthStencil
,
3828 d3d10_effect_matrix_variable_AsRasterizer
,
3829 d3d10_effect_matrix_variable_AsSampler
,
3830 d3d10_effect_matrix_variable_SetRawValue
,
3831 d3d10_effect_matrix_variable_GetRawValue
,
3832 /* ID3D10EffectMatrixVariable methods */
3833 d3d10_effect_matrix_variable_SetMatrix
,
3834 d3d10_effect_matrix_variable_GetMatrix
,
3835 d3d10_effect_matrix_variable_SetMatrixArray
,
3836 d3d10_effect_matrix_variable_GetMatrixArray
,
3837 d3d10_effect_matrix_variable_SetMatrixTranspose
,
3838 d3d10_effect_matrix_variable_GetMatrixTranspose
,
3839 d3d10_effect_matrix_variable_SetMatrixTransposeArray
,
3840 d3d10_effect_matrix_variable_GetMatrixTransposeArray
,
3843 /* ID3D10EffectVariable methods */
3845 static BOOL STDMETHODCALLTYPE
d3d10_effect_string_variable_IsValid(ID3D10EffectStringVariable
*iface
)
3847 TRACE("iface %p\n", iface
);
3849 return (struct d3d10_effect_variable
*)iface
!= &null_string_variable
;
3852 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetType(
3853 ID3D10EffectStringVariable
*iface
)
3855 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
3858 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_GetDesc(ID3D10EffectStringVariable
*iface
,
3859 D3D10_EFFECT_VARIABLE_DESC
*desc
)
3861 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
3864 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetAnnotationByIndex(
3865 ID3D10EffectStringVariable
*iface
, UINT index
)
3867 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
3870 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetAnnotationByName(
3871 ID3D10EffectStringVariable
*iface
, LPCSTR name
)
3873 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
3876 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetMemberByIndex(
3877 ID3D10EffectStringVariable
*iface
, UINT index
)
3879 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
3882 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetMemberByName(
3883 ID3D10EffectStringVariable
*iface
, LPCSTR name
)
3885 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
3888 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetMemberBySemantic(
3889 ID3D10EffectStringVariable
*iface
, LPCSTR semantic
)
3891 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
3894 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetElement(
3895 ID3D10EffectStringVariable
*iface
, UINT index
)
3897 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
3900 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetParentConstantBuffer(
3901 ID3D10EffectStringVariable
*iface
)
3903 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
3906 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsScalar(
3907 ID3D10EffectStringVariable
*iface
)
3909 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
3912 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsVector(
3913 ID3D10EffectStringVariable
*iface
)
3915 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
3918 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsMatrix(
3919 ID3D10EffectStringVariable
*iface
)
3921 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
3924 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsString(
3925 ID3D10EffectStringVariable
*iface
)
3927 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
3930 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsShaderResource(
3931 ID3D10EffectStringVariable
*iface
)
3933 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
3936 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsRenderTargetView(
3937 ID3D10EffectStringVariable
*iface
)
3939 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
3942 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsDepthStencilView(
3943 ID3D10EffectStringVariable
*iface
)
3945 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
3948 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsConstantBuffer(
3949 ID3D10EffectStringVariable
*iface
)
3951 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
3954 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsShader(
3955 ID3D10EffectStringVariable
*iface
)
3957 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
3960 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsBlend(
3961 ID3D10EffectStringVariable
*iface
)
3963 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
3966 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsDepthStencil(
3967 ID3D10EffectStringVariable
*iface
)
3969 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
3972 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsRasterizer(
3973 ID3D10EffectStringVariable
*iface
)
3975 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
3978 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsSampler(
3979 ID3D10EffectStringVariable
*iface
)
3981 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
3984 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_SetRawValue(ID3D10EffectStringVariable
*iface
,
3985 void *data
, UINT offset
, UINT count
)
3987 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3990 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_GetRawValue(ID3D10EffectStringVariable
*iface
,
3991 void *data
, UINT offset
, UINT count
)
3993 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3996 /* ID3D10EffectStringVariable methods */
3998 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_GetString(ID3D10EffectStringVariable
*iface
,
4001 FIXME("iface %p, str %p stub!\n", iface
, str
);
4006 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_GetStringArray(ID3D10EffectStringVariable
*iface
,
4007 LPCSTR
*strs
, UINT offset
, UINT count
)
4009 FIXME("iface %p, strs %p, offset %u, count %u stub!\n", iface
, strs
, offset
, count
);
4015 static const struct ID3D10EffectStringVariableVtbl d3d10_effect_string_variable_vtbl
=
4017 /* ID3D10EffectVariable methods */
4018 d3d10_effect_string_variable_IsValid
,
4019 d3d10_effect_string_variable_GetType
,
4020 d3d10_effect_string_variable_GetDesc
,
4021 d3d10_effect_string_variable_GetAnnotationByIndex
,
4022 d3d10_effect_string_variable_GetAnnotationByName
,
4023 d3d10_effect_string_variable_GetMemberByIndex
,
4024 d3d10_effect_string_variable_GetMemberByName
,
4025 d3d10_effect_string_variable_GetMemberBySemantic
,
4026 d3d10_effect_string_variable_GetElement
,
4027 d3d10_effect_string_variable_GetParentConstantBuffer
,
4028 d3d10_effect_string_variable_AsScalar
,
4029 d3d10_effect_string_variable_AsVector
,
4030 d3d10_effect_string_variable_AsMatrix
,
4031 d3d10_effect_string_variable_AsString
,
4032 d3d10_effect_string_variable_AsShaderResource
,
4033 d3d10_effect_string_variable_AsRenderTargetView
,
4034 d3d10_effect_string_variable_AsDepthStencilView
,
4035 d3d10_effect_string_variable_AsConstantBuffer
,
4036 d3d10_effect_string_variable_AsShader
,
4037 d3d10_effect_string_variable_AsBlend
,
4038 d3d10_effect_string_variable_AsDepthStencil
,
4039 d3d10_effect_string_variable_AsRasterizer
,
4040 d3d10_effect_string_variable_AsSampler
,
4041 d3d10_effect_string_variable_SetRawValue
,
4042 d3d10_effect_string_variable_GetRawValue
,
4043 /* ID3D10EffectStringVariable methods */
4044 d3d10_effect_string_variable_GetString
,
4045 d3d10_effect_string_variable_GetStringArray
,
4048 /* ID3D10EffectVariable methods */
4050 static BOOL STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_IsValid(ID3D10EffectShaderResourceVariable
*iface
)
4052 TRACE("iface %p\n", iface
);
4054 return (struct d3d10_effect_variable
*)iface
!= &null_shader_resource_variable
;
4057 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetType(
4058 ID3D10EffectShaderResourceVariable
*iface
)
4060 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
4063 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetDesc(
4064 ID3D10EffectShaderResourceVariable
*iface
, D3D10_EFFECT_VARIABLE_DESC
*desc
)
4066 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
4069 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetAnnotationByIndex(
4070 ID3D10EffectShaderResourceVariable
*iface
, UINT index
)
4072 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
4075 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetAnnotationByName(
4076 ID3D10EffectShaderResourceVariable
*iface
, LPCSTR name
)
4078 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
4081 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetMemberByIndex(
4082 ID3D10EffectShaderResourceVariable
*iface
, UINT index
)
4084 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
4087 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetMemberByName(
4088 ID3D10EffectShaderResourceVariable
*iface
, LPCSTR name
)
4090 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
4093 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetMemberBySemantic(
4094 ID3D10EffectShaderResourceVariable
*iface
, LPCSTR semantic
)
4096 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
4099 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetElement(
4100 ID3D10EffectShaderResourceVariable
*iface
, UINT index
)
4102 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
4105 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetParentConstantBuffer(
4106 ID3D10EffectShaderResourceVariable
*iface
)
4108 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
4111 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsScalar(
4112 ID3D10EffectShaderResourceVariable
*iface
)
4114 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
4117 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsVector(
4118 ID3D10EffectShaderResourceVariable
*iface
)
4120 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
4123 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsMatrix(
4124 ID3D10EffectShaderResourceVariable
*iface
)
4126 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
4129 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsString(
4130 ID3D10EffectShaderResourceVariable
*iface
)
4132 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
4135 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsShaderResource(
4136 ID3D10EffectShaderResourceVariable
*iface
)
4138 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
4141 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsRenderTargetView(
4142 ID3D10EffectShaderResourceVariable
*iface
)
4144 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
4147 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsDepthStencilView(
4148 ID3D10EffectShaderResourceVariable
*iface
)
4150 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
4153 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsConstantBuffer(
4154 ID3D10EffectShaderResourceVariable
*iface
)
4156 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
4159 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsShader(
4160 ID3D10EffectShaderResourceVariable
*iface
)
4162 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
4165 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsBlend(
4166 ID3D10EffectShaderResourceVariable
*iface
)
4168 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
4171 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsDepthStencil(
4172 ID3D10EffectShaderResourceVariable
*iface
)
4174 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
4177 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsRasterizer(
4178 ID3D10EffectShaderResourceVariable
*iface
)
4180 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
4183 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsSampler(
4184 ID3D10EffectShaderResourceVariable
*iface
)
4186 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
4189 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_SetRawValue(
4190 ID3D10EffectShaderResourceVariable
*iface
, void *data
, UINT offset
, UINT count
)
4192 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4195 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetRawValue(
4196 ID3D10EffectShaderResourceVariable
*iface
, void *data
, UINT offset
, UINT count
)
4198 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4201 /* ID3D10EffectShaderResourceVariable methods */
4203 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_SetResource(
4204 ID3D10EffectShaderResourceVariable
*iface
, ID3D10ShaderResourceView
*resource
)
4206 FIXME("iface %p, resource %p stub!\n", iface
, resource
);
4211 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetResource(
4212 ID3D10EffectShaderResourceVariable
*iface
, ID3D10ShaderResourceView
**resource
)
4214 FIXME("iface %p, resource %p stub!\n", iface
, resource
);
4219 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_SetResourceArray(
4220 ID3D10EffectShaderResourceVariable
*iface
, ID3D10ShaderResourceView
**resources
, UINT offset
, UINT count
)
4222 FIXME("iface %p, resources %p, offset %u, count %u stub!\n", iface
, resources
, offset
, count
);
4227 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetResourceArray(
4228 ID3D10EffectShaderResourceVariable
*iface
, ID3D10ShaderResourceView
**resources
, UINT offset
, UINT count
)
4230 FIXME("iface %p, resources %p, offset %u, count %u stub!\n", iface
, resources
, offset
, count
);
4236 static const struct ID3D10EffectShaderResourceVariableVtbl d3d10_effect_shader_resource_variable_vtbl
=
4238 /* ID3D10EffectVariable methods */
4239 d3d10_effect_shader_resource_variable_IsValid
,
4240 d3d10_effect_shader_resource_variable_GetType
,
4241 d3d10_effect_shader_resource_variable_GetDesc
,
4242 d3d10_effect_shader_resource_variable_GetAnnotationByIndex
,
4243 d3d10_effect_shader_resource_variable_GetAnnotationByName
,
4244 d3d10_effect_shader_resource_variable_GetMemberByIndex
,
4245 d3d10_effect_shader_resource_variable_GetMemberByName
,
4246 d3d10_effect_shader_resource_variable_GetMemberBySemantic
,
4247 d3d10_effect_shader_resource_variable_GetElement
,
4248 d3d10_effect_shader_resource_variable_GetParentConstantBuffer
,
4249 d3d10_effect_shader_resource_variable_AsScalar
,
4250 d3d10_effect_shader_resource_variable_AsVector
,
4251 d3d10_effect_shader_resource_variable_AsMatrix
,
4252 d3d10_effect_shader_resource_variable_AsString
,
4253 d3d10_effect_shader_resource_variable_AsShaderResource
,
4254 d3d10_effect_shader_resource_variable_AsRenderTargetView
,
4255 d3d10_effect_shader_resource_variable_AsDepthStencilView
,
4256 d3d10_effect_shader_resource_variable_AsConstantBuffer
,
4257 d3d10_effect_shader_resource_variable_AsShader
,
4258 d3d10_effect_shader_resource_variable_AsBlend
,
4259 d3d10_effect_shader_resource_variable_AsDepthStencil
,
4260 d3d10_effect_shader_resource_variable_AsRasterizer
,
4261 d3d10_effect_shader_resource_variable_AsSampler
,
4262 d3d10_effect_shader_resource_variable_SetRawValue
,
4263 d3d10_effect_shader_resource_variable_GetRawValue
,
4264 /* ID3D10EffectShaderResourceVariable methods */
4265 d3d10_effect_shader_resource_variable_SetResource
,
4266 d3d10_effect_shader_resource_variable_GetResource
,
4267 d3d10_effect_shader_resource_variable_SetResourceArray
,
4268 d3d10_effect_shader_resource_variable_GetResourceArray
,
4271 /* ID3D10EffectVariable methods */
4273 static BOOL STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_IsValid(
4274 ID3D10EffectRenderTargetViewVariable
*iface
)
4276 TRACE("iface %p\n", iface
);
4278 return (struct d3d10_effect_variable
*)iface
!= &null_render_target_view_variable
;
4281 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetType(
4282 ID3D10EffectRenderTargetViewVariable
*iface
)
4284 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
4287 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetDesc(
4288 ID3D10EffectRenderTargetViewVariable
*iface
, D3D10_EFFECT_VARIABLE_DESC
*desc
)
4290 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
4293 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetAnnotationByIndex(
4294 ID3D10EffectRenderTargetViewVariable
*iface
, UINT index
)
4296 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
4299 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetAnnotationByName(
4300 ID3D10EffectRenderTargetViewVariable
*iface
, LPCSTR name
)
4302 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
4305 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetMemberByIndex(
4306 ID3D10EffectRenderTargetViewVariable
*iface
, UINT index
)
4308 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
4311 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetMemberByName(
4312 ID3D10EffectRenderTargetViewVariable
*iface
, LPCSTR name
)
4314 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
4317 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetMemberBySemantic(
4318 ID3D10EffectRenderTargetViewVariable
*iface
, LPCSTR semantic
)
4320 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
4323 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetElement(
4324 ID3D10EffectRenderTargetViewVariable
*iface
, UINT index
)
4326 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
4329 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetParentConstantBuffer(
4330 ID3D10EffectRenderTargetViewVariable
*iface
)
4332 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
4335 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsScalar(
4336 ID3D10EffectRenderTargetViewVariable
*iface
)
4338 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
4341 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsVector(
4342 ID3D10EffectRenderTargetViewVariable
*iface
)
4344 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
4347 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsMatrix(
4348 ID3D10EffectRenderTargetViewVariable
*iface
)
4350 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
4353 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsString(
4354 ID3D10EffectRenderTargetViewVariable
*iface
)
4356 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
4359 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsShaderResource(
4360 ID3D10EffectRenderTargetViewVariable
*iface
)
4362 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
4365 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsRenderTargetView(
4366 ID3D10EffectRenderTargetViewVariable
*iface
)
4368 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
4371 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsDepthStencilView(
4372 ID3D10EffectRenderTargetViewVariable
*iface
)
4374 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
4377 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsConstantBuffer(
4378 ID3D10EffectRenderTargetViewVariable
*iface
)
4380 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
4383 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsShader(
4384 ID3D10EffectRenderTargetViewVariable
*iface
)
4386 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
4389 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsBlend(
4390 ID3D10EffectRenderTargetViewVariable
*iface
)
4392 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
4395 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsDepthStencil(
4396 ID3D10EffectRenderTargetViewVariable
*iface
)
4398 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
4401 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsRasterizer(
4402 ID3D10EffectRenderTargetViewVariable
*iface
)
4404 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
4407 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsSampler(
4408 ID3D10EffectRenderTargetViewVariable
*iface
)
4410 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
4413 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_SetRawValue(
4414 ID3D10EffectRenderTargetViewVariable
*iface
, void *data
, UINT offset
, UINT count
)
4416 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4419 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetRawValue(
4420 ID3D10EffectRenderTargetViewVariable
*iface
, void *data
, UINT offset
, UINT count
)
4422 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4425 /* ID3D10EffectRenderTargetViewVariable methods */
4427 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_SetRenderTarget(
4428 ID3D10EffectRenderTargetViewVariable
*iface
, ID3D10RenderTargetView
*view
)
4430 FIXME("iface %p, view %p stub!\n", iface
, view
);
4435 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetRenderTarget(
4436 ID3D10EffectRenderTargetViewVariable
*iface
, ID3D10RenderTargetView
**view
)
4438 FIXME("iface %p, view %p stub!\n", iface
, view
);
4443 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_SetRenderTargetArray(
4444 ID3D10EffectRenderTargetViewVariable
*iface
, ID3D10RenderTargetView
**views
, UINT offset
, UINT count
)
4446 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface
, views
, offset
, count
);
4451 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetRenderTargetArray(
4452 ID3D10EffectRenderTargetViewVariable
*iface
, ID3D10RenderTargetView
**views
, UINT offset
, UINT count
)
4454 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface
, views
, offset
, count
);
4460 static const struct ID3D10EffectRenderTargetViewVariableVtbl d3d10_effect_render_target_view_variable_vtbl
=
4462 /* ID3D10EffectVariable methods */
4463 d3d10_effect_render_target_view_variable_IsValid
,
4464 d3d10_effect_render_target_view_variable_GetType
,
4465 d3d10_effect_render_target_view_variable_GetDesc
,
4466 d3d10_effect_render_target_view_variable_GetAnnotationByIndex
,
4467 d3d10_effect_render_target_view_variable_GetAnnotationByName
,
4468 d3d10_effect_render_target_view_variable_GetMemberByIndex
,
4469 d3d10_effect_render_target_view_variable_GetMemberByName
,
4470 d3d10_effect_render_target_view_variable_GetMemberBySemantic
,
4471 d3d10_effect_render_target_view_variable_GetElement
,
4472 d3d10_effect_render_target_view_variable_GetParentConstantBuffer
,
4473 d3d10_effect_render_target_view_variable_AsScalar
,
4474 d3d10_effect_render_target_view_variable_AsVector
,
4475 d3d10_effect_render_target_view_variable_AsMatrix
,
4476 d3d10_effect_render_target_view_variable_AsString
,
4477 d3d10_effect_render_target_view_variable_AsShaderResource
,
4478 d3d10_effect_render_target_view_variable_AsRenderTargetView
,
4479 d3d10_effect_render_target_view_variable_AsDepthStencilView
,
4480 d3d10_effect_render_target_view_variable_AsConstantBuffer
,
4481 d3d10_effect_render_target_view_variable_AsShader
,
4482 d3d10_effect_render_target_view_variable_AsBlend
,
4483 d3d10_effect_render_target_view_variable_AsDepthStencil
,
4484 d3d10_effect_render_target_view_variable_AsRasterizer
,
4485 d3d10_effect_render_target_view_variable_AsSampler
,
4486 d3d10_effect_render_target_view_variable_SetRawValue
,
4487 d3d10_effect_render_target_view_variable_GetRawValue
,
4488 /* ID3D10EffectRenderTargetViewVariable methods */
4489 d3d10_effect_render_target_view_variable_SetRenderTarget
,
4490 d3d10_effect_render_target_view_variable_GetRenderTarget
,
4491 d3d10_effect_render_target_view_variable_SetRenderTargetArray
,
4492 d3d10_effect_render_target_view_variable_GetRenderTargetArray
,
4495 /* ID3D10EffectVariable methods */
4497 static BOOL STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_IsValid(
4498 ID3D10EffectDepthStencilViewVariable
*iface
)
4500 TRACE("iface %p\n", iface
);
4502 return (struct d3d10_effect_variable
*)iface
!= &null_depth_stencil_view_variable
;
4505 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetType(
4506 ID3D10EffectDepthStencilViewVariable
*iface
)
4508 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
4511 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetDesc(
4512 ID3D10EffectDepthStencilViewVariable
*iface
, D3D10_EFFECT_VARIABLE_DESC
*desc
)
4514 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
4517 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetAnnotationByIndex(
4518 ID3D10EffectDepthStencilViewVariable
*iface
, UINT index
)
4520 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
4523 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetAnnotationByName(
4524 ID3D10EffectDepthStencilViewVariable
*iface
, LPCSTR name
)
4526 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
4529 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetMemberByIndex(
4530 ID3D10EffectDepthStencilViewVariable
*iface
, UINT index
)
4532 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
4535 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetMemberByName(
4536 ID3D10EffectDepthStencilViewVariable
*iface
, LPCSTR name
)
4538 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
4541 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetMemberBySemantic(
4542 ID3D10EffectDepthStencilViewVariable
*iface
, LPCSTR semantic
)
4544 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
4547 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetElement(
4548 ID3D10EffectDepthStencilViewVariable
*iface
, UINT index
)
4550 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
4553 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetParentConstantBuffer(
4554 ID3D10EffectDepthStencilViewVariable
*iface
)
4556 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
4559 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsScalar(
4560 ID3D10EffectDepthStencilViewVariable
*iface
)
4562 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
4565 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsVector(
4566 ID3D10EffectDepthStencilViewVariable
*iface
)
4568 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
4571 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsMatrix(
4572 ID3D10EffectDepthStencilViewVariable
*iface
)
4574 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
4577 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsString(
4578 ID3D10EffectDepthStencilViewVariable
*iface
)
4580 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
4583 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsShaderResource(
4584 ID3D10EffectDepthStencilViewVariable
*iface
)
4586 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
4589 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsRenderTargetView(
4590 ID3D10EffectDepthStencilViewVariable
*iface
)
4592 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
4595 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsDepthStencilView(
4596 ID3D10EffectDepthStencilViewVariable
*iface
)
4598 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
4601 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsConstantBuffer(
4602 ID3D10EffectDepthStencilViewVariable
*iface
)
4604 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
4607 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsShader(
4608 ID3D10EffectDepthStencilViewVariable
*iface
)
4610 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
4613 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsBlend(
4614 ID3D10EffectDepthStencilViewVariable
*iface
)
4616 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
4619 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsDepthStencil(
4620 ID3D10EffectDepthStencilViewVariable
*iface
)
4622 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
4625 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsRasterizer(
4626 ID3D10EffectDepthStencilViewVariable
*iface
)
4628 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
4631 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsSampler(
4632 ID3D10EffectDepthStencilViewVariable
*iface
)
4634 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
4637 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_SetRawValue(
4638 ID3D10EffectDepthStencilViewVariable
*iface
, void *data
, UINT offset
, UINT count
)
4640 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4643 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetRawValue(
4644 ID3D10EffectDepthStencilViewVariable
*iface
, void *data
, UINT offset
, UINT count
)
4646 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4649 /* ID3D10EffectDepthStencilViewVariable methods */
4651 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_SetDepthStencil(
4652 ID3D10EffectDepthStencilViewVariable
*iface
, ID3D10DepthStencilView
*view
)
4654 FIXME("iface %p, view %p stub!\n", iface
, view
);
4659 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetDepthStencil(
4660 ID3D10EffectDepthStencilViewVariable
*iface
, ID3D10DepthStencilView
**view
)
4662 FIXME("iface %p, view %p stub!\n", iface
, view
);
4667 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_SetDepthStencilArray(
4668 ID3D10EffectDepthStencilViewVariable
*iface
, ID3D10DepthStencilView
**views
, UINT offset
, UINT count
)
4670 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface
, views
, offset
, count
);
4675 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetDepthStencilArray(
4676 ID3D10EffectDepthStencilViewVariable
*iface
, ID3D10DepthStencilView
**views
, UINT offset
, UINT count
)
4678 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface
, views
, offset
, count
);
4684 static const struct ID3D10EffectDepthStencilViewVariableVtbl d3d10_effect_depth_stencil_view_variable_vtbl
=
4686 /* ID3D10EffectVariable methods */
4687 d3d10_effect_depth_stencil_view_variable_IsValid
,
4688 d3d10_effect_depth_stencil_view_variable_GetType
,
4689 d3d10_effect_depth_stencil_view_variable_GetDesc
,
4690 d3d10_effect_depth_stencil_view_variable_GetAnnotationByIndex
,
4691 d3d10_effect_depth_stencil_view_variable_GetAnnotationByName
,
4692 d3d10_effect_depth_stencil_view_variable_GetMemberByIndex
,
4693 d3d10_effect_depth_stencil_view_variable_GetMemberByName
,
4694 d3d10_effect_depth_stencil_view_variable_GetMemberBySemantic
,
4695 d3d10_effect_depth_stencil_view_variable_GetElement
,
4696 d3d10_effect_depth_stencil_view_variable_GetParentConstantBuffer
,
4697 d3d10_effect_depth_stencil_view_variable_AsScalar
,
4698 d3d10_effect_depth_stencil_view_variable_AsVector
,
4699 d3d10_effect_depth_stencil_view_variable_AsMatrix
,
4700 d3d10_effect_depth_stencil_view_variable_AsString
,
4701 d3d10_effect_depth_stencil_view_variable_AsShaderResource
,
4702 d3d10_effect_depth_stencil_view_variable_AsRenderTargetView
,
4703 d3d10_effect_depth_stencil_view_variable_AsDepthStencilView
,
4704 d3d10_effect_depth_stencil_view_variable_AsConstantBuffer
,
4705 d3d10_effect_depth_stencil_view_variable_AsShader
,
4706 d3d10_effect_depth_stencil_view_variable_AsBlend
,
4707 d3d10_effect_depth_stencil_view_variable_AsDepthStencil
,
4708 d3d10_effect_depth_stencil_view_variable_AsRasterizer
,
4709 d3d10_effect_depth_stencil_view_variable_AsSampler
,
4710 d3d10_effect_depth_stencil_view_variable_SetRawValue
,
4711 d3d10_effect_depth_stencil_view_variable_GetRawValue
,
4712 /* ID3D10EffectDepthStencilViewVariable methods */
4713 d3d10_effect_depth_stencil_view_variable_SetDepthStencil
,
4714 d3d10_effect_depth_stencil_view_variable_GetDepthStencil
,
4715 d3d10_effect_depth_stencil_view_variable_SetDepthStencilArray
,
4716 d3d10_effect_depth_stencil_view_variable_GetDepthStencilArray
,
4719 /* ID3D10EffectVariable methods */
4721 static BOOL STDMETHODCALLTYPE
d3d10_effect_shader_variable_IsValid(ID3D10EffectShaderVariable
*iface
)
4723 TRACE("iface %p\n", iface
);
4725 return (struct d3d10_effect_variable
*)iface
!= &null_shader_variable
;
4728 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetType(
4729 ID3D10EffectShaderVariable
*iface
)
4731 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
4734 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetDesc(ID3D10EffectShaderVariable
*iface
,
4735 D3D10_EFFECT_VARIABLE_DESC
*desc
)
4737 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
4740 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetAnnotationByIndex(
4741 ID3D10EffectShaderVariable
*iface
, UINT index
)
4743 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
4746 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetAnnotationByName(
4747 ID3D10EffectShaderVariable
*iface
, LPCSTR name
)
4749 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
4752 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetMemberByIndex(
4753 ID3D10EffectShaderVariable
*iface
, UINT index
)
4755 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
4758 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetMemberByName(
4759 ID3D10EffectShaderVariable
*iface
, LPCSTR name
)
4761 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
4764 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetMemberBySemantic(
4765 ID3D10EffectShaderVariable
*iface
, LPCSTR semantic
)
4767 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
4770 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetElement(
4771 ID3D10EffectShaderVariable
*iface
, UINT index
)
4773 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
4776 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetParentConstantBuffer(
4777 ID3D10EffectShaderVariable
*iface
)
4779 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
4782 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsScalar(
4783 ID3D10EffectShaderVariable
*iface
)
4785 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
4788 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsVector(
4789 ID3D10EffectShaderVariable
*iface
)
4791 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
4794 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsMatrix(
4795 ID3D10EffectShaderVariable
*iface
)
4797 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
4800 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsString(
4801 ID3D10EffectShaderVariable
*iface
)
4803 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
4806 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsShaderResource(
4807 ID3D10EffectShaderVariable
*iface
)
4809 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
4812 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsRenderTargetView(
4813 ID3D10EffectShaderVariable
*iface
)
4815 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
4818 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsDepthStencilView(
4819 ID3D10EffectShaderVariable
*iface
)
4821 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
4824 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsConstantBuffer(
4825 ID3D10EffectShaderVariable
*iface
)
4827 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
4830 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsShader(
4831 ID3D10EffectShaderVariable
*iface
)
4833 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
4836 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsBlend(
4837 ID3D10EffectShaderVariable
*iface
)
4839 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
4842 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsDepthStencil(
4843 ID3D10EffectShaderVariable
*iface
)
4845 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
4848 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsRasterizer(
4849 ID3D10EffectShaderVariable
*iface
)
4851 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
4854 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsSampler(
4855 ID3D10EffectShaderVariable
*iface
)
4857 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
4860 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_SetRawValue(
4861 ID3D10EffectShaderVariable
*iface
, void *data
, UINT offset
, UINT count
)
4863 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4866 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetRawValue(
4867 ID3D10EffectShaderVariable
*iface
, void *data
, UINT offset
, UINT count
)
4869 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4872 /* ID3D10EffectShaderVariable methods */
4874 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetShaderDesc(
4875 ID3D10EffectShaderVariable
*iface
, UINT index
, D3D10_EFFECT_SHADER_DESC
*desc
)
4877 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
4882 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetVertexShader(
4883 ID3D10EffectShaderVariable
*iface
, UINT index
, ID3D10VertexShader
**shader
)
4885 FIXME("iface %p, index %u, shader %p stub!\n", iface
, index
, shader
);
4890 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetGeometryShader(
4891 ID3D10EffectShaderVariable
*iface
, UINT index
, ID3D10GeometryShader
**shader
)
4893 FIXME("iface %p, index %u, shader %p stub!\n", iface
, index
, shader
);
4898 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetPixelShader(
4899 ID3D10EffectShaderVariable
*iface
, UINT index
, ID3D10PixelShader
**shader
)
4901 FIXME("iface %p, index %u, shader %p stub!\n", iface
, index
, shader
);
4906 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetInputSignatureElementDesc(
4907 ID3D10EffectShaderVariable
*iface
, UINT shader_index
, UINT element_index
,
4908 D3D10_SIGNATURE_PARAMETER_DESC
*desc
)
4910 FIXME("iface %p, shader_index %u, element_index %u, desc %p stub!\n",
4911 iface
, shader_index
, element_index
, desc
);
4916 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetOutputSignatureElementDesc(
4917 ID3D10EffectShaderVariable
*iface
, UINT shader_index
, UINT element_index
,
4918 D3D10_SIGNATURE_PARAMETER_DESC
*desc
)
4920 FIXME("iface %p, shader_index %u, element_index %u, desc %p stub!\n",
4921 iface
, shader_index
, element_index
, desc
);
4927 static const struct ID3D10EffectShaderVariableVtbl d3d10_effect_shader_variable_vtbl
=
4929 /* ID3D10EffectVariable methods */
4930 d3d10_effect_shader_variable_IsValid
,
4931 d3d10_effect_shader_variable_GetType
,
4932 d3d10_effect_shader_variable_GetDesc
,
4933 d3d10_effect_shader_variable_GetAnnotationByIndex
,
4934 d3d10_effect_shader_variable_GetAnnotationByName
,
4935 d3d10_effect_shader_variable_GetMemberByIndex
,
4936 d3d10_effect_shader_variable_GetMemberByName
,
4937 d3d10_effect_shader_variable_GetMemberBySemantic
,
4938 d3d10_effect_shader_variable_GetElement
,
4939 d3d10_effect_shader_variable_GetParentConstantBuffer
,
4940 d3d10_effect_shader_variable_AsScalar
,
4941 d3d10_effect_shader_variable_AsVector
,
4942 d3d10_effect_shader_variable_AsMatrix
,
4943 d3d10_effect_shader_variable_AsString
,
4944 d3d10_effect_shader_variable_AsShaderResource
,
4945 d3d10_effect_shader_variable_AsRenderTargetView
,
4946 d3d10_effect_shader_variable_AsDepthStencilView
,
4947 d3d10_effect_shader_variable_AsConstantBuffer
,
4948 d3d10_effect_shader_variable_AsShader
,
4949 d3d10_effect_shader_variable_AsBlend
,
4950 d3d10_effect_shader_variable_AsDepthStencil
,
4951 d3d10_effect_shader_variable_AsRasterizer
,
4952 d3d10_effect_shader_variable_AsSampler
,
4953 d3d10_effect_shader_variable_SetRawValue
,
4954 d3d10_effect_shader_variable_GetRawValue
,
4955 /* ID3D10EffectShaderVariable methods */
4956 d3d10_effect_shader_variable_GetShaderDesc
,
4957 d3d10_effect_shader_variable_GetVertexShader
,
4958 d3d10_effect_shader_variable_GetGeometryShader
,
4959 d3d10_effect_shader_variable_GetPixelShader
,
4960 d3d10_effect_shader_variable_GetInputSignatureElementDesc
,
4961 d3d10_effect_shader_variable_GetOutputSignatureElementDesc
,
4964 /* ID3D10EffectVariable methods */
4966 static BOOL STDMETHODCALLTYPE
d3d10_effect_blend_variable_IsValid(ID3D10EffectBlendVariable
*iface
)
4968 TRACE("iface %p\n", iface
);
4970 return (struct d3d10_effect_variable
*)iface
!= &null_blend_variable
;
4973 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetType(
4974 ID3D10EffectBlendVariable
*iface
)
4976 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
4979 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetDesc(ID3D10EffectBlendVariable
*iface
,
4980 D3D10_EFFECT_VARIABLE_DESC
*desc
)
4982 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
4985 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetAnnotationByIndex(
4986 ID3D10EffectBlendVariable
*iface
, UINT index
)
4988 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
4991 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetAnnotationByName(
4992 ID3D10EffectBlendVariable
*iface
, LPCSTR name
)
4994 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
4997 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetMemberByIndex(
4998 ID3D10EffectBlendVariable
*iface
, UINT index
)
5000 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
5003 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetMemberByName(
5004 ID3D10EffectBlendVariable
*iface
, LPCSTR name
)
5006 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
5009 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetMemberBySemantic(
5010 ID3D10EffectBlendVariable
*iface
, LPCSTR semantic
)
5012 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
5015 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetElement(
5016 ID3D10EffectBlendVariable
*iface
, UINT index
)
5018 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
5021 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetParentConstantBuffer(
5022 ID3D10EffectBlendVariable
*iface
)
5024 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
5027 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsScalar(
5028 ID3D10EffectBlendVariable
*iface
)
5030 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
5033 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsVector(
5034 ID3D10EffectBlendVariable
*iface
)
5036 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
5039 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsMatrix(
5040 ID3D10EffectBlendVariable
*iface
)
5042 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
5045 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsString(
5046 ID3D10EffectBlendVariable
*iface
)
5048 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
5051 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsShaderResource(
5052 ID3D10EffectBlendVariable
*iface
)
5054 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
5057 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsRenderTargetView(
5058 ID3D10EffectBlendVariable
*iface
)
5060 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
5063 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsDepthStencilView(
5064 ID3D10EffectBlendVariable
*iface
)
5066 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
5069 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsConstantBuffer(
5070 ID3D10EffectBlendVariable
*iface
)
5072 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
5075 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsShader(
5076 ID3D10EffectBlendVariable
*iface
)
5078 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
5081 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsBlend(
5082 ID3D10EffectBlendVariable
*iface
)
5084 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
5087 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsDepthStencil(
5088 ID3D10EffectBlendVariable
*iface
)
5090 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
5093 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsRasterizer(
5094 ID3D10EffectBlendVariable
*iface
)
5096 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
5099 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsSampler(
5100 ID3D10EffectBlendVariable
*iface
)
5102 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
5105 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_SetRawValue(ID3D10EffectBlendVariable
*iface
,
5106 void *data
, UINT offset
, UINT count
)
5108 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5111 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetRawValue(ID3D10EffectBlendVariable
*iface
,
5112 void *data
, UINT offset
, UINT count
)
5114 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5117 /* ID3D10EffectBlendVariable methods */
5119 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetBlendState(ID3D10EffectBlendVariable
*iface
,
5120 UINT index
, ID3D10BlendState
**blend_state
)
5122 FIXME("iface %p, index %u, blend_state %p stub!\n", iface
, index
, blend_state
);
5127 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetBackingStore(ID3D10EffectBlendVariable
*iface
,
5128 UINT index
, D3D10_BLEND_DESC
*desc
)
5130 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
5136 static const struct ID3D10EffectBlendVariableVtbl d3d10_effect_blend_variable_vtbl
=
5138 /* ID3D10EffectVariable methods */
5139 d3d10_effect_blend_variable_IsValid
,
5140 d3d10_effect_blend_variable_GetType
,
5141 d3d10_effect_blend_variable_GetDesc
,
5142 d3d10_effect_blend_variable_GetAnnotationByIndex
,
5143 d3d10_effect_blend_variable_GetAnnotationByName
,
5144 d3d10_effect_blend_variable_GetMemberByIndex
,
5145 d3d10_effect_blend_variable_GetMemberByName
,
5146 d3d10_effect_blend_variable_GetMemberBySemantic
,
5147 d3d10_effect_blend_variable_GetElement
,
5148 d3d10_effect_blend_variable_GetParentConstantBuffer
,
5149 d3d10_effect_blend_variable_AsScalar
,
5150 d3d10_effect_blend_variable_AsVector
,
5151 d3d10_effect_blend_variable_AsMatrix
,
5152 d3d10_effect_blend_variable_AsString
,
5153 d3d10_effect_blend_variable_AsShaderResource
,
5154 d3d10_effect_blend_variable_AsRenderTargetView
,
5155 d3d10_effect_blend_variable_AsDepthStencilView
,
5156 d3d10_effect_blend_variable_AsConstantBuffer
,
5157 d3d10_effect_blend_variable_AsShader
,
5158 d3d10_effect_blend_variable_AsBlend
,
5159 d3d10_effect_blend_variable_AsDepthStencil
,
5160 d3d10_effect_blend_variable_AsRasterizer
,
5161 d3d10_effect_blend_variable_AsSampler
,
5162 d3d10_effect_blend_variable_SetRawValue
,
5163 d3d10_effect_blend_variable_GetRawValue
,
5164 /* ID3D10EffectBlendVariable methods */
5165 d3d10_effect_blend_variable_GetBlendState
,
5166 d3d10_effect_blend_variable_GetBackingStore
,
5169 /* ID3D10EffectVariable methods */
5171 static BOOL STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_IsValid(ID3D10EffectDepthStencilVariable
*iface
)
5173 TRACE("iface %p\n", iface
);
5175 return (struct d3d10_effect_variable
*)iface
!= &null_depth_stencil_variable
;
5178 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetType(
5179 ID3D10EffectDepthStencilVariable
*iface
)
5181 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
5184 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetDesc(ID3D10EffectDepthStencilVariable
*iface
,
5185 D3D10_EFFECT_VARIABLE_DESC
*desc
)
5187 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
5190 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetAnnotationByIndex(
5191 ID3D10EffectDepthStencilVariable
*iface
, UINT index
)
5193 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
5196 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetAnnotationByName(
5197 ID3D10EffectDepthStencilVariable
*iface
, LPCSTR name
)
5199 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
5202 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetMemberByIndex(
5203 ID3D10EffectDepthStencilVariable
*iface
, UINT index
)
5205 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
5208 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetMemberByName(
5209 ID3D10EffectDepthStencilVariable
*iface
, LPCSTR name
)
5211 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
5214 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetMemberBySemantic(
5215 ID3D10EffectDepthStencilVariable
*iface
, LPCSTR semantic
)
5217 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
5220 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetElement(
5221 ID3D10EffectDepthStencilVariable
*iface
, UINT index
)
5223 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
5226 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetParentConstantBuffer(
5227 ID3D10EffectDepthStencilVariable
*iface
)
5229 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
5232 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsScalar(
5233 ID3D10EffectDepthStencilVariable
*iface
)
5235 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
5238 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsVector(
5239 ID3D10EffectDepthStencilVariable
*iface
)
5241 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
5244 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsMatrix(
5245 ID3D10EffectDepthStencilVariable
*iface
)
5247 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
5250 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsString(
5251 ID3D10EffectDepthStencilVariable
*iface
)
5253 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
5256 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsShaderResource(
5257 ID3D10EffectDepthStencilVariable
*iface
)
5259 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
5262 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsRenderTargetView(
5263 ID3D10EffectDepthStencilVariable
*iface
)
5265 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
5268 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsDepthStencilView(
5269 ID3D10EffectDepthStencilVariable
*iface
)
5271 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
5274 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsConstantBuffer(
5275 ID3D10EffectDepthStencilVariable
*iface
)
5277 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
5280 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsShader(
5281 ID3D10EffectDepthStencilVariable
*iface
)
5283 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
5286 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsBlend(
5287 ID3D10EffectDepthStencilVariable
*iface
)
5289 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
5292 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsDepthStencil(
5293 ID3D10EffectDepthStencilVariable
*iface
)
5295 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
5298 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsRasterizer(
5299 ID3D10EffectDepthStencilVariable
*iface
)
5301 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
5304 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsSampler(
5305 ID3D10EffectDepthStencilVariable
*iface
)
5307 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
5310 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_SetRawValue(ID3D10EffectDepthStencilVariable
*iface
,
5311 void *data
, UINT offset
, UINT count
)
5313 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5316 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetRawValue(ID3D10EffectDepthStencilVariable
*iface
,
5317 void *data
, UINT offset
, UINT count
)
5319 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5322 /* ID3D10EffectDepthStencilVariable methods */
5324 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetDepthStencilState(ID3D10EffectDepthStencilVariable
*iface
,
5325 UINT index
, ID3D10DepthStencilState
**depth_stencil_state
)
5327 FIXME("iface %p, index %u, depth_stencil_state %p stub!\n", iface
, index
, depth_stencil_state
);
5332 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetBackingStore(ID3D10EffectDepthStencilVariable
*iface
,
5333 UINT index
, D3D10_DEPTH_STENCIL_DESC
*desc
)
5335 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
5341 static const struct ID3D10EffectDepthStencilVariableVtbl d3d10_effect_depth_stencil_variable_vtbl
=
5343 /* ID3D10EffectVariable methods */
5344 d3d10_effect_depth_stencil_variable_IsValid
,
5345 d3d10_effect_depth_stencil_variable_GetType
,
5346 d3d10_effect_depth_stencil_variable_GetDesc
,
5347 d3d10_effect_depth_stencil_variable_GetAnnotationByIndex
,
5348 d3d10_effect_depth_stencil_variable_GetAnnotationByName
,
5349 d3d10_effect_depth_stencil_variable_GetMemberByIndex
,
5350 d3d10_effect_depth_stencil_variable_GetMemberByName
,
5351 d3d10_effect_depth_stencil_variable_GetMemberBySemantic
,
5352 d3d10_effect_depth_stencil_variable_GetElement
,
5353 d3d10_effect_depth_stencil_variable_GetParentConstantBuffer
,
5354 d3d10_effect_depth_stencil_variable_AsScalar
,
5355 d3d10_effect_depth_stencil_variable_AsVector
,
5356 d3d10_effect_depth_stencil_variable_AsMatrix
,
5357 d3d10_effect_depth_stencil_variable_AsString
,
5358 d3d10_effect_depth_stencil_variable_AsShaderResource
,
5359 d3d10_effect_depth_stencil_variable_AsRenderTargetView
,
5360 d3d10_effect_depth_stencil_variable_AsDepthStencilView
,
5361 d3d10_effect_depth_stencil_variable_AsConstantBuffer
,
5362 d3d10_effect_depth_stencil_variable_AsShader
,
5363 d3d10_effect_depth_stencil_variable_AsBlend
,
5364 d3d10_effect_depth_stencil_variable_AsDepthStencil
,
5365 d3d10_effect_depth_stencil_variable_AsRasterizer
,
5366 d3d10_effect_depth_stencil_variable_AsSampler
,
5367 d3d10_effect_depth_stencil_variable_SetRawValue
,
5368 d3d10_effect_depth_stencil_variable_GetRawValue
,
5369 /* ID3D10EffectDepthStencilVariable methods */
5370 d3d10_effect_depth_stencil_variable_GetDepthStencilState
,
5371 d3d10_effect_depth_stencil_variable_GetBackingStore
,
5374 /* ID3D10EffectVariable methods */
5376 static BOOL STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_IsValid(ID3D10EffectRasterizerVariable
*iface
)
5378 TRACE("iface %p\n", iface
);
5380 return (struct d3d10_effect_variable
*)iface
!= &null_rasterizer_variable
;
5383 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetType(
5384 ID3D10EffectRasterizerVariable
*iface
)
5386 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
5389 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetDesc(ID3D10EffectRasterizerVariable
*iface
,
5390 D3D10_EFFECT_VARIABLE_DESC
*desc
)
5392 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
5395 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetAnnotationByIndex(
5396 ID3D10EffectRasterizerVariable
*iface
, UINT index
)
5398 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
5401 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetAnnotationByName(
5402 ID3D10EffectRasterizerVariable
*iface
, LPCSTR name
)
5404 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
5407 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetMemberByIndex(
5408 ID3D10EffectRasterizerVariable
*iface
, UINT index
)
5410 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
5413 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetMemberByName(
5414 ID3D10EffectRasterizerVariable
*iface
, LPCSTR name
)
5416 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
5419 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetMemberBySemantic(
5420 ID3D10EffectRasterizerVariable
*iface
, LPCSTR semantic
)
5422 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
5425 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetElement(
5426 ID3D10EffectRasterizerVariable
*iface
, UINT index
)
5428 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
5431 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetParentConstantBuffer(
5432 ID3D10EffectRasterizerVariable
*iface
)
5434 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
5437 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsScalar(
5438 ID3D10EffectRasterizerVariable
*iface
)
5440 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
5443 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsVector(
5444 ID3D10EffectRasterizerVariable
*iface
)
5446 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
5449 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsMatrix(
5450 ID3D10EffectRasterizerVariable
*iface
)
5452 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
5455 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsString(
5456 ID3D10EffectRasterizerVariable
*iface
)
5458 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
5461 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsShaderResource(
5462 ID3D10EffectRasterizerVariable
*iface
)
5464 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
5467 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsRenderTargetView(
5468 ID3D10EffectRasterizerVariable
*iface
)
5470 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
5473 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsDepthStencilView(
5474 ID3D10EffectRasterizerVariable
*iface
)
5476 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
5479 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsConstantBuffer(
5480 ID3D10EffectRasterizerVariable
*iface
)
5482 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
5485 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsShader(
5486 ID3D10EffectRasterizerVariable
*iface
)
5488 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
5491 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsBlend(
5492 ID3D10EffectRasterizerVariable
*iface
)
5494 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
5497 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsDepthStencil(
5498 ID3D10EffectRasterizerVariable
*iface
)
5500 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
5503 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsRasterizer(
5504 ID3D10EffectRasterizerVariable
*iface
)
5506 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
5509 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsSampler(
5510 ID3D10EffectRasterizerVariable
*iface
)
5512 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
5515 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_SetRawValue(ID3D10EffectRasterizerVariable
*iface
,
5516 void *data
, UINT offset
, UINT count
)
5518 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5521 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetRawValue(ID3D10EffectRasterizerVariable
*iface
,
5522 void *data
, UINT offset
, UINT count
)
5524 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5527 /* ID3D10EffectRasterizerVariable methods */
5529 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetRasterizerState(ID3D10EffectRasterizerVariable
*iface
,
5530 UINT index
, ID3D10RasterizerState
**rasterizer_state
)
5532 FIXME("iface %p, index %u, rasterizer_state %p stub!\n", iface
, index
, rasterizer_state
);
5537 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetBackingStore(ID3D10EffectRasterizerVariable
*iface
,
5538 UINT index
, D3D10_RASTERIZER_DESC
*desc
)
5540 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
5546 static const struct ID3D10EffectRasterizerVariableVtbl d3d10_effect_rasterizer_variable_vtbl
=
5548 /* ID3D10EffectVariable methods */
5549 d3d10_effect_rasterizer_variable_IsValid
,
5550 d3d10_effect_rasterizer_variable_GetType
,
5551 d3d10_effect_rasterizer_variable_GetDesc
,
5552 d3d10_effect_rasterizer_variable_GetAnnotationByIndex
,
5553 d3d10_effect_rasterizer_variable_GetAnnotationByName
,
5554 d3d10_effect_rasterizer_variable_GetMemberByIndex
,
5555 d3d10_effect_rasterizer_variable_GetMemberByName
,
5556 d3d10_effect_rasterizer_variable_GetMemberBySemantic
,
5557 d3d10_effect_rasterizer_variable_GetElement
,
5558 d3d10_effect_rasterizer_variable_GetParentConstantBuffer
,
5559 d3d10_effect_rasterizer_variable_AsScalar
,
5560 d3d10_effect_rasterizer_variable_AsVector
,
5561 d3d10_effect_rasterizer_variable_AsMatrix
,
5562 d3d10_effect_rasterizer_variable_AsString
,
5563 d3d10_effect_rasterizer_variable_AsShaderResource
,
5564 d3d10_effect_rasterizer_variable_AsRenderTargetView
,
5565 d3d10_effect_rasterizer_variable_AsDepthStencilView
,
5566 d3d10_effect_rasterizer_variable_AsConstantBuffer
,
5567 d3d10_effect_rasterizer_variable_AsShader
,
5568 d3d10_effect_rasterizer_variable_AsBlend
,
5569 d3d10_effect_rasterizer_variable_AsDepthStencil
,
5570 d3d10_effect_rasterizer_variable_AsRasterizer
,
5571 d3d10_effect_rasterizer_variable_AsSampler
,
5572 d3d10_effect_rasterizer_variable_SetRawValue
,
5573 d3d10_effect_rasterizer_variable_GetRawValue
,
5574 /* ID3D10EffectRasterizerVariable methods */
5575 d3d10_effect_rasterizer_variable_GetRasterizerState
,
5576 d3d10_effect_rasterizer_variable_GetBackingStore
,
5579 /* ID3D10EffectVariable methods */
5581 static BOOL STDMETHODCALLTYPE
d3d10_effect_sampler_variable_IsValid(ID3D10EffectSamplerVariable
*iface
)
5583 TRACE("iface %p\n", iface
);
5585 return (struct d3d10_effect_variable
*)iface
!= &null_sampler_variable
;
5588 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetType(
5589 ID3D10EffectSamplerVariable
*iface
)
5591 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
5594 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetDesc(ID3D10EffectSamplerVariable
*iface
,
5595 D3D10_EFFECT_VARIABLE_DESC
*desc
)
5597 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
5600 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetAnnotationByIndex(
5601 ID3D10EffectSamplerVariable
*iface
, UINT index
)
5603 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
5606 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetAnnotationByName(
5607 ID3D10EffectSamplerVariable
*iface
, LPCSTR name
)
5609 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
5612 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetMemberByIndex(
5613 ID3D10EffectSamplerVariable
*iface
, UINT index
)
5615 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
5618 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetMemberByName(
5619 ID3D10EffectSamplerVariable
*iface
, LPCSTR name
)
5621 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
5624 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetMemberBySemantic(
5625 ID3D10EffectSamplerVariable
*iface
, LPCSTR semantic
)
5627 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
5630 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetElement(
5631 ID3D10EffectSamplerVariable
*iface
, UINT index
)
5633 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
5636 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetParentConstantBuffer(
5637 ID3D10EffectSamplerVariable
*iface
)
5639 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
5642 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsScalar(
5643 ID3D10EffectSamplerVariable
*iface
)
5645 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
5648 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsVector(
5649 ID3D10EffectSamplerVariable
*iface
)
5651 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
5654 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsMatrix(
5655 ID3D10EffectSamplerVariable
*iface
)
5657 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
5660 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsString(
5661 ID3D10EffectSamplerVariable
*iface
)
5663 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
5666 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsShaderResource(
5667 ID3D10EffectSamplerVariable
*iface
)
5669 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
5672 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsRenderTargetView(
5673 ID3D10EffectSamplerVariable
*iface
)
5675 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
5678 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsDepthStencilView(
5679 ID3D10EffectSamplerVariable
*iface
)
5681 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
5684 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsConstantBuffer(
5685 ID3D10EffectSamplerVariable
*iface
)
5687 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
5690 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsShader(
5691 ID3D10EffectSamplerVariable
*iface
)
5693 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
5696 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsBlend(
5697 ID3D10EffectSamplerVariable
*iface
)
5699 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
5702 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsDepthStencil(
5703 ID3D10EffectSamplerVariable
*iface
)
5705 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
5708 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsRasterizer(
5709 ID3D10EffectSamplerVariable
*iface
)
5711 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
5714 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsSampler(
5715 ID3D10EffectSamplerVariable
*iface
)
5717 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
5720 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_SetRawValue(ID3D10EffectSamplerVariable
*iface
,
5721 void *data
, UINT offset
, UINT count
)
5723 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5726 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetRawValue(ID3D10EffectSamplerVariable
*iface
,
5727 void *data
, UINT offset
, UINT count
)
5729 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5732 /* ID3D10EffectSamplerVariable methods */
5734 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetSampler(ID3D10EffectSamplerVariable
*iface
,
5735 UINT index
, ID3D10SamplerState
**sampler
)
5737 FIXME("iface %p, index %u, sampler %p stub!\n", iface
, index
, sampler
);
5742 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetBackingStore(ID3D10EffectSamplerVariable
*iface
,
5743 UINT index
, D3D10_SAMPLER_DESC
*desc
)
5745 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
5751 static const struct ID3D10EffectSamplerVariableVtbl d3d10_effect_sampler_variable_vtbl
=
5753 /* ID3D10EffectVariable methods */
5754 d3d10_effect_sampler_variable_IsValid
,
5755 d3d10_effect_sampler_variable_GetType
,
5756 d3d10_effect_sampler_variable_GetDesc
,
5757 d3d10_effect_sampler_variable_GetAnnotationByIndex
,
5758 d3d10_effect_sampler_variable_GetAnnotationByName
,
5759 d3d10_effect_sampler_variable_GetMemberByIndex
,
5760 d3d10_effect_sampler_variable_GetMemberByName
,
5761 d3d10_effect_sampler_variable_GetMemberBySemantic
,
5762 d3d10_effect_sampler_variable_GetElement
,
5763 d3d10_effect_sampler_variable_GetParentConstantBuffer
,
5764 d3d10_effect_sampler_variable_AsScalar
,
5765 d3d10_effect_sampler_variable_AsVector
,
5766 d3d10_effect_sampler_variable_AsMatrix
,
5767 d3d10_effect_sampler_variable_AsString
,
5768 d3d10_effect_sampler_variable_AsShaderResource
,
5769 d3d10_effect_sampler_variable_AsRenderTargetView
,
5770 d3d10_effect_sampler_variable_AsDepthStencilView
,
5771 d3d10_effect_sampler_variable_AsConstantBuffer
,
5772 d3d10_effect_sampler_variable_AsShader
,
5773 d3d10_effect_sampler_variable_AsBlend
,
5774 d3d10_effect_sampler_variable_AsDepthStencil
,
5775 d3d10_effect_sampler_variable_AsRasterizer
,
5776 d3d10_effect_sampler_variable_AsSampler
,
5777 d3d10_effect_sampler_variable_SetRawValue
,
5778 d3d10_effect_sampler_variable_GetRawValue
,
5779 /* ID3D10EffectSamplerVariable methods */
5780 d3d10_effect_sampler_variable_GetSampler
,
5781 d3d10_effect_sampler_variable_GetBackingStore
,
5784 /* ID3D10EffectType methods */
5786 static BOOL STDMETHODCALLTYPE
d3d10_effect_type_IsValid(ID3D10EffectType
*iface
)
5788 FIXME("iface %p stub!\n", iface
);
5793 static HRESULT STDMETHODCALLTYPE
d3d10_effect_type_GetDesc(ID3D10EffectType
*iface
, D3D10_EFFECT_TYPE_DESC
*desc
)
5795 struct d3d10_effect_type
*This
= (struct d3d10_effect_type
*)iface
;
5797 TRACE("iface %p, desc %p\n", iface
, desc
);
5799 if (This
== &null_type
)
5801 WARN("Null type specified\n");
5807 WARN("Invalid argument specified\n");
5808 return E_INVALIDARG
;
5811 desc
->TypeName
= This
->name
;
5812 desc
->Class
= This
->type_class
;
5813 desc
->Type
= This
->basetype
;
5814 desc
->Elements
= This
->element_count
;
5815 desc
->Members
= This
->member_count
;
5816 desc
->Rows
= This
->row_count
;
5817 desc
->Columns
= This
->column_count
;
5818 desc
->PackedSize
= This
->size_packed
;
5819 desc
->UnpackedSize
= This
->size_unpacked
;
5820 desc
->Stride
= This
->stride
;
5825 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_type_GetMemberTypeByIndex(ID3D10EffectType
*iface
,
5828 struct d3d10_effect_type
*This
= (struct d3d10_effect_type
*)iface
;
5829 struct d3d10_effect_type
*t
;
5831 TRACE("iface %p, index %u\n", iface
, index
);
5833 if (index
>= This
->member_count
)
5835 WARN("Invalid index specified\n");
5836 return (ID3D10EffectType
*)&null_type
;
5839 t
= (&This
->members
[index
])->type
;
5841 TRACE("Returning member %p, %s\n", t
, debugstr_a(t
->name
));
5843 return (ID3D10EffectType
*)t
;
5846 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_type_GetMemberTypeByName(ID3D10EffectType
*iface
,
5849 struct d3d10_effect_type
*This
= (struct d3d10_effect_type
*)iface
;
5852 TRACE("iface %p, name %s\n", iface
, debugstr_a(name
));
5856 WARN("Invalid name specified\n");
5857 return (ID3D10EffectType
*)&null_type
;
5860 for (i
= 0; i
< This
->member_count
; ++i
)
5862 struct d3d10_effect_type_member
*typem
= &This
->members
[i
];
5866 if (!strcmp(typem
->name
, name
))
5868 TRACE("Returning type %p.\n", typem
->type
);
5869 return (ID3D10EffectType
*)typem
->type
;
5874 WARN("Invalid name specified\n");
5876 return (ID3D10EffectType
*)&null_type
;
5879 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_type_GetMemberTypeBySemantic(ID3D10EffectType
*iface
,
5882 struct d3d10_effect_type
*This
= (struct d3d10_effect_type
*)iface
;
5885 TRACE("iface %p, semantic %s\n", iface
, debugstr_a(semantic
));
5889 WARN("Invalid semantic specified\n");
5890 return (ID3D10EffectType
*)&null_type
;
5893 for (i
= 0; i
< This
->member_count
; ++i
)
5895 struct d3d10_effect_type_member
*typem
= &This
->members
[i
];
5897 if (typem
->semantic
)
5899 if (!strcmp(typem
->semantic
, semantic
))
5901 TRACE("Returning type %p.\n", typem
->type
);
5902 return (ID3D10EffectType
*)typem
->type
;
5907 WARN("Invalid semantic specified\n");
5909 return (ID3D10EffectType
*)&null_type
;
5912 static LPCSTR STDMETHODCALLTYPE
d3d10_effect_type_GetMemberName(ID3D10EffectType
*iface
, UINT index
)
5914 struct d3d10_effect_type
*This
= (struct d3d10_effect_type
*)iface
;
5915 struct d3d10_effect_type_member
*typem
;
5917 TRACE("iface %p, index %u\n", iface
, index
);
5919 if (index
>= This
->member_count
)
5921 WARN("Invalid index specified\n");
5925 typem
= &This
->members
[index
];
5927 TRACE("Returning name %s\n", debugstr_a(typem
->name
));
5932 static LPCSTR STDMETHODCALLTYPE
d3d10_effect_type_GetMemberSemantic(ID3D10EffectType
*iface
, UINT index
)
5934 struct d3d10_effect_type
*This
= (struct d3d10_effect_type
*)iface
;
5935 struct d3d10_effect_type_member
*typem
;
5937 TRACE("iface %p, index %u\n", iface
, index
);
5939 if (index
>= This
->member_count
)
5941 WARN("Invalid index specified\n");
5945 typem
= &This
->members
[index
];
5947 TRACE("Returning semantic %s\n", debugstr_a(typem
->semantic
));
5949 return typem
->semantic
;
5952 static const struct ID3D10EffectTypeVtbl d3d10_effect_type_vtbl
=
5954 /* ID3D10EffectType */
5955 d3d10_effect_type_IsValid
,
5956 d3d10_effect_type_GetDesc
,
5957 d3d10_effect_type_GetMemberTypeByIndex
,
5958 d3d10_effect_type_GetMemberTypeByName
,
5959 d3d10_effect_type_GetMemberTypeBySemantic
,
5960 d3d10_effect_type_GetMemberName
,
5961 d3d10_effect_type_GetMemberSemantic
,