2 * Copyright 2009 Henri Verbeet for CodeWeavers
3 * Copyright 2009 Rico Schüller
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #include "wine/port.h"
24 #include "d3d10_private.h"
26 WINE_DEFAULT_DEBUG_CHANNEL(d3d10
);
28 #define D3D10_FX10_TYPE_COLUMN_SHIFT 11
29 #define D3D10_FX10_TYPE_COLUMN_MASK (0x7 << D3D10_FX10_TYPE_COLUMN_SHIFT)
31 #define D3D10_FX10_TYPE_ROW_SHIFT 8
32 #define D3D10_FX10_TYPE_ROW_MASK (0x7 << D3D10_FX10_TYPE_ROW_SHIFT)
34 #define D3D10_FX10_TYPE_BASETYPE_SHIFT 3
35 #define D3D10_FX10_TYPE_BASETYPE_MASK (0x1f << D3D10_FX10_TYPE_BASETYPE_SHIFT)
37 #define D3D10_FX10_TYPE_CLASS_SHIFT 0
38 #define D3D10_FX10_TYPE_CLASS_MASK (0x7 << D3D10_FX10_TYPE_CLASS_SHIFT)
40 #define D3D10_FX10_TYPE_MATRIX_COLUMN_MAJOR_MASK 0x4000
42 static const struct ID3D10EffectTechniqueVtbl d3d10_effect_technique_vtbl
;
43 static const struct ID3D10EffectPassVtbl d3d10_effect_pass_vtbl
;
44 static const struct ID3D10EffectVariableVtbl d3d10_effect_variable_vtbl
;
45 static const struct ID3D10EffectConstantBufferVtbl d3d10_effect_constant_buffer_vtbl
;
46 static const struct ID3D10EffectScalarVariableVtbl d3d10_effect_scalar_variable_vtbl
;
47 static const struct ID3D10EffectVectorVariableVtbl d3d10_effect_vector_variable_vtbl
;
48 static const struct ID3D10EffectMatrixVariableVtbl d3d10_effect_matrix_variable_vtbl
;
49 static const struct ID3D10EffectStringVariableVtbl d3d10_effect_string_variable_vtbl
;
50 static const struct ID3D10EffectShaderResourceVariableVtbl d3d10_effect_shader_resource_variable_vtbl
;
51 static const struct ID3D10EffectRenderTargetViewVariableVtbl d3d10_effect_render_target_view_variable_vtbl
;
52 static const struct ID3D10EffectDepthStencilViewVariableVtbl d3d10_effect_depth_stencil_view_variable_vtbl
;
53 static const struct ID3D10EffectShaderVariableVtbl d3d10_effect_shader_variable_vtbl
;
54 static const struct ID3D10EffectBlendVariableVtbl d3d10_effect_blend_variable_vtbl
;
55 static const struct ID3D10EffectDepthStencilVariableVtbl d3d10_effect_depth_stencil_variable_vtbl
;
56 static const struct ID3D10EffectRasterizerVariableVtbl d3d10_effect_rasterizer_variable_vtbl
;
57 static const struct ID3D10EffectSamplerVariableVtbl d3d10_effect_sampler_variable_vtbl
;
58 static const struct ID3D10EffectTypeVtbl d3d10_effect_type_vtbl
;
60 /* null objects - needed for invalid calls */
61 static struct d3d10_effect_technique null_technique
= {&d3d10_effect_technique_vtbl
};
62 static struct d3d10_effect_pass null_pass
= {&d3d10_effect_pass_vtbl
};
63 static struct d3d10_effect_type null_type
= {&d3d10_effect_type_vtbl
};
64 static struct d3d10_effect_variable null_local_buffer
= {(const ID3D10EffectVariableVtbl
*)&d3d10_effect_constant_buffer_vtbl
,
65 &null_local_buffer
, &null_type
};
66 static struct d3d10_effect_variable null_variable
= {&d3d10_effect_variable_vtbl
,
67 &null_local_buffer
, &null_type
};
68 static struct d3d10_effect_variable null_scalar_variable
= {(const ID3D10EffectVariableVtbl
*)&d3d10_effect_scalar_variable_vtbl
,
69 &null_local_buffer
, &null_type
};
70 static struct d3d10_effect_variable null_vector_variable
= {(const ID3D10EffectVariableVtbl
*)&d3d10_effect_vector_variable_vtbl
,
71 &null_local_buffer
, &null_type
};
72 static struct d3d10_effect_variable null_matrix_variable
= {(const ID3D10EffectVariableVtbl
*)&d3d10_effect_matrix_variable_vtbl
,
73 &null_local_buffer
, &null_type
};
74 static struct d3d10_effect_variable null_string_variable
= {(const ID3D10EffectVariableVtbl
*)&d3d10_effect_string_variable_vtbl
,
75 &null_local_buffer
, &null_type
};
76 static struct d3d10_effect_variable null_shader_resource_variable
= {(const ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_resource_variable_vtbl
,
77 &null_local_buffer
, &null_type
};
78 static struct d3d10_effect_variable null_render_target_view_variable
= {(const ID3D10EffectVariableVtbl
*)&d3d10_effect_render_target_view_variable_vtbl
,
79 &null_local_buffer
, &null_type
};
80 static struct d3d10_effect_variable null_depth_stencil_view_variable
= {(const ID3D10EffectVariableVtbl
*)&d3d10_effect_depth_stencil_view_variable_vtbl
,
81 &null_local_buffer
, &null_type
};
82 static struct d3d10_effect_variable null_shader_variable
= {(const ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_variable_vtbl
,
83 &null_local_buffer
, &null_type
};
84 static struct d3d10_effect_variable null_blend_variable
= {(const ID3D10EffectVariableVtbl
*)&d3d10_effect_blend_variable_vtbl
,
85 &null_local_buffer
, &null_type
};
86 static struct d3d10_effect_variable null_depth_stencil_variable
= {(const ID3D10EffectVariableVtbl
*)&d3d10_effect_depth_stencil_variable_vtbl
,
87 &null_local_buffer
, &null_type
};
88 static struct d3d10_effect_variable null_rasterizer_variable
= {(const ID3D10EffectVariableVtbl
*)&d3d10_effect_rasterizer_variable_vtbl
,
89 &null_local_buffer
, &null_type
};
90 static struct d3d10_effect_variable null_sampler_variable
= {(const ID3D10EffectVariableVtbl
*)&d3d10_effect_sampler_variable_vtbl
,
91 &null_local_buffer
, &null_type
};
93 /* anonymous_shader_type and anonymous_shader */
94 static char anonymous_name
[] = "$Anonymous";
95 static char anonymous_vertexshader_name
[] = "vertexshader";
96 static char anonymous_pixelshader_name
[] = "pixelshader";
97 static char anonymous_geometryshader_name
[] = "geometryshader";
98 static struct d3d10_effect_type anonymous_vs_type
= {&d3d10_effect_type_vtbl
, anonymous_vertexshader_name
,
99 D3D10_SVT_VERTEXSHADER
, D3D10_SVC_OBJECT
};
100 static struct d3d10_effect_type anonymous_ps_type
= {&d3d10_effect_type_vtbl
, anonymous_pixelshader_name
,
101 D3D10_SVT_PIXELSHADER
, D3D10_SVC_OBJECT
};
102 static struct d3d10_effect_type anonymous_gs_type
= {&d3d10_effect_type_vtbl
, anonymous_geometryshader_name
,
103 D3D10_SVT_GEOMETRYSHADER
, D3D10_SVC_OBJECT
};
104 static struct d3d10_effect_variable anonymous_vs
= {(const ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_variable_vtbl
,
105 &null_local_buffer
, &anonymous_vs_type
, &null_shader_variable
, anonymous_name
};
106 static struct d3d10_effect_variable anonymous_ps
= {(const ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_variable_vtbl
,
107 &null_local_buffer
, &anonymous_ps_type
, &null_shader_variable
, anonymous_name
};
108 static struct d3d10_effect_variable anonymous_gs
= {(const ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_variable_vtbl
,
109 &null_local_buffer
, &anonymous_gs_type
, &null_shader_variable
, anonymous_name
};
111 static struct d3d10_effect_type
*get_fx10_type(struct d3d10_effect
*effect
, const char *data
, DWORD offset
);
113 static BOOL
copy_name(const char *ptr
, char **name
)
117 if (!ptr
) return TRUE
;
119 name_len
= strlen(ptr
) + 1;
125 *name
= HeapAlloc(GetProcessHeap(), 0, name_len
);
128 ERR("Failed to allocate name memory.\n");
132 memcpy(*name
, ptr
, name_len
);
137 static HRESULT
shader_parse_signature(const char *data
, DWORD data_size
, struct d3d10_effect_shader_signature
*s
)
139 D3D10_SIGNATURE_PARAMETER_DESC
*e
;
140 const char *ptr
= data
;
144 read_dword(&ptr
, &count
);
145 TRACE("%u elements\n", count
);
147 skip_dword_unknown(&ptr
, 1);
149 e
= HeapAlloc(GetProcessHeap(), 0, count
* sizeof(*e
));
152 ERR("Failed to allocate signature memory.\n");
153 return E_OUTOFMEMORY
;
156 for (i
= 0; i
< count
; ++i
)
161 read_dword(&ptr
, &name_offset
);
162 e
[i
].SemanticName
= data
+ name_offset
;
163 read_dword(&ptr
, &e
[i
].SemanticIndex
);
164 read_dword(&ptr
, &e
[i
].SystemValueType
);
165 read_dword(&ptr
, &e
[i
].ComponentType
);
166 read_dword(&ptr
, &e
[i
].Register
);
167 read_dword(&ptr
, &mask
);
169 e
[i
].ReadWriteMask
= mask
>> 8;
170 e
[i
].Mask
= mask
& 0xff;
172 TRACE("semantic: %s, semantic idx: %u, sysval_semantic %#x, "
173 "type %u, register idx: %u, use_mask %#x, input_mask %#x\n",
174 debugstr_a(e
[i
].SemanticName
), e
[i
].SemanticIndex
, e
[i
].SystemValueType
,
175 e
[i
].ComponentType
, e
[i
].Register
, e
[i
].Mask
, e
[i
].ReadWriteMask
);
179 s
->element_count
= count
;
184 static void shader_free_signature(struct d3d10_effect_shader_signature
*s
)
186 HeapFree(GetProcessHeap(), 0, s
->signature
);
187 HeapFree(GetProcessHeap(), 0, s
->elements
);
190 static HRESULT
shader_chunk_handler(const char *data
, DWORD data_size
, DWORD tag
, void *ctx
)
192 struct d3d10_effect_shader_variable
*s
= ctx
;
195 TRACE("tag: %s.\n", debugstr_an((const char *)&tag
, 4));
197 TRACE("chunk size: %#x\n", data_size
);
204 /* 32 (DXBC header) + 1 * 4 (chunk index) + 2 * 4 (chunk header) + data_size (chunk data) */
205 UINT size
= 44 + data_size
;
206 struct d3d10_effect_shader_signature
*sig
;
209 if (tag
== TAG_ISGN
) sig
= &s
->input_signature
;
210 else sig
= &s
->output_signature
;
212 sig
->signature
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, size
);
215 ERR("Failed to allocate input signature data\n");
216 return E_OUTOFMEMORY
;
218 sig
->signature_size
= size
;
220 ptr
= sig
->signature
;
222 write_dword(&ptr
, TAG_DXBC
);
225 write_dword_unknown(&ptr
, 0);
226 write_dword_unknown(&ptr
, 0);
227 write_dword_unknown(&ptr
, 0);
228 write_dword_unknown(&ptr
, 0);
230 /* seems to be always 1 */
231 write_dword_unknown(&ptr
, 1);
234 write_dword(&ptr
, size
);
237 write_dword(&ptr
, 1);
240 write_dword(&ptr
, (ptr
- sig
->signature
) + 4);
243 write_dword(&ptr
, tag
);
244 write_dword(&ptr
, data_size
);
245 memcpy(ptr
, data
, data_size
);
247 hr
= shader_parse_signature(ptr
, data_size
, sig
);
250 ERR("Failed to parse shader, hr %#x\n", hr
);
251 shader_free_signature(sig
);
258 FIXME("Unhandled chunk %s.\n", debugstr_an((const char *)&tag
, 4));
265 static HRESULT
parse_shader(struct d3d10_effect_variable
*v
, const char *data
)
267 ID3D10Device
*device
= v
->effect
->device
;
268 struct d3d10_effect_shader_variable
*s
;
269 const char *ptr
= data
;
273 s
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(*s
));
276 ERR("Failed to allocate shader variable memory\n");
277 return E_OUTOFMEMORY
;
282 if (v
->effect
->used_shader_current
>= v
->effect
->used_shader_count
)
284 WARN("Invalid shader? Used shader current(%u) >= used shader count(%u)\n", v
->effect
->used_shader_current
, v
->effect
->used_shader_count
);
288 v
->effect
->used_shaders
[v
->effect
->used_shader_current
] = v
;
289 ++v
->effect
->used_shader_current
;
291 if (!ptr
) return S_OK
;
293 read_dword(&ptr
, &dxbc_size
);
294 TRACE("dxbc size: %#x\n", dxbc_size
);
296 /* We got a shader VertexShader vs = NULL, so it is fine to skip this. */
297 if (!dxbc_size
) return S_OK
;
299 switch (v
->type
->basetype
)
301 case D3D10_SVT_VERTEXSHADER
:
302 hr
= ID3D10Device_CreateVertexShader(device
, ptr
, dxbc_size
, &s
->shader
.vs
);
303 if (FAILED(hr
)) return hr
;
306 case D3D10_SVT_PIXELSHADER
:
307 hr
= ID3D10Device_CreatePixelShader(device
, ptr
, dxbc_size
, &s
->shader
.ps
);
308 if (FAILED(hr
)) return hr
;
311 case D3D10_SVT_GEOMETRYSHADER
:
312 hr
= ID3D10Device_CreateGeometryShader(device
, ptr
, dxbc_size
, &s
->shader
.gs
);
313 if (FAILED(hr
)) return hr
;
317 ERR("This should not happen!\n");
321 return parse_dxbc(ptr
, dxbc_size
, shader_chunk_handler
, s
);
324 static D3D10_SHADER_VARIABLE_CLASS
d3d10_variable_class(DWORD c
, BOOL is_column_major
)
328 case 1: return D3D10_SVC_SCALAR
;
329 case 2: return D3D10_SVC_VECTOR
;
330 case 3: if (is_column_major
) return D3D10_SVC_MATRIX_COLUMNS
;
331 else return D3D10_SVC_MATRIX_ROWS
;
333 FIXME("Unknown variable class %#x.\n", c
);
338 static D3D10_SHADER_VARIABLE_TYPE
d3d10_variable_type(DWORD t
, BOOL is_object
)
344 case 1: return D3D10_SVT_STRING
;
345 case 2: return D3D10_SVT_BLEND
;
346 case 3: return D3D10_SVT_DEPTHSTENCIL
;
347 case 4: return D3D10_SVT_RASTERIZER
;
348 case 5: return D3D10_SVT_PIXELSHADER
;
349 case 6: return D3D10_SVT_VERTEXSHADER
;
350 case 7: return D3D10_SVT_GEOMETRYSHADER
;
352 case 10: return D3D10_SVT_TEXTURE1D
;
353 case 11: return D3D10_SVT_TEXTURE1DARRAY
;
354 case 12: return D3D10_SVT_TEXTURE2D
;
355 case 13: return D3D10_SVT_TEXTURE2DARRAY
;
356 case 14: return D3D10_SVT_TEXTURE2DMS
;
357 case 15: return D3D10_SVT_TEXTURE2DMSARRAY
;
358 case 16: return D3D10_SVT_TEXTURE3D
;
359 case 17: return D3D10_SVT_TEXTURECUBE
;
361 case 19: return D3D10_SVT_RENDERTARGETVIEW
;
362 case 20: return D3D10_SVT_DEPTHSTENCILVIEW
;
363 case 21: return D3D10_SVT_SAMPLER
;
365 FIXME("Unknown variable type %#x.\n", t
);
373 case 1: return D3D10_SVT_FLOAT
;
374 case 2: return D3D10_SVT_INT
;
375 case 3: return D3D10_SVT_UINT
;
376 case 4: return D3D10_SVT_BOOL
;
378 FIXME("Unknown variable type %#x.\n", t
);
384 static HRESULT
parse_fx10_type(struct d3d10_effect_type
*t
, const char *ptr
, const char *data
)
391 read_dword(&ptr
, &offset
);
392 TRACE("Type name at offset %#x.\n", offset
);
394 if (!copy_name(data
+ offset
, &t
->name
))
396 ERR("Failed to copy name.\n");
397 return E_OUTOFMEMORY
;
399 TRACE("Type name: %s.\n", debugstr_a(t
->name
));
401 read_dword(&ptr
, &unknown0
);
402 TRACE("Unknown 0: %u.\n", unknown0
);
404 read_dword(&ptr
, &t
->element_count
);
405 TRACE("Element count: %u.\n", t
->element_count
);
407 read_dword(&ptr
, &t
->size_unpacked
);
408 TRACE("Unpacked size: %#x.\n", t
->size_unpacked
);
410 read_dword(&ptr
, &t
->stride
);
411 TRACE("Stride: %#x.\n", t
->stride
);
413 read_dword(&ptr
, &t
->size_packed
);
414 TRACE("Packed size %#x.\n", t
->size_packed
);
421 read_dword(&ptr
, &typeinfo
);
422 t
->column_count
= (typeinfo
& D3D10_FX10_TYPE_COLUMN_MASK
) >> D3D10_FX10_TYPE_COLUMN_SHIFT
;
423 t
->row_count
= (typeinfo
& D3D10_FX10_TYPE_ROW_MASK
) >> D3D10_FX10_TYPE_ROW_SHIFT
;
424 t
->basetype
= d3d10_variable_type((typeinfo
& D3D10_FX10_TYPE_BASETYPE_MASK
) >> D3D10_FX10_TYPE_BASETYPE_SHIFT
, FALSE
);
425 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
);
427 TRACE("Type description: %#x.\n", typeinfo
);
428 TRACE("\tcolumns: %u.\n", t
->column_count
);
429 TRACE("\trows: %u.\n", t
->row_count
);
430 TRACE("\tbasetype: %s.\n", debug_d3d10_shader_variable_type(t
->basetype
));
431 TRACE("\tclass: %s.\n", debug_d3d10_shader_variable_class(t
->type_class
));
432 TRACE("\tunknown bits: %#x.\n", typeinfo
& ~(D3D10_FX10_TYPE_COLUMN_MASK
| D3D10_FX10_TYPE_ROW_MASK
433 | D3D10_FX10_TYPE_BASETYPE_MASK
| D3D10_FX10_TYPE_CLASS_MASK
| D3D10_FX10_TYPE_MATRIX_COLUMN_MAJOR_MASK
));
437 TRACE("Type is an object.\n");
442 t
->type_class
= D3D10_SVC_OBJECT
;
444 read_dword(&ptr
, &typeinfo
);
445 t
->basetype
= d3d10_variable_type(typeinfo
, TRUE
);
447 TRACE("Type description: %#x.\n", typeinfo
);
448 TRACE("\tbasetype: %s.\n", debug_d3d10_shader_variable_type(t
->basetype
));
449 TRACE("\tclass: %s.\n", debug_d3d10_shader_variable_class(t
->type_class
));
453 TRACE("Type is a structure.\n");
455 read_dword(&ptr
, &t
->member_count
);
456 TRACE("Member count: %u.\n", t
->member_count
);
461 t
->type_class
= D3D10_SVC_STRUCT
;
463 t
->members
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, t
->member_count
* sizeof(*t
->members
));
466 ERR("Failed to allocate members memory.\n");
467 return E_OUTOFMEMORY
;
470 for (i
= 0; i
< t
->member_count
; ++i
)
472 struct d3d10_effect_type_member
*typem
= &t
->members
[i
];
474 read_dword(&ptr
, &offset
);
475 TRACE("Member name at offset %#x.\n", offset
);
477 if (!copy_name(data
+ offset
, &typem
->name
))
479 ERR("Failed to copy name.\n");
480 return E_OUTOFMEMORY
;
482 TRACE("Member name: %s.\n", debugstr_a(typem
->name
));
484 read_dword(&ptr
, &offset
);
485 TRACE("Member semantic at offset %#x.\n", offset
);
487 if (!copy_name(data
+ offset
, &typem
->semantic
))
489 ERR("Failed to copy semantic.\n");
490 return E_OUTOFMEMORY
;
492 TRACE("Member semantic: %s.\n", debugstr_a(typem
->semantic
));
494 read_dword(&ptr
, &typem
->buffer_offset
);
495 TRACE("Member offset in struct: %#x.\n", typem
->buffer_offset
);
497 read_dword(&ptr
, &offset
);
498 TRACE("Member type info at offset %#x.\n", offset
);
500 typem
->type
= get_fx10_type(t
->effect
, data
, offset
);
503 ERR("Failed to get variable type.\n");
510 FIXME("Unhandled case %#x.\n", unknown0
);
514 if (t
->element_count
)
516 TRACE("Elementtype for type at offset: %#x\n", t
->id
);
518 /* allocate elementtype - we need only one, because all elements have the same type */
519 t
->elementtype
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(*t
->elementtype
));
522 ERR("Failed to allocate members memory.\n");
523 return E_OUTOFMEMORY
;
526 /* create a copy of the original type with some minor changes */
527 t
->elementtype
->vtbl
= &d3d10_effect_type_vtbl
;
528 t
->elementtype
->effect
= t
->effect
;
530 if (!copy_name(t
->name
, &t
->elementtype
->name
))
532 ERR("Failed to copy name.\n");
533 return E_OUTOFMEMORY
;
535 TRACE("\tType name: %s.\n", debugstr_a(t
->elementtype
->name
));
537 t
->elementtype
->element_count
= 0;
538 TRACE("\tElement count: %u.\n", t
->elementtype
->element_count
);
541 * Not sure if this calculation is 100% correct, but a test
542 * show's that these values work.
544 t
->elementtype
->size_unpacked
= t
->size_packed
/ t
->element_count
;
545 TRACE("\tUnpacked size: %#x.\n", t
->elementtype
->size_unpacked
);
547 t
->elementtype
->stride
= t
->stride
;
548 TRACE("\tStride: %#x.\n", t
->elementtype
->stride
);
550 t
->elementtype
->size_packed
= t
->size_packed
/ t
->element_count
;
551 TRACE("\tPacked size: %#x.\n", t
->elementtype
->size_packed
);
553 t
->elementtype
->member_count
= t
->member_count
;
554 TRACE("\tMember count: %u.\n", t
->elementtype
->member_count
);
556 t
->elementtype
->column_count
= t
->column_count
;
557 TRACE("\tColumns: %u.\n", t
->elementtype
->column_count
);
559 t
->elementtype
->row_count
= t
->row_count
;
560 TRACE("\tRows: %u.\n", t
->elementtype
->row_count
);
562 t
->elementtype
->basetype
= t
->basetype
;
563 TRACE("\tBasetype: %s.\n", debug_d3d10_shader_variable_type(t
->elementtype
->basetype
));
565 t
->elementtype
->type_class
= t
->type_class
;
566 TRACE("\tClass: %s.\n", debug_d3d10_shader_variable_class(t
->elementtype
->type_class
));
568 t
->elementtype
->members
= t
->members
;
574 static struct d3d10_effect_type
*get_fx10_type(struct d3d10_effect
*effect
, const char *data
, DWORD offset
)
576 struct d3d10_effect_type
*type
;
577 struct wine_rb_entry
*entry
;
580 entry
= wine_rb_get(&effect
->types
, &offset
);
583 TRACE("Returning existing type.\n");
584 return WINE_RB_ENTRY_VALUE(entry
, struct d3d10_effect_type
, entry
);
587 type
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(*type
));
590 ERR("Failed to allocate type memory.\n");
594 type
->vtbl
= &d3d10_effect_type_vtbl
;
596 type
->effect
= effect
;
597 hr
= parse_fx10_type(type
, data
+ offset
, data
);
600 ERR("Failed to parse type info, hr %#x.\n", hr
);
601 HeapFree(GetProcessHeap(), 0, type
);
605 if (wine_rb_put(&effect
->types
, &offset
, &type
->entry
) == -1)
607 ERR("Failed to insert type entry.\n");
608 HeapFree(GetProcessHeap(), 0, type
);
615 static void set_variable_vtbl(struct d3d10_effect_variable
*v
)
617 switch (v
->type
->type_class
)
619 case D3D10_SVC_SCALAR
:
620 v
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_scalar_variable_vtbl
;
623 case D3D10_SVC_VECTOR
:
624 v
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_vector_variable_vtbl
;
627 case D3D10_SVC_MATRIX_ROWS
:
628 case D3D10_SVC_MATRIX_COLUMNS
:
629 v
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_matrix_variable_vtbl
;
632 case D3D10_SVC_STRUCT
:
633 v
->vtbl
= &d3d10_effect_variable_vtbl
;
636 case D3D10_SVC_OBJECT
:
637 switch(v
->type
->basetype
)
639 case D3D10_SVT_STRING
:
640 v
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_string_variable_vtbl
;
643 case D3D10_SVT_TEXTURE1D
:
644 case D3D10_SVT_TEXTURE1DARRAY
:
645 case D3D10_SVT_TEXTURE2D
:
646 case D3D10_SVT_TEXTURE2DARRAY
:
647 case D3D10_SVT_TEXTURE2DMS
:
648 case D3D10_SVT_TEXTURE2DMSARRAY
:
649 case D3D10_SVT_TEXTURE3D
:
650 case D3D10_SVT_TEXTURECUBE
:
651 v
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_resource_variable_vtbl
;
654 case D3D10_SVT_RENDERTARGETVIEW
:
655 v
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_render_target_view_variable_vtbl
;
658 case D3D10_SVT_DEPTHSTENCILVIEW
:
659 v
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_depth_stencil_view_variable_vtbl
;
662 case D3D10_SVT_DEPTHSTENCIL
:
663 v
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_depth_stencil_variable_vtbl
;
666 case D3D10_SVT_VERTEXSHADER
:
667 case D3D10_SVT_GEOMETRYSHADER
:
668 case D3D10_SVT_PIXELSHADER
:
669 v
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_variable_vtbl
;
672 case D3D10_SVT_BLEND
:
673 v
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_blend_variable_vtbl
;
676 case D3D10_SVT_RASTERIZER
:
677 v
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_rasterizer_variable_vtbl
;
680 case D3D10_SVT_SAMPLER
:
681 v
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_sampler_variable_vtbl
;
685 FIXME("Unhandled basetype %s.\n", debug_d3d10_shader_variable_type(v
->type
->basetype
));
686 v
->vtbl
= &d3d10_effect_variable_vtbl
;
692 FIXME("Unhandled type class %s.\n", debug_d3d10_shader_variable_class(v
->type
->type_class
));
693 v
->vtbl
= &d3d10_effect_variable_vtbl
;
698 static HRESULT
copy_variableinfo_from_type(struct d3d10_effect_variable
*v
)
703 if (v
->type
->member_count
)
705 v
->members
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, v
->type
->member_count
* sizeof(*v
->members
));
708 ERR("Failed to allocate members memory.\n");
709 return E_OUTOFMEMORY
;
712 for (i
= 0; i
< v
->type
->member_count
; ++i
)
714 struct d3d10_effect_variable
*var
= &v
->members
[i
];
715 struct d3d10_effect_type_member
*typem
= &v
->type
->members
[i
];
717 var
->buffer
= v
->buffer
;
718 var
->effect
= v
->effect
;
719 var
->type
= typem
->type
;
720 set_variable_vtbl(var
);
722 if (!copy_name(typem
->name
, &var
->name
))
724 ERR("Failed to copy name.\n");
725 return E_OUTOFMEMORY
;
727 TRACE("Variable name: %s.\n", debugstr_a(var
->name
));
729 if (!copy_name(typem
->semantic
, &var
->semantic
))
731 ERR("Failed to copy name.\n");
732 return E_OUTOFMEMORY
;
734 TRACE("Variable semantic: %s.\n", debugstr_a(var
->semantic
));
736 var
->buffer_offset
= v
->buffer_offset
+ typem
->buffer_offset
;
737 TRACE("Variable buffer offset: %u.\n", var
->buffer_offset
);
739 hr
= copy_variableinfo_from_type(var
);
740 if (FAILED(hr
)) return hr
;
744 if (v
->type
->element_count
)
746 unsigned int bufferoffset
= v
->buffer_offset
;
748 v
->elements
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, v
->type
->element_count
* sizeof(*v
->elements
));
751 ERR("Failed to allocate elements memory.\n");
752 return E_OUTOFMEMORY
;
755 for (i
= 0; i
< v
->type
->element_count
; ++i
)
757 struct d3d10_effect_variable
*var
= &v
->elements
[i
];
759 var
->buffer
= v
->buffer
;
760 var
->effect
= v
->effect
;
761 var
->type
= v
->type
->elementtype
;
762 set_variable_vtbl(var
);
764 if (!copy_name(v
->name
, &var
->name
))
766 ERR("Failed to copy name.\n");
767 return E_OUTOFMEMORY
;
769 TRACE("Variable name: %s.\n", debugstr_a(var
->name
));
771 if (!copy_name(v
->semantic
, &var
->semantic
))
773 ERR("Failed to copy name.\n");
774 return E_OUTOFMEMORY
;
776 TRACE("Variable semantic: %s.\n", debugstr_a(var
->semantic
));
780 bufferoffset
+= v
->type
->stride
;
782 var
->buffer_offset
= bufferoffset
;
783 TRACE("Variable buffer offset: %u.\n", var
->buffer_offset
);
785 hr
= copy_variableinfo_from_type(var
);
786 if (FAILED(hr
)) return hr
;
793 static HRESULT
parse_fx10_variable_head(struct d3d10_effect_variable
*v
, const char **ptr
, const char *data
)
797 read_dword(ptr
, &offset
);
798 TRACE("Variable name at offset %#x.\n", offset
);
800 if (!copy_name(data
+ offset
, &v
->name
))
802 ERR("Failed to copy name.\n");
803 return E_OUTOFMEMORY
;
805 TRACE("Variable name: %s.\n", debugstr_a(v
->name
));
807 read_dword(ptr
, &offset
);
808 TRACE("Variable type info at offset %#x.\n", offset
);
810 v
->type
= get_fx10_type(v
->effect
, data
, offset
);
813 ERR("Failed to get variable type.\n");
816 set_variable_vtbl(v
);
818 return copy_variableinfo_from_type(v
);
821 static HRESULT
parse_fx10_annotation(struct d3d10_effect_variable
*a
, const char **ptr
, const char *data
)
825 hr
= parse_fx10_variable_head(a
, ptr
, data
);
826 if (FAILED(hr
)) return hr
;
828 skip_dword_unknown(ptr
, 1);
830 /* mark the variable as annotation */
831 a
->flag
= D3D10_EFFECT_VARIABLE_ANNOTATION
;
836 static HRESULT
parse_fx10_anonymous_shader(struct d3d10_effect
*e
, struct d3d10_effect_anonymous_shader
*s
,
837 enum d3d10_effect_object_type otype
)
839 struct d3d10_effect_variable
*v
= &s
->shader
;
840 struct d3d10_effect_type
*t
= &s
->type
;
841 const char *shader
= NULL
;
845 case D3D10_EOT_VERTEXSHADER
:
846 shader
= "vertexshader";
847 t
->basetype
= D3D10_SVT_VERTEXSHADER
;
850 case D3D10_EOT_PIXELSHADER
:
851 shader
= "pixelshader";
852 t
->basetype
= D3D10_SVT_PIXELSHADER
;
855 case D3D10_EOT_GEOMETRYSHADER
:
856 shader
= "geometryshader";
857 t
->basetype
= D3D10_SVT_GEOMETRYSHADER
;
861 if (!copy_name(shader
, &t
->name
))
863 ERR("Failed to copy name.\n");
864 return E_OUTOFMEMORY
;
866 TRACE("Type name: %s.\n", debugstr_a(t
->name
));
868 t
->type_class
= D3D10_SVC_OBJECT
;
870 t
->vtbl
= &d3d10_effect_type_vtbl
;
874 set_variable_vtbl(v
);
876 if (!copy_name("$Anonymous", &v
->name
))
878 ERR("Failed to copy semantic.\n");
879 return E_OUTOFMEMORY
;
881 TRACE("Variable name: %s.\n", debugstr_a(v
->name
));
883 if (!copy_name(NULL
, &v
->semantic
))
885 ERR("Failed to copy semantic.\n");
886 return E_OUTOFMEMORY
;
888 TRACE("Variable semantic: %s.\n", debugstr_a(v
->semantic
));
893 static HRESULT
parse_fx10_object(struct d3d10_effect_object
*o
, const char **ptr
, const char *data
)
895 const char *data_ptr
= NULL
;
897 enum d3d10_effect_object_operation operation
;
899 struct d3d10_effect
*effect
= o
->pass
->technique
->effect
;
900 ID3D10Effect
*e
= (ID3D10Effect
*)effect
;
902 read_dword(ptr
, &o
->type
);
903 TRACE("Effect object is of type %#x.\n", o
->type
);
905 read_dword(ptr
, &o
->index
);
906 TRACE("Effect object index %#x.\n", o
->index
);
908 read_dword(ptr
, &operation
);
909 TRACE("Effect object operation %#x.\n", operation
);
911 read_dword(ptr
, &offset
);
912 TRACE("Effect object idx is at offset %#x.\n", offset
);
916 case D3D10_EOO_VALUE
:
917 TRACE("Copy variable values\n");
921 case D3D10_EOT_VERTEXSHADER
:
922 TRACE("Vertex shader\n");
923 o
->data
= &anonymous_vs
;
927 case D3D10_EOT_PIXELSHADER
:
928 TRACE("Pixel shader\n");
929 o
->data
= &anonymous_ps
;
933 case D3D10_EOT_GEOMETRYSHADER
:
934 TRACE("Geometry shader\n");
935 o
->data
= &anonymous_gs
;
940 FIXME("Unhandled object type %#x\n", o
->type
);
946 case D3D10_EOO_PARSED_OBJECT
:
947 /* This is a local object, we've parsed in parse_fx10_local_object. */
948 TRACE("Shader = %s.\n", data
+ offset
);
950 o
->data
= e
->lpVtbl
->GetVariableByName(e
, data
+ offset
);
954 case D3D10_EOO_PARSED_OBJECT_INDEX
:
955 /* This is a local object, we've parsed in parse_fx10_local_object, which has an array index. */
956 data_ptr
= data
+ offset
;
957 read_dword(&data_ptr
, &offset
);
958 read_dword(&data_ptr
, &o
->index
);
959 TRACE("Shader = %s[%u].\n", data
+ offset
, o
->index
);
961 o
->data
= e
->lpVtbl
->GetVariableByName(e
, data
+ offset
);
965 case D3D10_EOO_ANONYMOUS_SHADER
:
966 TRACE("Anonymous shader\n");
968 /* check anonymous_shader_current for validity */
969 if (effect
->anonymous_shader_current
>= effect
->anonymous_shader_count
)
971 ERR("Anonymous shader count is wrong!\n");
975 data_ptr
= data
+ offset
;
976 read_dword(&data_ptr
, &offset
);
977 TRACE("Effect object starts at offset %#x.\n", offset
);
979 data_ptr
= data
+ offset
;
981 hr
= parse_fx10_anonymous_shader(effect
, &effect
->anonymous_shaders
[effect
->anonymous_shader_current
], o
->type
);
982 if (FAILED(hr
)) return hr
;
984 o
->data
= &effect
->anonymous_shaders
[effect
->anonymous_shader_current
].shader
;
985 ++effect
->anonymous_shader_current
;
989 case D3D10_EOT_VERTEXSHADER
:
990 TRACE("Vertex shader\n");
991 hr
= parse_shader(o
->data
, data_ptr
);
994 case D3D10_EOT_PIXELSHADER
:
995 TRACE("Pixel shader\n");
996 hr
= parse_shader(o
->data
, data_ptr
);
999 case D3D10_EOT_GEOMETRYSHADER
:
1000 TRACE("Geometry shader\n");
1001 hr
= parse_shader(o
->data
, data_ptr
);
1005 FIXME("Unhandled object type %#x\n", o
->type
);
1013 FIXME("Unhandled operation %#x.\n", operation
);
1020 static HRESULT
parse_fx10_pass(struct d3d10_effect_pass
*p
, const char **ptr
, const char *data
)
1026 read_dword(ptr
, &offset
);
1027 TRACE("Pass name at offset %#x.\n", offset
);
1029 if (!copy_name(data
+ offset
, &p
->name
))
1031 ERR("Failed to copy name.\n");
1032 return E_OUTOFMEMORY
;
1034 TRACE("Pass name: %s.\n", debugstr_a(p
->name
));
1036 read_dword(ptr
, &p
->object_count
);
1037 TRACE("Pass has %u effect objects.\n", p
->object_count
);
1039 read_dword(ptr
, &p
->annotation_count
);
1040 TRACE("Pass has %u annotations.\n", p
->annotation_count
);
1042 p
->annotations
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, p
->annotation_count
* sizeof(*p
->annotations
));
1043 if (!p
->annotations
)
1045 ERR("Failed to allocate pass annotations memory.\n");
1046 return E_OUTOFMEMORY
;
1049 for (i
= 0; i
< p
->annotation_count
; ++i
)
1051 struct d3d10_effect_variable
*a
= &p
->annotations
[i
];
1053 a
->effect
= p
->technique
->effect
;
1054 a
->buffer
= &null_local_buffer
;
1056 hr
= parse_fx10_annotation(a
, ptr
, data
);
1057 if (FAILED(hr
)) return hr
;
1060 p
->objects
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, p
->object_count
* sizeof(*p
->objects
));
1063 ERR("Failed to allocate effect objects memory.\n");
1064 return E_OUTOFMEMORY
;
1067 for (i
= 0; i
< p
->object_count
; ++i
)
1069 struct d3d10_effect_object
*o
= &p
->objects
[i
];
1073 hr
= parse_fx10_object(o
, ptr
, data
);
1074 if (FAILED(hr
)) return hr
;
1080 static HRESULT
parse_fx10_technique(struct d3d10_effect_technique
*t
, const char **ptr
, const char *data
)
1086 read_dword(ptr
, &offset
);
1087 TRACE("Technique name at offset %#x.\n", offset
);
1089 if (!copy_name(data
+ offset
, &t
->name
))
1091 ERR("Failed to copy name.\n");
1092 return E_OUTOFMEMORY
;
1094 TRACE("Technique name: %s.\n", debugstr_a(t
->name
));
1096 read_dword(ptr
, &t
->pass_count
);
1097 TRACE("Technique has %u passes\n", t
->pass_count
);
1099 read_dword(ptr
, &t
->annotation_count
);
1100 TRACE("Technique has %u annotations.\n", t
->annotation_count
);
1102 t
->annotations
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, t
->annotation_count
* sizeof(*t
->annotations
));
1103 if (!t
->annotations
)
1105 ERR("Failed to allocate technique annotations memory.\n");
1106 return E_OUTOFMEMORY
;
1109 for (i
= 0; i
< t
->annotation_count
; ++i
)
1111 struct d3d10_effect_variable
*a
= &t
->annotations
[i
];
1113 a
->effect
= t
->effect
;
1114 a
->buffer
= &null_local_buffer
;
1116 hr
= parse_fx10_annotation(a
, ptr
, data
);
1117 if (FAILED(hr
)) return hr
;
1120 t
->passes
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, t
->pass_count
* sizeof(*t
->passes
));
1123 ERR("Failed to allocate passes memory\n");
1124 return E_OUTOFMEMORY
;
1127 for (i
= 0; i
< t
->pass_count
; ++i
)
1129 struct d3d10_effect_pass
*p
= &t
->passes
[i
];
1131 p
->vtbl
= &d3d10_effect_pass_vtbl
;
1134 hr
= parse_fx10_pass(p
, ptr
, data
);
1135 if (FAILED(hr
)) return hr
;
1141 static HRESULT
parse_fx10_variable(struct d3d10_effect_variable
*v
, const char **ptr
, const char *data
)
1147 hr
= parse_fx10_variable_head(v
, ptr
, data
);
1148 if (FAILED(hr
)) return hr
;
1150 read_dword(ptr
, &offset
);
1151 TRACE("Variable semantic at offset %#x.\n", offset
);
1153 if (!copy_name(data
+ offset
, &v
->semantic
))
1155 ERR("Failed to copy semantic.\n");
1156 return E_OUTOFMEMORY
;
1158 TRACE("Variable semantic: %s.\n", debugstr_a(v
->semantic
));
1160 read_dword(ptr
, &v
->buffer_offset
);
1161 TRACE("Variable offset in buffer: %#x.\n", v
->buffer_offset
);
1163 skip_dword_unknown(ptr
, 1);
1165 read_dword(ptr
, &v
->flag
);
1166 TRACE("Variable flag: %#x.\n", v
->flag
);
1168 read_dword(ptr
, &v
->annotation_count
);
1169 TRACE("Variable has %u annotations.\n", v
->annotation_count
);
1171 v
->annotations
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, v
->annotation_count
* sizeof(*v
->annotations
));
1172 if (!v
->annotations
)
1174 ERR("Failed to allocate variable annotations memory.\n");
1175 return E_OUTOFMEMORY
;
1178 for (i
= 0; i
< v
->annotation_count
; ++i
)
1180 struct d3d10_effect_variable
*a
= &v
->annotations
[i
];
1182 a
->effect
= v
->effect
;
1183 a
->buffer
= &null_local_buffer
;
1185 hr
= parse_fx10_annotation(a
, ptr
, data
);
1186 if (FAILED(hr
)) return hr
;
1192 static HRESULT
parse_fx10_local_variable(struct d3d10_effect_variable
*v
, const char **ptr
, const char *data
)
1198 hr
= parse_fx10_variable_head(v
, ptr
, data
);
1199 if (FAILED(hr
)) return hr
;
1201 read_dword(ptr
, &offset
);
1202 TRACE("Variable semantic at offset %#x.\n", offset
);
1204 if (!copy_name(data
+ offset
, &v
->semantic
))
1206 ERR("Failed to copy semantic.\n");
1207 return E_OUTOFMEMORY
;
1209 TRACE("Variable semantic: %s.\n", debugstr_a(v
->semantic
));
1211 skip_dword_unknown(ptr
, 1);
1213 switch (v
->type
->basetype
)
1215 case D3D10_SVT_TEXTURE1D
:
1216 case D3D10_SVT_TEXTURE1DARRAY
:
1217 case D3D10_SVT_TEXTURE2D
:
1218 case D3D10_SVT_TEXTURE2DARRAY
:
1219 case D3D10_SVT_TEXTURE2DMS
:
1220 case D3D10_SVT_TEXTURE2DMSARRAY
:
1221 case D3D10_SVT_TEXTURE3D
:
1222 case D3D10_SVT_TEXTURECUBE
:
1223 case D3D10_SVT_RENDERTARGETVIEW
:
1224 case D3D10_SVT_DEPTHSTENCILVIEW
:
1225 TRACE("SVT could not have elements.\n");
1228 case D3D10_SVT_VERTEXSHADER
:
1229 case D3D10_SVT_PIXELSHADER
:
1230 case D3D10_SVT_GEOMETRYSHADER
:
1231 TRACE("Shader type is %s\n", debug_d3d10_shader_variable_type(v
->type
->basetype
));
1232 for (i
= 0; i
< max(v
->type
->element_count
, 1); ++i
)
1234 DWORD shader_offset
;
1235 struct d3d10_effect_variable
*var
;
1237 if (!v
->type
->element_count
)
1243 var
= &v
->elements
[i
];
1246 read_dword(ptr
, &shader_offset
);
1247 TRACE("Shader offset: %#x.\n", shader_offset
);
1249 hr
= parse_shader(var
, data
+ shader_offset
);
1250 if (FAILED(hr
)) return hr
;
1254 case D3D10_SVT_DEPTHSTENCIL
:
1255 case D3D10_SVT_BLEND
:
1256 case D3D10_SVT_RASTERIZER
:
1257 case D3D10_SVT_SAMPLER
:
1258 TRACE("SVT is a state.\n");
1259 for (i
= 0; i
< max(v
->type
->element_count
, 1); ++i
)
1264 read_dword(ptr
, &object_count
);
1265 TRACE("Object count: %#x.\n", object_count
);
1267 for (j
= 0; j
< object_count
; ++j
)
1269 skip_dword_unknown(ptr
, 4);
1275 FIXME("Unhandled case %s.\n", debug_d3d10_shader_variable_type(v
->type
->basetype
));
1279 read_dword(ptr
, &v
->annotation_count
);
1280 TRACE("Variable has %u annotations.\n", v
->annotation_count
);
1282 v
->annotations
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, v
->annotation_count
* sizeof(*v
->annotations
));
1283 if (!v
->annotations
)
1285 ERR("Failed to allocate variable annotations memory.\n");
1286 return E_OUTOFMEMORY
;
1289 for (i
= 0; i
< v
->annotation_count
; ++i
)
1291 struct d3d10_effect_variable
*a
= &v
->annotations
[i
];
1293 a
->effect
= v
->effect
;
1294 a
->buffer
= &null_local_buffer
;
1296 hr
= parse_fx10_annotation(a
, ptr
, data
);
1297 if (FAILED(hr
)) return hr
;
1303 static HRESULT
parse_fx10_local_buffer(struct d3d10_effect_variable
*l
, const char **ptr
, const char *data
)
1307 D3D10_CBUFFER_TYPE d3d10_cbuffer_type
;
1309 unsigned int stride
= 0;
1311 /* Generate our own type, it isn't in the fx blob. */
1312 l
->type
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(*l
->type
));
1315 ERR("Failed to allocate local buffer type memory.\n");
1316 return E_OUTOFMEMORY
;
1318 l
->type
->vtbl
= &d3d10_effect_type_vtbl
;
1319 l
->type
->type_class
= D3D10_SVC_OBJECT
;
1320 l
->type
->effect
= l
->effect
;
1322 read_dword(ptr
, &offset
);
1323 TRACE("Local buffer name at offset %#x.\n", offset
);
1325 if (!copy_name(data
+ offset
, &l
->name
))
1327 ERR("Failed to copy name.\n");
1328 return E_OUTOFMEMORY
;
1330 TRACE("Local buffer name: %s.\n", debugstr_a(l
->name
));
1332 read_dword(ptr
, &l
->data_size
);
1333 TRACE("Local buffer data size: %#x.\n", l
->data_size
);
1335 read_dword(ptr
, &d3d10_cbuffer_type
);
1336 TRACE("Local buffer type: %#x.\n", d3d10_cbuffer_type
);
1338 switch(d3d10_cbuffer_type
)
1340 case D3D10_CT_CBUFFER
:
1341 l
->type
->basetype
= D3D10_SVT_CBUFFER
;
1342 if (!copy_name("cbuffer", &l
->type
->name
))
1344 ERR("Failed to copy name.\n");
1345 return E_OUTOFMEMORY
;
1349 case D3D10_CT_TBUFFER
:
1350 l
->type
->basetype
= D3D10_SVT_TBUFFER
;
1351 if (!copy_name("tbuffer", &l
->type
->name
))
1353 ERR("Failed to copy name.\n");
1354 return E_OUTOFMEMORY
;
1359 ERR("Unexpected D3D10_CBUFFER_TYPE %#x!\n", d3d10_cbuffer_type
);
1363 read_dword(ptr
, &l
->type
->member_count
);
1364 TRACE("Local buffer member count: %#x.\n", l
->type
->member_count
);
1366 skip_dword_unknown(ptr
, 1);
1368 read_dword(ptr
, &l
->annotation_count
);
1369 TRACE("Local buffer has %u annotations.\n", l
->annotation_count
);
1371 l
->annotations
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, l
->annotation_count
* sizeof(*l
->annotations
));
1372 if (!l
->annotations
)
1374 ERR("Failed to allocate local buffer annotations memory.\n");
1375 return E_OUTOFMEMORY
;
1378 for (i
= 0; i
< l
->annotation_count
; ++i
)
1380 struct d3d10_effect_variable
*a
= &l
->annotations
[i
];
1382 a
->effect
= l
->effect
;
1383 a
->buffer
= &null_local_buffer
;
1385 hr
= parse_fx10_annotation(a
, ptr
, data
);
1386 if (FAILED(hr
)) return hr
;
1389 l
->members
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, l
->type
->member_count
* sizeof(*l
->members
));
1392 ERR("Failed to allocate members memory.\n");
1393 return E_OUTOFMEMORY
;
1396 l
->type
->members
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, l
->type
->member_count
* sizeof(*l
->type
->members
));
1397 if (!l
->type
->members
)
1399 ERR("Failed to allocate type members memory.\n");
1400 return E_OUTOFMEMORY
;
1403 for (i
= 0; i
< l
->type
->member_count
; ++i
)
1405 struct d3d10_effect_variable
*v
= &l
->members
[i
];
1406 struct d3d10_effect_type_member
*typem
= &l
->type
->members
[i
];
1409 v
->effect
= l
->effect
;
1411 hr
= parse_fx10_variable(v
, ptr
, data
);
1412 if (FAILED(hr
)) return hr
;
1415 * Copy the values from the variable type to the constant buffers type
1416 * members structure, because it is our own generated type.
1418 typem
->type
= v
->type
;
1420 if (!copy_name(v
->name
, &typem
->name
))
1422 ERR("Failed to copy name.\n");
1423 return E_OUTOFMEMORY
;
1425 TRACE("Variable name: %s.\n", debugstr_a(typem
->name
));
1427 if (!copy_name(v
->semantic
, &typem
->semantic
))
1429 ERR("Failed to copy name.\n");
1430 return E_OUTOFMEMORY
;
1432 TRACE("Variable semantic: %s.\n", debugstr_a(typem
->semantic
));
1434 typem
->buffer_offset
= v
->buffer_offset
;
1435 TRACE("Variable buffer offset: %u.\n", typem
->buffer_offset
);
1437 l
->type
->size_packed
+= v
->type
->size_packed
;
1440 * For the complete constantbuffer the size_unpacked = stride,
1441 * the stride is calculated like this:
1443 * 1) if the constant buffer variables are packed with packoffset
1444 * - stride = the highest used constant
1445 * - the complete stride has to be a multiple of 0x10
1447 * 2) if the constant buffer variables are NOT packed with packoffset
1448 * - sum of unpacked size for all variables which fit in a 0x10 part
1449 * - if the size exceeds a 0x10 part, the rest of the old part is skipped
1450 * and a new part is started
1451 * - if the variable is a struct it is always used a new part
1452 * - the complete stride has to be a multiple of 0x10
1455 * 0x4, 0x4, 0x4, 0x8, 0x4, 0x14, 0x4
1456 * part 0x10 0x10 0x20 -> 0x40
1458 if (v
->flag
& D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT
)
1460 if ((v
->type
->size_unpacked
+ v
->buffer_offset
) > stride
)
1462 stride
= v
->type
->size_unpacked
+ v
->buffer_offset
;
1467 if (v
->type
->type_class
== D3D10_SVC_STRUCT
)
1469 stride
= (stride
+ 0xf) & ~0xf;
1472 if ( ((stride
& 0xf) + v
->type
->size_unpacked
) > 0x10)
1474 stride
= (stride
+ 0xf) & ~0xf;
1477 stride
+= v
->type
->size_unpacked
;
1480 l
->type
->stride
= l
->type
->size_unpacked
= (stride
+ 0xf) & ~0xf;
1482 TRACE("Constant buffer:\n");
1483 TRACE("\tType name: %s.\n", debugstr_a(l
->type
->name
));
1484 TRACE("\tElement count: %u.\n", l
->type
->element_count
);
1485 TRACE("\tMember count: %u.\n", l
->type
->member_count
);
1486 TRACE("\tUnpacked size: %#x.\n", l
->type
->size_unpacked
);
1487 TRACE("\tStride: %#x.\n", l
->type
->stride
);
1488 TRACE("\tPacked size %#x.\n", l
->type
->size_packed
);
1489 TRACE("\tBasetype: %s.\n", debug_d3d10_shader_variable_type(l
->type
->basetype
));
1490 TRACE("\tTypeclass: %s.\n", debug_d3d10_shader_variable_class(l
->type
->type_class
));
1495 static int d3d10_effect_type_compare(const void *key
, const struct wine_rb_entry
*entry
)
1497 const struct d3d10_effect_type
*t
= WINE_RB_ENTRY_VALUE(entry
, const struct d3d10_effect_type
, entry
);
1498 const DWORD
*id
= key
;
1503 static void d3d10_effect_type_member_destroy(struct d3d10_effect_type_member
*typem
)
1505 TRACE("effect type member %p.\n", typem
);
1507 /* Do not release typem->type, it will be covered by d3d10_effect_type_destroy(). */
1508 HeapFree(GetProcessHeap(), 0, typem
->semantic
);
1509 HeapFree(GetProcessHeap(), 0, typem
->name
);
1512 static void d3d10_effect_type_destroy(struct wine_rb_entry
*entry
, void *context
)
1514 struct d3d10_effect_type
*t
= WINE_RB_ENTRY_VALUE(entry
, struct d3d10_effect_type
, entry
);
1516 TRACE("effect type %p.\n", t
);
1520 HeapFree(GetProcessHeap(), 0, t
->elementtype
->name
);
1521 HeapFree(GetProcessHeap(), 0, t
->elementtype
);
1528 for (i
= 0; i
< t
->member_count
; ++i
)
1530 d3d10_effect_type_member_destroy(&t
->members
[i
]);
1532 HeapFree(GetProcessHeap(), 0, t
->members
);
1535 HeapFree(GetProcessHeap(), 0, t
->name
);
1536 HeapFree(GetProcessHeap(), 0, t
);
1539 static const struct wine_rb_functions d3d10_effect_type_rb_functions
=
1544 d3d10_effect_type_compare
,
1547 static HRESULT
parse_fx10_body(struct d3d10_effect
*e
, const char *data
, DWORD data_size
)
1549 const char *ptr
= data
+ e
->index_offset
;
1553 if (wine_rb_init(&e
->types
, &d3d10_effect_type_rb_functions
) == -1)
1555 ERR("Failed to initialize type rbtree.\n");
1559 e
->local_buffers
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, e
->local_buffer_count
* sizeof(*e
->local_buffers
));
1560 if (!e
->local_buffers
)
1562 ERR("Failed to allocate local buffer memory.\n");
1563 return E_OUTOFMEMORY
;
1566 e
->local_variables
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, e
->local_variable_count
* sizeof(*e
->local_variables
));
1567 if (!e
->local_variables
)
1569 ERR("Failed to allocate local variable memory.\n");
1570 return E_OUTOFMEMORY
;
1573 e
->anonymous_shaders
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, e
->anonymous_shader_count
* sizeof(*e
->anonymous_shaders
));
1574 if (!e
->anonymous_shaders
)
1576 ERR("Failed to allocate anonymous shaders memory\n");
1577 return E_OUTOFMEMORY
;
1580 e
->used_shaders
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, e
->used_shader_count
* sizeof(*e
->used_shaders
));
1581 if (!e
->used_shaders
)
1583 ERR("Failed to allocate used shaders memory\n");
1584 return E_OUTOFMEMORY
;
1587 e
->techniques
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, e
->technique_count
* sizeof(*e
->techniques
));
1590 ERR("Failed to allocate techniques memory\n");
1591 return E_OUTOFMEMORY
;
1594 for (i
= 0; i
< e
->local_buffer_count
; ++i
)
1596 struct d3d10_effect_variable
*l
= &e
->local_buffers
[i
];
1597 l
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_constant_buffer_vtbl
;
1599 l
->buffer
= &null_local_buffer
;
1601 hr
= parse_fx10_local_buffer(l
, &ptr
, data
);
1602 if (FAILED(hr
)) return hr
;
1605 for (i
= 0; i
< e
->local_variable_count
; ++i
)
1607 struct d3d10_effect_variable
*v
= &e
->local_variables
[i
];
1610 v
->vtbl
= &d3d10_effect_variable_vtbl
;
1611 v
->buffer
= &null_local_buffer
;
1613 hr
= parse_fx10_local_variable(v
, &ptr
, data
);
1614 if (FAILED(hr
)) return hr
;
1617 for (i
= 0; i
< e
->technique_count
; ++i
)
1619 struct d3d10_effect_technique
*t
= &e
->techniques
[i
];
1621 t
->vtbl
= &d3d10_effect_technique_vtbl
;
1624 hr
= parse_fx10_technique(t
, &ptr
, data
);
1625 if (FAILED(hr
)) return hr
;
1631 static HRESULT
parse_fx10(struct d3d10_effect
*e
, const char *data
, DWORD data_size
)
1633 const char *ptr
= data
;
1636 /* Compiled target version (e.g. fx_4_0=0xfeff1001, fx_4_1=0xfeff1011). */
1637 read_dword(&ptr
, &e
->version
);
1638 TRACE("Target: %#x\n", e
->version
);
1640 read_dword(&ptr
, &e
->local_buffer_count
);
1641 TRACE("Local buffer count: %u.\n", e
->local_buffer_count
);
1643 read_dword(&ptr
, &e
->variable_count
);
1644 TRACE("Variable count: %u\n", e
->variable_count
);
1646 read_dword(&ptr
, &e
->local_variable_count
);
1647 TRACE("Object count: %u\n", e
->local_variable_count
);
1649 read_dword(&ptr
, &e
->sharedbuffers_count
);
1650 TRACE("Sharedbuffers count: %u\n", e
->sharedbuffers_count
);
1652 /* Number of variables in shared buffers? */
1653 read_dword(&ptr
, &unknown
);
1654 FIXME("Unknown 0: %u\n", unknown
);
1656 read_dword(&ptr
, &e
->sharedobjects_count
);
1657 TRACE("Sharedobjects count: %u\n", e
->sharedobjects_count
);
1659 read_dword(&ptr
, &e
->technique_count
);
1660 TRACE("Technique count: %u\n", e
->technique_count
);
1662 read_dword(&ptr
, &e
->index_offset
);
1663 TRACE("Index offset: %#x\n", e
->index_offset
);
1665 read_dword(&ptr
, &unknown
);
1666 FIXME("Unknown 1: %u\n", unknown
);
1668 read_dword(&ptr
, &e
->texture_count
);
1669 TRACE("Texture count: %u\n", e
->texture_count
);
1671 read_dword(&ptr
, &e
->dephstencilstate_count
);
1672 TRACE("Depthstencilstate count: %u\n", e
->dephstencilstate_count
);
1674 read_dword(&ptr
, &e
->blendstate_count
);
1675 TRACE("Blendstate count: %u\n", e
->blendstate_count
);
1677 read_dword(&ptr
, &e
->rasterizerstate_count
);
1678 TRACE("Rasterizerstate count: %u\n", e
->rasterizerstate_count
);
1680 read_dword(&ptr
, &e
->samplerstate_count
);
1681 TRACE("Samplerstate count: %u\n", e
->samplerstate_count
);
1683 read_dword(&ptr
, &e
->rendertargetview_count
);
1684 TRACE("Rendertargetview count: %u\n", e
->rendertargetview_count
);
1686 read_dword(&ptr
, &e
->depthstencilview_count
);
1687 TRACE("Depthstencilview count: %u\n", e
->depthstencilview_count
);
1689 read_dword(&ptr
, &e
->used_shader_count
);
1690 TRACE("Used shader count: %u\n", e
->used_shader_count
);
1692 read_dword(&ptr
, &e
->anonymous_shader_count
);
1693 TRACE("Anonymous shader count: %u\n", e
->anonymous_shader_count
);
1695 return parse_fx10_body(e
, ptr
, data_size
- (ptr
- data
));
1698 static HRESULT
fx10_chunk_handler(const char *data
, DWORD data_size
, DWORD tag
, void *ctx
)
1700 struct d3d10_effect
*e
= ctx
;
1702 TRACE("tag: %s.\n", debugstr_an((const char *)&tag
, 4));
1704 TRACE("chunk size: %#x\n", data_size
);
1709 return parse_fx10(e
, data
, data_size
);
1712 FIXME("Unhandled chunk %s.\n", debugstr_an((const char *)&tag
, 4));
1717 HRESULT
d3d10_effect_parse(struct d3d10_effect
*This
, const void *data
, SIZE_T data_size
)
1719 return parse_dxbc(data
, data_size
, fx10_chunk_handler
, This
);
1722 static HRESULT
d3d10_effect_object_apply(struct d3d10_effect_object
*o
)
1724 ID3D10Device
*device
= o
->pass
->technique
->effect
->device
;
1725 struct d3d10_effect_variable
*v
= (struct d3d10_effect_variable
*) o
->data
;
1727 TRACE("effect object %p, type %#x.\n", o
, o
->type
);
1731 case D3D10_EOT_VERTEXSHADER
:
1732 ID3D10Device_VSSetShader(device
, ((struct d3d10_effect_shader_variable
*)v
->data
)->shader
.vs
);
1735 case D3D10_EOT_PIXELSHADER
:
1736 ID3D10Device_PSSetShader(device
, ((struct d3d10_effect_shader_variable
*)v
->data
)->shader
.ps
);
1739 case D3D10_EOT_GEOMETRYSHADER
:
1740 ID3D10Device_GSSetShader(device
, ((struct d3d10_effect_shader_variable
*)v
->data
)->shader
.gs
);
1744 FIXME("Unhandled effect object type %#x.\n", o
->type
);
1749 static void d3d10_effect_variable_destroy(struct d3d10_effect_variable
*v
)
1753 TRACE("variable %p.\n", v
);
1755 HeapFree(GetProcessHeap(), 0, v
->name
);
1756 HeapFree(GetProcessHeap(), 0, v
->semantic
);
1759 for (i
= 0; i
< v
->annotation_count
; ++i
)
1761 d3d10_effect_variable_destroy(&v
->annotations
[i
]);
1763 HeapFree(GetProcessHeap(), 0, v
->annotations
);
1768 for (i
= 0; i
< v
->type
->member_count
; ++i
)
1770 d3d10_effect_variable_destroy(&v
->members
[i
]);
1772 HeapFree(GetProcessHeap(), 0, v
->members
);
1777 for (i
= 0; i
< v
->type
->element_count
; ++i
)
1779 d3d10_effect_variable_destroy(&v
->elements
[i
]);
1781 HeapFree(GetProcessHeap(), 0, v
->elements
);
1786 switch(v
->type
->basetype
)
1788 case D3D10_SVT_VERTEXSHADER
:
1789 case D3D10_SVT_PIXELSHADER
:
1790 case D3D10_SVT_GEOMETRYSHADER
:
1791 shader_free_signature(&((struct d3d10_effect_shader_variable
*)v
->data
)->input_signature
);
1792 shader_free_signature(&((struct d3d10_effect_shader_variable
*)v
->data
)->output_signature
);
1798 HeapFree(GetProcessHeap(), 0, v
->data
);
1802 static void d3d10_effect_pass_destroy(struct d3d10_effect_pass
*p
)
1806 TRACE("pass %p\n", p
);
1808 HeapFree(GetProcessHeap(), 0, p
->name
);
1809 HeapFree(GetProcessHeap(), 0, p
->objects
);
1813 for (i
= 0; i
< p
->annotation_count
; ++i
)
1815 d3d10_effect_variable_destroy(&p
->annotations
[i
]);
1817 HeapFree(GetProcessHeap(), 0, p
->annotations
);
1821 static void d3d10_effect_technique_destroy(struct d3d10_effect_technique
*t
)
1825 TRACE("technique %p\n", t
);
1827 HeapFree(GetProcessHeap(), 0, t
->name
);
1830 for (i
= 0; i
< t
->pass_count
; ++i
)
1832 d3d10_effect_pass_destroy(&t
->passes
[i
]);
1834 HeapFree(GetProcessHeap(), 0, t
->passes
);
1839 for (i
= 0; i
< t
->annotation_count
; ++i
)
1841 d3d10_effect_variable_destroy(&t
->annotations
[i
]);
1843 HeapFree(GetProcessHeap(), 0, t
->annotations
);
1847 static void d3d10_effect_local_buffer_destroy(struct d3d10_effect_variable
*l
)
1851 TRACE("local buffer %p.\n", l
);
1853 HeapFree(GetProcessHeap(), 0, l
->name
);
1856 for (i
= 0; i
< l
->type
->member_count
; ++i
)
1858 d3d10_effect_variable_destroy(&l
->members
[i
]);
1860 HeapFree(GetProcessHeap(), 0, l
->members
);
1863 if (l
->type
->members
)
1865 for (i
= 0; i
< l
->type
->member_count
; ++i
)
1867 /* Do not release l->type->members[i].type, it will be covered by d3d10_effect_type_destroy(). */
1868 HeapFree(GetProcessHeap(), 0, l
->type
->members
[i
].semantic
);
1869 HeapFree(GetProcessHeap(), 0, l
->type
->members
[i
].name
);
1871 HeapFree(GetProcessHeap(), 0, l
->type
->members
);
1873 HeapFree(GetProcessHeap(), 0, l
->type
->name
);
1874 HeapFree(GetProcessHeap(), 0, l
->type
);
1878 for (i
= 0; i
< l
->annotation_count
; ++i
)
1880 d3d10_effect_variable_destroy(&l
->annotations
[i
]);
1882 HeapFree(GetProcessHeap(), 0, l
->annotations
);
1886 /* IUnknown methods */
1888 static HRESULT STDMETHODCALLTYPE
d3d10_effect_QueryInterface(ID3D10Effect
*iface
, REFIID riid
, void **object
)
1890 TRACE("iface %p, riid %s, object %p\n", iface
, debugstr_guid(riid
), object
);
1892 if (IsEqualGUID(riid
, &IID_ID3D10Effect
)
1893 || IsEqualGUID(riid
, &IID_IUnknown
))
1895 IUnknown_AddRef(iface
);
1900 WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid
));
1903 return E_NOINTERFACE
;
1906 static ULONG STDMETHODCALLTYPE
d3d10_effect_AddRef(ID3D10Effect
*iface
)
1908 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
1909 ULONG refcount
= InterlockedIncrement(&This
->refcount
);
1911 TRACE("%p increasing refcount to %u\n", This
, refcount
);
1916 static ULONG STDMETHODCALLTYPE
d3d10_effect_Release(ID3D10Effect
*iface
)
1918 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
1919 ULONG refcount
= InterlockedDecrement(&This
->refcount
);
1921 TRACE("%p decreasing refcount to %u\n", This
, refcount
);
1927 if (This
->techniques
)
1929 for (i
= 0; i
< This
->technique_count
; ++i
)
1931 d3d10_effect_technique_destroy(&This
->techniques
[i
]);
1933 HeapFree(GetProcessHeap(), 0, This
->techniques
);
1936 if (This
->local_variables
)
1938 for (i
= 0; i
< This
->local_variable_count
; ++i
)
1940 d3d10_effect_variable_destroy(&This
->local_variables
[i
]);
1942 HeapFree(GetProcessHeap(), 0, This
->local_variables
);
1945 if (This
->local_buffers
)
1947 for (i
= 0; i
< This
->local_buffer_count
; ++i
)
1949 d3d10_effect_local_buffer_destroy(&This
->local_buffers
[i
]);
1951 HeapFree(GetProcessHeap(), 0, This
->local_buffers
);
1954 if (This
->anonymous_shaders
)
1956 for (i
= 0; i
< This
->anonymous_shader_count
; ++i
)
1958 d3d10_effect_variable_destroy(&This
->anonymous_shaders
[i
].shader
);
1959 HeapFree(GetProcessHeap(), 0, This
->anonymous_shaders
[i
].type
.name
);
1961 HeapFree(GetProcessHeap(), 0, This
->anonymous_shaders
);
1964 HeapFree(GetProcessHeap(), 0, This
->used_shaders
);
1966 wine_rb_destroy(&This
->types
, d3d10_effect_type_destroy
, NULL
);
1968 ID3D10Device_Release(This
->device
);
1969 HeapFree(GetProcessHeap(), 0, This
);
1975 /* ID3D10Effect methods */
1977 static BOOL STDMETHODCALLTYPE
d3d10_effect_IsValid(ID3D10Effect
*iface
)
1979 FIXME("iface %p stub!\n", iface
);
1984 static BOOL STDMETHODCALLTYPE
d3d10_effect_IsPool(ID3D10Effect
*iface
)
1986 FIXME("iface %p stub!\n", iface
);
1991 static HRESULT STDMETHODCALLTYPE
d3d10_effect_GetDevice(ID3D10Effect
*iface
, ID3D10Device
**device
)
1993 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
1995 TRACE("iface %p, device %p\n", iface
, device
);
1997 ID3D10Device_AddRef(This
->device
);
1998 *device
= This
->device
;
2003 static HRESULT STDMETHODCALLTYPE
d3d10_effect_GetDesc(ID3D10Effect
*iface
, D3D10_EFFECT_DESC
*desc
)
2005 FIXME("iface %p, desc %p stub!\n", iface
, desc
);
2010 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_GetConstantBufferByIndex(ID3D10Effect
*iface
,
2013 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
2014 struct d3d10_effect_variable
*l
;
2016 TRACE("iface %p, index %u\n", iface
, index
);
2018 if (index
>= This
->local_buffer_count
)
2020 WARN("Invalid index specified\n");
2021 return (ID3D10EffectConstantBuffer
*)&null_local_buffer
;
2024 l
= &This
->local_buffers
[index
];
2026 TRACE("Returning buffer %p, %s.\n", l
, debugstr_a(l
->name
));
2028 return (ID3D10EffectConstantBuffer
*)l
;
2031 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_GetConstantBufferByName(ID3D10Effect
*iface
,
2034 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
2037 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2039 for (i
= 0; i
< This
->local_buffer_count
; ++i
)
2041 struct d3d10_effect_variable
*l
= &This
->local_buffers
[i
];
2043 if (!strcmp(l
->name
, name
))
2045 TRACE("Returning buffer %p.\n", l
);
2046 return (ID3D10EffectConstantBuffer
*)l
;
2050 WARN("Invalid name specified\n");
2052 return (ID3D10EffectConstantBuffer
*)&null_local_buffer
;
2055 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_GetVariableByIndex(ID3D10Effect
*iface
, UINT index
)
2057 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
2060 TRACE("iface %p, index %u\n", iface
, index
);
2062 for (i
= 0; i
< This
->local_buffer_count
; ++i
)
2064 struct d3d10_effect_variable
*l
= &This
->local_buffers
[i
];
2066 if (index
< l
->type
->member_count
)
2068 struct d3d10_effect_variable
*v
= &l
->members
[index
];
2070 TRACE("Returning variable %p.\n", v
);
2071 return (ID3D10EffectVariable
*)v
;
2073 index
-= l
->type
->member_count
;
2076 if (index
< This
->local_variable_count
)
2078 struct d3d10_effect_variable
*v
= &This
->local_variables
[index
];
2080 TRACE("Returning variable %p.\n", v
);
2081 return (ID3D10EffectVariable
*)v
;
2084 WARN("Invalid index specified\n");
2086 return (ID3D10EffectVariable
*)&null_variable
;
2089 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_GetVariableByName(ID3D10Effect
*iface
, LPCSTR name
)
2091 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
2094 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2098 WARN("Invalid name specified\n");
2099 return (ID3D10EffectVariable
*)&null_variable
;
2102 for (i
= 0; i
< This
->local_buffer_count
; ++i
)
2104 struct d3d10_effect_variable
*l
= &This
->local_buffers
[i
];
2107 for (j
= 0; j
< l
->type
->member_count
; ++j
)
2109 struct d3d10_effect_variable
*v
= &l
->members
[j
];
2111 if (!strcmp(v
->name
, name
))
2113 TRACE("Returning variable %p.\n", v
);
2114 return (ID3D10EffectVariable
*)v
;
2119 for (i
= 0; i
< This
->local_variable_count
; ++i
)
2121 struct d3d10_effect_variable
*v
= &This
->local_variables
[i
];
2123 if (!strcmp(v
->name
, name
))
2125 TRACE("Returning variable %p.\n", v
);
2126 return (ID3D10EffectVariable
*)v
;
2130 WARN("Invalid name specified\n");
2132 return (ID3D10EffectVariable
*)&null_variable
;
2135 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_GetVariableBySemantic(ID3D10Effect
*iface
,
2138 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
2141 TRACE("iface %p, semantic %s\n", iface
, debugstr_a(semantic
));
2145 WARN("Invalid semantic specified\n");
2146 return (ID3D10EffectVariable
*)&null_variable
;
2149 for (i
= 0; i
< This
->local_buffer_count
; ++i
)
2151 struct d3d10_effect_variable
*l
= &This
->local_buffers
[i
];
2154 for (j
= 0; j
< l
->type
->member_count
; ++j
)
2156 struct d3d10_effect_variable
*v
= &l
->members
[j
];
2158 if (!strcmp(v
->semantic
, semantic
))
2160 TRACE("Returning variable %p.\n", v
);
2161 return (ID3D10EffectVariable
*)v
;
2166 for (i
= 0; i
< This
->local_variable_count
; ++i
)
2168 struct d3d10_effect_variable
*v
= &This
->local_variables
[i
];
2170 if (!strcmp(v
->semantic
, semantic
))
2172 TRACE("Returning variable %p.\n", v
);
2173 return (ID3D10EffectVariable
*)v
;
2177 WARN("Invalid semantic specified\n");
2179 return (ID3D10EffectVariable
*)&null_variable
;
2182 static struct ID3D10EffectTechnique
* STDMETHODCALLTYPE
d3d10_effect_GetTechniqueByIndex(ID3D10Effect
*iface
,
2185 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
2186 struct d3d10_effect_technique
*t
;
2188 TRACE("iface %p, index %u\n", iface
, index
);
2190 if (index
>= This
->technique_count
)
2192 WARN("Invalid index specified\n");
2193 return (ID3D10EffectTechnique
*)&null_technique
;
2196 t
= &This
->techniques
[index
];
2198 TRACE("Returning technique %p, %s.\n", t
, debugstr_a(t
->name
));
2200 return (ID3D10EffectTechnique
*)t
;
2203 static struct ID3D10EffectTechnique
* STDMETHODCALLTYPE
d3d10_effect_GetTechniqueByName(ID3D10Effect
*iface
,
2206 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
2209 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2213 WARN("Invalid name specified\n");
2214 return (ID3D10EffectTechnique
*)&null_technique
;
2217 for (i
= 0; i
< This
->technique_count
; ++i
)
2219 struct d3d10_effect_technique
*t
= &This
->techniques
[i
];
2220 if (!strcmp(t
->name
, name
))
2222 TRACE("Returning technique %p\n", t
);
2223 return (ID3D10EffectTechnique
*)t
;
2227 WARN("Invalid name specified\n");
2229 return (ID3D10EffectTechnique
*)&null_technique
;
2232 static HRESULT STDMETHODCALLTYPE
d3d10_effect_Optimize(ID3D10Effect
*iface
)
2234 FIXME("iface %p stub!\n", iface
);
2239 static BOOL STDMETHODCALLTYPE
d3d10_effect_IsOptimized(ID3D10Effect
*iface
)
2241 FIXME("iface %p stub!\n", iface
);
2246 const struct ID3D10EffectVtbl d3d10_effect_vtbl
=
2248 /* IUnknown methods */
2249 d3d10_effect_QueryInterface
,
2250 d3d10_effect_AddRef
,
2251 d3d10_effect_Release
,
2252 /* ID3D10Effect methods */
2253 d3d10_effect_IsValid
,
2254 d3d10_effect_IsPool
,
2255 d3d10_effect_GetDevice
,
2256 d3d10_effect_GetDesc
,
2257 d3d10_effect_GetConstantBufferByIndex
,
2258 d3d10_effect_GetConstantBufferByName
,
2259 d3d10_effect_GetVariableByIndex
,
2260 d3d10_effect_GetVariableByName
,
2261 d3d10_effect_GetVariableBySemantic
,
2262 d3d10_effect_GetTechniqueByIndex
,
2263 d3d10_effect_GetTechniqueByName
,
2264 d3d10_effect_Optimize
,
2265 d3d10_effect_IsOptimized
,
2268 /* ID3D10EffectTechnique methods */
2270 static BOOL STDMETHODCALLTYPE
d3d10_effect_technique_IsValid(ID3D10EffectTechnique
*iface
)
2272 TRACE("iface %p\n", iface
);
2274 return (struct d3d10_effect_technique
*)iface
!= &null_technique
;
2277 static HRESULT STDMETHODCALLTYPE
d3d10_effect_technique_GetDesc(ID3D10EffectTechnique
*iface
,
2278 D3D10_TECHNIQUE_DESC
*desc
)
2280 struct d3d10_effect_technique
*This
= (struct d3d10_effect_technique
*)iface
;
2282 TRACE("iface %p, desc %p\n", iface
, desc
);
2284 if(This
== &null_technique
)
2286 WARN("Null technique specified\n");
2292 WARN("Invalid argument specified\n");
2293 return E_INVALIDARG
;
2296 desc
->Name
= This
->name
;
2297 desc
->Passes
= This
->pass_count
;
2298 desc
->Annotations
= This
->annotation_count
;
2303 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_technique_GetAnnotationByIndex(
2304 ID3D10EffectTechnique
*iface
, UINT index
)
2306 struct d3d10_effect_technique
*This
= (struct d3d10_effect_technique
*)iface
;
2307 struct d3d10_effect_variable
*a
;
2309 TRACE("iface %p, index %u\n", iface
, index
);
2311 if (index
>= This
->annotation_count
)
2313 WARN("Invalid index specified\n");
2314 return (ID3D10EffectVariable
*)&null_variable
;
2317 a
= &This
->annotations
[index
];
2319 TRACE("Returning annotation %p, %s\n", a
, debugstr_a(a
->name
));
2321 return (ID3D10EffectVariable
*)a
;
2324 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_technique_GetAnnotationByName(
2325 ID3D10EffectTechnique
*iface
, LPCSTR name
)
2327 struct d3d10_effect_technique
*This
= (struct d3d10_effect_technique
*)iface
;
2330 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2332 for (i
= 0; i
< This
->annotation_count
; ++i
)
2334 struct d3d10_effect_variable
*a
= &This
->annotations
[i
];
2335 if (!strcmp(a
->name
, name
))
2337 TRACE("Returning annotation %p\n", a
);
2338 return (ID3D10EffectVariable
*)a
;
2342 WARN("Invalid name specified\n");
2344 return (ID3D10EffectVariable
*)&null_variable
;
2347 static struct ID3D10EffectPass
* STDMETHODCALLTYPE
d3d10_effect_technique_GetPassByIndex(ID3D10EffectTechnique
*iface
,
2350 struct d3d10_effect_technique
*This
= (struct d3d10_effect_technique
*)iface
;
2351 struct d3d10_effect_pass
*p
;
2353 TRACE("iface %p, index %u\n", iface
, index
);
2355 if (index
>= This
->pass_count
)
2357 WARN("Invalid index specified\n");
2358 return (ID3D10EffectPass
*)&null_pass
;
2361 p
= &This
->passes
[index
];
2363 TRACE("Returning pass %p, %s.\n", p
, debugstr_a(p
->name
));
2365 return (ID3D10EffectPass
*)p
;
2368 static struct ID3D10EffectPass
* STDMETHODCALLTYPE
d3d10_effect_technique_GetPassByName(ID3D10EffectTechnique
*iface
,
2371 struct d3d10_effect_technique
*This
= (struct d3d10_effect_technique
*)iface
;
2374 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2376 /* Do not check for name==NULL, W7/DX10 crashes in that case. */
2378 for (i
= 0; i
< This
->pass_count
; ++i
)
2380 struct d3d10_effect_pass
*p
= &This
->passes
[i
];
2381 if (!strcmp(p
->name
, name
))
2383 TRACE("Returning pass %p\n", p
);
2384 return (ID3D10EffectPass
*)p
;
2388 WARN("Invalid name specified\n");
2390 return (ID3D10EffectPass
*)&null_pass
;
2393 static HRESULT STDMETHODCALLTYPE
d3d10_effect_technique_ComputeStateBlockMask(ID3D10EffectTechnique
*iface
,
2394 D3D10_STATE_BLOCK_MASK
*mask
)
2396 FIXME("iface %p,mask %p stub!\n", iface
, mask
);
2401 static const struct ID3D10EffectTechniqueVtbl d3d10_effect_technique_vtbl
=
2403 /* ID3D10EffectTechnique methods */
2404 d3d10_effect_technique_IsValid
,
2405 d3d10_effect_technique_GetDesc
,
2406 d3d10_effect_technique_GetAnnotationByIndex
,
2407 d3d10_effect_technique_GetAnnotationByName
,
2408 d3d10_effect_technique_GetPassByIndex
,
2409 d3d10_effect_technique_GetPassByName
,
2410 d3d10_effect_technique_ComputeStateBlockMask
,
2413 /* ID3D10EffectPass methods */
2415 static BOOL STDMETHODCALLTYPE
d3d10_effect_pass_IsValid(ID3D10EffectPass
*iface
)
2417 TRACE("iface %p\n", iface
);
2419 return (struct d3d10_effect_pass
*)iface
!= &null_pass
;
2422 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_GetDesc(ID3D10EffectPass
*iface
, D3D10_PASS_DESC
*desc
)
2424 struct d3d10_effect_pass
*This
= (struct d3d10_effect_pass
*)iface
;
2427 FIXME("iface %p, desc %p partial stub!\n", iface
, desc
);
2429 if(This
== &null_pass
)
2431 WARN("Null pass specified\n");
2437 WARN("Invalid argument specified\n");
2438 return E_INVALIDARG
;
2441 memset(desc
, 0, sizeof(*desc
));
2442 desc
->Name
= This
->name
;
2443 for (i
= 0; i
< This
->object_count
; ++i
)
2445 struct d3d10_effect_object
*o
= &This
->objects
[i
];
2446 if (o
->type
== D3D10_EOT_VERTEXSHADER
)
2448 struct d3d10_effect_variable
*v
= o
->data
;
2449 struct d3d10_effect_shader_variable
*s
= v
->data
;
2450 desc
->pIAInputSignature
= (BYTE
*)s
->input_signature
.signature
;
2451 desc
->IAInputSignatureSize
= s
->input_signature
.signature_size
;
2459 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_GetVertexShaderDesc(ID3D10EffectPass
*iface
,
2460 D3D10_PASS_SHADER_DESC
*desc
)
2462 struct d3d10_effect_pass
*This
= (struct d3d10_effect_pass
*)iface
;
2465 TRACE("iface %p, desc %p\n", iface
, desc
);
2467 if (This
== &null_pass
)
2469 WARN("Null pass specified\n");
2475 WARN("Invalid argument specified\n");
2476 return E_INVALIDARG
;
2479 for (i
= 0; i
< This
->object_count
; ++i
)
2481 struct d3d10_effect_object
*o
= &This
->objects
[i
];
2483 if (o
->type
== D3D10_EOT_VERTEXSHADER
)
2485 desc
->pShaderVariable
= o
->data
;
2486 desc
->ShaderIndex
= o
->index
;
2491 TRACE("Returning null_shader_variable\n");
2492 desc
->pShaderVariable
= (ID3D10EffectShaderVariable
*)&null_shader_variable
;
2493 desc
->ShaderIndex
= 0;
2498 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_GetGeometryShaderDesc(ID3D10EffectPass
*iface
,
2499 D3D10_PASS_SHADER_DESC
*desc
)
2501 struct d3d10_effect_pass
*This
= (struct d3d10_effect_pass
*)iface
;
2504 TRACE("iface %p, desc %p\n", iface
, desc
);
2506 if (This
== &null_pass
)
2508 WARN("Null pass specified\n");
2514 WARN("Invalid argument specified\n");
2515 return E_INVALIDARG
;
2518 for (i
= 0; i
< This
->object_count
; ++i
)
2520 struct d3d10_effect_object
*o
= &This
->objects
[i
];
2522 if (o
->type
== D3D10_EOT_GEOMETRYSHADER
)
2524 desc
->pShaderVariable
= o
->data
;
2525 desc
->ShaderIndex
= o
->index
;
2530 TRACE("Returning null_shader_variable\n");
2531 desc
->pShaderVariable
= (ID3D10EffectShaderVariable
*)&null_shader_variable
;
2532 desc
->ShaderIndex
= 0;
2537 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_GetPixelShaderDesc(ID3D10EffectPass
*iface
,
2538 D3D10_PASS_SHADER_DESC
*desc
)
2540 struct d3d10_effect_pass
*This
= (struct d3d10_effect_pass
*)iface
;
2543 TRACE("iface %p, desc %p\n", iface
, desc
);
2545 if (This
== &null_pass
)
2547 WARN("Null pass specified\n");
2553 WARN("Invalid argument specified\n");
2554 return E_INVALIDARG
;
2557 for (i
= 0; i
< This
->object_count
; ++i
)
2559 struct d3d10_effect_object
*o
= &This
->objects
[i
];
2561 if (o
->type
== D3D10_EOT_PIXELSHADER
)
2563 desc
->pShaderVariable
= o
->data
;
2564 desc
->ShaderIndex
= o
->index
;
2569 TRACE("Returning null_shader_variable\n");
2570 desc
->pShaderVariable
= (ID3D10EffectShaderVariable
*)&null_shader_variable
;
2571 desc
->ShaderIndex
= 0;
2576 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_pass_GetAnnotationByIndex(ID3D10EffectPass
*iface
,
2579 struct d3d10_effect_pass
*This
= (struct d3d10_effect_pass
*)iface
;
2580 struct d3d10_effect_variable
*a
;
2582 TRACE("iface %p, index %u\n", iface
, index
);
2584 if (index
>= This
->annotation_count
)
2586 WARN("Invalid index specified\n");
2587 return (ID3D10EffectVariable
*)&null_variable
;
2590 a
= &This
->annotations
[index
];
2592 TRACE("Returning annotation %p, %s\n", a
, debugstr_a(a
->name
));
2594 return (ID3D10EffectVariable
*)a
;
2597 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_pass_GetAnnotationByName(ID3D10EffectPass
*iface
,
2600 struct d3d10_effect_pass
*This
= (struct d3d10_effect_pass
*)iface
;
2603 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2605 for (i
= 0; i
< This
->annotation_count
; ++i
)
2607 struct d3d10_effect_variable
*a
= &This
->annotations
[i
];
2608 if (!strcmp(a
->name
, name
))
2610 TRACE("Returning annotation %p\n", a
);
2611 return (ID3D10EffectVariable
*)a
;
2615 WARN("Invalid name specified\n");
2617 return (ID3D10EffectVariable
*)&null_variable
;
2620 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_Apply(ID3D10EffectPass
*iface
, UINT flags
)
2622 struct d3d10_effect_pass
*This
= (struct d3d10_effect_pass
*)iface
;
2626 TRACE("iface %p, flags %#x\n", iface
, flags
);
2628 if (flags
) FIXME("Ignoring flags (%#x)\n", flags
);
2630 for (i
= 0; i
< This
->object_count
; ++i
)
2632 hr
= d3d10_effect_object_apply(&This
->objects
[i
]);
2633 if (FAILED(hr
)) break;
2639 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_ComputeStateBlockMask(ID3D10EffectPass
*iface
,
2640 D3D10_STATE_BLOCK_MASK
*mask
)
2642 FIXME("iface %p, mask %p stub!\n", iface
, mask
);
2647 static const struct ID3D10EffectPassVtbl d3d10_effect_pass_vtbl
=
2649 /* ID3D10EffectPass methods */
2650 d3d10_effect_pass_IsValid
,
2651 d3d10_effect_pass_GetDesc
,
2652 d3d10_effect_pass_GetVertexShaderDesc
,
2653 d3d10_effect_pass_GetGeometryShaderDesc
,
2654 d3d10_effect_pass_GetPixelShaderDesc
,
2655 d3d10_effect_pass_GetAnnotationByIndex
,
2656 d3d10_effect_pass_GetAnnotationByName
,
2657 d3d10_effect_pass_Apply
,
2658 d3d10_effect_pass_ComputeStateBlockMask
,
2661 /* ID3D10EffectVariable methods */
2663 static BOOL STDMETHODCALLTYPE
d3d10_effect_variable_IsValid(ID3D10EffectVariable
*iface
)
2665 TRACE("iface %p\n", iface
);
2667 return (struct d3d10_effect_variable
*)iface
!= &null_variable
;
2670 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_variable_GetType(ID3D10EffectVariable
*iface
)
2672 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2674 TRACE("iface %p\n", iface
);
2676 return (ID3D10EffectType
*)This
->type
;
2679 static HRESULT STDMETHODCALLTYPE
d3d10_effect_variable_GetDesc(ID3D10EffectVariable
*iface
,
2680 D3D10_EFFECT_VARIABLE_DESC
*desc
)
2682 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2684 TRACE("iface %p, desc %p\n", iface
, desc
);
2686 if (!iface
->lpVtbl
->IsValid(iface
))
2688 WARN("Null variable specified\n");
2694 WARN("Invalid argument specified\n");
2695 return E_INVALIDARG
;
2698 /* FIXME: This isn't correct. Anonymous shaders let desc->ExplicitBindPoint untouched, but normal shaders set it! */
2699 memset(desc
, 0, sizeof(*desc
));
2700 desc
->Name
= This
->name
;
2701 desc
->Semantic
= This
->semantic
;
2702 desc
->Flags
= This
->flag
;
2703 desc
->Annotations
= This
->annotation_count
;
2704 desc
->BufferOffset
= This
->buffer_offset
;
2706 if (This
->flag
& D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT
)
2708 desc
->ExplicitBindPoint
= This
->buffer_offset
;
2714 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetAnnotationByIndex(
2715 ID3D10EffectVariable
*iface
, UINT index
)
2717 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2718 struct d3d10_effect_variable
*a
;
2720 TRACE("iface %p, index %u\n", iface
, index
);
2722 if (index
>= This
->annotation_count
)
2724 WARN("Invalid index specified\n");
2725 return (ID3D10EffectVariable
*)&null_variable
;
2728 a
= &This
->annotations
[index
];
2730 TRACE("Returning annotation %p, %s\n", a
, debugstr_a(a
->name
));
2732 return (ID3D10EffectVariable
*)a
;
2735 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetAnnotationByName(
2736 ID3D10EffectVariable
*iface
, LPCSTR name
)
2738 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2741 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2743 for (i
= 0; i
< This
->annotation_count
; ++i
)
2745 struct d3d10_effect_variable
*a
= &This
->annotations
[i
];
2746 if (!strcmp(a
->name
, name
))
2748 TRACE("Returning annotation %p\n", a
);
2749 return (ID3D10EffectVariable
*)a
;
2753 WARN("Invalid name specified\n");
2755 return (ID3D10EffectVariable
*)&null_variable
;
2758 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetMemberByIndex(
2759 ID3D10EffectVariable
*iface
, UINT index
)
2761 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2762 struct d3d10_effect_variable
*m
;
2764 TRACE("iface %p, index %u\n", iface
, index
);
2766 if (index
>= This
->type
->member_count
)
2768 WARN("Invalid index specified\n");
2769 return (ID3D10EffectVariable
*)&null_variable
;
2772 m
= &This
->members
[index
];
2774 TRACE("Returning member %p, %s\n", m
, debugstr_a(m
->name
));
2776 return (ID3D10EffectVariable
*)m
;
2779 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetMemberByName(
2780 ID3D10EffectVariable
*iface
, LPCSTR name
)
2782 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2785 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2789 WARN("Invalid name specified\n");
2790 return (ID3D10EffectVariable
*)&null_variable
;
2793 for (i
= 0; i
< This
->type
->member_count
; ++i
)
2795 struct d3d10_effect_variable
*m
= &This
->members
[i
];
2799 if (!strcmp(m
->name
, name
))
2801 TRACE("Returning member %p\n", m
);
2802 return (ID3D10EffectVariable
*)m
;
2807 WARN("Invalid name specified\n");
2809 return (ID3D10EffectVariable
*)&null_variable
;
2812 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetMemberBySemantic(
2813 ID3D10EffectVariable
*iface
, LPCSTR semantic
)
2815 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2818 TRACE("iface %p, semantic %s.\n", iface
, debugstr_a(semantic
));
2822 WARN("Invalid semantic specified\n");
2823 return (ID3D10EffectVariable
*)&null_variable
;
2826 for (i
= 0; i
< This
->type
->member_count
; ++i
)
2828 struct d3d10_effect_variable
*m
= &This
->members
[i
];
2832 if (!strcmp(m
->semantic
, semantic
))
2834 TRACE("Returning member %p\n", m
);
2835 return (ID3D10EffectVariable
*)m
;
2840 WARN("Invalid semantic specified\n");
2842 return (ID3D10EffectVariable
*)&null_variable
;
2845 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetElement(
2846 ID3D10EffectVariable
*iface
, UINT index
)
2848 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2849 struct d3d10_effect_variable
*v
;
2851 TRACE("iface %p, index %u\n", iface
, index
);
2853 if (index
>= This
->type
->element_count
)
2855 WARN("Invalid index specified\n");
2856 return (ID3D10EffectVariable
*)&null_variable
;
2859 v
= &This
->elements
[index
];
2861 TRACE("Returning element %p, %s\n", v
, debugstr_a(v
->name
));
2863 return (ID3D10EffectVariable
*)v
;
2866 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_variable_GetParentConstantBuffer(
2867 ID3D10EffectVariable
*iface
)
2869 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2871 TRACE("iface %p\n", iface
);
2873 return (ID3D10EffectConstantBuffer
*)This
->buffer
;
2876 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsScalar(
2877 ID3D10EffectVariable
*iface
)
2879 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2881 TRACE("iface %p\n", iface
);
2883 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_scalar_variable_vtbl
)
2884 return (ID3D10EffectScalarVariable
*)This
;
2886 return (ID3D10EffectScalarVariable
*)&null_scalar_variable
;
2889 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsVector(
2890 ID3D10EffectVariable
*iface
)
2892 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2894 TRACE("iface %p\n", iface
);
2896 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_vector_variable_vtbl
)
2897 return (ID3D10EffectVectorVariable
*)This
;
2899 return (ID3D10EffectVectorVariable
*)&null_vector_variable
;
2902 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsMatrix(
2903 ID3D10EffectVariable
*iface
)
2905 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2907 TRACE("iface %p\n", iface
);
2909 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_matrix_variable_vtbl
)
2910 return (ID3D10EffectMatrixVariable
*)This
;
2912 return (ID3D10EffectMatrixVariable
*)&null_matrix_variable
;
2915 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsString(
2916 ID3D10EffectVariable
*iface
)
2918 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2920 TRACE("iface %p\n", iface
);
2922 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_string_variable_vtbl
)
2923 return (ID3D10EffectStringVariable
*)This
;
2925 return (ID3D10EffectStringVariable
*)&null_string_variable
;
2928 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsShaderResource(
2929 ID3D10EffectVariable
*iface
)
2931 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2933 TRACE("iface %p\n", iface
);
2935 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_resource_variable_vtbl
)
2936 return (ID3D10EffectShaderResourceVariable
*)This
;
2938 return (ID3D10EffectShaderResourceVariable
*)&null_shader_resource_variable
;
2941 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsRenderTargetView(
2942 ID3D10EffectVariable
*iface
)
2944 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2946 TRACE("iface %p\n", iface
);
2948 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_render_target_view_variable_vtbl
)
2949 return (ID3D10EffectRenderTargetViewVariable
*)This
;
2951 return (ID3D10EffectRenderTargetViewVariable
*)&null_render_target_view_variable
;
2954 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsDepthStencilView(
2955 ID3D10EffectVariable
*iface
)
2957 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2959 TRACE("iface %p\n", iface
);
2961 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_depth_stencil_view_variable_vtbl
)
2962 return (ID3D10EffectDepthStencilViewVariable
*)This
;
2964 return (ID3D10EffectDepthStencilViewVariable
*)&null_depth_stencil_view_variable
;
2967 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_variable_AsConstantBuffer(
2968 ID3D10EffectVariable
*iface
)
2970 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2972 TRACE("iface %p\n", iface
);
2974 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_constant_buffer_vtbl
)
2975 return (ID3D10EffectConstantBuffer
*)This
;
2977 return (ID3D10EffectConstantBuffer
*)&null_local_buffer
;
2980 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsShader(
2981 ID3D10EffectVariable
*iface
)
2983 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2985 TRACE("iface %p\n", iface
);
2987 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_variable_vtbl
)
2988 return (ID3D10EffectShaderVariable
*)This
;
2990 return (ID3D10EffectShaderVariable
*)&null_shader_variable
;
2993 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsBlend(ID3D10EffectVariable
*iface
)
2995 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2997 TRACE("iface %p\n", iface
);
2999 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_blend_variable_vtbl
)
3000 return (ID3D10EffectBlendVariable
*)This
;
3002 return (ID3D10EffectBlendVariable
*)&null_blend_variable
;
3005 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsDepthStencil(
3006 ID3D10EffectVariable
*iface
)
3008 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
3010 TRACE("iface %p\n", iface
);
3012 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_depth_stencil_variable_vtbl
)
3013 return (ID3D10EffectDepthStencilVariable
*)This
;
3015 return (ID3D10EffectDepthStencilVariable
*)&null_depth_stencil_variable
;
3018 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsRasterizer(
3019 ID3D10EffectVariable
*iface
)
3021 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
3023 TRACE("iface %p\n", iface
);
3025 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_rasterizer_variable_vtbl
)
3026 return (ID3D10EffectRasterizerVariable
*)This
;
3028 return (ID3D10EffectRasterizerVariable
*)&null_rasterizer_variable
;
3031 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsSampler(
3032 ID3D10EffectVariable
*iface
)
3034 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
3036 TRACE("iface %p\n", iface
);
3038 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_sampler_variable_vtbl
)
3039 return (ID3D10EffectSamplerVariable
*)This
;
3041 return (ID3D10EffectSamplerVariable
*)&null_sampler_variable
;
3044 static HRESULT STDMETHODCALLTYPE
d3d10_effect_variable_SetRawValue(ID3D10EffectVariable
*iface
,
3045 void *data
, UINT offset
, UINT count
)
3047 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
3052 static HRESULT STDMETHODCALLTYPE
d3d10_effect_variable_GetRawValue(ID3D10EffectVariable
*iface
,
3053 void *data
, UINT offset
, UINT count
)
3055 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
3060 static const struct ID3D10EffectVariableVtbl d3d10_effect_variable_vtbl
=
3062 /* ID3D10EffectVariable methods */
3063 d3d10_effect_variable_IsValid
,
3064 d3d10_effect_variable_GetType
,
3065 d3d10_effect_variable_GetDesc
,
3066 d3d10_effect_variable_GetAnnotationByIndex
,
3067 d3d10_effect_variable_GetAnnotationByName
,
3068 d3d10_effect_variable_GetMemberByIndex
,
3069 d3d10_effect_variable_GetMemberByName
,
3070 d3d10_effect_variable_GetMemberBySemantic
,
3071 d3d10_effect_variable_GetElement
,
3072 d3d10_effect_variable_GetParentConstantBuffer
,
3073 d3d10_effect_variable_AsScalar
,
3074 d3d10_effect_variable_AsVector
,
3075 d3d10_effect_variable_AsMatrix
,
3076 d3d10_effect_variable_AsString
,
3077 d3d10_effect_variable_AsShaderResource
,
3078 d3d10_effect_variable_AsRenderTargetView
,
3079 d3d10_effect_variable_AsDepthStencilView
,
3080 d3d10_effect_variable_AsConstantBuffer
,
3081 d3d10_effect_variable_AsShader
,
3082 d3d10_effect_variable_AsBlend
,
3083 d3d10_effect_variable_AsDepthStencil
,
3084 d3d10_effect_variable_AsRasterizer
,
3085 d3d10_effect_variable_AsSampler
,
3086 d3d10_effect_variable_SetRawValue
,
3087 d3d10_effect_variable_GetRawValue
,
3090 /* ID3D10EffectVariable methods */
3091 static BOOL STDMETHODCALLTYPE
d3d10_effect_constant_buffer_IsValid(ID3D10EffectConstantBuffer
*iface
)
3093 TRACE("iface %p\n", iface
);
3095 return (struct d3d10_effect_variable
*)iface
!= &null_local_buffer
;
3098 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetType(ID3D10EffectConstantBuffer
*iface
)
3100 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
3103 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetDesc(ID3D10EffectConstantBuffer
*iface
,
3104 D3D10_EFFECT_VARIABLE_DESC
*desc
)
3106 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
3109 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetAnnotationByIndex(
3110 ID3D10EffectConstantBuffer
*iface
, UINT index
)
3112 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
3115 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetAnnotationByName(
3116 ID3D10EffectConstantBuffer
*iface
, LPCSTR name
)
3118 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
3121 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetMemberByIndex(
3122 ID3D10EffectConstantBuffer
*iface
, UINT index
)
3124 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
3127 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetMemberByName(
3128 ID3D10EffectConstantBuffer
*iface
, LPCSTR name
)
3130 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
3133 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetMemberBySemantic(
3134 ID3D10EffectConstantBuffer
*iface
, LPCSTR semantic
)
3136 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
3139 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetElement(
3140 ID3D10EffectConstantBuffer
*iface
, UINT index
)
3142 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
3145 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetParentConstantBuffer(
3146 ID3D10EffectConstantBuffer
*iface
)
3148 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
3151 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsScalar(
3152 ID3D10EffectConstantBuffer
*iface
)
3154 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
3157 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsVector(
3158 ID3D10EffectConstantBuffer
*iface
)
3160 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
3163 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsMatrix(
3164 ID3D10EffectConstantBuffer
*iface
)
3166 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
3169 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsString(
3170 ID3D10EffectConstantBuffer
*iface
)
3172 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
3175 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsShaderResource(
3176 ID3D10EffectConstantBuffer
*iface
)
3178 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
3181 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsRenderTargetView(
3182 ID3D10EffectConstantBuffer
*iface
)
3184 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
3187 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsDepthStencilView(
3188 ID3D10EffectConstantBuffer
*iface
)
3190 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
3193 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsConstantBuffer(
3194 ID3D10EffectConstantBuffer
*iface
)
3196 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
3199 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsShader(
3200 ID3D10EffectConstantBuffer
*iface
)
3202 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
3205 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsBlend(ID3D10EffectConstantBuffer
*iface
)
3207 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
3210 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsDepthStencil(
3211 ID3D10EffectConstantBuffer
*iface
)
3213 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
3216 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsRasterizer(
3217 ID3D10EffectConstantBuffer
*iface
)
3219 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
3222 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsSampler(
3223 ID3D10EffectConstantBuffer
*iface
)
3225 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
3228 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_SetRawValue(ID3D10EffectConstantBuffer
*iface
,
3229 void *data
, UINT offset
, UINT count
)
3231 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3234 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetRawValue(ID3D10EffectConstantBuffer
*iface
,
3235 void *data
, UINT offset
, UINT count
)
3237 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3240 /* ID3D10EffectConstantBuffer methods */
3241 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_SetConstantBuffer(ID3D10EffectConstantBuffer
*iface
,
3242 ID3D10Buffer
*buffer
)
3244 FIXME("iface %p, buffer %p stub!\n", iface
, buffer
);
3249 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetConstantBuffer(ID3D10EffectConstantBuffer
*iface
,
3250 ID3D10Buffer
**buffer
)
3252 FIXME("iface %p, buffer %p stub!\n", iface
, buffer
);
3257 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_SetTextureBuffer(ID3D10EffectConstantBuffer
*iface
,
3258 ID3D10ShaderResourceView
*view
)
3260 FIXME("iface %p, view %p stub!\n", iface
, view
);
3265 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetTextureBuffer(ID3D10EffectConstantBuffer
*iface
,
3266 ID3D10ShaderResourceView
**view
)
3268 FIXME("iface %p, view %p stub!\n", iface
, view
);
3273 static const struct ID3D10EffectConstantBufferVtbl d3d10_effect_constant_buffer_vtbl
=
3275 /* ID3D10EffectVariable methods */
3276 d3d10_effect_constant_buffer_IsValid
,
3277 d3d10_effect_constant_buffer_GetType
,
3278 d3d10_effect_constant_buffer_GetDesc
,
3279 d3d10_effect_constant_buffer_GetAnnotationByIndex
,
3280 d3d10_effect_constant_buffer_GetAnnotationByName
,
3281 d3d10_effect_constant_buffer_GetMemberByIndex
,
3282 d3d10_effect_constant_buffer_GetMemberByName
,
3283 d3d10_effect_constant_buffer_GetMemberBySemantic
,
3284 d3d10_effect_constant_buffer_GetElement
,
3285 d3d10_effect_constant_buffer_GetParentConstantBuffer
,
3286 d3d10_effect_constant_buffer_AsScalar
,
3287 d3d10_effect_constant_buffer_AsVector
,
3288 d3d10_effect_constant_buffer_AsMatrix
,
3289 d3d10_effect_constant_buffer_AsString
,
3290 d3d10_effect_constant_buffer_AsShaderResource
,
3291 d3d10_effect_constant_buffer_AsRenderTargetView
,
3292 d3d10_effect_constant_buffer_AsDepthStencilView
,
3293 d3d10_effect_constant_buffer_AsConstantBuffer
,
3294 d3d10_effect_constant_buffer_AsShader
,
3295 d3d10_effect_constant_buffer_AsBlend
,
3296 d3d10_effect_constant_buffer_AsDepthStencil
,
3297 d3d10_effect_constant_buffer_AsRasterizer
,
3298 d3d10_effect_constant_buffer_AsSampler
,
3299 d3d10_effect_constant_buffer_SetRawValue
,
3300 d3d10_effect_constant_buffer_GetRawValue
,
3301 /* ID3D10EffectConstantBuffer methods */
3302 d3d10_effect_constant_buffer_SetConstantBuffer
,
3303 d3d10_effect_constant_buffer_GetConstantBuffer
,
3304 d3d10_effect_constant_buffer_SetTextureBuffer
,
3305 d3d10_effect_constant_buffer_GetTextureBuffer
,
3308 /* ID3D10EffectVariable methods */
3310 static BOOL STDMETHODCALLTYPE
d3d10_effect_scalar_variable_IsValid(ID3D10EffectScalarVariable
*iface
)
3312 TRACE("iface %p\n", iface
);
3314 return (struct d3d10_effect_variable
*)iface
!= &null_scalar_variable
;
3317 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetType(
3318 ID3D10EffectScalarVariable
*iface
)
3320 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
3323 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetDesc(ID3D10EffectScalarVariable
*iface
,
3324 D3D10_EFFECT_VARIABLE_DESC
*desc
)
3326 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
3329 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetAnnotationByIndex(
3330 ID3D10EffectScalarVariable
*iface
, UINT index
)
3332 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
3335 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetAnnotationByName(
3336 ID3D10EffectScalarVariable
*iface
, LPCSTR name
)
3338 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
3341 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetMemberByIndex(
3342 ID3D10EffectScalarVariable
*iface
, UINT index
)
3344 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
3347 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetMemberByName(
3348 ID3D10EffectScalarVariable
*iface
, LPCSTR name
)
3350 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
3353 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetMemberBySemantic(
3354 ID3D10EffectScalarVariable
*iface
, LPCSTR semantic
)
3356 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
3359 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetElement(
3360 ID3D10EffectScalarVariable
*iface
, UINT index
)
3362 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
3365 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetParentConstantBuffer(
3366 ID3D10EffectScalarVariable
*iface
)
3368 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
3371 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsScalar(
3372 ID3D10EffectScalarVariable
*iface
)
3374 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
3377 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsVector(
3378 ID3D10EffectScalarVariable
*iface
)
3380 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
3383 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsMatrix(
3384 ID3D10EffectScalarVariable
*iface
)
3386 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
3389 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsString(
3390 ID3D10EffectScalarVariable
*iface
)
3392 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
3395 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsShaderResource(
3396 ID3D10EffectScalarVariable
*iface
)
3398 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
3401 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsRenderTargetView(
3402 ID3D10EffectScalarVariable
*iface
)
3404 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
3407 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsDepthStencilView(
3408 ID3D10EffectScalarVariable
*iface
)
3410 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
3413 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsConstantBuffer(
3414 ID3D10EffectScalarVariable
*iface
)
3416 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
3419 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsShader(
3420 ID3D10EffectScalarVariable
*iface
)
3422 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
3425 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsBlend(
3426 ID3D10EffectScalarVariable
*iface
)
3428 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
3431 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsDepthStencil(
3432 ID3D10EffectScalarVariable
*iface
)
3434 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
3437 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsRasterizer(
3438 ID3D10EffectScalarVariable
*iface
)
3440 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
3443 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsSampler(
3444 ID3D10EffectScalarVariable
*iface
)
3446 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
3449 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetRawValue(ID3D10EffectScalarVariable
*iface
,
3450 void *data
, UINT offset
, UINT count
)
3452 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3455 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetRawValue(ID3D10EffectScalarVariable
*iface
,
3456 void *data
, UINT offset
, UINT count
)
3458 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3461 /* ID3D10EffectScalarVariable methods */
3463 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetFloat(ID3D10EffectScalarVariable
*iface
,
3466 FIXME("iface %p, value %.8e stub!\n", iface
, value
);
3471 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetFloat(ID3D10EffectScalarVariable
*iface
,
3474 FIXME("iface %p, value %p stub!\n", iface
, value
);
3479 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetFloatArray(ID3D10EffectScalarVariable
*iface
,
3480 float *values
, UINT offset
, UINT count
)
3482 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3487 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetFloatArray(ID3D10EffectScalarVariable
*iface
,
3488 float *values
, UINT offset
, UINT count
)
3490 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3495 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetInt(ID3D10EffectScalarVariable
*iface
,
3498 FIXME("iface %p, value %d stub!\n", iface
, value
);
3503 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetInt(ID3D10EffectScalarVariable
*iface
,
3506 FIXME("iface %p, value %p stub!\n", iface
, value
);
3511 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetIntArray(ID3D10EffectScalarVariable
*iface
,
3512 int *values
, UINT offset
, UINT count
)
3514 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3519 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetIntArray(ID3D10EffectScalarVariable
*iface
,
3520 int *values
, UINT offset
, UINT count
)
3522 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3527 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetBool(ID3D10EffectScalarVariable
*iface
,
3530 FIXME("iface %p, value %d stub!\n", iface
, value
);
3535 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetBool(ID3D10EffectScalarVariable
*iface
,
3538 FIXME("iface %p, value %p stub!\n", iface
, value
);
3543 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetBoolArray(ID3D10EffectScalarVariable
*iface
,
3544 BOOL
*values
, UINT offset
, UINT count
)
3546 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3551 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetBoolArray(ID3D10EffectScalarVariable
*iface
,
3552 BOOL
*values
, UINT offset
, UINT count
)
3554 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3559 static const struct ID3D10EffectScalarVariableVtbl d3d10_effect_scalar_variable_vtbl
=
3561 /* ID3D10EffectVariable methods */
3562 d3d10_effect_scalar_variable_IsValid
,
3563 d3d10_effect_scalar_variable_GetType
,
3564 d3d10_effect_scalar_variable_GetDesc
,
3565 d3d10_effect_scalar_variable_GetAnnotationByIndex
,
3566 d3d10_effect_scalar_variable_GetAnnotationByName
,
3567 d3d10_effect_scalar_variable_GetMemberByIndex
,
3568 d3d10_effect_scalar_variable_GetMemberByName
,
3569 d3d10_effect_scalar_variable_GetMemberBySemantic
,
3570 d3d10_effect_scalar_variable_GetElement
,
3571 d3d10_effect_scalar_variable_GetParentConstantBuffer
,
3572 d3d10_effect_scalar_variable_AsScalar
,
3573 d3d10_effect_scalar_variable_AsVector
,
3574 d3d10_effect_scalar_variable_AsMatrix
,
3575 d3d10_effect_scalar_variable_AsString
,
3576 d3d10_effect_scalar_variable_AsShaderResource
,
3577 d3d10_effect_scalar_variable_AsRenderTargetView
,
3578 d3d10_effect_scalar_variable_AsDepthStencilView
,
3579 d3d10_effect_scalar_variable_AsConstantBuffer
,
3580 d3d10_effect_scalar_variable_AsShader
,
3581 d3d10_effect_scalar_variable_AsBlend
,
3582 d3d10_effect_scalar_variable_AsDepthStencil
,
3583 d3d10_effect_scalar_variable_AsRasterizer
,
3584 d3d10_effect_scalar_variable_AsSampler
,
3585 d3d10_effect_scalar_variable_SetRawValue
,
3586 d3d10_effect_scalar_variable_GetRawValue
,
3587 /* ID3D10EffectScalarVariable methods */
3588 d3d10_effect_scalar_variable_SetFloat
,
3589 d3d10_effect_scalar_variable_GetFloat
,
3590 d3d10_effect_scalar_variable_SetFloatArray
,
3591 d3d10_effect_scalar_variable_GetFloatArray
,
3592 d3d10_effect_scalar_variable_SetInt
,
3593 d3d10_effect_scalar_variable_GetInt
,
3594 d3d10_effect_scalar_variable_SetIntArray
,
3595 d3d10_effect_scalar_variable_GetIntArray
,
3596 d3d10_effect_scalar_variable_SetBool
,
3597 d3d10_effect_scalar_variable_GetBool
,
3598 d3d10_effect_scalar_variable_SetBoolArray
,
3599 d3d10_effect_scalar_variable_GetBoolArray
,
3602 /* ID3D10EffectVariable methods */
3604 static BOOL STDMETHODCALLTYPE
d3d10_effect_vector_variable_IsValid(ID3D10EffectVectorVariable
*iface
)
3606 TRACE("iface %p\n", iface
);
3608 return (struct d3d10_effect_variable
*)iface
!= &null_vector_variable
;
3611 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetType(
3612 ID3D10EffectVectorVariable
*iface
)
3614 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
3617 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetDesc(ID3D10EffectVectorVariable
*iface
,
3618 D3D10_EFFECT_VARIABLE_DESC
*desc
)
3620 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
3623 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetAnnotationByIndex(
3624 ID3D10EffectVectorVariable
*iface
, UINT index
)
3626 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
3629 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetAnnotationByName(
3630 ID3D10EffectVectorVariable
*iface
, LPCSTR name
)
3632 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
3635 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetMemberByIndex(
3636 ID3D10EffectVectorVariable
*iface
, UINT index
)
3638 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
3641 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetMemberByName(
3642 ID3D10EffectVectorVariable
*iface
, LPCSTR name
)
3644 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
3647 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetMemberBySemantic(
3648 ID3D10EffectVectorVariable
*iface
, LPCSTR semantic
)
3650 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
3653 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetElement(
3654 ID3D10EffectVectorVariable
*iface
, UINT index
)
3656 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
3659 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetParentConstantBuffer(
3660 ID3D10EffectVectorVariable
*iface
)
3662 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
3665 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsScalar(
3666 ID3D10EffectVectorVariable
*iface
)
3668 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
3671 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsVector(
3672 ID3D10EffectVectorVariable
*iface
)
3674 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
3677 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsMatrix(
3678 ID3D10EffectVectorVariable
*iface
)
3680 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
3683 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsString(
3684 ID3D10EffectVectorVariable
*iface
)
3686 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
3689 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsShaderResource(
3690 ID3D10EffectVectorVariable
*iface
)
3692 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
3695 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsRenderTargetView(
3696 ID3D10EffectVectorVariable
*iface
)
3698 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
3701 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsDepthStencilView(
3702 ID3D10EffectVectorVariable
*iface
)
3704 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
3707 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsConstantBuffer(
3708 ID3D10EffectVectorVariable
*iface
)
3710 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
3713 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsShader(
3714 ID3D10EffectVectorVariable
*iface
)
3716 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
3719 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsBlend(
3720 ID3D10EffectVectorVariable
*iface
)
3722 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
3725 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsDepthStencil(
3726 ID3D10EffectVectorVariable
*iface
)
3728 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
3731 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsRasterizer(
3732 ID3D10EffectVectorVariable
*iface
)
3734 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
3737 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsSampler(
3738 ID3D10EffectVectorVariable
*iface
)
3740 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
3743 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetRawValue(ID3D10EffectVectorVariable
*iface
,
3744 void *data
, UINT offset
, UINT count
)
3746 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3749 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetRawValue(ID3D10EffectVectorVariable
*iface
,
3750 void *data
, UINT offset
, UINT count
)
3752 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3755 /* ID3D10EffectVectorVariable methods */
3757 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetBoolVector(ID3D10EffectVectorVariable
*iface
,
3760 FIXME("iface %p, value %p stub!\n", iface
, value
);
3765 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetIntVector(ID3D10EffectVectorVariable
*iface
,
3768 FIXME("iface %p, value %p stub!\n", iface
, value
);
3773 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetFloatVector(ID3D10EffectVectorVariable
*iface
,
3776 FIXME("iface %p, value %p stub!\n", iface
, value
);
3781 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetBoolVector(ID3D10EffectVectorVariable
*iface
,
3784 FIXME("iface %p, value %p stub!\n", iface
, value
);
3789 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetIntVector(ID3D10EffectVectorVariable
*iface
,
3792 FIXME("iface %p, value %p stub!\n", iface
, value
);
3797 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetFloatVector(ID3D10EffectVectorVariable
*iface
,
3800 FIXME("iface %p, value %p stub!\n", iface
, value
);
3805 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetBoolVectorArray(ID3D10EffectVectorVariable
*iface
,
3806 BOOL
*values
, UINT offset
, UINT count
)
3808 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3813 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetIntVectorArray(ID3D10EffectVectorVariable
*iface
,
3814 int *values
, UINT offset
, UINT count
)
3816 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3821 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetFloatVectorArray(ID3D10EffectVectorVariable
*iface
,
3822 float *values
, UINT offset
, UINT count
)
3824 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3829 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetBoolVectorArray(ID3D10EffectVectorVariable
*iface
,
3830 BOOL
*values
, UINT offset
, UINT count
)
3832 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3837 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetIntVectorArray(ID3D10EffectVectorVariable
*iface
,
3838 int *values
, UINT offset
, UINT count
)
3840 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3845 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetFloatVectorArray(ID3D10EffectVectorVariable
*iface
,
3846 float *values
, UINT offset
, UINT count
)
3848 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3853 static const struct ID3D10EffectVectorVariableVtbl d3d10_effect_vector_variable_vtbl
=
3855 /* ID3D10EffectVariable methods */
3856 d3d10_effect_vector_variable_IsValid
,
3857 d3d10_effect_vector_variable_GetType
,
3858 d3d10_effect_vector_variable_GetDesc
,
3859 d3d10_effect_vector_variable_GetAnnotationByIndex
,
3860 d3d10_effect_vector_variable_GetAnnotationByName
,
3861 d3d10_effect_vector_variable_GetMemberByIndex
,
3862 d3d10_effect_vector_variable_GetMemberByName
,
3863 d3d10_effect_vector_variable_GetMemberBySemantic
,
3864 d3d10_effect_vector_variable_GetElement
,
3865 d3d10_effect_vector_variable_GetParentConstantBuffer
,
3866 d3d10_effect_vector_variable_AsScalar
,
3867 d3d10_effect_vector_variable_AsVector
,
3868 d3d10_effect_vector_variable_AsMatrix
,
3869 d3d10_effect_vector_variable_AsString
,
3870 d3d10_effect_vector_variable_AsShaderResource
,
3871 d3d10_effect_vector_variable_AsRenderTargetView
,
3872 d3d10_effect_vector_variable_AsDepthStencilView
,
3873 d3d10_effect_vector_variable_AsConstantBuffer
,
3874 d3d10_effect_vector_variable_AsShader
,
3875 d3d10_effect_vector_variable_AsBlend
,
3876 d3d10_effect_vector_variable_AsDepthStencil
,
3877 d3d10_effect_vector_variable_AsRasterizer
,
3878 d3d10_effect_vector_variable_AsSampler
,
3879 d3d10_effect_vector_variable_SetRawValue
,
3880 d3d10_effect_vector_variable_GetRawValue
,
3881 /* ID3D10EffectVectorVariable methods */
3882 d3d10_effect_vector_variable_SetBoolVector
,
3883 d3d10_effect_vector_variable_SetIntVector
,
3884 d3d10_effect_vector_variable_SetFloatVector
,
3885 d3d10_effect_vector_variable_GetBoolVector
,
3886 d3d10_effect_vector_variable_GetIntVector
,
3887 d3d10_effect_vector_variable_GetFloatVector
,
3888 d3d10_effect_vector_variable_SetBoolVectorArray
,
3889 d3d10_effect_vector_variable_SetIntVectorArray
,
3890 d3d10_effect_vector_variable_SetFloatVectorArray
,
3891 d3d10_effect_vector_variable_GetBoolVectorArray
,
3892 d3d10_effect_vector_variable_GetIntVectorArray
,
3893 d3d10_effect_vector_variable_GetFloatVectorArray
,
3896 /* ID3D10EffectVariable methods */
3898 static BOOL STDMETHODCALLTYPE
d3d10_effect_matrix_variable_IsValid(ID3D10EffectMatrixVariable
*iface
)
3900 TRACE("iface %p\n", iface
);
3902 return (struct d3d10_effect_variable
*)iface
!= &null_matrix_variable
;
3905 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetType(
3906 ID3D10EffectMatrixVariable
*iface
)
3908 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
3911 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetDesc(ID3D10EffectMatrixVariable
*iface
,
3912 D3D10_EFFECT_VARIABLE_DESC
*desc
)
3914 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
3917 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetAnnotationByIndex(
3918 ID3D10EffectMatrixVariable
*iface
, UINT index
)
3920 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
3923 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetAnnotationByName(
3924 ID3D10EffectMatrixVariable
*iface
, LPCSTR name
)
3926 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
3929 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMemberByIndex(
3930 ID3D10EffectMatrixVariable
*iface
, UINT index
)
3932 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
3935 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMemberByName(
3936 ID3D10EffectMatrixVariable
*iface
, LPCSTR name
)
3938 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
3941 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMemberBySemantic(
3942 ID3D10EffectMatrixVariable
*iface
, LPCSTR semantic
)
3944 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
3947 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetElement(
3948 ID3D10EffectMatrixVariable
*iface
, UINT index
)
3950 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
3953 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetParentConstantBuffer(
3954 ID3D10EffectMatrixVariable
*iface
)
3956 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
3959 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsScalar(
3960 ID3D10EffectMatrixVariable
*iface
)
3962 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
3965 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsVector(
3966 ID3D10EffectMatrixVariable
*iface
)
3968 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
3971 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsMatrix(
3972 ID3D10EffectMatrixVariable
*iface
)
3974 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
3977 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsString(
3978 ID3D10EffectMatrixVariable
*iface
)
3980 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
3983 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsShaderResource(
3984 ID3D10EffectMatrixVariable
*iface
)
3986 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
3989 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsRenderTargetView(
3990 ID3D10EffectMatrixVariable
*iface
)
3992 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
3995 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsDepthStencilView(
3996 ID3D10EffectMatrixVariable
*iface
)
3998 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
4001 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsConstantBuffer(
4002 ID3D10EffectMatrixVariable
*iface
)
4004 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
4007 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsShader(
4008 ID3D10EffectMatrixVariable
*iface
)
4010 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
4013 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsBlend(
4014 ID3D10EffectMatrixVariable
*iface
)
4016 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
4019 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsDepthStencil(
4020 ID3D10EffectMatrixVariable
*iface
)
4022 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
4025 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsRasterizer(
4026 ID3D10EffectMatrixVariable
*iface
)
4028 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
4031 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsSampler(
4032 ID3D10EffectMatrixVariable
*iface
)
4034 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
4037 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetRawValue(ID3D10EffectMatrixVariable
*iface
,
4038 void *data
, UINT offset
, UINT count
)
4040 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4043 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetRawValue(ID3D10EffectMatrixVariable
*iface
,
4044 void *data
, UINT offset
, UINT count
)
4046 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4049 /* ID3D10EffectMatrixVariable methods */
4051 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetMatrix(ID3D10EffectMatrixVariable
*iface
,
4054 FIXME("iface %p, data %p stub!\n", iface
, data
);
4059 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMatrix(ID3D10EffectMatrixVariable
*iface
,
4062 FIXME("iface %p, data %p stub!\n", iface
, data
);
4067 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetMatrixArray(ID3D10EffectMatrixVariable
*iface
,
4068 float *data
, UINT offset
, UINT count
)
4070 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
4075 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMatrixArray(ID3D10EffectMatrixVariable
*iface
,
4076 float *data
, UINT offset
, UINT count
)
4078 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
4083 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetMatrixTranspose(ID3D10EffectMatrixVariable
*iface
,
4086 FIXME("iface %p, data %p stub!\n", iface
, data
);
4091 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMatrixTranspose(ID3D10EffectMatrixVariable
*iface
,
4094 FIXME("iface %p, data %p stub!\n", iface
, data
);
4099 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetMatrixTransposeArray(ID3D10EffectMatrixVariable
*iface
,
4100 float *data
, UINT offset
, UINT count
)
4102 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
4107 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMatrixTransposeArray(ID3D10EffectMatrixVariable
*iface
,
4108 float *data
, UINT offset
, UINT count
)
4110 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
4116 static const struct ID3D10EffectMatrixVariableVtbl d3d10_effect_matrix_variable_vtbl
=
4118 /* ID3D10EffectVariable methods */
4119 d3d10_effect_matrix_variable_IsValid
,
4120 d3d10_effect_matrix_variable_GetType
,
4121 d3d10_effect_matrix_variable_GetDesc
,
4122 d3d10_effect_matrix_variable_GetAnnotationByIndex
,
4123 d3d10_effect_matrix_variable_GetAnnotationByName
,
4124 d3d10_effect_matrix_variable_GetMemberByIndex
,
4125 d3d10_effect_matrix_variable_GetMemberByName
,
4126 d3d10_effect_matrix_variable_GetMemberBySemantic
,
4127 d3d10_effect_matrix_variable_GetElement
,
4128 d3d10_effect_matrix_variable_GetParentConstantBuffer
,
4129 d3d10_effect_matrix_variable_AsScalar
,
4130 d3d10_effect_matrix_variable_AsVector
,
4131 d3d10_effect_matrix_variable_AsMatrix
,
4132 d3d10_effect_matrix_variable_AsString
,
4133 d3d10_effect_matrix_variable_AsShaderResource
,
4134 d3d10_effect_matrix_variable_AsRenderTargetView
,
4135 d3d10_effect_matrix_variable_AsDepthStencilView
,
4136 d3d10_effect_matrix_variable_AsConstantBuffer
,
4137 d3d10_effect_matrix_variable_AsShader
,
4138 d3d10_effect_matrix_variable_AsBlend
,
4139 d3d10_effect_matrix_variable_AsDepthStencil
,
4140 d3d10_effect_matrix_variable_AsRasterizer
,
4141 d3d10_effect_matrix_variable_AsSampler
,
4142 d3d10_effect_matrix_variable_SetRawValue
,
4143 d3d10_effect_matrix_variable_GetRawValue
,
4144 /* ID3D10EffectMatrixVariable methods */
4145 d3d10_effect_matrix_variable_SetMatrix
,
4146 d3d10_effect_matrix_variable_GetMatrix
,
4147 d3d10_effect_matrix_variable_SetMatrixArray
,
4148 d3d10_effect_matrix_variable_GetMatrixArray
,
4149 d3d10_effect_matrix_variable_SetMatrixTranspose
,
4150 d3d10_effect_matrix_variable_GetMatrixTranspose
,
4151 d3d10_effect_matrix_variable_SetMatrixTransposeArray
,
4152 d3d10_effect_matrix_variable_GetMatrixTransposeArray
,
4155 /* ID3D10EffectVariable methods */
4157 static BOOL STDMETHODCALLTYPE
d3d10_effect_string_variable_IsValid(ID3D10EffectStringVariable
*iface
)
4159 TRACE("iface %p\n", iface
);
4161 return (struct d3d10_effect_variable
*)iface
!= &null_string_variable
;
4164 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetType(
4165 ID3D10EffectStringVariable
*iface
)
4167 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
4170 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_GetDesc(ID3D10EffectStringVariable
*iface
,
4171 D3D10_EFFECT_VARIABLE_DESC
*desc
)
4173 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
4176 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetAnnotationByIndex(
4177 ID3D10EffectStringVariable
*iface
, UINT index
)
4179 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
4182 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetAnnotationByName(
4183 ID3D10EffectStringVariable
*iface
, LPCSTR name
)
4185 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
4188 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetMemberByIndex(
4189 ID3D10EffectStringVariable
*iface
, UINT index
)
4191 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
4194 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetMemberByName(
4195 ID3D10EffectStringVariable
*iface
, LPCSTR name
)
4197 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
4200 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetMemberBySemantic(
4201 ID3D10EffectStringVariable
*iface
, LPCSTR semantic
)
4203 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
4206 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetElement(
4207 ID3D10EffectStringVariable
*iface
, UINT index
)
4209 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
4212 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetParentConstantBuffer(
4213 ID3D10EffectStringVariable
*iface
)
4215 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
4218 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsScalar(
4219 ID3D10EffectStringVariable
*iface
)
4221 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
4224 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsVector(
4225 ID3D10EffectStringVariable
*iface
)
4227 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
4230 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsMatrix(
4231 ID3D10EffectStringVariable
*iface
)
4233 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
4236 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsString(
4237 ID3D10EffectStringVariable
*iface
)
4239 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
4242 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsShaderResource(
4243 ID3D10EffectStringVariable
*iface
)
4245 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
4248 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsRenderTargetView(
4249 ID3D10EffectStringVariable
*iface
)
4251 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
4254 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsDepthStencilView(
4255 ID3D10EffectStringVariable
*iface
)
4257 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
4260 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsConstantBuffer(
4261 ID3D10EffectStringVariable
*iface
)
4263 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
4266 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsShader(
4267 ID3D10EffectStringVariable
*iface
)
4269 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
4272 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsBlend(
4273 ID3D10EffectStringVariable
*iface
)
4275 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
4278 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsDepthStencil(
4279 ID3D10EffectStringVariable
*iface
)
4281 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
4284 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsRasterizer(
4285 ID3D10EffectStringVariable
*iface
)
4287 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
4290 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsSampler(
4291 ID3D10EffectStringVariable
*iface
)
4293 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
4296 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_SetRawValue(ID3D10EffectStringVariable
*iface
,
4297 void *data
, UINT offset
, UINT count
)
4299 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4302 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_GetRawValue(ID3D10EffectStringVariable
*iface
,
4303 void *data
, UINT offset
, UINT count
)
4305 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4308 /* ID3D10EffectStringVariable methods */
4310 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_GetString(ID3D10EffectStringVariable
*iface
,
4313 FIXME("iface %p, str %p stub!\n", iface
, str
);
4318 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_GetStringArray(ID3D10EffectStringVariable
*iface
,
4319 LPCSTR
*strs
, UINT offset
, UINT count
)
4321 FIXME("iface %p, strs %p, offset %u, count %u stub!\n", iface
, strs
, offset
, count
);
4327 static const struct ID3D10EffectStringVariableVtbl d3d10_effect_string_variable_vtbl
=
4329 /* ID3D10EffectVariable methods */
4330 d3d10_effect_string_variable_IsValid
,
4331 d3d10_effect_string_variable_GetType
,
4332 d3d10_effect_string_variable_GetDesc
,
4333 d3d10_effect_string_variable_GetAnnotationByIndex
,
4334 d3d10_effect_string_variable_GetAnnotationByName
,
4335 d3d10_effect_string_variable_GetMemberByIndex
,
4336 d3d10_effect_string_variable_GetMemberByName
,
4337 d3d10_effect_string_variable_GetMemberBySemantic
,
4338 d3d10_effect_string_variable_GetElement
,
4339 d3d10_effect_string_variable_GetParentConstantBuffer
,
4340 d3d10_effect_string_variable_AsScalar
,
4341 d3d10_effect_string_variable_AsVector
,
4342 d3d10_effect_string_variable_AsMatrix
,
4343 d3d10_effect_string_variable_AsString
,
4344 d3d10_effect_string_variable_AsShaderResource
,
4345 d3d10_effect_string_variable_AsRenderTargetView
,
4346 d3d10_effect_string_variable_AsDepthStencilView
,
4347 d3d10_effect_string_variable_AsConstantBuffer
,
4348 d3d10_effect_string_variable_AsShader
,
4349 d3d10_effect_string_variable_AsBlend
,
4350 d3d10_effect_string_variable_AsDepthStencil
,
4351 d3d10_effect_string_variable_AsRasterizer
,
4352 d3d10_effect_string_variable_AsSampler
,
4353 d3d10_effect_string_variable_SetRawValue
,
4354 d3d10_effect_string_variable_GetRawValue
,
4355 /* ID3D10EffectStringVariable methods */
4356 d3d10_effect_string_variable_GetString
,
4357 d3d10_effect_string_variable_GetStringArray
,
4360 /* ID3D10EffectVariable methods */
4362 static BOOL STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_IsValid(ID3D10EffectShaderResourceVariable
*iface
)
4364 TRACE("iface %p\n", iface
);
4366 return (struct d3d10_effect_variable
*)iface
!= &null_shader_resource_variable
;
4369 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetType(
4370 ID3D10EffectShaderResourceVariable
*iface
)
4372 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
4375 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetDesc(
4376 ID3D10EffectShaderResourceVariable
*iface
, D3D10_EFFECT_VARIABLE_DESC
*desc
)
4378 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
4381 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetAnnotationByIndex(
4382 ID3D10EffectShaderResourceVariable
*iface
, UINT index
)
4384 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
4387 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetAnnotationByName(
4388 ID3D10EffectShaderResourceVariable
*iface
, LPCSTR name
)
4390 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
4393 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetMemberByIndex(
4394 ID3D10EffectShaderResourceVariable
*iface
, UINT index
)
4396 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
4399 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetMemberByName(
4400 ID3D10EffectShaderResourceVariable
*iface
, LPCSTR name
)
4402 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
4405 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetMemberBySemantic(
4406 ID3D10EffectShaderResourceVariable
*iface
, LPCSTR semantic
)
4408 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
4411 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetElement(
4412 ID3D10EffectShaderResourceVariable
*iface
, UINT index
)
4414 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
4417 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetParentConstantBuffer(
4418 ID3D10EffectShaderResourceVariable
*iface
)
4420 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
4423 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsScalar(
4424 ID3D10EffectShaderResourceVariable
*iface
)
4426 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
4429 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsVector(
4430 ID3D10EffectShaderResourceVariable
*iface
)
4432 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
4435 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsMatrix(
4436 ID3D10EffectShaderResourceVariable
*iface
)
4438 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
4441 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsString(
4442 ID3D10EffectShaderResourceVariable
*iface
)
4444 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
4447 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsShaderResource(
4448 ID3D10EffectShaderResourceVariable
*iface
)
4450 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
4453 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsRenderTargetView(
4454 ID3D10EffectShaderResourceVariable
*iface
)
4456 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
4459 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsDepthStencilView(
4460 ID3D10EffectShaderResourceVariable
*iface
)
4462 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
4465 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsConstantBuffer(
4466 ID3D10EffectShaderResourceVariable
*iface
)
4468 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
4471 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsShader(
4472 ID3D10EffectShaderResourceVariable
*iface
)
4474 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
4477 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsBlend(
4478 ID3D10EffectShaderResourceVariable
*iface
)
4480 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
4483 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsDepthStencil(
4484 ID3D10EffectShaderResourceVariable
*iface
)
4486 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
4489 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsRasterizer(
4490 ID3D10EffectShaderResourceVariable
*iface
)
4492 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
4495 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsSampler(
4496 ID3D10EffectShaderResourceVariable
*iface
)
4498 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
4501 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_SetRawValue(
4502 ID3D10EffectShaderResourceVariable
*iface
, void *data
, UINT offset
, UINT count
)
4504 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4507 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetRawValue(
4508 ID3D10EffectShaderResourceVariable
*iface
, void *data
, UINT offset
, UINT count
)
4510 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4513 /* ID3D10EffectShaderResourceVariable methods */
4515 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_SetResource(
4516 ID3D10EffectShaderResourceVariable
*iface
, ID3D10ShaderResourceView
*resource
)
4518 FIXME("iface %p, resource %p stub!\n", iface
, resource
);
4523 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetResource(
4524 ID3D10EffectShaderResourceVariable
*iface
, ID3D10ShaderResourceView
**resource
)
4526 FIXME("iface %p, resource %p stub!\n", iface
, resource
);
4531 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_SetResourceArray(
4532 ID3D10EffectShaderResourceVariable
*iface
, ID3D10ShaderResourceView
**resources
, UINT offset
, UINT count
)
4534 FIXME("iface %p, resources %p, offset %u, count %u stub!\n", iface
, resources
, offset
, count
);
4539 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetResourceArray(
4540 ID3D10EffectShaderResourceVariable
*iface
, ID3D10ShaderResourceView
**resources
, UINT offset
, UINT count
)
4542 FIXME("iface %p, resources %p, offset %u, count %u stub!\n", iface
, resources
, offset
, count
);
4548 static const struct ID3D10EffectShaderResourceVariableVtbl d3d10_effect_shader_resource_variable_vtbl
=
4550 /* ID3D10EffectVariable methods */
4551 d3d10_effect_shader_resource_variable_IsValid
,
4552 d3d10_effect_shader_resource_variable_GetType
,
4553 d3d10_effect_shader_resource_variable_GetDesc
,
4554 d3d10_effect_shader_resource_variable_GetAnnotationByIndex
,
4555 d3d10_effect_shader_resource_variable_GetAnnotationByName
,
4556 d3d10_effect_shader_resource_variable_GetMemberByIndex
,
4557 d3d10_effect_shader_resource_variable_GetMemberByName
,
4558 d3d10_effect_shader_resource_variable_GetMemberBySemantic
,
4559 d3d10_effect_shader_resource_variable_GetElement
,
4560 d3d10_effect_shader_resource_variable_GetParentConstantBuffer
,
4561 d3d10_effect_shader_resource_variable_AsScalar
,
4562 d3d10_effect_shader_resource_variable_AsVector
,
4563 d3d10_effect_shader_resource_variable_AsMatrix
,
4564 d3d10_effect_shader_resource_variable_AsString
,
4565 d3d10_effect_shader_resource_variable_AsShaderResource
,
4566 d3d10_effect_shader_resource_variable_AsRenderTargetView
,
4567 d3d10_effect_shader_resource_variable_AsDepthStencilView
,
4568 d3d10_effect_shader_resource_variable_AsConstantBuffer
,
4569 d3d10_effect_shader_resource_variable_AsShader
,
4570 d3d10_effect_shader_resource_variable_AsBlend
,
4571 d3d10_effect_shader_resource_variable_AsDepthStencil
,
4572 d3d10_effect_shader_resource_variable_AsRasterizer
,
4573 d3d10_effect_shader_resource_variable_AsSampler
,
4574 d3d10_effect_shader_resource_variable_SetRawValue
,
4575 d3d10_effect_shader_resource_variable_GetRawValue
,
4576 /* ID3D10EffectShaderResourceVariable methods */
4577 d3d10_effect_shader_resource_variable_SetResource
,
4578 d3d10_effect_shader_resource_variable_GetResource
,
4579 d3d10_effect_shader_resource_variable_SetResourceArray
,
4580 d3d10_effect_shader_resource_variable_GetResourceArray
,
4583 /* ID3D10EffectVariable methods */
4585 static BOOL STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_IsValid(
4586 ID3D10EffectRenderTargetViewVariable
*iface
)
4588 TRACE("iface %p\n", iface
);
4590 return (struct d3d10_effect_variable
*)iface
!= &null_render_target_view_variable
;
4593 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetType(
4594 ID3D10EffectRenderTargetViewVariable
*iface
)
4596 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
4599 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetDesc(
4600 ID3D10EffectRenderTargetViewVariable
*iface
, D3D10_EFFECT_VARIABLE_DESC
*desc
)
4602 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
4605 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetAnnotationByIndex(
4606 ID3D10EffectRenderTargetViewVariable
*iface
, UINT index
)
4608 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
4611 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetAnnotationByName(
4612 ID3D10EffectRenderTargetViewVariable
*iface
, LPCSTR name
)
4614 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
4617 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetMemberByIndex(
4618 ID3D10EffectRenderTargetViewVariable
*iface
, UINT index
)
4620 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
4623 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetMemberByName(
4624 ID3D10EffectRenderTargetViewVariable
*iface
, LPCSTR name
)
4626 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
4629 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetMemberBySemantic(
4630 ID3D10EffectRenderTargetViewVariable
*iface
, LPCSTR semantic
)
4632 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
4635 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetElement(
4636 ID3D10EffectRenderTargetViewVariable
*iface
, UINT index
)
4638 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
4641 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetParentConstantBuffer(
4642 ID3D10EffectRenderTargetViewVariable
*iface
)
4644 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
4647 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsScalar(
4648 ID3D10EffectRenderTargetViewVariable
*iface
)
4650 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
4653 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsVector(
4654 ID3D10EffectRenderTargetViewVariable
*iface
)
4656 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
4659 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsMatrix(
4660 ID3D10EffectRenderTargetViewVariable
*iface
)
4662 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
4665 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsString(
4666 ID3D10EffectRenderTargetViewVariable
*iface
)
4668 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
4671 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsShaderResource(
4672 ID3D10EffectRenderTargetViewVariable
*iface
)
4674 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
4677 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsRenderTargetView(
4678 ID3D10EffectRenderTargetViewVariable
*iface
)
4680 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
4683 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsDepthStencilView(
4684 ID3D10EffectRenderTargetViewVariable
*iface
)
4686 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
4689 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsConstantBuffer(
4690 ID3D10EffectRenderTargetViewVariable
*iface
)
4692 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
4695 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsShader(
4696 ID3D10EffectRenderTargetViewVariable
*iface
)
4698 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
4701 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsBlend(
4702 ID3D10EffectRenderTargetViewVariable
*iface
)
4704 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
4707 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsDepthStencil(
4708 ID3D10EffectRenderTargetViewVariable
*iface
)
4710 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
4713 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsRasterizer(
4714 ID3D10EffectRenderTargetViewVariable
*iface
)
4716 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
4719 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsSampler(
4720 ID3D10EffectRenderTargetViewVariable
*iface
)
4722 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
4725 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_SetRawValue(
4726 ID3D10EffectRenderTargetViewVariable
*iface
, void *data
, UINT offset
, UINT count
)
4728 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4731 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetRawValue(
4732 ID3D10EffectRenderTargetViewVariable
*iface
, void *data
, UINT offset
, UINT count
)
4734 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4737 /* ID3D10EffectRenderTargetViewVariable methods */
4739 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_SetRenderTarget(
4740 ID3D10EffectRenderTargetViewVariable
*iface
, ID3D10RenderTargetView
*view
)
4742 FIXME("iface %p, view %p stub!\n", iface
, view
);
4747 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetRenderTarget(
4748 ID3D10EffectRenderTargetViewVariable
*iface
, ID3D10RenderTargetView
**view
)
4750 FIXME("iface %p, view %p stub!\n", iface
, view
);
4755 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_SetRenderTargetArray(
4756 ID3D10EffectRenderTargetViewVariable
*iface
, ID3D10RenderTargetView
**views
, UINT offset
, UINT count
)
4758 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface
, views
, offset
, count
);
4763 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetRenderTargetArray(
4764 ID3D10EffectRenderTargetViewVariable
*iface
, ID3D10RenderTargetView
**views
, UINT offset
, UINT count
)
4766 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface
, views
, offset
, count
);
4772 static const struct ID3D10EffectRenderTargetViewVariableVtbl d3d10_effect_render_target_view_variable_vtbl
=
4774 /* ID3D10EffectVariable methods */
4775 d3d10_effect_render_target_view_variable_IsValid
,
4776 d3d10_effect_render_target_view_variable_GetType
,
4777 d3d10_effect_render_target_view_variable_GetDesc
,
4778 d3d10_effect_render_target_view_variable_GetAnnotationByIndex
,
4779 d3d10_effect_render_target_view_variable_GetAnnotationByName
,
4780 d3d10_effect_render_target_view_variable_GetMemberByIndex
,
4781 d3d10_effect_render_target_view_variable_GetMemberByName
,
4782 d3d10_effect_render_target_view_variable_GetMemberBySemantic
,
4783 d3d10_effect_render_target_view_variable_GetElement
,
4784 d3d10_effect_render_target_view_variable_GetParentConstantBuffer
,
4785 d3d10_effect_render_target_view_variable_AsScalar
,
4786 d3d10_effect_render_target_view_variable_AsVector
,
4787 d3d10_effect_render_target_view_variable_AsMatrix
,
4788 d3d10_effect_render_target_view_variable_AsString
,
4789 d3d10_effect_render_target_view_variable_AsShaderResource
,
4790 d3d10_effect_render_target_view_variable_AsRenderTargetView
,
4791 d3d10_effect_render_target_view_variable_AsDepthStencilView
,
4792 d3d10_effect_render_target_view_variable_AsConstantBuffer
,
4793 d3d10_effect_render_target_view_variable_AsShader
,
4794 d3d10_effect_render_target_view_variable_AsBlend
,
4795 d3d10_effect_render_target_view_variable_AsDepthStencil
,
4796 d3d10_effect_render_target_view_variable_AsRasterizer
,
4797 d3d10_effect_render_target_view_variable_AsSampler
,
4798 d3d10_effect_render_target_view_variable_SetRawValue
,
4799 d3d10_effect_render_target_view_variable_GetRawValue
,
4800 /* ID3D10EffectRenderTargetViewVariable methods */
4801 d3d10_effect_render_target_view_variable_SetRenderTarget
,
4802 d3d10_effect_render_target_view_variable_GetRenderTarget
,
4803 d3d10_effect_render_target_view_variable_SetRenderTargetArray
,
4804 d3d10_effect_render_target_view_variable_GetRenderTargetArray
,
4807 /* ID3D10EffectVariable methods */
4809 static BOOL STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_IsValid(
4810 ID3D10EffectDepthStencilViewVariable
*iface
)
4812 TRACE("iface %p\n", iface
);
4814 return (struct d3d10_effect_variable
*)iface
!= &null_depth_stencil_view_variable
;
4817 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetType(
4818 ID3D10EffectDepthStencilViewVariable
*iface
)
4820 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
4823 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetDesc(
4824 ID3D10EffectDepthStencilViewVariable
*iface
, D3D10_EFFECT_VARIABLE_DESC
*desc
)
4826 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
4829 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetAnnotationByIndex(
4830 ID3D10EffectDepthStencilViewVariable
*iface
, UINT index
)
4832 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
4835 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetAnnotationByName(
4836 ID3D10EffectDepthStencilViewVariable
*iface
, LPCSTR name
)
4838 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
4841 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetMemberByIndex(
4842 ID3D10EffectDepthStencilViewVariable
*iface
, UINT index
)
4844 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
4847 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetMemberByName(
4848 ID3D10EffectDepthStencilViewVariable
*iface
, LPCSTR name
)
4850 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
4853 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetMemberBySemantic(
4854 ID3D10EffectDepthStencilViewVariable
*iface
, LPCSTR semantic
)
4856 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
4859 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetElement(
4860 ID3D10EffectDepthStencilViewVariable
*iface
, UINT index
)
4862 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
4865 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetParentConstantBuffer(
4866 ID3D10EffectDepthStencilViewVariable
*iface
)
4868 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
4871 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsScalar(
4872 ID3D10EffectDepthStencilViewVariable
*iface
)
4874 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
4877 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsVector(
4878 ID3D10EffectDepthStencilViewVariable
*iface
)
4880 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
4883 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsMatrix(
4884 ID3D10EffectDepthStencilViewVariable
*iface
)
4886 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
4889 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsString(
4890 ID3D10EffectDepthStencilViewVariable
*iface
)
4892 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
4895 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsShaderResource(
4896 ID3D10EffectDepthStencilViewVariable
*iface
)
4898 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
4901 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsRenderTargetView(
4902 ID3D10EffectDepthStencilViewVariable
*iface
)
4904 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
4907 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsDepthStencilView(
4908 ID3D10EffectDepthStencilViewVariable
*iface
)
4910 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
4913 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsConstantBuffer(
4914 ID3D10EffectDepthStencilViewVariable
*iface
)
4916 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
4919 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsShader(
4920 ID3D10EffectDepthStencilViewVariable
*iface
)
4922 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
4925 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsBlend(
4926 ID3D10EffectDepthStencilViewVariable
*iface
)
4928 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
4931 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsDepthStencil(
4932 ID3D10EffectDepthStencilViewVariable
*iface
)
4934 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
4937 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsRasterizer(
4938 ID3D10EffectDepthStencilViewVariable
*iface
)
4940 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
4943 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsSampler(
4944 ID3D10EffectDepthStencilViewVariable
*iface
)
4946 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
4949 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_SetRawValue(
4950 ID3D10EffectDepthStencilViewVariable
*iface
, void *data
, UINT offset
, UINT count
)
4952 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4955 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetRawValue(
4956 ID3D10EffectDepthStencilViewVariable
*iface
, void *data
, UINT offset
, UINT count
)
4958 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4961 /* ID3D10EffectDepthStencilViewVariable methods */
4963 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_SetDepthStencil(
4964 ID3D10EffectDepthStencilViewVariable
*iface
, ID3D10DepthStencilView
*view
)
4966 FIXME("iface %p, view %p stub!\n", iface
, view
);
4971 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetDepthStencil(
4972 ID3D10EffectDepthStencilViewVariable
*iface
, ID3D10DepthStencilView
**view
)
4974 FIXME("iface %p, view %p stub!\n", iface
, view
);
4979 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_SetDepthStencilArray(
4980 ID3D10EffectDepthStencilViewVariable
*iface
, ID3D10DepthStencilView
**views
, UINT offset
, UINT count
)
4982 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface
, views
, offset
, count
);
4987 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetDepthStencilArray(
4988 ID3D10EffectDepthStencilViewVariable
*iface
, ID3D10DepthStencilView
**views
, UINT offset
, UINT count
)
4990 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface
, views
, offset
, count
);
4996 static const struct ID3D10EffectDepthStencilViewVariableVtbl d3d10_effect_depth_stencil_view_variable_vtbl
=
4998 /* ID3D10EffectVariable methods */
4999 d3d10_effect_depth_stencil_view_variable_IsValid
,
5000 d3d10_effect_depth_stencil_view_variable_GetType
,
5001 d3d10_effect_depth_stencil_view_variable_GetDesc
,
5002 d3d10_effect_depth_stencil_view_variable_GetAnnotationByIndex
,
5003 d3d10_effect_depth_stencil_view_variable_GetAnnotationByName
,
5004 d3d10_effect_depth_stencil_view_variable_GetMemberByIndex
,
5005 d3d10_effect_depth_stencil_view_variable_GetMemberByName
,
5006 d3d10_effect_depth_stencil_view_variable_GetMemberBySemantic
,
5007 d3d10_effect_depth_stencil_view_variable_GetElement
,
5008 d3d10_effect_depth_stencil_view_variable_GetParentConstantBuffer
,
5009 d3d10_effect_depth_stencil_view_variable_AsScalar
,
5010 d3d10_effect_depth_stencil_view_variable_AsVector
,
5011 d3d10_effect_depth_stencil_view_variable_AsMatrix
,
5012 d3d10_effect_depth_stencil_view_variable_AsString
,
5013 d3d10_effect_depth_stencil_view_variable_AsShaderResource
,
5014 d3d10_effect_depth_stencil_view_variable_AsRenderTargetView
,
5015 d3d10_effect_depth_stencil_view_variable_AsDepthStencilView
,
5016 d3d10_effect_depth_stencil_view_variable_AsConstantBuffer
,
5017 d3d10_effect_depth_stencil_view_variable_AsShader
,
5018 d3d10_effect_depth_stencil_view_variable_AsBlend
,
5019 d3d10_effect_depth_stencil_view_variable_AsDepthStencil
,
5020 d3d10_effect_depth_stencil_view_variable_AsRasterizer
,
5021 d3d10_effect_depth_stencil_view_variable_AsSampler
,
5022 d3d10_effect_depth_stencil_view_variable_SetRawValue
,
5023 d3d10_effect_depth_stencil_view_variable_GetRawValue
,
5024 /* ID3D10EffectDepthStencilViewVariable methods */
5025 d3d10_effect_depth_stencil_view_variable_SetDepthStencil
,
5026 d3d10_effect_depth_stencil_view_variable_GetDepthStencil
,
5027 d3d10_effect_depth_stencil_view_variable_SetDepthStencilArray
,
5028 d3d10_effect_depth_stencil_view_variable_GetDepthStencilArray
,
5031 /* ID3D10EffectVariable methods */
5033 static BOOL STDMETHODCALLTYPE
d3d10_effect_shader_variable_IsValid(ID3D10EffectShaderVariable
*iface
)
5035 TRACE("iface %p\n", iface
);
5037 return (struct d3d10_effect_variable
*)iface
!= &null_shader_variable
;
5040 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetType(
5041 ID3D10EffectShaderVariable
*iface
)
5043 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
5046 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetDesc(ID3D10EffectShaderVariable
*iface
,
5047 D3D10_EFFECT_VARIABLE_DESC
*desc
)
5049 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
5052 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetAnnotationByIndex(
5053 ID3D10EffectShaderVariable
*iface
, UINT index
)
5055 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
5058 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetAnnotationByName(
5059 ID3D10EffectShaderVariable
*iface
, LPCSTR name
)
5061 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
5064 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetMemberByIndex(
5065 ID3D10EffectShaderVariable
*iface
, UINT index
)
5067 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
5070 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetMemberByName(
5071 ID3D10EffectShaderVariable
*iface
, LPCSTR name
)
5073 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
5076 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetMemberBySemantic(
5077 ID3D10EffectShaderVariable
*iface
, LPCSTR semantic
)
5079 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
5082 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetElement(
5083 ID3D10EffectShaderVariable
*iface
, UINT index
)
5085 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
5088 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetParentConstantBuffer(
5089 ID3D10EffectShaderVariable
*iface
)
5091 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
5094 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsScalar(
5095 ID3D10EffectShaderVariable
*iface
)
5097 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
5100 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsVector(
5101 ID3D10EffectShaderVariable
*iface
)
5103 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
5106 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsMatrix(
5107 ID3D10EffectShaderVariable
*iface
)
5109 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
5112 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsString(
5113 ID3D10EffectShaderVariable
*iface
)
5115 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
5118 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsShaderResource(
5119 ID3D10EffectShaderVariable
*iface
)
5121 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
5124 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsRenderTargetView(
5125 ID3D10EffectShaderVariable
*iface
)
5127 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
5130 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsDepthStencilView(
5131 ID3D10EffectShaderVariable
*iface
)
5133 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
5136 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsConstantBuffer(
5137 ID3D10EffectShaderVariable
*iface
)
5139 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
5142 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsShader(
5143 ID3D10EffectShaderVariable
*iface
)
5145 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
5148 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsBlend(
5149 ID3D10EffectShaderVariable
*iface
)
5151 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
5154 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsDepthStencil(
5155 ID3D10EffectShaderVariable
*iface
)
5157 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
5160 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsRasterizer(
5161 ID3D10EffectShaderVariable
*iface
)
5163 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
5166 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsSampler(
5167 ID3D10EffectShaderVariable
*iface
)
5169 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
5172 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_SetRawValue(
5173 ID3D10EffectShaderVariable
*iface
, void *data
, UINT offset
, UINT count
)
5175 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5178 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetRawValue(
5179 ID3D10EffectShaderVariable
*iface
, void *data
, UINT offset
, UINT count
)
5181 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5184 /* ID3D10EffectShaderVariable methods */
5186 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetShaderDesc(
5187 ID3D10EffectShaderVariable
*iface
, UINT index
, D3D10_EFFECT_SHADER_DESC
*desc
)
5189 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
5194 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetVertexShader(
5195 ID3D10EffectShaderVariable
*iface
, UINT index
, ID3D10VertexShader
**shader
)
5197 FIXME("iface %p, index %u, shader %p stub!\n", iface
, index
, shader
);
5202 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetGeometryShader(
5203 ID3D10EffectShaderVariable
*iface
, UINT index
, ID3D10GeometryShader
**shader
)
5205 FIXME("iface %p, index %u, shader %p stub!\n", iface
, index
, shader
);
5210 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetPixelShader(
5211 ID3D10EffectShaderVariable
*iface
, UINT index
, ID3D10PixelShader
**shader
)
5213 FIXME("iface %p, index %u, shader %p stub!\n", iface
, index
, shader
);
5218 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetInputSignatureElementDesc(
5219 ID3D10EffectShaderVariable
*iface
, UINT shader_index
, UINT element_index
,
5220 D3D10_SIGNATURE_PARAMETER_DESC
*desc
)
5222 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
5223 struct d3d10_effect_shader_variable
*s
;
5224 D3D10_SIGNATURE_PARAMETER_DESC
*d
;
5226 TRACE("iface %p, shader_index %u, element_index %u, desc %p\n",
5227 iface
, shader_index
, element_index
, desc
);
5229 if (!iface
->lpVtbl
->IsValid(iface
))
5231 WARN("Null variable specified\n");
5235 /* Check shader_index, this crashes on W7/DX10 */
5236 if (shader_index
>= This
->effect
->used_shader_count
)
5238 WARN("This should crash on W7/DX10!\n");
5242 s
= This
->effect
->used_shaders
[shader_index
]->data
;
5243 if (!s
->input_signature
.signature
)
5245 WARN("No shader signature\n");
5246 return D3DERR_INVALIDCALL
;
5249 /* Check desc for NULL, this crashes on W7/DX10 */
5252 WARN("This should crash on W7/DX10!\n");
5256 if (element_index
>= s
->input_signature
.element_count
)
5258 WARN("Invalid element index specified\n");
5259 return E_INVALIDARG
;
5262 d
= &s
->input_signature
.elements
[element_index
];
5263 desc
->SemanticName
= d
->SemanticName
;
5264 desc
->SemanticIndex
= d
->SemanticIndex
;
5265 desc
->SystemValueType
= d
->SystemValueType
;
5266 desc
->ComponentType
= d
->ComponentType
;
5267 desc
->Register
= d
->Register
;
5268 desc
->ReadWriteMask
= d
->ReadWriteMask
;
5269 desc
->Mask
= d
->Mask
;
5274 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetOutputSignatureElementDesc(
5275 ID3D10EffectShaderVariable
*iface
, UINT shader_index
, UINT element_index
,
5276 D3D10_SIGNATURE_PARAMETER_DESC
*desc
)
5278 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
5279 struct d3d10_effect_shader_variable
*s
;
5280 D3D10_SIGNATURE_PARAMETER_DESC
*d
;
5282 TRACE("iface %p, shader_index %u, element_index %u, desc %p\n",
5283 iface
, shader_index
, element_index
, desc
);
5285 if (!iface
->lpVtbl
->IsValid(iface
))
5287 WARN("Null variable specified\n");
5291 /* Check shader_index, this crashes on W7/DX10 */
5292 if (shader_index
>= This
->effect
->used_shader_count
)
5294 WARN("This should crash on W7/DX10!\n");
5298 s
= This
->effect
->used_shaders
[shader_index
]->data
;
5299 if (!s
->output_signature
.signature
)
5301 WARN("No shader signature\n");
5302 return D3DERR_INVALIDCALL
;
5305 /* Check desc for NULL, this crashes on W7/DX10 */
5308 WARN("This should crash on W7/DX10!\n");
5312 if (element_index
>= s
->output_signature
.element_count
)
5314 WARN("Invalid element index specified\n");
5315 return E_INVALIDARG
;
5318 d
= &s
->output_signature
.elements
[element_index
];
5319 desc
->SemanticName
= d
->SemanticName
;
5320 desc
->SemanticIndex
= d
->SemanticIndex
;
5321 desc
->SystemValueType
= d
->SystemValueType
;
5322 desc
->ComponentType
= d
->ComponentType
;
5323 desc
->Register
= d
->Register
;
5324 desc
->ReadWriteMask
= d
->ReadWriteMask
;
5325 desc
->Mask
= d
->Mask
;
5331 static const struct ID3D10EffectShaderVariableVtbl d3d10_effect_shader_variable_vtbl
=
5333 /* ID3D10EffectVariable methods */
5334 d3d10_effect_shader_variable_IsValid
,
5335 d3d10_effect_shader_variable_GetType
,
5336 d3d10_effect_shader_variable_GetDesc
,
5337 d3d10_effect_shader_variable_GetAnnotationByIndex
,
5338 d3d10_effect_shader_variable_GetAnnotationByName
,
5339 d3d10_effect_shader_variable_GetMemberByIndex
,
5340 d3d10_effect_shader_variable_GetMemberByName
,
5341 d3d10_effect_shader_variable_GetMemberBySemantic
,
5342 d3d10_effect_shader_variable_GetElement
,
5343 d3d10_effect_shader_variable_GetParentConstantBuffer
,
5344 d3d10_effect_shader_variable_AsScalar
,
5345 d3d10_effect_shader_variable_AsVector
,
5346 d3d10_effect_shader_variable_AsMatrix
,
5347 d3d10_effect_shader_variable_AsString
,
5348 d3d10_effect_shader_variable_AsShaderResource
,
5349 d3d10_effect_shader_variable_AsRenderTargetView
,
5350 d3d10_effect_shader_variable_AsDepthStencilView
,
5351 d3d10_effect_shader_variable_AsConstantBuffer
,
5352 d3d10_effect_shader_variable_AsShader
,
5353 d3d10_effect_shader_variable_AsBlend
,
5354 d3d10_effect_shader_variable_AsDepthStencil
,
5355 d3d10_effect_shader_variable_AsRasterizer
,
5356 d3d10_effect_shader_variable_AsSampler
,
5357 d3d10_effect_shader_variable_SetRawValue
,
5358 d3d10_effect_shader_variable_GetRawValue
,
5359 /* ID3D10EffectShaderVariable methods */
5360 d3d10_effect_shader_variable_GetShaderDesc
,
5361 d3d10_effect_shader_variable_GetVertexShader
,
5362 d3d10_effect_shader_variable_GetGeometryShader
,
5363 d3d10_effect_shader_variable_GetPixelShader
,
5364 d3d10_effect_shader_variable_GetInputSignatureElementDesc
,
5365 d3d10_effect_shader_variable_GetOutputSignatureElementDesc
,
5368 /* ID3D10EffectVariable methods */
5370 static BOOL STDMETHODCALLTYPE
d3d10_effect_blend_variable_IsValid(ID3D10EffectBlendVariable
*iface
)
5372 TRACE("iface %p\n", iface
);
5374 return (struct d3d10_effect_variable
*)iface
!= &null_blend_variable
;
5377 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetType(
5378 ID3D10EffectBlendVariable
*iface
)
5380 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
5383 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetDesc(ID3D10EffectBlendVariable
*iface
,
5384 D3D10_EFFECT_VARIABLE_DESC
*desc
)
5386 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
5389 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetAnnotationByIndex(
5390 ID3D10EffectBlendVariable
*iface
, UINT index
)
5392 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
5395 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetAnnotationByName(
5396 ID3D10EffectBlendVariable
*iface
, LPCSTR name
)
5398 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
5401 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetMemberByIndex(
5402 ID3D10EffectBlendVariable
*iface
, UINT index
)
5404 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
5407 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetMemberByName(
5408 ID3D10EffectBlendVariable
*iface
, LPCSTR name
)
5410 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
5413 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetMemberBySemantic(
5414 ID3D10EffectBlendVariable
*iface
, LPCSTR semantic
)
5416 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
5419 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetElement(
5420 ID3D10EffectBlendVariable
*iface
, UINT index
)
5422 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
5425 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetParentConstantBuffer(
5426 ID3D10EffectBlendVariable
*iface
)
5428 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
5431 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsScalar(
5432 ID3D10EffectBlendVariable
*iface
)
5434 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
5437 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsVector(
5438 ID3D10EffectBlendVariable
*iface
)
5440 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
5443 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsMatrix(
5444 ID3D10EffectBlendVariable
*iface
)
5446 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
5449 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsString(
5450 ID3D10EffectBlendVariable
*iface
)
5452 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
5455 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsShaderResource(
5456 ID3D10EffectBlendVariable
*iface
)
5458 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
5461 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsRenderTargetView(
5462 ID3D10EffectBlendVariable
*iface
)
5464 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
5467 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsDepthStencilView(
5468 ID3D10EffectBlendVariable
*iface
)
5470 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
5473 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsConstantBuffer(
5474 ID3D10EffectBlendVariable
*iface
)
5476 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
5479 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsShader(
5480 ID3D10EffectBlendVariable
*iface
)
5482 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
5485 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsBlend(
5486 ID3D10EffectBlendVariable
*iface
)
5488 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
5491 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsDepthStencil(
5492 ID3D10EffectBlendVariable
*iface
)
5494 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
5497 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsRasterizer(
5498 ID3D10EffectBlendVariable
*iface
)
5500 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
5503 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsSampler(
5504 ID3D10EffectBlendVariable
*iface
)
5506 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
5509 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_SetRawValue(ID3D10EffectBlendVariable
*iface
,
5510 void *data
, UINT offset
, UINT count
)
5512 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5515 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetRawValue(ID3D10EffectBlendVariable
*iface
,
5516 void *data
, UINT offset
, UINT count
)
5518 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5521 /* ID3D10EffectBlendVariable methods */
5523 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetBlendState(ID3D10EffectBlendVariable
*iface
,
5524 UINT index
, ID3D10BlendState
**blend_state
)
5526 FIXME("iface %p, index %u, blend_state %p stub!\n", iface
, index
, blend_state
);
5531 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetBackingStore(ID3D10EffectBlendVariable
*iface
,
5532 UINT index
, D3D10_BLEND_DESC
*desc
)
5534 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
5540 static const struct ID3D10EffectBlendVariableVtbl d3d10_effect_blend_variable_vtbl
=
5542 /* ID3D10EffectVariable methods */
5543 d3d10_effect_blend_variable_IsValid
,
5544 d3d10_effect_blend_variable_GetType
,
5545 d3d10_effect_blend_variable_GetDesc
,
5546 d3d10_effect_blend_variable_GetAnnotationByIndex
,
5547 d3d10_effect_blend_variable_GetAnnotationByName
,
5548 d3d10_effect_blend_variable_GetMemberByIndex
,
5549 d3d10_effect_blend_variable_GetMemberByName
,
5550 d3d10_effect_blend_variable_GetMemberBySemantic
,
5551 d3d10_effect_blend_variable_GetElement
,
5552 d3d10_effect_blend_variable_GetParentConstantBuffer
,
5553 d3d10_effect_blend_variable_AsScalar
,
5554 d3d10_effect_blend_variable_AsVector
,
5555 d3d10_effect_blend_variable_AsMatrix
,
5556 d3d10_effect_blend_variable_AsString
,
5557 d3d10_effect_blend_variable_AsShaderResource
,
5558 d3d10_effect_blend_variable_AsRenderTargetView
,
5559 d3d10_effect_blend_variable_AsDepthStencilView
,
5560 d3d10_effect_blend_variable_AsConstantBuffer
,
5561 d3d10_effect_blend_variable_AsShader
,
5562 d3d10_effect_blend_variable_AsBlend
,
5563 d3d10_effect_blend_variable_AsDepthStencil
,
5564 d3d10_effect_blend_variable_AsRasterizer
,
5565 d3d10_effect_blend_variable_AsSampler
,
5566 d3d10_effect_blend_variable_SetRawValue
,
5567 d3d10_effect_blend_variable_GetRawValue
,
5568 /* ID3D10EffectBlendVariable methods */
5569 d3d10_effect_blend_variable_GetBlendState
,
5570 d3d10_effect_blend_variable_GetBackingStore
,
5573 /* ID3D10EffectVariable methods */
5575 static BOOL STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_IsValid(ID3D10EffectDepthStencilVariable
*iface
)
5577 TRACE("iface %p\n", iface
);
5579 return (struct d3d10_effect_variable
*)iface
!= &null_depth_stencil_variable
;
5582 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetType(
5583 ID3D10EffectDepthStencilVariable
*iface
)
5585 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
5588 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetDesc(ID3D10EffectDepthStencilVariable
*iface
,
5589 D3D10_EFFECT_VARIABLE_DESC
*desc
)
5591 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
5594 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetAnnotationByIndex(
5595 ID3D10EffectDepthStencilVariable
*iface
, UINT index
)
5597 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
5600 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetAnnotationByName(
5601 ID3D10EffectDepthStencilVariable
*iface
, LPCSTR name
)
5603 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
5606 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetMemberByIndex(
5607 ID3D10EffectDepthStencilVariable
*iface
, UINT index
)
5609 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
5612 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetMemberByName(
5613 ID3D10EffectDepthStencilVariable
*iface
, LPCSTR name
)
5615 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
5618 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetMemberBySemantic(
5619 ID3D10EffectDepthStencilVariable
*iface
, LPCSTR semantic
)
5621 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
5624 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetElement(
5625 ID3D10EffectDepthStencilVariable
*iface
, UINT index
)
5627 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
5630 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetParentConstantBuffer(
5631 ID3D10EffectDepthStencilVariable
*iface
)
5633 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
5636 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsScalar(
5637 ID3D10EffectDepthStencilVariable
*iface
)
5639 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
5642 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsVector(
5643 ID3D10EffectDepthStencilVariable
*iface
)
5645 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
5648 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsMatrix(
5649 ID3D10EffectDepthStencilVariable
*iface
)
5651 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
5654 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsString(
5655 ID3D10EffectDepthStencilVariable
*iface
)
5657 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
5660 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsShaderResource(
5661 ID3D10EffectDepthStencilVariable
*iface
)
5663 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
5666 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsRenderTargetView(
5667 ID3D10EffectDepthStencilVariable
*iface
)
5669 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
5672 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsDepthStencilView(
5673 ID3D10EffectDepthStencilVariable
*iface
)
5675 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
5678 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsConstantBuffer(
5679 ID3D10EffectDepthStencilVariable
*iface
)
5681 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
5684 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsShader(
5685 ID3D10EffectDepthStencilVariable
*iface
)
5687 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
5690 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsBlend(
5691 ID3D10EffectDepthStencilVariable
*iface
)
5693 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
5696 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsDepthStencil(
5697 ID3D10EffectDepthStencilVariable
*iface
)
5699 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
5702 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsRasterizer(
5703 ID3D10EffectDepthStencilVariable
*iface
)
5705 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
5708 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsSampler(
5709 ID3D10EffectDepthStencilVariable
*iface
)
5711 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
5714 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_SetRawValue(ID3D10EffectDepthStencilVariable
*iface
,
5715 void *data
, UINT offset
, UINT count
)
5717 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5720 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetRawValue(ID3D10EffectDepthStencilVariable
*iface
,
5721 void *data
, UINT offset
, UINT count
)
5723 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5726 /* ID3D10EffectDepthStencilVariable methods */
5728 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetDepthStencilState(ID3D10EffectDepthStencilVariable
*iface
,
5729 UINT index
, ID3D10DepthStencilState
**depth_stencil_state
)
5731 FIXME("iface %p, index %u, depth_stencil_state %p stub!\n", iface
, index
, depth_stencil_state
);
5736 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetBackingStore(ID3D10EffectDepthStencilVariable
*iface
,
5737 UINT index
, D3D10_DEPTH_STENCIL_DESC
*desc
)
5739 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
5745 static const struct ID3D10EffectDepthStencilVariableVtbl d3d10_effect_depth_stencil_variable_vtbl
=
5747 /* ID3D10EffectVariable methods */
5748 d3d10_effect_depth_stencil_variable_IsValid
,
5749 d3d10_effect_depth_stencil_variable_GetType
,
5750 d3d10_effect_depth_stencil_variable_GetDesc
,
5751 d3d10_effect_depth_stencil_variable_GetAnnotationByIndex
,
5752 d3d10_effect_depth_stencil_variable_GetAnnotationByName
,
5753 d3d10_effect_depth_stencil_variable_GetMemberByIndex
,
5754 d3d10_effect_depth_stencil_variable_GetMemberByName
,
5755 d3d10_effect_depth_stencil_variable_GetMemberBySemantic
,
5756 d3d10_effect_depth_stencil_variable_GetElement
,
5757 d3d10_effect_depth_stencil_variable_GetParentConstantBuffer
,
5758 d3d10_effect_depth_stencil_variable_AsScalar
,
5759 d3d10_effect_depth_stencil_variable_AsVector
,
5760 d3d10_effect_depth_stencil_variable_AsMatrix
,
5761 d3d10_effect_depth_stencil_variable_AsString
,
5762 d3d10_effect_depth_stencil_variable_AsShaderResource
,
5763 d3d10_effect_depth_stencil_variable_AsRenderTargetView
,
5764 d3d10_effect_depth_stencil_variable_AsDepthStencilView
,
5765 d3d10_effect_depth_stencil_variable_AsConstantBuffer
,
5766 d3d10_effect_depth_stencil_variable_AsShader
,
5767 d3d10_effect_depth_stencil_variable_AsBlend
,
5768 d3d10_effect_depth_stencil_variable_AsDepthStencil
,
5769 d3d10_effect_depth_stencil_variable_AsRasterizer
,
5770 d3d10_effect_depth_stencil_variable_AsSampler
,
5771 d3d10_effect_depth_stencil_variable_SetRawValue
,
5772 d3d10_effect_depth_stencil_variable_GetRawValue
,
5773 /* ID3D10EffectDepthStencilVariable methods */
5774 d3d10_effect_depth_stencil_variable_GetDepthStencilState
,
5775 d3d10_effect_depth_stencil_variable_GetBackingStore
,
5778 /* ID3D10EffectVariable methods */
5780 static BOOL STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_IsValid(ID3D10EffectRasterizerVariable
*iface
)
5782 TRACE("iface %p\n", iface
);
5784 return (struct d3d10_effect_variable
*)iface
!= &null_rasterizer_variable
;
5787 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetType(
5788 ID3D10EffectRasterizerVariable
*iface
)
5790 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
5793 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetDesc(ID3D10EffectRasterizerVariable
*iface
,
5794 D3D10_EFFECT_VARIABLE_DESC
*desc
)
5796 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
5799 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetAnnotationByIndex(
5800 ID3D10EffectRasterizerVariable
*iface
, UINT index
)
5802 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
5805 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetAnnotationByName(
5806 ID3D10EffectRasterizerVariable
*iface
, LPCSTR name
)
5808 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
5811 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetMemberByIndex(
5812 ID3D10EffectRasterizerVariable
*iface
, UINT index
)
5814 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
5817 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetMemberByName(
5818 ID3D10EffectRasterizerVariable
*iface
, LPCSTR name
)
5820 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
5823 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetMemberBySemantic(
5824 ID3D10EffectRasterizerVariable
*iface
, LPCSTR semantic
)
5826 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
5829 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetElement(
5830 ID3D10EffectRasterizerVariable
*iface
, UINT index
)
5832 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
5835 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetParentConstantBuffer(
5836 ID3D10EffectRasterizerVariable
*iface
)
5838 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
5841 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsScalar(
5842 ID3D10EffectRasterizerVariable
*iface
)
5844 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
5847 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsVector(
5848 ID3D10EffectRasterizerVariable
*iface
)
5850 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
5853 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsMatrix(
5854 ID3D10EffectRasterizerVariable
*iface
)
5856 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
5859 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsString(
5860 ID3D10EffectRasterizerVariable
*iface
)
5862 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
5865 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsShaderResource(
5866 ID3D10EffectRasterizerVariable
*iface
)
5868 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
5871 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsRenderTargetView(
5872 ID3D10EffectRasterizerVariable
*iface
)
5874 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
5877 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsDepthStencilView(
5878 ID3D10EffectRasterizerVariable
*iface
)
5880 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
5883 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsConstantBuffer(
5884 ID3D10EffectRasterizerVariable
*iface
)
5886 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
5889 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsShader(
5890 ID3D10EffectRasterizerVariable
*iface
)
5892 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
5895 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsBlend(
5896 ID3D10EffectRasterizerVariable
*iface
)
5898 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
5901 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsDepthStencil(
5902 ID3D10EffectRasterizerVariable
*iface
)
5904 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
5907 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsRasterizer(
5908 ID3D10EffectRasterizerVariable
*iface
)
5910 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
5913 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsSampler(
5914 ID3D10EffectRasterizerVariable
*iface
)
5916 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
5919 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_SetRawValue(ID3D10EffectRasterizerVariable
*iface
,
5920 void *data
, UINT offset
, UINT count
)
5922 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5925 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetRawValue(ID3D10EffectRasterizerVariable
*iface
,
5926 void *data
, UINT offset
, UINT count
)
5928 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5931 /* ID3D10EffectRasterizerVariable methods */
5933 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetRasterizerState(ID3D10EffectRasterizerVariable
*iface
,
5934 UINT index
, ID3D10RasterizerState
**rasterizer_state
)
5936 FIXME("iface %p, index %u, rasterizer_state %p stub!\n", iface
, index
, rasterizer_state
);
5941 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetBackingStore(ID3D10EffectRasterizerVariable
*iface
,
5942 UINT index
, D3D10_RASTERIZER_DESC
*desc
)
5944 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
5950 static const struct ID3D10EffectRasterizerVariableVtbl d3d10_effect_rasterizer_variable_vtbl
=
5952 /* ID3D10EffectVariable methods */
5953 d3d10_effect_rasterizer_variable_IsValid
,
5954 d3d10_effect_rasterizer_variable_GetType
,
5955 d3d10_effect_rasterizer_variable_GetDesc
,
5956 d3d10_effect_rasterizer_variable_GetAnnotationByIndex
,
5957 d3d10_effect_rasterizer_variable_GetAnnotationByName
,
5958 d3d10_effect_rasterizer_variable_GetMemberByIndex
,
5959 d3d10_effect_rasterizer_variable_GetMemberByName
,
5960 d3d10_effect_rasterizer_variable_GetMemberBySemantic
,
5961 d3d10_effect_rasterizer_variable_GetElement
,
5962 d3d10_effect_rasterizer_variable_GetParentConstantBuffer
,
5963 d3d10_effect_rasterizer_variable_AsScalar
,
5964 d3d10_effect_rasterizer_variable_AsVector
,
5965 d3d10_effect_rasterizer_variable_AsMatrix
,
5966 d3d10_effect_rasterizer_variable_AsString
,
5967 d3d10_effect_rasterizer_variable_AsShaderResource
,
5968 d3d10_effect_rasterizer_variable_AsRenderTargetView
,
5969 d3d10_effect_rasterizer_variable_AsDepthStencilView
,
5970 d3d10_effect_rasterizer_variable_AsConstantBuffer
,
5971 d3d10_effect_rasterizer_variable_AsShader
,
5972 d3d10_effect_rasterizer_variable_AsBlend
,
5973 d3d10_effect_rasterizer_variable_AsDepthStencil
,
5974 d3d10_effect_rasterizer_variable_AsRasterizer
,
5975 d3d10_effect_rasterizer_variable_AsSampler
,
5976 d3d10_effect_rasterizer_variable_SetRawValue
,
5977 d3d10_effect_rasterizer_variable_GetRawValue
,
5978 /* ID3D10EffectRasterizerVariable methods */
5979 d3d10_effect_rasterizer_variable_GetRasterizerState
,
5980 d3d10_effect_rasterizer_variable_GetBackingStore
,
5983 /* ID3D10EffectVariable methods */
5985 static BOOL STDMETHODCALLTYPE
d3d10_effect_sampler_variable_IsValid(ID3D10EffectSamplerVariable
*iface
)
5987 TRACE("iface %p\n", iface
);
5989 return (struct d3d10_effect_variable
*)iface
!= &null_sampler_variable
;
5992 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetType(
5993 ID3D10EffectSamplerVariable
*iface
)
5995 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
5998 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetDesc(ID3D10EffectSamplerVariable
*iface
,
5999 D3D10_EFFECT_VARIABLE_DESC
*desc
)
6001 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
6004 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetAnnotationByIndex(
6005 ID3D10EffectSamplerVariable
*iface
, UINT index
)
6007 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
6010 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetAnnotationByName(
6011 ID3D10EffectSamplerVariable
*iface
, LPCSTR name
)
6013 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
6016 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetMemberByIndex(
6017 ID3D10EffectSamplerVariable
*iface
, UINT index
)
6019 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
6022 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetMemberByName(
6023 ID3D10EffectSamplerVariable
*iface
, LPCSTR name
)
6025 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
6028 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetMemberBySemantic(
6029 ID3D10EffectSamplerVariable
*iface
, LPCSTR semantic
)
6031 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
6034 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetElement(
6035 ID3D10EffectSamplerVariable
*iface
, UINT index
)
6037 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
6040 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetParentConstantBuffer(
6041 ID3D10EffectSamplerVariable
*iface
)
6043 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
6046 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsScalar(
6047 ID3D10EffectSamplerVariable
*iface
)
6049 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
6052 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsVector(
6053 ID3D10EffectSamplerVariable
*iface
)
6055 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
6058 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsMatrix(
6059 ID3D10EffectSamplerVariable
*iface
)
6061 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
6064 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsString(
6065 ID3D10EffectSamplerVariable
*iface
)
6067 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
6070 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsShaderResource(
6071 ID3D10EffectSamplerVariable
*iface
)
6073 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
6076 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsRenderTargetView(
6077 ID3D10EffectSamplerVariable
*iface
)
6079 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
6082 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsDepthStencilView(
6083 ID3D10EffectSamplerVariable
*iface
)
6085 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
6088 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsConstantBuffer(
6089 ID3D10EffectSamplerVariable
*iface
)
6091 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
6094 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsShader(
6095 ID3D10EffectSamplerVariable
*iface
)
6097 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
6100 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsBlend(
6101 ID3D10EffectSamplerVariable
*iface
)
6103 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
6106 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsDepthStencil(
6107 ID3D10EffectSamplerVariable
*iface
)
6109 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
6112 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsRasterizer(
6113 ID3D10EffectSamplerVariable
*iface
)
6115 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
6118 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsSampler(
6119 ID3D10EffectSamplerVariable
*iface
)
6121 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
6124 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_SetRawValue(ID3D10EffectSamplerVariable
*iface
,
6125 void *data
, UINT offset
, UINT count
)
6127 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
6130 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetRawValue(ID3D10EffectSamplerVariable
*iface
,
6131 void *data
, UINT offset
, UINT count
)
6133 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
6136 /* ID3D10EffectSamplerVariable methods */
6138 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetSampler(ID3D10EffectSamplerVariable
*iface
,
6139 UINT index
, ID3D10SamplerState
**sampler
)
6141 FIXME("iface %p, index %u, sampler %p stub!\n", iface
, index
, sampler
);
6146 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetBackingStore(ID3D10EffectSamplerVariable
*iface
,
6147 UINT index
, D3D10_SAMPLER_DESC
*desc
)
6149 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
6155 static const struct ID3D10EffectSamplerVariableVtbl d3d10_effect_sampler_variable_vtbl
=
6157 /* ID3D10EffectVariable methods */
6158 d3d10_effect_sampler_variable_IsValid
,
6159 d3d10_effect_sampler_variable_GetType
,
6160 d3d10_effect_sampler_variable_GetDesc
,
6161 d3d10_effect_sampler_variable_GetAnnotationByIndex
,
6162 d3d10_effect_sampler_variable_GetAnnotationByName
,
6163 d3d10_effect_sampler_variable_GetMemberByIndex
,
6164 d3d10_effect_sampler_variable_GetMemberByName
,
6165 d3d10_effect_sampler_variable_GetMemberBySemantic
,
6166 d3d10_effect_sampler_variable_GetElement
,
6167 d3d10_effect_sampler_variable_GetParentConstantBuffer
,
6168 d3d10_effect_sampler_variable_AsScalar
,
6169 d3d10_effect_sampler_variable_AsVector
,
6170 d3d10_effect_sampler_variable_AsMatrix
,
6171 d3d10_effect_sampler_variable_AsString
,
6172 d3d10_effect_sampler_variable_AsShaderResource
,
6173 d3d10_effect_sampler_variable_AsRenderTargetView
,
6174 d3d10_effect_sampler_variable_AsDepthStencilView
,
6175 d3d10_effect_sampler_variable_AsConstantBuffer
,
6176 d3d10_effect_sampler_variable_AsShader
,
6177 d3d10_effect_sampler_variable_AsBlend
,
6178 d3d10_effect_sampler_variable_AsDepthStencil
,
6179 d3d10_effect_sampler_variable_AsRasterizer
,
6180 d3d10_effect_sampler_variable_AsSampler
,
6181 d3d10_effect_sampler_variable_SetRawValue
,
6182 d3d10_effect_sampler_variable_GetRawValue
,
6183 /* ID3D10EffectSamplerVariable methods */
6184 d3d10_effect_sampler_variable_GetSampler
,
6185 d3d10_effect_sampler_variable_GetBackingStore
,
6188 /* ID3D10EffectType methods */
6190 static BOOL STDMETHODCALLTYPE
d3d10_effect_type_IsValid(ID3D10EffectType
*iface
)
6192 TRACE("iface %p\n", iface
);
6194 return (struct d3d10_effect_type
*)iface
!= &null_type
;
6197 static HRESULT STDMETHODCALLTYPE
d3d10_effect_type_GetDesc(ID3D10EffectType
*iface
, D3D10_EFFECT_TYPE_DESC
*desc
)
6199 struct d3d10_effect_type
*This
= (struct d3d10_effect_type
*)iface
;
6201 TRACE("iface %p, desc %p\n", iface
, desc
);
6203 if (This
== &null_type
)
6205 WARN("Null type specified\n");
6211 WARN("Invalid argument specified\n");
6212 return E_INVALIDARG
;
6215 desc
->TypeName
= This
->name
;
6216 desc
->Class
= This
->type_class
;
6217 desc
->Type
= This
->basetype
;
6218 desc
->Elements
= This
->element_count
;
6219 desc
->Members
= This
->member_count
;
6220 desc
->Rows
= This
->row_count
;
6221 desc
->Columns
= This
->column_count
;
6222 desc
->PackedSize
= This
->size_packed
;
6223 desc
->UnpackedSize
= This
->size_unpacked
;
6224 desc
->Stride
= This
->stride
;
6229 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_type_GetMemberTypeByIndex(ID3D10EffectType
*iface
,
6232 struct d3d10_effect_type
*This
= (struct d3d10_effect_type
*)iface
;
6233 struct d3d10_effect_type
*t
;
6235 TRACE("iface %p, index %u\n", iface
, index
);
6237 if (index
>= This
->member_count
)
6239 WARN("Invalid index specified\n");
6240 return (ID3D10EffectType
*)&null_type
;
6243 t
= (&This
->members
[index
])->type
;
6245 TRACE("Returning member %p, %s\n", t
, debugstr_a(t
->name
));
6247 return (ID3D10EffectType
*)t
;
6250 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_type_GetMemberTypeByName(ID3D10EffectType
*iface
,
6253 struct d3d10_effect_type
*This
= (struct d3d10_effect_type
*)iface
;
6256 TRACE("iface %p, name %s\n", iface
, debugstr_a(name
));
6260 WARN("Invalid name specified\n");
6261 return (ID3D10EffectType
*)&null_type
;
6264 for (i
= 0; i
< This
->member_count
; ++i
)
6266 struct d3d10_effect_type_member
*typem
= &This
->members
[i
];
6270 if (!strcmp(typem
->name
, name
))
6272 TRACE("Returning type %p.\n", typem
->type
);
6273 return (ID3D10EffectType
*)typem
->type
;
6278 WARN("Invalid name specified\n");
6280 return (ID3D10EffectType
*)&null_type
;
6283 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_type_GetMemberTypeBySemantic(ID3D10EffectType
*iface
,
6286 struct d3d10_effect_type
*This
= (struct d3d10_effect_type
*)iface
;
6289 TRACE("iface %p, semantic %s\n", iface
, debugstr_a(semantic
));
6293 WARN("Invalid semantic specified\n");
6294 return (ID3D10EffectType
*)&null_type
;
6297 for (i
= 0; i
< This
->member_count
; ++i
)
6299 struct d3d10_effect_type_member
*typem
= &This
->members
[i
];
6301 if (typem
->semantic
)
6303 if (!strcmp(typem
->semantic
, semantic
))
6305 TRACE("Returning type %p.\n", typem
->type
);
6306 return (ID3D10EffectType
*)typem
->type
;
6311 WARN("Invalid semantic specified\n");
6313 return (ID3D10EffectType
*)&null_type
;
6316 static LPCSTR STDMETHODCALLTYPE
d3d10_effect_type_GetMemberName(ID3D10EffectType
*iface
, UINT index
)
6318 struct d3d10_effect_type
*This
= (struct d3d10_effect_type
*)iface
;
6319 struct d3d10_effect_type_member
*typem
;
6321 TRACE("iface %p, index %u\n", iface
, index
);
6323 if (index
>= This
->member_count
)
6325 WARN("Invalid index specified\n");
6329 typem
= &This
->members
[index
];
6331 TRACE("Returning name %s\n", debugstr_a(typem
->name
));
6336 static LPCSTR STDMETHODCALLTYPE
d3d10_effect_type_GetMemberSemantic(ID3D10EffectType
*iface
, UINT index
)
6338 struct d3d10_effect_type
*This
= (struct d3d10_effect_type
*)iface
;
6339 struct d3d10_effect_type_member
*typem
;
6341 TRACE("iface %p, index %u\n", iface
, index
);
6343 if (index
>= This
->member_count
)
6345 WARN("Invalid index specified\n");
6349 typem
= &This
->members
[index
];
6351 TRACE("Returning semantic %s\n", debugstr_a(typem
->semantic
));
6353 return typem
->semantic
;
6356 static const struct ID3D10EffectTypeVtbl d3d10_effect_type_vtbl
=
6358 /* ID3D10EffectType */
6359 d3d10_effect_type_IsValid
,
6360 d3d10_effect_type_GetDesc
,
6361 d3d10_effect_type_GetMemberTypeByIndex
,
6362 d3d10_effect_type_GetMemberTypeByName
,
6363 d3d10_effect_type_GetMemberTypeBySemantic
,
6364 d3d10_effect_type_GetMemberName
,
6365 d3d10_effect_type_GetMemberSemantic
,