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
},
99 anonymous_vertexshader_name
, D3D10_SVT_VERTEXSHADER
, D3D10_SVC_OBJECT
};
100 static struct d3d10_effect_type anonymous_ps_type
= {{&d3d10_effect_type_vtbl
},
101 anonymous_pixelshader_name
, D3D10_SVT_PIXELSHADER
, D3D10_SVC_OBJECT
};
102 static struct d3d10_effect_type anonymous_gs_type
= {{&d3d10_effect_type_vtbl
},
103 anonymous_geometryshader_name
, 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
->ID3D10EffectType_iface
.lpVtbl
= &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 * shows 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
->ID3D10EffectType_iface
.lpVtbl
= &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
->ID3D10EffectType_iface
.lpVtbl
= &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
= &effect
->ID3D10Effect_iface
;
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
->ID3D10EffectPass_iface
.lpVtbl
= &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
->ID3D10EffectType_iface
.lpVtbl
= &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
->ID3D10EffectTechnique_iface
.lpVtbl
= &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 inline struct d3d10_effect
*impl_from_ID3D10Effect(ID3D10Effect
*iface
)
1890 return CONTAINING_RECORD(iface
, struct d3d10_effect
, ID3D10Effect_iface
);
1893 static HRESULT STDMETHODCALLTYPE
d3d10_effect_QueryInterface(ID3D10Effect
*iface
, REFIID riid
, void **object
)
1895 TRACE("iface %p, riid %s, object %p\n", iface
, debugstr_guid(riid
), object
);
1897 if (IsEqualGUID(riid
, &IID_ID3D10Effect
)
1898 || IsEqualGUID(riid
, &IID_IUnknown
))
1900 IUnknown_AddRef(iface
);
1905 WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid
));
1908 return E_NOINTERFACE
;
1911 static ULONG STDMETHODCALLTYPE
d3d10_effect_AddRef(ID3D10Effect
*iface
)
1913 struct d3d10_effect
*This
= impl_from_ID3D10Effect(iface
);
1914 ULONG refcount
= InterlockedIncrement(&This
->refcount
);
1916 TRACE("%p increasing refcount to %u\n", This
, refcount
);
1921 static ULONG STDMETHODCALLTYPE
d3d10_effect_Release(ID3D10Effect
*iface
)
1923 struct d3d10_effect
*This
= impl_from_ID3D10Effect(iface
);
1924 ULONG refcount
= InterlockedDecrement(&This
->refcount
);
1926 TRACE("%p decreasing refcount to %u\n", This
, refcount
);
1932 if (This
->techniques
)
1934 for (i
= 0; i
< This
->technique_count
; ++i
)
1936 d3d10_effect_technique_destroy(&This
->techniques
[i
]);
1938 HeapFree(GetProcessHeap(), 0, This
->techniques
);
1941 if (This
->local_variables
)
1943 for (i
= 0; i
< This
->local_variable_count
; ++i
)
1945 d3d10_effect_variable_destroy(&This
->local_variables
[i
]);
1947 HeapFree(GetProcessHeap(), 0, This
->local_variables
);
1950 if (This
->local_buffers
)
1952 for (i
= 0; i
< This
->local_buffer_count
; ++i
)
1954 d3d10_effect_local_buffer_destroy(&This
->local_buffers
[i
]);
1956 HeapFree(GetProcessHeap(), 0, This
->local_buffers
);
1959 if (This
->anonymous_shaders
)
1961 for (i
= 0; i
< This
->anonymous_shader_count
; ++i
)
1963 d3d10_effect_variable_destroy(&This
->anonymous_shaders
[i
].shader
);
1964 HeapFree(GetProcessHeap(), 0, This
->anonymous_shaders
[i
].type
.name
);
1966 HeapFree(GetProcessHeap(), 0, This
->anonymous_shaders
);
1969 HeapFree(GetProcessHeap(), 0, This
->used_shaders
);
1971 wine_rb_destroy(&This
->types
, d3d10_effect_type_destroy
, NULL
);
1973 ID3D10Device_Release(This
->device
);
1974 HeapFree(GetProcessHeap(), 0, This
);
1980 /* ID3D10Effect methods */
1982 static BOOL STDMETHODCALLTYPE
d3d10_effect_IsValid(ID3D10Effect
*iface
)
1984 FIXME("iface %p stub!\n", iface
);
1989 static BOOL STDMETHODCALLTYPE
d3d10_effect_IsPool(ID3D10Effect
*iface
)
1991 FIXME("iface %p stub!\n", iface
);
1996 static HRESULT STDMETHODCALLTYPE
d3d10_effect_GetDevice(ID3D10Effect
*iface
, ID3D10Device
**device
)
1998 struct d3d10_effect
*This
= impl_from_ID3D10Effect(iface
);
2000 TRACE("iface %p, device %p\n", iface
, device
);
2002 ID3D10Device_AddRef(This
->device
);
2003 *device
= This
->device
;
2008 static HRESULT STDMETHODCALLTYPE
d3d10_effect_GetDesc(ID3D10Effect
*iface
, D3D10_EFFECT_DESC
*desc
)
2010 FIXME("iface %p, desc %p stub!\n", iface
, desc
);
2015 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_GetConstantBufferByIndex(ID3D10Effect
*iface
,
2018 struct d3d10_effect
*This
= impl_from_ID3D10Effect(iface
);
2019 struct d3d10_effect_variable
*l
;
2021 TRACE("iface %p, index %u\n", iface
, index
);
2023 if (index
>= This
->local_buffer_count
)
2025 WARN("Invalid index specified\n");
2026 return (ID3D10EffectConstantBuffer
*)&null_local_buffer
;
2029 l
= &This
->local_buffers
[index
];
2031 TRACE("Returning buffer %p, %s.\n", l
, debugstr_a(l
->name
));
2033 return (ID3D10EffectConstantBuffer
*)l
;
2036 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_GetConstantBufferByName(ID3D10Effect
*iface
,
2039 struct d3d10_effect
*This
= impl_from_ID3D10Effect(iface
);
2042 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2044 for (i
= 0; i
< This
->local_buffer_count
; ++i
)
2046 struct d3d10_effect_variable
*l
= &This
->local_buffers
[i
];
2048 if (!strcmp(l
->name
, name
))
2050 TRACE("Returning buffer %p.\n", l
);
2051 return (ID3D10EffectConstantBuffer
*)l
;
2055 WARN("Invalid name specified\n");
2057 return (ID3D10EffectConstantBuffer
*)&null_local_buffer
;
2060 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_GetVariableByIndex(ID3D10Effect
*iface
, UINT index
)
2062 struct d3d10_effect
*This
= impl_from_ID3D10Effect(iface
);
2065 TRACE("iface %p, index %u\n", iface
, index
);
2067 for (i
= 0; i
< This
->local_buffer_count
; ++i
)
2069 struct d3d10_effect_variable
*l
= &This
->local_buffers
[i
];
2071 if (index
< l
->type
->member_count
)
2073 struct d3d10_effect_variable
*v
= &l
->members
[index
];
2075 TRACE("Returning variable %p.\n", v
);
2076 return (ID3D10EffectVariable
*)v
;
2078 index
-= l
->type
->member_count
;
2081 if (index
< This
->local_variable_count
)
2083 struct d3d10_effect_variable
*v
= &This
->local_variables
[index
];
2085 TRACE("Returning variable %p.\n", v
);
2086 return (ID3D10EffectVariable
*)v
;
2089 WARN("Invalid index specified\n");
2091 return (ID3D10EffectVariable
*)&null_variable
;
2094 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_GetVariableByName(ID3D10Effect
*iface
, LPCSTR name
)
2096 struct d3d10_effect
*This
= impl_from_ID3D10Effect(iface
);
2099 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2103 WARN("Invalid name specified\n");
2104 return (ID3D10EffectVariable
*)&null_variable
;
2107 for (i
= 0; i
< This
->local_buffer_count
; ++i
)
2109 struct d3d10_effect_variable
*l
= &This
->local_buffers
[i
];
2112 for (j
= 0; j
< l
->type
->member_count
; ++j
)
2114 struct d3d10_effect_variable
*v
= &l
->members
[j
];
2116 if (!strcmp(v
->name
, name
))
2118 TRACE("Returning variable %p.\n", v
);
2119 return (ID3D10EffectVariable
*)v
;
2124 for (i
= 0; i
< This
->local_variable_count
; ++i
)
2126 struct d3d10_effect_variable
*v
= &This
->local_variables
[i
];
2128 if (!strcmp(v
->name
, name
))
2130 TRACE("Returning variable %p.\n", v
);
2131 return (ID3D10EffectVariable
*)v
;
2135 WARN("Invalid name specified\n");
2137 return (ID3D10EffectVariable
*)&null_variable
;
2140 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_GetVariableBySemantic(ID3D10Effect
*iface
,
2143 struct d3d10_effect
*This
= impl_from_ID3D10Effect(iface
);
2146 TRACE("iface %p, semantic %s\n", iface
, debugstr_a(semantic
));
2150 WARN("Invalid semantic specified\n");
2151 return (ID3D10EffectVariable
*)&null_variable
;
2154 for (i
= 0; i
< This
->local_buffer_count
; ++i
)
2156 struct d3d10_effect_variable
*l
= &This
->local_buffers
[i
];
2159 for (j
= 0; j
< l
->type
->member_count
; ++j
)
2161 struct d3d10_effect_variable
*v
= &l
->members
[j
];
2163 if (!strcmp(v
->semantic
, semantic
))
2165 TRACE("Returning variable %p.\n", v
);
2166 return (ID3D10EffectVariable
*)v
;
2171 for (i
= 0; i
< This
->local_variable_count
; ++i
)
2173 struct d3d10_effect_variable
*v
= &This
->local_variables
[i
];
2175 if (!strcmp(v
->semantic
, semantic
))
2177 TRACE("Returning variable %p.\n", v
);
2178 return (ID3D10EffectVariable
*)v
;
2182 WARN("Invalid semantic specified\n");
2184 return (ID3D10EffectVariable
*)&null_variable
;
2187 static struct ID3D10EffectTechnique
* STDMETHODCALLTYPE
d3d10_effect_GetTechniqueByIndex(ID3D10Effect
*iface
,
2190 struct d3d10_effect
*This
= impl_from_ID3D10Effect(iface
);
2191 struct d3d10_effect_technique
*t
;
2193 TRACE("iface %p, index %u\n", iface
, index
);
2195 if (index
>= This
->technique_count
)
2197 WARN("Invalid index specified\n");
2198 return &null_technique
.ID3D10EffectTechnique_iface
;
2201 t
= &This
->techniques
[index
];
2203 TRACE("Returning technique %p, %s.\n", t
, debugstr_a(t
->name
));
2205 return &t
->ID3D10EffectTechnique_iface
;
2208 static struct ID3D10EffectTechnique
* STDMETHODCALLTYPE
d3d10_effect_GetTechniqueByName(ID3D10Effect
*iface
,
2211 struct d3d10_effect
*This
= impl_from_ID3D10Effect(iface
);
2214 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2218 WARN("Invalid name specified\n");
2219 return &null_technique
.ID3D10EffectTechnique_iface
;
2222 for (i
= 0; i
< This
->technique_count
; ++i
)
2224 struct d3d10_effect_technique
*t
= &This
->techniques
[i
];
2225 if (!strcmp(t
->name
, name
))
2227 TRACE("Returning technique %p\n", t
);
2228 return &t
->ID3D10EffectTechnique_iface
;
2232 WARN("Invalid name specified\n");
2234 return &null_technique
.ID3D10EffectTechnique_iface
;
2237 static HRESULT STDMETHODCALLTYPE
d3d10_effect_Optimize(ID3D10Effect
*iface
)
2239 FIXME("iface %p stub!\n", iface
);
2244 static BOOL STDMETHODCALLTYPE
d3d10_effect_IsOptimized(ID3D10Effect
*iface
)
2246 FIXME("iface %p stub!\n", iface
);
2251 const struct ID3D10EffectVtbl d3d10_effect_vtbl
=
2253 /* IUnknown methods */
2254 d3d10_effect_QueryInterface
,
2255 d3d10_effect_AddRef
,
2256 d3d10_effect_Release
,
2257 /* ID3D10Effect methods */
2258 d3d10_effect_IsValid
,
2259 d3d10_effect_IsPool
,
2260 d3d10_effect_GetDevice
,
2261 d3d10_effect_GetDesc
,
2262 d3d10_effect_GetConstantBufferByIndex
,
2263 d3d10_effect_GetConstantBufferByName
,
2264 d3d10_effect_GetVariableByIndex
,
2265 d3d10_effect_GetVariableByName
,
2266 d3d10_effect_GetVariableBySemantic
,
2267 d3d10_effect_GetTechniqueByIndex
,
2268 d3d10_effect_GetTechniqueByName
,
2269 d3d10_effect_Optimize
,
2270 d3d10_effect_IsOptimized
,
2273 /* ID3D10EffectTechnique methods */
2275 static inline struct d3d10_effect_technique
*impl_from_ID3D10EffectTechnique(ID3D10EffectTechnique
*iface
)
2277 return CONTAINING_RECORD(iface
, struct d3d10_effect_technique
, ID3D10EffectTechnique_iface
);
2280 static BOOL STDMETHODCALLTYPE
d3d10_effect_technique_IsValid(ID3D10EffectTechnique
*iface
)
2282 struct d3d10_effect_technique
*This
= impl_from_ID3D10EffectTechnique(iface
);
2284 TRACE("iface %p\n", iface
);
2286 return This
!= &null_technique
;
2289 static HRESULT STDMETHODCALLTYPE
d3d10_effect_technique_GetDesc(ID3D10EffectTechnique
*iface
,
2290 D3D10_TECHNIQUE_DESC
*desc
)
2292 struct d3d10_effect_technique
*This
= impl_from_ID3D10EffectTechnique(iface
);
2294 TRACE("iface %p, desc %p\n", iface
, desc
);
2296 if(This
== &null_technique
)
2298 WARN("Null technique specified\n");
2304 WARN("Invalid argument specified\n");
2305 return E_INVALIDARG
;
2308 desc
->Name
= This
->name
;
2309 desc
->Passes
= This
->pass_count
;
2310 desc
->Annotations
= This
->annotation_count
;
2315 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_technique_GetAnnotationByIndex(
2316 ID3D10EffectTechnique
*iface
, UINT index
)
2318 struct d3d10_effect_technique
*This
= impl_from_ID3D10EffectTechnique(iface
);
2319 struct d3d10_effect_variable
*a
;
2321 TRACE("iface %p, index %u\n", iface
, index
);
2323 if (index
>= This
->annotation_count
)
2325 WARN("Invalid index specified\n");
2326 return (ID3D10EffectVariable
*)&null_variable
;
2329 a
= &This
->annotations
[index
];
2331 TRACE("Returning annotation %p, %s\n", a
, debugstr_a(a
->name
));
2333 return (ID3D10EffectVariable
*)a
;
2336 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_technique_GetAnnotationByName(
2337 ID3D10EffectTechnique
*iface
, LPCSTR name
)
2339 struct d3d10_effect_technique
*This
= impl_from_ID3D10EffectTechnique(iface
);
2342 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2344 for (i
= 0; i
< This
->annotation_count
; ++i
)
2346 struct d3d10_effect_variable
*a
= &This
->annotations
[i
];
2347 if (!strcmp(a
->name
, name
))
2349 TRACE("Returning annotation %p\n", a
);
2350 return (ID3D10EffectVariable
*)a
;
2354 WARN("Invalid name specified\n");
2356 return (ID3D10EffectVariable
*)&null_variable
;
2359 static struct ID3D10EffectPass
* STDMETHODCALLTYPE
d3d10_effect_technique_GetPassByIndex(ID3D10EffectTechnique
*iface
,
2362 struct d3d10_effect_technique
*This
= impl_from_ID3D10EffectTechnique(iface
);
2363 struct d3d10_effect_pass
*p
;
2365 TRACE("iface %p, index %u\n", iface
, index
);
2367 if (index
>= This
->pass_count
)
2369 WARN("Invalid index specified\n");
2370 return &null_pass
.ID3D10EffectPass_iface
;
2373 p
= &This
->passes
[index
];
2375 TRACE("Returning pass %p, %s.\n", p
, debugstr_a(p
->name
));
2377 return &p
->ID3D10EffectPass_iface
;
2380 static struct ID3D10EffectPass
* STDMETHODCALLTYPE
d3d10_effect_technique_GetPassByName(ID3D10EffectTechnique
*iface
,
2383 struct d3d10_effect_technique
*This
= impl_from_ID3D10EffectTechnique(iface
);
2386 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2388 /* Do not check for name==NULL, W7/DX10 crashes in that case. */
2390 for (i
= 0; i
< This
->pass_count
; ++i
)
2392 struct d3d10_effect_pass
*p
= &This
->passes
[i
];
2393 if (!strcmp(p
->name
, name
))
2395 TRACE("Returning pass %p\n", p
);
2396 return &p
->ID3D10EffectPass_iface
;
2400 WARN("Invalid name specified\n");
2402 return &null_pass
.ID3D10EffectPass_iface
;
2405 static HRESULT STDMETHODCALLTYPE
d3d10_effect_technique_ComputeStateBlockMask(ID3D10EffectTechnique
*iface
,
2406 D3D10_STATE_BLOCK_MASK
*mask
)
2408 FIXME("iface %p,mask %p stub!\n", iface
, mask
);
2413 static const struct ID3D10EffectTechniqueVtbl d3d10_effect_technique_vtbl
=
2415 /* ID3D10EffectTechnique methods */
2416 d3d10_effect_technique_IsValid
,
2417 d3d10_effect_technique_GetDesc
,
2418 d3d10_effect_technique_GetAnnotationByIndex
,
2419 d3d10_effect_technique_GetAnnotationByName
,
2420 d3d10_effect_technique_GetPassByIndex
,
2421 d3d10_effect_technique_GetPassByName
,
2422 d3d10_effect_technique_ComputeStateBlockMask
,
2425 /* ID3D10EffectPass methods */
2427 static inline struct d3d10_effect_pass
*impl_from_ID3D10EffectPass(ID3D10EffectPass
*iface
)
2429 return CONTAINING_RECORD(iface
, struct d3d10_effect_pass
, ID3D10EffectPass_iface
);
2432 static BOOL STDMETHODCALLTYPE
d3d10_effect_pass_IsValid(ID3D10EffectPass
*iface
)
2434 struct d3d10_effect_pass
*This
= impl_from_ID3D10EffectPass(iface
);
2436 TRACE("iface %p\n", iface
);
2438 return This
!= &null_pass
;
2441 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_GetDesc(ID3D10EffectPass
*iface
,
2442 D3D10_PASS_DESC
*desc
)
2444 struct d3d10_effect_pass
*This
= impl_from_ID3D10EffectPass(iface
);
2447 FIXME("iface %p, desc %p partial stub!\n", iface
, desc
);
2449 if(This
== &null_pass
)
2451 WARN("Null pass specified\n");
2457 WARN("Invalid argument specified\n");
2458 return E_INVALIDARG
;
2461 memset(desc
, 0, sizeof(*desc
));
2462 desc
->Name
= This
->name
;
2463 for (i
= 0; i
< This
->object_count
; ++i
)
2465 struct d3d10_effect_object
*o
= &This
->objects
[i
];
2466 if (o
->type
== D3D10_EOT_VERTEXSHADER
)
2468 struct d3d10_effect_variable
*v
= o
->data
;
2469 struct d3d10_effect_shader_variable
*s
= v
->data
;
2470 desc
->pIAInputSignature
= (BYTE
*)s
->input_signature
.signature
;
2471 desc
->IAInputSignatureSize
= s
->input_signature
.signature_size
;
2479 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_GetVertexShaderDesc(ID3D10EffectPass
*iface
,
2480 D3D10_PASS_SHADER_DESC
*desc
)
2482 struct d3d10_effect_pass
*This
= impl_from_ID3D10EffectPass(iface
);
2485 TRACE("iface %p, desc %p\n", iface
, desc
);
2487 if (This
== &null_pass
)
2489 WARN("Null pass specified\n");
2495 WARN("Invalid argument specified\n");
2496 return E_INVALIDARG
;
2499 for (i
= 0; i
< This
->object_count
; ++i
)
2501 struct d3d10_effect_object
*o
= &This
->objects
[i
];
2503 if (o
->type
== D3D10_EOT_VERTEXSHADER
)
2505 desc
->pShaderVariable
= o
->data
;
2506 desc
->ShaderIndex
= o
->index
;
2511 TRACE("Returning null_shader_variable\n");
2512 desc
->pShaderVariable
= (ID3D10EffectShaderVariable
*)&null_shader_variable
;
2513 desc
->ShaderIndex
= 0;
2518 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_GetGeometryShaderDesc(ID3D10EffectPass
*iface
,
2519 D3D10_PASS_SHADER_DESC
*desc
)
2521 struct d3d10_effect_pass
*This
= impl_from_ID3D10EffectPass(iface
);
2524 TRACE("iface %p, desc %p\n", iface
, desc
);
2526 if (This
== &null_pass
)
2528 WARN("Null pass specified\n");
2534 WARN("Invalid argument specified\n");
2535 return E_INVALIDARG
;
2538 for (i
= 0; i
< This
->object_count
; ++i
)
2540 struct d3d10_effect_object
*o
= &This
->objects
[i
];
2542 if (o
->type
== D3D10_EOT_GEOMETRYSHADER
)
2544 desc
->pShaderVariable
= o
->data
;
2545 desc
->ShaderIndex
= o
->index
;
2550 TRACE("Returning null_shader_variable\n");
2551 desc
->pShaderVariable
= (ID3D10EffectShaderVariable
*)&null_shader_variable
;
2552 desc
->ShaderIndex
= 0;
2557 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_GetPixelShaderDesc(ID3D10EffectPass
*iface
,
2558 D3D10_PASS_SHADER_DESC
*desc
)
2560 struct d3d10_effect_pass
*This
= impl_from_ID3D10EffectPass(iface
);
2563 TRACE("iface %p, desc %p\n", iface
, desc
);
2565 if (This
== &null_pass
)
2567 WARN("Null pass specified\n");
2573 WARN("Invalid argument specified\n");
2574 return E_INVALIDARG
;
2577 for (i
= 0; i
< This
->object_count
; ++i
)
2579 struct d3d10_effect_object
*o
= &This
->objects
[i
];
2581 if (o
->type
== D3D10_EOT_PIXELSHADER
)
2583 desc
->pShaderVariable
= o
->data
;
2584 desc
->ShaderIndex
= o
->index
;
2589 TRACE("Returning null_shader_variable\n");
2590 desc
->pShaderVariable
= (ID3D10EffectShaderVariable
*)&null_shader_variable
;
2591 desc
->ShaderIndex
= 0;
2596 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_pass_GetAnnotationByIndex(ID3D10EffectPass
*iface
,
2599 struct d3d10_effect_pass
*This
= impl_from_ID3D10EffectPass(iface
);
2600 struct d3d10_effect_variable
*a
;
2602 TRACE("iface %p, index %u\n", iface
, index
);
2604 if (index
>= This
->annotation_count
)
2606 WARN("Invalid index specified\n");
2607 return (ID3D10EffectVariable
*)&null_variable
;
2610 a
= &This
->annotations
[index
];
2612 TRACE("Returning annotation %p, %s\n", a
, debugstr_a(a
->name
));
2614 return (ID3D10EffectVariable
*)a
;
2617 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_pass_GetAnnotationByName(ID3D10EffectPass
*iface
,
2620 struct d3d10_effect_pass
*This
= impl_from_ID3D10EffectPass(iface
);
2623 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2625 for (i
= 0; i
< This
->annotation_count
; ++i
)
2627 struct d3d10_effect_variable
*a
= &This
->annotations
[i
];
2628 if (!strcmp(a
->name
, name
))
2630 TRACE("Returning annotation %p\n", a
);
2631 return (ID3D10EffectVariable
*)a
;
2635 WARN("Invalid name specified\n");
2637 return (ID3D10EffectVariable
*)&null_variable
;
2640 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_Apply(ID3D10EffectPass
*iface
, UINT flags
)
2642 struct d3d10_effect_pass
*This
= impl_from_ID3D10EffectPass(iface
);
2646 TRACE("iface %p, flags %#x\n", iface
, flags
);
2648 if (flags
) FIXME("Ignoring flags (%#x)\n", flags
);
2650 for (i
= 0; i
< This
->object_count
; ++i
)
2652 hr
= d3d10_effect_object_apply(&This
->objects
[i
]);
2653 if (FAILED(hr
)) break;
2659 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_ComputeStateBlockMask(ID3D10EffectPass
*iface
,
2660 D3D10_STATE_BLOCK_MASK
*mask
)
2662 FIXME("iface %p, mask %p stub!\n", iface
, mask
);
2667 static const struct ID3D10EffectPassVtbl d3d10_effect_pass_vtbl
=
2669 /* ID3D10EffectPass methods */
2670 d3d10_effect_pass_IsValid
,
2671 d3d10_effect_pass_GetDesc
,
2672 d3d10_effect_pass_GetVertexShaderDesc
,
2673 d3d10_effect_pass_GetGeometryShaderDesc
,
2674 d3d10_effect_pass_GetPixelShaderDesc
,
2675 d3d10_effect_pass_GetAnnotationByIndex
,
2676 d3d10_effect_pass_GetAnnotationByName
,
2677 d3d10_effect_pass_Apply
,
2678 d3d10_effect_pass_ComputeStateBlockMask
,
2681 /* ID3D10EffectVariable methods */
2683 static BOOL STDMETHODCALLTYPE
d3d10_effect_variable_IsValid(ID3D10EffectVariable
*iface
)
2685 TRACE("iface %p\n", iface
);
2687 return (struct d3d10_effect_variable
*)iface
!= &null_variable
;
2690 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_variable_GetType(ID3D10EffectVariable
*iface
)
2692 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2694 TRACE("iface %p\n", iface
);
2696 return &This
->type
->ID3D10EffectType_iface
;
2699 static HRESULT STDMETHODCALLTYPE
d3d10_effect_variable_GetDesc(ID3D10EffectVariable
*iface
,
2700 D3D10_EFFECT_VARIABLE_DESC
*desc
)
2702 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2704 TRACE("iface %p, desc %p\n", iface
, desc
);
2706 if (!iface
->lpVtbl
->IsValid(iface
))
2708 WARN("Null variable specified\n");
2714 WARN("Invalid argument specified\n");
2715 return E_INVALIDARG
;
2718 /* FIXME: This isn't correct. Anonymous shaders let desc->ExplicitBindPoint untouched, but normal shaders set it! */
2719 memset(desc
, 0, sizeof(*desc
));
2720 desc
->Name
= This
->name
;
2721 desc
->Semantic
= This
->semantic
;
2722 desc
->Flags
= This
->flag
;
2723 desc
->Annotations
= This
->annotation_count
;
2724 desc
->BufferOffset
= This
->buffer_offset
;
2726 if (This
->flag
& D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT
)
2728 desc
->ExplicitBindPoint
= This
->buffer_offset
;
2734 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetAnnotationByIndex(
2735 ID3D10EffectVariable
*iface
, UINT index
)
2737 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2738 struct d3d10_effect_variable
*a
;
2740 TRACE("iface %p, index %u\n", iface
, index
);
2742 if (index
>= This
->annotation_count
)
2744 WARN("Invalid index specified\n");
2745 return (ID3D10EffectVariable
*)&null_variable
;
2748 a
= &This
->annotations
[index
];
2750 TRACE("Returning annotation %p, %s\n", a
, debugstr_a(a
->name
));
2752 return (ID3D10EffectVariable
*)a
;
2755 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetAnnotationByName(
2756 ID3D10EffectVariable
*iface
, LPCSTR name
)
2758 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2761 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2763 for (i
= 0; i
< This
->annotation_count
; ++i
)
2765 struct d3d10_effect_variable
*a
= &This
->annotations
[i
];
2766 if (!strcmp(a
->name
, name
))
2768 TRACE("Returning annotation %p\n", a
);
2769 return (ID3D10EffectVariable
*)a
;
2773 WARN("Invalid name specified\n");
2775 return (ID3D10EffectVariable
*)&null_variable
;
2778 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetMemberByIndex(
2779 ID3D10EffectVariable
*iface
, UINT index
)
2781 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2782 struct d3d10_effect_variable
*m
;
2784 TRACE("iface %p, index %u\n", iface
, index
);
2786 if (index
>= This
->type
->member_count
)
2788 WARN("Invalid index specified\n");
2789 return (ID3D10EffectVariable
*)&null_variable
;
2792 m
= &This
->members
[index
];
2794 TRACE("Returning member %p, %s\n", m
, debugstr_a(m
->name
));
2796 return (ID3D10EffectVariable
*)m
;
2799 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetMemberByName(
2800 ID3D10EffectVariable
*iface
, LPCSTR name
)
2802 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2805 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2809 WARN("Invalid name specified\n");
2810 return (ID3D10EffectVariable
*)&null_variable
;
2813 for (i
= 0; i
< This
->type
->member_count
; ++i
)
2815 struct d3d10_effect_variable
*m
= &This
->members
[i
];
2819 if (!strcmp(m
->name
, name
))
2821 TRACE("Returning member %p\n", m
);
2822 return (ID3D10EffectVariable
*)m
;
2827 WARN("Invalid name specified\n");
2829 return (ID3D10EffectVariable
*)&null_variable
;
2832 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetMemberBySemantic(
2833 ID3D10EffectVariable
*iface
, LPCSTR semantic
)
2835 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2838 TRACE("iface %p, semantic %s.\n", iface
, debugstr_a(semantic
));
2842 WARN("Invalid semantic specified\n");
2843 return (ID3D10EffectVariable
*)&null_variable
;
2846 for (i
= 0; i
< This
->type
->member_count
; ++i
)
2848 struct d3d10_effect_variable
*m
= &This
->members
[i
];
2852 if (!strcmp(m
->semantic
, semantic
))
2854 TRACE("Returning member %p\n", m
);
2855 return (ID3D10EffectVariable
*)m
;
2860 WARN("Invalid semantic specified\n");
2862 return (ID3D10EffectVariable
*)&null_variable
;
2865 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetElement(
2866 ID3D10EffectVariable
*iface
, UINT index
)
2868 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2869 struct d3d10_effect_variable
*v
;
2871 TRACE("iface %p, index %u\n", iface
, index
);
2873 if (index
>= This
->type
->element_count
)
2875 WARN("Invalid index specified\n");
2876 return (ID3D10EffectVariable
*)&null_variable
;
2879 v
= &This
->elements
[index
];
2881 TRACE("Returning element %p, %s\n", v
, debugstr_a(v
->name
));
2883 return (ID3D10EffectVariable
*)v
;
2886 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_variable_GetParentConstantBuffer(
2887 ID3D10EffectVariable
*iface
)
2889 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2891 TRACE("iface %p\n", iface
);
2893 return (ID3D10EffectConstantBuffer
*)This
->buffer
;
2896 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsScalar(
2897 ID3D10EffectVariable
*iface
)
2899 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2901 TRACE("iface %p\n", iface
);
2903 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_scalar_variable_vtbl
)
2904 return (ID3D10EffectScalarVariable
*)This
;
2906 return (ID3D10EffectScalarVariable
*)&null_scalar_variable
;
2909 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsVector(
2910 ID3D10EffectVariable
*iface
)
2912 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2914 TRACE("iface %p\n", iface
);
2916 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_vector_variable_vtbl
)
2917 return (ID3D10EffectVectorVariable
*)This
;
2919 return (ID3D10EffectVectorVariable
*)&null_vector_variable
;
2922 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsMatrix(
2923 ID3D10EffectVariable
*iface
)
2925 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2927 TRACE("iface %p\n", iface
);
2929 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_matrix_variable_vtbl
)
2930 return (ID3D10EffectMatrixVariable
*)This
;
2932 return (ID3D10EffectMatrixVariable
*)&null_matrix_variable
;
2935 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsString(
2936 ID3D10EffectVariable
*iface
)
2938 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2940 TRACE("iface %p\n", iface
);
2942 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_string_variable_vtbl
)
2943 return (ID3D10EffectStringVariable
*)This
;
2945 return (ID3D10EffectStringVariable
*)&null_string_variable
;
2948 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsShaderResource(
2949 ID3D10EffectVariable
*iface
)
2951 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2953 TRACE("iface %p\n", iface
);
2955 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_resource_variable_vtbl
)
2956 return (ID3D10EffectShaderResourceVariable
*)This
;
2958 return (ID3D10EffectShaderResourceVariable
*)&null_shader_resource_variable
;
2961 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsRenderTargetView(
2962 ID3D10EffectVariable
*iface
)
2964 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2966 TRACE("iface %p\n", iface
);
2968 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_render_target_view_variable_vtbl
)
2969 return (ID3D10EffectRenderTargetViewVariable
*)This
;
2971 return (ID3D10EffectRenderTargetViewVariable
*)&null_render_target_view_variable
;
2974 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsDepthStencilView(
2975 ID3D10EffectVariable
*iface
)
2977 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2979 TRACE("iface %p\n", iface
);
2981 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_depth_stencil_view_variable_vtbl
)
2982 return (ID3D10EffectDepthStencilViewVariable
*)This
;
2984 return (ID3D10EffectDepthStencilViewVariable
*)&null_depth_stencil_view_variable
;
2987 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_variable_AsConstantBuffer(
2988 ID3D10EffectVariable
*iface
)
2990 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2992 TRACE("iface %p\n", iface
);
2994 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_constant_buffer_vtbl
)
2995 return (ID3D10EffectConstantBuffer
*)This
;
2997 return (ID3D10EffectConstantBuffer
*)&null_local_buffer
;
3000 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsShader(
3001 ID3D10EffectVariable
*iface
)
3003 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
3005 TRACE("iface %p\n", iface
);
3007 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_variable_vtbl
)
3008 return (ID3D10EffectShaderVariable
*)This
;
3010 return (ID3D10EffectShaderVariable
*)&null_shader_variable
;
3013 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsBlend(ID3D10EffectVariable
*iface
)
3015 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
3017 TRACE("iface %p\n", iface
);
3019 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_blend_variable_vtbl
)
3020 return (ID3D10EffectBlendVariable
*)This
;
3022 return (ID3D10EffectBlendVariable
*)&null_blend_variable
;
3025 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsDepthStencil(
3026 ID3D10EffectVariable
*iface
)
3028 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
3030 TRACE("iface %p\n", iface
);
3032 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_depth_stencil_variable_vtbl
)
3033 return (ID3D10EffectDepthStencilVariable
*)This
;
3035 return (ID3D10EffectDepthStencilVariable
*)&null_depth_stencil_variable
;
3038 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsRasterizer(
3039 ID3D10EffectVariable
*iface
)
3041 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
3043 TRACE("iface %p\n", iface
);
3045 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_rasterizer_variable_vtbl
)
3046 return (ID3D10EffectRasterizerVariable
*)This
;
3048 return (ID3D10EffectRasterizerVariable
*)&null_rasterizer_variable
;
3051 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsSampler(
3052 ID3D10EffectVariable
*iface
)
3054 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
3056 TRACE("iface %p\n", iface
);
3058 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_sampler_variable_vtbl
)
3059 return (ID3D10EffectSamplerVariable
*)This
;
3061 return (ID3D10EffectSamplerVariable
*)&null_sampler_variable
;
3064 static HRESULT STDMETHODCALLTYPE
d3d10_effect_variable_SetRawValue(ID3D10EffectVariable
*iface
,
3065 void *data
, UINT offset
, UINT count
)
3067 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
3072 static HRESULT STDMETHODCALLTYPE
d3d10_effect_variable_GetRawValue(ID3D10EffectVariable
*iface
,
3073 void *data
, UINT offset
, UINT count
)
3075 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
3080 static const struct ID3D10EffectVariableVtbl d3d10_effect_variable_vtbl
=
3082 /* ID3D10EffectVariable methods */
3083 d3d10_effect_variable_IsValid
,
3084 d3d10_effect_variable_GetType
,
3085 d3d10_effect_variable_GetDesc
,
3086 d3d10_effect_variable_GetAnnotationByIndex
,
3087 d3d10_effect_variable_GetAnnotationByName
,
3088 d3d10_effect_variable_GetMemberByIndex
,
3089 d3d10_effect_variable_GetMemberByName
,
3090 d3d10_effect_variable_GetMemberBySemantic
,
3091 d3d10_effect_variable_GetElement
,
3092 d3d10_effect_variable_GetParentConstantBuffer
,
3093 d3d10_effect_variable_AsScalar
,
3094 d3d10_effect_variable_AsVector
,
3095 d3d10_effect_variable_AsMatrix
,
3096 d3d10_effect_variable_AsString
,
3097 d3d10_effect_variable_AsShaderResource
,
3098 d3d10_effect_variable_AsRenderTargetView
,
3099 d3d10_effect_variable_AsDepthStencilView
,
3100 d3d10_effect_variable_AsConstantBuffer
,
3101 d3d10_effect_variable_AsShader
,
3102 d3d10_effect_variable_AsBlend
,
3103 d3d10_effect_variable_AsDepthStencil
,
3104 d3d10_effect_variable_AsRasterizer
,
3105 d3d10_effect_variable_AsSampler
,
3106 d3d10_effect_variable_SetRawValue
,
3107 d3d10_effect_variable_GetRawValue
,
3110 /* ID3D10EffectVariable methods */
3111 static BOOL STDMETHODCALLTYPE
d3d10_effect_constant_buffer_IsValid(ID3D10EffectConstantBuffer
*iface
)
3113 TRACE("iface %p\n", iface
);
3115 return (struct d3d10_effect_variable
*)iface
!= &null_local_buffer
;
3118 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetType(ID3D10EffectConstantBuffer
*iface
)
3120 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
3123 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetDesc(ID3D10EffectConstantBuffer
*iface
,
3124 D3D10_EFFECT_VARIABLE_DESC
*desc
)
3126 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
3129 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetAnnotationByIndex(
3130 ID3D10EffectConstantBuffer
*iface
, UINT index
)
3132 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
3135 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetAnnotationByName(
3136 ID3D10EffectConstantBuffer
*iface
, LPCSTR name
)
3138 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
3141 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetMemberByIndex(
3142 ID3D10EffectConstantBuffer
*iface
, UINT index
)
3144 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
3147 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetMemberByName(
3148 ID3D10EffectConstantBuffer
*iface
, LPCSTR name
)
3150 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
3153 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetMemberBySemantic(
3154 ID3D10EffectConstantBuffer
*iface
, LPCSTR semantic
)
3156 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
3159 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetElement(
3160 ID3D10EffectConstantBuffer
*iface
, UINT index
)
3162 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
3165 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetParentConstantBuffer(
3166 ID3D10EffectConstantBuffer
*iface
)
3168 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
3171 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsScalar(
3172 ID3D10EffectConstantBuffer
*iface
)
3174 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
3177 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsVector(
3178 ID3D10EffectConstantBuffer
*iface
)
3180 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
3183 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsMatrix(
3184 ID3D10EffectConstantBuffer
*iface
)
3186 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
3189 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsString(
3190 ID3D10EffectConstantBuffer
*iface
)
3192 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
3195 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsShaderResource(
3196 ID3D10EffectConstantBuffer
*iface
)
3198 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
3201 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsRenderTargetView(
3202 ID3D10EffectConstantBuffer
*iface
)
3204 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
3207 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsDepthStencilView(
3208 ID3D10EffectConstantBuffer
*iface
)
3210 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
3213 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsConstantBuffer(
3214 ID3D10EffectConstantBuffer
*iface
)
3216 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
3219 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsShader(
3220 ID3D10EffectConstantBuffer
*iface
)
3222 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
3225 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsBlend(ID3D10EffectConstantBuffer
*iface
)
3227 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
3230 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsDepthStencil(
3231 ID3D10EffectConstantBuffer
*iface
)
3233 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
3236 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsRasterizer(
3237 ID3D10EffectConstantBuffer
*iface
)
3239 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
3242 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsSampler(
3243 ID3D10EffectConstantBuffer
*iface
)
3245 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
3248 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_SetRawValue(ID3D10EffectConstantBuffer
*iface
,
3249 void *data
, UINT offset
, UINT count
)
3251 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3254 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetRawValue(ID3D10EffectConstantBuffer
*iface
,
3255 void *data
, UINT offset
, UINT count
)
3257 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3260 /* ID3D10EffectConstantBuffer methods */
3261 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_SetConstantBuffer(ID3D10EffectConstantBuffer
*iface
,
3262 ID3D10Buffer
*buffer
)
3264 FIXME("iface %p, buffer %p stub!\n", iface
, buffer
);
3269 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetConstantBuffer(ID3D10EffectConstantBuffer
*iface
,
3270 ID3D10Buffer
**buffer
)
3272 FIXME("iface %p, buffer %p stub!\n", iface
, buffer
);
3277 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_SetTextureBuffer(ID3D10EffectConstantBuffer
*iface
,
3278 ID3D10ShaderResourceView
*view
)
3280 FIXME("iface %p, view %p stub!\n", iface
, view
);
3285 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetTextureBuffer(ID3D10EffectConstantBuffer
*iface
,
3286 ID3D10ShaderResourceView
**view
)
3288 FIXME("iface %p, view %p stub!\n", iface
, view
);
3293 static const struct ID3D10EffectConstantBufferVtbl d3d10_effect_constant_buffer_vtbl
=
3295 /* ID3D10EffectVariable methods */
3296 d3d10_effect_constant_buffer_IsValid
,
3297 d3d10_effect_constant_buffer_GetType
,
3298 d3d10_effect_constant_buffer_GetDesc
,
3299 d3d10_effect_constant_buffer_GetAnnotationByIndex
,
3300 d3d10_effect_constant_buffer_GetAnnotationByName
,
3301 d3d10_effect_constant_buffer_GetMemberByIndex
,
3302 d3d10_effect_constant_buffer_GetMemberByName
,
3303 d3d10_effect_constant_buffer_GetMemberBySemantic
,
3304 d3d10_effect_constant_buffer_GetElement
,
3305 d3d10_effect_constant_buffer_GetParentConstantBuffer
,
3306 d3d10_effect_constant_buffer_AsScalar
,
3307 d3d10_effect_constant_buffer_AsVector
,
3308 d3d10_effect_constant_buffer_AsMatrix
,
3309 d3d10_effect_constant_buffer_AsString
,
3310 d3d10_effect_constant_buffer_AsShaderResource
,
3311 d3d10_effect_constant_buffer_AsRenderTargetView
,
3312 d3d10_effect_constant_buffer_AsDepthStencilView
,
3313 d3d10_effect_constant_buffer_AsConstantBuffer
,
3314 d3d10_effect_constant_buffer_AsShader
,
3315 d3d10_effect_constant_buffer_AsBlend
,
3316 d3d10_effect_constant_buffer_AsDepthStencil
,
3317 d3d10_effect_constant_buffer_AsRasterizer
,
3318 d3d10_effect_constant_buffer_AsSampler
,
3319 d3d10_effect_constant_buffer_SetRawValue
,
3320 d3d10_effect_constant_buffer_GetRawValue
,
3321 /* ID3D10EffectConstantBuffer methods */
3322 d3d10_effect_constant_buffer_SetConstantBuffer
,
3323 d3d10_effect_constant_buffer_GetConstantBuffer
,
3324 d3d10_effect_constant_buffer_SetTextureBuffer
,
3325 d3d10_effect_constant_buffer_GetTextureBuffer
,
3328 /* ID3D10EffectVariable methods */
3330 static BOOL STDMETHODCALLTYPE
d3d10_effect_scalar_variable_IsValid(ID3D10EffectScalarVariable
*iface
)
3332 TRACE("iface %p\n", iface
);
3334 return (struct d3d10_effect_variable
*)iface
!= &null_scalar_variable
;
3337 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetType(
3338 ID3D10EffectScalarVariable
*iface
)
3340 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
3343 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetDesc(ID3D10EffectScalarVariable
*iface
,
3344 D3D10_EFFECT_VARIABLE_DESC
*desc
)
3346 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
3349 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetAnnotationByIndex(
3350 ID3D10EffectScalarVariable
*iface
, UINT index
)
3352 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
3355 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetAnnotationByName(
3356 ID3D10EffectScalarVariable
*iface
, LPCSTR name
)
3358 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
3361 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetMemberByIndex(
3362 ID3D10EffectScalarVariable
*iface
, UINT index
)
3364 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
3367 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetMemberByName(
3368 ID3D10EffectScalarVariable
*iface
, LPCSTR name
)
3370 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
3373 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetMemberBySemantic(
3374 ID3D10EffectScalarVariable
*iface
, LPCSTR semantic
)
3376 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
3379 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetElement(
3380 ID3D10EffectScalarVariable
*iface
, UINT index
)
3382 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
3385 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetParentConstantBuffer(
3386 ID3D10EffectScalarVariable
*iface
)
3388 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
3391 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsScalar(
3392 ID3D10EffectScalarVariable
*iface
)
3394 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
3397 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsVector(
3398 ID3D10EffectScalarVariable
*iface
)
3400 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
3403 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsMatrix(
3404 ID3D10EffectScalarVariable
*iface
)
3406 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
3409 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsString(
3410 ID3D10EffectScalarVariable
*iface
)
3412 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
3415 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsShaderResource(
3416 ID3D10EffectScalarVariable
*iface
)
3418 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
3421 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsRenderTargetView(
3422 ID3D10EffectScalarVariable
*iface
)
3424 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
3427 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsDepthStencilView(
3428 ID3D10EffectScalarVariable
*iface
)
3430 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
3433 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsConstantBuffer(
3434 ID3D10EffectScalarVariable
*iface
)
3436 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
3439 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsShader(
3440 ID3D10EffectScalarVariable
*iface
)
3442 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
3445 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsBlend(
3446 ID3D10EffectScalarVariable
*iface
)
3448 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
3451 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsDepthStencil(
3452 ID3D10EffectScalarVariable
*iface
)
3454 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
3457 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsRasterizer(
3458 ID3D10EffectScalarVariable
*iface
)
3460 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
3463 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsSampler(
3464 ID3D10EffectScalarVariable
*iface
)
3466 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
3469 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetRawValue(ID3D10EffectScalarVariable
*iface
,
3470 void *data
, UINT offset
, UINT count
)
3472 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3475 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetRawValue(ID3D10EffectScalarVariable
*iface
,
3476 void *data
, UINT offset
, UINT count
)
3478 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3481 /* ID3D10EffectScalarVariable methods */
3483 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetFloat(ID3D10EffectScalarVariable
*iface
,
3486 FIXME("iface %p, value %.8e stub!\n", iface
, value
);
3491 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetFloat(ID3D10EffectScalarVariable
*iface
,
3494 FIXME("iface %p, value %p stub!\n", iface
, value
);
3499 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetFloatArray(ID3D10EffectScalarVariable
*iface
,
3500 float *values
, UINT offset
, UINT count
)
3502 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3507 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetFloatArray(ID3D10EffectScalarVariable
*iface
,
3508 float *values
, UINT offset
, UINT count
)
3510 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3515 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetInt(ID3D10EffectScalarVariable
*iface
,
3518 FIXME("iface %p, value %d stub!\n", iface
, value
);
3523 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetInt(ID3D10EffectScalarVariable
*iface
,
3526 FIXME("iface %p, value %p stub!\n", iface
, value
);
3531 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetIntArray(ID3D10EffectScalarVariable
*iface
,
3532 int *values
, UINT offset
, UINT count
)
3534 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3539 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetIntArray(ID3D10EffectScalarVariable
*iface
,
3540 int *values
, UINT offset
, UINT count
)
3542 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3547 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetBool(ID3D10EffectScalarVariable
*iface
,
3550 FIXME("iface %p, value %d stub!\n", iface
, value
);
3555 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetBool(ID3D10EffectScalarVariable
*iface
,
3558 FIXME("iface %p, value %p stub!\n", iface
, value
);
3563 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetBoolArray(ID3D10EffectScalarVariable
*iface
,
3564 BOOL
*values
, UINT offset
, UINT count
)
3566 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3571 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetBoolArray(ID3D10EffectScalarVariable
*iface
,
3572 BOOL
*values
, UINT offset
, UINT count
)
3574 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3579 static const struct ID3D10EffectScalarVariableVtbl d3d10_effect_scalar_variable_vtbl
=
3581 /* ID3D10EffectVariable methods */
3582 d3d10_effect_scalar_variable_IsValid
,
3583 d3d10_effect_scalar_variable_GetType
,
3584 d3d10_effect_scalar_variable_GetDesc
,
3585 d3d10_effect_scalar_variable_GetAnnotationByIndex
,
3586 d3d10_effect_scalar_variable_GetAnnotationByName
,
3587 d3d10_effect_scalar_variable_GetMemberByIndex
,
3588 d3d10_effect_scalar_variable_GetMemberByName
,
3589 d3d10_effect_scalar_variable_GetMemberBySemantic
,
3590 d3d10_effect_scalar_variable_GetElement
,
3591 d3d10_effect_scalar_variable_GetParentConstantBuffer
,
3592 d3d10_effect_scalar_variable_AsScalar
,
3593 d3d10_effect_scalar_variable_AsVector
,
3594 d3d10_effect_scalar_variable_AsMatrix
,
3595 d3d10_effect_scalar_variable_AsString
,
3596 d3d10_effect_scalar_variable_AsShaderResource
,
3597 d3d10_effect_scalar_variable_AsRenderTargetView
,
3598 d3d10_effect_scalar_variable_AsDepthStencilView
,
3599 d3d10_effect_scalar_variable_AsConstantBuffer
,
3600 d3d10_effect_scalar_variable_AsShader
,
3601 d3d10_effect_scalar_variable_AsBlend
,
3602 d3d10_effect_scalar_variable_AsDepthStencil
,
3603 d3d10_effect_scalar_variable_AsRasterizer
,
3604 d3d10_effect_scalar_variable_AsSampler
,
3605 d3d10_effect_scalar_variable_SetRawValue
,
3606 d3d10_effect_scalar_variable_GetRawValue
,
3607 /* ID3D10EffectScalarVariable methods */
3608 d3d10_effect_scalar_variable_SetFloat
,
3609 d3d10_effect_scalar_variable_GetFloat
,
3610 d3d10_effect_scalar_variable_SetFloatArray
,
3611 d3d10_effect_scalar_variable_GetFloatArray
,
3612 d3d10_effect_scalar_variable_SetInt
,
3613 d3d10_effect_scalar_variable_GetInt
,
3614 d3d10_effect_scalar_variable_SetIntArray
,
3615 d3d10_effect_scalar_variable_GetIntArray
,
3616 d3d10_effect_scalar_variable_SetBool
,
3617 d3d10_effect_scalar_variable_GetBool
,
3618 d3d10_effect_scalar_variable_SetBoolArray
,
3619 d3d10_effect_scalar_variable_GetBoolArray
,
3622 /* ID3D10EffectVariable methods */
3624 static BOOL STDMETHODCALLTYPE
d3d10_effect_vector_variable_IsValid(ID3D10EffectVectorVariable
*iface
)
3626 TRACE("iface %p\n", iface
);
3628 return (struct d3d10_effect_variable
*)iface
!= &null_vector_variable
;
3631 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetType(
3632 ID3D10EffectVectorVariable
*iface
)
3634 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
3637 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetDesc(ID3D10EffectVectorVariable
*iface
,
3638 D3D10_EFFECT_VARIABLE_DESC
*desc
)
3640 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
3643 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetAnnotationByIndex(
3644 ID3D10EffectVectorVariable
*iface
, UINT index
)
3646 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
3649 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetAnnotationByName(
3650 ID3D10EffectVectorVariable
*iface
, LPCSTR name
)
3652 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
3655 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetMemberByIndex(
3656 ID3D10EffectVectorVariable
*iface
, UINT index
)
3658 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
3661 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetMemberByName(
3662 ID3D10EffectVectorVariable
*iface
, LPCSTR name
)
3664 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
3667 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetMemberBySemantic(
3668 ID3D10EffectVectorVariable
*iface
, LPCSTR semantic
)
3670 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
3673 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetElement(
3674 ID3D10EffectVectorVariable
*iface
, UINT index
)
3676 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
3679 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetParentConstantBuffer(
3680 ID3D10EffectVectorVariable
*iface
)
3682 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
3685 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsScalar(
3686 ID3D10EffectVectorVariable
*iface
)
3688 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
3691 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsVector(
3692 ID3D10EffectVectorVariable
*iface
)
3694 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
3697 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsMatrix(
3698 ID3D10EffectVectorVariable
*iface
)
3700 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
3703 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsString(
3704 ID3D10EffectVectorVariable
*iface
)
3706 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
3709 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsShaderResource(
3710 ID3D10EffectVectorVariable
*iface
)
3712 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
3715 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsRenderTargetView(
3716 ID3D10EffectVectorVariable
*iface
)
3718 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
3721 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsDepthStencilView(
3722 ID3D10EffectVectorVariable
*iface
)
3724 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
3727 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsConstantBuffer(
3728 ID3D10EffectVectorVariable
*iface
)
3730 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
3733 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsShader(
3734 ID3D10EffectVectorVariable
*iface
)
3736 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
3739 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsBlend(
3740 ID3D10EffectVectorVariable
*iface
)
3742 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
3745 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsDepthStencil(
3746 ID3D10EffectVectorVariable
*iface
)
3748 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
3751 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsRasterizer(
3752 ID3D10EffectVectorVariable
*iface
)
3754 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
3757 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsSampler(
3758 ID3D10EffectVectorVariable
*iface
)
3760 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
3763 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetRawValue(ID3D10EffectVectorVariable
*iface
,
3764 void *data
, UINT offset
, UINT count
)
3766 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3769 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetRawValue(ID3D10EffectVectorVariable
*iface
,
3770 void *data
, UINT offset
, UINT count
)
3772 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3775 /* ID3D10EffectVectorVariable methods */
3777 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetBoolVector(ID3D10EffectVectorVariable
*iface
,
3780 FIXME("iface %p, value %p stub!\n", iface
, value
);
3785 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetIntVector(ID3D10EffectVectorVariable
*iface
,
3788 FIXME("iface %p, value %p stub!\n", iface
, value
);
3793 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetFloatVector(ID3D10EffectVectorVariable
*iface
,
3796 FIXME("iface %p, value %p stub!\n", iface
, value
);
3801 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetBoolVector(ID3D10EffectVectorVariable
*iface
,
3804 FIXME("iface %p, value %p stub!\n", iface
, value
);
3809 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetIntVector(ID3D10EffectVectorVariable
*iface
,
3812 FIXME("iface %p, value %p stub!\n", iface
, value
);
3817 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetFloatVector(ID3D10EffectVectorVariable
*iface
,
3820 FIXME("iface %p, value %p stub!\n", iface
, value
);
3825 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetBoolVectorArray(ID3D10EffectVectorVariable
*iface
,
3826 BOOL
*values
, UINT offset
, UINT count
)
3828 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3833 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetIntVectorArray(ID3D10EffectVectorVariable
*iface
,
3834 int *values
, UINT offset
, UINT count
)
3836 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3841 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetFloatVectorArray(ID3D10EffectVectorVariable
*iface
,
3842 float *values
, UINT offset
, UINT count
)
3844 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3849 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetBoolVectorArray(ID3D10EffectVectorVariable
*iface
,
3850 BOOL
*values
, UINT offset
, UINT count
)
3852 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3857 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetIntVectorArray(ID3D10EffectVectorVariable
*iface
,
3858 int *values
, UINT offset
, UINT count
)
3860 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3865 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetFloatVectorArray(ID3D10EffectVectorVariable
*iface
,
3866 float *values
, UINT offset
, UINT count
)
3868 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3873 static const struct ID3D10EffectVectorVariableVtbl d3d10_effect_vector_variable_vtbl
=
3875 /* ID3D10EffectVariable methods */
3876 d3d10_effect_vector_variable_IsValid
,
3877 d3d10_effect_vector_variable_GetType
,
3878 d3d10_effect_vector_variable_GetDesc
,
3879 d3d10_effect_vector_variable_GetAnnotationByIndex
,
3880 d3d10_effect_vector_variable_GetAnnotationByName
,
3881 d3d10_effect_vector_variable_GetMemberByIndex
,
3882 d3d10_effect_vector_variable_GetMemberByName
,
3883 d3d10_effect_vector_variable_GetMemberBySemantic
,
3884 d3d10_effect_vector_variable_GetElement
,
3885 d3d10_effect_vector_variable_GetParentConstantBuffer
,
3886 d3d10_effect_vector_variable_AsScalar
,
3887 d3d10_effect_vector_variable_AsVector
,
3888 d3d10_effect_vector_variable_AsMatrix
,
3889 d3d10_effect_vector_variable_AsString
,
3890 d3d10_effect_vector_variable_AsShaderResource
,
3891 d3d10_effect_vector_variable_AsRenderTargetView
,
3892 d3d10_effect_vector_variable_AsDepthStencilView
,
3893 d3d10_effect_vector_variable_AsConstantBuffer
,
3894 d3d10_effect_vector_variable_AsShader
,
3895 d3d10_effect_vector_variable_AsBlend
,
3896 d3d10_effect_vector_variable_AsDepthStencil
,
3897 d3d10_effect_vector_variable_AsRasterizer
,
3898 d3d10_effect_vector_variable_AsSampler
,
3899 d3d10_effect_vector_variable_SetRawValue
,
3900 d3d10_effect_vector_variable_GetRawValue
,
3901 /* ID3D10EffectVectorVariable methods */
3902 d3d10_effect_vector_variable_SetBoolVector
,
3903 d3d10_effect_vector_variable_SetIntVector
,
3904 d3d10_effect_vector_variable_SetFloatVector
,
3905 d3d10_effect_vector_variable_GetBoolVector
,
3906 d3d10_effect_vector_variable_GetIntVector
,
3907 d3d10_effect_vector_variable_GetFloatVector
,
3908 d3d10_effect_vector_variable_SetBoolVectorArray
,
3909 d3d10_effect_vector_variable_SetIntVectorArray
,
3910 d3d10_effect_vector_variable_SetFloatVectorArray
,
3911 d3d10_effect_vector_variable_GetBoolVectorArray
,
3912 d3d10_effect_vector_variable_GetIntVectorArray
,
3913 d3d10_effect_vector_variable_GetFloatVectorArray
,
3916 /* ID3D10EffectVariable methods */
3918 static BOOL STDMETHODCALLTYPE
d3d10_effect_matrix_variable_IsValid(ID3D10EffectMatrixVariable
*iface
)
3920 TRACE("iface %p\n", iface
);
3922 return (struct d3d10_effect_variable
*)iface
!= &null_matrix_variable
;
3925 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetType(
3926 ID3D10EffectMatrixVariable
*iface
)
3928 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
3931 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetDesc(ID3D10EffectMatrixVariable
*iface
,
3932 D3D10_EFFECT_VARIABLE_DESC
*desc
)
3934 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
3937 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetAnnotationByIndex(
3938 ID3D10EffectMatrixVariable
*iface
, UINT index
)
3940 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
3943 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetAnnotationByName(
3944 ID3D10EffectMatrixVariable
*iface
, LPCSTR name
)
3946 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
3949 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMemberByIndex(
3950 ID3D10EffectMatrixVariable
*iface
, UINT index
)
3952 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
3955 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMemberByName(
3956 ID3D10EffectMatrixVariable
*iface
, LPCSTR name
)
3958 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
3961 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMemberBySemantic(
3962 ID3D10EffectMatrixVariable
*iface
, LPCSTR semantic
)
3964 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
3967 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetElement(
3968 ID3D10EffectMatrixVariable
*iface
, UINT index
)
3970 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
3973 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetParentConstantBuffer(
3974 ID3D10EffectMatrixVariable
*iface
)
3976 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
3979 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsScalar(
3980 ID3D10EffectMatrixVariable
*iface
)
3982 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
3985 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsVector(
3986 ID3D10EffectMatrixVariable
*iface
)
3988 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
3991 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsMatrix(
3992 ID3D10EffectMatrixVariable
*iface
)
3994 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
3997 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsString(
3998 ID3D10EffectMatrixVariable
*iface
)
4000 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
4003 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsShaderResource(
4004 ID3D10EffectMatrixVariable
*iface
)
4006 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
4009 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsRenderTargetView(
4010 ID3D10EffectMatrixVariable
*iface
)
4012 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
4015 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsDepthStencilView(
4016 ID3D10EffectMatrixVariable
*iface
)
4018 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
4021 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsConstantBuffer(
4022 ID3D10EffectMatrixVariable
*iface
)
4024 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
4027 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsShader(
4028 ID3D10EffectMatrixVariable
*iface
)
4030 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
4033 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsBlend(
4034 ID3D10EffectMatrixVariable
*iface
)
4036 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
4039 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsDepthStencil(
4040 ID3D10EffectMatrixVariable
*iface
)
4042 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
4045 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsRasterizer(
4046 ID3D10EffectMatrixVariable
*iface
)
4048 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
4051 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsSampler(
4052 ID3D10EffectMatrixVariable
*iface
)
4054 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
4057 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetRawValue(ID3D10EffectMatrixVariable
*iface
,
4058 void *data
, UINT offset
, UINT count
)
4060 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4063 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetRawValue(ID3D10EffectMatrixVariable
*iface
,
4064 void *data
, UINT offset
, UINT count
)
4066 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4069 /* ID3D10EffectMatrixVariable methods */
4071 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetMatrix(ID3D10EffectMatrixVariable
*iface
,
4074 FIXME("iface %p, data %p stub!\n", iface
, data
);
4079 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMatrix(ID3D10EffectMatrixVariable
*iface
,
4082 FIXME("iface %p, data %p stub!\n", iface
, data
);
4087 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetMatrixArray(ID3D10EffectMatrixVariable
*iface
,
4088 float *data
, UINT offset
, UINT count
)
4090 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
4095 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMatrixArray(ID3D10EffectMatrixVariable
*iface
,
4096 float *data
, UINT offset
, UINT count
)
4098 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
4103 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetMatrixTranspose(ID3D10EffectMatrixVariable
*iface
,
4106 FIXME("iface %p, data %p stub!\n", iface
, data
);
4111 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMatrixTranspose(ID3D10EffectMatrixVariable
*iface
,
4114 FIXME("iface %p, data %p stub!\n", iface
, data
);
4119 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetMatrixTransposeArray(ID3D10EffectMatrixVariable
*iface
,
4120 float *data
, UINT offset
, UINT count
)
4122 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
4127 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMatrixTransposeArray(ID3D10EffectMatrixVariable
*iface
,
4128 float *data
, UINT offset
, UINT count
)
4130 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
4136 static const struct ID3D10EffectMatrixVariableVtbl d3d10_effect_matrix_variable_vtbl
=
4138 /* ID3D10EffectVariable methods */
4139 d3d10_effect_matrix_variable_IsValid
,
4140 d3d10_effect_matrix_variable_GetType
,
4141 d3d10_effect_matrix_variable_GetDesc
,
4142 d3d10_effect_matrix_variable_GetAnnotationByIndex
,
4143 d3d10_effect_matrix_variable_GetAnnotationByName
,
4144 d3d10_effect_matrix_variable_GetMemberByIndex
,
4145 d3d10_effect_matrix_variable_GetMemberByName
,
4146 d3d10_effect_matrix_variable_GetMemberBySemantic
,
4147 d3d10_effect_matrix_variable_GetElement
,
4148 d3d10_effect_matrix_variable_GetParentConstantBuffer
,
4149 d3d10_effect_matrix_variable_AsScalar
,
4150 d3d10_effect_matrix_variable_AsVector
,
4151 d3d10_effect_matrix_variable_AsMatrix
,
4152 d3d10_effect_matrix_variable_AsString
,
4153 d3d10_effect_matrix_variable_AsShaderResource
,
4154 d3d10_effect_matrix_variable_AsRenderTargetView
,
4155 d3d10_effect_matrix_variable_AsDepthStencilView
,
4156 d3d10_effect_matrix_variable_AsConstantBuffer
,
4157 d3d10_effect_matrix_variable_AsShader
,
4158 d3d10_effect_matrix_variable_AsBlend
,
4159 d3d10_effect_matrix_variable_AsDepthStencil
,
4160 d3d10_effect_matrix_variable_AsRasterizer
,
4161 d3d10_effect_matrix_variable_AsSampler
,
4162 d3d10_effect_matrix_variable_SetRawValue
,
4163 d3d10_effect_matrix_variable_GetRawValue
,
4164 /* ID3D10EffectMatrixVariable methods */
4165 d3d10_effect_matrix_variable_SetMatrix
,
4166 d3d10_effect_matrix_variable_GetMatrix
,
4167 d3d10_effect_matrix_variable_SetMatrixArray
,
4168 d3d10_effect_matrix_variable_GetMatrixArray
,
4169 d3d10_effect_matrix_variable_SetMatrixTranspose
,
4170 d3d10_effect_matrix_variable_GetMatrixTranspose
,
4171 d3d10_effect_matrix_variable_SetMatrixTransposeArray
,
4172 d3d10_effect_matrix_variable_GetMatrixTransposeArray
,
4175 /* ID3D10EffectVariable methods */
4177 static BOOL STDMETHODCALLTYPE
d3d10_effect_string_variable_IsValid(ID3D10EffectStringVariable
*iface
)
4179 TRACE("iface %p\n", iface
);
4181 return (struct d3d10_effect_variable
*)iface
!= &null_string_variable
;
4184 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetType(
4185 ID3D10EffectStringVariable
*iface
)
4187 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
4190 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_GetDesc(ID3D10EffectStringVariable
*iface
,
4191 D3D10_EFFECT_VARIABLE_DESC
*desc
)
4193 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
4196 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetAnnotationByIndex(
4197 ID3D10EffectStringVariable
*iface
, UINT index
)
4199 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
4202 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetAnnotationByName(
4203 ID3D10EffectStringVariable
*iface
, LPCSTR name
)
4205 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
4208 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetMemberByIndex(
4209 ID3D10EffectStringVariable
*iface
, UINT index
)
4211 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
4214 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetMemberByName(
4215 ID3D10EffectStringVariable
*iface
, LPCSTR name
)
4217 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
4220 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetMemberBySemantic(
4221 ID3D10EffectStringVariable
*iface
, LPCSTR semantic
)
4223 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
4226 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetElement(
4227 ID3D10EffectStringVariable
*iface
, UINT index
)
4229 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
4232 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetParentConstantBuffer(
4233 ID3D10EffectStringVariable
*iface
)
4235 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
4238 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsScalar(
4239 ID3D10EffectStringVariable
*iface
)
4241 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
4244 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsVector(
4245 ID3D10EffectStringVariable
*iface
)
4247 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
4250 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsMatrix(
4251 ID3D10EffectStringVariable
*iface
)
4253 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
4256 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsString(
4257 ID3D10EffectStringVariable
*iface
)
4259 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
4262 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsShaderResource(
4263 ID3D10EffectStringVariable
*iface
)
4265 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
4268 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsRenderTargetView(
4269 ID3D10EffectStringVariable
*iface
)
4271 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
4274 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsDepthStencilView(
4275 ID3D10EffectStringVariable
*iface
)
4277 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
4280 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsConstantBuffer(
4281 ID3D10EffectStringVariable
*iface
)
4283 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
4286 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsShader(
4287 ID3D10EffectStringVariable
*iface
)
4289 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
4292 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsBlend(
4293 ID3D10EffectStringVariable
*iface
)
4295 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
4298 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsDepthStencil(
4299 ID3D10EffectStringVariable
*iface
)
4301 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
4304 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsRasterizer(
4305 ID3D10EffectStringVariable
*iface
)
4307 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
4310 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsSampler(
4311 ID3D10EffectStringVariable
*iface
)
4313 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
4316 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_SetRawValue(ID3D10EffectStringVariable
*iface
,
4317 void *data
, UINT offset
, UINT count
)
4319 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4322 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_GetRawValue(ID3D10EffectStringVariable
*iface
,
4323 void *data
, UINT offset
, UINT count
)
4325 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4328 /* ID3D10EffectStringVariable methods */
4330 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_GetString(ID3D10EffectStringVariable
*iface
,
4333 FIXME("iface %p, str %p stub!\n", iface
, str
);
4338 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_GetStringArray(ID3D10EffectStringVariable
*iface
,
4339 LPCSTR
*strs
, UINT offset
, UINT count
)
4341 FIXME("iface %p, strs %p, offset %u, count %u stub!\n", iface
, strs
, offset
, count
);
4347 static const struct ID3D10EffectStringVariableVtbl d3d10_effect_string_variable_vtbl
=
4349 /* ID3D10EffectVariable methods */
4350 d3d10_effect_string_variable_IsValid
,
4351 d3d10_effect_string_variable_GetType
,
4352 d3d10_effect_string_variable_GetDesc
,
4353 d3d10_effect_string_variable_GetAnnotationByIndex
,
4354 d3d10_effect_string_variable_GetAnnotationByName
,
4355 d3d10_effect_string_variable_GetMemberByIndex
,
4356 d3d10_effect_string_variable_GetMemberByName
,
4357 d3d10_effect_string_variable_GetMemberBySemantic
,
4358 d3d10_effect_string_variable_GetElement
,
4359 d3d10_effect_string_variable_GetParentConstantBuffer
,
4360 d3d10_effect_string_variable_AsScalar
,
4361 d3d10_effect_string_variable_AsVector
,
4362 d3d10_effect_string_variable_AsMatrix
,
4363 d3d10_effect_string_variable_AsString
,
4364 d3d10_effect_string_variable_AsShaderResource
,
4365 d3d10_effect_string_variable_AsRenderTargetView
,
4366 d3d10_effect_string_variable_AsDepthStencilView
,
4367 d3d10_effect_string_variable_AsConstantBuffer
,
4368 d3d10_effect_string_variable_AsShader
,
4369 d3d10_effect_string_variable_AsBlend
,
4370 d3d10_effect_string_variable_AsDepthStencil
,
4371 d3d10_effect_string_variable_AsRasterizer
,
4372 d3d10_effect_string_variable_AsSampler
,
4373 d3d10_effect_string_variable_SetRawValue
,
4374 d3d10_effect_string_variable_GetRawValue
,
4375 /* ID3D10EffectStringVariable methods */
4376 d3d10_effect_string_variable_GetString
,
4377 d3d10_effect_string_variable_GetStringArray
,
4380 /* ID3D10EffectVariable methods */
4382 static BOOL STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_IsValid(ID3D10EffectShaderResourceVariable
*iface
)
4384 TRACE("iface %p\n", iface
);
4386 return (struct d3d10_effect_variable
*)iface
!= &null_shader_resource_variable
;
4389 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetType(
4390 ID3D10EffectShaderResourceVariable
*iface
)
4392 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
4395 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetDesc(
4396 ID3D10EffectShaderResourceVariable
*iface
, D3D10_EFFECT_VARIABLE_DESC
*desc
)
4398 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
4401 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetAnnotationByIndex(
4402 ID3D10EffectShaderResourceVariable
*iface
, UINT index
)
4404 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
4407 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetAnnotationByName(
4408 ID3D10EffectShaderResourceVariable
*iface
, LPCSTR name
)
4410 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
4413 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetMemberByIndex(
4414 ID3D10EffectShaderResourceVariable
*iface
, UINT index
)
4416 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
4419 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetMemberByName(
4420 ID3D10EffectShaderResourceVariable
*iface
, LPCSTR name
)
4422 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
4425 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetMemberBySemantic(
4426 ID3D10EffectShaderResourceVariable
*iface
, LPCSTR semantic
)
4428 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
4431 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetElement(
4432 ID3D10EffectShaderResourceVariable
*iface
, UINT index
)
4434 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
4437 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetParentConstantBuffer(
4438 ID3D10EffectShaderResourceVariable
*iface
)
4440 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
4443 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsScalar(
4444 ID3D10EffectShaderResourceVariable
*iface
)
4446 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
4449 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsVector(
4450 ID3D10EffectShaderResourceVariable
*iface
)
4452 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
4455 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsMatrix(
4456 ID3D10EffectShaderResourceVariable
*iface
)
4458 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
4461 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsString(
4462 ID3D10EffectShaderResourceVariable
*iface
)
4464 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
4467 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsShaderResource(
4468 ID3D10EffectShaderResourceVariable
*iface
)
4470 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
4473 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsRenderTargetView(
4474 ID3D10EffectShaderResourceVariable
*iface
)
4476 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
4479 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsDepthStencilView(
4480 ID3D10EffectShaderResourceVariable
*iface
)
4482 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
4485 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsConstantBuffer(
4486 ID3D10EffectShaderResourceVariable
*iface
)
4488 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
4491 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsShader(
4492 ID3D10EffectShaderResourceVariable
*iface
)
4494 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
4497 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsBlend(
4498 ID3D10EffectShaderResourceVariable
*iface
)
4500 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
4503 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsDepthStencil(
4504 ID3D10EffectShaderResourceVariable
*iface
)
4506 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
4509 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsRasterizer(
4510 ID3D10EffectShaderResourceVariable
*iface
)
4512 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
4515 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsSampler(
4516 ID3D10EffectShaderResourceVariable
*iface
)
4518 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
4521 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_SetRawValue(
4522 ID3D10EffectShaderResourceVariable
*iface
, void *data
, UINT offset
, UINT count
)
4524 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4527 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetRawValue(
4528 ID3D10EffectShaderResourceVariable
*iface
, void *data
, UINT offset
, UINT count
)
4530 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4533 /* ID3D10EffectShaderResourceVariable methods */
4535 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_SetResource(
4536 ID3D10EffectShaderResourceVariable
*iface
, ID3D10ShaderResourceView
*resource
)
4538 FIXME("iface %p, resource %p stub!\n", iface
, resource
);
4543 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetResource(
4544 ID3D10EffectShaderResourceVariable
*iface
, ID3D10ShaderResourceView
**resource
)
4546 FIXME("iface %p, resource %p stub!\n", iface
, resource
);
4551 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_SetResourceArray(
4552 ID3D10EffectShaderResourceVariable
*iface
, ID3D10ShaderResourceView
**resources
, UINT offset
, UINT count
)
4554 FIXME("iface %p, resources %p, offset %u, count %u stub!\n", iface
, resources
, offset
, count
);
4559 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetResourceArray(
4560 ID3D10EffectShaderResourceVariable
*iface
, ID3D10ShaderResourceView
**resources
, UINT offset
, UINT count
)
4562 FIXME("iface %p, resources %p, offset %u, count %u stub!\n", iface
, resources
, offset
, count
);
4568 static const struct ID3D10EffectShaderResourceVariableVtbl d3d10_effect_shader_resource_variable_vtbl
=
4570 /* ID3D10EffectVariable methods */
4571 d3d10_effect_shader_resource_variable_IsValid
,
4572 d3d10_effect_shader_resource_variable_GetType
,
4573 d3d10_effect_shader_resource_variable_GetDesc
,
4574 d3d10_effect_shader_resource_variable_GetAnnotationByIndex
,
4575 d3d10_effect_shader_resource_variable_GetAnnotationByName
,
4576 d3d10_effect_shader_resource_variable_GetMemberByIndex
,
4577 d3d10_effect_shader_resource_variable_GetMemberByName
,
4578 d3d10_effect_shader_resource_variable_GetMemberBySemantic
,
4579 d3d10_effect_shader_resource_variable_GetElement
,
4580 d3d10_effect_shader_resource_variable_GetParentConstantBuffer
,
4581 d3d10_effect_shader_resource_variable_AsScalar
,
4582 d3d10_effect_shader_resource_variable_AsVector
,
4583 d3d10_effect_shader_resource_variable_AsMatrix
,
4584 d3d10_effect_shader_resource_variable_AsString
,
4585 d3d10_effect_shader_resource_variable_AsShaderResource
,
4586 d3d10_effect_shader_resource_variable_AsRenderTargetView
,
4587 d3d10_effect_shader_resource_variable_AsDepthStencilView
,
4588 d3d10_effect_shader_resource_variable_AsConstantBuffer
,
4589 d3d10_effect_shader_resource_variable_AsShader
,
4590 d3d10_effect_shader_resource_variable_AsBlend
,
4591 d3d10_effect_shader_resource_variable_AsDepthStencil
,
4592 d3d10_effect_shader_resource_variable_AsRasterizer
,
4593 d3d10_effect_shader_resource_variable_AsSampler
,
4594 d3d10_effect_shader_resource_variable_SetRawValue
,
4595 d3d10_effect_shader_resource_variable_GetRawValue
,
4596 /* ID3D10EffectShaderResourceVariable methods */
4597 d3d10_effect_shader_resource_variable_SetResource
,
4598 d3d10_effect_shader_resource_variable_GetResource
,
4599 d3d10_effect_shader_resource_variable_SetResourceArray
,
4600 d3d10_effect_shader_resource_variable_GetResourceArray
,
4603 /* ID3D10EffectVariable methods */
4605 static BOOL STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_IsValid(
4606 ID3D10EffectRenderTargetViewVariable
*iface
)
4608 TRACE("iface %p\n", iface
);
4610 return (struct d3d10_effect_variable
*)iface
!= &null_render_target_view_variable
;
4613 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetType(
4614 ID3D10EffectRenderTargetViewVariable
*iface
)
4616 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
4619 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetDesc(
4620 ID3D10EffectRenderTargetViewVariable
*iface
, D3D10_EFFECT_VARIABLE_DESC
*desc
)
4622 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
4625 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetAnnotationByIndex(
4626 ID3D10EffectRenderTargetViewVariable
*iface
, UINT index
)
4628 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
4631 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetAnnotationByName(
4632 ID3D10EffectRenderTargetViewVariable
*iface
, LPCSTR name
)
4634 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
4637 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetMemberByIndex(
4638 ID3D10EffectRenderTargetViewVariable
*iface
, UINT index
)
4640 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
4643 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetMemberByName(
4644 ID3D10EffectRenderTargetViewVariable
*iface
, LPCSTR name
)
4646 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
4649 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetMemberBySemantic(
4650 ID3D10EffectRenderTargetViewVariable
*iface
, LPCSTR semantic
)
4652 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
4655 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetElement(
4656 ID3D10EffectRenderTargetViewVariable
*iface
, UINT index
)
4658 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
4661 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetParentConstantBuffer(
4662 ID3D10EffectRenderTargetViewVariable
*iface
)
4664 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
4667 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsScalar(
4668 ID3D10EffectRenderTargetViewVariable
*iface
)
4670 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
4673 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsVector(
4674 ID3D10EffectRenderTargetViewVariable
*iface
)
4676 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
4679 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsMatrix(
4680 ID3D10EffectRenderTargetViewVariable
*iface
)
4682 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
4685 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsString(
4686 ID3D10EffectRenderTargetViewVariable
*iface
)
4688 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
4691 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsShaderResource(
4692 ID3D10EffectRenderTargetViewVariable
*iface
)
4694 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
4697 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsRenderTargetView(
4698 ID3D10EffectRenderTargetViewVariable
*iface
)
4700 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
4703 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsDepthStencilView(
4704 ID3D10EffectRenderTargetViewVariable
*iface
)
4706 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
4709 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsConstantBuffer(
4710 ID3D10EffectRenderTargetViewVariable
*iface
)
4712 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
4715 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsShader(
4716 ID3D10EffectRenderTargetViewVariable
*iface
)
4718 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
4721 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsBlend(
4722 ID3D10EffectRenderTargetViewVariable
*iface
)
4724 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
4727 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsDepthStencil(
4728 ID3D10EffectRenderTargetViewVariable
*iface
)
4730 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
4733 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsRasterizer(
4734 ID3D10EffectRenderTargetViewVariable
*iface
)
4736 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
4739 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsSampler(
4740 ID3D10EffectRenderTargetViewVariable
*iface
)
4742 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
4745 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_SetRawValue(
4746 ID3D10EffectRenderTargetViewVariable
*iface
, void *data
, UINT offset
, UINT count
)
4748 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4751 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetRawValue(
4752 ID3D10EffectRenderTargetViewVariable
*iface
, void *data
, UINT offset
, UINT count
)
4754 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4757 /* ID3D10EffectRenderTargetViewVariable methods */
4759 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_SetRenderTarget(
4760 ID3D10EffectRenderTargetViewVariable
*iface
, ID3D10RenderTargetView
*view
)
4762 FIXME("iface %p, view %p stub!\n", iface
, view
);
4767 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetRenderTarget(
4768 ID3D10EffectRenderTargetViewVariable
*iface
, ID3D10RenderTargetView
**view
)
4770 FIXME("iface %p, view %p stub!\n", iface
, view
);
4775 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_SetRenderTargetArray(
4776 ID3D10EffectRenderTargetViewVariable
*iface
, ID3D10RenderTargetView
**views
, UINT offset
, UINT count
)
4778 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface
, views
, offset
, count
);
4783 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetRenderTargetArray(
4784 ID3D10EffectRenderTargetViewVariable
*iface
, ID3D10RenderTargetView
**views
, UINT offset
, UINT count
)
4786 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface
, views
, offset
, count
);
4792 static const struct ID3D10EffectRenderTargetViewVariableVtbl d3d10_effect_render_target_view_variable_vtbl
=
4794 /* ID3D10EffectVariable methods */
4795 d3d10_effect_render_target_view_variable_IsValid
,
4796 d3d10_effect_render_target_view_variable_GetType
,
4797 d3d10_effect_render_target_view_variable_GetDesc
,
4798 d3d10_effect_render_target_view_variable_GetAnnotationByIndex
,
4799 d3d10_effect_render_target_view_variable_GetAnnotationByName
,
4800 d3d10_effect_render_target_view_variable_GetMemberByIndex
,
4801 d3d10_effect_render_target_view_variable_GetMemberByName
,
4802 d3d10_effect_render_target_view_variable_GetMemberBySemantic
,
4803 d3d10_effect_render_target_view_variable_GetElement
,
4804 d3d10_effect_render_target_view_variable_GetParentConstantBuffer
,
4805 d3d10_effect_render_target_view_variable_AsScalar
,
4806 d3d10_effect_render_target_view_variable_AsVector
,
4807 d3d10_effect_render_target_view_variable_AsMatrix
,
4808 d3d10_effect_render_target_view_variable_AsString
,
4809 d3d10_effect_render_target_view_variable_AsShaderResource
,
4810 d3d10_effect_render_target_view_variable_AsRenderTargetView
,
4811 d3d10_effect_render_target_view_variable_AsDepthStencilView
,
4812 d3d10_effect_render_target_view_variable_AsConstantBuffer
,
4813 d3d10_effect_render_target_view_variable_AsShader
,
4814 d3d10_effect_render_target_view_variable_AsBlend
,
4815 d3d10_effect_render_target_view_variable_AsDepthStencil
,
4816 d3d10_effect_render_target_view_variable_AsRasterizer
,
4817 d3d10_effect_render_target_view_variable_AsSampler
,
4818 d3d10_effect_render_target_view_variable_SetRawValue
,
4819 d3d10_effect_render_target_view_variable_GetRawValue
,
4820 /* ID3D10EffectRenderTargetViewVariable methods */
4821 d3d10_effect_render_target_view_variable_SetRenderTarget
,
4822 d3d10_effect_render_target_view_variable_GetRenderTarget
,
4823 d3d10_effect_render_target_view_variable_SetRenderTargetArray
,
4824 d3d10_effect_render_target_view_variable_GetRenderTargetArray
,
4827 /* ID3D10EffectVariable methods */
4829 static BOOL STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_IsValid(
4830 ID3D10EffectDepthStencilViewVariable
*iface
)
4832 TRACE("iface %p\n", iface
);
4834 return (struct d3d10_effect_variable
*)iface
!= &null_depth_stencil_view_variable
;
4837 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetType(
4838 ID3D10EffectDepthStencilViewVariable
*iface
)
4840 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
4843 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetDesc(
4844 ID3D10EffectDepthStencilViewVariable
*iface
, D3D10_EFFECT_VARIABLE_DESC
*desc
)
4846 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
4849 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetAnnotationByIndex(
4850 ID3D10EffectDepthStencilViewVariable
*iface
, UINT index
)
4852 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
4855 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetAnnotationByName(
4856 ID3D10EffectDepthStencilViewVariable
*iface
, LPCSTR name
)
4858 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
4861 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetMemberByIndex(
4862 ID3D10EffectDepthStencilViewVariable
*iface
, UINT index
)
4864 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
4867 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetMemberByName(
4868 ID3D10EffectDepthStencilViewVariable
*iface
, LPCSTR name
)
4870 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
4873 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetMemberBySemantic(
4874 ID3D10EffectDepthStencilViewVariable
*iface
, LPCSTR semantic
)
4876 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
4879 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetElement(
4880 ID3D10EffectDepthStencilViewVariable
*iface
, UINT index
)
4882 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
4885 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetParentConstantBuffer(
4886 ID3D10EffectDepthStencilViewVariable
*iface
)
4888 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
4891 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsScalar(
4892 ID3D10EffectDepthStencilViewVariable
*iface
)
4894 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
4897 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsVector(
4898 ID3D10EffectDepthStencilViewVariable
*iface
)
4900 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
4903 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsMatrix(
4904 ID3D10EffectDepthStencilViewVariable
*iface
)
4906 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
4909 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsString(
4910 ID3D10EffectDepthStencilViewVariable
*iface
)
4912 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
4915 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsShaderResource(
4916 ID3D10EffectDepthStencilViewVariable
*iface
)
4918 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
4921 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsRenderTargetView(
4922 ID3D10EffectDepthStencilViewVariable
*iface
)
4924 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
4927 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsDepthStencilView(
4928 ID3D10EffectDepthStencilViewVariable
*iface
)
4930 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
4933 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsConstantBuffer(
4934 ID3D10EffectDepthStencilViewVariable
*iface
)
4936 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
4939 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsShader(
4940 ID3D10EffectDepthStencilViewVariable
*iface
)
4942 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
4945 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsBlend(
4946 ID3D10EffectDepthStencilViewVariable
*iface
)
4948 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
4951 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsDepthStencil(
4952 ID3D10EffectDepthStencilViewVariable
*iface
)
4954 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
4957 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsRasterizer(
4958 ID3D10EffectDepthStencilViewVariable
*iface
)
4960 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
4963 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsSampler(
4964 ID3D10EffectDepthStencilViewVariable
*iface
)
4966 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
4969 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_SetRawValue(
4970 ID3D10EffectDepthStencilViewVariable
*iface
, void *data
, UINT offset
, UINT count
)
4972 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4975 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetRawValue(
4976 ID3D10EffectDepthStencilViewVariable
*iface
, void *data
, UINT offset
, UINT count
)
4978 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4981 /* ID3D10EffectDepthStencilViewVariable methods */
4983 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_SetDepthStencil(
4984 ID3D10EffectDepthStencilViewVariable
*iface
, ID3D10DepthStencilView
*view
)
4986 FIXME("iface %p, view %p stub!\n", iface
, view
);
4991 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetDepthStencil(
4992 ID3D10EffectDepthStencilViewVariable
*iface
, ID3D10DepthStencilView
**view
)
4994 FIXME("iface %p, view %p stub!\n", iface
, view
);
4999 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_SetDepthStencilArray(
5000 ID3D10EffectDepthStencilViewVariable
*iface
, ID3D10DepthStencilView
**views
, UINT offset
, UINT count
)
5002 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface
, views
, offset
, count
);
5007 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetDepthStencilArray(
5008 ID3D10EffectDepthStencilViewVariable
*iface
, ID3D10DepthStencilView
**views
, UINT offset
, UINT count
)
5010 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface
, views
, offset
, count
);
5016 static const struct ID3D10EffectDepthStencilViewVariableVtbl d3d10_effect_depth_stencil_view_variable_vtbl
=
5018 /* ID3D10EffectVariable methods */
5019 d3d10_effect_depth_stencil_view_variable_IsValid
,
5020 d3d10_effect_depth_stencil_view_variable_GetType
,
5021 d3d10_effect_depth_stencil_view_variable_GetDesc
,
5022 d3d10_effect_depth_stencil_view_variable_GetAnnotationByIndex
,
5023 d3d10_effect_depth_stencil_view_variable_GetAnnotationByName
,
5024 d3d10_effect_depth_stencil_view_variable_GetMemberByIndex
,
5025 d3d10_effect_depth_stencil_view_variable_GetMemberByName
,
5026 d3d10_effect_depth_stencil_view_variable_GetMemberBySemantic
,
5027 d3d10_effect_depth_stencil_view_variable_GetElement
,
5028 d3d10_effect_depth_stencil_view_variable_GetParentConstantBuffer
,
5029 d3d10_effect_depth_stencil_view_variable_AsScalar
,
5030 d3d10_effect_depth_stencil_view_variable_AsVector
,
5031 d3d10_effect_depth_stencil_view_variable_AsMatrix
,
5032 d3d10_effect_depth_stencil_view_variable_AsString
,
5033 d3d10_effect_depth_stencil_view_variable_AsShaderResource
,
5034 d3d10_effect_depth_stencil_view_variable_AsRenderTargetView
,
5035 d3d10_effect_depth_stencil_view_variable_AsDepthStencilView
,
5036 d3d10_effect_depth_stencil_view_variable_AsConstantBuffer
,
5037 d3d10_effect_depth_stencil_view_variable_AsShader
,
5038 d3d10_effect_depth_stencil_view_variable_AsBlend
,
5039 d3d10_effect_depth_stencil_view_variable_AsDepthStencil
,
5040 d3d10_effect_depth_stencil_view_variable_AsRasterizer
,
5041 d3d10_effect_depth_stencil_view_variable_AsSampler
,
5042 d3d10_effect_depth_stencil_view_variable_SetRawValue
,
5043 d3d10_effect_depth_stencil_view_variable_GetRawValue
,
5044 /* ID3D10EffectDepthStencilViewVariable methods */
5045 d3d10_effect_depth_stencil_view_variable_SetDepthStencil
,
5046 d3d10_effect_depth_stencil_view_variable_GetDepthStencil
,
5047 d3d10_effect_depth_stencil_view_variable_SetDepthStencilArray
,
5048 d3d10_effect_depth_stencil_view_variable_GetDepthStencilArray
,
5051 /* ID3D10EffectVariable methods */
5053 static BOOL STDMETHODCALLTYPE
d3d10_effect_shader_variable_IsValid(ID3D10EffectShaderVariable
*iface
)
5055 TRACE("iface %p\n", iface
);
5057 return (struct d3d10_effect_variable
*)iface
!= &null_shader_variable
;
5060 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetType(
5061 ID3D10EffectShaderVariable
*iface
)
5063 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
5066 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetDesc(ID3D10EffectShaderVariable
*iface
,
5067 D3D10_EFFECT_VARIABLE_DESC
*desc
)
5069 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
5072 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetAnnotationByIndex(
5073 ID3D10EffectShaderVariable
*iface
, UINT index
)
5075 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
5078 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetAnnotationByName(
5079 ID3D10EffectShaderVariable
*iface
, LPCSTR name
)
5081 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
5084 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetMemberByIndex(
5085 ID3D10EffectShaderVariable
*iface
, UINT index
)
5087 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
5090 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetMemberByName(
5091 ID3D10EffectShaderVariable
*iface
, LPCSTR name
)
5093 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
5096 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetMemberBySemantic(
5097 ID3D10EffectShaderVariable
*iface
, LPCSTR semantic
)
5099 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
5102 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetElement(
5103 ID3D10EffectShaderVariable
*iface
, UINT index
)
5105 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
5108 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetParentConstantBuffer(
5109 ID3D10EffectShaderVariable
*iface
)
5111 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
5114 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsScalar(
5115 ID3D10EffectShaderVariable
*iface
)
5117 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
5120 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsVector(
5121 ID3D10EffectShaderVariable
*iface
)
5123 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
5126 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsMatrix(
5127 ID3D10EffectShaderVariable
*iface
)
5129 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
5132 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsString(
5133 ID3D10EffectShaderVariable
*iface
)
5135 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
5138 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsShaderResource(
5139 ID3D10EffectShaderVariable
*iface
)
5141 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
5144 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsRenderTargetView(
5145 ID3D10EffectShaderVariable
*iface
)
5147 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
5150 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsDepthStencilView(
5151 ID3D10EffectShaderVariable
*iface
)
5153 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
5156 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsConstantBuffer(
5157 ID3D10EffectShaderVariable
*iface
)
5159 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
5162 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsShader(
5163 ID3D10EffectShaderVariable
*iface
)
5165 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
5168 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsBlend(
5169 ID3D10EffectShaderVariable
*iface
)
5171 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
5174 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsDepthStencil(
5175 ID3D10EffectShaderVariable
*iface
)
5177 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
5180 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsRasterizer(
5181 ID3D10EffectShaderVariable
*iface
)
5183 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
5186 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsSampler(
5187 ID3D10EffectShaderVariable
*iface
)
5189 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
5192 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_SetRawValue(
5193 ID3D10EffectShaderVariable
*iface
, void *data
, UINT offset
, UINT count
)
5195 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5198 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetRawValue(
5199 ID3D10EffectShaderVariable
*iface
, void *data
, UINT offset
, UINT count
)
5201 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5204 /* ID3D10EffectShaderVariable methods */
5206 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetShaderDesc(
5207 ID3D10EffectShaderVariable
*iface
, UINT index
, D3D10_EFFECT_SHADER_DESC
*desc
)
5209 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
5214 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetVertexShader(
5215 ID3D10EffectShaderVariable
*iface
, UINT index
, ID3D10VertexShader
**shader
)
5217 FIXME("iface %p, index %u, shader %p stub!\n", iface
, index
, shader
);
5222 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetGeometryShader(
5223 ID3D10EffectShaderVariable
*iface
, UINT index
, ID3D10GeometryShader
**shader
)
5225 FIXME("iface %p, index %u, shader %p stub!\n", iface
, index
, shader
);
5230 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetPixelShader(
5231 ID3D10EffectShaderVariable
*iface
, UINT index
, ID3D10PixelShader
**shader
)
5233 FIXME("iface %p, index %u, shader %p stub!\n", iface
, index
, shader
);
5238 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetInputSignatureElementDesc(
5239 ID3D10EffectShaderVariable
*iface
, UINT shader_index
, UINT element_index
,
5240 D3D10_SIGNATURE_PARAMETER_DESC
*desc
)
5242 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
5243 struct d3d10_effect_shader_variable
*s
;
5244 D3D10_SIGNATURE_PARAMETER_DESC
*d
;
5246 TRACE("iface %p, shader_index %u, element_index %u, desc %p\n",
5247 iface
, shader_index
, element_index
, desc
);
5249 if (!iface
->lpVtbl
->IsValid(iface
))
5251 WARN("Null variable specified\n");
5255 /* Check shader_index, this crashes on W7/DX10 */
5256 if (shader_index
>= This
->effect
->used_shader_count
)
5258 WARN("This should crash on W7/DX10!\n");
5262 s
= This
->effect
->used_shaders
[shader_index
]->data
;
5263 if (!s
->input_signature
.signature
)
5265 WARN("No shader signature\n");
5266 return D3DERR_INVALIDCALL
;
5269 /* Check desc for NULL, this crashes on W7/DX10 */
5272 WARN("This should crash on W7/DX10!\n");
5276 if (element_index
>= s
->input_signature
.element_count
)
5278 WARN("Invalid element index specified\n");
5279 return E_INVALIDARG
;
5282 d
= &s
->input_signature
.elements
[element_index
];
5283 desc
->SemanticName
= d
->SemanticName
;
5284 desc
->SemanticIndex
= d
->SemanticIndex
;
5285 desc
->SystemValueType
= d
->SystemValueType
;
5286 desc
->ComponentType
= d
->ComponentType
;
5287 desc
->Register
= d
->Register
;
5288 desc
->ReadWriteMask
= d
->ReadWriteMask
;
5289 desc
->Mask
= d
->Mask
;
5294 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetOutputSignatureElementDesc(
5295 ID3D10EffectShaderVariable
*iface
, UINT shader_index
, UINT element_index
,
5296 D3D10_SIGNATURE_PARAMETER_DESC
*desc
)
5298 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
5299 struct d3d10_effect_shader_variable
*s
;
5300 D3D10_SIGNATURE_PARAMETER_DESC
*d
;
5302 TRACE("iface %p, shader_index %u, element_index %u, desc %p\n",
5303 iface
, shader_index
, element_index
, desc
);
5305 if (!iface
->lpVtbl
->IsValid(iface
))
5307 WARN("Null variable specified\n");
5311 /* Check shader_index, this crashes on W7/DX10 */
5312 if (shader_index
>= This
->effect
->used_shader_count
)
5314 WARN("This should crash on W7/DX10!\n");
5318 s
= This
->effect
->used_shaders
[shader_index
]->data
;
5319 if (!s
->output_signature
.signature
)
5321 WARN("No shader signature\n");
5322 return D3DERR_INVALIDCALL
;
5325 /* Check desc for NULL, this crashes on W7/DX10 */
5328 WARN("This should crash on W7/DX10!\n");
5332 if (element_index
>= s
->output_signature
.element_count
)
5334 WARN("Invalid element index specified\n");
5335 return E_INVALIDARG
;
5338 d
= &s
->output_signature
.elements
[element_index
];
5339 desc
->SemanticName
= d
->SemanticName
;
5340 desc
->SemanticIndex
= d
->SemanticIndex
;
5341 desc
->SystemValueType
= d
->SystemValueType
;
5342 desc
->ComponentType
= d
->ComponentType
;
5343 desc
->Register
= d
->Register
;
5344 desc
->ReadWriteMask
= d
->ReadWriteMask
;
5345 desc
->Mask
= d
->Mask
;
5351 static const struct ID3D10EffectShaderVariableVtbl d3d10_effect_shader_variable_vtbl
=
5353 /* ID3D10EffectVariable methods */
5354 d3d10_effect_shader_variable_IsValid
,
5355 d3d10_effect_shader_variable_GetType
,
5356 d3d10_effect_shader_variable_GetDesc
,
5357 d3d10_effect_shader_variable_GetAnnotationByIndex
,
5358 d3d10_effect_shader_variable_GetAnnotationByName
,
5359 d3d10_effect_shader_variable_GetMemberByIndex
,
5360 d3d10_effect_shader_variable_GetMemberByName
,
5361 d3d10_effect_shader_variable_GetMemberBySemantic
,
5362 d3d10_effect_shader_variable_GetElement
,
5363 d3d10_effect_shader_variable_GetParentConstantBuffer
,
5364 d3d10_effect_shader_variable_AsScalar
,
5365 d3d10_effect_shader_variable_AsVector
,
5366 d3d10_effect_shader_variable_AsMatrix
,
5367 d3d10_effect_shader_variable_AsString
,
5368 d3d10_effect_shader_variable_AsShaderResource
,
5369 d3d10_effect_shader_variable_AsRenderTargetView
,
5370 d3d10_effect_shader_variable_AsDepthStencilView
,
5371 d3d10_effect_shader_variable_AsConstantBuffer
,
5372 d3d10_effect_shader_variable_AsShader
,
5373 d3d10_effect_shader_variable_AsBlend
,
5374 d3d10_effect_shader_variable_AsDepthStencil
,
5375 d3d10_effect_shader_variable_AsRasterizer
,
5376 d3d10_effect_shader_variable_AsSampler
,
5377 d3d10_effect_shader_variable_SetRawValue
,
5378 d3d10_effect_shader_variable_GetRawValue
,
5379 /* ID3D10EffectShaderVariable methods */
5380 d3d10_effect_shader_variable_GetShaderDesc
,
5381 d3d10_effect_shader_variable_GetVertexShader
,
5382 d3d10_effect_shader_variable_GetGeometryShader
,
5383 d3d10_effect_shader_variable_GetPixelShader
,
5384 d3d10_effect_shader_variable_GetInputSignatureElementDesc
,
5385 d3d10_effect_shader_variable_GetOutputSignatureElementDesc
,
5388 /* ID3D10EffectVariable methods */
5390 static BOOL STDMETHODCALLTYPE
d3d10_effect_blend_variable_IsValid(ID3D10EffectBlendVariable
*iface
)
5392 TRACE("iface %p\n", iface
);
5394 return (struct d3d10_effect_variable
*)iface
!= &null_blend_variable
;
5397 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetType(
5398 ID3D10EffectBlendVariable
*iface
)
5400 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
5403 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetDesc(ID3D10EffectBlendVariable
*iface
,
5404 D3D10_EFFECT_VARIABLE_DESC
*desc
)
5406 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
5409 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetAnnotationByIndex(
5410 ID3D10EffectBlendVariable
*iface
, UINT index
)
5412 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
5415 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetAnnotationByName(
5416 ID3D10EffectBlendVariable
*iface
, LPCSTR name
)
5418 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
5421 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetMemberByIndex(
5422 ID3D10EffectBlendVariable
*iface
, UINT index
)
5424 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
5427 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetMemberByName(
5428 ID3D10EffectBlendVariable
*iface
, LPCSTR name
)
5430 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
5433 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetMemberBySemantic(
5434 ID3D10EffectBlendVariable
*iface
, LPCSTR semantic
)
5436 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
5439 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetElement(
5440 ID3D10EffectBlendVariable
*iface
, UINT index
)
5442 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
5445 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetParentConstantBuffer(
5446 ID3D10EffectBlendVariable
*iface
)
5448 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
5451 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsScalar(
5452 ID3D10EffectBlendVariable
*iface
)
5454 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
5457 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsVector(
5458 ID3D10EffectBlendVariable
*iface
)
5460 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
5463 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsMatrix(
5464 ID3D10EffectBlendVariable
*iface
)
5466 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
5469 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsString(
5470 ID3D10EffectBlendVariable
*iface
)
5472 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
5475 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsShaderResource(
5476 ID3D10EffectBlendVariable
*iface
)
5478 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
5481 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsRenderTargetView(
5482 ID3D10EffectBlendVariable
*iface
)
5484 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
5487 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsDepthStencilView(
5488 ID3D10EffectBlendVariable
*iface
)
5490 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
5493 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsConstantBuffer(
5494 ID3D10EffectBlendVariable
*iface
)
5496 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
5499 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsShader(
5500 ID3D10EffectBlendVariable
*iface
)
5502 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
5505 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsBlend(
5506 ID3D10EffectBlendVariable
*iface
)
5508 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
5511 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsDepthStencil(
5512 ID3D10EffectBlendVariable
*iface
)
5514 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
5517 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsRasterizer(
5518 ID3D10EffectBlendVariable
*iface
)
5520 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
5523 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsSampler(
5524 ID3D10EffectBlendVariable
*iface
)
5526 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
5529 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_SetRawValue(ID3D10EffectBlendVariable
*iface
,
5530 void *data
, UINT offset
, UINT count
)
5532 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5535 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetRawValue(ID3D10EffectBlendVariable
*iface
,
5536 void *data
, UINT offset
, UINT count
)
5538 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5541 /* ID3D10EffectBlendVariable methods */
5543 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetBlendState(ID3D10EffectBlendVariable
*iface
,
5544 UINT index
, ID3D10BlendState
**blend_state
)
5546 FIXME("iface %p, index %u, blend_state %p stub!\n", iface
, index
, blend_state
);
5551 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetBackingStore(ID3D10EffectBlendVariable
*iface
,
5552 UINT index
, D3D10_BLEND_DESC
*desc
)
5554 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
5560 static const struct ID3D10EffectBlendVariableVtbl d3d10_effect_blend_variable_vtbl
=
5562 /* ID3D10EffectVariable methods */
5563 d3d10_effect_blend_variable_IsValid
,
5564 d3d10_effect_blend_variable_GetType
,
5565 d3d10_effect_blend_variable_GetDesc
,
5566 d3d10_effect_blend_variable_GetAnnotationByIndex
,
5567 d3d10_effect_blend_variable_GetAnnotationByName
,
5568 d3d10_effect_blend_variable_GetMemberByIndex
,
5569 d3d10_effect_blend_variable_GetMemberByName
,
5570 d3d10_effect_blend_variable_GetMemberBySemantic
,
5571 d3d10_effect_blend_variable_GetElement
,
5572 d3d10_effect_blend_variable_GetParentConstantBuffer
,
5573 d3d10_effect_blend_variable_AsScalar
,
5574 d3d10_effect_blend_variable_AsVector
,
5575 d3d10_effect_blend_variable_AsMatrix
,
5576 d3d10_effect_blend_variable_AsString
,
5577 d3d10_effect_blend_variable_AsShaderResource
,
5578 d3d10_effect_blend_variable_AsRenderTargetView
,
5579 d3d10_effect_blend_variable_AsDepthStencilView
,
5580 d3d10_effect_blend_variable_AsConstantBuffer
,
5581 d3d10_effect_blend_variable_AsShader
,
5582 d3d10_effect_blend_variable_AsBlend
,
5583 d3d10_effect_blend_variable_AsDepthStencil
,
5584 d3d10_effect_blend_variable_AsRasterizer
,
5585 d3d10_effect_blend_variable_AsSampler
,
5586 d3d10_effect_blend_variable_SetRawValue
,
5587 d3d10_effect_blend_variable_GetRawValue
,
5588 /* ID3D10EffectBlendVariable methods */
5589 d3d10_effect_blend_variable_GetBlendState
,
5590 d3d10_effect_blend_variable_GetBackingStore
,
5593 /* ID3D10EffectVariable methods */
5595 static BOOL STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_IsValid(ID3D10EffectDepthStencilVariable
*iface
)
5597 TRACE("iface %p\n", iface
);
5599 return (struct d3d10_effect_variable
*)iface
!= &null_depth_stencil_variable
;
5602 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetType(
5603 ID3D10EffectDepthStencilVariable
*iface
)
5605 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
5608 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetDesc(ID3D10EffectDepthStencilVariable
*iface
,
5609 D3D10_EFFECT_VARIABLE_DESC
*desc
)
5611 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
5614 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetAnnotationByIndex(
5615 ID3D10EffectDepthStencilVariable
*iface
, UINT index
)
5617 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
5620 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetAnnotationByName(
5621 ID3D10EffectDepthStencilVariable
*iface
, LPCSTR name
)
5623 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
5626 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetMemberByIndex(
5627 ID3D10EffectDepthStencilVariable
*iface
, UINT index
)
5629 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
5632 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetMemberByName(
5633 ID3D10EffectDepthStencilVariable
*iface
, LPCSTR name
)
5635 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
5638 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetMemberBySemantic(
5639 ID3D10EffectDepthStencilVariable
*iface
, LPCSTR semantic
)
5641 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
5644 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetElement(
5645 ID3D10EffectDepthStencilVariable
*iface
, UINT index
)
5647 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
5650 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetParentConstantBuffer(
5651 ID3D10EffectDepthStencilVariable
*iface
)
5653 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
5656 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsScalar(
5657 ID3D10EffectDepthStencilVariable
*iface
)
5659 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
5662 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsVector(
5663 ID3D10EffectDepthStencilVariable
*iface
)
5665 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
5668 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsMatrix(
5669 ID3D10EffectDepthStencilVariable
*iface
)
5671 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
5674 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsString(
5675 ID3D10EffectDepthStencilVariable
*iface
)
5677 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
5680 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsShaderResource(
5681 ID3D10EffectDepthStencilVariable
*iface
)
5683 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
5686 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsRenderTargetView(
5687 ID3D10EffectDepthStencilVariable
*iface
)
5689 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
5692 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsDepthStencilView(
5693 ID3D10EffectDepthStencilVariable
*iface
)
5695 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
5698 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsConstantBuffer(
5699 ID3D10EffectDepthStencilVariable
*iface
)
5701 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
5704 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsShader(
5705 ID3D10EffectDepthStencilVariable
*iface
)
5707 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
5710 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsBlend(
5711 ID3D10EffectDepthStencilVariable
*iface
)
5713 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
5716 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsDepthStencil(
5717 ID3D10EffectDepthStencilVariable
*iface
)
5719 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
5722 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsRasterizer(
5723 ID3D10EffectDepthStencilVariable
*iface
)
5725 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
5728 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsSampler(
5729 ID3D10EffectDepthStencilVariable
*iface
)
5731 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
5734 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_SetRawValue(ID3D10EffectDepthStencilVariable
*iface
,
5735 void *data
, UINT offset
, UINT count
)
5737 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5740 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetRawValue(ID3D10EffectDepthStencilVariable
*iface
,
5741 void *data
, UINT offset
, UINT count
)
5743 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5746 /* ID3D10EffectDepthStencilVariable methods */
5748 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetDepthStencilState(ID3D10EffectDepthStencilVariable
*iface
,
5749 UINT index
, ID3D10DepthStencilState
**depth_stencil_state
)
5751 FIXME("iface %p, index %u, depth_stencil_state %p stub!\n", iface
, index
, depth_stencil_state
);
5756 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetBackingStore(ID3D10EffectDepthStencilVariable
*iface
,
5757 UINT index
, D3D10_DEPTH_STENCIL_DESC
*desc
)
5759 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
5765 static const struct ID3D10EffectDepthStencilVariableVtbl d3d10_effect_depth_stencil_variable_vtbl
=
5767 /* ID3D10EffectVariable methods */
5768 d3d10_effect_depth_stencil_variable_IsValid
,
5769 d3d10_effect_depth_stencil_variable_GetType
,
5770 d3d10_effect_depth_stencil_variable_GetDesc
,
5771 d3d10_effect_depth_stencil_variable_GetAnnotationByIndex
,
5772 d3d10_effect_depth_stencil_variable_GetAnnotationByName
,
5773 d3d10_effect_depth_stencil_variable_GetMemberByIndex
,
5774 d3d10_effect_depth_stencil_variable_GetMemberByName
,
5775 d3d10_effect_depth_stencil_variable_GetMemberBySemantic
,
5776 d3d10_effect_depth_stencil_variable_GetElement
,
5777 d3d10_effect_depth_stencil_variable_GetParentConstantBuffer
,
5778 d3d10_effect_depth_stencil_variable_AsScalar
,
5779 d3d10_effect_depth_stencil_variable_AsVector
,
5780 d3d10_effect_depth_stencil_variable_AsMatrix
,
5781 d3d10_effect_depth_stencil_variable_AsString
,
5782 d3d10_effect_depth_stencil_variable_AsShaderResource
,
5783 d3d10_effect_depth_stencil_variable_AsRenderTargetView
,
5784 d3d10_effect_depth_stencil_variable_AsDepthStencilView
,
5785 d3d10_effect_depth_stencil_variable_AsConstantBuffer
,
5786 d3d10_effect_depth_stencil_variable_AsShader
,
5787 d3d10_effect_depth_stencil_variable_AsBlend
,
5788 d3d10_effect_depth_stencil_variable_AsDepthStencil
,
5789 d3d10_effect_depth_stencil_variable_AsRasterizer
,
5790 d3d10_effect_depth_stencil_variable_AsSampler
,
5791 d3d10_effect_depth_stencil_variable_SetRawValue
,
5792 d3d10_effect_depth_stencil_variable_GetRawValue
,
5793 /* ID3D10EffectDepthStencilVariable methods */
5794 d3d10_effect_depth_stencil_variable_GetDepthStencilState
,
5795 d3d10_effect_depth_stencil_variable_GetBackingStore
,
5798 /* ID3D10EffectVariable methods */
5800 static BOOL STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_IsValid(ID3D10EffectRasterizerVariable
*iface
)
5802 TRACE("iface %p\n", iface
);
5804 return (struct d3d10_effect_variable
*)iface
!= &null_rasterizer_variable
;
5807 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetType(
5808 ID3D10EffectRasterizerVariable
*iface
)
5810 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
5813 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetDesc(ID3D10EffectRasterizerVariable
*iface
,
5814 D3D10_EFFECT_VARIABLE_DESC
*desc
)
5816 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
5819 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetAnnotationByIndex(
5820 ID3D10EffectRasterizerVariable
*iface
, UINT index
)
5822 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
5825 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetAnnotationByName(
5826 ID3D10EffectRasterizerVariable
*iface
, LPCSTR name
)
5828 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
5831 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetMemberByIndex(
5832 ID3D10EffectRasterizerVariable
*iface
, UINT index
)
5834 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
5837 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetMemberByName(
5838 ID3D10EffectRasterizerVariable
*iface
, LPCSTR name
)
5840 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
5843 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetMemberBySemantic(
5844 ID3D10EffectRasterizerVariable
*iface
, LPCSTR semantic
)
5846 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
5849 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetElement(
5850 ID3D10EffectRasterizerVariable
*iface
, UINT index
)
5852 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
5855 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetParentConstantBuffer(
5856 ID3D10EffectRasterizerVariable
*iface
)
5858 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
5861 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsScalar(
5862 ID3D10EffectRasterizerVariable
*iface
)
5864 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
5867 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsVector(
5868 ID3D10EffectRasterizerVariable
*iface
)
5870 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
5873 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsMatrix(
5874 ID3D10EffectRasterizerVariable
*iface
)
5876 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
5879 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsString(
5880 ID3D10EffectRasterizerVariable
*iface
)
5882 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
5885 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsShaderResource(
5886 ID3D10EffectRasterizerVariable
*iface
)
5888 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
5891 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsRenderTargetView(
5892 ID3D10EffectRasterizerVariable
*iface
)
5894 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
5897 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsDepthStencilView(
5898 ID3D10EffectRasterizerVariable
*iface
)
5900 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
5903 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsConstantBuffer(
5904 ID3D10EffectRasterizerVariable
*iface
)
5906 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
5909 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsShader(
5910 ID3D10EffectRasterizerVariable
*iface
)
5912 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
5915 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsBlend(
5916 ID3D10EffectRasterizerVariable
*iface
)
5918 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
5921 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsDepthStencil(
5922 ID3D10EffectRasterizerVariable
*iface
)
5924 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
5927 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsRasterizer(
5928 ID3D10EffectRasterizerVariable
*iface
)
5930 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
5933 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsSampler(
5934 ID3D10EffectRasterizerVariable
*iface
)
5936 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
5939 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_SetRawValue(ID3D10EffectRasterizerVariable
*iface
,
5940 void *data
, UINT offset
, UINT count
)
5942 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5945 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetRawValue(ID3D10EffectRasterizerVariable
*iface
,
5946 void *data
, UINT offset
, UINT count
)
5948 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5951 /* ID3D10EffectRasterizerVariable methods */
5953 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetRasterizerState(ID3D10EffectRasterizerVariable
*iface
,
5954 UINT index
, ID3D10RasterizerState
**rasterizer_state
)
5956 FIXME("iface %p, index %u, rasterizer_state %p stub!\n", iface
, index
, rasterizer_state
);
5961 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetBackingStore(ID3D10EffectRasterizerVariable
*iface
,
5962 UINT index
, D3D10_RASTERIZER_DESC
*desc
)
5964 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
5970 static const struct ID3D10EffectRasterizerVariableVtbl d3d10_effect_rasterizer_variable_vtbl
=
5972 /* ID3D10EffectVariable methods */
5973 d3d10_effect_rasterizer_variable_IsValid
,
5974 d3d10_effect_rasterizer_variable_GetType
,
5975 d3d10_effect_rasterizer_variable_GetDesc
,
5976 d3d10_effect_rasterizer_variable_GetAnnotationByIndex
,
5977 d3d10_effect_rasterizer_variable_GetAnnotationByName
,
5978 d3d10_effect_rasterizer_variable_GetMemberByIndex
,
5979 d3d10_effect_rasterizer_variable_GetMemberByName
,
5980 d3d10_effect_rasterizer_variable_GetMemberBySemantic
,
5981 d3d10_effect_rasterizer_variable_GetElement
,
5982 d3d10_effect_rasterizer_variable_GetParentConstantBuffer
,
5983 d3d10_effect_rasterizer_variable_AsScalar
,
5984 d3d10_effect_rasterizer_variable_AsVector
,
5985 d3d10_effect_rasterizer_variable_AsMatrix
,
5986 d3d10_effect_rasterizer_variable_AsString
,
5987 d3d10_effect_rasterizer_variable_AsShaderResource
,
5988 d3d10_effect_rasterizer_variable_AsRenderTargetView
,
5989 d3d10_effect_rasterizer_variable_AsDepthStencilView
,
5990 d3d10_effect_rasterizer_variable_AsConstantBuffer
,
5991 d3d10_effect_rasterizer_variable_AsShader
,
5992 d3d10_effect_rasterizer_variable_AsBlend
,
5993 d3d10_effect_rasterizer_variable_AsDepthStencil
,
5994 d3d10_effect_rasterizer_variable_AsRasterizer
,
5995 d3d10_effect_rasterizer_variable_AsSampler
,
5996 d3d10_effect_rasterizer_variable_SetRawValue
,
5997 d3d10_effect_rasterizer_variable_GetRawValue
,
5998 /* ID3D10EffectRasterizerVariable methods */
5999 d3d10_effect_rasterizer_variable_GetRasterizerState
,
6000 d3d10_effect_rasterizer_variable_GetBackingStore
,
6003 /* ID3D10EffectVariable methods */
6005 static BOOL STDMETHODCALLTYPE
d3d10_effect_sampler_variable_IsValid(ID3D10EffectSamplerVariable
*iface
)
6007 TRACE("iface %p\n", iface
);
6009 return (struct d3d10_effect_variable
*)iface
!= &null_sampler_variable
;
6012 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetType(
6013 ID3D10EffectSamplerVariable
*iface
)
6015 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
6018 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetDesc(ID3D10EffectSamplerVariable
*iface
,
6019 D3D10_EFFECT_VARIABLE_DESC
*desc
)
6021 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
6024 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetAnnotationByIndex(
6025 ID3D10EffectSamplerVariable
*iface
, UINT index
)
6027 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
6030 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetAnnotationByName(
6031 ID3D10EffectSamplerVariable
*iface
, LPCSTR name
)
6033 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
6036 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetMemberByIndex(
6037 ID3D10EffectSamplerVariable
*iface
, UINT index
)
6039 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
6042 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetMemberByName(
6043 ID3D10EffectSamplerVariable
*iface
, LPCSTR name
)
6045 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
6048 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetMemberBySemantic(
6049 ID3D10EffectSamplerVariable
*iface
, LPCSTR semantic
)
6051 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
6054 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetElement(
6055 ID3D10EffectSamplerVariable
*iface
, UINT index
)
6057 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
6060 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetParentConstantBuffer(
6061 ID3D10EffectSamplerVariable
*iface
)
6063 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
6066 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsScalar(
6067 ID3D10EffectSamplerVariable
*iface
)
6069 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
6072 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsVector(
6073 ID3D10EffectSamplerVariable
*iface
)
6075 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
6078 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsMatrix(
6079 ID3D10EffectSamplerVariable
*iface
)
6081 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
6084 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsString(
6085 ID3D10EffectSamplerVariable
*iface
)
6087 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
6090 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsShaderResource(
6091 ID3D10EffectSamplerVariable
*iface
)
6093 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
6096 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsRenderTargetView(
6097 ID3D10EffectSamplerVariable
*iface
)
6099 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
6102 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsDepthStencilView(
6103 ID3D10EffectSamplerVariable
*iface
)
6105 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
6108 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsConstantBuffer(
6109 ID3D10EffectSamplerVariable
*iface
)
6111 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
6114 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsShader(
6115 ID3D10EffectSamplerVariable
*iface
)
6117 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
6120 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsBlend(
6121 ID3D10EffectSamplerVariable
*iface
)
6123 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
6126 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsDepthStencil(
6127 ID3D10EffectSamplerVariable
*iface
)
6129 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
6132 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsRasterizer(
6133 ID3D10EffectSamplerVariable
*iface
)
6135 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
6138 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsSampler(
6139 ID3D10EffectSamplerVariable
*iface
)
6141 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
6144 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_SetRawValue(ID3D10EffectSamplerVariable
*iface
,
6145 void *data
, UINT offset
, UINT count
)
6147 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
6150 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetRawValue(ID3D10EffectSamplerVariable
*iface
,
6151 void *data
, UINT offset
, UINT count
)
6153 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
6156 /* ID3D10EffectSamplerVariable methods */
6158 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetSampler(ID3D10EffectSamplerVariable
*iface
,
6159 UINT index
, ID3D10SamplerState
**sampler
)
6161 FIXME("iface %p, index %u, sampler %p stub!\n", iface
, index
, sampler
);
6166 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetBackingStore(ID3D10EffectSamplerVariable
*iface
,
6167 UINT index
, D3D10_SAMPLER_DESC
*desc
)
6169 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
6175 static const struct ID3D10EffectSamplerVariableVtbl d3d10_effect_sampler_variable_vtbl
=
6177 /* ID3D10EffectVariable methods */
6178 d3d10_effect_sampler_variable_IsValid
,
6179 d3d10_effect_sampler_variable_GetType
,
6180 d3d10_effect_sampler_variable_GetDesc
,
6181 d3d10_effect_sampler_variable_GetAnnotationByIndex
,
6182 d3d10_effect_sampler_variable_GetAnnotationByName
,
6183 d3d10_effect_sampler_variable_GetMemberByIndex
,
6184 d3d10_effect_sampler_variable_GetMemberByName
,
6185 d3d10_effect_sampler_variable_GetMemberBySemantic
,
6186 d3d10_effect_sampler_variable_GetElement
,
6187 d3d10_effect_sampler_variable_GetParentConstantBuffer
,
6188 d3d10_effect_sampler_variable_AsScalar
,
6189 d3d10_effect_sampler_variable_AsVector
,
6190 d3d10_effect_sampler_variable_AsMatrix
,
6191 d3d10_effect_sampler_variable_AsString
,
6192 d3d10_effect_sampler_variable_AsShaderResource
,
6193 d3d10_effect_sampler_variable_AsRenderTargetView
,
6194 d3d10_effect_sampler_variable_AsDepthStencilView
,
6195 d3d10_effect_sampler_variable_AsConstantBuffer
,
6196 d3d10_effect_sampler_variable_AsShader
,
6197 d3d10_effect_sampler_variable_AsBlend
,
6198 d3d10_effect_sampler_variable_AsDepthStencil
,
6199 d3d10_effect_sampler_variable_AsRasterizer
,
6200 d3d10_effect_sampler_variable_AsSampler
,
6201 d3d10_effect_sampler_variable_SetRawValue
,
6202 d3d10_effect_sampler_variable_GetRawValue
,
6203 /* ID3D10EffectSamplerVariable methods */
6204 d3d10_effect_sampler_variable_GetSampler
,
6205 d3d10_effect_sampler_variable_GetBackingStore
,
6208 /* ID3D10EffectType methods */
6210 static inline struct d3d10_effect_type
*impl_from_ID3D10EffectType(ID3D10EffectType
*iface
)
6212 return CONTAINING_RECORD(iface
, struct d3d10_effect_type
, ID3D10EffectType_iface
);
6215 static BOOL STDMETHODCALLTYPE
d3d10_effect_type_IsValid(ID3D10EffectType
*iface
)
6217 struct d3d10_effect_type
*This
= impl_from_ID3D10EffectType(iface
);
6219 TRACE("iface %p\n", iface
);
6221 return This
!= &null_type
;
6224 static HRESULT STDMETHODCALLTYPE
d3d10_effect_type_GetDesc(ID3D10EffectType
*iface
, D3D10_EFFECT_TYPE_DESC
*desc
)
6226 struct d3d10_effect_type
*This
= impl_from_ID3D10EffectType(iface
);
6228 TRACE("iface %p, desc %p\n", iface
, desc
);
6230 if (This
== &null_type
)
6232 WARN("Null type specified\n");
6238 WARN("Invalid argument specified\n");
6239 return E_INVALIDARG
;
6242 desc
->TypeName
= This
->name
;
6243 desc
->Class
= This
->type_class
;
6244 desc
->Type
= This
->basetype
;
6245 desc
->Elements
= This
->element_count
;
6246 desc
->Members
= This
->member_count
;
6247 desc
->Rows
= This
->row_count
;
6248 desc
->Columns
= This
->column_count
;
6249 desc
->PackedSize
= This
->size_packed
;
6250 desc
->UnpackedSize
= This
->size_unpacked
;
6251 desc
->Stride
= This
->stride
;
6256 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_type_GetMemberTypeByIndex(ID3D10EffectType
*iface
,
6259 struct d3d10_effect_type
*This
= impl_from_ID3D10EffectType(iface
);
6260 struct d3d10_effect_type
*t
;
6262 TRACE("iface %p, index %u\n", iface
, index
);
6264 if (index
>= This
->member_count
)
6266 WARN("Invalid index specified\n");
6267 return &null_type
.ID3D10EffectType_iface
;
6270 t
= (&This
->members
[index
])->type
;
6272 TRACE("Returning member %p, %s\n", t
, debugstr_a(t
->name
));
6274 return &t
->ID3D10EffectType_iface
;
6277 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_type_GetMemberTypeByName(ID3D10EffectType
*iface
,
6280 struct d3d10_effect_type
*This
= impl_from_ID3D10EffectType(iface
);
6283 TRACE("iface %p, name %s\n", iface
, debugstr_a(name
));
6287 WARN("Invalid name specified\n");
6288 return &null_type
.ID3D10EffectType_iface
;
6291 for (i
= 0; i
< This
->member_count
; ++i
)
6293 struct d3d10_effect_type_member
*typem
= &This
->members
[i
];
6297 if (!strcmp(typem
->name
, name
))
6299 TRACE("Returning type %p.\n", typem
->type
);
6300 return &typem
->type
->ID3D10EffectType_iface
;
6305 WARN("Invalid name specified\n");
6307 return &null_type
.ID3D10EffectType_iface
;
6310 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_type_GetMemberTypeBySemantic(ID3D10EffectType
*iface
,
6313 struct d3d10_effect_type
*This
= impl_from_ID3D10EffectType(iface
);
6316 TRACE("iface %p, semantic %s\n", iface
, debugstr_a(semantic
));
6320 WARN("Invalid semantic specified\n");
6321 return &null_type
.ID3D10EffectType_iface
;
6324 for (i
= 0; i
< This
->member_count
; ++i
)
6326 struct d3d10_effect_type_member
*typem
= &This
->members
[i
];
6328 if (typem
->semantic
)
6330 if (!strcmp(typem
->semantic
, semantic
))
6332 TRACE("Returning type %p.\n", typem
->type
);
6333 return &typem
->type
->ID3D10EffectType_iface
;
6338 WARN("Invalid semantic specified\n");
6340 return &null_type
.ID3D10EffectType_iface
;
6343 static LPCSTR STDMETHODCALLTYPE
d3d10_effect_type_GetMemberName(ID3D10EffectType
*iface
, UINT index
)
6345 struct d3d10_effect_type
*This
= impl_from_ID3D10EffectType(iface
);
6346 struct d3d10_effect_type_member
*typem
;
6348 TRACE("iface %p, index %u\n", iface
, index
);
6350 if (index
>= This
->member_count
)
6352 WARN("Invalid index specified\n");
6356 typem
= &This
->members
[index
];
6358 TRACE("Returning name %s\n", debugstr_a(typem
->name
));
6363 static LPCSTR STDMETHODCALLTYPE
d3d10_effect_type_GetMemberSemantic(ID3D10EffectType
*iface
, UINT index
)
6365 struct d3d10_effect_type
*This
= impl_from_ID3D10EffectType(iface
);
6366 struct d3d10_effect_type_member
*typem
;
6368 TRACE("iface %p, index %u\n", iface
, index
);
6370 if (index
>= This
->member_count
)
6372 WARN("Invalid index specified\n");
6376 typem
= &This
->members
[index
];
6378 TRACE("Returning semantic %s\n", debugstr_a(typem
->semantic
));
6380 return typem
->semantic
;
6383 static const struct ID3D10EffectTypeVtbl d3d10_effect_type_vtbl
=
6385 /* ID3D10EffectType */
6386 d3d10_effect_type_IsValid
,
6387 d3d10_effect_type_GetDesc
,
6388 d3d10_effect_type_GetMemberTypeByIndex
,
6389 d3d10_effect_type_GetMemberTypeByName
,
6390 d3d10_effect_type_GetMemberTypeBySemantic
,
6391 d3d10_effect_type_GetMemberName
,
6392 d3d10_effect_type_GetMemberSemantic
,