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("shader signature", &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
;
364 case 22: return D3D10_SVT_BUFFER
;
366 FIXME("Unknown variable type %#x.\n", t
);
367 return D3D10_SVT_VOID
;
374 case 1: return D3D10_SVT_FLOAT
;
375 case 2: return D3D10_SVT_INT
;
376 case 3: return D3D10_SVT_UINT
;
377 case 4: return D3D10_SVT_BOOL
;
379 FIXME("Unknown variable type %#x.\n", t
);
380 return D3D10_SVT_VOID
;
385 static HRESULT
parse_fx10_type(struct d3d10_effect_type
*t
, const char *ptr
, const char *data
)
392 read_dword(&ptr
, &offset
);
393 TRACE("Type name at offset %#x.\n", offset
);
395 if (!copy_name(data
+ offset
, &t
->name
))
397 ERR("Failed to copy name.\n");
398 return E_OUTOFMEMORY
;
400 TRACE("Type name: %s.\n", debugstr_a(t
->name
));
402 read_dword(&ptr
, &unknown0
);
403 TRACE("Unknown 0: %u.\n", unknown0
);
405 read_dword(&ptr
, &t
->element_count
);
406 TRACE("Element count: %u.\n", t
->element_count
);
408 read_dword(&ptr
, &t
->size_unpacked
);
409 TRACE("Unpacked size: %#x.\n", t
->size_unpacked
);
411 read_dword(&ptr
, &t
->stride
);
412 TRACE("Stride: %#x.\n", t
->stride
);
414 read_dword(&ptr
, &t
->size_packed
);
415 TRACE("Packed size %#x.\n", t
->size_packed
);
422 read_dword(&ptr
, &typeinfo
);
423 t
->column_count
= (typeinfo
& D3D10_FX10_TYPE_COLUMN_MASK
) >> D3D10_FX10_TYPE_COLUMN_SHIFT
;
424 t
->row_count
= (typeinfo
& D3D10_FX10_TYPE_ROW_MASK
) >> D3D10_FX10_TYPE_ROW_SHIFT
;
425 t
->basetype
= d3d10_variable_type((typeinfo
& D3D10_FX10_TYPE_BASETYPE_MASK
) >> D3D10_FX10_TYPE_BASETYPE_SHIFT
, FALSE
);
426 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
);
428 TRACE("Type description: %#x.\n", typeinfo
);
429 TRACE("\tcolumns: %u.\n", t
->column_count
);
430 TRACE("\trows: %u.\n", t
->row_count
);
431 TRACE("\tbasetype: %s.\n", debug_d3d10_shader_variable_type(t
->basetype
));
432 TRACE("\tclass: %s.\n", debug_d3d10_shader_variable_class(t
->type_class
));
433 TRACE("\tunknown bits: %#x.\n", typeinfo
& ~(D3D10_FX10_TYPE_COLUMN_MASK
| D3D10_FX10_TYPE_ROW_MASK
434 | D3D10_FX10_TYPE_BASETYPE_MASK
| D3D10_FX10_TYPE_CLASS_MASK
| D3D10_FX10_TYPE_MATRIX_COLUMN_MAJOR_MASK
));
438 TRACE("Type is an object.\n");
443 t
->type_class
= D3D10_SVC_OBJECT
;
445 read_dword(&ptr
, &typeinfo
);
446 t
->basetype
= d3d10_variable_type(typeinfo
, TRUE
);
448 TRACE("Type description: %#x.\n", typeinfo
);
449 TRACE("\tbasetype: %s.\n", debug_d3d10_shader_variable_type(t
->basetype
));
450 TRACE("\tclass: %s.\n", debug_d3d10_shader_variable_class(t
->type_class
));
454 TRACE("Type is a structure.\n");
456 read_dword(&ptr
, &t
->member_count
);
457 TRACE("Member count: %u.\n", t
->member_count
);
462 t
->type_class
= D3D10_SVC_STRUCT
;
464 t
->members
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, t
->member_count
* sizeof(*t
->members
));
467 ERR("Failed to allocate members memory.\n");
468 return E_OUTOFMEMORY
;
471 for (i
= 0; i
< t
->member_count
; ++i
)
473 struct d3d10_effect_type_member
*typem
= &t
->members
[i
];
475 read_dword(&ptr
, &offset
);
476 TRACE("Member name at offset %#x.\n", offset
);
478 if (!copy_name(data
+ offset
, &typem
->name
))
480 ERR("Failed to copy name.\n");
481 return E_OUTOFMEMORY
;
483 TRACE("Member name: %s.\n", debugstr_a(typem
->name
));
485 read_dword(&ptr
, &offset
);
486 TRACE("Member semantic at offset %#x.\n", offset
);
488 if (!copy_name(data
+ offset
, &typem
->semantic
))
490 ERR("Failed to copy semantic.\n");
491 return E_OUTOFMEMORY
;
493 TRACE("Member semantic: %s.\n", debugstr_a(typem
->semantic
));
495 read_dword(&ptr
, &typem
->buffer_offset
);
496 TRACE("Member offset in struct: %#x.\n", typem
->buffer_offset
);
498 read_dword(&ptr
, &offset
);
499 TRACE("Member type info at offset %#x.\n", offset
);
501 typem
->type
= get_fx10_type(t
->effect
, data
, offset
);
504 ERR("Failed to get variable type.\n");
511 FIXME("Unhandled case %#x.\n", unknown0
);
515 if (t
->element_count
)
517 TRACE("Elementtype for type at offset: %#x\n", t
->id
);
519 /* allocate elementtype - we need only one, because all elements have the same type */
520 t
->elementtype
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(*t
->elementtype
));
523 ERR("Failed to allocate members memory.\n");
524 return E_OUTOFMEMORY
;
527 /* create a copy of the original type with some minor changes */
528 t
->elementtype
->ID3D10EffectType_iface
.lpVtbl
= &d3d10_effect_type_vtbl
;
529 t
->elementtype
->effect
= t
->effect
;
531 if (!copy_name(t
->name
, &t
->elementtype
->name
))
533 ERR("Failed to copy name.\n");
534 return E_OUTOFMEMORY
;
536 TRACE("\tType name: %s.\n", debugstr_a(t
->elementtype
->name
));
538 t
->elementtype
->element_count
= 0;
539 TRACE("\tElement count: %u.\n", t
->elementtype
->element_count
);
542 * Not sure if this calculation is 100% correct, but a test
543 * shows that these values work.
545 t
->elementtype
->size_unpacked
= t
->size_packed
/ t
->element_count
;
546 TRACE("\tUnpacked size: %#x.\n", t
->elementtype
->size_unpacked
);
548 t
->elementtype
->stride
= t
->stride
;
549 TRACE("\tStride: %#x.\n", t
->elementtype
->stride
);
551 t
->elementtype
->size_packed
= t
->size_packed
/ t
->element_count
;
552 TRACE("\tPacked size: %#x.\n", t
->elementtype
->size_packed
);
554 t
->elementtype
->member_count
= t
->member_count
;
555 TRACE("\tMember count: %u.\n", t
->elementtype
->member_count
);
557 t
->elementtype
->column_count
= t
->column_count
;
558 TRACE("\tColumns: %u.\n", t
->elementtype
->column_count
);
560 t
->elementtype
->row_count
= t
->row_count
;
561 TRACE("\tRows: %u.\n", t
->elementtype
->row_count
);
563 t
->elementtype
->basetype
= t
->basetype
;
564 TRACE("\tBasetype: %s.\n", debug_d3d10_shader_variable_type(t
->elementtype
->basetype
));
566 t
->elementtype
->type_class
= t
->type_class
;
567 TRACE("\tClass: %s.\n", debug_d3d10_shader_variable_class(t
->elementtype
->type_class
));
569 t
->elementtype
->members
= t
->members
;
575 static struct d3d10_effect_type
*get_fx10_type(struct d3d10_effect
*effect
, const char *data
, DWORD offset
)
577 struct d3d10_effect_type
*type
;
578 struct wine_rb_entry
*entry
;
581 entry
= wine_rb_get(&effect
->types
, &offset
);
584 TRACE("Returning existing type.\n");
585 return WINE_RB_ENTRY_VALUE(entry
, struct d3d10_effect_type
, entry
);
588 type
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(*type
));
591 ERR("Failed to allocate type memory.\n");
595 type
->ID3D10EffectType_iface
.lpVtbl
= &d3d10_effect_type_vtbl
;
597 type
->effect
= effect
;
598 hr
= parse_fx10_type(type
, data
+ offset
, data
);
601 ERR("Failed to parse type info, hr %#x.\n", hr
);
602 HeapFree(GetProcessHeap(), 0, type
);
606 if (wine_rb_put(&effect
->types
, &offset
, &type
->entry
) == -1)
608 ERR("Failed to insert type entry.\n");
609 HeapFree(GetProcessHeap(), 0, type
);
616 static void set_variable_vtbl(struct d3d10_effect_variable
*v
)
618 switch (v
->type
->type_class
)
620 case D3D10_SVC_SCALAR
:
621 v
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_scalar_variable_vtbl
;
624 case D3D10_SVC_VECTOR
:
625 v
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_vector_variable_vtbl
;
628 case D3D10_SVC_MATRIX_ROWS
:
629 case D3D10_SVC_MATRIX_COLUMNS
:
630 v
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_matrix_variable_vtbl
;
633 case D3D10_SVC_STRUCT
:
634 v
->vtbl
= &d3d10_effect_variable_vtbl
;
637 case D3D10_SVC_OBJECT
:
638 switch(v
->type
->basetype
)
640 case D3D10_SVT_STRING
:
641 v
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_string_variable_vtbl
;
644 case D3D10_SVT_TEXTURE1D
:
645 case D3D10_SVT_TEXTURE1DARRAY
:
646 case D3D10_SVT_TEXTURE2D
:
647 case D3D10_SVT_TEXTURE2DARRAY
:
648 case D3D10_SVT_TEXTURE2DMS
:
649 case D3D10_SVT_TEXTURE2DMSARRAY
:
650 case D3D10_SVT_TEXTURE3D
:
651 case D3D10_SVT_TEXTURECUBE
:
652 case D3D10_SVT_BUFFER
: /* Either resource or constant buffer. */
653 v
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_resource_variable_vtbl
;
656 case D3D10_SVT_RENDERTARGETVIEW
:
657 v
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_render_target_view_variable_vtbl
;
660 case D3D10_SVT_DEPTHSTENCILVIEW
:
661 v
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_depth_stencil_view_variable_vtbl
;
664 case D3D10_SVT_DEPTHSTENCIL
:
665 v
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_depth_stencil_variable_vtbl
;
668 case D3D10_SVT_VERTEXSHADER
:
669 case D3D10_SVT_GEOMETRYSHADER
:
670 case D3D10_SVT_PIXELSHADER
:
671 v
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_variable_vtbl
;
674 case D3D10_SVT_BLEND
:
675 v
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_blend_variable_vtbl
;
678 case D3D10_SVT_RASTERIZER
:
679 v
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_rasterizer_variable_vtbl
;
682 case D3D10_SVT_SAMPLER
:
683 v
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_sampler_variable_vtbl
;
687 FIXME("Unhandled basetype %s.\n", debug_d3d10_shader_variable_type(v
->type
->basetype
));
688 v
->vtbl
= &d3d10_effect_variable_vtbl
;
694 FIXME("Unhandled type class %s.\n", debug_d3d10_shader_variable_class(v
->type
->type_class
));
695 v
->vtbl
= &d3d10_effect_variable_vtbl
;
700 static HRESULT
copy_variableinfo_from_type(struct d3d10_effect_variable
*v
)
705 if (v
->type
->member_count
)
707 v
->members
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, v
->type
->member_count
* sizeof(*v
->members
));
710 ERR("Failed to allocate members memory.\n");
711 return E_OUTOFMEMORY
;
714 for (i
= 0; i
< v
->type
->member_count
; ++i
)
716 struct d3d10_effect_variable
*var
= &v
->members
[i
];
717 struct d3d10_effect_type_member
*typem
= &v
->type
->members
[i
];
719 var
->buffer
= v
->buffer
;
720 var
->effect
= v
->effect
;
721 var
->type
= typem
->type
;
722 set_variable_vtbl(var
);
724 if (!copy_name(typem
->name
, &var
->name
))
726 ERR("Failed to copy name.\n");
727 return E_OUTOFMEMORY
;
729 TRACE("Variable name: %s.\n", debugstr_a(var
->name
));
731 if (!copy_name(typem
->semantic
, &var
->semantic
))
733 ERR("Failed to copy name.\n");
734 return E_OUTOFMEMORY
;
736 TRACE("Variable semantic: %s.\n", debugstr_a(var
->semantic
));
738 var
->buffer_offset
= v
->buffer_offset
+ typem
->buffer_offset
;
739 TRACE("Variable buffer offset: %u.\n", var
->buffer_offset
);
741 hr
= copy_variableinfo_from_type(var
);
742 if (FAILED(hr
)) return hr
;
746 if (v
->type
->element_count
)
748 unsigned int bufferoffset
= v
->buffer_offset
;
750 v
->elements
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, v
->type
->element_count
* sizeof(*v
->elements
));
753 ERR("Failed to allocate elements memory.\n");
754 return E_OUTOFMEMORY
;
757 for (i
= 0; i
< v
->type
->element_count
; ++i
)
759 struct d3d10_effect_variable
*var
= &v
->elements
[i
];
761 var
->buffer
= v
->buffer
;
762 var
->effect
= v
->effect
;
763 var
->type
= v
->type
->elementtype
;
764 set_variable_vtbl(var
);
766 if (!copy_name(v
->name
, &var
->name
))
768 ERR("Failed to copy name.\n");
769 return E_OUTOFMEMORY
;
771 TRACE("Variable name: %s.\n", debugstr_a(var
->name
));
773 if (!copy_name(v
->semantic
, &var
->semantic
))
775 ERR("Failed to copy name.\n");
776 return E_OUTOFMEMORY
;
778 TRACE("Variable semantic: %s.\n", debugstr_a(var
->semantic
));
782 bufferoffset
+= v
->type
->stride
;
784 var
->buffer_offset
= bufferoffset
;
785 TRACE("Variable buffer offset: %u.\n", var
->buffer_offset
);
787 hr
= copy_variableinfo_from_type(var
);
788 if (FAILED(hr
)) return hr
;
795 static HRESULT
parse_fx10_variable_head(struct d3d10_effect_variable
*v
, const char **ptr
, const char *data
)
799 read_dword(ptr
, &offset
);
800 TRACE("Variable name at offset %#x.\n", offset
);
802 if (!copy_name(data
+ offset
, &v
->name
))
804 ERR("Failed to copy name.\n");
805 return E_OUTOFMEMORY
;
807 TRACE("Variable name: %s.\n", debugstr_a(v
->name
));
809 read_dword(ptr
, &offset
);
810 TRACE("Variable type info at offset %#x.\n", offset
);
812 v
->type
= get_fx10_type(v
->effect
, data
, offset
);
815 ERR("Failed to get variable type.\n");
818 set_variable_vtbl(v
);
820 return copy_variableinfo_from_type(v
);
823 static HRESULT
parse_fx10_annotation(struct d3d10_effect_variable
*a
, const char **ptr
, const char *data
)
827 hr
= parse_fx10_variable_head(a
, ptr
, data
);
828 if (FAILED(hr
)) return hr
;
830 skip_dword_unknown("annotation", ptr
, 1);
832 /* mark the variable as annotation */
833 a
->flag
= D3D10_EFFECT_VARIABLE_ANNOTATION
;
838 static HRESULT
parse_fx10_anonymous_shader(struct d3d10_effect
*e
, struct d3d10_effect_anonymous_shader
*s
,
839 enum d3d10_effect_object_type otype
)
841 struct d3d10_effect_variable
*v
= &s
->shader
;
842 struct d3d10_effect_type
*t
= &s
->type
;
843 const char *shader
= NULL
;
847 case D3D10_EOT_VERTEXSHADER
:
848 shader
= "vertexshader";
849 t
->basetype
= D3D10_SVT_VERTEXSHADER
;
852 case D3D10_EOT_PIXELSHADER
:
853 shader
= "pixelshader";
854 t
->basetype
= D3D10_SVT_PIXELSHADER
;
857 case D3D10_EOT_GEOMETRYSHADER
:
858 shader
= "geometryshader";
859 t
->basetype
= D3D10_SVT_GEOMETRYSHADER
;
863 if (!copy_name(shader
, &t
->name
))
865 ERR("Failed to copy name.\n");
866 return E_OUTOFMEMORY
;
868 TRACE("Type name: %s.\n", debugstr_a(t
->name
));
870 t
->type_class
= D3D10_SVC_OBJECT
;
872 t
->ID3D10EffectType_iface
.lpVtbl
= &d3d10_effect_type_vtbl
;
876 set_variable_vtbl(v
);
878 if (!copy_name("$Anonymous", &v
->name
))
880 ERR("Failed to copy semantic.\n");
881 return E_OUTOFMEMORY
;
883 TRACE("Variable name: %s.\n", debugstr_a(v
->name
));
885 if (!copy_name(NULL
, &v
->semantic
))
887 ERR("Failed to copy semantic.\n");
888 return E_OUTOFMEMORY
;
890 TRACE("Variable semantic: %s.\n", debugstr_a(v
->semantic
));
895 static HRESULT
parse_fx10_object(struct d3d10_effect_object
*o
, const char **ptr
, const char *data
)
897 const char *data_ptr
= NULL
;
899 enum d3d10_effect_object_operation operation
;
901 struct d3d10_effect
*effect
= o
->pass
->technique
->effect
;
902 ID3D10Effect
*e
= &effect
->ID3D10Effect_iface
;
904 read_dword(ptr
, &o
->type
);
905 TRACE("Effect object is of type %#x.\n", o
->type
);
907 read_dword(ptr
, &o
->index
);
908 TRACE("Effect object index %#x.\n", o
->index
);
910 read_dword(ptr
, &operation
);
911 TRACE("Effect object operation %#x.\n", operation
);
913 read_dword(ptr
, &offset
);
914 TRACE("Effect object idx is at offset %#x.\n", offset
);
918 case D3D10_EOO_VALUE
:
919 TRACE("Copy variable values\n");
923 case D3D10_EOT_VERTEXSHADER
:
924 TRACE("Vertex shader\n");
925 o
->data
= &anonymous_vs
;
929 case D3D10_EOT_PIXELSHADER
:
930 TRACE("Pixel shader\n");
931 o
->data
= &anonymous_ps
;
935 case D3D10_EOT_GEOMETRYSHADER
:
936 TRACE("Geometry shader\n");
937 o
->data
= &anonymous_gs
;
942 FIXME("Unhandled object type %#x\n", o
->type
);
948 case D3D10_EOO_PARSED_OBJECT
:
949 /* This is a local object, we've parsed in parse_fx10_local_object. */
950 TRACE("Shader = %s.\n", data
+ offset
);
952 o
->data
= e
->lpVtbl
->GetVariableByName(e
, data
+ offset
);
956 case D3D10_EOO_PARSED_OBJECT_INDEX
:
957 /* This is a local object, we've parsed in parse_fx10_local_object, which has an array index. */
958 data_ptr
= data
+ offset
;
959 read_dword(&data_ptr
, &offset
);
960 read_dword(&data_ptr
, &o
->index
);
961 TRACE("Shader = %s[%u].\n", data
+ offset
, o
->index
);
963 o
->data
= e
->lpVtbl
->GetVariableByName(e
, data
+ offset
);
967 case D3D10_EOO_ANONYMOUS_SHADER
:
968 TRACE("Anonymous shader\n");
970 /* check anonymous_shader_current for validity */
971 if (effect
->anonymous_shader_current
>= effect
->anonymous_shader_count
)
973 ERR("Anonymous shader count is wrong!\n");
977 data_ptr
= data
+ offset
;
978 read_dword(&data_ptr
, &offset
);
979 TRACE("Effect object starts at offset %#x.\n", offset
);
981 data_ptr
= data
+ offset
;
983 hr
= parse_fx10_anonymous_shader(effect
, &effect
->anonymous_shaders
[effect
->anonymous_shader_current
], o
->type
);
984 if (FAILED(hr
)) return hr
;
986 o
->data
= &effect
->anonymous_shaders
[effect
->anonymous_shader_current
].shader
;
987 ++effect
->anonymous_shader_current
;
991 case D3D10_EOT_VERTEXSHADER
:
992 TRACE("Vertex shader\n");
993 hr
= parse_shader(o
->data
, data_ptr
);
996 case D3D10_EOT_PIXELSHADER
:
997 TRACE("Pixel shader\n");
998 hr
= parse_shader(o
->data
, data_ptr
);
1001 case D3D10_EOT_GEOMETRYSHADER
:
1002 TRACE("Geometry shader\n");
1003 hr
= parse_shader(o
->data
, data_ptr
);
1007 FIXME("Unhandled object type %#x\n", o
->type
);
1015 FIXME("Unhandled operation %#x.\n", operation
);
1022 static HRESULT
parse_fx10_pass(struct d3d10_effect_pass
*p
, const char **ptr
, const char *data
)
1028 read_dword(ptr
, &offset
);
1029 TRACE("Pass name at offset %#x.\n", offset
);
1031 if (!copy_name(data
+ offset
, &p
->name
))
1033 ERR("Failed to copy name.\n");
1034 return E_OUTOFMEMORY
;
1036 TRACE("Pass name: %s.\n", debugstr_a(p
->name
));
1038 read_dword(ptr
, &p
->object_count
);
1039 TRACE("Pass has %u effect objects.\n", p
->object_count
);
1041 read_dword(ptr
, &p
->annotation_count
);
1042 TRACE("Pass has %u annotations.\n", p
->annotation_count
);
1044 p
->annotations
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, p
->annotation_count
* sizeof(*p
->annotations
));
1045 if (!p
->annotations
)
1047 ERR("Failed to allocate pass annotations memory.\n");
1048 return E_OUTOFMEMORY
;
1051 for (i
= 0; i
< p
->annotation_count
; ++i
)
1053 struct d3d10_effect_variable
*a
= &p
->annotations
[i
];
1055 a
->effect
= p
->technique
->effect
;
1056 a
->buffer
= &null_local_buffer
;
1058 hr
= parse_fx10_annotation(a
, ptr
, data
);
1059 if (FAILED(hr
)) return hr
;
1062 p
->objects
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, p
->object_count
* sizeof(*p
->objects
));
1065 ERR("Failed to allocate effect objects memory.\n");
1066 return E_OUTOFMEMORY
;
1069 for (i
= 0; i
< p
->object_count
; ++i
)
1071 struct d3d10_effect_object
*o
= &p
->objects
[i
];
1075 hr
= parse_fx10_object(o
, ptr
, data
);
1076 if (FAILED(hr
)) return hr
;
1082 static HRESULT
parse_fx10_technique(struct d3d10_effect_technique
*t
, const char **ptr
, const char *data
)
1088 read_dword(ptr
, &offset
);
1089 TRACE("Technique name at offset %#x.\n", offset
);
1091 if (!copy_name(data
+ offset
, &t
->name
))
1093 ERR("Failed to copy name.\n");
1094 return E_OUTOFMEMORY
;
1096 TRACE("Technique name: %s.\n", debugstr_a(t
->name
));
1098 read_dword(ptr
, &t
->pass_count
);
1099 TRACE("Technique has %u passes\n", t
->pass_count
);
1101 read_dword(ptr
, &t
->annotation_count
);
1102 TRACE("Technique has %u annotations.\n", t
->annotation_count
);
1104 t
->annotations
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, t
->annotation_count
* sizeof(*t
->annotations
));
1105 if (!t
->annotations
)
1107 ERR("Failed to allocate technique annotations memory.\n");
1108 return E_OUTOFMEMORY
;
1111 for (i
= 0; i
< t
->annotation_count
; ++i
)
1113 struct d3d10_effect_variable
*a
= &t
->annotations
[i
];
1115 a
->effect
= t
->effect
;
1116 a
->buffer
= &null_local_buffer
;
1118 hr
= parse_fx10_annotation(a
, ptr
, data
);
1119 if (FAILED(hr
)) return hr
;
1122 t
->passes
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, t
->pass_count
* sizeof(*t
->passes
));
1125 ERR("Failed to allocate passes memory\n");
1126 return E_OUTOFMEMORY
;
1129 for (i
= 0; i
< t
->pass_count
; ++i
)
1131 struct d3d10_effect_pass
*p
= &t
->passes
[i
];
1133 p
->ID3D10EffectPass_iface
.lpVtbl
= &d3d10_effect_pass_vtbl
;
1136 hr
= parse_fx10_pass(p
, ptr
, data
);
1137 if (FAILED(hr
)) return hr
;
1143 static HRESULT
parse_fx10_variable(struct d3d10_effect_variable
*v
, const char **ptr
, const char *data
)
1149 hr
= parse_fx10_variable_head(v
, ptr
, data
);
1150 if (FAILED(hr
)) return hr
;
1152 read_dword(ptr
, &offset
);
1153 TRACE("Variable semantic at offset %#x.\n", offset
);
1155 if (!copy_name(data
+ offset
, &v
->semantic
))
1157 ERR("Failed to copy semantic.\n");
1158 return E_OUTOFMEMORY
;
1160 TRACE("Variable semantic: %s.\n", debugstr_a(v
->semantic
));
1162 read_dword(ptr
, &v
->buffer_offset
);
1163 TRACE("Variable offset in buffer: %#x.\n", v
->buffer_offset
);
1165 skip_dword_unknown("variable", ptr
, 1);
1167 read_dword(ptr
, &v
->flag
);
1168 TRACE("Variable flag: %#x.\n", v
->flag
);
1170 read_dword(ptr
, &v
->annotation_count
);
1171 TRACE("Variable has %u annotations.\n", v
->annotation_count
);
1173 v
->annotations
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, v
->annotation_count
* sizeof(*v
->annotations
));
1174 if (!v
->annotations
)
1176 ERR("Failed to allocate variable annotations memory.\n");
1177 return E_OUTOFMEMORY
;
1180 for (i
= 0; i
< v
->annotation_count
; ++i
)
1182 struct d3d10_effect_variable
*a
= &v
->annotations
[i
];
1184 a
->effect
= v
->effect
;
1185 a
->buffer
= &null_local_buffer
;
1187 hr
= parse_fx10_annotation(a
, ptr
, data
);
1188 if (FAILED(hr
)) return hr
;
1194 static HRESULT
parse_fx10_local_variable(struct d3d10_effect_variable
*v
, const char **ptr
, const char *data
)
1200 hr
= parse_fx10_variable_head(v
, ptr
, data
);
1201 if (FAILED(hr
)) return hr
;
1203 read_dword(ptr
, &offset
);
1204 TRACE("Variable semantic at offset %#x.\n", offset
);
1206 if (!copy_name(data
+ offset
, &v
->semantic
))
1208 ERR("Failed to copy semantic.\n");
1209 return E_OUTOFMEMORY
;
1211 TRACE("Variable semantic: %s.\n", debugstr_a(v
->semantic
));
1213 skip_dword_unknown("local variable", ptr
, 1);
1215 switch (v
->type
->basetype
)
1217 case D3D10_SVT_TEXTURE1D
:
1218 case D3D10_SVT_TEXTURE1DARRAY
:
1219 case D3D10_SVT_TEXTURE2D
:
1220 case D3D10_SVT_TEXTURE2DARRAY
:
1221 case D3D10_SVT_TEXTURE2DMS
:
1222 case D3D10_SVT_TEXTURE2DMSARRAY
:
1223 case D3D10_SVT_TEXTURE3D
:
1224 case D3D10_SVT_TEXTURECUBE
:
1225 case D3D10_SVT_RENDERTARGETVIEW
:
1226 case D3D10_SVT_DEPTHSTENCILVIEW
:
1227 case D3D10_SVT_BUFFER
:
1228 TRACE("SVT could not have elements.\n");
1231 case D3D10_SVT_VERTEXSHADER
:
1232 case D3D10_SVT_PIXELSHADER
:
1233 case D3D10_SVT_GEOMETRYSHADER
:
1234 TRACE("Shader type is %s\n", debug_d3d10_shader_variable_type(v
->type
->basetype
));
1235 for (i
= 0; i
< max(v
->type
->element_count
, 1); ++i
)
1237 DWORD shader_offset
;
1238 struct d3d10_effect_variable
*var
;
1240 if (!v
->type
->element_count
)
1246 var
= &v
->elements
[i
];
1249 read_dword(ptr
, &shader_offset
);
1250 TRACE("Shader offset: %#x.\n", shader_offset
);
1252 hr
= parse_shader(var
, data
+ shader_offset
);
1253 if (FAILED(hr
)) return hr
;
1257 case D3D10_SVT_DEPTHSTENCIL
:
1258 case D3D10_SVT_BLEND
:
1259 case D3D10_SVT_RASTERIZER
:
1260 case D3D10_SVT_SAMPLER
:
1261 TRACE("SVT is a state.\n");
1262 for (i
= 0; i
< max(v
->type
->element_count
, 1); ++i
)
1267 read_dword(ptr
, &object_count
);
1268 TRACE("Object count: %#x.\n", object_count
);
1270 for (j
= 0; j
< object_count
; ++j
)
1272 skip_dword_unknown("state object attribute", ptr
, 4);
1278 FIXME("Unhandled case %s.\n", debug_d3d10_shader_variable_type(v
->type
->basetype
));
1282 read_dword(ptr
, &v
->annotation_count
);
1283 TRACE("Variable has %u annotations.\n", v
->annotation_count
);
1285 v
->annotations
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, v
->annotation_count
* sizeof(*v
->annotations
));
1286 if (!v
->annotations
)
1288 ERR("Failed to allocate variable annotations memory.\n");
1289 return E_OUTOFMEMORY
;
1292 for (i
= 0; i
< v
->annotation_count
; ++i
)
1294 struct d3d10_effect_variable
*a
= &v
->annotations
[i
];
1296 a
->effect
= v
->effect
;
1297 a
->buffer
= &null_local_buffer
;
1299 hr
= parse_fx10_annotation(a
, ptr
, data
);
1300 if (FAILED(hr
)) return hr
;
1306 static HRESULT
parse_fx10_local_buffer(struct d3d10_effect_variable
*l
, const char **ptr
, const char *data
)
1310 D3D10_CBUFFER_TYPE d3d10_cbuffer_type
;
1312 unsigned int stride
= 0;
1314 /* Generate our own type, it isn't in the fx blob. */
1315 l
->type
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(*l
->type
));
1318 ERR("Failed to allocate local buffer type memory.\n");
1319 return E_OUTOFMEMORY
;
1321 l
->type
->ID3D10EffectType_iface
.lpVtbl
= &d3d10_effect_type_vtbl
;
1322 l
->type
->type_class
= D3D10_SVC_OBJECT
;
1323 l
->type
->effect
= l
->effect
;
1325 read_dword(ptr
, &offset
);
1326 TRACE("Local buffer name at offset %#x.\n", offset
);
1328 if (!copy_name(data
+ offset
, &l
->name
))
1330 ERR("Failed to copy name.\n");
1331 return E_OUTOFMEMORY
;
1333 TRACE("Local buffer name: %s.\n", debugstr_a(l
->name
));
1335 read_dword(ptr
, &l
->data_size
);
1336 TRACE("Local buffer data size: %#x.\n", l
->data_size
);
1338 read_dword(ptr
, &d3d10_cbuffer_type
);
1339 TRACE("Local buffer type: %#x.\n", d3d10_cbuffer_type
);
1341 switch(d3d10_cbuffer_type
)
1343 case D3D10_CT_CBUFFER
:
1344 l
->type
->basetype
= D3D10_SVT_CBUFFER
;
1345 if (!copy_name("cbuffer", &l
->type
->name
))
1347 ERR("Failed to copy name.\n");
1348 return E_OUTOFMEMORY
;
1352 case D3D10_CT_TBUFFER
:
1353 l
->type
->basetype
= D3D10_SVT_TBUFFER
;
1354 if (!copy_name("tbuffer", &l
->type
->name
))
1356 ERR("Failed to copy name.\n");
1357 return E_OUTOFMEMORY
;
1362 ERR("Unexpected D3D10_CBUFFER_TYPE %#x!\n", d3d10_cbuffer_type
);
1366 read_dword(ptr
, &l
->type
->member_count
);
1367 TRACE("Local buffer member count: %#x.\n", l
->type
->member_count
);
1369 skip_dword_unknown("local buffer", ptr
, 1);
1371 read_dword(ptr
, &l
->annotation_count
);
1372 TRACE("Local buffer has %u annotations.\n", l
->annotation_count
);
1374 l
->annotations
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, l
->annotation_count
* sizeof(*l
->annotations
));
1375 if (!l
->annotations
)
1377 ERR("Failed to allocate local buffer annotations memory.\n");
1378 return E_OUTOFMEMORY
;
1381 for (i
= 0; i
< l
->annotation_count
; ++i
)
1383 struct d3d10_effect_variable
*a
= &l
->annotations
[i
];
1385 a
->effect
= l
->effect
;
1386 a
->buffer
= &null_local_buffer
;
1388 hr
= parse_fx10_annotation(a
, ptr
, data
);
1389 if (FAILED(hr
)) return hr
;
1392 l
->members
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, l
->type
->member_count
* sizeof(*l
->members
));
1395 ERR("Failed to allocate members memory.\n");
1396 return E_OUTOFMEMORY
;
1399 l
->type
->members
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, l
->type
->member_count
* sizeof(*l
->type
->members
));
1400 if (!l
->type
->members
)
1402 ERR("Failed to allocate type members memory.\n");
1403 return E_OUTOFMEMORY
;
1406 for (i
= 0; i
< l
->type
->member_count
; ++i
)
1408 struct d3d10_effect_variable
*v
= &l
->members
[i
];
1409 struct d3d10_effect_type_member
*typem
= &l
->type
->members
[i
];
1412 v
->effect
= l
->effect
;
1414 hr
= parse_fx10_variable(v
, ptr
, data
);
1415 if (FAILED(hr
)) return hr
;
1418 * Copy the values from the variable type to the constant buffers type
1419 * members structure, because it is our own generated type.
1421 typem
->type
= v
->type
;
1423 if (!copy_name(v
->name
, &typem
->name
))
1425 ERR("Failed to copy name.\n");
1426 return E_OUTOFMEMORY
;
1428 TRACE("Variable name: %s.\n", debugstr_a(typem
->name
));
1430 if (!copy_name(v
->semantic
, &typem
->semantic
))
1432 ERR("Failed to copy name.\n");
1433 return E_OUTOFMEMORY
;
1435 TRACE("Variable semantic: %s.\n", debugstr_a(typem
->semantic
));
1437 typem
->buffer_offset
= v
->buffer_offset
;
1438 TRACE("Variable buffer offset: %u.\n", typem
->buffer_offset
);
1440 l
->type
->size_packed
+= v
->type
->size_packed
;
1443 * For the complete constantbuffer the size_unpacked = stride,
1444 * the stride is calculated like this:
1446 * 1) if the constant buffer variables are packed with packoffset
1447 * - stride = the highest used constant
1448 * - the complete stride has to be a multiple of 0x10
1450 * 2) if the constant buffer variables are NOT packed with packoffset
1451 * - sum of unpacked size for all variables which fit in a 0x10 part
1452 * - if the size exceeds a 0x10 part, the rest of the old part is skipped
1453 * and a new part is started
1454 * - if the variable is a struct it is always used a new part
1455 * - the complete stride has to be a multiple of 0x10
1458 * 0x4, 0x4, 0x4, 0x8, 0x4, 0x14, 0x4
1459 * part 0x10 0x10 0x20 -> 0x40
1461 if (v
->flag
& D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT
)
1463 if ((v
->type
->size_unpacked
+ v
->buffer_offset
) > stride
)
1465 stride
= v
->type
->size_unpacked
+ v
->buffer_offset
;
1470 if (v
->type
->type_class
== D3D10_SVC_STRUCT
)
1472 stride
= (stride
+ 0xf) & ~0xf;
1475 if ( ((stride
& 0xf) + v
->type
->size_unpacked
) > 0x10)
1477 stride
= (stride
+ 0xf) & ~0xf;
1480 stride
+= v
->type
->size_unpacked
;
1483 l
->type
->stride
= l
->type
->size_unpacked
= (stride
+ 0xf) & ~0xf;
1485 TRACE("Constant buffer:\n");
1486 TRACE("\tType name: %s.\n", debugstr_a(l
->type
->name
));
1487 TRACE("\tElement count: %u.\n", l
->type
->element_count
);
1488 TRACE("\tMember count: %u.\n", l
->type
->member_count
);
1489 TRACE("\tUnpacked size: %#x.\n", l
->type
->size_unpacked
);
1490 TRACE("\tStride: %#x.\n", l
->type
->stride
);
1491 TRACE("\tPacked size %#x.\n", l
->type
->size_packed
);
1492 TRACE("\tBasetype: %s.\n", debug_d3d10_shader_variable_type(l
->type
->basetype
));
1493 TRACE("\tTypeclass: %s.\n", debug_d3d10_shader_variable_class(l
->type
->type_class
));
1498 static int d3d10_effect_type_compare(const void *key
, const struct wine_rb_entry
*entry
)
1500 const struct d3d10_effect_type
*t
= WINE_RB_ENTRY_VALUE(entry
, const struct d3d10_effect_type
, entry
);
1501 const DWORD
*id
= key
;
1506 static void d3d10_effect_type_member_destroy(struct d3d10_effect_type_member
*typem
)
1508 TRACE("effect type member %p.\n", typem
);
1510 /* Do not release typem->type, it will be covered by d3d10_effect_type_destroy(). */
1511 HeapFree(GetProcessHeap(), 0, typem
->semantic
);
1512 HeapFree(GetProcessHeap(), 0, typem
->name
);
1515 static void d3d10_effect_type_destroy(struct wine_rb_entry
*entry
, void *context
)
1517 struct d3d10_effect_type
*t
= WINE_RB_ENTRY_VALUE(entry
, struct d3d10_effect_type
, entry
);
1519 TRACE("effect type %p.\n", t
);
1523 HeapFree(GetProcessHeap(), 0, t
->elementtype
->name
);
1524 HeapFree(GetProcessHeap(), 0, t
->elementtype
);
1531 for (i
= 0; i
< t
->member_count
; ++i
)
1533 d3d10_effect_type_member_destroy(&t
->members
[i
]);
1535 HeapFree(GetProcessHeap(), 0, t
->members
);
1538 HeapFree(GetProcessHeap(), 0, t
->name
);
1539 HeapFree(GetProcessHeap(), 0, t
);
1542 static const struct wine_rb_functions d3d10_effect_type_rb_functions
=
1547 d3d10_effect_type_compare
,
1550 static HRESULT
parse_fx10_body(struct d3d10_effect
*e
, const char *data
, DWORD data_size
)
1552 const char *ptr
= data
+ e
->index_offset
;
1556 if (wine_rb_init(&e
->types
, &d3d10_effect_type_rb_functions
) == -1)
1558 ERR("Failed to initialize type rbtree.\n");
1562 e
->local_buffers
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, e
->local_buffer_count
* sizeof(*e
->local_buffers
));
1563 if (!e
->local_buffers
)
1565 ERR("Failed to allocate local buffer memory.\n");
1566 return E_OUTOFMEMORY
;
1569 e
->local_variables
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, e
->local_variable_count
* sizeof(*e
->local_variables
));
1570 if (!e
->local_variables
)
1572 ERR("Failed to allocate local variable memory.\n");
1573 return E_OUTOFMEMORY
;
1576 e
->anonymous_shaders
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, e
->anonymous_shader_count
* sizeof(*e
->anonymous_shaders
));
1577 if (!e
->anonymous_shaders
)
1579 ERR("Failed to allocate anonymous shaders memory\n");
1580 return E_OUTOFMEMORY
;
1583 e
->used_shaders
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, e
->used_shader_count
* sizeof(*e
->used_shaders
));
1584 if (!e
->used_shaders
)
1586 ERR("Failed to allocate used shaders memory\n");
1587 return E_OUTOFMEMORY
;
1590 e
->techniques
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, e
->technique_count
* sizeof(*e
->techniques
));
1593 ERR("Failed to allocate techniques memory\n");
1594 return E_OUTOFMEMORY
;
1597 for (i
= 0; i
< e
->local_buffer_count
; ++i
)
1599 struct d3d10_effect_variable
*l
= &e
->local_buffers
[i
];
1600 l
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_constant_buffer_vtbl
;
1602 l
->buffer
= &null_local_buffer
;
1604 hr
= parse_fx10_local_buffer(l
, &ptr
, data
);
1605 if (FAILED(hr
)) return hr
;
1608 for (i
= 0; i
< e
->local_variable_count
; ++i
)
1610 struct d3d10_effect_variable
*v
= &e
->local_variables
[i
];
1613 v
->vtbl
= &d3d10_effect_variable_vtbl
;
1614 v
->buffer
= &null_local_buffer
;
1616 hr
= parse_fx10_local_variable(v
, &ptr
, data
);
1617 if (FAILED(hr
)) return hr
;
1620 for (i
= 0; i
< e
->technique_count
; ++i
)
1622 struct d3d10_effect_technique
*t
= &e
->techniques
[i
];
1624 t
->ID3D10EffectTechnique_iface
.lpVtbl
= &d3d10_effect_technique_vtbl
;
1627 hr
= parse_fx10_technique(t
, &ptr
, data
);
1628 if (FAILED(hr
)) return hr
;
1634 static HRESULT
parse_fx10(struct d3d10_effect
*e
, const char *data
, DWORD data_size
)
1636 const char *ptr
= data
;
1639 /* Compiled target version (e.g. fx_4_0=0xfeff1001, fx_4_1=0xfeff1011). */
1640 read_dword(&ptr
, &e
->version
);
1641 TRACE("Target: %#x\n", e
->version
);
1643 read_dword(&ptr
, &e
->local_buffer_count
);
1644 TRACE("Local buffer count: %u.\n", e
->local_buffer_count
);
1646 read_dword(&ptr
, &e
->variable_count
);
1647 TRACE("Variable count: %u\n", e
->variable_count
);
1649 read_dword(&ptr
, &e
->local_variable_count
);
1650 TRACE("Object count: %u\n", e
->local_variable_count
);
1652 read_dword(&ptr
, &e
->sharedbuffers_count
);
1653 TRACE("Sharedbuffers count: %u\n", e
->sharedbuffers_count
);
1655 /* Number of variables in shared buffers? */
1656 read_dword(&ptr
, &unknown
);
1657 FIXME("Unknown 0: %u\n", unknown
);
1659 read_dword(&ptr
, &e
->sharedobjects_count
);
1660 TRACE("Sharedobjects count: %u\n", e
->sharedobjects_count
);
1662 read_dword(&ptr
, &e
->technique_count
);
1663 TRACE("Technique count: %u\n", e
->technique_count
);
1665 read_dword(&ptr
, &e
->index_offset
);
1666 TRACE("Index offset: %#x\n", e
->index_offset
);
1668 read_dword(&ptr
, &unknown
);
1669 FIXME("Unknown 1: %u\n", unknown
);
1671 read_dword(&ptr
, &e
->texture_count
);
1672 TRACE("Texture count: %u\n", e
->texture_count
);
1674 read_dword(&ptr
, &e
->dephstencilstate_count
);
1675 TRACE("Depthstencilstate count: %u\n", e
->dephstencilstate_count
);
1677 read_dword(&ptr
, &e
->blendstate_count
);
1678 TRACE("Blendstate count: %u\n", e
->blendstate_count
);
1680 read_dword(&ptr
, &e
->rasterizerstate_count
);
1681 TRACE("Rasterizerstate count: %u\n", e
->rasterizerstate_count
);
1683 read_dword(&ptr
, &e
->samplerstate_count
);
1684 TRACE("Samplerstate count: %u\n", e
->samplerstate_count
);
1686 read_dword(&ptr
, &e
->rendertargetview_count
);
1687 TRACE("Rendertargetview count: %u\n", e
->rendertargetview_count
);
1689 read_dword(&ptr
, &e
->depthstencilview_count
);
1690 TRACE("Depthstencilview count: %u\n", e
->depthstencilview_count
);
1692 read_dword(&ptr
, &e
->used_shader_count
);
1693 TRACE("Used shader count: %u\n", e
->used_shader_count
);
1695 read_dword(&ptr
, &e
->anonymous_shader_count
);
1696 TRACE("Anonymous shader count: %u\n", e
->anonymous_shader_count
);
1698 return parse_fx10_body(e
, ptr
, data_size
- (ptr
- data
));
1701 static HRESULT
fx10_chunk_handler(const char *data
, DWORD data_size
, DWORD tag
, void *ctx
)
1703 struct d3d10_effect
*e
= ctx
;
1705 TRACE("tag: %s.\n", debugstr_an((const char *)&tag
, 4));
1707 TRACE("chunk size: %#x\n", data_size
);
1712 return parse_fx10(e
, data
, data_size
);
1715 FIXME("Unhandled chunk %s.\n", debugstr_an((const char *)&tag
, 4));
1720 HRESULT
d3d10_effect_parse(struct d3d10_effect
*This
, const void *data
, SIZE_T data_size
)
1722 return parse_dxbc(data
, data_size
, fx10_chunk_handler
, This
);
1725 static HRESULT
d3d10_effect_object_apply(struct d3d10_effect_object
*o
)
1727 ID3D10Device
*device
= o
->pass
->technique
->effect
->device
;
1728 struct d3d10_effect_variable
*v
= (struct d3d10_effect_variable
*) o
->data
;
1730 TRACE("effect object %p, type %#x.\n", o
, o
->type
);
1734 case D3D10_EOT_VERTEXSHADER
:
1735 ID3D10Device_VSSetShader(device
, ((struct d3d10_effect_shader_variable
*)v
->data
)->shader
.vs
);
1738 case D3D10_EOT_PIXELSHADER
:
1739 ID3D10Device_PSSetShader(device
, ((struct d3d10_effect_shader_variable
*)v
->data
)->shader
.ps
);
1742 case D3D10_EOT_GEOMETRYSHADER
:
1743 ID3D10Device_GSSetShader(device
, ((struct d3d10_effect_shader_variable
*)v
->data
)->shader
.gs
);
1747 FIXME("Unhandled effect object type %#x.\n", o
->type
);
1752 static void d3d10_effect_variable_destroy(struct d3d10_effect_variable
*v
)
1756 TRACE("variable %p.\n", v
);
1758 HeapFree(GetProcessHeap(), 0, v
->name
);
1759 HeapFree(GetProcessHeap(), 0, v
->semantic
);
1762 for (i
= 0; i
< v
->annotation_count
; ++i
)
1764 d3d10_effect_variable_destroy(&v
->annotations
[i
]);
1766 HeapFree(GetProcessHeap(), 0, v
->annotations
);
1771 for (i
= 0; i
< v
->type
->member_count
; ++i
)
1773 d3d10_effect_variable_destroy(&v
->members
[i
]);
1775 HeapFree(GetProcessHeap(), 0, v
->members
);
1780 for (i
= 0; i
< v
->type
->element_count
; ++i
)
1782 d3d10_effect_variable_destroy(&v
->elements
[i
]);
1784 HeapFree(GetProcessHeap(), 0, v
->elements
);
1789 switch(v
->type
->basetype
)
1791 case D3D10_SVT_VERTEXSHADER
:
1792 case D3D10_SVT_PIXELSHADER
:
1793 case D3D10_SVT_GEOMETRYSHADER
:
1794 shader_free_signature(&((struct d3d10_effect_shader_variable
*)v
->data
)->input_signature
);
1795 shader_free_signature(&((struct d3d10_effect_shader_variable
*)v
->data
)->output_signature
);
1801 HeapFree(GetProcessHeap(), 0, v
->data
);
1805 static void d3d10_effect_pass_destroy(struct d3d10_effect_pass
*p
)
1809 TRACE("pass %p\n", p
);
1811 HeapFree(GetProcessHeap(), 0, p
->name
);
1812 HeapFree(GetProcessHeap(), 0, p
->objects
);
1816 for (i
= 0; i
< p
->annotation_count
; ++i
)
1818 d3d10_effect_variable_destroy(&p
->annotations
[i
]);
1820 HeapFree(GetProcessHeap(), 0, p
->annotations
);
1824 static void d3d10_effect_technique_destroy(struct d3d10_effect_technique
*t
)
1828 TRACE("technique %p\n", t
);
1830 HeapFree(GetProcessHeap(), 0, t
->name
);
1833 for (i
= 0; i
< t
->pass_count
; ++i
)
1835 d3d10_effect_pass_destroy(&t
->passes
[i
]);
1837 HeapFree(GetProcessHeap(), 0, t
->passes
);
1842 for (i
= 0; i
< t
->annotation_count
; ++i
)
1844 d3d10_effect_variable_destroy(&t
->annotations
[i
]);
1846 HeapFree(GetProcessHeap(), 0, t
->annotations
);
1850 static void d3d10_effect_local_buffer_destroy(struct d3d10_effect_variable
*l
)
1854 TRACE("local buffer %p.\n", l
);
1856 HeapFree(GetProcessHeap(), 0, l
->name
);
1859 for (i
= 0; i
< l
->type
->member_count
; ++i
)
1861 d3d10_effect_variable_destroy(&l
->members
[i
]);
1863 HeapFree(GetProcessHeap(), 0, l
->members
);
1866 if (l
->type
->members
)
1868 for (i
= 0; i
< l
->type
->member_count
; ++i
)
1870 /* Do not release l->type->members[i].type, it will be covered by d3d10_effect_type_destroy(). */
1871 HeapFree(GetProcessHeap(), 0, l
->type
->members
[i
].semantic
);
1872 HeapFree(GetProcessHeap(), 0, l
->type
->members
[i
].name
);
1874 HeapFree(GetProcessHeap(), 0, l
->type
->members
);
1876 HeapFree(GetProcessHeap(), 0, l
->type
->name
);
1877 HeapFree(GetProcessHeap(), 0, l
->type
);
1881 for (i
= 0; i
< l
->annotation_count
; ++i
)
1883 d3d10_effect_variable_destroy(&l
->annotations
[i
]);
1885 HeapFree(GetProcessHeap(), 0, l
->annotations
);
1889 /* IUnknown methods */
1891 static inline struct d3d10_effect
*impl_from_ID3D10Effect(ID3D10Effect
*iface
)
1893 return CONTAINING_RECORD(iface
, struct d3d10_effect
, ID3D10Effect_iface
);
1896 static HRESULT STDMETHODCALLTYPE
d3d10_effect_QueryInterface(ID3D10Effect
*iface
, REFIID riid
, void **object
)
1898 TRACE("iface %p, riid %s, object %p\n", iface
, debugstr_guid(riid
), object
);
1900 if (IsEqualGUID(riid
, &IID_ID3D10Effect
)
1901 || IsEqualGUID(riid
, &IID_IUnknown
))
1903 IUnknown_AddRef(iface
);
1908 WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid
));
1911 return E_NOINTERFACE
;
1914 static ULONG STDMETHODCALLTYPE
d3d10_effect_AddRef(ID3D10Effect
*iface
)
1916 struct d3d10_effect
*This
= impl_from_ID3D10Effect(iface
);
1917 ULONG refcount
= InterlockedIncrement(&This
->refcount
);
1919 TRACE("%p increasing refcount to %u\n", This
, refcount
);
1924 static ULONG STDMETHODCALLTYPE
d3d10_effect_Release(ID3D10Effect
*iface
)
1926 struct d3d10_effect
*This
= impl_from_ID3D10Effect(iface
);
1927 ULONG refcount
= InterlockedDecrement(&This
->refcount
);
1929 TRACE("%p decreasing refcount to %u\n", This
, refcount
);
1935 if (This
->techniques
)
1937 for (i
= 0; i
< This
->technique_count
; ++i
)
1939 d3d10_effect_technique_destroy(&This
->techniques
[i
]);
1941 HeapFree(GetProcessHeap(), 0, This
->techniques
);
1944 if (This
->local_variables
)
1946 for (i
= 0; i
< This
->local_variable_count
; ++i
)
1948 d3d10_effect_variable_destroy(&This
->local_variables
[i
]);
1950 HeapFree(GetProcessHeap(), 0, This
->local_variables
);
1953 if (This
->local_buffers
)
1955 for (i
= 0; i
< This
->local_buffer_count
; ++i
)
1957 d3d10_effect_local_buffer_destroy(&This
->local_buffers
[i
]);
1959 HeapFree(GetProcessHeap(), 0, This
->local_buffers
);
1962 if (This
->anonymous_shaders
)
1964 for (i
= 0; i
< This
->anonymous_shader_count
; ++i
)
1966 d3d10_effect_variable_destroy(&This
->anonymous_shaders
[i
].shader
);
1967 HeapFree(GetProcessHeap(), 0, This
->anonymous_shaders
[i
].type
.name
);
1969 HeapFree(GetProcessHeap(), 0, This
->anonymous_shaders
);
1972 HeapFree(GetProcessHeap(), 0, This
->used_shaders
);
1974 wine_rb_destroy(&This
->types
, d3d10_effect_type_destroy
, NULL
);
1976 ID3D10Device_Release(This
->device
);
1977 HeapFree(GetProcessHeap(), 0, This
);
1983 /* ID3D10Effect methods */
1985 static BOOL STDMETHODCALLTYPE
d3d10_effect_IsValid(ID3D10Effect
*iface
)
1987 FIXME("iface %p stub!\n", iface
);
1992 static BOOL STDMETHODCALLTYPE
d3d10_effect_IsPool(ID3D10Effect
*iface
)
1994 FIXME("iface %p stub!\n", iface
);
1999 static HRESULT STDMETHODCALLTYPE
d3d10_effect_GetDevice(ID3D10Effect
*iface
, ID3D10Device
**device
)
2001 struct d3d10_effect
*This
= impl_from_ID3D10Effect(iface
);
2003 TRACE("iface %p, device %p\n", iface
, device
);
2005 ID3D10Device_AddRef(This
->device
);
2006 *device
= This
->device
;
2011 static HRESULT STDMETHODCALLTYPE
d3d10_effect_GetDesc(ID3D10Effect
*iface
, D3D10_EFFECT_DESC
*desc
)
2013 FIXME("iface %p, desc %p stub!\n", iface
, desc
);
2018 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_GetConstantBufferByIndex(ID3D10Effect
*iface
,
2021 struct d3d10_effect
*This
= impl_from_ID3D10Effect(iface
);
2022 struct d3d10_effect_variable
*l
;
2024 TRACE("iface %p, index %u\n", iface
, index
);
2026 if (index
>= This
->local_buffer_count
)
2028 WARN("Invalid index specified\n");
2029 return (ID3D10EffectConstantBuffer
*)&null_local_buffer
;
2032 l
= &This
->local_buffers
[index
];
2034 TRACE("Returning buffer %p, %s.\n", l
, debugstr_a(l
->name
));
2036 return (ID3D10EffectConstantBuffer
*)l
;
2039 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_GetConstantBufferByName(ID3D10Effect
*iface
,
2042 struct d3d10_effect
*This
= impl_from_ID3D10Effect(iface
);
2045 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2047 for (i
= 0; i
< This
->local_buffer_count
; ++i
)
2049 struct d3d10_effect_variable
*l
= &This
->local_buffers
[i
];
2051 if (!strcmp(l
->name
, name
))
2053 TRACE("Returning buffer %p.\n", l
);
2054 return (ID3D10EffectConstantBuffer
*)l
;
2058 WARN("Invalid name specified\n");
2060 return (ID3D10EffectConstantBuffer
*)&null_local_buffer
;
2063 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_GetVariableByIndex(ID3D10Effect
*iface
, UINT index
)
2065 struct d3d10_effect
*This
= impl_from_ID3D10Effect(iface
);
2068 TRACE("iface %p, index %u\n", iface
, index
);
2070 for (i
= 0; i
< This
->local_buffer_count
; ++i
)
2072 struct d3d10_effect_variable
*l
= &This
->local_buffers
[i
];
2074 if (index
< l
->type
->member_count
)
2076 struct d3d10_effect_variable
*v
= &l
->members
[index
];
2078 TRACE("Returning variable %p.\n", v
);
2079 return (ID3D10EffectVariable
*)v
;
2081 index
-= l
->type
->member_count
;
2084 if (index
< This
->local_variable_count
)
2086 struct d3d10_effect_variable
*v
= &This
->local_variables
[index
];
2088 TRACE("Returning variable %p.\n", v
);
2089 return (ID3D10EffectVariable
*)v
;
2092 WARN("Invalid index specified\n");
2094 return (ID3D10EffectVariable
*)&null_variable
;
2097 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_GetVariableByName(ID3D10Effect
*iface
, LPCSTR name
)
2099 struct d3d10_effect
*This
= impl_from_ID3D10Effect(iface
);
2102 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2106 WARN("Invalid name specified\n");
2107 return (ID3D10EffectVariable
*)&null_variable
;
2110 for (i
= 0; i
< This
->local_buffer_count
; ++i
)
2112 struct d3d10_effect_variable
*l
= &This
->local_buffers
[i
];
2115 for (j
= 0; j
< l
->type
->member_count
; ++j
)
2117 struct d3d10_effect_variable
*v
= &l
->members
[j
];
2119 if (!strcmp(v
->name
, name
))
2121 TRACE("Returning variable %p.\n", v
);
2122 return (ID3D10EffectVariable
*)v
;
2127 for (i
= 0; i
< This
->local_variable_count
; ++i
)
2129 struct d3d10_effect_variable
*v
= &This
->local_variables
[i
];
2131 if (!strcmp(v
->name
, name
))
2133 TRACE("Returning variable %p.\n", v
);
2134 return (ID3D10EffectVariable
*)v
;
2138 WARN("Invalid name specified\n");
2140 return (ID3D10EffectVariable
*)&null_variable
;
2143 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_GetVariableBySemantic(ID3D10Effect
*iface
,
2146 struct d3d10_effect
*This
= impl_from_ID3D10Effect(iface
);
2149 TRACE("iface %p, semantic %s\n", iface
, debugstr_a(semantic
));
2153 WARN("Invalid semantic specified\n");
2154 return (ID3D10EffectVariable
*)&null_variable
;
2157 for (i
= 0; i
< This
->local_buffer_count
; ++i
)
2159 struct d3d10_effect_variable
*l
= &This
->local_buffers
[i
];
2162 for (j
= 0; j
< l
->type
->member_count
; ++j
)
2164 struct d3d10_effect_variable
*v
= &l
->members
[j
];
2166 if (!strcmp(v
->semantic
, semantic
))
2168 TRACE("Returning variable %p.\n", v
);
2169 return (ID3D10EffectVariable
*)v
;
2174 for (i
= 0; i
< This
->local_variable_count
; ++i
)
2176 struct d3d10_effect_variable
*v
= &This
->local_variables
[i
];
2178 if (!strcmp(v
->semantic
, semantic
))
2180 TRACE("Returning variable %p.\n", v
);
2181 return (ID3D10EffectVariable
*)v
;
2185 WARN("Invalid semantic specified\n");
2187 return (ID3D10EffectVariable
*)&null_variable
;
2190 static struct ID3D10EffectTechnique
* STDMETHODCALLTYPE
d3d10_effect_GetTechniqueByIndex(ID3D10Effect
*iface
,
2193 struct d3d10_effect
*This
= impl_from_ID3D10Effect(iface
);
2194 struct d3d10_effect_technique
*t
;
2196 TRACE("iface %p, index %u\n", iface
, index
);
2198 if (index
>= This
->technique_count
)
2200 WARN("Invalid index specified\n");
2201 return &null_technique
.ID3D10EffectTechnique_iface
;
2204 t
= &This
->techniques
[index
];
2206 TRACE("Returning technique %p, %s.\n", t
, debugstr_a(t
->name
));
2208 return &t
->ID3D10EffectTechnique_iface
;
2211 static struct ID3D10EffectTechnique
* STDMETHODCALLTYPE
d3d10_effect_GetTechniqueByName(ID3D10Effect
*iface
,
2214 struct d3d10_effect
*This
= impl_from_ID3D10Effect(iface
);
2217 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2221 WARN("Invalid name specified\n");
2222 return &null_technique
.ID3D10EffectTechnique_iface
;
2225 for (i
= 0; i
< This
->technique_count
; ++i
)
2227 struct d3d10_effect_technique
*t
= &This
->techniques
[i
];
2228 if (!strcmp(t
->name
, name
))
2230 TRACE("Returning technique %p\n", t
);
2231 return &t
->ID3D10EffectTechnique_iface
;
2235 WARN("Invalid name specified\n");
2237 return &null_technique
.ID3D10EffectTechnique_iface
;
2240 static HRESULT STDMETHODCALLTYPE
d3d10_effect_Optimize(ID3D10Effect
*iface
)
2242 FIXME("iface %p stub!\n", iface
);
2247 static BOOL STDMETHODCALLTYPE
d3d10_effect_IsOptimized(ID3D10Effect
*iface
)
2249 FIXME("iface %p stub!\n", iface
);
2254 const struct ID3D10EffectVtbl d3d10_effect_vtbl
=
2256 /* IUnknown methods */
2257 d3d10_effect_QueryInterface
,
2258 d3d10_effect_AddRef
,
2259 d3d10_effect_Release
,
2260 /* ID3D10Effect methods */
2261 d3d10_effect_IsValid
,
2262 d3d10_effect_IsPool
,
2263 d3d10_effect_GetDevice
,
2264 d3d10_effect_GetDesc
,
2265 d3d10_effect_GetConstantBufferByIndex
,
2266 d3d10_effect_GetConstantBufferByName
,
2267 d3d10_effect_GetVariableByIndex
,
2268 d3d10_effect_GetVariableByName
,
2269 d3d10_effect_GetVariableBySemantic
,
2270 d3d10_effect_GetTechniqueByIndex
,
2271 d3d10_effect_GetTechniqueByName
,
2272 d3d10_effect_Optimize
,
2273 d3d10_effect_IsOptimized
,
2276 /* ID3D10EffectTechnique methods */
2278 static inline struct d3d10_effect_technique
*impl_from_ID3D10EffectTechnique(ID3D10EffectTechnique
*iface
)
2280 return CONTAINING_RECORD(iface
, struct d3d10_effect_technique
, ID3D10EffectTechnique_iface
);
2283 static BOOL STDMETHODCALLTYPE
d3d10_effect_technique_IsValid(ID3D10EffectTechnique
*iface
)
2285 struct d3d10_effect_technique
*This
= impl_from_ID3D10EffectTechnique(iface
);
2287 TRACE("iface %p\n", iface
);
2289 return This
!= &null_technique
;
2292 static HRESULT STDMETHODCALLTYPE
d3d10_effect_technique_GetDesc(ID3D10EffectTechnique
*iface
,
2293 D3D10_TECHNIQUE_DESC
*desc
)
2295 struct d3d10_effect_technique
*This
= impl_from_ID3D10EffectTechnique(iface
);
2297 TRACE("iface %p, desc %p\n", iface
, desc
);
2299 if(This
== &null_technique
)
2301 WARN("Null technique specified\n");
2307 WARN("Invalid argument specified\n");
2308 return E_INVALIDARG
;
2311 desc
->Name
= This
->name
;
2312 desc
->Passes
= This
->pass_count
;
2313 desc
->Annotations
= This
->annotation_count
;
2318 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_technique_GetAnnotationByIndex(
2319 ID3D10EffectTechnique
*iface
, UINT index
)
2321 struct d3d10_effect_technique
*This
= impl_from_ID3D10EffectTechnique(iface
);
2322 struct d3d10_effect_variable
*a
;
2324 TRACE("iface %p, index %u\n", iface
, index
);
2326 if (index
>= This
->annotation_count
)
2328 WARN("Invalid index specified\n");
2329 return (ID3D10EffectVariable
*)&null_variable
;
2332 a
= &This
->annotations
[index
];
2334 TRACE("Returning annotation %p, %s\n", a
, debugstr_a(a
->name
));
2336 return (ID3D10EffectVariable
*)a
;
2339 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_technique_GetAnnotationByName(
2340 ID3D10EffectTechnique
*iface
, LPCSTR name
)
2342 struct d3d10_effect_technique
*This
= impl_from_ID3D10EffectTechnique(iface
);
2345 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2347 for (i
= 0; i
< This
->annotation_count
; ++i
)
2349 struct d3d10_effect_variable
*a
= &This
->annotations
[i
];
2350 if (!strcmp(a
->name
, name
))
2352 TRACE("Returning annotation %p\n", a
);
2353 return (ID3D10EffectVariable
*)a
;
2357 WARN("Invalid name specified\n");
2359 return (ID3D10EffectVariable
*)&null_variable
;
2362 static struct ID3D10EffectPass
* STDMETHODCALLTYPE
d3d10_effect_technique_GetPassByIndex(ID3D10EffectTechnique
*iface
,
2365 struct d3d10_effect_technique
*This
= impl_from_ID3D10EffectTechnique(iface
);
2366 struct d3d10_effect_pass
*p
;
2368 TRACE("iface %p, index %u\n", iface
, index
);
2370 if (index
>= This
->pass_count
)
2372 WARN("Invalid index specified\n");
2373 return &null_pass
.ID3D10EffectPass_iface
;
2376 p
= &This
->passes
[index
];
2378 TRACE("Returning pass %p, %s.\n", p
, debugstr_a(p
->name
));
2380 return &p
->ID3D10EffectPass_iface
;
2383 static struct ID3D10EffectPass
* STDMETHODCALLTYPE
d3d10_effect_technique_GetPassByName(ID3D10EffectTechnique
*iface
,
2386 struct d3d10_effect_technique
*This
= impl_from_ID3D10EffectTechnique(iface
);
2389 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2391 /* Do not check for name==NULL, W7/DX10 crashes in that case. */
2393 for (i
= 0; i
< This
->pass_count
; ++i
)
2395 struct d3d10_effect_pass
*p
= &This
->passes
[i
];
2396 if (!strcmp(p
->name
, name
))
2398 TRACE("Returning pass %p\n", p
);
2399 return &p
->ID3D10EffectPass_iface
;
2403 WARN("Invalid name specified\n");
2405 return &null_pass
.ID3D10EffectPass_iface
;
2408 static HRESULT STDMETHODCALLTYPE
d3d10_effect_technique_ComputeStateBlockMask(ID3D10EffectTechnique
*iface
,
2409 D3D10_STATE_BLOCK_MASK
*mask
)
2411 FIXME("iface %p,mask %p stub!\n", iface
, mask
);
2416 static const struct ID3D10EffectTechniqueVtbl d3d10_effect_technique_vtbl
=
2418 /* ID3D10EffectTechnique methods */
2419 d3d10_effect_technique_IsValid
,
2420 d3d10_effect_technique_GetDesc
,
2421 d3d10_effect_technique_GetAnnotationByIndex
,
2422 d3d10_effect_technique_GetAnnotationByName
,
2423 d3d10_effect_technique_GetPassByIndex
,
2424 d3d10_effect_technique_GetPassByName
,
2425 d3d10_effect_technique_ComputeStateBlockMask
,
2428 /* ID3D10EffectPass methods */
2430 static inline struct d3d10_effect_pass
*impl_from_ID3D10EffectPass(ID3D10EffectPass
*iface
)
2432 return CONTAINING_RECORD(iface
, struct d3d10_effect_pass
, ID3D10EffectPass_iface
);
2435 static BOOL STDMETHODCALLTYPE
d3d10_effect_pass_IsValid(ID3D10EffectPass
*iface
)
2437 struct d3d10_effect_pass
*This
= impl_from_ID3D10EffectPass(iface
);
2439 TRACE("iface %p\n", iface
);
2441 return This
!= &null_pass
;
2444 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_GetDesc(ID3D10EffectPass
*iface
,
2445 D3D10_PASS_DESC
*desc
)
2447 struct d3d10_effect_pass
*This
= impl_from_ID3D10EffectPass(iface
);
2450 FIXME("iface %p, desc %p partial stub!\n", iface
, desc
);
2452 if(This
== &null_pass
)
2454 WARN("Null pass specified\n");
2460 WARN("Invalid argument specified\n");
2461 return E_INVALIDARG
;
2464 memset(desc
, 0, sizeof(*desc
));
2465 desc
->Name
= This
->name
;
2466 for (i
= 0; i
< This
->object_count
; ++i
)
2468 struct d3d10_effect_object
*o
= &This
->objects
[i
];
2469 if (o
->type
== D3D10_EOT_VERTEXSHADER
)
2471 struct d3d10_effect_variable
*v
= o
->data
;
2472 struct d3d10_effect_shader_variable
*s
= v
->data
;
2473 desc
->pIAInputSignature
= (BYTE
*)s
->input_signature
.signature
;
2474 desc
->IAInputSignatureSize
= s
->input_signature
.signature_size
;
2482 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_GetVertexShaderDesc(ID3D10EffectPass
*iface
,
2483 D3D10_PASS_SHADER_DESC
*desc
)
2485 struct d3d10_effect_pass
*This
= impl_from_ID3D10EffectPass(iface
);
2488 TRACE("iface %p, desc %p\n", iface
, desc
);
2490 if (This
== &null_pass
)
2492 WARN("Null pass specified\n");
2498 WARN("Invalid argument specified\n");
2499 return E_INVALIDARG
;
2502 for (i
= 0; i
< This
->object_count
; ++i
)
2504 struct d3d10_effect_object
*o
= &This
->objects
[i
];
2506 if (o
->type
== D3D10_EOT_VERTEXSHADER
)
2508 desc
->pShaderVariable
= o
->data
;
2509 desc
->ShaderIndex
= o
->index
;
2514 TRACE("Returning null_shader_variable\n");
2515 desc
->pShaderVariable
= (ID3D10EffectShaderVariable
*)&null_shader_variable
;
2516 desc
->ShaderIndex
= 0;
2521 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_GetGeometryShaderDesc(ID3D10EffectPass
*iface
,
2522 D3D10_PASS_SHADER_DESC
*desc
)
2524 struct d3d10_effect_pass
*This
= impl_from_ID3D10EffectPass(iface
);
2527 TRACE("iface %p, desc %p\n", iface
, desc
);
2529 if (This
== &null_pass
)
2531 WARN("Null pass specified\n");
2537 WARN("Invalid argument specified\n");
2538 return E_INVALIDARG
;
2541 for (i
= 0; i
< This
->object_count
; ++i
)
2543 struct d3d10_effect_object
*o
= &This
->objects
[i
];
2545 if (o
->type
== D3D10_EOT_GEOMETRYSHADER
)
2547 desc
->pShaderVariable
= o
->data
;
2548 desc
->ShaderIndex
= o
->index
;
2553 TRACE("Returning null_shader_variable\n");
2554 desc
->pShaderVariable
= (ID3D10EffectShaderVariable
*)&null_shader_variable
;
2555 desc
->ShaderIndex
= 0;
2560 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_GetPixelShaderDesc(ID3D10EffectPass
*iface
,
2561 D3D10_PASS_SHADER_DESC
*desc
)
2563 struct d3d10_effect_pass
*This
= impl_from_ID3D10EffectPass(iface
);
2566 TRACE("iface %p, desc %p\n", iface
, desc
);
2568 if (This
== &null_pass
)
2570 WARN("Null pass specified\n");
2576 WARN("Invalid argument specified\n");
2577 return E_INVALIDARG
;
2580 for (i
= 0; i
< This
->object_count
; ++i
)
2582 struct d3d10_effect_object
*o
= &This
->objects
[i
];
2584 if (o
->type
== D3D10_EOT_PIXELSHADER
)
2586 desc
->pShaderVariable
= o
->data
;
2587 desc
->ShaderIndex
= o
->index
;
2592 TRACE("Returning null_shader_variable\n");
2593 desc
->pShaderVariable
= (ID3D10EffectShaderVariable
*)&null_shader_variable
;
2594 desc
->ShaderIndex
= 0;
2599 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_pass_GetAnnotationByIndex(ID3D10EffectPass
*iface
,
2602 struct d3d10_effect_pass
*This
= impl_from_ID3D10EffectPass(iface
);
2603 struct d3d10_effect_variable
*a
;
2605 TRACE("iface %p, index %u\n", iface
, index
);
2607 if (index
>= This
->annotation_count
)
2609 WARN("Invalid index specified\n");
2610 return (ID3D10EffectVariable
*)&null_variable
;
2613 a
= &This
->annotations
[index
];
2615 TRACE("Returning annotation %p, %s\n", a
, debugstr_a(a
->name
));
2617 return (ID3D10EffectVariable
*)a
;
2620 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_pass_GetAnnotationByName(ID3D10EffectPass
*iface
,
2623 struct d3d10_effect_pass
*This
= impl_from_ID3D10EffectPass(iface
);
2626 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2628 for (i
= 0; i
< This
->annotation_count
; ++i
)
2630 struct d3d10_effect_variable
*a
= &This
->annotations
[i
];
2631 if (!strcmp(a
->name
, name
))
2633 TRACE("Returning annotation %p\n", a
);
2634 return (ID3D10EffectVariable
*)a
;
2638 WARN("Invalid name specified\n");
2640 return (ID3D10EffectVariable
*)&null_variable
;
2643 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_Apply(ID3D10EffectPass
*iface
, UINT flags
)
2645 struct d3d10_effect_pass
*This
= impl_from_ID3D10EffectPass(iface
);
2649 TRACE("iface %p, flags %#x\n", iface
, flags
);
2651 if (flags
) FIXME("Ignoring flags (%#x)\n", flags
);
2653 for (i
= 0; i
< This
->object_count
; ++i
)
2655 hr
= d3d10_effect_object_apply(&This
->objects
[i
]);
2656 if (FAILED(hr
)) break;
2662 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_ComputeStateBlockMask(ID3D10EffectPass
*iface
,
2663 D3D10_STATE_BLOCK_MASK
*mask
)
2665 FIXME("iface %p, mask %p stub!\n", iface
, mask
);
2670 static const struct ID3D10EffectPassVtbl d3d10_effect_pass_vtbl
=
2672 /* ID3D10EffectPass methods */
2673 d3d10_effect_pass_IsValid
,
2674 d3d10_effect_pass_GetDesc
,
2675 d3d10_effect_pass_GetVertexShaderDesc
,
2676 d3d10_effect_pass_GetGeometryShaderDesc
,
2677 d3d10_effect_pass_GetPixelShaderDesc
,
2678 d3d10_effect_pass_GetAnnotationByIndex
,
2679 d3d10_effect_pass_GetAnnotationByName
,
2680 d3d10_effect_pass_Apply
,
2681 d3d10_effect_pass_ComputeStateBlockMask
,
2684 /* ID3D10EffectVariable methods */
2686 static BOOL STDMETHODCALLTYPE
d3d10_effect_variable_IsValid(ID3D10EffectVariable
*iface
)
2688 TRACE("iface %p\n", iface
);
2690 return (struct d3d10_effect_variable
*)iface
!= &null_variable
;
2693 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_variable_GetType(ID3D10EffectVariable
*iface
)
2695 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2697 TRACE("iface %p\n", iface
);
2699 return &This
->type
->ID3D10EffectType_iface
;
2702 static HRESULT STDMETHODCALLTYPE
d3d10_effect_variable_GetDesc(ID3D10EffectVariable
*iface
,
2703 D3D10_EFFECT_VARIABLE_DESC
*desc
)
2705 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2707 TRACE("iface %p, desc %p\n", iface
, desc
);
2709 if (!iface
->lpVtbl
->IsValid(iface
))
2711 WARN("Null variable specified\n");
2717 WARN("Invalid argument specified\n");
2718 return E_INVALIDARG
;
2721 /* FIXME: This isn't correct. Anonymous shaders let desc->ExplicitBindPoint untouched, but normal shaders set it! */
2722 memset(desc
, 0, sizeof(*desc
));
2723 desc
->Name
= This
->name
;
2724 desc
->Semantic
= This
->semantic
;
2725 desc
->Flags
= This
->flag
;
2726 desc
->Annotations
= This
->annotation_count
;
2727 desc
->BufferOffset
= This
->buffer_offset
;
2729 if (This
->flag
& D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT
)
2731 desc
->ExplicitBindPoint
= This
->buffer_offset
;
2737 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetAnnotationByIndex(
2738 ID3D10EffectVariable
*iface
, UINT index
)
2740 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2741 struct d3d10_effect_variable
*a
;
2743 TRACE("iface %p, index %u\n", iface
, index
);
2745 if (index
>= This
->annotation_count
)
2747 WARN("Invalid index specified\n");
2748 return (ID3D10EffectVariable
*)&null_variable
;
2751 a
= &This
->annotations
[index
];
2753 TRACE("Returning annotation %p, %s\n", a
, debugstr_a(a
->name
));
2755 return (ID3D10EffectVariable
*)a
;
2758 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetAnnotationByName(
2759 ID3D10EffectVariable
*iface
, LPCSTR name
)
2761 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2764 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2766 for (i
= 0; i
< This
->annotation_count
; ++i
)
2768 struct d3d10_effect_variable
*a
= &This
->annotations
[i
];
2769 if (!strcmp(a
->name
, name
))
2771 TRACE("Returning annotation %p\n", a
);
2772 return (ID3D10EffectVariable
*)a
;
2776 WARN("Invalid name specified\n");
2778 return (ID3D10EffectVariable
*)&null_variable
;
2781 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetMemberByIndex(
2782 ID3D10EffectVariable
*iface
, UINT index
)
2784 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2785 struct d3d10_effect_variable
*m
;
2787 TRACE("iface %p, index %u\n", iface
, index
);
2789 if (index
>= This
->type
->member_count
)
2791 WARN("Invalid index specified\n");
2792 return (ID3D10EffectVariable
*)&null_variable
;
2795 m
= &This
->members
[index
];
2797 TRACE("Returning member %p, %s\n", m
, debugstr_a(m
->name
));
2799 return (ID3D10EffectVariable
*)m
;
2802 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetMemberByName(
2803 ID3D10EffectVariable
*iface
, LPCSTR name
)
2805 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2808 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2812 WARN("Invalid name specified\n");
2813 return (ID3D10EffectVariable
*)&null_variable
;
2816 for (i
= 0; i
< This
->type
->member_count
; ++i
)
2818 struct d3d10_effect_variable
*m
= &This
->members
[i
];
2822 if (!strcmp(m
->name
, name
))
2824 TRACE("Returning member %p\n", m
);
2825 return (ID3D10EffectVariable
*)m
;
2830 WARN("Invalid name specified\n");
2832 return (ID3D10EffectVariable
*)&null_variable
;
2835 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetMemberBySemantic(
2836 ID3D10EffectVariable
*iface
, LPCSTR semantic
)
2838 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2841 TRACE("iface %p, semantic %s.\n", iface
, debugstr_a(semantic
));
2845 WARN("Invalid semantic specified\n");
2846 return (ID3D10EffectVariable
*)&null_variable
;
2849 for (i
= 0; i
< This
->type
->member_count
; ++i
)
2851 struct d3d10_effect_variable
*m
= &This
->members
[i
];
2855 if (!strcmp(m
->semantic
, semantic
))
2857 TRACE("Returning member %p\n", m
);
2858 return (ID3D10EffectVariable
*)m
;
2863 WARN("Invalid semantic specified\n");
2865 return (ID3D10EffectVariable
*)&null_variable
;
2868 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetElement(
2869 ID3D10EffectVariable
*iface
, UINT index
)
2871 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2872 struct d3d10_effect_variable
*v
;
2874 TRACE("iface %p, index %u\n", iface
, index
);
2876 if (index
>= This
->type
->element_count
)
2878 WARN("Invalid index specified\n");
2879 return (ID3D10EffectVariable
*)&null_variable
;
2882 v
= &This
->elements
[index
];
2884 TRACE("Returning element %p, %s\n", v
, debugstr_a(v
->name
));
2886 return (ID3D10EffectVariable
*)v
;
2889 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_variable_GetParentConstantBuffer(
2890 ID3D10EffectVariable
*iface
)
2892 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2894 TRACE("iface %p\n", iface
);
2896 return (ID3D10EffectConstantBuffer
*)This
->buffer
;
2899 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsScalar(
2900 ID3D10EffectVariable
*iface
)
2902 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2904 TRACE("iface %p\n", iface
);
2906 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_scalar_variable_vtbl
)
2907 return (ID3D10EffectScalarVariable
*)This
;
2909 return (ID3D10EffectScalarVariable
*)&null_scalar_variable
;
2912 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsVector(
2913 ID3D10EffectVariable
*iface
)
2915 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2917 TRACE("iface %p\n", iface
);
2919 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_vector_variable_vtbl
)
2920 return (ID3D10EffectVectorVariable
*)This
;
2922 return (ID3D10EffectVectorVariable
*)&null_vector_variable
;
2925 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsMatrix(
2926 ID3D10EffectVariable
*iface
)
2928 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2930 TRACE("iface %p\n", iface
);
2932 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_matrix_variable_vtbl
)
2933 return (ID3D10EffectMatrixVariable
*)This
;
2935 return (ID3D10EffectMatrixVariable
*)&null_matrix_variable
;
2938 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsString(
2939 ID3D10EffectVariable
*iface
)
2941 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2943 TRACE("iface %p\n", iface
);
2945 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_string_variable_vtbl
)
2946 return (ID3D10EffectStringVariable
*)This
;
2948 return (ID3D10EffectStringVariable
*)&null_string_variable
;
2951 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsShaderResource(
2952 ID3D10EffectVariable
*iface
)
2954 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2956 TRACE("iface %p\n", iface
);
2958 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_resource_variable_vtbl
)
2959 return (ID3D10EffectShaderResourceVariable
*)This
;
2961 return (ID3D10EffectShaderResourceVariable
*)&null_shader_resource_variable
;
2964 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsRenderTargetView(
2965 ID3D10EffectVariable
*iface
)
2967 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2969 TRACE("iface %p\n", iface
);
2971 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_render_target_view_variable_vtbl
)
2972 return (ID3D10EffectRenderTargetViewVariable
*)This
;
2974 return (ID3D10EffectRenderTargetViewVariable
*)&null_render_target_view_variable
;
2977 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsDepthStencilView(
2978 ID3D10EffectVariable
*iface
)
2980 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2982 TRACE("iface %p\n", iface
);
2984 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_depth_stencil_view_variable_vtbl
)
2985 return (ID3D10EffectDepthStencilViewVariable
*)This
;
2987 return (ID3D10EffectDepthStencilViewVariable
*)&null_depth_stencil_view_variable
;
2990 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_variable_AsConstantBuffer(
2991 ID3D10EffectVariable
*iface
)
2993 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2995 TRACE("iface %p\n", iface
);
2997 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_constant_buffer_vtbl
)
2998 return (ID3D10EffectConstantBuffer
*)This
;
3000 return (ID3D10EffectConstantBuffer
*)&null_local_buffer
;
3003 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsShader(
3004 ID3D10EffectVariable
*iface
)
3006 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
3008 TRACE("iface %p\n", iface
);
3010 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_variable_vtbl
)
3011 return (ID3D10EffectShaderVariable
*)This
;
3013 return (ID3D10EffectShaderVariable
*)&null_shader_variable
;
3016 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsBlend(ID3D10EffectVariable
*iface
)
3018 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
3020 TRACE("iface %p\n", iface
);
3022 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_blend_variable_vtbl
)
3023 return (ID3D10EffectBlendVariable
*)This
;
3025 return (ID3D10EffectBlendVariable
*)&null_blend_variable
;
3028 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsDepthStencil(
3029 ID3D10EffectVariable
*iface
)
3031 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
3033 TRACE("iface %p\n", iface
);
3035 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_depth_stencil_variable_vtbl
)
3036 return (ID3D10EffectDepthStencilVariable
*)This
;
3038 return (ID3D10EffectDepthStencilVariable
*)&null_depth_stencil_variable
;
3041 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsRasterizer(
3042 ID3D10EffectVariable
*iface
)
3044 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
3046 TRACE("iface %p\n", iface
);
3048 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_rasterizer_variable_vtbl
)
3049 return (ID3D10EffectRasterizerVariable
*)This
;
3051 return (ID3D10EffectRasterizerVariable
*)&null_rasterizer_variable
;
3054 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsSampler(
3055 ID3D10EffectVariable
*iface
)
3057 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
3059 TRACE("iface %p\n", iface
);
3061 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_sampler_variable_vtbl
)
3062 return (ID3D10EffectSamplerVariable
*)This
;
3064 return (ID3D10EffectSamplerVariable
*)&null_sampler_variable
;
3067 static HRESULT STDMETHODCALLTYPE
d3d10_effect_variable_SetRawValue(ID3D10EffectVariable
*iface
,
3068 void *data
, UINT offset
, UINT count
)
3070 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
3075 static HRESULT STDMETHODCALLTYPE
d3d10_effect_variable_GetRawValue(ID3D10EffectVariable
*iface
,
3076 void *data
, UINT offset
, UINT count
)
3078 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
3083 static const struct ID3D10EffectVariableVtbl d3d10_effect_variable_vtbl
=
3085 /* ID3D10EffectVariable methods */
3086 d3d10_effect_variable_IsValid
,
3087 d3d10_effect_variable_GetType
,
3088 d3d10_effect_variable_GetDesc
,
3089 d3d10_effect_variable_GetAnnotationByIndex
,
3090 d3d10_effect_variable_GetAnnotationByName
,
3091 d3d10_effect_variable_GetMemberByIndex
,
3092 d3d10_effect_variable_GetMemberByName
,
3093 d3d10_effect_variable_GetMemberBySemantic
,
3094 d3d10_effect_variable_GetElement
,
3095 d3d10_effect_variable_GetParentConstantBuffer
,
3096 d3d10_effect_variable_AsScalar
,
3097 d3d10_effect_variable_AsVector
,
3098 d3d10_effect_variable_AsMatrix
,
3099 d3d10_effect_variable_AsString
,
3100 d3d10_effect_variable_AsShaderResource
,
3101 d3d10_effect_variable_AsRenderTargetView
,
3102 d3d10_effect_variable_AsDepthStencilView
,
3103 d3d10_effect_variable_AsConstantBuffer
,
3104 d3d10_effect_variable_AsShader
,
3105 d3d10_effect_variable_AsBlend
,
3106 d3d10_effect_variable_AsDepthStencil
,
3107 d3d10_effect_variable_AsRasterizer
,
3108 d3d10_effect_variable_AsSampler
,
3109 d3d10_effect_variable_SetRawValue
,
3110 d3d10_effect_variable_GetRawValue
,
3113 /* ID3D10EffectVariable methods */
3114 static BOOL STDMETHODCALLTYPE
d3d10_effect_constant_buffer_IsValid(ID3D10EffectConstantBuffer
*iface
)
3116 TRACE("iface %p\n", iface
);
3118 return (struct d3d10_effect_variable
*)iface
!= &null_local_buffer
;
3121 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetType(ID3D10EffectConstantBuffer
*iface
)
3123 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
3126 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetDesc(ID3D10EffectConstantBuffer
*iface
,
3127 D3D10_EFFECT_VARIABLE_DESC
*desc
)
3129 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
3132 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetAnnotationByIndex(
3133 ID3D10EffectConstantBuffer
*iface
, UINT index
)
3135 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
3138 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetAnnotationByName(
3139 ID3D10EffectConstantBuffer
*iface
, LPCSTR name
)
3141 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
3144 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetMemberByIndex(
3145 ID3D10EffectConstantBuffer
*iface
, UINT index
)
3147 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
3150 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetMemberByName(
3151 ID3D10EffectConstantBuffer
*iface
, LPCSTR name
)
3153 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
3156 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetMemberBySemantic(
3157 ID3D10EffectConstantBuffer
*iface
, LPCSTR semantic
)
3159 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
3162 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetElement(
3163 ID3D10EffectConstantBuffer
*iface
, UINT index
)
3165 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
3168 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetParentConstantBuffer(
3169 ID3D10EffectConstantBuffer
*iface
)
3171 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
3174 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsScalar(
3175 ID3D10EffectConstantBuffer
*iface
)
3177 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
3180 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsVector(
3181 ID3D10EffectConstantBuffer
*iface
)
3183 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
3186 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsMatrix(
3187 ID3D10EffectConstantBuffer
*iface
)
3189 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
3192 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsString(
3193 ID3D10EffectConstantBuffer
*iface
)
3195 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
3198 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsShaderResource(
3199 ID3D10EffectConstantBuffer
*iface
)
3201 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
3204 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsRenderTargetView(
3205 ID3D10EffectConstantBuffer
*iface
)
3207 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
3210 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsDepthStencilView(
3211 ID3D10EffectConstantBuffer
*iface
)
3213 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
3216 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsConstantBuffer(
3217 ID3D10EffectConstantBuffer
*iface
)
3219 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
3222 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsShader(
3223 ID3D10EffectConstantBuffer
*iface
)
3225 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
3228 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsBlend(ID3D10EffectConstantBuffer
*iface
)
3230 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
3233 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsDepthStencil(
3234 ID3D10EffectConstantBuffer
*iface
)
3236 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
3239 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsRasterizer(
3240 ID3D10EffectConstantBuffer
*iface
)
3242 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
3245 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsSampler(
3246 ID3D10EffectConstantBuffer
*iface
)
3248 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
3251 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_SetRawValue(ID3D10EffectConstantBuffer
*iface
,
3252 void *data
, UINT offset
, UINT count
)
3254 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3257 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetRawValue(ID3D10EffectConstantBuffer
*iface
,
3258 void *data
, UINT offset
, UINT count
)
3260 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3263 /* ID3D10EffectConstantBuffer methods */
3264 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_SetConstantBuffer(ID3D10EffectConstantBuffer
*iface
,
3265 ID3D10Buffer
*buffer
)
3267 FIXME("iface %p, buffer %p stub!\n", iface
, buffer
);
3272 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetConstantBuffer(ID3D10EffectConstantBuffer
*iface
,
3273 ID3D10Buffer
**buffer
)
3275 FIXME("iface %p, buffer %p stub!\n", iface
, buffer
);
3280 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_SetTextureBuffer(ID3D10EffectConstantBuffer
*iface
,
3281 ID3D10ShaderResourceView
*view
)
3283 FIXME("iface %p, view %p stub!\n", iface
, view
);
3288 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetTextureBuffer(ID3D10EffectConstantBuffer
*iface
,
3289 ID3D10ShaderResourceView
**view
)
3291 FIXME("iface %p, view %p stub!\n", iface
, view
);
3296 static const struct ID3D10EffectConstantBufferVtbl d3d10_effect_constant_buffer_vtbl
=
3298 /* ID3D10EffectVariable methods */
3299 d3d10_effect_constant_buffer_IsValid
,
3300 d3d10_effect_constant_buffer_GetType
,
3301 d3d10_effect_constant_buffer_GetDesc
,
3302 d3d10_effect_constant_buffer_GetAnnotationByIndex
,
3303 d3d10_effect_constant_buffer_GetAnnotationByName
,
3304 d3d10_effect_constant_buffer_GetMemberByIndex
,
3305 d3d10_effect_constant_buffer_GetMemberByName
,
3306 d3d10_effect_constant_buffer_GetMemberBySemantic
,
3307 d3d10_effect_constant_buffer_GetElement
,
3308 d3d10_effect_constant_buffer_GetParentConstantBuffer
,
3309 d3d10_effect_constant_buffer_AsScalar
,
3310 d3d10_effect_constant_buffer_AsVector
,
3311 d3d10_effect_constant_buffer_AsMatrix
,
3312 d3d10_effect_constant_buffer_AsString
,
3313 d3d10_effect_constant_buffer_AsShaderResource
,
3314 d3d10_effect_constant_buffer_AsRenderTargetView
,
3315 d3d10_effect_constant_buffer_AsDepthStencilView
,
3316 d3d10_effect_constant_buffer_AsConstantBuffer
,
3317 d3d10_effect_constant_buffer_AsShader
,
3318 d3d10_effect_constant_buffer_AsBlend
,
3319 d3d10_effect_constant_buffer_AsDepthStencil
,
3320 d3d10_effect_constant_buffer_AsRasterizer
,
3321 d3d10_effect_constant_buffer_AsSampler
,
3322 d3d10_effect_constant_buffer_SetRawValue
,
3323 d3d10_effect_constant_buffer_GetRawValue
,
3324 /* ID3D10EffectConstantBuffer methods */
3325 d3d10_effect_constant_buffer_SetConstantBuffer
,
3326 d3d10_effect_constant_buffer_GetConstantBuffer
,
3327 d3d10_effect_constant_buffer_SetTextureBuffer
,
3328 d3d10_effect_constant_buffer_GetTextureBuffer
,
3331 /* ID3D10EffectVariable methods */
3333 static BOOL STDMETHODCALLTYPE
d3d10_effect_scalar_variable_IsValid(ID3D10EffectScalarVariable
*iface
)
3335 TRACE("iface %p\n", iface
);
3337 return (struct d3d10_effect_variable
*)iface
!= &null_scalar_variable
;
3340 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetType(
3341 ID3D10EffectScalarVariable
*iface
)
3343 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
3346 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetDesc(ID3D10EffectScalarVariable
*iface
,
3347 D3D10_EFFECT_VARIABLE_DESC
*desc
)
3349 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
3352 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetAnnotationByIndex(
3353 ID3D10EffectScalarVariable
*iface
, UINT index
)
3355 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
3358 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetAnnotationByName(
3359 ID3D10EffectScalarVariable
*iface
, LPCSTR name
)
3361 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
3364 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetMemberByIndex(
3365 ID3D10EffectScalarVariable
*iface
, UINT index
)
3367 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
3370 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetMemberByName(
3371 ID3D10EffectScalarVariable
*iface
, LPCSTR name
)
3373 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
3376 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetMemberBySemantic(
3377 ID3D10EffectScalarVariable
*iface
, LPCSTR semantic
)
3379 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
3382 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetElement(
3383 ID3D10EffectScalarVariable
*iface
, UINT index
)
3385 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
3388 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetParentConstantBuffer(
3389 ID3D10EffectScalarVariable
*iface
)
3391 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
3394 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsScalar(
3395 ID3D10EffectScalarVariable
*iface
)
3397 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
3400 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsVector(
3401 ID3D10EffectScalarVariable
*iface
)
3403 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
3406 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsMatrix(
3407 ID3D10EffectScalarVariable
*iface
)
3409 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
3412 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsString(
3413 ID3D10EffectScalarVariable
*iface
)
3415 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
3418 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsShaderResource(
3419 ID3D10EffectScalarVariable
*iface
)
3421 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
3424 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsRenderTargetView(
3425 ID3D10EffectScalarVariable
*iface
)
3427 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
3430 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsDepthStencilView(
3431 ID3D10EffectScalarVariable
*iface
)
3433 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
3436 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsConstantBuffer(
3437 ID3D10EffectScalarVariable
*iface
)
3439 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
3442 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsShader(
3443 ID3D10EffectScalarVariable
*iface
)
3445 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
3448 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsBlend(
3449 ID3D10EffectScalarVariable
*iface
)
3451 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
3454 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsDepthStencil(
3455 ID3D10EffectScalarVariable
*iface
)
3457 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
3460 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsRasterizer(
3461 ID3D10EffectScalarVariable
*iface
)
3463 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
3466 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsSampler(
3467 ID3D10EffectScalarVariable
*iface
)
3469 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
3472 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetRawValue(ID3D10EffectScalarVariable
*iface
,
3473 void *data
, UINT offset
, UINT count
)
3475 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3478 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetRawValue(ID3D10EffectScalarVariable
*iface
,
3479 void *data
, UINT offset
, UINT count
)
3481 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3484 /* ID3D10EffectScalarVariable methods */
3486 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetFloat(ID3D10EffectScalarVariable
*iface
,
3489 FIXME("iface %p, value %.8e stub!\n", iface
, value
);
3494 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetFloat(ID3D10EffectScalarVariable
*iface
,
3497 FIXME("iface %p, value %p stub!\n", iface
, value
);
3502 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetFloatArray(ID3D10EffectScalarVariable
*iface
,
3503 float *values
, UINT offset
, UINT count
)
3505 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3510 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetFloatArray(ID3D10EffectScalarVariable
*iface
,
3511 float *values
, UINT offset
, UINT count
)
3513 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3518 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetInt(ID3D10EffectScalarVariable
*iface
,
3521 FIXME("iface %p, value %d stub!\n", iface
, value
);
3526 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetInt(ID3D10EffectScalarVariable
*iface
,
3529 FIXME("iface %p, value %p stub!\n", iface
, value
);
3534 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetIntArray(ID3D10EffectScalarVariable
*iface
,
3535 int *values
, UINT offset
, UINT count
)
3537 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3542 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetIntArray(ID3D10EffectScalarVariable
*iface
,
3543 int *values
, UINT offset
, UINT count
)
3545 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3550 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetBool(ID3D10EffectScalarVariable
*iface
,
3553 FIXME("iface %p, value %d stub!\n", iface
, value
);
3558 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetBool(ID3D10EffectScalarVariable
*iface
,
3561 FIXME("iface %p, value %p stub!\n", iface
, value
);
3566 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetBoolArray(ID3D10EffectScalarVariable
*iface
,
3567 BOOL
*values
, UINT offset
, UINT count
)
3569 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3574 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetBoolArray(ID3D10EffectScalarVariable
*iface
,
3575 BOOL
*values
, UINT offset
, UINT count
)
3577 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3582 static const struct ID3D10EffectScalarVariableVtbl d3d10_effect_scalar_variable_vtbl
=
3584 /* ID3D10EffectVariable methods */
3585 d3d10_effect_scalar_variable_IsValid
,
3586 d3d10_effect_scalar_variable_GetType
,
3587 d3d10_effect_scalar_variable_GetDesc
,
3588 d3d10_effect_scalar_variable_GetAnnotationByIndex
,
3589 d3d10_effect_scalar_variable_GetAnnotationByName
,
3590 d3d10_effect_scalar_variable_GetMemberByIndex
,
3591 d3d10_effect_scalar_variable_GetMemberByName
,
3592 d3d10_effect_scalar_variable_GetMemberBySemantic
,
3593 d3d10_effect_scalar_variable_GetElement
,
3594 d3d10_effect_scalar_variable_GetParentConstantBuffer
,
3595 d3d10_effect_scalar_variable_AsScalar
,
3596 d3d10_effect_scalar_variable_AsVector
,
3597 d3d10_effect_scalar_variable_AsMatrix
,
3598 d3d10_effect_scalar_variable_AsString
,
3599 d3d10_effect_scalar_variable_AsShaderResource
,
3600 d3d10_effect_scalar_variable_AsRenderTargetView
,
3601 d3d10_effect_scalar_variable_AsDepthStencilView
,
3602 d3d10_effect_scalar_variable_AsConstantBuffer
,
3603 d3d10_effect_scalar_variable_AsShader
,
3604 d3d10_effect_scalar_variable_AsBlend
,
3605 d3d10_effect_scalar_variable_AsDepthStencil
,
3606 d3d10_effect_scalar_variable_AsRasterizer
,
3607 d3d10_effect_scalar_variable_AsSampler
,
3608 d3d10_effect_scalar_variable_SetRawValue
,
3609 d3d10_effect_scalar_variable_GetRawValue
,
3610 /* ID3D10EffectScalarVariable methods */
3611 d3d10_effect_scalar_variable_SetFloat
,
3612 d3d10_effect_scalar_variable_GetFloat
,
3613 d3d10_effect_scalar_variable_SetFloatArray
,
3614 d3d10_effect_scalar_variable_GetFloatArray
,
3615 d3d10_effect_scalar_variable_SetInt
,
3616 d3d10_effect_scalar_variable_GetInt
,
3617 d3d10_effect_scalar_variable_SetIntArray
,
3618 d3d10_effect_scalar_variable_GetIntArray
,
3619 d3d10_effect_scalar_variable_SetBool
,
3620 d3d10_effect_scalar_variable_GetBool
,
3621 d3d10_effect_scalar_variable_SetBoolArray
,
3622 d3d10_effect_scalar_variable_GetBoolArray
,
3625 /* ID3D10EffectVariable methods */
3627 static BOOL STDMETHODCALLTYPE
d3d10_effect_vector_variable_IsValid(ID3D10EffectVectorVariable
*iface
)
3629 TRACE("iface %p\n", iface
);
3631 return (struct d3d10_effect_variable
*)iface
!= &null_vector_variable
;
3634 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetType(
3635 ID3D10EffectVectorVariable
*iface
)
3637 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
3640 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetDesc(ID3D10EffectVectorVariable
*iface
,
3641 D3D10_EFFECT_VARIABLE_DESC
*desc
)
3643 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
3646 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetAnnotationByIndex(
3647 ID3D10EffectVectorVariable
*iface
, UINT index
)
3649 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
3652 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetAnnotationByName(
3653 ID3D10EffectVectorVariable
*iface
, LPCSTR name
)
3655 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
3658 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetMemberByIndex(
3659 ID3D10EffectVectorVariable
*iface
, UINT index
)
3661 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
3664 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetMemberByName(
3665 ID3D10EffectVectorVariable
*iface
, LPCSTR name
)
3667 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
3670 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetMemberBySemantic(
3671 ID3D10EffectVectorVariable
*iface
, LPCSTR semantic
)
3673 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
3676 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetElement(
3677 ID3D10EffectVectorVariable
*iface
, UINT index
)
3679 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
3682 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetParentConstantBuffer(
3683 ID3D10EffectVectorVariable
*iface
)
3685 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
3688 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsScalar(
3689 ID3D10EffectVectorVariable
*iface
)
3691 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
3694 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsVector(
3695 ID3D10EffectVectorVariable
*iface
)
3697 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
3700 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsMatrix(
3701 ID3D10EffectVectorVariable
*iface
)
3703 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
3706 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsString(
3707 ID3D10EffectVectorVariable
*iface
)
3709 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
3712 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsShaderResource(
3713 ID3D10EffectVectorVariable
*iface
)
3715 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
3718 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsRenderTargetView(
3719 ID3D10EffectVectorVariable
*iface
)
3721 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
3724 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsDepthStencilView(
3725 ID3D10EffectVectorVariable
*iface
)
3727 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
3730 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsConstantBuffer(
3731 ID3D10EffectVectorVariable
*iface
)
3733 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
3736 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsShader(
3737 ID3D10EffectVectorVariable
*iface
)
3739 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
3742 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsBlend(
3743 ID3D10EffectVectorVariable
*iface
)
3745 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
3748 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsDepthStencil(
3749 ID3D10EffectVectorVariable
*iface
)
3751 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
3754 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsRasterizer(
3755 ID3D10EffectVectorVariable
*iface
)
3757 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
3760 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsSampler(
3761 ID3D10EffectVectorVariable
*iface
)
3763 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
3766 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetRawValue(ID3D10EffectVectorVariable
*iface
,
3767 void *data
, UINT offset
, UINT count
)
3769 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3772 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetRawValue(ID3D10EffectVectorVariable
*iface
,
3773 void *data
, UINT offset
, UINT count
)
3775 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3778 /* ID3D10EffectVectorVariable methods */
3780 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetBoolVector(ID3D10EffectVectorVariable
*iface
,
3783 FIXME("iface %p, value %p stub!\n", iface
, value
);
3788 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetIntVector(ID3D10EffectVectorVariable
*iface
,
3791 FIXME("iface %p, value %p stub!\n", iface
, value
);
3796 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetFloatVector(ID3D10EffectVectorVariable
*iface
,
3799 FIXME("iface %p, value %p stub!\n", iface
, value
);
3804 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetBoolVector(ID3D10EffectVectorVariable
*iface
,
3807 FIXME("iface %p, value %p stub!\n", iface
, value
);
3812 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetIntVector(ID3D10EffectVectorVariable
*iface
,
3815 FIXME("iface %p, value %p stub!\n", iface
, value
);
3820 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetFloatVector(ID3D10EffectVectorVariable
*iface
,
3823 FIXME("iface %p, value %p stub!\n", iface
, value
);
3828 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetBoolVectorArray(ID3D10EffectVectorVariable
*iface
,
3829 BOOL
*values
, UINT offset
, UINT count
)
3831 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3836 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetIntVectorArray(ID3D10EffectVectorVariable
*iface
,
3837 int *values
, UINT offset
, UINT count
)
3839 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3844 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetFloatVectorArray(ID3D10EffectVectorVariable
*iface
,
3845 float *values
, UINT offset
, UINT count
)
3847 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3852 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetBoolVectorArray(ID3D10EffectVectorVariable
*iface
,
3853 BOOL
*values
, UINT offset
, UINT count
)
3855 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3860 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetIntVectorArray(ID3D10EffectVectorVariable
*iface
,
3861 int *values
, UINT offset
, UINT count
)
3863 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3868 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetFloatVectorArray(ID3D10EffectVectorVariable
*iface
,
3869 float *values
, UINT offset
, UINT count
)
3871 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3876 static const struct ID3D10EffectVectorVariableVtbl d3d10_effect_vector_variable_vtbl
=
3878 /* ID3D10EffectVariable methods */
3879 d3d10_effect_vector_variable_IsValid
,
3880 d3d10_effect_vector_variable_GetType
,
3881 d3d10_effect_vector_variable_GetDesc
,
3882 d3d10_effect_vector_variable_GetAnnotationByIndex
,
3883 d3d10_effect_vector_variable_GetAnnotationByName
,
3884 d3d10_effect_vector_variable_GetMemberByIndex
,
3885 d3d10_effect_vector_variable_GetMemberByName
,
3886 d3d10_effect_vector_variable_GetMemberBySemantic
,
3887 d3d10_effect_vector_variable_GetElement
,
3888 d3d10_effect_vector_variable_GetParentConstantBuffer
,
3889 d3d10_effect_vector_variable_AsScalar
,
3890 d3d10_effect_vector_variable_AsVector
,
3891 d3d10_effect_vector_variable_AsMatrix
,
3892 d3d10_effect_vector_variable_AsString
,
3893 d3d10_effect_vector_variable_AsShaderResource
,
3894 d3d10_effect_vector_variable_AsRenderTargetView
,
3895 d3d10_effect_vector_variable_AsDepthStencilView
,
3896 d3d10_effect_vector_variable_AsConstantBuffer
,
3897 d3d10_effect_vector_variable_AsShader
,
3898 d3d10_effect_vector_variable_AsBlend
,
3899 d3d10_effect_vector_variable_AsDepthStencil
,
3900 d3d10_effect_vector_variable_AsRasterizer
,
3901 d3d10_effect_vector_variable_AsSampler
,
3902 d3d10_effect_vector_variable_SetRawValue
,
3903 d3d10_effect_vector_variable_GetRawValue
,
3904 /* ID3D10EffectVectorVariable methods */
3905 d3d10_effect_vector_variable_SetBoolVector
,
3906 d3d10_effect_vector_variable_SetIntVector
,
3907 d3d10_effect_vector_variable_SetFloatVector
,
3908 d3d10_effect_vector_variable_GetBoolVector
,
3909 d3d10_effect_vector_variable_GetIntVector
,
3910 d3d10_effect_vector_variable_GetFloatVector
,
3911 d3d10_effect_vector_variable_SetBoolVectorArray
,
3912 d3d10_effect_vector_variable_SetIntVectorArray
,
3913 d3d10_effect_vector_variable_SetFloatVectorArray
,
3914 d3d10_effect_vector_variable_GetBoolVectorArray
,
3915 d3d10_effect_vector_variable_GetIntVectorArray
,
3916 d3d10_effect_vector_variable_GetFloatVectorArray
,
3919 /* ID3D10EffectVariable methods */
3921 static BOOL STDMETHODCALLTYPE
d3d10_effect_matrix_variable_IsValid(ID3D10EffectMatrixVariable
*iface
)
3923 TRACE("iface %p\n", iface
);
3925 return (struct d3d10_effect_variable
*)iface
!= &null_matrix_variable
;
3928 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetType(
3929 ID3D10EffectMatrixVariable
*iface
)
3931 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
3934 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetDesc(ID3D10EffectMatrixVariable
*iface
,
3935 D3D10_EFFECT_VARIABLE_DESC
*desc
)
3937 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
3940 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetAnnotationByIndex(
3941 ID3D10EffectMatrixVariable
*iface
, UINT index
)
3943 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
3946 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetAnnotationByName(
3947 ID3D10EffectMatrixVariable
*iface
, LPCSTR name
)
3949 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
3952 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMemberByIndex(
3953 ID3D10EffectMatrixVariable
*iface
, UINT index
)
3955 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
3958 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMemberByName(
3959 ID3D10EffectMatrixVariable
*iface
, LPCSTR name
)
3961 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
3964 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMemberBySemantic(
3965 ID3D10EffectMatrixVariable
*iface
, LPCSTR semantic
)
3967 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
3970 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetElement(
3971 ID3D10EffectMatrixVariable
*iface
, UINT index
)
3973 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
3976 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetParentConstantBuffer(
3977 ID3D10EffectMatrixVariable
*iface
)
3979 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
3982 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsScalar(
3983 ID3D10EffectMatrixVariable
*iface
)
3985 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
3988 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsVector(
3989 ID3D10EffectMatrixVariable
*iface
)
3991 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
3994 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsMatrix(
3995 ID3D10EffectMatrixVariable
*iface
)
3997 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
4000 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsString(
4001 ID3D10EffectMatrixVariable
*iface
)
4003 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
4006 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsShaderResource(
4007 ID3D10EffectMatrixVariable
*iface
)
4009 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
4012 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsRenderTargetView(
4013 ID3D10EffectMatrixVariable
*iface
)
4015 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
4018 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsDepthStencilView(
4019 ID3D10EffectMatrixVariable
*iface
)
4021 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
4024 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsConstantBuffer(
4025 ID3D10EffectMatrixVariable
*iface
)
4027 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
4030 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsShader(
4031 ID3D10EffectMatrixVariable
*iface
)
4033 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
4036 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsBlend(
4037 ID3D10EffectMatrixVariable
*iface
)
4039 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
4042 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsDepthStencil(
4043 ID3D10EffectMatrixVariable
*iface
)
4045 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
4048 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsRasterizer(
4049 ID3D10EffectMatrixVariable
*iface
)
4051 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
4054 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsSampler(
4055 ID3D10EffectMatrixVariable
*iface
)
4057 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
4060 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetRawValue(ID3D10EffectMatrixVariable
*iface
,
4061 void *data
, UINT offset
, UINT count
)
4063 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4066 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetRawValue(ID3D10EffectMatrixVariable
*iface
,
4067 void *data
, UINT offset
, UINT count
)
4069 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4072 /* ID3D10EffectMatrixVariable methods */
4074 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetMatrix(ID3D10EffectMatrixVariable
*iface
,
4077 FIXME("iface %p, data %p stub!\n", iface
, data
);
4082 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMatrix(ID3D10EffectMatrixVariable
*iface
,
4085 FIXME("iface %p, data %p stub!\n", iface
, data
);
4090 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetMatrixArray(ID3D10EffectMatrixVariable
*iface
,
4091 float *data
, UINT offset
, UINT count
)
4093 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
4098 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMatrixArray(ID3D10EffectMatrixVariable
*iface
,
4099 float *data
, UINT offset
, UINT count
)
4101 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
4106 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetMatrixTranspose(ID3D10EffectMatrixVariable
*iface
,
4109 FIXME("iface %p, data %p stub!\n", iface
, data
);
4114 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMatrixTranspose(ID3D10EffectMatrixVariable
*iface
,
4117 FIXME("iface %p, data %p stub!\n", iface
, data
);
4122 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetMatrixTransposeArray(ID3D10EffectMatrixVariable
*iface
,
4123 float *data
, UINT offset
, UINT count
)
4125 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
4130 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMatrixTransposeArray(ID3D10EffectMatrixVariable
*iface
,
4131 float *data
, UINT offset
, UINT count
)
4133 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
4139 static const struct ID3D10EffectMatrixVariableVtbl d3d10_effect_matrix_variable_vtbl
=
4141 /* ID3D10EffectVariable methods */
4142 d3d10_effect_matrix_variable_IsValid
,
4143 d3d10_effect_matrix_variable_GetType
,
4144 d3d10_effect_matrix_variable_GetDesc
,
4145 d3d10_effect_matrix_variable_GetAnnotationByIndex
,
4146 d3d10_effect_matrix_variable_GetAnnotationByName
,
4147 d3d10_effect_matrix_variable_GetMemberByIndex
,
4148 d3d10_effect_matrix_variable_GetMemberByName
,
4149 d3d10_effect_matrix_variable_GetMemberBySemantic
,
4150 d3d10_effect_matrix_variable_GetElement
,
4151 d3d10_effect_matrix_variable_GetParentConstantBuffer
,
4152 d3d10_effect_matrix_variable_AsScalar
,
4153 d3d10_effect_matrix_variable_AsVector
,
4154 d3d10_effect_matrix_variable_AsMatrix
,
4155 d3d10_effect_matrix_variable_AsString
,
4156 d3d10_effect_matrix_variable_AsShaderResource
,
4157 d3d10_effect_matrix_variable_AsRenderTargetView
,
4158 d3d10_effect_matrix_variable_AsDepthStencilView
,
4159 d3d10_effect_matrix_variable_AsConstantBuffer
,
4160 d3d10_effect_matrix_variable_AsShader
,
4161 d3d10_effect_matrix_variable_AsBlend
,
4162 d3d10_effect_matrix_variable_AsDepthStencil
,
4163 d3d10_effect_matrix_variable_AsRasterizer
,
4164 d3d10_effect_matrix_variable_AsSampler
,
4165 d3d10_effect_matrix_variable_SetRawValue
,
4166 d3d10_effect_matrix_variable_GetRawValue
,
4167 /* ID3D10EffectMatrixVariable methods */
4168 d3d10_effect_matrix_variable_SetMatrix
,
4169 d3d10_effect_matrix_variable_GetMatrix
,
4170 d3d10_effect_matrix_variable_SetMatrixArray
,
4171 d3d10_effect_matrix_variable_GetMatrixArray
,
4172 d3d10_effect_matrix_variable_SetMatrixTranspose
,
4173 d3d10_effect_matrix_variable_GetMatrixTranspose
,
4174 d3d10_effect_matrix_variable_SetMatrixTransposeArray
,
4175 d3d10_effect_matrix_variable_GetMatrixTransposeArray
,
4178 /* ID3D10EffectVariable methods */
4180 static BOOL STDMETHODCALLTYPE
d3d10_effect_string_variable_IsValid(ID3D10EffectStringVariable
*iface
)
4182 TRACE("iface %p\n", iface
);
4184 return (struct d3d10_effect_variable
*)iface
!= &null_string_variable
;
4187 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetType(
4188 ID3D10EffectStringVariable
*iface
)
4190 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
4193 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_GetDesc(ID3D10EffectStringVariable
*iface
,
4194 D3D10_EFFECT_VARIABLE_DESC
*desc
)
4196 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
4199 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetAnnotationByIndex(
4200 ID3D10EffectStringVariable
*iface
, UINT index
)
4202 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
4205 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetAnnotationByName(
4206 ID3D10EffectStringVariable
*iface
, LPCSTR name
)
4208 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
4211 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetMemberByIndex(
4212 ID3D10EffectStringVariable
*iface
, UINT index
)
4214 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
4217 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetMemberByName(
4218 ID3D10EffectStringVariable
*iface
, LPCSTR name
)
4220 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
4223 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetMemberBySemantic(
4224 ID3D10EffectStringVariable
*iface
, LPCSTR semantic
)
4226 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
4229 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetElement(
4230 ID3D10EffectStringVariable
*iface
, UINT index
)
4232 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
4235 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetParentConstantBuffer(
4236 ID3D10EffectStringVariable
*iface
)
4238 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
4241 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsScalar(
4242 ID3D10EffectStringVariable
*iface
)
4244 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
4247 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsVector(
4248 ID3D10EffectStringVariable
*iface
)
4250 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
4253 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsMatrix(
4254 ID3D10EffectStringVariable
*iface
)
4256 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
4259 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsString(
4260 ID3D10EffectStringVariable
*iface
)
4262 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
4265 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsShaderResource(
4266 ID3D10EffectStringVariable
*iface
)
4268 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
4271 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsRenderTargetView(
4272 ID3D10EffectStringVariable
*iface
)
4274 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
4277 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsDepthStencilView(
4278 ID3D10EffectStringVariable
*iface
)
4280 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
4283 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsConstantBuffer(
4284 ID3D10EffectStringVariable
*iface
)
4286 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
4289 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsShader(
4290 ID3D10EffectStringVariable
*iface
)
4292 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
4295 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsBlend(
4296 ID3D10EffectStringVariable
*iface
)
4298 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
4301 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsDepthStencil(
4302 ID3D10EffectStringVariable
*iface
)
4304 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
4307 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsRasterizer(
4308 ID3D10EffectStringVariable
*iface
)
4310 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
4313 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsSampler(
4314 ID3D10EffectStringVariable
*iface
)
4316 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
4319 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_SetRawValue(ID3D10EffectStringVariable
*iface
,
4320 void *data
, UINT offset
, UINT count
)
4322 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4325 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_GetRawValue(ID3D10EffectStringVariable
*iface
,
4326 void *data
, UINT offset
, UINT count
)
4328 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4331 /* ID3D10EffectStringVariable methods */
4333 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_GetString(ID3D10EffectStringVariable
*iface
,
4336 FIXME("iface %p, str %p stub!\n", iface
, str
);
4341 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_GetStringArray(ID3D10EffectStringVariable
*iface
,
4342 LPCSTR
*strs
, UINT offset
, UINT count
)
4344 FIXME("iface %p, strs %p, offset %u, count %u stub!\n", iface
, strs
, offset
, count
);
4350 static const struct ID3D10EffectStringVariableVtbl d3d10_effect_string_variable_vtbl
=
4352 /* ID3D10EffectVariable methods */
4353 d3d10_effect_string_variable_IsValid
,
4354 d3d10_effect_string_variable_GetType
,
4355 d3d10_effect_string_variable_GetDesc
,
4356 d3d10_effect_string_variable_GetAnnotationByIndex
,
4357 d3d10_effect_string_variable_GetAnnotationByName
,
4358 d3d10_effect_string_variable_GetMemberByIndex
,
4359 d3d10_effect_string_variable_GetMemberByName
,
4360 d3d10_effect_string_variable_GetMemberBySemantic
,
4361 d3d10_effect_string_variable_GetElement
,
4362 d3d10_effect_string_variable_GetParentConstantBuffer
,
4363 d3d10_effect_string_variable_AsScalar
,
4364 d3d10_effect_string_variable_AsVector
,
4365 d3d10_effect_string_variable_AsMatrix
,
4366 d3d10_effect_string_variable_AsString
,
4367 d3d10_effect_string_variable_AsShaderResource
,
4368 d3d10_effect_string_variable_AsRenderTargetView
,
4369 d3d10_effect_string_variable_AsDepthStencilView
,
4370 d3d10_effect_string_variable_AsConstantBuffer
,
4371 d3d10_effect_string_variable_AsShader
,
4372 d3d10_effect_string_variable_AsBlend
,
4373 d3d10_effect_string_variable_AsDepthStencil
,
4374 d3d10_effect_string_variable_AsRasterizer
,
4375 d3d10_effect_string_variable_AsSampler
,
4376 d3d10_effect_string_variable_SetRawValue
,
4377 d3d10_effect_string_variable_GetRawValue
,
4378 /* ID3D10EffectStringVariable methods */
4379 d3d10_effect_string_variable_GetString
,
4380 d3d10_effect_string_variable_GetStringArray
,
4383 /* ID3D10EffectVariable methods */
4385 static BOOL STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_IsValid(ID3D10EffectShaderResourceVariable
*iface
)
4387 TRACE("iface %p\n", iface
);
4389 return (struct d3d10_effect_variable
*)iface
!= &null_shader_resource_variable
;
4392 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetType(
4393 ID3D10EffectShaderResourceVariable
*iface
)
4395 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
4398 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetDesc(
4399 ID3D10EffectShaderResourceVariable
*iface
, D3D10_EFFECT_VARIABLE_DESC
*desc
)
4401 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
4404 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetAnnotationByIndex(
4405 ID3D10EffectShaderResourceVariable
*iface
, UINT index
)
4407 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
4410 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetAnnotationByName(
4411 ID3D10EffectShaderResourceVariable
*iface
, LPCSTR name
)
4413 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
4416 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetMemberByIndex(
4417 ID3D10EffectShaderResourceVariable
*iface
, UINT index
)
4419 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
4422 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetMemberByName(
4423 ID3D10EffectShaderResourceVariable
*iface
, LPCSTR name
)
4425 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
4428 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetMemberBySemantic(
4429 ID3D10EffectShaderResourceVariable
*iface
, LPCSTR semantic
)
4431 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
4434 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetElement(
4435 ID3D10EffectShaderResourceVariable
*iface
, UINT index
)
4437 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
4440 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetParentConstantBuffer(
4441 ID3D10EffectShaderResourceVariable
*iface
)
4443 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
4446 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsScalar(
4447 ID3D10EffectShaderResourceVariable
*iface
)
4449 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
4452 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsVector(
4453 ID3D10EffectShaderResourceVariable
*iface
)
4455 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
4458 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsMatrix(
4459 ID3D10EffectShaderResourceVariable
*iface
)
4461 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
4464 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsString(
4465 ID3D10EffectShaderResourceVariable
*iface
)
4467 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
4470 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsShaderResource(
4471 ID3D10EffectShaderResourceVariable
*iface
)
4473 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
4476 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsRenderTargetView(
4477 ID3D10EffectShaderResourceVariable
*iface
)
4479 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
4482 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsDepthStencilView(
4483 ID3D10EffectShaderResourceVariable
*iface
)
4485 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
4488 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsConstantBuffer(
4489 ID3D10EffectShaderResourceVariable
*iface
)
4491 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
4494 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsShader(
4495 ID3D10EffectShaderResourceVariable
*iface
)
4497 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
4500 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsBlend(
4501 ID3D10EffectShaderResourceVariable
*iface
)
4503 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
4506 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsDepthStencil(
4507 ID3D10EffectShaderResourceVariable
*iface
)
4509 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
4512 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsRasterizer(
4513 ID3D10EffectShaderResourceVariable
*iface
)
4515 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
4518 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsSampler(
4519 ID3D10EffectShaderResourceVariable
*iface
)
4521 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
4524 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_SetRawValue(
4525 ID3D10EffectShaderResourceVariable
*iface
, void *data
, UINT offset
, UINT count
)
4527 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4530 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetRawValue(
4531 ID3D10EffectShaderResourceVariable
*iface
, void *data
, UINT offset
, UINT count
)
4533 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4536 /* ID3D10EffectShaderResourceVariable methods */
4538 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_SetResource(
4539 ID3D10EffectShaderResourceVariable
*iface
, ID3D10ShaderResourceView
*resource
)
4541 FIXME("iface %p, resource %p stub!\n", iface
, resource
);
4546 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetResource(
4547 ID3D10EffectShaderResourceVariable
*iface
, ID3D10ShaderResourceView
**resource
)
4549 FIXME("iface %p, resource %p stub!\n", iface
, resource
);
4554 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_SetResourceArray(
4555 ID3D10EffectShaderResourceVariable
*iface
, ID3D10ShaderResourceView
**resources
, UINT offset
, UINT count
)
4557 FIXME("iface %p, resources %p, offset %u, count %u stub!\n", iface
, resources
, offset
, count
);
4562 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetResourceArray(
4563 ID3D10EffectShaderResourceVariable
*iface
, ID3D10ShaderResourceView
**resources
, UINT offset
, UINT count
)
4565 FIXME("iface %p, resources %p, offset %u, count %u stub!\n", iface
, resources
, offset
, count
);
4571 static const struct ID3D10EffectShaderResourceVariableVtbl d3d10_effect_shader_resource_variable_vtbl
=
4573 /* ID3D10EffectVariable methods */
4574 d3d10_effect_shader_resource_variable_IsValid
,
4575 d3d10_effect_shader_resource_variable_GetType
,
4576 d3d10_effect_shader_resource_variable_GetDesc
,
4577 d3d10_effect_shader_resource_variable_GetAnnotationByIndex
,
4578 d3d10_effect_shader_resource_variable_GetAnnotationByName
,
4579 d3d10_effect_shader_resource_variable_GetMemberByIndex
,
4580 d3d10_effect_shader_resource_variable_GetMemberByName
,
4581 d3d10_effect_shader_resource_variable_GetMemberBySemantic
,
4582 d3d10_effect_shader_resource_variable_GetElement
,
4583 d3d10_effect_shader_resource_variable_GetParentConstantBuffer
,
4584 d3d10_effect_shader_resource_variable_AsScalar
,
4585 d3d10_effect_shader_resource_variable_AsVector
,
4586 d3d10_effect_shader_resource_variable_AsMatrix
,
4587 d3d10_effect_shader_resource_variable_AsString
,
4588 d3d10_effect_shader_resource_variable_AsShaderResource
,
4589 d3d10_effect_shader_resource_variable_AsRenderTargetView
,
4590 d3d10_effect_shader_resource_variable_AsDepthStencilView
,
4591 d3d10_effect_shader_resource_variable_AsConstantBuffer
,
4592 d3d10_effect_shader_resource_variable_AsShader
,
4593 d3d10_effect_shader_resource_variable_AsBlend
,
4594 d3d10_effect_shader_resource_variable_AsDepthStencil
,
4595 d3d10_effect_shader_resource_variable_AsRasterizer
,
4596 d3d10_effect_shader_resource_variable_AsSampler
,
4597 d3d10_effect_shader_resource_variable_SetRawValue
,
4598 d3d10_effect_shader_resource_variable_GetRawValue
,
4599 /* ID3D10EffectShaderResourceVariable methods */
4600 d3d10_effect_shader_resource_variable_SetResource
,
4601 d3d10_effect_shader_resource_variable_GetResource
,
4602 d3d10_effect_shader_resource_variable_SetResourceArray
,
4603 d3d10_effect_shader_resource_variable_GetResourceArray
,
4606 /* ID3D10EffectVariable methods */
4608 static BOOL STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_IsValid(
4609 ID3D10EffectRenderTargetViewVariable
*iface
)
4611 TRACE("iface %p\n", iface
);
4613 return (struct d3d10_effect_variable
*)iface
!= &null_render_target_view_variable
;
4616 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetType(
4617 ID3D10EffectRenderTargetViewVariable
*iface
)
4619 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
4622 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetDesc(
4623 ID3D10EffectRenderTargetViewVariable
*iface
, D3D10_EFFECT_VARIABLE_DESC
*desc
)
4625 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
4628 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetAnnotationByIndex(
4629 ID3D10EffectRenderTargetViewVariable
*iface
, UINT index
)
4631 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
4634 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetAnnotationByName(
4635 ID3D10EffectRenderTargetViewVariable
*iface
, LPCSTR name
)
4637 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
4640 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetMemberByIndex(
4641 ID3D10EffectRenderTargetViewVariable
*iface
, UINT index
)
4643 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
4646 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetMemberByName(
4647 ID3D10EffectRenderTargetViewVariable
*iface
, LPCSTR name
)
4649 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
4652 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetMemberBySemantic(
4653 ID3D10EffectRenderTargetViewVariable
*iface
, LPCSTR semantic
)
4655 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
4658 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetElement(
4659 ID3D10EffectRenderTargetViewVariable
*iface
, UINT index
)
4661 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
4664 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetParentConstantBuffer(
4665 ID3D10EffectRenderTargetViewVariable
*iface
)
4667 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
4670 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsScalar(
4671 ID3D10EffectRenderTargetViewVariable
*iface
)
4673 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
4676 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsVector(
4677 ID3D10EffectRenderTargetViewVariable
*iface
)
4679 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
4682 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsMatrix(
4683 ID3D10EffectRenderTargetViewVariable
*iface
)
4685 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
4688 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsString(
4689 ID3D10EffectRenderTargetViewVariable
*iface
)
4691 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
4694 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsShaderResource(
4695 ID3D10EffectRenderTargetViewVariable
*iface
)
4697 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
4700 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsRenderTargetView(
4701 ID3D10EffectRenderTargetViewVariable
*iface
)
4703 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
4706 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsDepthStencilView(
4707 ID3D10EffectRenderTargetViewVariable
*iface
)
4709 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
4712 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsConstantBuffer(
4713 ID3D10EffectRenderTargetViewVariable
*iface
)
4715 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
4718 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsShader(
4719 ID3D10EffectRenderTargetViewVariable
*iface
)
4721 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
4724 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsBlend(
4725 ID3D10EffectRenderTargetViewVariable
*iface
)
4727 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
4730 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsDepthStencil(
4731 ID3D10EffectRenderTargetViewVariable
*iface
)
4733 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
4736 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsRasterizer(
4737 ID3D10EffectRenderTargetViewVariable
*iface
)
4739 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
4742 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsSampler(
4743 ID3D10EffectRenderTargetViewVariable
*iface
)
4745 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
4748 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_SetRawValue(
4749 ID3D10EffectRenderTargetViewVariable
*iface
, void *data
, UINT offset
, UINT count
)
4751 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4754 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetRawValue(
4755 ID3D10EffectRenderTargetViewVariable
*iface
, void *data
, UINT offset
, UINT count
)
4757 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4760 /* ID3D10EffectRenderTargetViewVariable methods */
4762 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_SetRenderTarget(
4763 ID3D10EffectRenderTargetViewVariable
*iface
, ID3D10RenderTargetView
*view
)
4765 FIXME("iface %p, view %p stub!\n", iface
, view
);
4770 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetRenderTarget(
4771 ID3D10EffectRenderTargetViewVariable
*iface
, ID3D10RenderTargetView
**view
)
4773 FIXME("iface %p, view %p stub!\n", iface
, view
);
4778 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_SetRenderTargetArray(
4779 ID3D10EffectRenderTargetViewVariable
*iface
, ID3D10RenderTargetView
**views
, UINT offset
, UINT count
)
4781 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface
, views
, offset
, count
);
4786 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetRenderTargetArray(
4787 ID3D10EffectRenderTargetViewVariable
*iface
, ID3D10RenderTargetView
**views
, UINT offset
, UINT count
)
4789 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface
, views
, offset
, count
);
4795 static const struct ID3D10EffectRenderTargetViewVariableVtbl d3d10_effect_render_target_view_variable_vtbl
=
4797 /* ID3D10EffectVariable methods */
4798 d3d10_effect_render_target_view_variable_IsValid
,
4799 d3d10_effect_render_target_view_variable_GetType
,
4800 d3d10_effect_render_target_view_variable_GetDesc
,
4801 d3d10_effect_render_target_view_variable_GetAnnotationByIndex
,
4802 d3d10_effect_render_target_view_variable_GetAnnotationByName
,
4803 d3d10_effect_render_target_view_variable_GetMemberByIndex
,
4804 d3d10_effect_render_target_view_variable_GetMemberByName
,
4805 d3d10_effect_render_target_view_variable_GetMemberBySemantic
,
4806 d3d10_effect_render_target_view_variable_GetElement
,
4807 d3d10_effect_render_target_view_variable_GetParentConstantBuffer
,
4808 d3d10_effect_render_target_view_variable_AsScalar
,
4809 d3d10_effect_render_target_view_variable_AsVector
,
4810 d3d10_effect_render_target_view_variable_AsMatrix
,
4811 d3d10_effect_render_target_view_variable_AsString
,
4812 d3d10_effect_render_target_view_variable_AsShaderResource
,
4813 d3d10_effect_render_target_view_variable_AsRenderTargetView
,
4814 d3d10_effect_render_target_view_variable_AsDepthStencilView
,
4815 d3d10_effect_render_target_view_variable_AsConstantBuffer
,
4816 d3d10_effect_render_target_view_variable_AsShader
,
4817 d3d10_effect_render_target_view_variable_AsBlend
,
4818 d3d10_effect_render_target_view_variable_AsDepthStencil
,
4819 d3d10_effect_render_target_view_variable_AsRasterizer
,
4820 d3d10_effect_render_target_view_variable_AsSampler
,
4821 d3d10_effect_render_target_view_variable_SetRawValue
,
4822 d3d10_effect_render_target_view_variable_GetRawValue
,
4823 /* ID3D10EffectRenderTargetViewVariable methods */
4824 d3d10_effect_render_target_view_variable_SetRenderTarget
,
4825 d3d10_effect_render_target_view_variable_GetRenderTarget
,
4826 d3d10_effect_render_target_view_variable_SetRenderTargetArray
,
4827 d3d10_effect_render_target_view_variable_GetRenderTargetArray
,
4830 /* ID3D10EffectVariable methods */
4832 static BOOL STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_IsValid(
4833 ID3D10EffectDepthStencilViewVariable
*iface
)
4835 TRACE("iface %p\n", iface
);
4837 return (struct d3d10_effect_variable
*)iface
!= &null_depth_stencil_view_variable
;
4840 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetType(
4841 ID3D10EffectDepthStencilViewVariable
*iface
)
4843 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
4846 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetDesc(
4847 ID3D10EffectDepthStencilViewVariable
*iface
, D3D10_EFFECT_VARIABLE_DESC
*desc
)
4849 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
4852 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetAnnotationByIndex(
4853 ID3D10EffectDepthStencilViewVariable
*iface
, UINT index
)
4855 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
4858 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetAnnotationByName(
4859 ID3D10EffectDepthStencilViewVariable
*iface
, LPCSTR name
)
4861 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
4864 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetMemberByIndex(
4865 ID3D10EffectDepthStencilViewVariable
*iface
, UINT index
)
4867 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
4870 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetMemberByName(
4871 ID3D10EffectDepthStencilViewVariable
*iface
, LPCSTR name
)
4873 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
4876 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetMemberBySemantic(
4877 ID3D10EffectDepthStencilViewVariable
*iface
, LPCSTR semantic
)
4879 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
4882 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetElement(
4883 ID3D10EffectDepthStencilViewVariable
*iface
, UINT index
)
4885 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
4888 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetParentConstantBuffer(
4889 ID3D10EffectDepthStencilViewVariable
*iface
)
4891 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
4894 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsScalar(
4895 ID3D10EffectDepthStencilViewVariable
*iface
)
4897 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
4900 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsVector(
4901 ID3D10EffectDepthStencilViewVariable
*iface
)
4903 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
4906 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsMatrix(
4907 ID3D10EffectDepthStencilViewVariable
*iface
)
4909 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
4912 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsString(
4913 ID3D10EffectDepthStencilViewVariable
*iface
)
4915 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
4918 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsShaderResource(
4919 ID3D10EffectDepthStencilViewVariable
*iface
)
4921 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
4924 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsRenderTargetView(
4925 ID3D10EffectDepthStencilViewVariable
*iface
)
4927 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
4930 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsDepthStencilView(
4931 ID3D10EffectDepthStencilViewVariable
*iface
)
4933 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
4936 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsConstantBuffer(
4937 ID3D10EffectDepthStencilViewVariable
*iface
)
4939 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
4942 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsShader(
4943 ID3D10EffectDepthStencilViewVariable
*iface
)
4945 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
4948 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsBlend(
4949 ID3D10EffectDepthStencilViewVariable
*iface
)
4951 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
4954 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsDepthStencil(
4955 ID3D10EffectDepthStencilViewVariable
*iface
)
4957 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
4960 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsRasterizer(
4961 ID3D10EffectDepthStencilViewVariable
*iface
)
4963 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
4966 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsSampler(
4967 ID3D10EffectDepthStencilViewVariable
*iface
)
4969 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
4972 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_SetRawValue(
4973 ID3D10EffectDepthStencilViewVariable
*iface
, void *data
, UINT offset
, UINT count
)
4975 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4978 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetRawValue(
4979 ID3D10EffectDepthStencilViewVariable
*iface
, void *data
, UINT offset
, UINT count
)
4981 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4984 /* ID3D10EffectDepthStencilViewVariable methods */
4986 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_SetDepthStencil(
4987 ID3D10EffectDepthStencilViewVariable
*iface
, ID3D10DepthStencilView
*view
)
4989 FIXME("iface %p, view %p stub!\n", iface
, view
);
4994 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetDepthStencil(
4995 ID3D10EffectDepthStencilViewVariable
*iface
, ID3D10DepthStencilView
**view
)
4997 FIXME("iface %p, view %p stub!\n", iface
, view
);
5002 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_SetDepthStencilArray(
5003 ID3D10EffectDepthStencilViewVariable
*iface
, ID3D10DepthStencilView
**views
, UINT offset
, UINT count
)
5005 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface
, views
, offset
, count
);
5010 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetDepthStencilArray(
5011 ID3D10EffectDepthStencilViewVariable
*iface
, ID3D10DepthStencilView
**views
, UINT offset
, UINT count
)
5013 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface
, views
, offset
, count
);
5019 static const struct ID3D10EffectDepthStencilViewVariableVtbl d3d10_effect_depth_stencil_view_variable_vtbl
=
5021 /* ID3D10EffectVariable methods */
5022 d3d10_effect_depth_stencil_view_variable_IsValid
,
5023 d3d10_effect_depth_stencil_view_variable_GetType
,
5024 d3d10_effect_depth_stencil_view_variable_GetDesc
,
5025 d3d10_effect_depth_stencil_view_variable_GetAnnotationByIndex
,
5026 d3d10_effect_depth_stencil_view_variable_GetAnnotationByName
,
5027 d3d10_effect_depth_stencil_view_variable_GetMemberByIndex
,
5028 d3d10_effect_depth_stencil_view_variable_GetMemberByName
,
5029 d3d10_effect_depth_stencil_view_variable_GetMemberBySemantic
,
5030 d3d10_effect_depth_stencil_view_variable_GetElement
,
5031 d3d10_effect_depth_stencil_view_variable_GetParentConstantBuffer
,
5032 d3d10_effect_depth_stencil_view_variable_AsScalar
,
5033 d3d10_effect_depth_stencil_view_variable_AsVector
,
5034 d3d10_effect_depth_stencil_view_variable_AsMatrix
,
5035 d3d10_effect_depth_stencil_view_variable_AsString
,
5036 d3d10_effect_depth_stencil_view_variable_AsShaderResource
,
5037 d3d10_effect_depth_stencil_view_variable_AsRenderTargetView
,
5038 d3d10_effect_depth_stencil_view_variable_AsDepthStencilView
,
5039 d3d10_effect_depth_stencil_view_variable_AsConstantBuffer
,
5040 d3d10_effect_depth_stencil_view_variable_AsShader
,
5041 d3d10_effect_depth_stencil_view_variable_AsBlend
,
5042 d3d10_effect_depth_stencil_view_variable_AsDepthStencil
,
5043 d3d10_effect_depth_stencil_view_variable_AsRasterizer
,
5044 d3d10_effect_depth_stencil_view_variable_AsSampler
,
5045 d3d10_effect_depth_stencil_view_variable_SetRawValue
,
5046 d3d10_effect_depth_stencil_view_variable_GetRawValue
,
5047 /* ID3D10EffectDepthStencilViewVariable methods */
5048 d3d10_effect_depth_stencil_view_variable_SetDepthStencil
,
5049 d3d10_effect_depth_stencil_view_variable_GetDepthStencil
,
5050 d3d10_effect_depth_stencil_view_variable_SetDepthStencilArray
,
5051 d3d10_effect_depth_stencil_view_variable_GetDepthStencilArray
,
5054 /* ID3D10EffectVariable methods */
5056 static BOOL STDMETHODCALLTYPE
d3d10_effect_shader_variable_IsValid(ID3D10EffectShaderVariable
*iface
)
5058 TRACE("iface %p\n", iface
);
5060 return (struct d3d10_effect_variable
*)iface
!= &null_shader_variable
;
5063 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetType(
5064 ID3D10EffectShaderVariable
*iface
)
5066 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
5069 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetDesc(ID3D10EffectShaderVariable
*iface
,
5070 D3D10_EFFECT_VARIABLE_DESC
*desc
)
5072 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
5075 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetAnnotationByIndex(
5076 ID3D10EffectShaderVariable
*iface
, UINT index
)
5078 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
5081 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetAnnotationByName(
5082 ID3D10EffectShaderVariable
*iface
, LPCSTR name
)
5084 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
5087 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetMemberByIndex(
5088 ID3D10EffectShaderVariable
*iface
, UINT index
)
5090 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
5093 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetMemberByName(
5094 ID3D10EffectShaderVariable
*iface
, LPCSTR name
)
5096 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
5099 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetMemberBySemantic(
5100 ID3D10EffectShaderVariable
*iface
, LPCSTR semantic
)
5102 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
5105 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetElement(
5106 ID3D10EffectShaderVariable
*iface
, UINT index
)
5108 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
5111 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetParentConstantBuffer(
5112 ID3D10EffectShaderVariable
*iface
)
5114 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
5117 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsScalar(
5118 ID3D10EffectShaderVariable
*iface
)
5120 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
5123 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsVector(
5124 ID3D10EffectShaderVariable
*iface
)
5126 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
5129 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsMatrix(
5130 ID3D10EffectShaderVariable
*iface
)
5132 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
5135 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsString(
5136 ID3D10EffectShaderVariable
*iface
)
5138 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
5141 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsShaderResource(
5142 ID3D10EffectShaderVariable
*iface
)
5144 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
5147 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsRenderTargetView(
5148 ID3D10EffectShaderVariable
*iface
)
5150 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
5153 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsDepthStencilView(
5154 ID3D10EffectShaderVariable
*iface
)
5156 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
5159 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsConstantBuffer(
5160 ID3D10EffectShaderVariable
*iface
)
5162 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
5165 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsShader(
5166 ID3D10EffectShaderVariable
*iface
)
5168 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
5171 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsBlend(
5172 ID3D10EffectShaderVariable
*iface
)
5174 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
5177 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsDepthStencil(
5178 ID3D10EffectShaderVariable
*iface
)
5180 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
5183 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsRasterizer(
5184 ID3D10EffectShaderVariable
*iface
)
5186 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
5189 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsSampler(
5190 ID3D10EffectShaderVariable
*iface
)
5192 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
5195 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_SetRawValue(
5196 ID3D10EffectShaderVariable
*iface
, void *data
, UINT offset
, UINT count
)
5198 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5201 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetRawValue(
5202 ID3D10EffectShaderVariable
*iface
, void *data
, UINT offset
, UINT count
)
5204 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5207 /* ID3D10EffectShaderVariable methods */
5209 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetShaderDesc(
5210 ID3D10EffectShaderVariable
*iface
, UINT index
, D3D10_EFFECT_SHADER_DESC
*desc
)
5212 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
5217 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetVertexShader(
5218 ID3D10EffectShaderVariable
*iface
, UINT index
, ID3D10VertexShader
**shader
)
5220 FIXME("iface %p, index %u, shader %p stub!\n", iface
, index
, shader
);
5225 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetGeometryShader(
5226 ID3D10EffectShaderVariable
*iface
, UINT index
, ID3D10GeometryShader
**shader
)
5228 FIXME("iface %p, index %u, shader %p stub!\n", iface
, index
, shader
);
5233 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetPixelShader(
5234 ID3D10EffectShaderVariable
*iface
, UINT index
, ID3D10PixelShader
**shader
)
5236 FIXME("iface %p, index %u, shader %p stub!\n", iface
, index
, shader
);
5241 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetInputSignatureElementDesc(
5242 ID3D10EffectShaderVariable
*iface
, UINT shader_index
, UINT element_index
,
5243 D3D10_SIGNATURE_PARAMETER_DESC
*desc
)
5245 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
5246 struct d3d10_effect_shader_variable
*s
;
5247 D3D10_SIGNATURE_PARAMETER_DESC
*d
;
5249 TRACE("iface %p, shader_index %u, element_index %u, desc %p\n",
5250 iface
, shader_index
, element_index
, desc
);
5252 if (!iface
->lpVtbl
->IsValid(iface
))
5254 WARN("Null variable specified\n");
5258 /* Check shader_index, this crashes on W7/DX10 */
5259 if (shader_index
>= This
->effect
->used_shader_count
)
5261 WARN("This should crash on W7/DX10!\n");
5265 s
= This
->effect
->used_shaders
[shader_index
]->data
;
5266 if (!s
->input_signature
.signature
)
5268 WARN("No shader signature\n");
5269 return D3DERR_INVALIDCALL
;
5272 /* Check desc for NULL, this crashes on W7/DX10 */
5275 WARN("This should crash on W7/DX10!\n");
5279 if (element_index
>= s
->input_signature
.element_count
)
5281 WARN("Invalid element index specified\n");
5282 return E_INVALIDARG
;
5285 d
= &s
->input_signature
.elements
[element_index
];
5286 desc
->SemanticName
= d
->SemanticName
;
5287 desc
->SemanticIndex
= d
->SemanticIndex
;
5288 desc
->SystemValueType
= d
->SystemValueType
;
5289 desc
->ComponentType
= d
->ComponentType
;
5290 desc
->Register
= d
->Register
;
5291 desc
->ReadWriteMask
= d
->ReadWriteMask
;
5292 desc
->Mask
= d
->Mask
;
5297 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetOutputSignatureElementDesc(
5298 ID3D10EffectShaderVariable
*iface
, UINT shader_index
, UINT element_index
,
5299 D3D10_SIGNATURE_PARAMETER_DESC
*desc
)
5301 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
5302 struct d3d10_effect_shader_variable
*s
;
5303 D3D10_SIGNATURE_PARAMETER_DESC
*d
;
5305 TRACE("iface %p, shader_index %u, element_index %u, desc %p\n",
5306 iface
, shader_index
, element_index
, desc
);
5308 if (!iface
->lpVtbl
->IsValid(iface
))
5310 WARN("Null variable specified\n");
5314 /* Check shader_index, this crashes on W7/DX10 */
5315 if (shader_index
>= This
->effect
->used_shader_count
)
5317 WARN("This should crash on W7/DX10!\n");
5321 s
= This
->effect
->used_shaders
[shader_index
]->data
;
5322 if (!s
->output_signature
.signature
)
5324 WARN("No shader signature\n");
5325 return D3DERR_INVALIDCALL
;
5328 /* Check desc for NULL, this crashes on W7/DX10 */
5331 WARN("This should crash on W7/DX10!\n");
5335 if (element_index
>= s
->output_signature
.element_count
)
5337 WARN("Invalid element index specified\n");
5338 return E_INVALIDARG
;
5341 d
= &s
->output_signature
.elements
[element_index
];
5342 desc
->SemanticName
= d
->SemanticName
;
5343 desc
->SemanticIndex
= d
->SemanticIndex
;
5344 desc
->SystemValueType
= d
->SystemValueType
;
5345 desc
->ComponentType
= d
->ComponentType
;
5346 desc
->Register
= d
->Register
;
5347 desc
->ReadWriteMask
= d
->ReadWriteMask
;
5348 desc
->Mask
= d
->Mask
;
5354 static const struct ID3D10EffectShaderVariableVtbl d3d10_effect_shader_variable_vtbl
=
5356 /* ID3D10EffectVariable methods */
5357 d3d10_effect_shader_variable_IsValid
,
5358 d3d10_effect_shader_variable_GetType
,
5359 d3d10_effect_shader_variable_GetDesc
,
5360 d3d10_effect_shader_variable_GetAnnotationByIndex
,
5361 d3d10_effect_shader_variable_GetAnnotationByName
,
5362 d3d10_effect_shader_variable_GetMemberByIndex
,
5363 d3d10_effect_shader_variable_GetMemberByName
,
5364 d3d10_effect_shader_variable_GetMemberBySemantic
,
5365 d3d10_effect_shader_variable_GetElement
,
5366 d3d10_effect_shader_variable_GetParentConstantBuffer
,
5367 d3d10_effect_shader_variable_AsScalar
,
5368 d3d10_effect_shader_variable_AsVector
,
5369 d3d10_effect_shader_variable_AsMatrix
,
5370 d3d10_effect_shader_variable_AsString
,
5371 d3d10_effect_shader_variable_AsShaderResource
,
5372 d3d10_effect_shader_variable_AsRenderTargetView
,
5373 d3d10_effect_shader_variable_AsDepthStencilView
,
5374 d3d10_effect_shader_variable_AsConstantBuffer
,
5375 d3d10_effect_shader_variable_AsShader
,
5376 d3d10_effect_shader_variable_AsBlend
,
5377 d3d10_effect_shader_variable_AsDepthStencil
,
5378 d3d10_effect_shader_variable_AsRasterizer
,
5379 d3d10_effect_shader_variable_AsSampler
,
5380 d3d10_effect_shader_variable_SetRawValue
,
5381 d3d10_effect_shader_variable_GetRawValue
,
5382 /* ID3D10EffectShaderVariable methods */
5383 d3d10_effect_shader_variable_GetShaderDesc
,
5384 d3d10_effect_shader_variable_GetVertexShader
,
5385 d3d10_effect_shader_variable_GetGeometryShader
,
5386 d3d10_effect_shader_variable_GetPixelShader
,
5387 d3d10_effect_shader_variable_GetInputSignatureElementDesc
,
5388 d3d10_effect_shader_variable_GetOutputSignatureElementDesc
,
5391 /* ID3D10EffectVariable methods */
5393 static BOOL STDMETHODCALLTYPE
d3d10_effect_blend_variable_IsValid(ID3D10EffectBlendVariable
*iface
)
5395 TRACE("iface %p\n", iface
);
5397 return (struct d3d10_effect_variable
*)iface
!= &null_blend_variable
;
5400 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetType(
5401 ID3D10EffectBlendVariable
*iface
)
5403 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
5406 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetDesc(ID3D10EffectBlendVariable
*iface
,
5407 D3D10_EFFECT_VARIABLE_DESC
*desc
)
5409 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
5412 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetAnnotationByIndex(
5413 ID3D10EffectBlendVariable
*iface
, UINT index
)
5415 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
5418 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetAnnotationByName(
5419 ID3D10EffectBlendVariable
*iface
, LPCSTR name
)
5421 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
5424 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetMemberByIndex(
5425 ID3D10EffectBlendVariable
*iface
, UINT index
)
5427 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
5430 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetMemberByName(
5431 ID3D10EffectBlendVariable
*iface
, LPCSTR name
)
5433 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
5436 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetMemberBySemantic(
5437 ID3D10EffectBlendVariable
*iface
, LPCSTR semantic
)
5439 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
5442 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetElement(
5443 ID3D10EffectBlendVariable
*iface
, UINT index
)
5445 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
5448 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetParentConstantBuffer(
5449 ID3D10EffectBlendVariable
*iface
)
5451 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
5454 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsScalar(
5455 ID3D10EffectBlendVariable
*iface
)
5457 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
5460 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsVector(
5461 ID3D10EffectBlendVariable
*iface
)
5463 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
5466 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsMatrix(
5467 ID3D10EffectBlendVariable
*iface
)
5469 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
5472 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsString(
5473 ID3D10EffectBlendVariable
*iface
)
5475 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
5478 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsShaderResource(
5479 ID3D10EffectBlendVariable
*iface
)
5481 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
5484 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsRenderTargetView(
5485 ID3D10EffectBlendVariable
*iface
)
5487 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
5490 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsDepthStencilView(
5491 ID3D10EffectBlendVariable
*iface
)
5493 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
5496 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsConstantBuffer(
5497 ID3D10EffectBlendVariable
*iface
)
5499 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
5502 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsShader(
5503 ID3D10EffectBlendVariable
*iface
)
5505 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
5508 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsBlend(
5509 ID3D10EffectBlendVariable
*iface
)
5511 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
5514 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsDepthStencil(
5515 ID3D10EffectBlendVariable
*iface
)
5517 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
5520 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsRasterizer(
5521 ID3D10EffectBlendVariable
*iface
)
5523 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
5526 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsSampler(
5527 ID3D10EffectBlendVariable
*iface
)
5529 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
5532 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_SetRawValue(ID3D10EffectBlendVariable
*iface
,
5533 void *data
, UINT offset
, UINT count
)
5535 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5538 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetRawValue(ID3D10EffectBlendVariable
*iface
,
5539 void *data
, UINT offset
, UINT count
)
5541 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5544 /* ID3D10EffectBlendVariable methods */
5546 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetBlendState(ID3D10EffectBlendVariable
*iface
,
5547 UINT index
, ID3D10BlendState
**blend_state
)
5549 FIXME("iface %p, index %u, blend_state %p stub!\n", iface
, index
, blend_state
);
5554 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetBackingStore(ID3D10EffectBlendVariable
*iface
,
5555 UINT index
, D3D10_BLEND_DESC
*desc
)
5557 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
5563 static const struct ID3D10EffectBlendVariableVtbl d3d10_effect_blend_variable_vtbl
=
5565 /* ID3D10EffectVariable methods */
5566 d3d10_effect_blend_variable_IsValid
,
5567 d3d10_effect_blend_variable_GetType
,
5568 d3d10_effect_blend_variable_GetDesc
,
5569 d3d10_effect_blend_variable_GetAnnotationByIndex
,
5570 d3d10_effect_blend_variable_GetAnnotationByName
,
5571 d3d10_effect_blend_variable_GetMemberByIndex
,
5572 d3d10_effect_blend_variable_GetMemberByName
,
5573 d3d10_effect_blend_variable_GetMemberBySemantic
,
5574 d3d10_effect_blend_variable_GetElement
,
5575 d3d10_effect_blend_variable_GetParentConstantBuffer
,
5576 d3d10_effect_blend_variable_AsScalar
,
5577 d3d10_effect_blend_variable_AsVector
,
5578 d3d10_effect_blend_variable_AsMatrix
,
5579 d3d10_effect_blend_variable_AsString
,
5580 d3d10_effect_blend_variable_AsShaderResource
,
5581 d3d10_effect_blend_variable_AsRenderTargetView
,
5582 d3d10_effect_blend_variable_AsDepthStencilView
,
5583 d3d10_effect_blend_variable_AsConstantBuffer
,
5584 d3d10_effect_blend_variable_AsShader
,
5585 d3d10_effect_blend_variable_AsBlend
,
5586 d3d10_effect_blend_variable_AsDepthStencil
,
5587 d3d10_effect_blend_variable_AsRasterizer
,
5588 d3d10_effect_blend_variable_AsSampler
,
5589 d3d10_effect_blend_variable_SetRawValue
,
5590 d3d10_effect_blend_variable_GetRawValue
,
5591 /* ID3D10EffectBlendVariable methods */
5592 d3d10_effect_blend_variable_GetBlendState
,
5593 d3d10_effect_blend_variable_GetBackingStore
,
5596 /* ID3D10EffectVariable methods */
5598 static BOOL STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_IsValid(ID3D10EffectDepthStencilVariable
*iface
)
5600 TRACE("iface %p\n", iface
);
5602 return (struct d3d10_effect_variable
*)iface
!= &null_depth_stencil_variable
;
5605 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetType(
5606 ID3D10EffectDepthStencilVariable
*iface
)
5608 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
5611 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetDesc(ID3D10EffectDepthStencilVariable
*iface
,
5612 D3D10_EFFECT_VARIABLE_DESC
*desc
)
5614 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
5617 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetAnnotationByIndex(
5618 ID3D10EffectDepthStencilVariable
*iface
, UINT index
)
5620 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
5623 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetAnnotationByName(
5624 ID3D10EffectDepthStencilVariable
*iface
, LPCSTR name
)
5626 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
5629 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetMemberByIndex(
5630 ID3D10EffectDepthStencilVariable
*iface
, UINT index
)
5632 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
5635 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetMemberByName(
5636 ID3D10EffectDepthStencilVariable
*iface
, LPCSTR name
)
5638 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
5641 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetMemberBySemantic(
5642 ID3D10EffectDepthStencilVariable
*iface
, LPCSTR semantic
)
5644 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
5647 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetElement(
5648 ID3D10EffectDepthStencilVariable
*iface
, UINT index
)
5650 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
5653 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetParentConstantBuffer(
5654 ID3D10EffectDepthStencilVariable
*iface
)
5656 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
5659 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsScalar(
5660 ID3D10EffectDepthStencilVariable
*iface
)
5662 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
5665 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsVector(
5666 ID3D10EffectDepthStencilVariable
*iface
)
5668 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
5671 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsMatrix(
5672 ID3D10EffectDepthStencilVariable
*iface
)
5674 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
5677 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsString(
5678 ID3D10EffectDepthStencilVariable
*iface
)
5680 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
5683 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsShaderResource(
5684 ID3D10EffectDepthStencilVariable
*iface
)
5686 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
5689 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsRenderTargetView(
5690 ID3D10EffectDepthStencilVariable
*iface
)
5692 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
5695 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsDepthStencilView(
5696 ID3D10EffectDepthStencilVariable
*iface
)
5698 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
5701 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsConstantBuffer(
5702 ID3D10EffectDepthStencilVariable
*iface
)
5704 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
5707 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsShader(
5708 ID3D10EffectDepthStencilVariable
*iface
)
5710 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
5713 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsBlend(
5714 ID3D10EffectDepthStencilVariable
*iface
)
5716 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
5719 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsDepthStencil(
5720 ID3D10EffectDepthStencilVariable
*iface
)
5722 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
5725 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsRasterizer(
5726 ID3D10EffectDepthStencilVariable
*iface
)
5728 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
5731 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsSampler(
5732 ID3D10EffectDepthStencilVariable
*iface
)
5734 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
5737 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_SetRawValue(ID3D10EffectDepthStencilVariable
*iface
,
5738 void *data
, UINT offset
, UINT count
)
5740 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5743 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetRawValue(ID3D10EffectDepthStencilVariable
*iface
,
5744 void *data
, UINT offset
, UINT count
)
5746 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5749 /* ID3D10EffectDepthStencilVariable methods */
5751 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetDepthStencilState(ID3D10EffectDepthStencilVariable
*iface
,
5752 UINT index
, ID3D10DepthStencilState
**depth_stencil_state
)
5754 FIXME("iface %p, index %u, depth_stencil_state %p stub!\n", iface
, index
, depth_stencil_state
);
5759 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetBackingStore(ID3D10EffectDepthStencilVariable
*iface
,
5760 UINT index
, D3D10_DEPTH_STENCIL_DESC
*desc
)
5762 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
5768 static const struct ID3D10EffectDepthStencilVariableVtbl d3d10_effect_depth_stencil_variable_vtbl
=
5770 /* ID3D10EffectVariable methods */
5771 d3d10_effect_depth_stencil_variable_IsValid
,
5772 d3d10_effect_depth_stencil_variable_GetType
,
5773 d3d10_effect_depth_stencil_variable_GetDesc
,
5774 d3d10_effect_depth_stencil_variable_GetAnnotationByIndex
,
5775 d3d10_effect_depth_stencil_variable_GetAnnotationByName
,
5776 d3d10_effect_depth_stencil_variable_GetMemberByIndex
,
5777 d3d10_effect_depth_stencil_variable_GetMemberByName
,
5778 d3d10_effect_depth_stencil_variable_GetMemberBySemantic
,
5779 d3d10_effect_depth_stencil_variable_GetElement
,
5780 d3d10_effect_depth_stencil_variable_GetParentConstantBuffer
,
5781 d3d10_effect_depth_stencil_variable_AsScalar
,
5782 d3d10_effect_depth_stencil_variable_AsVector
,
5783 d3d10_effect_depth_stencil_variable_AsMatrix
,
5784 d3d10_effect_depth_stencil_variable_AsString
,
5785 d3d10_effect_depth_stencil_variable_AsShaderResource
,
5786 d3d10_effect_depth_stencil_variable_AsRenderTargetView
,
5787 d3d10_effect_depth_stencil_variable_AsDepthStencilView
,
5788 d3d10_effect_depth_stencil_variable_AsConstantBuffer
,
5789 d3d10_effect_depth_stencil_variable_AsShader
,
5790 d3d10_effect_depth_stencil_variable_AsBlend
,
5791 d3d10_effect_depth_stencil_variable_AsDepthStencil
,
5792 d3d10_effect_depth_stencil_variable_AsRasterizer
,
5793 d3d10_effect_depth_stencil_variable_AsSampler
,
5794 d3d10_effect_depth_stencil_variable_SetRawValue
,
5795 d3d10_effect_depth_stencil_variable_GetRawValue
,
5796 /* ID3D10EffectDepthStencilVariable methods */
5797 d3d10_effect_depth_stencil_variable_GetDepthStencilState
,
5798 d3d10_effect_depth_stencil_variable_GetBackingStore
,
5801 /* ID3D10EffectVariable methods */
5803 static BOOL STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_IsValid(ID3D10EffectRasterizerVariable
*iface
)
5805 TRACE("iface %p\n", iface
);
5807 return (struct d3d10_effect_variable
*)iface
!= &null_rasterizer_variable
;
5810 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetType(
5811 ID3D10EffectRasterizerVariable
*iface
)
5813 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
5816 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetDesc(ID3D10EffectRasterizerVariable
*iface
,
5817 D3D10_EFFECT_VARIABLE_DESC
*desc
)
5819 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
5822 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetAnnotationByIndex(
5823 ID3D10EffectRasterizerVariable
*iface
, UINT index
)
5825 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
5828 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetAnnotationByName(
5829 ID3D10EffectRasterizerVariable
*iface
, LPCSTR name
)
5831 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
5834 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetMemberByIndex(
5835 ID3D10EffectRasterizerVariable
*iface
, UINT index
)
5837 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
5840 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetMemberByName(
5841 ID3D10EffectRasterizerVariable
*iface
, LPCSTR name
)
5843 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
5846 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetMemberBySemantic(
5847 ID3D10EffectRasterizerVariable
*iface
, LPCSTR semantic
)
5849 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
5852 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetElement(
5853 ID3D10EffectRasterizerVariable
*iface
, UINT index
)
5855 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
5858 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetParentConstantBuffer(
5859 ID3D10EffectRasterizerVariable
*iface
)
5861 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
5864 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsScalar(
5865 ID3D10EffectRasterizerVariable
*iface
)
5867 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
5870 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsVector(
5871 ID3D10EffectRasterizerVariable
*iface
)
5873 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
5876 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsMatrix(
5877 ID3D10EffectRasterizerVariable
*iface
)
5879 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
5882 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsString(
5883 ID3D10EffectRasterizerVariable
*iface
)
5885 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
5888 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsShaderResource(
5889 ID3D10EffectRasterizerVariable
*iface
)
5891 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
5894 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsRenderTargetView(
5895 ID3D10EffectRasterizerVariable
*iface
)
5897 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
5900 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsDepthStencilView(
5901 ID3D10EffectRasterizerVariable
*iface
)
5903 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
5906 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsConstantBuffer(
5907 ID3D10EffectRasterizerVariable
*iface
)
5909 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
5912 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsShader(
5913 ID3D10EffectRasterizerVariable
*iface
)
5915 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
5918 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsBlend(
5919 ID3D10EffectRasterizerVariable
*iface
)
5921 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
5924 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsDepthStencil(
5925 ID3D10EffectRasterizerVariable
*iface
)
5927 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
5930 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsRasterizer(
5931 ID3D10EffectRasterizerVariable
*iface
)
5933 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
5936 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsSampler(
5937 ID3D10EffectRasterizerVariable
*iface
)
5939 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
5942 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_SetRawValue(ID3D10EffectRasterizerVariable
*iface
,
5943 void *data
, UINT offset
, UINT count
)
5945 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5948 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetRawValue(ID3D10EffectRasterizerVariable
*iface
,
5949 void *data
, UINT offset
, UINT count
)
5951 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5954 /* ID3D10EffectRasterizerVariable methods */
5956 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetRasterizerState(ID3D10EffectRasterizerVariable
*iface
,
5957 UINT index
, ID3D10RasterizerState
**rasterizer_state
)
5959 FIXME("iface %p, index %u, rasterizer_state %p stub!\n", iface
, index
, rasterizer_state
);
5964 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetBackingStore(ID3D10EffectRasterizerVariable
*iface
,
5965 UINT index
, D3D10_RASTERIZER_DESC
*desc
)
5967 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
5973 static const struct ID3D10EffectRasterizerVariableVtbl d3d10_effect_rasterizer_variable_vtbl
=
5975 /* ID3D10EffectVariable methods */
5976 d3d10_effect_rasterizer_variable_IsValid
,
5977 d3d10_effect_rasterizer_variable_GetType
,
5978 d3d10_effect_rasterizer_variable_GetDesc
,
5979 d3d10_effect_rasterizer_variable_GetAnnotationByIndex
,
5980 d3d10_effect_rasterizer_variable_GetAnnotationByName
,
5981 d3d10_effect_rasterizer_variable_GetMemberByIndex
,
5982 d3d10_effect_rasterizer_variable_GetMemberByName
,
5983 d3d10_effect_rasterizer_variable_GetMemberBySemantic
,
5984 d3d10_effect_rasterizer_variable_GetElement
,
5985 d3d10_effect_rasterizer_variable_GetParentConstantBuffer
,
5986 d3d10_effect_rasterizer_variable_AsScalar
,
5987 d3d10_effect_rasterizer_variable_AsVector
,
5988 d3d10_effect_rasterizer_variable_AsMatrix
,
5989 d3d10_effect_rasterizer_variable_AsString
,
5990 d3d10_effect_rasterizer_variable_AsShaderResource
,
5991 d3d10_effect_rasterizer_variable_AsRenderTargetView
,
5992 d3d10_effect_rasterizer_variable_AsDepthStencilView
,
5993 d3d10_effect_rasterizer_variable_AsConstantBuffer
,
5994 d3d10_effect_rasterizer_variable_AsShader
,
5995 d3d10_effect_rasterizer_variable_AsBlend
,
5996 d3d10_effect_rasterizer_variable_AsDepthStencil
,
5997 d3d10_effect_rasterizer_variable_AsRasterizer
,
5998 d3d10_effect_rasterizer_variable_AsSampler
,
5999 d3d10_effect_rasterizer_variable_SetRawValue
,
6000 d3d10_effect_rasterizer_variable_GetRawValue
,
6001 /* ID3D10EffectRasterizerVariable methods */
6002 d3d10_effect_rasterizer_variable_GetRasterizerState
,
6003 d3d10_effect_rasterizer_variable_GetBackingStore
,
6006 /* ID3D10EffectVariable methods */
6008 static BOOL STDMETHODCALLTYPE
d3d10_effect_sampler_variable_IsValid(ID3D10EffectSamplerVariable
*iface
)
6010 TRACE("iface %p\n", iface
);
6012 return (struct d3d10_effect_variable
*)iface
!= &null_sampler_variable
;
6015 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetType(
6016 ID3D10EffectSamplerVariable
*iface
)
6018 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
6021 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetDesc(ID3D10EffectSamplerVariable
*iface
,
6022 D3D10_EFFECT_VARIABLE_DESC
*desc
)
6024 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
6027 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetAnnotationByIndex(
6028 ID3D10EffectSamplerVariable
*iface
, UINT index
)
6030 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
6033 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetAnnotationByName(
6034 ID3D10EffectSamplerVariable
*iface
, LPCSTR name
)
6036 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
6039 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetMemberByIndex(
6040 ID3D10EffectSamplerVariable
*iface
, UINT index
)
6042 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
6045 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetMemberByName(
6046 ID3D10EffectSamplerVariable
*iface
, LPCSTR name
)
6048 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
6051 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetMemberBySemantic(
6052 ID3D10EffectSamplerVariable
*iface
, LPCSTR semantic
)
6054 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
6057 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetElement(
6058 ID3D10EffectSamplerVariable
*iface
, UINT index
)
6060 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
6063 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetParentConstantBuffer(
6064 ID3D10EffectSamplerVariable
*iface
)
6066 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
6069 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsScalar(
6070 ID3D10EffectSamplerVariable
*iface
)
6072 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
6075 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsVector(
6076 ID3D10EffectSamplerVariable
*iface
)
6078 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
6081 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsMatrix(
6082 ID3D10EffectSamplerVariable
*iface
)
6084 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
6087 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsString(
6088 ID3D10EffectSamplerVariable
*iface
)
6090 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
6093 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsShaderResource(
6094 ID3D10EffectSamplerVariable
*iface
)
6096 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
6099 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsRenderTargetView(
6100 ID3D10EffectSamplerVariable
*iface
)
6102 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
6105 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsDepthStencilView(
6106 ID3D10EffectSamplerVariable
*iface
)
6108 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
6111 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsConstantBuffer(
6112 ID3D10EffectSamplerVariable
*iface
)
6114 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
6117 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsShader(
6118 ID3D10EffectSamplerVariable
*iface
)
6120 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
6123 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsBlend(
6124 ID3D10EffectSamplerVariable
*iface
)
6126 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
6129 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsDepthStencil(
6130 ID3D10EffectSamplerVariable
*iface
)
6132 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
6135 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsRasterizer(
6136 ID3D10EffectSamplerVariable
*iface
)
6138 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
6141 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsSampler(
6142 ID3D10EffectSamplerVariable
*iface
)
6144 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
6147 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_SetRawValue(ID3D10EffectSamplerVariable
*iface
,
6148 void *data
, UINT offset
, UINT count
)
6150 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
6153 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetRawValue(ID3D10EffectSamplerVariable
*iface
,
6154 void *data
, UINT offset
, UINT count
)
6156 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
6159 /* ID3D10EffectSamplerVariable methods */
6161 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetSampler(ID3D10EffectSamplerVariable
*iface
,
6162 UINT index
, ID3D10SamplerState
**sampler
)
6164 FIXME("iface %p, index %u, sampler %p stub!\n", iface
, index
, sampler
);
6169 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetBackingStore(ID3D10EffectSamplerVariable
*iface
,
6170 UINT index
, D3D10_SAMPLER_DESC
*desc
)
6172 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
6178 static const struct ID3D10EffectSamplerVariableVtbl d3d10_effect_sampler_variable_vtbl
=
6180 /* ID3D10EffectVariable methods */
6181 d3d10_effect_sampler_variable_IsValid
,
6182 d3d10_effect_sampler_variable_GetType
,
6183 d3d10_effect_sampler_variable_GetDesc
,
6184 d3d10_effect_sampler_variable_GetAnnotationByIndex
,
6185 d3d10_effect_sampler_variable_GetAnnotationByName
,
6186 d3d10_effect_sampler_variable_GetMemberByIndex
,
6187 d3d10_effect_sampler_variable_GetMemberByName
,
6188 d3d10_effect_sampler_variable_GetMemberBySemantic
,
6189 d3d10_effect_sampler_variable_GetElement
,
6190 d3d10_effect_sampler_variable_GetParentConstantBuffer
,
6191 d3d10_effect_sampler_variable_AsScalar
,
6192 d3d10_effect_sampler_variable_AsVector
,
6193 d3d10_effect_sampler_variable_AsMatrix
,
6194 d3d10_effect_sampler_variable_AsString
,
6195 d3d10_effect_sampler_variable_AsShaderResource
,
6196 d3d10_effect_sampler_variable_AsRenderTargetView
,
6197 d3d10_effect_sampler_variable_AsDepthStencilView
,
6198 d3d10_effect_sampler_variable_AsConstantBuffer
,
6199 d3d10_effect_sampler_variable_AsShader
,
6200 d3d10_effect_sampler_variable_AsBlend
,
6201 d3d10_effect_sampler_variable_AsDepthStencil
,
6202 d3d10_effect_sampler_variable_AsRasterizer
,
6203 d3d10_effect_sampler_variable_AsSampler
,
6204 d3d10_effect_sampler_variable_SetRawValue
,
6205 d3d10_effect_sampler_variable_GetRawValue
,
6206 /* ID3D10EffectSamplerVariable methods */
6207 d3d10_effect_sampler_variable_GetSampler
,
6208 d3d10_effect_sampler_variable_GetBackingStore
,
6211 /* ID3D10EffectType methods */
6213 static inline struct d3d10_effect_type
*impl_from_ID3D10EffectType(ID3D10EffectType
*iface
)
6215 return CONTAINING_RECORD(iface
, struct d3d10_effect_type
, ID3D10EffectType_iface
);
6218 static BOOL STDMETHODCALLTYPE
d3d10_effect_type_IsValid(ID3D10EffectType
*iface
)
6220 struct d3d10_effect_type
*This
= impl_from_ID3D10EffectType(iface
);
6222 TRACE("iface %p\n", iface
);
6224 return This
!= &null_type
;
6227 static HRESULT STDMETHODCALLTYPE
d3d10_effect_type_GetDesc(ID3D10EffectType
*iface
, D3D10_EFFECT_TYPE_DESC
*desc
)
6229 struct d3d10_effect_type
*This
= impl_from_ID3D10EffectType(iface
);
6231 TRACE("iface %p, desc %p\n", iface
, desc
);
6233 if (This
== &null_type
)
6235 WARN("Null type specified\n");
6241 WARN("Invalid argument specified\n");
6242 return E_INVALIDARG
;
6245 desc
->TypeName
= This
->name
;
6246 desc
->Class
= This
->type_class
;
6247 desc
->Type
= This
->basetype
;
6248 desc
->Elements
= This
->element_count
;
6249 desc
->Members
= This
->member_count
;
6250 desc
->Rows
= This
->row_count
;
6251 desc
->Columns
= This
->column_count
;
6252 desc
->PackedSize
= This
->size_packed
;
6253 desc
->UnpackedSize
= This
->size_unpacked
;
6254 desc
->Stride
= This
->stride
;
6259 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_type_GetMemberTypeByIndex(ID3D10EffectType
*iface
,
6262 struct d3d10_effect_type
*This
= impl_from_ID3D10EffectType(iface
);
6263 struct d3d10_effect_type
*t
;
6265 TRACE("iface %p, index %u\n", iface
, index
);
6267 if (index
>= This
->member_count
)
6269 WARN("Invalid index specified\n");
6270 return &null_type
.ID3D10EffectType_iface
;
6273 t
= (&This
->members
[index
])->type
;
6275 TRACE("Returning member %p, %s\n", t
, debugstr_a(t
->name
));
6277 return &t
->ID3D10EffectType_iface
;
6280 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_type_GetMemberTypeByName(ID3D10EffectType
*iface
,
6283 struct d3d10_effect_type
*This
= impl_from_ID3D10EffectType(iface
);
6286 TRACE("iface %p, name %s\n", iface
, debugstr_a(name
));
6290 WARN("Invalid name specified\n");
6291 return &null_type
.ID3D10EffectType_iface
;
6294 for (i
= 0; i
< This
->member_count
; ++i
)
6296 struct d3d10_effect_type_member
*typem
= &This
->members
[i
];
6300 if (!strcmp(typem
->name
, name
))
6302 TRACE("Returning type %p.\n", typem
->type
);
6303 return &typem
->type
->ID3D10EffectType_iface
;
6308 WARN("Invalid name specified\n");
6310 return &null_type
.ID3D10EffectType_iface
;
6313 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_type_GetMemberTypeBySemantic(ID3D10EffectType
*iface
,
6316 struct d3d10_effect_type
*This
= impl_from_ID3D10EffectType(iface
);
6319 TRACE("iface %p, semantic %s\n", iface
, debugstr_a(semantic
));
6323 WARN("Invalid semantic specified\n");
6324 return &null_type
.ID3D10EffectType_iface
;
6327 for (i
= 0; i
< This
->member_count
; ++i
)
6329 struct d3d10_effect_type_member
*typem
= &This
->members
[i
];
6331 if (typem
->semantic
)
6333 if (!strcmp(typem
->semantic
, semantic
))
6335 TRACE("Returning type %p.\n", typem
->type
);
6336 return &typem
->type
->ID3D10EffectType_iface
;
6341 WARN("Invalid semantic specified\n");
6343 return &null_type
.ID3D10EffectType_iface
;
6346 static LPCSTR STDMETHODCALLTYPE
d3d10_effect_type_GetMemberName(ID3D10EffectType
*iface
, UINT index
)
6348 struct d3d10_effect_type
*This
= impl_from_ID3D10EffectType(iface
);
6349 struct d3d10_effect_type_member
*typem
;
6351 TRACE("iface %p, index %u\n", iface
, index
);
6353 if (index
>= This
->member_count
)
6355 WARN("Invalid index specified\n");
6359 typem
= &This
->members
[index
];
6361 TRACE("Returning name %s\n", debugstr_a(typem
->name
));
6366 static LPCSTR STDMETHODCALLTYPE
d3d10_effect_type_GetMemberSemantic(ID3D10EffectType
*iface
, UINT index
)
6368 struct d3d10_effect_type
*This
= impl_from_ID3D10EffectType(iface
);
6369 struct d3d10_effect_type_member
*typem
;
6371 TRACE("iface %p, index %u\n", iface
, index
);
6373 if (index
>= This
->member_count
)
6375 WARN("Invalid index specified\n");
6379 typem
= &This
->members
[index
];
6381 TRACE("Returning semantic %s\n", debugstr_a(typem
->semantic
));
6383 return typem
->semantic
;
6386 static const struct ID3D10EffectTypeVtbl d3d10_effect_type_vtbl
=
6388 /* ID3D10EffectType */
6389 d3d10_effect_type_IsValid
,
6390 d3d10_effect_type_GetDesc
,
6391 d3d10_effect_type_GetMemberTypeByIndex
,
6392 d3d10_effect_type_GetMemberTypeByName
,
6393 d3d10_effect_type_GetMemberTypeBySemantic
,
6394 d3d10_effect_type_GetMemberName
,
6395 d3d10_effect_type_GetMemberSemantic
,