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 MAKE_TAG(ch0, ch1, ch2, ch3) \
29 ((DWORD)(ch0) | ((DWORD)(ch1) << 8) | \
30 ((DWORD)(ch2) << 16) | ((DWORD)(ch3) << 24 ))
31 #define TAG_DXBC MAKE_TAG('D', 'X', 'B', 'C')
32 #define TAG_FX10 MAKE_TAG('F', 'X', '1', '0')
33 #define TAG_ISGN MAKE_TAG('I', 'S', 'G', 'N')
34 #define TAG_OSGN MAKE_TAG('O', 'S', 'G', 'N')
36 #define D3D10_FX10_TYPE_COLUMN_SHIFT 11
37 #define D3D10_FX10_TYPE_COLUMN_MASK (0x7 << D3D10_FX10_TYPE_COLUMN_SHIFT)
39 #define D3D10_FX10_TYPE_ROW_SHIFT 8
40 #define D3D10_FX10_TYPE_ROW_MASK (0x7 << D3D10_FX10_TYPE_ROW_SHIFT)
42 #define D3D10_FX10_TYPE_BASETYPE_SHIFT 3
43 #define D3D10_FX10_TYPE_BASETYPE_MASK (0x1f << D3D10_FX10_TYPE_BASETYPE_SHIFT)
45 #define D3D10_FX10_TYPE_CLASS_SHIFT 0
46 #define D3D10_FX10_TYPE_CLASS_MASK (0x7 << D3D10_FX10_TYPE_CLASS_SHIFT)
48 #define D3D10_FX10_TYPE_MATRIX_COLUMN_MAJOR_MASK 0x4000
50 static const struct ID3D10EffectTechniqueVtbl d3d10_effect_technique_vtbl
;
51 static const struct ID3D10EffectPassVtbl d3d10_effect_pass_vtbl
;
52 static const struct ID3D10EffectVariableVtbl d3d10_effect_variable_vtbl
;
53 static const struct ID3D10EffectConstantBufferVtbl d3d10_effect_constant_buffer_vtbl
;
54 static const struct ID3D10EffectScalarVariableVtbl d3d10_effect_scalar_variable_vtbl
;
55 static const struct ID3D10EffectVectorVariableVtbl d3d10_effect_vector_variable_vtbl
;
56 static const struct ID3D10EffectMatrixVariableVtbl d3d10_effect_matrix_variable_vtbl
;
57 static const struct ID3D10EffectStringVariableVtbl d3d10_effect_string_variable_vtbl
;
58 static const struct ID3D10EffectShaderResourceVariableVtbl d3d10_effect_shader_resource_variable_vtbl
;
59 static const struct ID3D10EffectRenderTargetViewVariableVtbl d3d10_effect_render_target_view_variable_vtbl
;
60 static const struct ID3D10EffectDepthStencilViewVariableVtbl d3d10_effect_depth_stencil_view_variable_vtbl
;
61 static const struct ID3D10EffectShaderVariableVtbl d3d10_effect_shader_variable_vtbl
;
62 static const struct ID3D10EffectBlendVariableVtbl d3d10_effect_blend_variable_vtbl
;
63 static const struct ID3D10EffectDepthStencilVariableVtbl d3d10_effect_depth_stencil_variable_vtbl
;
64 static const struct ID3D10EffectRasterizerVariableVtbl d3d10_effect_rasterizer_variable_vtbl
;
65 static const struct ID3D10EffectSamplerVariableVtbl d3d10_effect_sampler_variable_vtbl
;
66 static const struct ID3D10EffectTypeVtbl d3d10_effect_type_vtbl
;
68 /* null objects - needed for invalid calls */
69 static struct d3d10_effect_technique null_technique
= {&d3d10_effect_technique_vtbl
};
70 static struct d3d10_effect_pass null_pass
= {&d3d10_effect_pass_vtbl
};
71 static struct d3d10_effect_type null_type
= {&d3d10_effect_type_vtbl
};
72 static struct d3d10_effect_variable null_local_buffer
= {(const ID3D10EffectVariableVtbl
*)&d3d10_effect_constant_buffer_vtbl
,
73 &null_local_buffer
, &null_type
};
74 static struct d3d10_effect_variable null_variable
= {&d3d10_effect_variable_vtbl
,
75 &null_local_buffer
, &null_type
};
76 static struct d3d10_effect_variable null_scalar_variable
= {(const ID3D10EffectVariableVtbl
*)&d3d10_effect_scalar_variable_vtbl
,
77 &null_local_buffer
, &null_type
};
78 static struct d3d10_effect_variable null_vector_variable
= {(const ID3D10EffectVariableVtbl
*)&d3d10_effect_vector_variable_vtbl
,
79 &null_local_buffer
, &null_type
};
80 static struct d3d10_effect_variable null_matrix_variable
= {(const ID3D10EffectVariableVtbl
*)&d3d10_effect_matrix_variable_vtbl
,
81 &null_local_buffer
, &null_type
};
82 static struct d3d10_effect_variable null_string_variable
= {(const ID3D10EffectVariableVtbl
*)&d3d10_effect_string_variable_vtbl
,
83 &null_local_buffer
, &null_type
};
84 static struct d3d10_effect_variable null_shader_resource_variable
= {(const ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_resource_variable_vtbl
,
85 &null_local_buffer
, &null_type
};
86 static struct d3d10_effect_variable null_render_target_view_variable
= {(const ID3D10EffectVariableVtbl
*)&d3d10_effect_render_target_view_variable_vtbl
,
87 &null_local_buffer
, &null_type
};
88 static struct d3d10_effect_variable null_depth_stencil_view_variable
= {(const ID3D10EffectVariableVtbl
*)&d3d10_effect_depth_stencil_view_variable_vtbl
,
89 &null_local_buffer
, &null_type
};
90 static struct d3d10_effect_variable null_shader_variable
= {(const ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_variable_vtbl
,
91 &null_local_buffer
, &null_type
};
92 static struct d3d10_effect_variable null_blend_variable
= {(const ID3D10EffectVariableVtbl
*)&d3d10_effect_blend_variable_vtbl
,
93 &null_local_buffer
, &null_type
};
94 static struct d3d10_effect_variable null_depth_stencil_variable
= {(const ID3D10EffectVariableVtbl
*)&d3d10_effect_depth_stencil_variable_vtbl
,
95 &null_local_buffer
, &null_type
};
96 static struct d3d10_effect_variable null_rasterizer_variable
= {(const ID3D10EffectVariableVtbl
*)&d3d10_effect_rasterizer_variable_vtbl
,
97 &null_local_buffer
, &null_type
};
98 static struct d3d10_effect_variable null_sampler_variable
= {(const ID3D10EffectVariableVtbl
*)&d3d10_effect_sampler_variable_vtbl
,
99 &null_local_buffer
, &null_type
};
101 /* anonymous_shader_type and anonymous_shader */
102 static char anonymous_name
[] = "$Anonymous";
103 static char anonymous_vertexshader_name
[] = "vertexshader";
104 static char anonymous_pixelshader_name
[] = "pixelshader";
105 static char anonymous_geometryshader_name
[] = "geometryshader";
106 static struct d3d10_effect_type anonymous_vs_type
= {&d3d10_effect_type_vtbl
, anonymous_vertexshader_name
,
107 D3D10_SVT_VERTEXSHADER
, D3D10_SVC_OBJECT
};
108 static struct d3d10_effect_type anonymous_ps_type
= {&d3d10_effect_type_vtbl
, anonymous_pixelshader_name
,
109 D3D10_SVT_PIXELSHADER
, D3D10_SVC_OBJECT
};
110 static struct d3d10_effect_type anonymous_gs_type
= {&d3d10_effect_type_vtbl
, anonymous_geometryshader_name
,
111 D3D10_SVT_GEOMETRYSHADER
, D3D10_SVC_OBJECT
};
112 static struct d3d10_effect_variable anonymous_vs
= {(const ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_variable_vtbl
,
113 &null_local_buffer
, &anonymous_vs_type
, &null_shader_variable
, anonymous_name
};
114 static struct d3d10_effect_variable anonymous_ps
= {(const ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_variable_vtbl
,
115 &null_local_buffer
, &anonymous_ps_type
, &null_shader_variable
, anonymous_name
};
116 static struct d3d10_effect_variable anonymous_gs
= {(const ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_variable_vtbl
,
117 &null_local_buffer
, &anonymous_gs_type
, &null_shader_variable
, anonymous_name
};
119 static struct d3d10_effect_type
*get_fx10_type(struct d3d10_effect
*effect
, const char *data
, DWORD offset
);
121 static inline void read_dword(const char **ptr
, DWORD
*d
)
123 memcpy(d
, *ptr
, sizeof(*d
));
127 static inline void skip_dword_unknown(const char **ptr
, unsigned int count
)
132 FIXME("Skipping %u unknown DWORDs:\n", count
);
133 for (i
= 0; i
< count
; ++i
)
136 FIXME("\t0x%08x\n", d
);
140 static inline void write_dword(char **ptr
, DWORD d
)
142 memcpy(*ptr
, &d
, sizeof(d
));
146 static inline void write_dword_unknown(char **ptr
, DWORD d
)
148 FIXME("Writing unknown DWORD 0x%08x\n", d
);
152 static HRESULT
parse_dxbc(const char *data
, SIZE_T data_size
,
153 HRESULT (*chunk_handler
)(const char *data
, DWORD data_size
, DWORD tag
, void *ctx
), void *ctx
)
155 const char *ptr
= data
;
162 read_dword(&ptr
, &tag
);
163 TRACE("tag: %s.\n", debugstr_an((const char *)&tag
, 4));
167 WARN("Wrong tag.\n");
172 skip_dword_unknown(&ptr
, 4);
174 skip_dword_unknown(&ptr
, 1);
176 read_dword(&ptr
, &total_size
);
177 TRACE("total size: %#x\n", total_size
);
179 read_dword(&ptr
, &chunk_count
);
180 TRACE("chunk count: %#x\n", chunk_count
);
182 for (i
= 0; i
< chunk_count
; ++i
)
184 DWORD chunk_tag
, chunk_size
;
185 const char *chunk_ptr
;
188 read_dword(&ptr
, &chunk_offset
);
189 TRACE("chunk %u at offset %#x\n", i
, chunk_offset
);
191 chunk_ptr
= data
+ chunk_offset
;
193 read_dword(&chunk_ptr
, &chunk_tag
);
194 read_dword(&chunk_ptr
, &chunk_size
);
196 hr
= chunk_handler(chunk_ptr
, chunk_size
, chunk_tag
, ctx
);
197 if (FAILED(hr
)) break;
203 static BOOL
copy_name(const char *ptr
, char **name
)
207 if (!ptr
) return TRUE
;
209 name_len
= strlen(ptr
) + 1;
215 *name
= HeapAlloc(GetProcessHeap(), 0, name_len
);
218 ERR("Failed to allocate name memory.\n");
222 memcpy(*name
, ptr
, name_len
);
227 static HRESULT
shader_parse_signature(const char *data
, DWORD data_size
, struct d3d10_effect_shader_signature
*s
)
229 D3D10_SIGNATURE_PARAMETER_DESC
*e
;
230 const char *ptr
= data
;
234 read_dword(&ptr
, &count
);
235 TRACE("%u elements\n", count
);
237 skip_dword_unknown(&ptr
, 1);
239 e
= HeapAlloc(GetProcessHeap(), 0, count
* sizeof(*e
));
242 ERR("Failed to allocate signature memory.\n");
243 return E_OUTOFMEMORY
;
246 for (i
= 0; i
< count
; ++i
)
251 read_dword(&ptr
, &name_offset
);
252 e
[i
].SemanticName
= data
+ name_offset
;
253 read_dword(&ptr
, &e
[i
].SemanticIndex
);
254 read_dword(&ptr
, &e
[i
].SystemValueType
);
255 read_dword(&ptr
, &e
[i
].ComponentType
);
256 read_dword(&ptr
, &e
[i
].Register
);
257 read_dword(&ptr
, &mask
);
259 e
[i
].ReadWriteMask
= mask
>> 8;
260 e
[i
].Mask
= mask
& 0xff;
262 TRACE("semantic: %s, semantic idx: %u, sysval_semantic %#x, "
263 "type %u, register idx: %u, use_mask %#x, input_mask %#x\n",
264 debugstr_a(e
[i
].SemanticName
), e
[i
].SemanticIndex
, e
[i
].SystemValueType
,
265 e
[i
].ComponentType
, e
[i
].Register
, e
[i
].Mask
, e
[i
].ReadWriteMask
);
269 s
->element_count
= count
;
274 static void shader_free_signature(struct d3d10_effect_shader_signature
*s
)
276 HeapFree(GetProcessHeap(), 0, s
->signature
);
277 HeapFree(GetProcessHeap(), 0, s
->elements
);
280 static HRESULT
shader_chunk_handler(const char *data
, DWORD data_size
, DWORD tag
, void *ctx
)
282 struct d3d10_effect_shader_variable
*s
= ctx
;
285 TRACE("tag: %s.\n", debugstr_an((const char *)&tag
, 4));
287 TRACE("chunk size: %#x\n", data_size
);
294 /* 32 (DXBC header) + 1 * 4 (chunk index) + 2 * 4 (chunk header) + data_size (chunk data) */
295 UINT size
= 44 + data_size
;
296 struct d3d10_effect_shader_signature
*sig
;
299 if (tag
== TAG_ISGN
) sig
= &s
->input_signature
;
300 else sig
= &s
->output_signature
;
302 sig
->signature
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, size
);
305 ERR("Failed to allocate input signature data\n");
306 return E_OUTOFMEMORY
;
308 sig
->signature_size
= size
;
310 ptr
= sig
->signature
;
312 write_dword(&ptr
, TAG_DXBC
);
315 write_dword_unknown(&ptr
, 0);
316 write_dword_unknown(&ptr
, 0);
317 write_dword_unknown(&ptr
, 0);
318 write_dword_unknown(&ptr
, 0);
320 /* seems to be always 1 */
321 write_dword_unknown(&ptr
, 1);
324 write_dword(&ptr
, size
);
327 write_dword(&ptr
, 1);
330 write_dword(&ptr
, (ptr
- sig
->signature
) + 4);
333 write_dword(&ptr
, tag
);
334 write_dword(&ptr
, data_size
);
335 memcpy(ptr
, data
, data_size
);
337 hr
= shader_parse_signature(ptr
, data_size
, sig
);
340 ERR("Failed to parse shader, hr %#x\n", hr
);
341 shader_free_signature(sig
);
348 FIXME("Unhandled chunk %s.\n", debugstr_an((const char *)&tag
, 4));
355 static HRESULT
parse_shader(struct d3d10_effect_variable
*v
, const char *data
)
357 ID3D10Device
*device
= v
->effect
->device
;
358 struct d3d10_effect_shader_variable
*s
;
359 const char *ptr
= data
;
363 s
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(*s
));
366 ERR("Failed to allocate shader variable memory\n");
367 return E_OUTOFMEMORY
;
372 if (v
->effect
->used_shader_current
>= v
->effect
->used_shader_count
)
374 WARN("Invalid shader? Used shader current(%u) >= used shader count(%u)\n", v
->effect
->used_shader_current
, v
->effect
->used_shader_count
);
378 v
->effect
->used_shaders
[v
->effect
->used_shader_current
] = v
;
379 ++v
->effect
->used_shader_current
;
381 if (!ptr
) return S_OK
;
383 read_dword(&ptr
, &dxbc_size
);
384 TRACE("dxbc size: %#x\n", dxbc_size
);
386 /* We got a shader VertexShader vs = NULL, so it is fine to skip this. */
387 if (!dxbc_size
) return S_OK
;
389 switch (v
->type
->basetype
)
391 case D3D10_SVT_VERTEXSHADER
:
392 hr
= ID3D10Device_CreateVertexShader(device
, ptr
, dxbc_size
, &s
->shader
.vs
);
393 if (FAILED(hr
)) return hr
;
396 case D3D10_SVT_PIXELSHADER
:
397 hr
= ID3D10Device_CreatePixelShader(device
, ptr
, dxbc_size
, &s
->shader
.ps
);
398 if (FAILED(hr
)) return hr
;
401 case D3D10_SVT_GEOMETRYSHADER
:
402 hr
= ID3D10Device_CreateGeometryShader(device
, ptr
, dxbc_size
, &s
->shader
.gs
);
403 if (FAILED(hr
)) return hr
;
407 ERR("This should not happen!\n");
411 return parse_dxbc(ptr
, dxbc_size
, shader_chunk_handler
, s
);
414 static D3D10_SHADER_VARIABLE_CLASS
d3d10_variable_class(DWORD c
, BOOL is_column_major
)
418 case 1: return D3D10_SVC_SCALAR
;
419 case 2: return D3D10_SVC_VECTOR
;
420 case 3: if (is_column_major
) return D3D10_SVC_MATRIX_COLUMNS
;
421 else return D3D10_SVC_MATRIX_ROWS
;
423 FIXME("Unknown variable class %#x.\n", c
);
428 static D3D10_SHADER_VARIABLE_TYPE
d3d10_variable_type(DWORD t
, BOOL is_object
)
434 case 1: return D3D10_SVT_STRING
;
435 case 2: return D3D10_SVT_BLEND
;
436 case 3: return D3D10_SVT_DEPTHSTENCIL
;
437 case 4: return D3D10_SVT_RASTERIZER
;
438 case 5: return D3D10_SVT_PIXELSHADER
;
439 case 6: return D3D10_SVT_VERTEXSHADER
;
440 case 7: return D3D10_SVT_GEOMETRYSHADER
;
442 case 10: return D3D10_SVT_TEXTURE1D
;
443 case 11: return D3D10_SVT_TEXTURE1DARRAY
;
444 case 12: return D3D10_SVT_TEXTURE2D
;
445 case 13: return D3D10_SVT_TEXTURE2DARRAY
;
446 case 14: return D3D10_SVT_TEXTURE2DMS
;
447 case 15: return D3D10_SVT_TEXTURE2DMSARRAY
;
448 case 16: return D3D10_SVT_TEXTURE3D
;
449 case 17: return D3D10_SVT_TEXTURECUBE
;
451 case 19: return D3D10_SVT_RENDERTARGETVIEW
;
452 case 20: return D3D10_SVT_DEPTHSTENCILVIEW
;
453 case 21: return D3D10_SVT_SAMPLER
;
455 FIXME("Unknown variable type %#x.\n", t
);
463 case 1: return D3D10_SVT_FLOAT
;
464 case 2: return D3D10_SVT_INT
;
465 case 3: return D3D10_SVT_UINT
;
466 case 4: return D3D10_SVT_BOOL
;
468 FIXME("Unknown variable type %#x.\n", t
);
474 static HRESULT
parse_fx10_type(struct d3d10_effect_type
*t
, const char *ptr
, const char *data
)
481 read_dword(&ptr
, &offset
);
482 TRACE("Type name at offset %#x.\n", offset
);
484 if (!copy_name(data
+ offset
, &t
->name
))
486 ERR("Failed to copy name.\n");
487 return E_OUTOFMEMORY
;
489 TRACE("Type name: %s.\n", debugstr_a(t
->name
));
491 read_dword(&ptr
, &unknown0
);
492 TRACE("Unknown 0: %u.\n", unknown0
);
494 read_dword(&ptr
, &t
->element_count
);
495 TRACE("Element count: %u.\n", t
->element_count
);
497 read_dword(&ptr
, &t
->size_unpacked
);
498 TRACE("Unpacked size: %#x.\n", t
->size_unpacked
);
500 read_dword(&ptr
, &t
->stride
);
501 TRACE("Stride: %#x.\n", t
->stride
);
503 read_dword(&ptr
, &t
->size_packed
);
504 TRACE("Packed size %#x.\n", t
->size_packed
);
511 read_dword(&ptr
, &typeinfo
);
512 t
->column_count
= (typeinfo
& D3D10_FX10_TYPE_COLUMN_MASK
) >> D3D10_FX10_TYPE_COLUMN_SHIFT
;
513 t
->row_count
= (typeinfo
& D3D10_FX10_TYPE_ROW_MASK
) >> D3D10_FX10_TYPE_ROW_SHIFT
;
514 t
->basetype
= d3d10_variable_type((typeinfo
& D3D10_FX10_TYPE_BASETYPE_MASK
) >> D3D10_FX10_TYPE_BASETYPE_SHIFT
, FALSE
);
515 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
);
517 TRACE("Type description: %#x.\n", typeinfo
);
518 TRACE("\tcolumns: %u.\n", t
->column_count
);
519 TRACE("\trows: %u.\n", t
->row_count
);
520 TRACE("\tbasetype: %s.\n", debug_d3d10_shader_variable_type(t
->basetype
));
521 TRACE("\tclass: %s.\n", debug_d3d10_shader_variable_class(t
->type_class
));
522 TRACE("\tunknown bits: %#x.\n", typeinfo
& ~(D3D10_FX10_TYPE_COLUMN_MASK
| D3D10_FX10_TYPE_ROW_MASK
523 | D3D10_FX10_TYPE_BASETYPE_MASK
| D3D10_FX10_TYPE_CLASS_MASK
| D3D10_FX10_TYPE_MATRIX_COLUMN_MAJOR_MASK
));
527 TRACE("Type is an object.\n");
532 t
->type_class
= D3D10_SVC_OBJECT
;
534 read_dword(&ptr
, &typeinfo
);
535 t
->basetype
= d3d10_variable_type(typeinfo
, TRUE
);
537 TRACE("Type description: %#x.\n", typeinfo
);
538 TRACE("\tbasetype: %s.\n", debug_d3d10_shader_variable_type(t
->basetype
));
539 TRACE("\tclass: %s.\n", debug_d3d10_shader_variable_class(t
->type_class
));
543 TRACE("Type is a structure.\n");
545 read_dword(&ptr
, &t
->member_count
);
546 TRACE("Member count: %u.\n", t
->member_count
);
551 t
->type_class
= D3D10_SVC_STRUCT
;
553 t
->members
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, t
->member_count
* sizeof(*t
->members
));
556 ERR("Failed to allocate members memory.\n");
557 return E_OUTOFMEMORY
;
560 for (i
= 0; i
< t
->member_count
; ++i
)
562 struct d3d10_effect_type_member
*typem
= &t
->members
[i
];
564 read_dword(&ptr
, &offset
);
565 TRACE("Member name at offset %#x.\n", offset
);
567 if (!copy_name(data
+ offset
, &typem
->name
))
569 ERR("Failed to copy name.\n");
570 return E_OUTOFMEMORY
;
572 TRACE("Member name: %s.\n", debugstr_a(typem
->name
));
574 read_dword(&ptr
, &offset
);
575 TRACE("Member semantic at offset %#x.\n", offset
);
577 if (!copy_name(data
+ offset
, &typem
->semantic
))
579 ERR("Failed to copy semantic.\n");
580 return E_OUTOFMEMORY
;
582 TRACE("Member semantic: %s.\n", debugstr_a(typem
->semantic
));
584 read_dword(&ptr
, &typem
->buffer_offset
);
585 TRACE("Member offset in struct: %#x.\n", typem
->buffer_offset
);
587 read_dword(&ptr
, &offset
);
588 TRACE("Member type info at offset %#x.\n", offset
);
590 typem
->type
= get_fx10_type(t
->effect
, data
, offset
);
593 ERR("Failed to get variable type.\n");
600 FIXME("Unhandled case %#x.\n", unknown0
);
604 if (t
->element_count
)
606 TRACE("Elementtype for type at offset: %#x\n", t
->id
);
608 /* allocate elementtype - we need only one, because all elements have the same type */
609 t
->elementtype
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(*t
->elementtype
));
612 ERR("Failed to allocate members memory.\n");
613 return E_OUTOFMEMORY
;
616 /* create a copy of the original type with some minor changes */
617 t
->elementtype
->vtbl
= &d3d10_effect_type_vtbl
;
618 t
->elementtype
->effect
= t
->effect
;
620 if (!copy_name(t
->name
, &t
->elementtype
->name
))
622 ERR("Failed to copy name.\n");
623 return E_OUTOFMEMORY
;
625 TRACE("\tType name: %s.\n", debugstr_a(t
->elementtype
->name
));
627 t
->elementtype
->element_count
= 0;
628 TRACE("\tElement count: %u.\n", t
->elementtype
->element_count
);
631 * Not sure if this calculation is 100% correct, but a test
632 * show's that these values work.
634 t
->elementtype
->size_unpacked
= t
->size_packed
/ t
->element_count
;
635 TRACE("\tUnpacked size: %#x.\n", t
->elementtype
->size_unpacked
);
637 t
->elementtype
->stride
= t
->stride
;
638 TRACE("\tStride: %#x.\n", t
->elementtype
->stride
);
640 t
->elementtype
->size_packed
= t
->size_packed
/ t
->element_count
;
641 TRACE("\tPacked size: %#x.\n", t
->elementtype
->size_packed
);
643 t
->elementtype
->member_count
= t
->member_count
;
644 TRACE("\tMember count: %u.\n", t
->elementtype
->member_count
);
646 t
->elementtype
->column_count
= t
->column_count
;
647 TRACE("\tColumns: %u.\n", t
->elementtype
->column_count
);
649 t
->elementtype
->row_count
= t
->row_count
;
650 TRACE("\tRows: %u.\n", t
->elementtype
->row_count
);
652 t
->elementtype
->basetype
= t
->basetype
;
653 TRACE("\tBasetype: %s.\n", debug_d3d10_shader_variable_type(t
->elementtype
->basetype
));
655 t
->elementtype
->type_class
= t
->type_class
;
656 TRACE("\tClass: %s.\n", debug_d3d10_shader_variable_class(t
->elementtype
->type_class
));
658 t
->elementtype
->members
= t
->members
;
664 static struct d3d10_effect_type
*get_fx10_type(struct d3d10_effect
*effect
, const char *data
, DWORD offset
)
666 struct d3d10_effect_type
*type
;
667 struct wine_rb_entry
*entry
;
670 entry
= wine_rb_get(&effect
->types
, &offset
);
673 TRACE("Returning existing type.\n");
674 return WINE_RB_ENTRY_VALUE(entry
, struct d3d10_effect_type
, entry
);
677 type
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(*type
));
680 ERR("Failed to allocate type memory.\n");
684 type
->vtbl
= &d3d10_effect_type_vtbl
;
686 type
->effect
= effect
;
687 hr
= parse_fx10_type(type
, data
+ offset
, data
);
690 ERR("Failed to parse type info, hr %#x.\n", hr
);
691 HeapFree(GetProcessHeap(), 0, type
);
695 if (wine_rb_put(&effect
->types
, &offset
, &type
->entry
) == -1)
697 ERR("Failed to insert type entry.\n");
698 HeapFree(GetProcessHeap(), 0, type
);
705 static void set_variable_vtbl(struct d3d10_effect_variable
*v
)
707 switch (v
->type
->type_class
)
709 case D3D10_SVC_SCALAR
:
710 v
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_scalar_variable_vtbl
;
713 case D3D10_SVC_VECTOR
:
714 v
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_vector_variable_vtbl
;
717 case D3D10_SVC_MATRIX_ROWS
:
718 case D3D10_SVC_MATRIX_COLUMNS
:
719 v
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_matrix_variable_vtbl
;
722 case D3D10_SVC_STRUCT
:
723 v
->vtbl
= &d3d10_effect_variable_vtbl
;
726 case D3D10_SVC_OBJECT
:
727 switch(v
->type
->basetype
)
729 case D3D10_SVT_STRING
:
730 v
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_string_variable_vtbl
;
733 case D3D10_SVT_TEXTURE1D
:
734 case D3D10_SVT_TEXTURE1DARRAY
:
735 case D3D10_SVT_TEXTURE2D
:
736 case D3D10_SVT_TEXTURE2DARRAY
:
737 case D3D10_SVT_TEXTURE2DMS
:
738 case D3D10_SVT_TEXTURE2DMSARRAY
:
739 case D3D10_SVT_TEXTURE3D
:
740 case D3D10_SVT_TEXTURECUBE
:
741 v
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_resource_variable_vtbl
;
744 case D3D10_SVT_RENDERTARGETVIEW
:
745 v
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_render_target_view_variable_vtbl
;
748 case D3D10_SVT_DEPTHSTENCILVIEW
:
749 v
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_depth_stencil_view_variable_vtbl
;
752 case D3D10_SVT_DEPTHSTENCIL
:
753 v
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_depth_stencil_variable_vtbl
;
756 case D3D10_SVT_VERTEXSHADER
:
757 case D3D10_SVT_GEOMETRYSHADER
:
758 case D3D10_SVT_PIXELSHADER
:
759 v
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_variable_vtbl
;
762 case D3D10_SVT_BLEND
:
763 v
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_blend_variable_vtbl
;
766 case D3D10_SVT_RASTERIZER
:
767 v
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_rasterizer_variable_vtbl
;
770 case D3D10_SVT_SAMPLER
:
771 v
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_sampler_variable_vtbl
;
775 FIXME("Unhandled basetype %s.\n", debug_d3d10_shader_variable_type(v
->type
->basetype
));
776 v
->vtbl
= &d3d10_effect_variable_vtbl
;
782 FIXME("Unhandled type class %s.\n", debug_d3d10_shader_variable_class(v
->type
->type_class
));
783 v
->vtbl
= &d3d10_effect_variable_vtbl
;
788 static HRESULT
copy_variableinfo_from_type(struct d3d10_effect_variable
*v
)
793 if (v
->type
->member_count
)
795 v
->members
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, v
->type
->member_count
* sizeof(*v
->members
));
798 ERR("Failed to allocate members memory.\n");
799 return E_OUTOFMEMORY
;
802 for (i
= 0; i
< v
->type
->member_count
; ++i
)
804 struct d3d10_effect_variable
*var
= &v
->members
[i
];
805 struct d3d10_effect_type_member
*typem
= &v
->type
->members
[i
];
807 var
->buffer
= v
->buffer
;
808 var
->effect
= v
->effect
;
809 var
->type
= typem
->type
;
810 set_variable_vtbl(var
);
812 if (!copy_name(typem
->name
, &var
->name
))
814 ERR("Failed to copy name.\n");
815 return E_OUTOFMEMORY
;
817 TRACE("Variable name: %s.\n", debugstr_a(var
->name
));
819 if (!copy_name(typem
->semantic
, &var
->semantic
))
821 ERR("Failed to copy name.\n");
822 return E_OUTOFMEMORY
;
824 TRACE("Variable semantic: %s.\n", debugstr_a(var
->semantic
));
826 var
->buffer_offset
= v
->buffer_offset
+ typem
->buffer_offset
;
827 TRACE("Variable buffer offset: %u.\n", var
->buffer_offset
);
829 hr
= copy_variableinfo_from_type(var
);
830 if (FAILED(hr
)) return hr
;
834 if (v
->type
->element_count
)
836 unsigned int bufferoffset
= v
->buffer_offset
;
838 v
->elements
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, v
->type
->element_count
* sizeof(*v
->elements
));
841 ERR("Failed to allocate elements memory.\n");
842 return E_OUTOFMEMORY
;
845 for (i
= 0; i
< v
->type
->element_count
; ++i
)
847 struct d3d10_effect_variable
*var
= &v
->elements
[i
];
849 var
->buffer
= v
->buffer
;
850 var
->effect
= v
->effect
;
851 var
->type
= v
->type
->elementtype
;
852 set_variable_vtbl(var
);
854 if (!copy_name(v
->name
, &var
->name
))
856 ERR("Failed to copy name.\n");
857 return E_OUTOFMEMORY
;
859 TRACE("Variable name: %s.\n", debugstr_a(var
->name
));
861 if (!copy_name(v
->semantic
, &var
->semantic
))
863 ERR("Failed to copy name.\n");
864 return E_OUTOFMEMORY
;
866 TRACE("Variable semantic: %s.\n", debugstr_a(var
->semantic
));
870 bufferoffset
+= v
->type
->stride
;
872 var
->buffer_offset
= bufferoffset
;
873 TRACE("Variable buffer offset: %u.\n", var
->buffer_offset
);
875 hr
= copy_variableinfo_from_type(var
);
876 if (FAILED(hr
)) return hr
;
883 static HRESULT
parse_fx10_variable_head(struct d3d10_effect_variable
*v
, const char **ptr
, const char *data
)
887 read_dword(ptr
, &offset
);
888 TRACE("Variable name at offset %#x.\n", offset
);
890 if (!copy_name(data
+ offset
, &v
->name
))
892 ERR("Failed to copy name.\n");
893 return E_OUTOFMEMORY
;
895 TRACE("Variable name: %s.\n", debugstr_a(v
->name
));
897 read_dword(ptr
, &offset
);
898 TRACE("Variable type info at offset %#x.\n", offset
);
900 v
->type
= get_fx10_type(v
->effect
, data
, offset
);
903 ERR("Failed to get variable type.\n");
906 set_variable_vtbl(v
);
908 return copy_variableinfo_from_type(v
);
911 static HRESULT
parse_fx10_annotation(struct d3d10_effect_variable
*a
, const char **ptr
, const char *data
)
915 hr
= parse_fx10_variable_head(a
, ptr
, data
);
916 if (FAILED(hr
)) return hr
;
918 skip_dword_unknown(ptr
, 1);
920 /* mark the variable as annotation */
921 a
->flag
= D3D10_EFFECT_VARIABLE_ANNOTATION
;
926 static HRESULT
parse_fx10_anonymous_shader(struct d3d10_effect
*e
, struct d3d10_effect_anonymous_shader
*s
,
927 enum d3d10_effect_object_type otype
)
929 struct d3d10_effect_variable
*v
= &s
->shader
;
930 struct d3d10_effect_type
*t
= &s
->type
;
931 const char *shader
= NULL
;
935 case D3D10_EOT_VERTEXSHADER
:
936 shader
= "vertexshader";
937 t
->basetype
= D3D10_SVT_VERTEXSHADER
;
940 case D3D10_EOT_PIXELSHADER
:
941 shader
= "pixelshader";
942 t
->basetype
= D3D10_SVT_PIXELSHADER
;
945 case D3D10_EOT_GEOMETRYSHADER
:
946 shader
= "geometryshader";
947 t
->basetype
= D3D10_SVT_GEOMETRYSHADER
;
951 if (!copy_name(shader
, &t
->name
))
953 ERR("Failed to copy name.\n");
954 return E_OUTOFMEMORY
;
956 TRACE("Type name: %s.\n", debugstr_a(t
->name
));
958 t
->type_class
= D3D10_SVC_OBJECT
;
960 t
->vtbl
= &d3d10_effect_type_vtbl
;
964 set_variable_vtbl(v
);
966 if (!copy_name("$Anonymous", &v
->name
))
968 ERR("Failed to copy semantic.\n");
969 return E_OUTOFMEMORY
;
971 TRACE("Variable name: %s.\n", debugstr_a(v
->name
));
973 if (!copy_name(NULL
, &v
->semantic
))
975 ERR("Failed to copy semantic.\n");
976 return E_OUTOFMEMORY
;
978 TRACE("Variable semantic: %s.\n", debugstr_a(v
->semantic
));
983 static HRESULT
parse_fx10_object(struct d3d10_effect_object
*o
, const char **ptr
, const char *data
)
985 const char *data_ptr
= NULL
;
987 enum d3d10_effect_object_operation operation
;
989 struct d3d10_effect
*effect
= o
->pass
->technique
->effect
;
990 ID3D10Effect
*e
= (ID3D10Effect
*)effect
;
992 read_dword(ptr
, &o
->type
);
993 TRACE("Effect object is of type %#x.\n", o
->type
);
995 read_dword(ptr
, &o
->index
);
996 TRACE("Effect object index %#x.\n", o
->index
);
998 read_dword(ptr
, &operation
);
999 TRACE("Effect object operation %#x.\n", operation
);
1001 read_dword(ptr
, &offset
);
1002 TRACE("Effect object idx is at offset %#x.\n", offset
);
1006 case D3D10_EOO_VALUE
:
1007 TRACE("Copy variable values\n");
1012 case D3D10_EOT_VERTEXSHADER
:
1013 TRACE("Vertex shader\n");
1014 o
->data
= &anonymous_vs
;
1018 case D3D10_EOT_PIXELSHADER
:
1019 TRACE("Pixel shader\n");
1020 o
->data
= &anonymous_ps
;
1024 case D3D10_EOT_GEOMETRYSHADER
:
1025 TRACE("Geometry shader\n");
1026 o
->data
= &anonymous_gs
;
1031 FIXME("Unhandled object type %#x\n", o
->type
);
1037 case D3D10_EOO_PARSED_OBJECT
:
1038 /* This is a local object, we've parsed in parse_fx10_local_object. */
1039 TRACE("Shader = %s.\n", data
+ offset
);
1041 o
->data
= e
->lpVtbl
->GetVariableByName(e
, data
+ offset
);
1045 case D3D10_EOO_PARSED_OBJECT_INDEX
:
1046 /* This is a local object, we've parsed in parse_fx10_local_object, which has an array index. */
1047 data_ptr
= data
+ offset
;
1048 read_dword(&data_ptr
, &offset
);
1049 read_dword(&data_ptr
, &o
->index
);
1050 TRACE("Shader = %s[%u].\n", data
+ offset
, o
->index
);
1052 o
->data
= e
->lpVtbl
->GetVariableByName(e
, data
+ offset
);
1056 case D3D10_EOO_ANONYMOUS_SHADER
:
1057 TRACE("Anonymous shader\n");
1059 /* check anonymous_shader_current for validity */
1060 if (effect
->anonymous_shader_current
>= effect
->anonymous_shader_count
)
1062 ERR("Anonymous shader count is wrong!\n");
1066 data_ptr
= data
+ offset
;
1067 read_dword(&data_ptr
, &offset
);
1068 TRACE("Effect object starts at offset %#x.\n", offset
);
1070 data_ptr
= data
+ offset
;
1072 hr
= parse_fx10_anonymous_shader(effect
, &effect
->anonymous_shaders
[effect
->anonymous_shader_current
], o
->type
);
1073 if (FAILED(hr
)) return hr
;
1075 o
->data
= &effect
->anonymous_shaders
[effect
->anonymous_shader_current
].shader
;
1076 ++effect
->anonymous_shader_current
;
1080 case D3D10_EOT_VERTEXSHADER
:
1081 TRACE("Vertex shader\n");
1082 hr
= parse_shader(o
->data
, data_ptr
);
1085 case D3D10_EOT_PIXELSHADER
:
1086 TRACE("Pixel shader\n");
1087 hr
= parse_shader(o
->data
, data_ptr
);
1090 case D3D10_EOT_GEOMETRYSHADER
:
1091 TRACE("Geometry shader\n");
1092 hr
= parse_shader(o
->data
, data_ptr
);
1096 FIXME("Unhandled object type %#x\n", o
->type
);
1104 FIXME("Unhandled operation %#x.\n", operation
);
1111 static HRESULT
parse_fx10_pass(struct d3d10_effect_pass
*p
, const char **ptr
, const char *data
)
1117 read_dword(ptr
, &offset
);
1118 TRACE("Pass name at offset %#x.\n", offset
);
1120 if (!copy_name(data
+ offset
, &p
->name
))
1122 ERR("Failed to copy name.\n");
1123 return E_OUTOFMEMORY
;
1125 TRACE("Pass name: %s.\n", debugstr_a(p
->name
));
1127 read_dword(ptr
, &p
->object_count
);
1128 TRACE("Pass has %u effect objects.\n", p
->object_count
);
1130 read_dword(ptr
, &p
->annotation_count
);
1131 TRACE("Pass has %u annotations.\n", p
->annotation_count
);
1133 p
->annotations
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, p
->annotation_count
* sizeof(*p
->annotations
));
1134 if (!p
->annotations
)
1136 ERR("Failed to allocate pass annotations memory.\n");
1137 return E_OUTOFMEMORY
;
1140 for (i
= 0; i
< p
->annotation_count
; ++i
)
1142 struct d3d10_effect_variable
*a
= &p
->annotations
[i
];
1144 a
->effect
= p
->technique
->effect
;
1145 a
->buffer
= &null_local_buffer
;
1147 hr
= parse_fx10_annotation(a
, ptr
, data
);
1148 if (FAILED(hr
)) return hr
;
1151 p
->objects
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, p
->object_count
* sizeof(*p
->objects
));
1154 ERR("Failed to allocate effect objects memory.\n");
1155 return E_OUTOFMEMORY
;
1158 for (i
= 0; i
< p
->object_count
; ++i
)
1160 struct d3d10_effect_object
*o
= &p
->objects
[i
];
1164 hr
= parse_fx10_object(o
, ptr
, data
);
1165 if (FAILED(hr
)) return hr
;
1171 static HRESULT
parse_fx10_technique(struct d3d10_effect_technique
*t
, const char **ptr
, const char *data
)
1177 read_dword(ptr
, &offset
);
1178 TRACE("Technique name at offset %#x.\n", offset
);
1180 if (!copy_name(data
+ offset
, &t
->name
))
1182 ERR("Failed to copy name.\n");
1183 return E_OUTOFMEMORY
;
1185 TRACE("Technique name: %s.\n", debugstr_a(t
->name
));
1187 read_dword(ptr
, &t
->pass_count
);
1188 TRACE("Technique has %u passes\n", t
->pass_count
);
1190 read_dword(ptr
, &t
->annotation_count
);
1191 TRACE("Technique has %u annotations.\n", t
->annotation_count
);
1193 t
->annotations
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, t
->annotation_count
* sizeof(*t
->annotations
));
1194 if (!t
->annotations
)
1196 ERR("Failed to allocate technique annotations memory.\n");
1197 return E_OUTOFMEMORY
;
1200 for (i
= 0; i
< t
->annotation_count
; ++i
)
1202 struct d3d10_effect_variable
*a
= &t
->annotations
[i
];
1204 a
->effect
= t
->effect
;
1205 a
->buffer
= &null_local_buffer
;
1207 hr
= parse_fx10_annotation(a
, ptr
, data
);
1208 if (FAILED(hr
)) return hr
;
1211 t
->passes
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, t
->pass_count
* sizeof(*t
->passes
));
1214 ERR("Failed to allocate passes memory\n");
1215 return E_OUTOFMEMORY
;
1218 for (i
= 0; i
< t
->pass_count
; ++i
)
1220 struct d3d10_effect_pass
*p
= &t
->passes
[i
];
1222 p
->vtbl
= &d3d10_effect_pass_vtbl
;
1225 hr
= parse_fx10_pass(p
, ptr
, data
);
1226 if (FAILED(hr
)) return hr
;
1232 static HRESULT
parse_fx10_variable(struct d3d10_effect_variable
*v
, const char **ptr
, const char *data
)
1238 hr
= parse_fx10_variable_head(v
, ptr
, data
);
1239 if (FAILED(hr
)) return hr
;
1241 read_dword(ptr
, &offset
);
1242 TRACE("Variable semantic at offset %#x.\n", offset
);
1244 if (!copy_name(data
+ offset
, &v
->semantic
))
1246 ERR("Failed to copy semantic.\n");
1247 return E_OUTOFMEMORY
;
1249 TRACE("Variable semantic: %s.\n", debugstr_a(v
->semantic
));
1251 read_dword(ptr
, &v
->buffer_offset
);
1252 TRACE("Variable offset in buffer: %#x.\n", v
->buffer_offset
);
1254 skip_dword_unknown(ptr
, 1);
1256 read_dword(ptr
, &v
->flag
);
1257 TRACE("Variable flag: %#x.\n", v
->flag
);
1259 read_dword(ptr
, &v
->annotation_count
);
1260 TRACE("Variable has %u annotations.\n", v
->annotation_count
);
1262 v
->annotations
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, v
->annotation_count
* sizeof(*v
->annotations
));
1263 if (!v
->annotations
)
1265 ERR("Failed to allocate variable annotations memory.\n");
1266 return E_OUTOFMEMORY
;
1269 for (i
= 0; i
< v
->annotation_count
; ++i
)
1271 struct d3d10_effect_variable
*a
= &v
->annotations
[i
];
1273 a
->effect
= v
->effect
;
1274 a
->buffer
= &null_local_buffer
;
1276 hr
= parse_fx10_annotation(a
, ptr
, data
);
1277 if (FAILED(hr
)) return hr
;
1283 static HRESULT
parse_fx10_local_variable(struct d3d10_effect_variable
*v
, const char **ptr
, const char *data
)
1288 hr
= parse_fx10_variable_head(v
, ptr
, data
);
1289 if (FAILED(hr
)) return hr
;
1291 skip_dword_unknown(ptr
, 2);
1293 switch (v
->type
->basetype
)
1295 case D3D10_SVT_TEXTURE1D
:
1296 case D3D10_SVT_TEXTURE1DARRAY
:
1297 case D3D10_SVT_TEXTURE2D
:
1298 case D3D10_SVT_TEXTURE2DARRAY
:
1299 case D3D10_SVT_TEXTURE2DMS
:
1300 case D3D10_SVT_TEXTURE2DMSARRAY
:
1301 case D3D10_SVT_TEXTURE3D
:
1302 case D3D10_SVT_TEXTURECUBE
:
1303 case D3D10_SVT_RENDERTARGETVIEW
:
1304 case D3D10_SVT_DEPTHSTENCILVIEW
:
1305 TRACE("SVT could not have elements.\n");
1308 case D3D10_SVT_VERTEXSHADER
:
1309 case D3D10_SVT_PIXELSHADER
:
1310 case D3D10_SVT_GEOMETRYSHADER
:
1311 TRACE("Shader type is %s\n", debug_d3d10_shader_variable_type(v
->type
->basetype
));
1312 for (i
= 0; i
< max(v
->type
->element_count
, 1); ++i
)
1314 DWORD shader_offset
;
1315 struct d3d10_effect_variable
*var
;
1317 if (!v
->type
->element_count
)
1323 var
= &v
->elements
[i
];
1326 read_dword(ptr
, &shader_offset
);
1327 TRACE("Shader offset: %#x.\n", shader_offset
);
1329 hr
= parse_shader(var
, data
+ shader_offset
);
1330 if (FAILED(hr
)) return hr
;
1334 case D3D10_SVT_DEPTHSTENCIL
:
1335 case D3D10_SVT_BLEND
:
1336 case D3D10_SVT_RASTERIZER
:
1337 case D3D10_SVT_SAMPLER
:
1338 TRACE("SVT is a state.\n");
1339 for (i
= 0; i
< max(v
->type
->element_count
, 1); ++i
)
1344 read_dword(ptr
, &object_count
);
1345 TRACE("Object count: %#x.\n", object_count
);
1347 for (j
= 0; j
< object_count
; ++j
)
1349 skip_dword_unknown(ptr
, 4);
1355 FIXME("Unhandled case %s.\n", debug_d3d10_shader_variable_type(v
->type
->basetype
));
1359 read_dword(ptr
, &v
->annotation_count
);
1360 TRACE("Variable has %u annotations.\n", v
->annotation_count
);
1362 v
->annotations
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, v
->annotation_count
* sizeof(*v
->annotations
));
1363 if (!v
->annotations
)
1365 ERR("Failed to allocate variable annotations memory.\n");
1366 return E_OUTOFMEMORY
;
1369 for (i
= 0; i
< v
->annotation_count
; ++i
)
1371 struct d3d10_effect_variable
*a
= &v
->annotations
[i
];
1373 a
->effect
= v
->effect
;
1374 a
->buffer
= &null_local_buffer
;
1376 hr
= parse_fx10_annotation(a
, ptr
, data
);
1377 if (FAILED(hr
)) return hr
;
1383 static HRESULT
parse_fx10_local_buffer(struct d3d10_effect_variable
*l
, const char **ptr
, const char *data
)
1387 D3D10_CBUFFER_TYPE d3d10_cbuffer_type
;
1389 unsigned int stride
= 0;
1391 /* Generate our own type, it isn't in the fx blob. */
1392 l
->type
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(*l
->type
));
1395 ERR("Failed to allocate local buffer type memory.\n");
1396 return E_OUTOFMEMORY
;
1398 l
->type
->vtbl
= &d3d10_effect_type_vtbl
;
1399 l
->type
->type_class
= D3D10_SVC_OBJECT
;
1400 l
->type
->effect
= l
->effect
;
1402 read_dword(ptr
, &offset
);
1403 TRACE("Local buffer name at offset %#x.\n", offset
);
1405 if (!copy_name(data
+ offset
, &l
->name
))
1407 ERR("Failed to copy name.\n");
1408 return E_OUTOFMEMORY
;
1410 TRACE("Local buffer name: %s.\n", debugstr_a(l
->name
));
1412 read_dword(ptr
, &l
->data_size
);
1413 TRACE("Local buffer data size: %#x.\n", l
->data_size
);
1415 read_dword(ptr
, &d3d10_cbuffer_type
);
1416 TRACE("Local buffer type: %#x.\n", d3d10_cbuffer_type
);
1418 switch(d3d10_cbuffer_type
)
1420 case D3D10_CT_CBUFFER
:
1421 l
->type
->basetype
= D3D10_SVT_CBUFFER
;
1422 if (!copy_name("cbuffer", &l
->type
->name
))
1424 ERR("Failed to copy name.\n");
1425 return E_OUTOFMEMORY
;
1429 case D3D10_CT_TBUFFER
:
1430 l
->type
->basetype
= D3D10_SVT_TBUFFER
;
1431 if (!copy_name("tbuffer", &l
->type
->name
))
1433 ERR("Failed to copy name.\n");
1434 return E_OUTOFMEMORY
;
1439 ERR("Unexpected D3D10_CBUFFER_TYPE %#x!\n", d3d10_cbuffer_type
);
1443 read_dword(ptr
, &l
->type
->member_count
);
1444 TRACE("Local buffer member count: %#x.\n", l
->type
->member_count
);
1446 skip_dword_unknown(ptr
, 1);
1448 read_dword(ptr
, &l
->annotation_count
);
1449 TRACE("Local buffer has %u annotations.\n", l
->annotation_count
);
1451 l
->annotations
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, l
->annotation_count
* sizeof(*l
->annotations
));
1452 if (!l
->annotations
)
1454 ERR("Failed to allocate local buffer annotations memory.\n");
1455 return E_OUTOFMEMORY
;
1458 for (i
= 0; i
< l
->annotation_count
; ++i
)
1460 struct d3d10_effect_variable
*a
= &l
->annotations
[i
];
1462 a
->effect
= l
->effect
;
1463 a
->buffer
= &null_local_buffer
;
1465 hr
= parse_fx10_annotation(a
, ptr
, data
);
1466 if (FAILED(hr
)) return hr
;
1469 l
->members
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, l
->type
->member_count
* sizeof(*l
->members
));
1472 ERR("Failed to allocate members memory.\n");
1473 return E_OUTOFMEMORY
;
1476 l
->type
->members
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, l
->type
->member_count
* sizeof(*l
->type
->members
));
1477 if (!l
->type
->members
)
1479 ERR("Failed to allocate type members memory.\n");
1480 return E_OUTOFMEMORY
;
1483 for (i
= 0; i
< l
->type
->member_count
; ++i
)
1485 struct d3d10_effect_variable
*v
= &l
->members
[i
];
1486 struct d3d10_effect_type_member
*typem
= &l
->type
->members
[i
];
1489 v
->effect
= l
->effect
;
1491 hr
= parse_fx10_variable(v
, ptr
, data
);
1492 if (FAILED(hr
)) return hr
;
1495 * Copy the values from the variable type to the constant buffers type
1496 * members structure, because it is our own generated type.
1498 typem
->type
= v
->type
;
1500 if (!copy_name(v
->name
, &typem
->name
))
1502 ERR("Failed to copy name.\n");
1503 return E_OUTOFMEMORY
;
1505 TRACE("Variable name: %s.\n", debugstr_a(typem
->name
));
1507 if (!copy_name(v
->semantic
, &typem
->semantic
))
1509 ERR("Failed to copy name.\n");
1510 return E_OUTOFMEMORY
;
1512 TRACE("Variable semantic: %s.\n", debugstr_a(typem
->semantic
));
1514 typem
->buffer_offset
= v
->buffer_offset
;
1515 TRACE("Variable buffer offset: %u.\n", typem
->buffer_offset
);
1517 l
->type
->size_packed
+= v
->type
->size_packed
;
1520 * For the complete constantbuffer the size_unpacked = stride,
1521 * the stride is calculated like this:
1523 * 1) if the constant buffer variables are packed with packoffset
1524 * - stride = the highest used constant
1525 * - the complete stride has to be a multiple of 0x10
1527 * 2) if the constant buffer variables are NOT packed with packoffset
1528 * - sum of unpacked size for all variables which fit in a 0x10 part
1529 * - if the size exceeds a 0x10 part, the rest of the old part is skipped
1530 * and a new part is started
1531 * - if the variable is a struct it is always used a new part
1532 * - the complete stride has to be a multiple of 0x10
1535 * 0x4, 0x4, 0x4, 0x8, 0x4, 0x14, 0x4
1536 * part 0x10 0x10 0x20 -> 0x40
1538 if (v
->flag
& D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT
)
1540 if ((v
->type
->size_unpacked
+ v
->buffer_offset
) > stride
)
1542 stride
= v
->type
->size_unpacked
+ v
->buffer_offset
;
1547 if (v
->type
->type_class
== D3D10_SVC_STRUCT
)
1549 stride
= (stride
+ 0xf) & ~0xf;
1552 if ( ((stride
& 0xf) + v
->type
->size_unpacked
) > 0x10)
1554 stride
= (stride
+ 0xf) & ~0xf;
1557 stride
+= v
->type
->size_unpacked
;
1560 l
->type
->stride
= l
->type
->size_unpacked
= (stride
+ 0xf) & ~0xf;
1562 TRACE("Constant buffer:\n");
1563 TRACE("\tType name: %s.\n", debugstr_a(l
->type
->name
));
1564 TRACE("\tElement count: %u.\n", l
->type
->element_count
);
1565 TRACE("\tMember count: %u.\n", l
->type
->member_count
);
1566 TRACE("\tUnpacked size: %#x.\n", l
->type
->size_unpacked
);
1567 TRACE("\tStride: %#x.\n", l
->type
->stride
);
1568 TRACE("\tPacked size %#x.\n", l
->type
->size_packed
);
1569 TRACE("\tBasetype: %s.\n", debug_d3d10_shader_variable_type(l
->type
->basetype
));
1570 TRACE("\tTypeclass: %s.\n", debug_d3d10_shader_variable_class(l
->type
->type_class
));
1575 static int d3d10_effect_type_compare(const void *key
, const struct wine_rb_entry
*entry
)
1577 const struct d3d10_effect_type
*t
= WINE_RB_ENTRY_VALUE(entry
, const struct d3d10_effect_type
, entry
);
1578 const DWORD
*id
= key
;
1583 static void d3d10_effect_type_member_destroy(struct d3d10_effect_type_member
*typem
)
1585 TRACE("effect type member %p.\n", typem
);
1587 /* Do not release typem->type, it will be covered by d3d10_effect_type_destroy(). */
1588 HeapFree(GetProcessHeap(), 0, typem
->semantic
);
1589 HeapFree(GetProcessHeap(), 0, typem
->name
);
1592 static void d3d10_effect_type_destroy(struct wine_rb_entry
*entry
, void *context
)
1594 struct d3d10_effect_type
*t
= WINE_RB_ENTRY_VALUE(entry
, struct d3d10_effect_type
, entry
);
1596 TRACE("effect type %p.\n", t
);
1600 HeapFree(GetProcessHeap(), 0, t
->elementtype
->name
);
1601 HeapFree(GetProcessHeap(), 0, t
->elementtype
);
1608 for (i
= 0; i
< t
->member_count
; ++i
)
1610 d3d10_effect_type_member_destroy(&t
->members
[i
]);
1612 HeapFree(GetProcessHeap(), 0, t
->members
);
1615 HeapFree(GetProcessHeap(), 0, t
->name
);
1616 HeapFree(GetProcessHeap(), 0, t
);
1619 static const struct wine_rb_functions d3d10_effect_type_rb_functions
=
1624 d3d10_effect_type_compare
,
1627 static HRESULT
parse_fx10_body(struct d3d10_effect
*e
, const char *data
, DWORD data_size
)
1629 const char *ptr
= data
+ e
->index_offset
;
1633 if (wine_rb_init(&e
->types
, &d3d10_effect_type_rb_functions
) == -1)
1635 ERR("Failed to initialize type rbtree.\n");
1639 e
->local_buffers
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, e
->local_buffer_count
* sizeof(*e
->local_buffers
));
1640 if (!e
->local_buffers
)
1642 ERR("Failed to allocate local buffer memory.\n");
1643 return E_OUTOFMEMORY
;
1646 e
->local_variables
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, e
->local_variable_count
* sizeof(*e
->local_variables
));
1647 if (!e
->local_variables
)
1649 ERR("Failed to allocate local variable memory.\n");
1650 return E_OUTOFMEMORY
;
1653 e
->anonymous_shaders
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, e
->anonymous_shader_count
* sizeof(*e
->anonymous_shaders
));
1654 if (!e
->anonymous_shaders
)
1656 ERR("Failed to allocate anonymous shaders memory\n");
1657 return E_OUTOFMEMORY
;
1660 e
->used_shaders
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, e
->used_shader_count
* sizeof(*e
->used_shaders
));
1661 if (!e
->used_shaders
)
1663 ERR("Failed to allocate used shaders memory\n");
1664 return E_OUTOFMEMORY
;
1667 e
->techniques
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, e
->technique_count
* sizeof(*e
->techniques
));
1670 ERR("Failed to allocate techniques memory\n");
1671 return E_OUTOFMEMORY
;
1674 for (i
= 0; i
< e
->local_buffer_count
; ++i
)
1676 struct d3d10_effect_variable
*l
= &e
->local_buffers
[i
];
1677 l
->vtbl
= (const ID3D10EffectVariableVtbl
*)&d3d10_effect_constant_buffer_vtbl
;
1679 l
->buffer
= &null_local_buffer
;
1681 hr
= parse_fx10_local_buffer(l
, &ptr
, data
);
1682 if (FAILED(hr
)) return hr
;
1685 for (i
= 0; i
< e
->local_variable_count
; ++i
)
1687 struct d3d10_effect_variable
*v
= &e
->local_variables
[i
];
1690 v
->vtbl
= &d3d10_effect_variable_vtbl
;
1691 v
->buffer
= &null_local_buffer
;
1693 hr
= parse_fx10_local_variable(v
, &ptr
, data
);
1694 if (FAILED(hr
)) return hr
;
1697 for (i
= 0; i
< e
->technique_count
; ++i
)
1699 struct d3d10_effect_technique
*t
= &e
->techniques
[i
];
1701 t
->vtbl
= &d3d10_effect_technique_vtbl
;
1704 hr
= parse_fx10_technique(t
, &ptr
, data
);
1705 if (FAILED(hr
)) return hr
;
1711 static HRESULT
parse_fx10(struct d3d10_effect
*e
, const char *data
, DWORD data_size
)
1713 const char *ptr
= data
;
1716 /* Compiled target version (e.g. fx_4_0=0xfeff1001, fx_4_1=0xfeff1011). */
1717 read_dword(&ptr
, &e
->version
);
1718 TRACE("Target: %#x\n", e
->version
);
1720 read_dword(&ptr
, &e
->local_buffer_count
);
1721 TRACE("Local buffer count: %u.\n", e
->local_buffer_count
);
1723 read_dword(&ptr
, &e
->variable_count
);
1724 TRACE("Variable count: %u\n", e
->variable_count
);
1726 read_dword(&ptr
, &e
->local_variable_count
);
1727 TRACE("Object count: %u\n", e
->local_variable_count
);
1729 read_dword(&ptr
, &e
->sharedbuffers_count
);
1730 TRACE("Sharedbuffers count: %u\n", e
->sharedbuffers_count
);
1732 /* Number of variables in shared buffers? */
1733 read_dword(&ptr
, &unknown
);
1734 FIXME("Unknown 0: %u\n", unknown
);
1736 read_dword(&ptr
, &e
->sharedobjects_count
);
1737 TRACE("Sharedobjects count: %u\n", e
->sharedobjects_count
);
1739 read_dword(&ptr
, &e
->technique_count
);
1740 TRACE("Technique count: %u\n", e
->technique_count
);
1742 read_dword(&ptr
, &e
->index_offset
);
1743 TRACE("Index offset: %#x\n", e
->index_offset
);
1745 read_dword(&ptr
, &unknown
);
1746 FIXME("Unknown 1: %u\n", unknown
);
1748 read_dword(&ptr
, &e
->texture_count
);
1749 TRACE("Texture count: %u\n", e
->texture_count
);
1751 read_dword(&ptr
, &e
->dephstencilstate_count
);
1752 TRACE("Depthstencilstate count: %u\n", e
->dephstencilstate_count
);
1754 read_dword(&ptr
, &e
->blendstate_count
);
1755 TRACE("Blendstate count: %u\n", e
->blendstate_count
);
1757 read_dword(&ptr
, &e
->rasterizerstate_count
);
1758 TRACE("Rasterizerstate count: %u\n", e
->rasterizerstate_count
);
1760 read_dword(&ptr
, &e
->samplerstate_count
);
1761 TRACE("Samplerstate count: %u\n", e
->samplerstate_count
);
1763 read_dword(&ptr
, &e
->rendertargetview_count
);
1764 TRACE("Rendertargetview count: %u\n", e
->rendertargetview_count
);
1766 read_dword(&ptr
, &e
->depthstencilview_count
);
1767 TRACE("Depthstencilview count: %u\n", e
->depthstencilview_count
);
1769 read_dword(&ptr
, &e
->used_shader_count
);
1770 TRACE("Used shader count: %u\n", e
->used_shader_count
);
1772 read_dword(&ptr
, &e
->anonymous_shader_count
);
1773 TRACE("Anonymous shader count: %u\n", e
->anonymous_shader_count
);
1775 return parse_fx10_body(e
, ptr
, data_size
- (ptr
- data
));
1778 static HRESULT
fx10_chunk_handler(const char *data
, DWORD data_size
, DWORD tag
, void *ctx
)
1780 struct d3d10_effect
*e
= ctx
;
1782 TRACE("tag: %s.\n", debugstr_an((const char *)&tag
, 4));
1784 TRACE("chunk size: %#x\n", data_size
);
1789 return parse_fx10(e
, data
, data_size
);
1792 FIXME("Unhandled chunk %s.\n", debugstr_an((const char *)&tag
, 4));
1797 HRESULT
d3d10_effect_parse(struct d3d10_effect
*This
, const void *data
, SIZE_T data_size
)
1799 return parse_dxbc(data
, data_size
, fx10_chunk_handler
, This
);
1802 static HRESULT
d3d10_effect_object_apply(struct d3d10_effect_object
*o
)
1804 ID3D10Device
*device
= o
->pass
->technique
->effect
->device
;
1805 struct d3d10_effect_variable
*v
= (struct d3d10_effect_variable
*) o
->data
;
1807 TRACE("effect object %p, type %#x.\n", o
, o
->type
);
1811 case D3D10_EOT_VERTEXSHADER
:
1812 ID3D10Device_VSSetShader(device
, ((struct d3d10_effect_shader_variable
*)v
->data
)->shader
.vs
);
1815 case D3D10_EOT_PIXELSHADER
:
1816 ID3D10Device_PSSetShader(device
, ((struct d3d10_effect_shader_variable
*)v
->data
)->shader
.ps
);
1819 case D3D10_EOT_GEOMETRYSHADER
:
1820 ID3D10Device_GSSetShader(device
, ((struct d3d10_effect_shader_variable
*)v
->data
)->shader
.gs
);
1824 FIXME("Unhandled effect object type %#x.\n", o
->type
);
1829 static void d3d10_effect_variable_destroy(struct d3d10_effect_variable
*v
)
1833 TRACE("variable %p.\n", v
);
1835 HeapFree(GetProcessHeap(), 0, v
->name
);
1836 HeapFree(GetProcessHeap(), 0, v
->semantic
);
1839 for (i
= 0; i
< v
->annotation_count
; ++i
)
1841 d3d10_effect_variable_destroy(&v
->annotations
[i
]);
1843 HeapFree(GetProcessHeap(), 0, v
->annotations
);
1848 for (i
= 0; i
< v
->type
->member_count
; ++i
)
1850 d3d10_effect_variable_destroy(&v
->members
[i
]);
1852 HeapFree(GetProcessHeap(), 0, v
->members
);
1857 for (i
= 0; i
< v
->type
->element_count
; ++i
)
1859 d3d10_effect_variable_destroy(&v
->elements
[i
]);
1861 HeapFree(GetProcessHeap(), 0, v
->elements
);
1866 switch(v
->type
->basetype
)
1868 case D3D10_SVT_VERTEXSHADER
:
1869 case D3D10_SVT_PIXELSHADER
:
1870 case D3D10_SVT_GEOMETRYSHADER
:
1871 shader_free_signature(&((struct d3d10_effect_shader_variable
*)v
->data
)->input_signature
);
1872 shader_free_signature(&((struct d3d10_effect_shader_variable
*)v
->data
)->output_signature
);
1878 HeapFree(GetProcessHeap(), 0, v
->data
);
1882 static void d3d10_effect_pass_destroy(struct d3d10_effect_pass
*p
)
1886 TRACE("pass %p\n", p
);
1888 HeapFree(GetProcessHeap(), 0, p
->name
);
1889 HeapFree(GetProcessHeap(), 0, p
->objects
);
1893 for (i
= 0; i
< p
->annotation_count
; ++i
)
1895 d3d10_effect_variable_destroy(&p
->annotations
[i
]);
1897 HeapFree(GetProcessHeap(), 0, p
->annotations
);
1901 static void d3d10_effect_technique_destroy(struct d3d10_effect_technique
*t
)
1905 TRACE("technique %p\n", t
);
1907 HeapFree(GetProcessHeap(), 0, t
->name
);
1910 for (i
= 0; i
< t
->pass_count
; ++i
)
1912 d3d10_effect_pass_destroy(&t
->passes
[i
]);
1914 HeapFree(GetProcessHeap(), 0, t
->passes
);
1919 for (i
= 0; i
< t
->annotation_count
; ++i
)
1921 d3d10_effect_variable_destroy(&t
->annotations
[i
]);
1923 HeapFree(GetProcessHeap(), 0, t
->annotations
);
1927 static void d3d10_effect_local_buffer_destroy(struct d3d10_effect_variable
*l
)
1931 TRACE("local buffer %p.\n", l
);
1933 HeapFree(GetProcessHeap(), 0, l
->name
);
1936 for (i
= 0; i
< l
->type
->member_count
; ++i
)
1938 d3d10_effect_variable_destroy(&l
->members
[i
]);
1940 HeapFree(GetProcessHeap(), 0, l
->members
);
1943 if (l
->type
->members
)
1945 for (i
= 0; i
< l
->type
->member_count
; ++i
)
1947 /* Do not release l->type->members[i].type, it will be covered by d3d10_effect_type_destroy(). */
1948 HeapFree(GetProcessHeap(), 0, l
->type
->members
[i
].semantic
);
1949 HeapFree(GetProcessHeap(), 0, l
->type
->members
[i
].name
);
1951 HeapFree(GetProcessHeap(), 0, l
->type
->members
);
1953 HeapFree(GetProcessHeap(), 0, l
->type
->name
);
1954 HeapFree(GetProcessHeap(), 0, l
->type
);
1958 for (i
= 0; i
< l
->annotation_count
; ++i
)
1960 d3d10_effect_variable_destroy(&l
->annotations
[i
]);
1962 HeapFree(GetProcessHeap(), 0, l
->annotations
);
1966 /* IUnknown methods */
1968 static HRESULT STDMETHODCALLTYPE
d3d10_effect_QueryInterface(ID3D10Effect
*iface
, REFIID riid
, void **object
)
1970 TRACE("iface %p, riid %s, object %p\n", iface
, debugstr_guid(riid
), object
);
1972 if (IsEqualGUID(riid
, &IID_ID3D10Effect
)
1973 || IsEqualGUID(riid
, &IID_IUnknown
))
1975 IUnknown_AddRef(iface
);
1980 WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid
));
1983 return E_NOINTERFACE
;
1986 static ULONG STDMETHODCALLTYPE
d3d10_effect_AddRef(ID3D10Effect
*iface
)
1988 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
1989 ULONG refcount
= InterlockedIncrement(&This
->refcount
);
1991 TRACE("%p increasing refcount to %u\n", This
, refcount
);
1996 static ULONG STDMETHODCALLTYPE
d3d10_effect_Release(ID3D10Effect
*iface
)
1998 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
1999 ULONG refcount
= InterlockedDecrement(&This
->refcount
);
2001 TRACE("%p decreasing refcount to %u\n", This
, refcount
);
2007 if (This
->techniques
)
2009 for (i
= 0; i
< This
->technique_count
; ++i
)
2011 d3d10_effect_technique_destroy(&This
->techniques
[i
]);
2013 HeapFree(GetProcessHeap(), 0, This
->techniques
);
2016 if (This
->local_variables
)
2018 for (i
= 0; i
< This
->local_variable_count
; ++i
)
2020 d3d10_effect_variable_destroy(&This
->local_variables
[i
]);
2022 HeapFree(GetProcessHeap(), 0, This
->local_variables
);
2025 if (This
->local_buffers
)
2027 for (i
= 0; i
< This
->local_buffer_count
; ++i
)
2029 d3d10_effect_local_buffer_destroy(&This
->local_buffers
[i
]);
2031 HeapFree(GetProcessHeap(), 0, This
->local_buffers
);
2034 if (This
->anonymous_shaders
)
2036 for (i
= 0; i
< This
->anonymous_shader_count
; ++i
)
2038 d3d10_effect_variable_destroy(&This
->anonymous_shaders
[i
].shader
);
2039 HeapFree(GetProcessHeap(), 0, This
->anonymous_shaders
[i
].type
.name
);
2041 HeapFree(GetProcessHeap(), 0, This
->anonymous_shaders
);
2044 HeapFree(GetProcessHeap(), 0, This
->used_shaders
);
2046 wine_rb_destroy(&This
->types
, d3d10_effect_type_destroy
, NULL
);
2048 ID3D10Device_Release(This
->device
);
2049 HeapFree(GetProcessHeap(), 0, This
);
2055 /* ID3D10Effect methods */
2057 static BOOL STDMETHODCALLTYPE
d3d10_effect_IsValid(ID3D10Effect
*iface
)
2059 FIXME("iface %p stub!\n", iface
);
2064 static BOOL STDMETHODCALLTYPE
d3d10_effect_IsPool(ID3D10Effect
*iface
)
2066 FIXME("iface %p stub!\n", iface
);
2071 static HRESULT STDMETHODCALLTYPE
d3d10_effect_GetDevice(ID3D10Effect
*iface
, ID3D10Device
**device
)
2073 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
2075 TRACE("iface %p, device %p\n", iface
, device
);
2077 ID3D10Device_AddRef(This
->device
);
2078 *device
= This
->device
;
2083 static HRESULT STDMETHODCALLTYPE
d3d10_effect_GetDesc(ID3D10Effect
*iface
, D3D10_EFFECT_DESC
*desc
)
2085 FIXME("iface %p, desc %p stub!\n", iface
, desc
);
2090 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_GetConstantBufferByIndex(ID3D10Effect
*iface
,
2093 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
2094 struct d3d10_effect_variable
*l
;
2096 TRACE("iface %p, index %u\n", iface
, index
);
2098 if (index
>= This
->local_buffer_count
)
2100 WARN("Invalid index specified\n");
2101 return (ID3D10EffectConstantBuffer
*)&null_local_buffer
;
2104 l
= &This
->local_buffers
[index
];
2106 TRACE("Returning buffer %p, %s.\n", l
, debugstr_a(l
->name
));
2108 return (ID3D10EffectConstantBuffer
*)l
;
2111 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_GetConstantBufferByName(ID3D10Effect
*iface
,
2114 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
2117 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2119 for (i
= 0; i
< This
->local_buffer_count
; ++i
)
2121 struct d3d10_effect_variable
*l
= &This
->local_buffers
[i
];
2123 if (!strcmp(l
->name
, name
))
2125 TRACE("Returning buffer %p.\n", l
);
2126 return (ID3D10EffectConstantBuffer
*)l
;
2130 WARN("Invalid name specified\n");
2132 return (ID3D10EffectConstantBuffer
*)&null_local_buffer
;
2135 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_GetVariableByIndex(ID3D10Effect
*iface
, UINT index
)
2137 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
2140 TRACE("iface %p, index %u\n", iface
, index
);
2142 for (i
= 0; i
< This
->local_buffer_count
; ++i
)
2144 struct d3d10_effect_variable
*l
= &This
->local_buffers
[i
];
2146 if (index
< l
->type
->member_count
)
2148 struct d3d10_effect_variable
*v
= &l
->members
[index
];
2150 TRACE("Returning variable %p.\n", v
);
2151 return (ID3D10EffectVariable
*)v
;
2153 index
-= l
->type
->member_count
;
2156 if (index
< This
->local_variable_count
)
2158 struct d3d10_effect_variable
*v
= &This
->local_variables
[index
];
2160 TRACE("Returning variable %p.\n", v
);
2161 return (ID3D10EffectVariable
*)v
;
2164 WARN("Invalid index specified\n");
2166 return (ID3D10EffectVariable
*)&null_variable
;
2169 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_GetVariableByName(ID3D10Effect
*iface
, LPCSTR name
)
2171 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
2174 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2176 for (i
= 0; i
< This
->local_buffer_count
; ++i
)
2178 struct d3d10_effect_variable
*l
= &This
->local_buffers
[i
];
2181 for (j
= 0; j
< l
->type
->member_count
; ++j
)
2183 struct d3d10_effect_variable
*v
= &l
->members
[j
];
2185 if (!strcmp(v
->name
, name
))
2187 TRACE("Returning variable %p.\n", v
);
2188 return (ID3D10EffectVariable
*)v
;
2193 for (i
= 0; i
< This
->local_variable_count
; ++i
)
2195 struct d3d10_effect_variable
*v
= &This
->local_variables
[i
];
2197 if (!strcmp(v
->name
, name
))
2199 TRACE("Returning variable %p.\n", v
);
2200 return (ID3D10EffectVariable
*)v
;
2204 WARN("Invalid name specified\n");
2206 return (ID3D10EffectVariable
*)&null_variable
;
2209 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_GetVariableBySemantic(ID3D10Effect
*iface
,
2212 FIXME("iface %p, semantic %s stub!\n", iface
, debugstr_a(semantic
));
2217 static struct ID3D10EffectTechnique
* STDMETHODCALLTYPE
d3d10_effect_GetTechniqueByIndex(ID3D10Effect
*iface
,
2220 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
2221 struct d3d10_effect_technique
*t
;
2223 TRACE("iface %p, index %u\n", iface
, index
);
2225 if (index
>= This
->technique_count
)
2227 WARN("Invalid index specified\n");
2228 return (ID3D10EffectTechnique
*)&null_technique
;
2231 t
= &This
->techniques
[index
];
2233 TRACE("Returning technique %p, %s.\n", t
, debugstr_a(t
->name
));
2235 return (ID3D10EffectTechnique
*)t
;
2238 static struct ID3D10EffectTechnique
* STDMETHODCALLTYPE
d3d10_effect_GetTechniqueByName(ID3D10Effect
*iface
,
2241 struct d3d10_effect
*This
= (struct d3d10_effect
*)iface
;
2244 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2246 for (i
= 0; i
< This
->technique_count
; ++i
)
2248 struct d3d10_effect_technique
*t
= &This
->techniques
[i
];
2249 if (!strcmp(t
->name
, name
))
2251 TRACE("Returning technique %p\n", t
);
2252 return (ID3D10EffectTechnique
*)t
;
2256 WARN("Invalid name specified\n");
2258 return (ID3D10EffectTechnique
*)&null_technique
;
2261 static HRESULT STDMETHODCALLTYPE
d3d10_effect_Optimize(ID3D10Effect
*iface
)
2263 FIXME("iface %p stub!\n", iface
);
2268 static BOOL STDMETHODCALLTYPE
d3d10_effect_IsOptimized(ID3D10Effect
*iface
)
2270 FIXME("iface %p stub!\n", iface
);
2275 const struct ID3D10EffectVtbl d3d10_effect_vtbl
=
2277 /* IUnknown methods */
2278 d3d10_effect_QueryInterface
,
2279 d3d10_effect_AddRef
,
2280 d3d10_effect_Release
,
2281 /* ID3D10Effect methods */
2282 d3d10_effect_IsValid
,
2283 d3d10_effect_IsPool
,
2284 d3d10_effect_GetDevice
,
2285 d3d10_effect_GetDesc
,
2286 d3d10_effect_GetConstantBufferByIndex
,
2287 d3d10_effect_GetConstantBufferByName
,
2288 d3d10_effect_GetVariableByIndex
,
2289 d3d10_effect_GetVariableByName
,
2290 d3d10_effect_GetVariableBySemantic
,
2291 d3d10_effect_GetTechniqueByIndex
,
2292 d3d10_effect_GetTechniqueByName
,
2293 d3d10_effect_Optimize
,
2294 d3d10_effect_IsOptimized
,
2297 /* ID3D10EffectTechnique methods */
2299 static BOOL STDMETHODCALLTYPE
d3d10_effect_technique_IsValid(ID3D10EffectTechnique
*iface
)
2301 TRACE("iface %p\n", iface
);
2303 return (struct d3d10_effect_technique
*)iface
!= &null_technique
;
2306 static HRESULT STDMETHODCALLTYPE
d3d10_effect_technique_GetDesc(ID3D10EffectTechnique
*iface
,
2307 D3D10_TECHNIQUE_DESC
*desc
)
2309 struct d3d10_effect_technique
*This
= (struct d3d10_effect_technique
*)iface
;
2311 TRACE("iface %p, desc %p\n", iface
, desc
);
2313 if(This
== &null_technique
)
2315 WARN("Null technique specified\n");
2321 WARN("Invalid argument specified\n");
2322 return E_INVALIDARG
;
2325 desc
->Name
= This
->name
;
2326 desc
->Passes
= This
->pass_count
;
2327 desc
->Annotations
= This
->annotation_count
;
2332 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_technique_GetAnnotationByIndex(
2333 ID3D10EffectTechnique
*iface
, UINT index
)
2335 struct d3d10_effect_technique
*This
= (struct d3d10_effect_technique
*)iface
;
2336 struct d3d10_effect_variable
*a
;
2338 TRACE("iface %p, index %u\n", iface
, index
);
2340 if (index
>= This
->annotation_count
)
2342 WARN("Invalid index specified\n");
2343 return (ID3D10EffectVariable
*)&null_variable
;
2346 a
= &This
->annotations
[index
];
2348 TRACE("Returning annotation %p, %s\n", a
, debugstr_a(a
->name
));
2350 return (ID3D10EffectVariable
*)a
;
2353 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_technique_GetAnnotationByName(
2354 ID3D10EffectTechnique
*iface
, LPCSTR name
)
2356 struct d3d10_effect_technique
*This
= (struct d3d10_effect_technique
*)iface
;
2359 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2361 for (i
= 0; i
< This
->annotation_count
; ++i
)
2363 struct d3d10_effect_variable
*a
= &This
->annotations
[i
];
2364 if (!strcmp(a
->name
, name
))
2366 TRACE("Returning annotation %p\n", a
);
2367 return (ID3D10EffectVariable
*)a
;
2371 WARN("Invalid name specified\n");
2373 return (ID3D10EffectVariable
*)&null_variable
;
2376 static struct ID3D10EffectPass
* STDMETHODCALLTYPE
d3d10_effect_technique_GetPassByIndex(ID3D10EffectTechnique
*iface
,
2379 struct d3d10_effect_technique
*This
= (struct d3d10_effect_technique
*)iface
;
2380 struct d3d10_effect_pass
*p
;
2382 TRACE("iface %p, index %u\n", iface
, index
);
2384 if (index
>= This
->pass_count
)
2386 WARN("Invalid index specified\n");
2387 return (ID3D10EffectPass
*)&null_pass
;
2390 p
= &This
->passes
[index
];
2392 TRACE("Returning pass %p, %s.\n", p
, debugstr_a(p
->name
));
2394 return (ID3D10EffectPass
*)p
;
2397 static struct ID3D10EffectPass
* STDMETHODCALLTYPE
d3d10_effect_technique_GetPassByName(ID3D10EffectTechnique
*iface
,
2400 struct d3d10_effect_technique
*This
= (struct d3d10_effect_technique
*)iface
;
2403 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2405 for (i
= 0; i
< This
->pass_count
; ++i
)
2407 struct d3d10_effect_pass
*p
= &This
->passes
[i
];
2408 if (!strcmp(p
->name
, name
))
2410 TRACE("Returning pass %p\n", p
);
2411 return (ID3D10EffectPass
*)p
;
2415 WARN("Invalid name specified\n");
2417 return (ID3D10EffectPass
*)&null_pass
;
2420 static HRESULT STDMETHODCALLTYPE
d3d10_effect_technique_ComputeStateBlockMask(ID3D10EffectTechnique
*iface
,
2421 D3D10_STATE_BLOCK_MASK
*mask
)
2423 FIXME("iface %p,mask %p stub!\n", iface
, mask
);
2428 static const struct ID3D10EffectTechniqueVtbl d3d10_effect_technique_vtbl
=
2430 /* ID3D10EffectTechnique methods */
2431 d3d10_effect_technique_IsValid
,
2432 d3d10_effect_technique_GetDesc
,
2433 d3d10_effect_technique_GetAnnotationByIndex
,
2434 d3d10_effect_technique_GetAnnotationByName
,
2435 d3d10_effect_technique_GetPassByIndex
,
2436 d3d10_effect_technique_GetPassByName
,
2437 d3d10_effect_technique_ComputeStateBlockMask
,
2440 /* ID3D10EffectPass methods */
2442 static BOOL STDMETHODCALLTYPE
d3d10_effect_pass_IsValid(ID3D10EffectPass
*iface
)
2444 TRACE("iface %p\n", iface
);
2446 return (struct d3d10_effect_pass
*)iface
!= &null_pass
;
2449 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_GetDesc(ID3D10EffectPass
*iface
, D3D10_PASS_DESC
*desc
)
2451 struct d3d10_effect_pass
*This
= (struct d3d10_effect_pass
*)iface
;
2454 FIXME("iface %p, desc %p partial stub!\n", iface
, desc
);
2456 if(This
== &null_pass
)
2458 WARN("Null pass specified\n");
2464 WARN("Invalid argument specified\n");
2465 return E_INVALIDARG
;
2468 memset(desc
, 0, sizeof(*desc
));
2469 desc
->Name
= This
->name
;
2470 for (i
= 0; i
< This
->object_count
; ++i
)
2472 struct d3d10_effect_object
*o
= &This
->objects
[i
];
2473 if (o
->type
== D3D10_EOT_VERTEXSHADER
)
2475 struct d3d10_effect_variable
*v
= o
->data
;
2476 struct d3d10_effect_shader_variable
*s
= v
->data
;
2477 desc
->pIAInputSignature
= (BYTE
*)s
->input_signature
.signature
;
2478 desc
->IAInputSignatureSize
= s
->input_signature
.signature_size
;
2486 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_GetVertexShaderDesc(ID3D10EffectPass
*iface
,
2487 D3D10_PASS_SHADER_DESC
*desc
)
2489 struct d3d10_effect_pass
*This
= (struct d3d10_effect_pass
*)iface
;
2492 TRACE("iface %p, desc %p\n", iface
, desc
);
2494 if (This
== &null_pass
)
2496 WARN("Null pass specified\n");
2502 WARN("Invalid argument specified\n");
2503 return E_INVALIDARG
;
2506 for (i
= 0; i
< This
->object_count
; ++i
)
2508 struct d3d10_effect_object
*o
= &This
->objects
[i
];
2510 if (o
->type
== D3D10_EOT_VERTEXSHADER
)
2512 desc
->pShaderVariable
= o
->data
;
2513 desc
->ShaderIndex
= o
->index
;
2518 TRACE("Returning null_shader_variable\n");
2519 desc
->pShaderVariable
= (ID3D10EffectShaderVariable
*)&null_shader_variable
;
2520 desc
->ShaderIndex
= 0;
2525 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_GetGeometryShaderDesc(ID3D10EffectPass
*iface
,
2526 D3D10_PASS_SHADER_DESC
*desc
)
2528 struct d3d10_effect_pass
*This
= (struct d3d10_effect_pass
*)iface
;
2531 TRACE("iface %p, desc %p\n", iface
, desc
);
2533 if (This
== &null_pass
)
2535 WARN("Null pass specified\n");
2541 WARN("Invalid argument specified\n");
2542 return E_INVALIDARG
;
2545 for (i
= 0; i
< This
->object_count
; ++i
)
2547 struct d3d10_effect_object
*o
= &This
->objects
[i
];
2549 if (o
->type
== D3D10_EOT_GEOMETRYSHADER
)
2551 desc
->pShaderVariable
= o
->data
;
2552 desc
->ShaderIndex
= o
->index
;
2557 TRACE("Returning null_shader_variable\n");
2558 desc
->pShaderVariable
= (ID3D10EffectShaderVariable
*)&null_shader_variable
;
2559 desc
->ShaderIndex
= 0;
2564 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_GetPixelShaderDesc(ID3D10EffectPass
*iface
,
2565 D3D10_PASS_SHADER_DESC
*desc
)
2567 struct d3d10_effect_pass
*This
= (struct d3d10_effect_pass
*)iface
;
2570 TRACE("iface %p, desc %p\n", iface
, desc
);
2572 if (This
== &null_pass
)
2574 WARN("Null pass specified\n");
2580 WARN("Invalid argument specified\n");
2581 return E_INVALIDARG
;
2584 for (i
= 0; i
< This
->object_count
; ++i
)
2586 struct d3d10_effect_object
*o
= &This
->objects
[i
];
2588 if (o
->type
== D3D10_EOT_PIXELSHADER
)
2590 desc
->pShaderVariable
= o
->data
;
2591 desc
->ShaderIndex
= o
->index
;
2596 TRACE("Returning null_shader_variable\n");
2597 desc
->pShaderVariable
= (ID3D10EffectShaderVariable
*)&null_shader_variable
;
2598 desc
->ShaderIndex
= 0;
2603 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_pass_GetAnnotationByIndex(ID3D10EffectPass
*iface
,
2606 struct d3d10_effect_pass
*This
= (struct d3d10_effect_pass
*)iface
;
2607 struct d3d10_effect_variable
*a
;
2609 TRACE("iface %p, index %u\n", iface
, index
);
2611 if (index
>= This
->annotation_count
)
2613 WARN("Invalid index specified\n");
2614 return (ID3D10EffectVariable
*)&null_variable
;
2617 a
= &This
->annotations
[index
];
2619 TRACE("Returning annotation %p, %s\n", a
, debugstr_a(a
->name
));
2621 return (ID3D10EffectVariable
*)a
;
2624 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_pass_GetAnnotationByName(ID3D10EffectPass
*iface
,
2627 struct d3d10_effect_pass
*This
= (struct d3d10_effect_pass
*)iface
;
2630 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2632 for (i
= 0; i
< This
->annotation_count
; ++i
)
2634 struct d3d10_effect_variable
*a
= &This
->annotations
[i
];
2635 if (!strcmp(a
->name
, name
))
2637 TRACE("Returning annotation %p\n", a
);
2638 return (ID3D10EffectVariable
*)a
;
2642 WARN("Invalid name specified\n");
2644 return (ID3D10EffectVariable
*)&null_variable
;
2647 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_Apply(ID3D10EffectPass
*iface
, UINT flags
)
2649 struct d3d10_effect_pass
*This
= (struct d3d10_effect_pass
*)iface
;
2653 TRACE("iface %p, flags %#x\n", iface
, flags
);
2655 if (flags
) FIXME("Ignoring flags (%#x)\n", flags
);
2657 for (i
= 0; i
< This
->object_count
; ++i
)
2659 hr
= d3d10_effect_object_apply(&This
->objects
[i
]);
2660 if (FAILED(hr
)) break;
2666 static HRESULT STDMETHODCALLTYPE
d3d10_effect_pass_ComputeStateBlockMask(ID3D10EffectPass
*iface
,
2667 D3D10_STATE_BLOCK_MASK
*mask
)
2669 FIXME("iface %p, mask %p stub!\n", iface
, mask
);
2674 static const struct ID3D10EffectPassVtbl d3d10_effect_pass_vtbl
=
2676 /* ID3D10EffectPass methods */
2677 d3d10_effect_pass_IsValid
,
2678 d3d10_effect_pass_GetDesc
,
2679 d3d10_effect_pass_GetVertexShaderDesc
,
2680 d3d10_effect_pass_GetGeometryShaderDesc
,
2681 d3d10_effect_pass_GetPixelShaderDesc
,
2682 d3d10_effect_pass_GetAnnotationByIndex
,
2683 d3d10_effect_pass_GetAnnotationByName
,
2684 d3d10_effect_pass_Apply
,
2685 d3d10_effect_pass_ComputeStateBlockMask
,
2688 /* ID3D10EffectVariable methods */
2690 static BOOL STDMETHODCALLTYPE
d3d10_effect_variable_IsValid(ID3D10EffectVariable
*iface
)
2692 TRACE("iface %p\n", iface
);
2694 return (struct d3d10_effect_variable
*)iface
!= &null_variable
;
2697 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_variable_GetType(ID3D10EffectVariable
*iface
)
2699 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2701 TRACE("iface %p\n", iface
);
2703 return (ID3D10EffectType
*)This
->type
;
2706 static HRESULT STDMETHODCALLTYPE
d3d10_effect_variable_GetDesc(ID3D10EffectVariable
*iface
,
2707 D3D10_EFFECT_VARIABLE_DESC
*desc
)
2709 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2711 TRACE("iface %p, desc %p\n", iface
, desc
);
2713 if (!iface
->lpVtbl
->IsValid(iface
))
2715 WARN("Null variable specified\n");
2721 WARN("Invalid argument specified\n");
2722 return E_INVALIDARG
;
2725 /* FIXME: This isn't correct. Anonymous shaders let desc->ExplicitBindPoint untouched, but normal shaders set it! */
2726 memset(desc
, 0, sizeof(*desc
));
2727 desc
->Name
= This
->name
;
2728 desc
->Semantic
= This
->semantic
;
2729 desc
->Flags
= This
->flag
;
2730 desc
->Annotations
= This
->annotation_count
;
2731 desc
->BufferOffset
= This
->buffer_offset
;
2733 if (This
->flag
& D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT
)
2735 desc
->ExplicitBindPoint
= This
->buffer_offset
;
2741 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetAnnotationByIndex(
2742 ID3D10EffectVariable
*iface
, UINT index
)
2744 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2745 struct d3d10_effect_variable
*a
;
2747 TRACE("iface %p, index %u\n", iface
, index
);
2749 if (index
>= This
->annotation_count
)
2751 WARN("Invalid index specified\n");
2752 return (ID3D10EffectVariable
*)&null_variable
;
2755 a
= &This
->annotations
[index
];
2757 TRACE("Returning annotation %p, %s\n", a
, debugstr_a(a
->name
));
2759 return (ID3D10EffectVariable
*)a
;
2762 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetAnnotationByName(
2763 ID3D10EffectVariable
*iface
, LPCSTR name
)
2765 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2768 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2770 for (i
= 0; i
< This
->annotation_count
; ++i
)
2772 struct d3d10_effect_variable
*a
= &This
->annotations
[i
];
2773 if (!strcmp(a
->name
, name
))
2775 TRACE("Returning annotation %p\n", a
);
2776 return (ID3D10EffectVariable
*)a
;
2780 WARN("Invalid name specified\n");
2782 return (ID3D10EffectVariable
*)&null_variable
;
2785 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetMemberByIndex(
2786 ID3D10EffectVariable
*iface
, UINT index
)
2788 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2789 struct d3d10_effect_variable
*m
;
2791 TRACE("iface %p, index %u\n", iface
, index
);
2793 if (index
>= This
->type
->member_count
)
2795 WARN("Invalid index specified\n");
2796 return (ID3D10EffectVariable
*)&null_variable
;
2799 m
= &This
->members
[index
];
2801 TRACE("Returning member %p, %s\n", m
, debugstr_a(m
->name
));
2803 return (ID3D10EffectVariable
*)m
;
2806 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetMemberByName(
2807 ID3D10EffectVariable
*iface
, LPCSTR name
)
2809 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2812 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
2816 WARN("Invalid name specified\n");
2817 return (ID3D10EffectVariable
*)&null_variable
;
2820 for (i
= 0; i
< This
->type
->member_count
; ++i
)
2822 struct d3d10_effect_variable
*m
= &This
->members
[i
];
2826 if (!strcmp(m
->name
, name
))
2828 TRACE("Returning member %p\n", m
);
2829 return (ID3D10EffectVariable
*)m
;
2834 WARN("Invalid name specified\n");
2836 return (ID3D10EffectVariable
*)&null_variable
;
2839 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetMemberBySemantic(
2840 ID3D10EffectVariable
*iface
, LPCSTR semantic
)
2842 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2845 TRACE("iface %p, semantic %s.\n", iface
, debugstr_a(semantic
));
2849 WARN("Invalid semantic specified\n");
2850 return (ID3D10EffectVariable
*)&null_variable
;
2853 for (i
= 0; i
< This
->type
->member_count
; ++i
)
2855 struct d3d10_effect_variable
*m
= &This
->members
[i
];
2859 if (!strcmp(m
->semantic
, semantic
))
2861 TRACE("Returning member %p\n", m
);
2862 return (ID3D10EffectVariable
*)m
;
2867 WARN("Invalid semantic specified\n");
2869 return (ID3D10EffectVariable
*)&null_variable
;
2872 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_GetElement(
2873 ID3D10EffectVariable
*iface
, UINT index
)
2875 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2876 struct d3d10_effect_variable
*v
;
2878 TRACE("iface %p, index %u\n", iface
, index
);
2880 if (index
>= This
->type
->element_count
)
2882 WARN("Invalid index specified\n");
2883 return (ID3D10EffectVariable
*)&null_variable
;
2886 v
= &This
->elements
[index
];
2888 TRACE("Returning element %p, %s\n", v
, debugstr_a(v
->name
));
2890 return (ID3D10EffectVariable
*)v
;
2893 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_variable_GetParentConstantBuffer(
2894 ID3D10EffectVariable
*iface
)
2896 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2898 TRACE("iface %p\n", iface
);
2900 return (ID3D10EffectConstantBuffer
*)This
->buffer
;
2903 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsScalar(
2904 ID3D10EffectVariable
*iface
)
2906 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2908 TRACE("iface %p\n", iface
);
2910 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_scalar_variable_vtbl
)
2911 return (ID3D10EffectScalarVariable
*)This
;
2913 return (ID3D10EffectScalarVariable
*)&null_scalar_variable
;
2916 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsVector(
2917 ID3D10EffectVariable
*iface
)
2919 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2921 TRACE("iface %p\n", iface
);
2923 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_vector_variable_vtbl
)
2924 return (ID3D10EffectVectorVariable
*)This
;
2926 return (ID3D10EffectVectorVariable
*)&null_vector_variable
;
2929 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsMatrix(
2930 ID3D10EffectVariable
*iface
)
2932 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2934 TRACE("iface %p\n", iface
);
2936 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_matrix_variable_vtbl
)
2937 return (ID3D10EffectMatrixVariable
*)This
;
2939 return (ID3D10EffectMatrixVariable
*)&null_matrix_variable
;
2942 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsString(
2943 ID3D10EffectVariable
*iface
)
2945 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2947 TRACE("iface %p\n", iface
);
2949 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_string_variable_vtbl
)
2950 return (ID3D10EffectStringVariable
*)This
;
2952 return (ID3D10EffectStringVariable
*)&null_string_variable
;
2955 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsShaderResource(
2956 ID3D10EffectVariable
*iface
)
2958 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2960 TRACE("iface %p\n", iface
);
2962 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_resource_variable_vtbl
)
2963 return (ID3D10EffectShaderResourceVariable
*)This
;
2965 return (ID3D10EffectShaderResourceVariable
*)&null_shader_resource_variable
;
2968 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsRenderTargetView(
2969 ID3D10EffectVariable
*iface
)
2971 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2973 TRACE("iface %p\n", iface
);
2975 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_render_target_view_variable_vtbl
)
2976 return (ID3D10EffectRenderTargetViewVariable
*)This
;
2978 return (ID3D10EffectRenderTargetViewVariable
*)&null_render_target_view_variable
;
2981 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsDepthStencilView(
2982 ID3D10EffectVariable
*iface
)
2984 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2986 TRACE("iface %p\n", iface
);
2988 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_depth_stencil_view_variable_vtbl
)
2989 return (ID3D10EffectDepthStencilViewVariable
*)This
;
2991 return (ID3D10EffectDepthStencilViewVariable
*)&null_depth_stencil_view_variable
;
2994 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_variable_AsConstantBuffer(
2995 ID3D10EffectVariable
*iface
)
2997 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
2999 TRACE("iface %p\n", iface
);
3001 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_constant_buffer_vtbl
)
3002 return (ID3D10EffectConstantBuffer
*)This
;
3004 return (ID3D10EffectConstantBuffer
*)&null_local_buffer
;
3007 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsShader(
3008 ID3D10EffectVariable
*iface
)
3010 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
3012 TRACE("iface %p\n", iface
);
3014 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_shader_variable_vtbl
)
3015 return (ID3D10EffectShaderVariable
*)This
;
3017 return (ID3D10EffectShaderVariable
*)&null_shader_variable
;
3020 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsBlend(ID3D10EffectVariable
*iface
)
3022 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
3024 TRACE("iface %p\n", iface
);
3026 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_blend_variable_vtbl
)
3027 return (ID3D10EffectBlendVariable
*)This
;
3029 return (ID3D10EffectBlendVariable
*)&null_blend_variable
;
3032 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsDepthStencil(
3033 ID3D10EffectVariable
*iface
)
3035 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
3037 TRACE("iface %p\n", iface
);
3039 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_depth_stencil_variable_vtbl
)
3040 return (ID3D10EffectDepthStencilVariable
*)This
;
3042 return (ID3D10EffectDepthStencilVariable
*)&null_depth_stencil_variable
;
3045 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsRasterizer(
3046 ID3D10EffectVariable
*iface
)
3048 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
3050 TRACE("iface %p\n", iface
);
3052 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_rasterizer_variable_vtbl
)
3053 return (ID3D10EffectRasterizerVariable
*)This
;
3055 return (ID3D10EffectRasterizerVariable
*)&null_rasterizer_variable
;
3058 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_variable_AsSampler(
3059 ID3D10EffectVariable
*iface
)
3061 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
3063 TRACE("iface %p\n", iface
);
3065 if (This
->vtbl
== (const ID3D10EffectVariableVtbl
*)&d3d10_effect_sampler_variable_vtbl
)
3066 return (ID3D10EffectSamplerVariable
*)This
;
3068 return (ID3D10EffectSamplerVariable
*)&null_sampler_variable
;
3071 static HRESULT STDMETHODCALLTYPE
d3d10_effect_variable_SetRawValue(ID3D10EffectVariable
*iface
,
3072 void *data
, UINT offset
, UINT count
)
3074 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
3079 static HRESULT STDMETHODCALLTYPE
d3d10_effect_variable_GetRawValue(ID3D10EffectVariable
*iface
,
3080 void *data
, UINT offset
, UINT count
)
3082 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
3087 static const struct ID3D10EffectVariableVtbl d3d10_effect_variable_vtbl
=
3089 /* ID3D10EffectVariable methods */
3090 d3d10_effect_variable_IsValid
,
3091 d3d10_effect_variable_GetType
,
3092 d3d10_effect_variable_GetDesc
,
3093 d3d10_effect_variable_GetAnnotationByIndex
,
3094 d3d10_effect_variable_GetAnnotationByName
,
3095 d3d10_effect_variable_GetMemberByIndex
,
3096 d3d10_effect_variable_GetMemberByName
,
3097 d3d10_effect_variable_GetMemberBySemantic
,
3098 d3d10_effect_variable_GetElement
,
3099 d3d10_effect_variable_GetParentConstantBuffer
,
3100 d3d10_effect_variable_AsScalar
,
3101 d3d10_effect_variable_AsVector
,
3102 d3d10_effect_variable_AsMatrix
,
3103 d3d10_effect_variable_AsString
,
3104 d3d10_effect_variable_AsShaderResource
,
3105 d3d10_effect_variable_AsRenderTargetView
,
3106 d3d10_effect_variable_AsDepthStencilView
,
3107 d3d10_effect_variable_AsConstantBuffer
,
3108 d3d10_effect_variable_AsShader
,
3109 d3d10_effect_variable_AsBlend
,
3110 d3d10_effect_variable_AsDepthStencil
,
3111 d3d10_effect_variable_AsRasterizer
,
3112 d3d10_effect_variable_AsSampler
,
3113 d3d10_effect_variable_SetRawValue
,
3114 d3d10_effect_variable_GetRawValue
,
3117 /* ID3D10EffectVariable methods */
3118 static BOOL STDMETHODCALLTYPE
d3d10_effect_constant_buffer_IsValid(ID3D10EffectConstantBuffer
*iface
)
3120 TRACE("iface %p\n", iface
);
3122 return (struct d3d10_effect_variable
*)iface
!= &null_local_buffer
;
3125 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetType(ID3D10EffectConstantBuffer
*iface
)
3127 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
3130 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetDesc(ID3D10EffectConstantBuffer
*iface
,
3131 D3D10_EFFECT_VARIABLE_DESC
*desc
)
3133 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
3136 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetAnnotationByIndex(
3137 ID3D10EffectConstantBuffer
*iface
, UINT index
)
3139 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
3142 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetAnnotationByName(
3143 ID3D10EffectConstantBuffer
*iface
, LPCSTR name
)
3145 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
3148 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetMemberByIndex(
3149 ID3D10EffectConstantBuffer
*iface
, UINT index
)
3151 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
3154 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetMemberByName(
3155 ID3D10EffectConstantBuffer
*iface
, LPCSTR name
)
3157 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
3160 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetMemberBySemantic(
3161 ID3D10EffectConstantBuffer
*iface
, LPCSTR semantic
)
3163 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
3166 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetElement(
3167 ID3D10EffectConstantBuffer
*iface
, UINT index
)
3169 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
3172 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetParentConstantBuffer(
3173 ID3D10EffectConstantBuffer
*iface
)
3175 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
3178 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsScalar(
3179 ID3D10EffectConstantBuffer
*iface
)
3181 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
3184 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsVector(
3185 ID3D10EffectConstantBuffer
*iface
)
3187 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
3190 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsMatrix(
3191 ID3D10EffectConstantBuffer
*iface
)
3193 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
3196 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsString(
3197 ID3D10EffectConstantBuffer
*iface
)
3199 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
3202 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsShaderResource(
3203 ID3D10EffectConstantBuffer
*iface
)
3205 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
3208 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsRenderTargetView(
3209 ID3D10EffectConstantBuffer
*iface
)
3211 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
3214 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsDepthStencilView(
3215 ID3D10EffectConstantBuffer
*iface
)
3217 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
3220 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsConstantBuffer(
3221 ID3D10EffectConstantBuffer
*iface
)
3223 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
3226 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsShader(
3227 ID3D10EffectConstantBuffer
*iface
)
3229 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
3232 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsBlend(ID3D10EffectConstantBuffer
*iface
)
3234 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
3237 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsDepthStencil(
3238 ID3D10EffectConstantBuffer
*iface
)
3240 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
3243 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsRasterizer(
3244 ID3D10EffectConstantBuffer
*iface
)
3246 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
3249 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_constant_buffer_AsSampler(
3250 ID3D10EffectConstantBuffer
*iface
)
3252 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
3255 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_SetRawValue(ID3D10EffectConstantBuffer
*iface
,
3256 void *data
, UINT offset
, UINT count
)
3258 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3261 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetRawValue(ID3D10EffectConstantBuffer
*iface
,
3262 void *data
, UINT offset
, UINT count
)
3264 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3267 /* ID3D10EffectConstantBuffer methods */
3268 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_SetConstantBuffer(ID3D10EffectConstantBuffer
*iface
,
3269 ID3D10Buffer
*buffer
)
3271 FIXME("iface %p, buffer %p stub!\n", iface
, buffer
);
3276 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetConstantBuffer(ID3D10EffectConstantBuffer
*iface
,
3277 ID3D10Buffer
**buffer
)
3279 FIXME("iface %p, buffer %p stub!\n", iface
, buffer
);
3284 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_SetTextureBuffer(ID3D10EffectConstantBuffer
*iface
,
3285 ID3D10ShaderResourceView
*view
)
3287 FIXME("iface %p, view %p stub!\n", iface
, view
);
3292 static HRESULT STDMETHODCALLTYPE
d3d10_effect_constant_buffer_GetTextureBuffer(ID3D10EffectConstantBuffer
*iface
,
3293 ID3D10ShaderResourceView
**view
)
3295 FIXME("iface %p, view %p stub!\n", iface
, view
);
3300 static const struct ID3D10EffectConstantBufferVtbl d3d10_effect_constant_buffer_vtbl
=
3302 /* ID3D10EffectVariable methods */
3303 d3d10_effect_constant_buffer_IsValid
,
3304 d3d10_effect_constant_buffer_GetType
,
3305 d3d10_effect_constant_buffer_GetDesc
,
3306 d3d10_effect_constant_buffer_GetAnnotationByIndex
,
3307 d3d10_effect_constant_buffer_GetAnnotationByName
,
3308 d3d10_effect_constant_buffer_GetMemberByIndex
,
3309 d3d10_effect_constant_buffer_GetMemberByName
,
3310 d3d10_effect_constant_buffer_GetMemberBySemantic
,
3311 d3d10_effect_constant_buffer_GetElement
,
3312 d3d10_effect_constant_buffer_GetParentConstantBuffer
,
3313 d3d10_effect_constant_buffer_AsScalar
,
3314 d3d10_effect_constant_buffer_AsVector
,
3315 d3d10_effect_constant_buffer_AsMatrix
,
3316 d3d10_effect_constant_buffer_AsString
,
3317 d3d10_effect_constant_buffer_AsShaderResource
,
3318 d3d10_effect_constant_buffer_AsRenderTargetView
,
3319 d3d10_effect_constant_buffer_AsDepthStencilView
,
3320 d3d10_effect_constant_buffer_AsConstantBuffer
,
3321 d3d10_effect_constant_buffer_AsShader
,
3322 d3d10_effect_constant_buffer_AsBlend
,
3323 d3d10_effect_constant_buffer_AsDepthStencil
,
3324 d3d10_effect_constant_buffer_AsRasterizer
,
3325 d3d10_effect_constant_buffer_AsSampler
,
3326 d3d10_effect_constant_buffer_SetRawValue
,
3327 d3d10_effect_constant_buffer_GetRawValue
,
3328 /* ID3D10EffectConstantBuffer methods */
3329 d3d10_effect_constant_buffer_SetConstantBuffer
,
3330 d3d10_effect_constant_buffer_GetConstantBuffer
,
3331 d3d10_effect_constant_buffer_SetTextureBuffer
,
3332 d3d10_effect_constant_buffer_GetTextureBuffer
,
3335 /* ID3D10EffectVariable methods */
3337 static BOOL STDMETHODCALLTYPE
d3d10_effect_scalar_variable_IsValid(ID3D10EffectScalarVariable
*iface
)
3339 TRACE("iface %p\n", iface
);
3341 return (struct d3d10_effect_variable
*)iface
!= &null_scalar_variable
;
3344 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetType(
3345 ID3D10EffectScalarVariable
*iface
)
3347 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
3350 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetDesc(ID3D10EffectScalarVariable
*iface
,
3351 D3D10_EFFECT_VARIABLE_DESC
*desc
)
3353 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
3356 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetAnnotationByIndex(
3357 ID3D10EffectScalarVariable
*iface
, UINT index
)
3359 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
3362 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetAnnotationByName(
3363 ID3D10EffectScalarVariable
*iface
, LPCSTR name
)
3365 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
3368 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetMemberByIndex(
3369 ID3D10EffectScalarVariable
*iface
, UINT index
)
3371 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
3374 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetMemberByName(
3375 ID3D10EffectScalarVariable
*iface
, LPCSTR name
)
3377 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
3380 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetMemberBySemantic(
3381 ID3D10EffectScalarVariable
*iface
, LPCSTR semantic
)
3383 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
3386 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetElement(
3387 ID3D10EffectScalarVariable
*iface
, UINT index
)
3389 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
3392 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetParentConstantBuffer(
3393 ID3D10EffectScalarVariable
*iface
)
3395 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
3398 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsScalar(
3399 ID3D10EffectScalarVariable
*iface
)
3401 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
3404 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsVector(
3405 ID3D10EffectScalarVariable
*iface
)
3407 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
3410 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsMatrix(
3411 ID3D10EffectScalarVariable
*iface
)
3413 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
3416 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsString(
3417 ID3D10EffectScalarVariable
*iface
)
3419 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
3422 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsShaderResource(
3423 ID3D10EffectScalarVariable
*iface
)
3425 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
3428 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsRenderTargetView(
3429 ID3D10EffectScalarVariable
*iface
)
3431 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
3434 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsDepthStencilView(
3435 ID3D10EffectScalarVariable
*iface
)
3437 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
3440 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsConstantBuffer(
3441 ID3D10EffectScalarVariable
*iface
)
3443 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
3446 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsShader(
3447 ID3D10EffectScalarVariable
*iface
)
3449 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
3452 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsBlend(
3453 ID3D10EffectScalarVariable
*iface
)
3455 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
3458 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsDepthStencil(
3459 ID3D10EffectScalarVariable
*iface
)
3461 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
3464 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsRasterizer(
3465 ID3D10EffectScalarVariable
*iface
)
3467 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
3470 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_scalar_variable_AsSampler(
3471 ID3D10EffectScalarVariable
*iface
)
3473 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
3476 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetRawValue(ID3D10EffectScalarVariable
*iface
,
3477 void *data
, UINT offset
, UINT count
)
3479 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3482 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetRawValue(ID3D10EffectScalarVariable
*iface
,
3483 void *data
, UINT offset
, UINT count
)
3485 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3488 /* ID3D10EffectScalarVariable methods */
3490 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetFloat(ID3D10EffectScalarVariable
*iface
,
3493 FIXME("iface %p, value %.8e stub!\n", iface
, value
);
3498 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetFloat(ID3D10EffectScalarVariable
*iface
,
3501 FIXME("iface %p, value %p stub!\n", iface
, value
);
3506 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetFloatArray(ID3D10EffectScalarVariable
*iface
,
3507 float *values
, UINT offset
, UINT count
)
3509 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3514 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetFloatArray(ID3D10EffectScalarVariable
*iface
,
3515 float *values
, UINT offset
, UINT count
)
3517 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3522 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetInt(ID3D10EffectScalarVariable
*iface
,
3525 FIXME("iface %p, value %d stub!\n", iface
, value
);
3530 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetInt(ID3D10EffectScalarVariable
*iface
,
3533 FIXME("iface %p, value %p stub!\n", iface
, value
);
3538 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetIntArray(ID3D10EffectScalarVariable
*iface
,
3539 int *values
, UINT offset
, UINT count
)
3541 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3546 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetIntArray(ID3D10EffectScalarVariable
*iface
,
3547 int *values
, UINT offset
, UINT count
)
3549 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3554 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetBool(ID3D10EffectScalarVariable
*iface
,
3557 FIXME("iface %p, value %d stub!\n", iface
, value
);
3562 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetBool(ID3D10EffectScalarVariable
*iface
,
3565 FIXME("iface %p, value %p stub!\n", iface
, value
);
3570 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_SetBoolArray(ID3D10EffectScalarVariable
*iface
,
3571 BOOL
*values
, UINT offset
, UINT count
)
3573 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3578 static HRESULT STDMETHODCALLTYPE
d3d10_effect_scalar_variable_GetBoolArray(ID3D10EffectScalarVariable
*iface
,
3579 BOOL
*values
, UINT offset
, UINT count
)
3581 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3586 static const struct ID3D10EffectScalarVariableVtbl d3d10_effect_scalar_variable_vtbl
=
3588 /* ID3D10EffectVariable methods */
3589 d3d10_effect_scalar_variable_IsValid
,
3590 d3d10_effect_scalar_variable_GetType
,
3591 d3d10_effect_scalar_variable_GetDesc
,
3592 d3d10_effect_scalar_variable_GetAnnotationByIndex
,
3593 d3d10_effect_scalar_variable_GetAnnotationByName
,
3594 d3d10_effect_scalar_variable_GetMemberByIndex
,
3595 d3d10_effect_scalar_variable_GetMemberByName
,
3596 d3d10_effect_scalar_variable_GetMemberBySemantic
,
3597 d3d10_effect_scalar_variable_GetElement
,
3598 d3d10_effect_scalar_variable_GetParentConstantBuffer
,
3599 d3d10_effect_scalar_variable_AsScalar
,
3600 d3d10_effect_scalar_variable_AsVector
,
3601 d3d10_effect_scalar_variable_AsMatrix
,
3602 d3d10_effect_scalar_variable_AsString
,
3603 d3d10_effect_scalar_variable_AsShaderResource
,
3604 d3d10_effect_scalar_variable_AsRenderTargetView
,
3605 d3d10_effect_scalar_variable_AsDepthStencilView
,
3606 d3d10_effect_scalar_variable_AsConstantBuffer
,
3607 d3d10_effect_scalar_variable_AsShader
,
3608 d3d10_effect_scalar_variable_AsBlend
,
3609 d3d10_effect_scalar_variable_AsDepthStencil
,
3610 d3d10_effect_scalar_variable_AsRasterizer
,
3611 d3d10_effect_scalar_variable_AsSampler
,
3612 d3d10_effect_scalar_variable_SetRawValue
,
3613 d3d10_effect_scalar_variable_GetRawValue
,
3614 /* ID3D10EffectScalarVariable methods */
3615 d3d10_effect_scalar_variable_SetFloat
,
3616 d3d10_effect_scalar_variable_GetFloat
,
3617 d3d10_effect_scalar_variable_SetFloatArray
,
3618 d3d10_effect_scalar_variable_GetFloatArray
,
3619 d3d10_effect_scalar_variable_SetInt
,
3620 d3d10_effect_scalar_variable_GetInt
,
3621 d3d10_effect_scalar_variable_SetIntArray
,
3622 d3d10_effect_scalar_variable_GetIntArray
,
3623 d3d10_effect_scalar_variable_SetBool
,
3624 d3d10_effect_scalar_variable_GetBool
,
3625 d3d10_effect_scalar_variable_SetBoolArray
,
3626 d3d10_effect_scalar_variable_GetBoolArray
,
3629 /* ID3D10EffectVariable methods */
3631 static BOOL STDMETHODCALLTYPE
d3d10_effect_vector_variable_IsValid(ID3D10EffectVectorVariable
*iface
)
3633 TRACE("iface %p\n", iface
);
3635 return (struct d3d10_effect_variable
*)iface
!= &null_vector_variable
;
3638 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetType(
3639 ID3D10EffectVectorVariable
*iface
)
3641 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
3644 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetDesc(ID3D10EffectVectorVariable
*iface
,
3645 D3D10_EFFECT_VARIABLE_DESC
*desc
)
3647 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
3650 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetAnnotationByIndex(
3651 ID3D10EffectVectorVariable
*iface
, UINT index
)
3653 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
3656 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetAnnotationByName(
3657 ID3D10EffectVectorVariable
*iface
, LPCSTR name
)
3659 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
3662 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetMemberByIndex(
3663 ID3D10EffectVectorVariable
*iface
, UINT index
)
3665 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
3668 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetMemberByName(
3669 ID3D10EffectVectorVariable
*iface
, LPCSTR name
)
3671 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
3674 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetMemberBySemantic(
3675 ID3D10EffectVectorVariable
*iface
, LPCSTR semantic
)
3677 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
3680 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetElement(
3681 ID3D10EffectVectorVariable
*iface
, UINT index
)
3683 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
3686 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetParentConstantBuffer(
3687 ID3D10EffectVectorVariable
*iface
)
3689 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
3692 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsScalar(
3693 ID3D10EffectVectorVariable
*iface
)
3695 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
3698 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsVector(
3699 ID3D10EffectVectorVariable
*iface
)
3701 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
3704 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsMatrix(
3705 ID3D10EffectVectorVariable
*iface
)
3707 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
3710 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsString(
3711 ID3D10EffectVectorVariable
*iface
)
3713 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
3716 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsShaderResource(
3717 ID3D10EffectVectorVariable
*iface
)
3719 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
3722 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsRenderTargetView(
3723 ID3D10EffectVectorVariable
*iface
)
3725 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
3728 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsDepthStencilView(
3729 ID3D10EffectVectorVariable
*iface
)
3731 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
3734 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsConstantBuffer(
3735 ID3D10EffectVectorVariable
*iface
)
3737 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
3740 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsShader(
3741 ID3D10EffectVectorVariable
*iface
)
3743 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
3746 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsBlend(
3747 ID3D10EffectVectorVariable
*iface
)
3749 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
3752 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsDepthStencil(
3753 ID3D10EffectVectorVariable
*iface
)
3755 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
3758 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsRasterizer(
3759 ID3D10EffectVectorVariable
*iface
)
3761 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
3764 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_vector_variable_AsSampler(
3765 ID3D10EffectVectorVariable
*iface
)
3767 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
3770 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetRawValue(ID3D10EffectVectorVariable
*iface
,
3771 void *data
, UINT offset
, UINT count
)
3773 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3776 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetRawValue(ID3D10EffectVectorVariable
*iface
,
3777 void *data
, UINT offset
, UINT count
)
3779 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
3782 /* ID3D10EffectVectorVariable methods */
3784 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetBoolVector(ID3D10EffectVectorVariable
*iface
,
3787 FIXME("iface %p, value %p stub!\n", iface
, value
);
3792 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetIntVector(ID3D10EffectVectorVariable
*iface
,
3795 FIXME("iface %p, value %p stub!\n", iface
, value
);
3800 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetFloatVector(ID3D10EffectVectorVariable
*iface
,
3803 FIXME("iface %p, value %p stub!\n", iface
, value
);
3808 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetBoolVector(ID3D10EffectVectorVariable
*iface
,
3811 FIXME("iface %p, value %p stub!\n", iface
, value
);
3816 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetIntVector(ID3D10EffectVectorVariable
*iface
,
3819 FIXME("iface %p, value %p stub!\n", iface
, value
);
3824 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetFloatVector(ID3D10EffectVectorVariable
*iface
,
3827 FIXME("iface %p, value %p stub!\n", iface
, value
);
3832 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetBoolVectorArray(ID3D10EffectVectorVariable
*iface
,
3833 BOOL
*values
, UINT offset
, UINT count
)
3835 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3840 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetIntVectorArray(ID3D10EffectVectorVariable
*iface
,
3841 int *values
, UINT offset
, UINT count
)
3843 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3848 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_SetFloatVectorArray(ID3D10EffectVectorVariable
*iface
,
3849 float *values
, UINT offset
, UINT count
)
3851 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3856 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetBoolVectorArray(ID3D10EffectVectorVariable
*iface
,
3857 BOOL
*values
, UINT offset
, UINT count
)
3859 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3864 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetIntVectorArray(ID3D10EffectVectorVariable
*iface
,
3865 int *values
, UINT offset
, UINT count
)
3867 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3872 static HRESULT STDMETHODCALLTYPE
d3d10_effect_vector_variable_GetFloatVectorArray(ID3D10EffectVectorVariable
*iface
,
3873 float *values
, UINT offset
, UINT count
)
3875 FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface
, values
, offset
, count
);
3880 static const struct ID3D10EffectVectorVariableVtbl d3d10_effect_vector_variable_vtbl
=
3882 /* ID3D10EffectVariable methods */
3883 d3d10_effect_vector_variable_IsValid
,
3884 d3d10_effect_vector_variable_GetType
,
3885 d3d10_effect_vector_variable_GetDesc
,
3886 d3d10_effect_vector_variable_GetAnnotationByIndex
,
3887 d3d10_effect_vector_variable_GetAnnotationByName
,
3888 d3d10_effect_vector_variable_GetMemberByIndex
,
3889 d3d10_effect_vector_variable_GetMemberByName
,
3890 d3d10_effect_vector_variable_GetMemberBySemantic
,
3891 d3d10_effect_vector_variable_GetElement
,
3892 d3d10_effect_vector_variable_GetParentConstantBuffer
,
3893 d3d10_effect_vector_variable_AsScalar
,
3894 d3d10_effect_vector_variable_AsVector
,
3895 d3d10_effect_vector_variable_AsMatrix
,
3896 d3d10_effect_vector_variable_AsString
,
3897 d3d10_effect_vector_variable_AsShaderResource
,
3898 d3d10_effect_vector_variable_AsRenderTargetView
,
3899 d3d10_effect_vector_variable_AsDepthStencilView
,
3900 d3d10_effect_vector_variable_AsConstantBuffer
,
3901 d3d10_effect_vector_variable_AsShader
,
3902 d3d10_effect_vector_variable_AsBlend
,
3903 d3d10_effect_vector_variable_AsDepthStencil
,
3904 d3d10_effect_vector_variable_AsRasterizer
,
3905 d3d10_effect_vector_variable_AsSampler
,
3906 d3d10_effect_vector_variable_SetRawValue
,
3907 d3d10_effect_vector_variable_GetRawValue
,
3908 /* ID3D10EffectVectorVariable methods */
3909 d3d10_effect_vector_variable_SetBoolVector
,
3910 d3d10_effect_vector_variable_SetIntVector
,
3911 d3d10_effect_vector_variable_SetFloatVector
,
3912 d3d10_effect_vector_variable_GetBoolVector
,
3913 d3d10_effect_vector_variable_GetIntVector
,
3914 d3d10_effect_vector_variable_GetFloatVector
,
3915 d3d10_effect_vector_variable_SetBoolVectorArray
,
3916 d3d10_effect_vector_variable_SetIntVectorArray
,
3917 d3d10_effect_vector_variable_SetFloatVectorArray
,
3918 d3d10_effect_vector_variable_GetBoolVectorArray
,
3919 d3d10_effect_vector_variable_GetIntVectorArray
,
3920 d3d10_effect_vector_variable_GetFloatVectorArray
,
3923 /* ID3D10EffectVariable methods */
3925 static BOOL STDMETHODCALLTYPE
d3d10_effect_matrix_variable_IsValid(ID3D10EffectMatrixVariable
*iface
)
3927 TRACE("iface %p\n", iface
);
3929 return (struct d3d10_effect_variable
*)iface
!= &null_matrix_variable
;
3932 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetType(
3933 ID3D10EffectMatrixVariable
*iface
)
3935 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
3938 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetDesc(ID3D10EffectMatrixVariable
*iface
,
3939 D3D10_EFFECT_VARIABLE_DESC
*desc
)
3941 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
3944 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetAnnotationByIndex(
3945 ID3D10EffectMatrixVariable
*iface
, UINT index
)
3947 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
3950 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetAnnotationByName(
3951 ID3D10EffectMatrixVariable
*iface
, LPCSTR name
)
3953 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
3956 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMemberByIndex(
3957 ID3D10EffectMatrixVariable
*iface
, UINT index
)
3959 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
3962 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMemberByName(
3963 ID3D10EffectMatrixVariable
*iface
, LPCSTR name
)
3965 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
3968 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMemberBySemantic(
3969 ID3D10EffectMatrixVariable
*iface
, LPCSTR semantic
)
3971 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
3974 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetElement(
3975 ID3D10EffectMatrixVariable
*iface
, UINT index
)
3977 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
3980 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetParentConstantBuffer(
3981 ID3D10EffectMatrixVariable
*iface
)
3983 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
3986 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsScalar(
3987 ID3D10EffectMatrixVariable
*iface
)
3989 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
3992 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsVector(
3993 ID3D10EffectMatrixVariable
*iface
)
3995 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
3998 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsMatrix(
3999 ID3D10EffectMatrixVariable
*iface
)
4001 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
4004 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsString(
4005 ID3D10EffectMatrixVariable
*iface
)
4007 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
4010 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsShaderResource(
4011 ID3D10EffectMatrixVariable
*iface
)
4013 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
4016 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsRenderTargetView(
4017 ID3D10EffectMatrixVariable
*iface
)
4019 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
4022 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsDepthStencilView(
4023 ID3D10EffectMatrixVariable
*iface
)
4025 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
4028 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsConstantBuffer(
4029 ID3D10EffectMatrixVariable
*iface
)
4031 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
4034 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsShader(
4035 ID3D10EffectMatrixVariable
*iface
)
4037 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
4040 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsBlend(
4041 ID3D10EffectMatrixVariable
*iface
)
4043 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
4046 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsDepthStencil(
4047 ID3D10EffectMatrixVariable
*iface
)
4049 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
4052 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsRasterizer(
4053 ID3D10EffectMatrixVariable
*iface
)
4055 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
4058 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_matrix_variable_AsSampler(
4059 ID3D10EffectMatrixVariable
*iface
)
4061 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
4064 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetRawValue(ID3D10EffectMatrixVariable
*iface
,
4065 void *data
, UINT offset
, UINT count
)
4067 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4070 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetRawValue(ID3D10EffectMatrixVariable
*iface
,
4071 void *data
, UINT offset
, UINT count
)
4073 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4076 /* ID3D10EffectMatrixVariable methods */
4078 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetMatrix(ID3D10EffectMatrixVariable
*iface
,
4081 FIXME("iface %p, data %p stub!\n", iface
, data
);
4086 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMatrix(ID3D10EffectMatrixVariable
*iface
,
4089 FIXME("iface %p, data %p stub!\n", iface
, data
);
4094 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetMatrixArray(ID3D10EffectMatrixVariable
*iface
,
4095 float *data
, UINT offset
, UINT count
)
4097 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
4102 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMatrixArray(ID3D10EffectMatrixVariable
*iface
,
4103 float *data
, UINT offset
, UINT count
)
4105 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
4110 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetMatrixTranspose(ID3D10EffectMatrixVariable
*iface
,
4113 FIXME("iface %p, data %p stub!\n", iface
, data
);
4118 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMatrixTranspose(ID3D10EffectMatrixVariable
*iface
,
4121 FIXME("iface %p, data %p stub!\n", iface
, data
);
4126 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_SetMatrixTransposeArray(ID3D10EffectMatrixVariable
*iface
,
4127 float *data
, UINT offset
, UINT count
)
4129 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
4134 static HRESULT STDMETHODCALLTYPE
d3d10_effect_matrix_variable_GetMatrixTransposeArray(ID3D10EffectMatrixVariable
*iface
,
4135 float *data
, UINT offset
, UINT count
)
4137 FIXME("iface %p, data %p, offset %u, count %u stub!\n", iface
, data
, offset
, count
);
4143 static const struct ID3D10EffectMatrixVariableVtbl d3d10_effect_matrix_variable_vtbl
=
4145 /* ID3D10EffectVariable methods */
4146 d3d10_effect_matrix_variable_IsValid
,
4147 d3d10_effect_matrix_variable_GetType
,
4148 d3d10_effect_matrix_variable_GetDesc
,
4149 d3d10_effect_matrix_variable_GetAnnotationByIndex
,
4150 d3d10_effect_matrix_variable_GetAnnotationByName
,
4151 d3d10_effect_matrix_variable_GetMemberByIndex
,
4152 d3d10_effect_matrix_variable_GetMemberByName
,
4153 d3d10_effect_matrix_variable_GetMemberBySemantic
,
4154 d3d10_effect_matrix_variable_GetElement
,
4155 d3d10_effect_matrix_variable_GetParentConstantBuffer
,
4156 d3d10_effect_matrix_variable_AsScalar
,
4157 d3d10_effect_matrix_variable_AsVector
,
4158 d3d10_effect_matrix_variable_AsMatrix
,
4159 d3d10_effect_matrix_variable_AsString
,
4160 d3d10_effect_matrix_variable_AsShaderResource
,
4161 d3d10_effect_matrix_variable_AsRenderTargetView
,
4162 d3d10_effect_matrix_variable_AsDepthStencilView
,
4163 d3d10_effect_matrix_variable_AsConstantBuffer
,
4164 d3d10_effect_matrix_variable_AsShader
,
4165 d3d10_effect_matrix_variable_AsBlend
,
4166 d3d10_effect_matrix_variable_AsDepthStencil
,
4167 d3d10_effect_matrix_variable_AsRasterizer
,
4168 d3d10_effect_matrix_variable_AsSampler
,
4169 d3d10_effect_matrix_variable_SetRawValue
,
4170 d3d10_effect_matrix_variable_GetRawValue
,
4171 /* ID3D10EffectMatrixVariable methods */
4172 d3d10_effect_matrix_variable_SetMatrix
,
4173 d3d10_effect_matrix_variable_GetMatrix
,
4174 d3d10_effect_matrix_variable_SetMatrixArray
,
4175 d3d10_effect_matrix_variable_GetMatrixArray
,
4176 d3d10_effect_matrix_variable_SetMatrixTranspose
,
4177 d3d10_effect_matrix_variable_GetMatrixTranspose
,
4178 d3d10_effect_matrix_variable_SetMatrixTransposeArray
,
4179 d3d10_effect_matrix_variable_GetMatrixTransposeArray
,
4182 /* ID3D10EffectVariable methods */
4184 static BOOL STDMETHODCALLTYPE
d3d10_effect_string_variable_IsValid(ID3D10EffectStringVariable
*iface
)
4186 TRACE("iface %p\n", iface
);
4188 return (struct d3d10_effect_variable
*)iface
!= &null_string_variable
;
4191 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetType(
4192 ID3D10EffectStringVariable
*iface
)
4194 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
4197 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_GetDesc(ID3D10EffectStringVariable
*iface
,
4198 D3D10_EFFECT_VARIABLE_DESC
*desc
)
4200 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
4203 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetAnnotationByIndex(
4204 ID3D10EffectStringVariable
*iface
, UINT index
)
4206 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
4209 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetAnnotationByName(
4210 ID3D10EffectStringVariable
*iface
, LPCSTR name
)
4212 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
4215 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetMemberByIndex(
4216 ID3D10EffectStringVariable
*iface
, UINT index
)
4218 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
4221 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetMemberByName(
4222 ID3D10EffectStringVariable
*iface
, LPCSTR name
)
4224 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
4227 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetMemberBySemantic(
4228 ID3D10EffectStringVariable
*iface
, LPCSTR semantic
)
4230 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
4233 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetElement(
4234 ID3D10EffectStringVariable
*iface
, UINT index
)
4236 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
4239 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_string_variable_GetParentConstantBuffer(
4240 ID3D10EffectStringVariable
*iface
)
4242 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
4245 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsScalar(
4246 ID3D10EffectStringVariable
*iface
)
4248 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
4251 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsVector(
4252 ID3D10EffectStringVariable
*iface
)
4254 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
4257 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsMatrix(
4258 ID3D10EffectStringVariable
*iface
)
4260 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
4263 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsString(
4264 ID3D10EffectStringVariable
*iface
)
4266 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
4269 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsShaderResource(
4270 ID3D10EffectStringVariable
*iface
)
4272 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
4275 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsRenderTargetView(
4276 ID3D10EffectStringVariable
*iface
)
4278 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
4281 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsDepthStencilView(
4282 ID3D10EffectStringVariable
*iface
)
4284 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
4287 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsConstantBuffer(
4288 ID3D10EffectStringVariable
*iface
)
4290 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
4293 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsShader(
4294 ID3D10EffectStringVariable
*iface
)
4296 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
4299 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsBlend(
4300 ID3D10EffectStringVariable
*iface
)
4302 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
4305 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsDepthStencil(
4306 ID3D10EffectStringVariable
*iface
)
4308 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
4311 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsRasterizer(
4312 ID3D10EffectStringVariable
*iface
)
4314 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
4317 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_string_variable_AsSampler(
4318 ID3D10EffectStringVariable
*iface
)
4320 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
4323 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_SetRawValue(ID3D10EffectStringVariable
*iface
,
4324 void *data
, UINT offset
, UINT count
)
4326 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4329 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_GetRawValue(ID3D10EffectStringVariable
*iface
,
4330 void *data
, UINT offset
, UINT count
)
4332 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4335 /* ID3D10EffectStringVariable methods */
4337 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_GetString(ID3D10EffectStringVariable
*iface
,
4340 FIXME("iface %p, str %p stub!\n", iface
, str
);
4345 static HRESULT STDMETHODCALLTYPE
d3d10_effect_string_variable_GetStringArray(ID3D10EffectStringVariable
*iface
,
4346 LPCSTR
*strs
, UINT offset
, UINT count
)
4348 FIXME("iface %p, strs %p, offset %u, count %u stub!\n", iface
, strs
, offset
, count
);
4354 static const struct ID3D10EffectStringVariableVtbl d3d10_effect_string_variable_vtbl
=
4356 /* ID3D10EffectVariable methods */
4357 d3d10_effect_string_variable_IsValid
,
4358 d3d10_effect_string_variable_GetType
,
4359 d3d10_effect_string_variable_GetDesc
,
4360 d3d10_effect_string_variable_GetAnnotationByIndex
,
4361 d3d10_effect_string_variable_GetAnnotationByName
,
4362 d3d10_effect_string_variable_GetMemberByIndex
,
4363 d3d10_effect_string_variable_GetMemberByName
,
4364 d3d10_effect_string_variable_GetMemberBySemantic
,
4365 d3d10_effect_string_variable_GetElement
,
4366 d3d10_effect_string_variable_GetParentConstantBuffer
,
4367 d3d10_effect_string_variable_AsScalar
,
4368 d3d10_effect_string_variable_AsVector
,
4369 d3d10_effect_string_variable_AsMatrix
,
4370 d3d10_effect_string_variable_AsString
,
4371 d3d10_effect_string_variable_AsShaderResource
,
4372 d3d10_effect_string_variable_AsRenderTargetView
,
4373 d3d10_effect_string_variable_AsDepthStencilView
,
4374 d3d10_effect_string_variable_AsConstantBuffer
,
4375 d3d10_effect_string_variable_AsShader
,
4376 d3d10_effect_string_variable_AsBlend
,
4377 d3d10_effect_string_variable_AsDepthStencil
,
4378 d3d10_effect_string_variable_AsRasterizer
,
4379 d3d10_effect_string_variable_AsSampler
,
4380 d3d10_effect_string_variable_SetRawValue
,
4381 d3d10_effect_string_variable_GetRawValue
,
4382 /* ID3D10EffectStringVariable methods */
4383 d3d10_effect_string_variable_GetString
,
4384 d3d10_effect_string_variable_GetStringArray
,
4387 /* ID3D10EffectVariable methods */
4389 static BOOL STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_IsValid(ID3D10EffectShaderResourceVariable
*iface
)
4391 TRACE("iface %p\n", iface
);
4393 return (struct d3d10_effect_variable
*)iface
!= &null_shader_resource_variable
;
4396 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetType(
4397 ID3D10EffectShaderResourceVariable
*iface
)
4399 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
4402 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetDesc(
4403 ID3D10EffectShaderResourceVariable
*iface
, D3D10_EFFECT_VARIABLE_DESC
*desc
)
4405 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
4408 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetAnnotationByIndex(
4409 ID3D10EffectShaderResourceVariable
*iface
, UINT index
)
4411 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
4414 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetAnnotationByName(
4415 ID3D10EffectShaderResourceVariable
*iface
, LPCSTR name
)
4417 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
4420 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetMemberByIndex(
4421 ID3D10EffectShaderResourceVariable
*iface
, UINT index
)
4423 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
4426 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetMemberByName(
4427 ID3D10EffectShaderResourceVariable
*iface
, LPCSTR name
)
4429 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
4432 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetMemberBySemantic(
4433 ID3D10EffectShaderResourceVariable
*iface
, LPCSTR semantic
)
4435 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
4438 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetElement(
4439 ID3D10EffectShaderResourceVariable
*iface
, UINT index
)
4441 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
4444 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetParentConstantBuffer(
4445 ID3D10EffectShaderResourceVariable
*iface
)
4447 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
4450 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsScalar(
4451 ID3D10EffectShaderResourceVariable
*iface
)
4453 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
4456 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsVector(
4457 ID3D10EffectShaderResourceVariable
*iface
)
4459 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
4462 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsMatrix(
4463 ID3D10EffectShaderResourceVariable
*iface
)
4465 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
4468 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsString(
4469 ID3D10EffectShaderResourceVariable
*iface
)
4471 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
4474 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsShaderResource(
4475 ID3D10EffectShaderResourceVariable
*iface
)
4477 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
4480 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsRenderTargetView(
4481 ID3D10EffectShaderResourceVariable
*iface
)
4483 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
4486 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsDepthStencilView(
4487 ID3D10EffectShaderResourceVariable
*iface
)
4489 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
4492 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsConstantBuffer(
4493 ID3D10EffectShaderResourceVariable
*iface
)
4495 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
4498 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsShader(
4499 ID3D10EffectShaderResourceVariable
*iface
)
4501 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
4504 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsBlend(
4505 ID3D10EffectShaderResourceVariable
*iface
)
4507 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
4510 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsDepthStencil(
4511 ID3D10EffectShaderResourceVariable
*iface
)
4513 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
4516 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsRasterizer(
4517 ID3D10EffectShaderResourceVariable
*iface
)
4519 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
4522 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_AsSampler(
4523 ID3D10EffectShaderResourceVariable
*iface
)
4525 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
4528 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_SetRawValue(
4529 ID3D10EffectShaderResourceVariable
*iface
, void *data
, UINT offset
, UINT count
)
4531 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4534 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetRawValue(
4535 ID3D10EffectShaderResourceVariable
*iface
, void *data
, UINT offset
, UINT count
)
4537 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4540 /* ID3D10EffectShaderResourceVariable methods */
4542 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_SetResource(
4543 ID3D10EffectShaderResourceVariable
*iface
, ID3D10ShaderResourceView
*resource
)
4545 FIXME("iface %p, resource %p stub!\n", iface
, resource
);
4550 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetResource(
4551 ID3D10EffectShaderResourceVariable
*iface
, ID3D10ShaderResourceView
**resource
)
4553 FIXME("iface %p, resource %p stub!\n", iface
, resource
);
4558 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_SetResourceArray(
4559 ID3D10EffectShaderResourceVariable
*iface
, ID3D10ShaderResourceView
**resources
, UINT offset
, UINT count
)
4561 FIXME("iface %p, resources %p, offset %u, count %u stub!\n", iface
, resources
, offset
, count
);
4566 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_resource_variable_GetResourceArray(
4567 ID3D10EffectShaderResourceVariable
*iface
, ID3D10ShaderResourceView
**resources
, UINT offset
, UINT count
)
4569 FIXME("iface %p, resources %p, offset %u, count %u stub!\n", iface
, resources
, offset
, count
);
4575 static const struct ID3D10EffectShaderResourceVariableVtbl d3d10_effect_shader_resource_variable_vtbl
=
4577 /* ID3D10EffectVariable methods */
4578 d3d10_effect_shader_resource_variable_IsValid
,
4579 d3d10_effect_shader_resource_variable_GetType
,
4580 d3d10_effect_shader_resource_variable_GetDesc
,
4581 d3d10_effect_shader_resource_variable_GetAnnotationByIndex
,
4582 d3d10_effect_shader_resource_variable_GetAnnotationByName
,
4583 d3d10_effect_shader_resource_variable_GetMemberByIndex
,
4584 d3d10_effect_shader_resource_variable_GetMemberByName
,
4585 d3d10_effect_shader_resource_variable_GetMemberBySemantic
,
4586 d3d10_effect_shader_resource_variable_GetElement
,
4587 d3d10_effect_shader_resource_variable_GetParentConstantBuffer
,
4588 d3d10_effect_shader_resource_variable_AsScalar
,
4589 d3d10_effect_shader_resource_variable_AsVector
,
4590 d3d10_effect_shader_resource_variable_AsMatrix
,
4591 d3d10_effect_shader_resource_variable_AsString
,
4592 d3d10_effect_shader_resource_variable_AsShaderResource
,
4593 d3d10_effect_shader_resource_variable_AsRenderTargetView
,
4594 d3d10_effect_shader_resource_variable_AsDepthStencilView
,
4595 d3d10_effect_shader_resource_variable_AsConstantBuffer
,
4596 d3d10_effect_shader_resource_variable_AsShader
,
4597 d3d10_effect_shader_resource_variable_AsBlend
,
4598 d3d10_effect_shader_resource_variable_AsDepthStencil
,
4599 d3d10_effect_shader_resource_variable_AsRasterizer
,
4600 d3d10_effect_shader_resource_variable_AsSampler
,
4601 d3d10_effect_shader_resource_variable_SetRawValue
,
4602 d3d10_effect_shader_resource_variable_GetRawValue
,
4603 /* ID3D10EffectShaderResourceVariable methods */
4604 d3d10_effect_shader_resource_variable_SetResource
,
4605 d3d10_effect_shader_resource_variable_GetResource
,
4606 d3d10_effect_shader_resource_variable_SetResourceArray
,
4607 d3d10_effect_shader_resource_variable_GetResourceArray
,
4610 /* ID3D10EffectVariable methods */
4612 static BOOL STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_IsValid(
4613 ID3D10EffectRenderTargetViewVariable
*iface
)
4615 TRACE("iface %p\n", iface
);
4617 return (struct d3d10_effect_variable
*)iface
!= &null_render_target_view_variable
;
4620 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetType(
4621 ID3D10EffectRenderTargetViewVariable
*iface
)
4623 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
4626 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetDesc(
4627 ID3D10EffectRenderTargetViewVariable
*iface
, D3D10_EFFECT_VARIABLE_DESC
*desc
)
4629 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
4632 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetAnnotationByIndex(
4633 ID3D10EffectRenderTargetViewVariable
*iface
, UINT index
)
4635 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
4638 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetAnnotationByName(
4639 ID3D10EffectRenderTargetViewVariable
*iface
, LPCSTR name
)
4641 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
4644 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetMemberByIndex(
4645 ID3D10EffectRenderTargetViewVariable
*iface
, UINT index
)
4647 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
4650 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetMemberByName(
4651 ID3D10EffectRenderTargetViewVariable
*iface
, LPCSTR name
)
4653 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
4656 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetMemberBySemantic(
4657 ID3D10EffectRenderTargetViewVariable
*iface
, LPCSTR semantic
)
4659 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
4662 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetElement(
4663 ID3D10EffectRenderTargetViewVariable
*iface
, UINT index
)
4665 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
4668 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetParentConstantBuffer(
4669 ID3D10EffectRenderTargetViewVariable
*iface
)
4671 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
4674 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsScalar(
4675 ID3D10EffectRenderTargetViewVariable
*iface
)
4677 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
4680 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsVector(
4681 ID3D10EffectRenderTargetViewVariable
*iface
)
4683 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
4686 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsMatrix(
4687 ID3D10EffectRenderTargetViewVariable
*iface
)
4689 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
4692 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsString(
4693 ID3D10EffectRenderTargetViewVariable
*iface
)
4695 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
4698 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsShaderResource(
4699 ID3D10EffectRenderTargetViewVariable
*iface
)
4701 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
4704 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsRenderTargetView(
4705 ID3D10EffectRenderTargetViewVariable
*iface
)
4707 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
4710 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsDepthStencilView(
4711 ID3D10EffectRenderTargetViewVariable
*iface
)
4713 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
4716 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsConstantBuffer(
4717 ID3D10EffectRenderTargetViewVariable
*iface
)
4719 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
4722 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsShader(
4723 ID3D10EffectRenderTargetViewVariable
*iface
)
4725 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
4728 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsBlend(
4729 ID3D10EffectRenderTargetViewVariable
*iface
)
4731 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
4734 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsDepthStencil(
4735 ID3D10EffectRenderTargetViewVariable
*iface
)
4737 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
4740 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsRasterizer(
4741 ID3D10EffectRenderTargetViewVariable
*iface
)
4743 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
4746 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_AsSampler(
4747 ID3D10EffectRenderTargetViewVariable
*iface
)
4749 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
4752 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_SetRawValue(
4753 ID3D10EffectRenderTargetViewVariable
*iface
, void *data
, UINT offset
, UINT count
)
4755 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4758 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetRawValue(
4759 ID3D10EffectRenderTargetViewVariable
*iface
, void *data
, UINT offset
, UINT count
)
4761 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4764 /* ID3D10EffectRenderTargetViewVariable methods */
4766 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_SetRenderTarget(
4767 ID3D10EffectRenderTargetViewVariable
*iface
, ID3D10RenderTargetView
*view
)
4769 FIXME("iface %p, view %p stub!\n", iface
, view
);
4774 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetRenderTarget(
4775 ID3D10EffectRenderTargetViewVariable
*iface
, ID3D10RenderTargetView
**view
)
4777 FIXME("iface %p, view %p stub!\n", iface
, view
);
4782 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_SetRenderTargetArray(
4783 ID3D10EffectRenderTargetViewVariable
*iface
, ID3D10RenderTargetView
**views
, UINT offset
, UINT count
)
4785 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface
, views
, offset
, count
);
4790 static HRESULT STDMETHODCALLTYPE
d3d10_effect_render_target_view_variable_GetRenderTargetArray(
4791 ID3D10EffectRenderTargetViewVariable
*iface
, ID3D10RenderTargetView
**views
, UINT offset
, UINT count
)
4793 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface
, views
, offset
, count
);
4799 static const struct ID3D10EffectRenderTargetViewVariableVtbl d3d10_effect_render_target_view_variable_vtbl
=
4801 /* ID3D10EffectVariable methods */
4802 d3d10_effect_render_target_view_variable_IsValid
,
4803 d3d10_effect_render_target_view_variable_GetType
,
4804 d3d10_effect_render_target_view_variable_GetDesc
,
4805 d3d10_effect_render_target_view_variable_GetAnnotationByIndex
,
4806 d3d10_effect_render_target_view_variable_GetAnnotationByName
,
4807 d3d10_effect_render_target_view_variable_GetMemberByIndex
,
4808 d3d10_effect_render_target_view_variable_GetMemberByName
,
4809 d3d10_effect_render_target_view_variable_GetMemberBySemantic
,
4810 d3d10_effect_render_target_view_variable_GetElement
,
4811 d3d10_effect_render_target_view_variable_GetParentConstantBuffer
,
4812 d3d10_effect_render_target_view_variable_AsScalar
,
4813 d3d10_effect_render_target_view_variable_AsVector
,
4814 d3d10_effect_render_target_view_variable_AsMatrix
,
4815 d3d10_effect_render_target_view_variable_AsString
,
4816 d3d10_effect_render_target_view_variable_AsShaderResource
,
4817 d3d10_effect_render_target_view_variable_AsRenderTargetView
,
4818 d3d10_effect_render_target_view_variable_AsDepthStencilView
,
4819 d3d10_effect_render_target_view_variable_AsConstantBuffer
,
4820 d3d10_effect_render_target_view_variable_AsShader
,
4821 d3d10_effect_render_target_view_variable_AsBlend
,
4822 d3d10_effect_render_target_view_variable_AsDepthStencil
,
4823 d3d10_effect_render_target_view_variable_AsRasterizer
,
4824 d3d10_effect_render_target_view_variable_AsSampler
,
4825 d3d10_effect_render_target_view_variable_SetRawValue
,
4826 d3d10_effect_render_target_view_variable_GetRawValue
,
4827 /* ID3D10EffectRenderTargetViewVariable methods */
4828 d3d10_effect_render_target_view_variable_SetRenderTarget
,
4829 d3d10_effect_render_target_view_variable_GetRenderTarget
,
4830 d3d10_effect_render_target_view_variable_SetRenderTargetArray
,
4831 d3d10_effect_render_target_view_variable_GetRenderTargetArray
,
4834 /* ID3D10EffectVariable methods */
4836 static BOOL STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_IsValid(
4837 ID3D10EffectDepthStencilViewVariable
*iface
)
4839 TRACE("iface %p\n", iface
);
4841 return (struct d3d10_effect_variable
*)iface
!= &null_depth_stencil_view_variable
;
4844 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetType(
4845 ID3D10EffectDepthStencilViewVariable
*iface
)
4847 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
4850 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetDesc(
4851 ID3D10EffectDepthStencilViewVariable
*iface
, D3D10_EFFECT_VARIABLE_DESC
*desc
)
4853 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
4856 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetAnnotationByIndex(
4857 ID3D10EffectDepthStencilViewVariable
*iface
, UINT index
)
4859 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
4862 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetAnnotationByName(
4863 ID3D10EffectDepthStencilViewVariable
*iface
, LPCSTR name
)
4865 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
4868 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetMemberByIndex(
4869 ID3D10EffectDepthStencilViewVariable
*iface
, UINT index
)
4871 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
4874 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetMemberByName(
4875 ID3D10EffectDepthStencilViewVariable
*iface
, LPCSTR name
)
4877 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
4880 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetMemberBySemantic(
4881 ID3D10EffectDepthStencilViewVariable
*iface
, LPCSTR semantic
)
4883 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
4886 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetElement(
4887 ID3D10EffectDepthStencilViewVariable
*iface
, UINT index
)
4889 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
4892 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetParentConstantBuffer(
4893 ID3D10EffectDepthStencilViewVariable
*iface
)
4895 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
4898 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsScalar(
4899 ID3D10EffectDepthStencilViewVariable
*iface
)
4901 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
4904 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsVector(
4905 ID3D10EffectDepthStencilViewVariable
*iface
)
4907 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
4910 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsMatrix(
4911 ID3D10EffectDepthStencilViewVariable
*iface
)
4913 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
4916 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsString(
4917 ID3D10EffectDepthStencilViewVariable
*iface
)
4919 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
4922 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsShaderResource(
4923 ID3D10EffectDepthStencilViewVariable
*iface
)
4925 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
4928 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsRenderTargetView(
4929 ID3D10EffectDepthStencilViewVariable
*iface
)
4931 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
4934 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsDepthStencilView(
4935 ID3D10EffectDepthStencilViewVariable
*iface
)
4937 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
4940 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsConstantBuffer(
4941 ID3D10EffectDepthStencilViewVariable
*iface
)
4943 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
4946 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsShader(
4947 ID3D10EffectDepthStencilViewVariable
*iface
)
4949 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
4952 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsBlend(
4953 ID3D10EffectDepthStencilViewVariable
*iface
)
4955 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
4958 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsDepthStencil(
4959 ID3D10EffectDepthStencilViewVariable
*iface
)
4961 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
4964 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsRasterizer(
4965 ID3D10EffectDepthStencilViewVariable
*iface
)
4967 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
4970 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_AsSampler(
4971 ID3D10EffectDepthStencilViewVariable
*iface
)
4973 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
4976 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_SetRawValue(
4977 ID3D10EffectDepthStencilViewVariable
*iface
, void *data
, UINT offset
, UINT count
)
4979 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4982 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetRawValue(
4983 ID3D10EffectDepthStencilViewVariable
*iface
, void *data
, UINT offset
, UINT count
)
4985 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
4988 /* ID3D10EffectDepthStencilViewVariable methods */
4990 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_SetDepthStencil(
4991 ID3D10EffectDepthStencilViewVariable
*iface
, ID3D10DepthStencilView
*view
)
4993 FIXME("iface %p, view %p stub!\n", iface
, view
);
4998 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetDepthStencil(
4999 ID3D10EffectDepthStencilViewVariable
*iface
, ID3D10DepthStencilView
**view
)
5001 FIXME("iface %p, view %p stub!\n", iface
, view
);
5006 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_SetDepthStencilArray(
5007 ID3D10EffectDepthStencilViewVariable
*iface
, ID3D10DepthStencilView
**views
, UINT offset
, UINT count
)
5009 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface
, views
, offset
, count
);
5014 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_view_variable_GetDepthStencilArray(
5015 ID3D10EffectDepthStencilViewVariable
*iface
, ID3D10DepthStencilView
**views
, UINT offset
, UINT count
)
5017 FIXME("iface %p, views %p, offset %u, count %u stub!\n", iface
, views
, offset
, count
);
5023 static const struct ID3D10EffectDepthStencilViewVariableVtbl d3d10_effect_depth_stencil_view_variable_vtbl
=
5025 /* ID3D10EffectVariable methods */
5026 d3d10_effect_depth_stencil_view_variable_IsValid
,
5027 d3d10_effect_depth_stencil_view_variable_GetType
,
5028 d3d10_effect_depth_stencil_view_variable_GetDesc
,
5029 d3d10_effect_depth_stencil_view_variable_GetAnnotationByIndex
,
5030 d3d10_effect_depth_stencil_view_variable_GetAnnotationByName
,
5031 d3d10_effect_depth_stencil_view_variable_GetMemberByIndex
,
5032 d3d10_effect_depth_stencil_view_variable_GetMemberByName
,
5033 d3d10_effect_depth_stencil_view_variable_GetMemberBySemantic
,
5034 d3d10_effect_depth_stencil_view_variable_GetElement
,
5035 d3d10_effect_depth_stencil_view_variable_GetParentConstantBuffer
,
5036 d3d10_effect_depth_stencil_view_variable_AsScalar
,
5037 d3d10_effect_depth_stencil_view_variable_AsVector
,
5038 d3d10_effect_depth_stencil_view_variable_AsMatrix
,
5039 d3d10_effect_depth_stencil_view_variable_AsString
,
5040 d3d10_effect_depth_stencil_view_variable_AsShaderResource
,
5041 d3d10_effect_depth_stencil_view_variable_AsRenderTargetView
,
5042 d3d10_effect_depth_stencil_view_variable_AsDepthStencilView
,
5043 d3d10_effect_depth_stencil_view_variable_AsConstantBuffer
,
5044 d3d10_effect_depth_stencil_view_variable_AsShader
,
5045 d3d10_effect_depth_stencil_view_variable_AsBlend
,
5046 d3d10_effect_depth_stencil_view_variable_AsDepthStencil
,
5047 d3d10_effect_depth_stencil_view_variable_AsRasterizer
,
5048 d3d10_effect_depth_stencil_view_variable_AsSampler
,
5049 d3d10_effect_depth_stencil_view_variable_SetRawValue
,
5050 d3d10_effect_depth_stencil_view_variable_GetRawValue
,
5051 /* ID3D10EffectDepthStencilViewVariable methods */
5052 d3d10_effect_depth_stencil_view_variable_SetDepthStencil
,
5053 d3d10_effect_depth_stencil_view_variable_GetDepthStencil
,
5054 d3d10_effect_depth_stencil_view_variable_SetDepthStencilArray
,
5055 d3d10_effect_depth_stencil_view_variable_GetDepthStencilArray
,
5058 /* ID3D10EffectVariable methods */
5060 static BOOL STDMETHODCALLTYPE
d3d10_effect_shader_variable_IsValid(ID3D10EffectShaderVariable
*iface
)
5062 TRACE("iface %p\n", iface
);
5064 return (struct d3d10_effect_variable
*)iface
!= &null_shader_variable
;
5067 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetType(
5068 ID3D10EffectShaderVariable
*iface
)
5070 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
5073 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetDesc(ID3D10EffectShaderVariable
*iface
,
5074 D3D10_EFFECT_VARIABLE_DESC
*desc
)
5076 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
5079 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetAnnotationByIndex(
5080 ID3D10EffectShaderVariable
*iface
, UINT index
)
5082 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
5085 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetAnnotationByName(
5086 ID3D10EffectShaderVariable
*iface
, LPCSTR name
)
5088 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
5091 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetMemberByIndex(
5092 ID3D10EffectShaderVariable
*iface
, UINT index
)
5094 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
5097 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetMemberByName(
5098 ID3D10EffectShaderVariable
*iface
, LPCSTR name
)
5100 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
5103 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetMemberBySemantic(
5104 ID3D10EffectShaderVariable
*iface
, LPCSTR semantic
)
5106 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
5109 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetElement(
5110 ID3D10EffectShaderVariable
*iface
, UINT index
)
5112 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
5115 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetParentConstantBuffer(
5116 ID3D10EffectShaderVariable
*iface
)
5118 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
5121 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsScalar(
5122 ID3D10EffectShaderVariable
*iface
)
5124 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
5127 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsVector(
5128 ID3D10EffectShaderVariable
*iface
)
5130 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
5133 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsMatrix(
5134 ID3D10EffectShaderVariable
*iface
)
5136 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
5139 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsString(
5140 ID3D10EffectShaderVariable
*iface
)
5142 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
5145 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsShaderResource(
5146 ID3D10EffectShaderVariable
*iface
)
5148 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
5151 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsRenderTargetView(
5152 ID3D10EffectShaderVariable
*iface
)
5154 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
5157 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsDepthStencilView(
5158 ID3D10EffectShaderVariable
*iface
)
5160 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
5163 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsConstantBuffer(
5164 ID3D10EffectShaderVariable
*iface
)
5166 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
5169 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsShader(
5170 ID3D10EffectShaderVariable
*iface
)
5172 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
5175 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsBlend(
5176 ID3D10EffectShaderVariable
*iface
)
5178 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
5181 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsDepthStencil(
5182 ID3D10EffectShaderVariable
*iface
)
5184 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
5187 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsRasterizer(
5188 ID3D10EffectShaderVariable
*iface
)
5190 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
5193 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_shader_variable_AsSampler(
5194 ID3D10EffectShaderVariable
*iface
)
5196 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
5199 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_SetRawValue(
5200 ID3D10EffectShaderVariable
*iface
, void *data
, UINT offset
, UINT count
)
5202 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5205 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetRawValue(
5206 ID3D10EffectShaderVariable
*iface
, void *data
, UINT offset
, UINT count
)
5208 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5211 /* ID3D10EffectShaderVariable methods */
5213 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetShaderDesc(
5214 ID3D10EffectShaderVariable
*iface
, UINT index
, D3D10_EFFECT_SHADER_DESC
*desc
)
5216 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
5221 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetVertexShader(
5222 ID3D10EffectShaderVariable
*iface
, UINT index
, ID3D10VertexShader
**shader
)
5224 FIXME("iface %p, index %u, shader %p stub!\n", iface
, index
, shader
);
5229 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetGeometryShader(
5230 ID3D10EffectShaderVariable
*iface
, UINT index
, ID3D10GeometryShader
**shader
)
5232 FIXME("iface %p, index %u, shader %p stub!\n", iface
, index
, shader
);
5237 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetPixelShader(
5238 ID3D10EffectShaderVariable
*iface
, UINT index
, ID3D10PixelShader
**shader
)
5240 FIXME("iface %p, index %u, shader %p stub!\n", iface
, index
, shader
);
5245 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetInputSignatureElementDesc(
5246 ID3D10EffectShaderVariable
*iface
, UINT shader_index
, UINT element_index
,
5247 D3D10_SIGNATURE_PARAMETER_DESC
*desc
)
5249 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
5250 struct d3d10_effect_shader_variable
*s
;
5251 D3D10_SIGNATURE_PARAMETER_DESC
*d
;
5253 TRACE("iface %p, shader_index %u, element_index %u, desc %p\n",
5254 iface
, shader_index
, element_index
, desc
);
5256 if (!iface
->lpVtbl
->IsValid(iface
))
5258 WARN("Null variable specified\n");
5262 /* Check shader_index, this crashes on W7/DX10 */
5263 if (shader_index
>= This
->effect
->used_shader_count
)
5265 WARN("This should crash on W7/DX10!\n");
5269 s
= This
->effect
->used_shaders
[shader_index
]->data
;
5270 if (!s
->input_signature
.signature
)
5272 WARN("No shader signature\n");
5273 return D3DERR_INVALIDCALL
;
5276 /* Check desc for NULL, this crashes on W7/DX10 */
5279 WARN("This should crash on W7/DX10!\n");
5283 if (element_index
>= s
->input_signature
.element_count
)
5285 WARN("Invalid element index specified\n");
5286 return E_INVALIDARG
;
5289 d
= &s
->input_signature
.elements
[element_index
];
5290 desc
->SemanticName
= d
->SemanticName
;
5291 desc
->SemanticIndex
= d
->SemanticIndex
;
5292 desc
->SystemValueType
= d
->SystemValueType
;
5293 desc
->ComponentType
= d
->ComponentType
;
5294 desc
->Register
= d
->Register
;
5295 desc
->ReadWriteMask
= d
->ReadWriteMask
;
5296 desc
->Mask
= d
->Mask
;
5301 static HRESULT STDMETHODCALLTYPE
d3d10_effect_shader_variable_GetOutputSignatureElementDesc(
5302 ID3D10EffectShaderVariable
*iface
, UINT shader_index
, UINT element_index
,
5303 D3D10_SIGNATURE_PARAMETER_DESC
*desc
)
5305 struct d3d10_effect_variable
*This
= (struct d3d10_effect_variable
*)iface
;
5306 struct d3d10_effect_shader_variable
*s
;
5307 D3D10_SIGNATURE_PARAMETER_DESC
*d
;
5309 TRACE("iface %p, shader_index %u, element_index %u, desc %p\n",
5310 iface
, shader_index
, element_index
, desc
);
5312 if (!iface
->lpVtbl
->IsValid(iface
))
5314 WARN("Null variable specified\n");
5318 /* Check shader_index, this crashes on W7/DX10 */
5319 if (shader_index
>= This
->effect
->used_shader_count
)
5321 WARN("This should crash on W7/DX10!\n");
5325 s
= This
->effect
->used_shaders
[shader_index
]->data
;
5326 if (!s
->output_signature
.signature
)
5328 WARN("No shader signature\n");
5329 return D3DERR_INVALIDCALL
;
5332 /* Check desc for NULL, this crashes on W7/DX10 */
5335 WARN("This should crash on W7/DX10!\n");
5339 if (element_index
>= s
->output_signature
.element_count
)
5341 WARN("Invalid element index specified\n");
5342 return E_INVALIDARG
;
5345 d
= &s
->output_signature
.elements
[element_index
];
5346 desc
->SemanticName
= d
->SemanticName
;
5347 desc
->SemanticIndex
= d
->SemanticIndex
;
5348 desc
->SystemValueType
= d
->SystemValueType
;
5349 desc
->ComponentType
= d
->ComponentType
;
5350 desc
->Register
= d
->Register
;
5351 desc
->ReadWriteMask
= d
->ReadWriteMask
;
5352 desc
->Mask
= d
->Mask
;
5358 static const struct ID3D10EffectShaderVariableVtbl d3d10_effect_shader_variable_vtbl
=
5360 /* ID3D10EffectVariable methods */
5361 d3d10_effect_shader_variable_IsValid
,
5362 d3d10_effect_shader_variable_GetType
,
5363 d3d10_effect_shader_variable_GetDesc
,
5364 d3d10_effect_shader_variable_GetAnnotationByIndex
,
5365 d3d10_effect_shader_variable_GetAnnotationByName
,
5366 d3d10_effect_shader_variable_GetMemberByIndex
,
5367 d3d10_effect_shader_variable_GetMemberByName
,
5368 d3d10_effect_shader_variable_GetMemberBySemantic
,
5369 d3d10_effect_shader_variable_GetElement
,
5370 d3d10_effect_shader_variable_GetParentConstantBuffer
,
5371 d3d10_effect_shader_variable_AsScalar
,
5372 d3d10_effect_shader_variable_AsVector
,
5373 d3d10_effect_shader_variable_AsMatrix
,
5374 d3d10_effect_shader_variable_AsString
,
5375 d3d10_effect_shader_variable_AsShaderResource
,
5376 d3d10_effect_shader_variable_AsRenderTargetView
,
5377 d3d10_effect_shader_variable_AsDepthStencilView
,
5378 d3d10_effect_shader_variable_AsConstantBuffer
,
5379 d3d10_effect_shader_variable_AsShader
,
5380 d3d10_effect_shader_variable_AsBlend
,
5381 d3d10_effect_shader_variable_AsDepthStencil
,
5382 d3d10_effect_shader_variable_AsRasterizer
,
5383 d3d10_effect_shader_variable_AsSampler
,
5384 d3d10_effect_shader_variable_SetRawValue
,
5385 d3d10_effect_shader_variable_GetRawValue
,
5386 /* ID3D10EffectShaderVariable methods */
5387 d3d10_effect_shader_variable_GetShaderDesc
,
5388 d3d10_effect_shader_variable_GetVertexShader
,
5389 d3d10_effect_shader_variable_GetGeometryShader
,
5390 d3d10_effect_shader_variable_GetPixelShader
,
5391 d3d10_effect_shader_variable_GetInputSignatureElementDesc
,
5392 d3d10_effect_shader_variable_GetOutputSignatureElementDesc
,
5395 /* ID3D10EffectVariable methods */
5397 static BOOL STDMETHODCALLTYPE
d3d10_effect_blend_variable_IsValid(ID3D10EffectBlendVariable
*iface
)
5399 TRACE("iface %p\n", iface
);
5401 return (struct d3d10_effect_variable
*)iface
!= &null_blend_variable
;
5404 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetType(
5405 ID3D10EffectBlendVariable
*iface
)
5407 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
5410 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetDesc(ID3D10EffectBlendVariable
*iface
,
5411 D3D10_EFFECT_VARIABLE_DESC
*desc
)
5413 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
5416 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetAnnotationByIndex(
5417 ID3D10EffectBlendVariable
*iface
, UINT index
)
5419 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
5422 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetAnnotationByName(
5423 ID3D10EffectBlendVariable
*iface
, LPCSTR name
)
5425 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
5428 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetMemberByIndex(
5429 ID3D10EffectBlendVariable
*iface
, UINT index
)
5431 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
5434 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetMemberByName(
5435 ID3D10EffectBlendVariable
*iface
, LPCSTR name
)
5437 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
5440 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetMemberBySemantic(
5441 ID3D10EffectBlendVariable
*iface
, LPCSTR semantic
)
5443 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
5446 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetElement(
5447 ID3D10EffectBlendVariable
*iface
, UINT index
)
5449 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
5452 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetParentConstantBuffer(
5453 ID3D10EffectBlendVariable
*iface
)
5455 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
5458 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsScalar(
5459 ID3D10EffectBlendVariable
*iface
)
5461 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
5464 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsVector(
5465 ID3D10EffectBlendVariable
*iface
)
5467 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
5470 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsMatrix(
5471 ID3D10EffectBlendVariable
*iface
)
5473 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
5476 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsString(
5477 ID3D10EffectBlendVariable
*iface
)
5479 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
5482 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsShaderResource(
5483 ID3D10EffectBlendVariable
*iface
)
5485 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
5488 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsRenderTargetView(
5489 ID3D10EffectBlendVariable
*iface
)
5491 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
5494 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsDepthStencilView(
5495 ID3D10EffectBlendVariable
*iface
)
5497 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
5500 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsConstantBuffer(
5501 ID3D10EffectBlendVariable
*iface
)
5503 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
5506 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsShader(
5507 ID3D10EffectBlendVariable
*iface
)
5509 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
5512 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsBlend(
5513 ID3D10EffectBlendVariable
*iface
)
5515 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
5518 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsDepthStencil(
5519 ID3D10EffectBlendVariable
*iface
)
5521 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
5524 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsRasterizer(
5525 ID3D10EffectBlendVariable
*iface
)
5527 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
5530 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_blend_variable_AsSampler(
5531 ID3D10EffectBlendVariable
*iface
)
5533 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
5536 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_SetRawValue(ID3D10EffectBlendVariable
*iface
,
5537 void *data
, UINT offset
, UINT count
)
5539 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5542 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetRawValue(ID3D10EffectBlendVariable
*iface
,
5543 void *data
, UINT offset
, UINT count
)
5545 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5548 /* ID3D10EffectBlendVariable methods */
5550 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetBlendState(ID3D10EffectBlendVariable
*iface
,
5551 UINT index
, ID3D10BlendState
**blend_state
)
5553 FIXME("iface %p, index %u, blend_state %p stub!\n", iface
, index
, blend_state
);
5558 static HRESULT STDMETHODCALLTYPE
d3d10_effect_blend_variable_GetBackingStore(ID3D10EffectBlendVariable
*iface
,
5559 UINT index
, D3D10_BLEND_DESC
*desc
)
5561 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
5567 static const struct ID3D10EffectBlendVariableVtbl d3d10_effect_blend_variable_vtbl
=
5569 /* ID3D10EffectVariable methods */
5570 d3d10_effect_blend_variable_IsValid
,
5571 d3d10_effect_blend_variable_GetType
,
5572 d3d10_effect_blend_variable_GetDesc
,
5573 d3d10_effect_blend_variable_GetAnnotationByIndex
,
5574 d3d10_effect_blend_variable_GetAnnotationByName
,
5575 d3d10_effect_blend_variable_GetMemberByIndex
,
5576 d3d10_effect_blend_variable_GetMemberByName
,
5577 d3d10_effect_blend_variable_GetMemberBySemantic
,
5578 d3d10_effect_blend_variable_GetElement
,
5579 d3d10_effect_blend_variable_GetParentConstantBuffer
,
5580 d3d10_effect_blend_variable_AsScalar
,
5581 d3d10_effect_blend_variable_AsVector
,
5582 d3d10_effect_blend_variable_AsMatrix
,
5583 d3d10_effect_blend_variable_AsString
,
5584 d3d10_effect_blend_variable_AsShaderResource
,
5585 d3d10_effect_blend_variable_AsRenderTargetView
,
5586 d3d10_effect_blend_variable_AsDepthStencilView
,
5587 d3d10_effect_blend_variable_AsConstantBuffer
,
5588 d3d10_effect_blend_variable_AsShader
,
5589 d3d10_effect_blend_variable_AsBlend
,
5590 d3d10_effect_blend_variable_AsDepthStencil
,
5591 d3d10_effect_blend_variable_AsRasterizer
,
5592 d3d10_effect_blend_variable_AsSampler
,
5593 d3d10_effect_blend_variable_SetRawValue
,
5594 d3d10_effect_blend_variable_GetRawValue
,
5595 /* ID3D10EffectBlendVariable methods */
5596 d3d10_effect_blend_variable_GetBlendState
,
5597 d3d10_effect_blend_variable_GetBackingStore
,
5600 /* ID3D10EffectVariable methods */
5602 static BOOL STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_IsValid(ID3D10EffectDepthStencilVariable
*iface
)
5604 TRACE("iface %p\n", iface
);
5606 return (struct d3d10_effect_variable
*)iface
!= &null_depth_stencil_variable
;
5609 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetType(
5610 ID3D10EffectDepthStencilVariable
*iface
)
5612 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
5615 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetDesc(ID3D10EffectDepthStencilVariable
*iface
,
5616 D3D10_EFFECT_VARIABLE_DESC
*desc
)
5618 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
5621 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetAnnotationByIndex(
5622 ID3D10EffectDepthStencilVariable
*iface
, UINT index
)
5624 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
5627 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetAnnotationByName(
5628 ID3D10EffectDepthStencilVariable
*iface
, LPCSTR name
)
5630 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
5633 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetMemberByIndex(
5634 ID3D10EffectDepthStencilVariable
*iface
, UINT index
)
5636 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
5639 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetMemberByName(
5640 ID3D10EffectDepthStencilVariable
*iface
, LPCSTR name
)
5642 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
5645 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetMemberBySemantic(
5646 ID3D10EffectDepthStencilVariable
*iface
, LPCSTR semantic
)
5648 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
5651 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetElement(
5652 ID3D10EffectDepthStencilVariable
*iface
, UINT index
)
5654 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
5657 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetParentConstantBuffer(
5658 ID3D10EffectDepthStencilVariable
*iface
)
5660 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
5663 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsScalar(
5664 ID3D10EffectDepthStencilVariable
*iface
)
5666 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
5669 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsVector(
5670 ID3D10EffectDepthStencilVariable
*iface
)
5672 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
5675 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsMatrix(
5676 ID3D10EffectDepthStencilVariable
*iface
)
5678 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
5681 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsString(
5682 ID3D10EffectDepthStencilVariable
*iface
)
5684 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
5687 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsShaderResource(
5688 ID3D10EffectDepthStencilVariable
*iface
)
5690 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
5693 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsRenderTargetView(
5694 ID3D10EffectDepthStencilVariable
*iface
)
5696 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
5699 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsDepthStencilView(
5700 ID3D10EffectDepthStencilVariable
*iface
)
5702 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
5705 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsConstantBuffer(
5706 ID3D10EffectDepthStencilVariable
*iface
)
5708 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
5711 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsShader(
5712 ID3D10EffectDepthStencilVariable
*iface
)
5714 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
5717 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsBlend(
5718 ID3D10EffectDepthStencilVariable
*iface
)
5720 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
5723 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsDepthStencil(
5724 ID3D10EffectDepthStencilVariable
*iface
)
5726 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
5729 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsRasterizer(
5730 ID3D10EffectDepthStencilVariable
*iface
)
5732 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
5735 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_AsSampler(
5736 ID3D10EffectDepthStencilVariable
*iface
)
5738 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
5741 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_SetRawValue(ID3D10EffectDepthStencilVariable
*iface
,
5742 void *data
, UINT offset
, UINT count
)
5744 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5747 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetRawValue(ID3D10EffectDepthStencilVariable
*iface
,
5748 void *data
, UINT offset
, UINT count
)
5750 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5753 /* ID3D10EffectDepthStencilVariable methods */
5755 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetDepthStencilState(ID3D10EffectDepthStencilVariable
*iface
,
5756 UINT index
, ID3D10DepthStencilState
**depth_stencil_state
)
5758 FIXME("iface %p, index %u, depth_stencil_state %p stub!\n", iface
, index
, depth_stencil_state
);
5763 static HRESULT STDMETHODCALLTYPE
d3d10_effect_depth_stencil_variable_GetBackingStore(ID3D10EffectDepthStencilVariable
*iface
,
5764 UINT index
, D3D10_DEPTH_STENCIL_DESC
*desc
)
5766 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
5772 static const struct ID3D10EffectDepthStencilVariableVtbl d3d10_effect_depth_stencil_variable_vtbl
=
5774 /* ID3D10EffectVariable methods */
5775 d3d10_effect_depth_stencil_variable_IsValid
,
5776 d3d10_effect_depth_stencil_variable_GetType
,
5777 d3d10_effect_depth_stencil_variable_GetDesc
,
5778 d3d10_effect_depth_stencil_variable_GetAnnotationByIndex
,
5779 d3d10_effect_depth_stencil_variable_GetAnnotationByName
,
5780 d3d10_effect_depth_stencil_variable_GetMemberByIndex
,
5781 d3d10_effect_depth_stencil_variable_GetMemberByName
,
5782 d3d10_effect_depth_stencil_variable_GetMemberBySemantic
,
5783 d3d10_effect_depth_stencil_variable_GetElement
,
5784 d3d10_effect_depth_stencil_variable_GetParentConstantBuffer
,
5785 d3d10_effect_depth_stencil_variable_AsScalar
,
5786 d3d10_effect_depth_stencil_variable_AsVector
,
5787 d3d10_effect_depth_stencil_variable_AsMatrix
,
5788 d3d10_effect_depth_stencil_variable_AsString
,
5789 d3d10_effect_depth_stencil_variable_AsShaderResource
,
5790 d3d10_effect_depth_stencil_variable_AsRenderTargetView
,
5791 d3d10_effect_depth_stencil_variable_AsDepthStencilView
,
5792 d3d10_effect_depth_stencil_variable_AsConstantBuffer
,
5793 d3d10_effect_depth_stencil_variable_AsShader
,
5794 d3d10_effect_depth_stencil_variable_AsBlend
,
5795 d3d10_effect_depth_stencil_variable_AsDepthStencil
,
5796 d3d10_effect_depth_stencil_variable_AsRasterizer
,
5797 d3d10_effect_depth_stencil_variable_AsSampler
,
5798 d3d10_effect_depth_stencil_variable_SetRawValue
,
5799 d3d10_effect_depth_stencil_variable_GetRawValue
,
5800 /* ID3D10EffectDepthStencilVariable methods */
5801 d3d10_effect_depth_stencil_variable_GetDepthStencilState
,
5802 d3d10_effect_depth_stencil_variable_GetBackingStore
,
5805 /* ID3D10EffectVariable methods */
5807 static BOOL STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_IsValid(ID3D10EffectRasterizerVariable
*iface
)
5809 TRACE("iface %p\n", iface
);
5811 return (struct d3d10_effect_variable
*)iface
!= &null_rasterizer_variable
;
5814 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetType(
5815 ID3D10EffectRasterizerVariable
*iface
)
5817 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
5820 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetDesc(ID3D10EffectRasterizerVariable
*iface
,
5821 D3D10_EFFECT_VARIABLE_DESC
*desc
)
5823 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
5826 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetAnnotationByIndex(
5827 ID3D10EffectRasterizerVariable
*iface
, UINT index
)
5829 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
5832 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetAnnotationByName(
5833 ID3D10EffectRasterizerVariable
*iface
, LPCSTR name
)
5835 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
5838 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetMemberByIndex(
5839 ID3D10EffectRasterizerVariable
*iface
, UINT index
)
5841 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
5844 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetMemberByName(
5845 ID3D10EffectRasterizerVariable
*iface
, LPCSTR name
)
5847 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
5850 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetMemberBySemantic(
5851 ID3D10EffectRasterizerVariable
*iface
, LPCSTR semantic
)
5853 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
5856 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetElement(
5857 ID3D10EffectRasterizerVariable
*iface
, UINT index
)
5859 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
5862 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetParentConstantBuffer(
5863 ID3D10EffectRasterizerVariable
*iface
)
5865 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
5868 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsScalar(
5869 ID3D10EffectRasterizerVariable
*iface
)
5871 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
5874 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsVector(
5875 ID3D10EffectRasterizerVariable
*iface
)
5877 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
5880 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsMatrix(
5881 ID3D10EffectRasterizerVariable
*iface
)
5883 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
5886 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsString(
5887 ID3D10EffectRasterizerVariable
*iface
)
5889 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
5892 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsShaderResource(
5893 ID3D10EffectRasterizerVariable
*iface
)
5895 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
5898 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsRenderTargetView(
5899 ID3D10EffectRasterizerVariable
*iface
)
5901 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
5904 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsDepthStencilView(
5905 ID3D10EffectRasterizerVariable
*iface
)
5907 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
5910 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsConstantBuffer(
5911 ID3D10EffectRasterizerVariable
*iface
)
5913 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
5916 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsShader(
5917 ID3D10EffectRasterizerVariable
*iface
)
5919 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
5922 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsBlend(
5923 ID3D10EffectRasterizerVariable
*iface
)
5925 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
5928 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsDepthStencil(
5929 ID3D10EffectRasterizerVariable
*iface
)
5931 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
5934 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsRasterizer(
5935 ID3D10EffectRasterizerVariable
*iface
)
5937 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
5940 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_AsSampler(
5941 ID3D10EffectRasterizerVariable
*iface
)
5943 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
5946 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_SetRawValue(ID3D10EffectRasterizerVariable
*iface
,
5947 void *data
, UINT offset
, UINT count
)
5949 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5952 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetRawValue(ID3D10EffectRasterizerVariable
*iface
,
5953 void *data
, UINT offset
, UINT count
)
5955 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
5958 /* ID3D10EffectRasterizerVariable methods */
5960 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetRasterizerState(ID3D10EffectRasterizerVariable
*iface
,
5961 UINT index
, ID3D10RasterizerState
**rasterizer_state
)
5963 FIXME("iface %p, index %u, rasterizer_state %p stub!\n", iface
, index
, rasterizer_state
);
5968 static HRESULT STDMETHODCALLTYPE
d3d10_effect_rasterizer_variable_GetBackingStore(ID3D10EffectRasterizerVariable
*iface
,
5969 UINT index
, D3D10_RASTERIZER_DESC
*desc
)
5971 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
5977 static const struct ID3D10EffectRasterizerVariableVtbl d3d10_effect_rasterizer_variable_vtbl
=
5979 /* ID3D10EffectVariable methods */
5980 d3d10_effect_rasterizer_variable_IsValid
,
5981 d3d10_effect_rasterizer_variable_GetType
,
5982 d3d10_effect_rasterizer_variable_GetDesc
,
5983 d3d10_effect_rasterizer_variable_GetAnnotationByIndex
,
5984 d3d10_effect_rasterizer_variable_GetAnnotationByName
,
5985 d3d10_effect_rasterizer_variable_GetMemberByIndex
,
5986 d3d10_effect_rasterizer_variable_GetMemberByName
,
5987 d3d10_effect_rasterizer_variable_GetMemberBySemantic
,
5988 d3d10_effect_rasterizer_variable_GetElement
,
5989 d3d10_effect_rasterizer_variable_GetParentConstantBuffer
,
5990 d3d10_effect_rasterizer_variable_AsScalar
,
5991 d3d10_effect_rasterizer_variable_AsVector
,
5992 d3d10_effect_rasterizer_variable_AsMatrix
,
5993 d3d10_effect_rasterizer_variable_AsString
,
5994 d3d10_effect_rasterizer_variable_AsShaderResource
,
5995 d3d10_effect_rasterizer_variable_AsRenderTargetView
,
5996 d3d10_effect_rasterizer_variable_AsDepthStencilView
,
5997 d3d10_effect_rasterizer_variable_AsConstantBuffer
,
5998 d3d10_effect_rasterizer_variable_AsShader
,
5999 d3d10_effect_rasterizer_variable_AsBlend
,
6000 d3d10_effect_rasterizer_variable_AsDepthStencil
,
6001 d3d10_effect_rasterizer_variable_AsRasterizer
,
6002 d3d10_effect_rasterizer_variable_AsSampler
,
6003 d3d10_effect_rasterizer_variable_SetRawValue
,
6004 d3d10_effect_rasterizer_variable_GetRawValue
,
6005 /* ID3D10EffectRasterizerVariable methods */
6006 d3d10_effect_rasterizer_variable_GetRasterizerState
,
6007 d3d10_effect_rasterizer_variable_GetBackingStore
,
6010 /* ID3D10EffectVariable methods */
6012 static BOOL STDMETHODCALLTYPE
d3d10_effect_sampler_variable_IsValid(ID3D10EffectSamplerVariable
*iface
)
6014 TRACE("iface %p\n", iface
);
6016 return (struct d3d10_effect_variable
*)iface
!= &null_sampler_variable
;
6019 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetType(
6020 ID3D10EffectSamplerVariable
*iface
)
6022 return d3d10_effect_variable_GetType((ID3D10EffectVariable
*)iface
);
6025 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetDesc(ID3D10EffectSamplerVariable
*iface
,
6026 D3D10_EFFECT_VARIABLE_DESC
*desc
)
6028 return d3d10_effect_variable_GetDesc((ID3D10EffectVariable
*)iface
, desc
);
6031 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetAnnotationByIndex(
6032 ID3D10EffectSamplerVariable
*iface
, UINT index
)
6034 return d3d10_effect_variable_GetAnnotationByIndex((ID3D10EffectVariable
*)iface
, index
);
6037 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetAnnotationByName(
6038 ID3D10EffectSamplerVariable
*iface
, LPCSTR name
)
6040 return d3d10_effect_variable_GetAnnotationByName((ID3D10EffectVariable
*)iface
, name
);
6043 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetMemberByIndex(
6044 ID3D10EffectSamplerVariable
*iface
, UINT index
)
6046 return d3d10_effect_variable_GetMemberByIndex((ID3D10EffectVariable
*)iface
, index
);
6049 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetMemberByName(
6050 ID3D10EffectSamplerVariable
*iface
, LPCSTR name
)
6052 return d3d10_effect_variable_GetMemberByName((ID3D10EffectVariable
*)iface
, name
);
6055 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetMemberBySemantic(
6056 ID3D10EffectSamplerVariable
*iface
, LPCSTR semantic
)
6058 return d3d10_effect_variable_GetMemberBySemantic((ID3D10EffectVariable
*)iface
, semantic
);
6061 static struct ID3D10EffectVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetElement(
6062 ID3D10EffectSamplerVariable
*iface
, UINT index
)
6064 return d3d10_effect_variable_GetElement((ID3D10EffectVariable
*)iface
, index
);
6067 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetParentConstantBuffer(
6068 ID3D10EffectSamplerVariable
*iface
)
6070 return d3d10_effect_variable_GetParentConstantBuffer((ID3D10EffectVariable
*)iface
);
6073 static struct ID3D10EffectScalarVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsScalar(
6074 ID3D10EffectSamplerVariable
*iface
)
6076 return d3d10_effect_variable_AsScalar((ID3D10EffectVariable
*)iface
);
6079 static struct ID3D10EffectVectorVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsVector(
6080 ID3D10EffectSamplerVariable
*iface
)
6082 return d3d10_effect_variable_AsVector((ID3D10EffectVariable
*)iface
);
6085 static struct ID3D10EffectMatrixVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsMatrix(
6086 ID3D10EffectSamplerVariable
*iface
)
6088 return d3d10_effect_variable_AsMatrix((ID3D10EffectVariable
*)iface
);
6091 static struct ID3D10EffectStringVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsString(
6092 ID3D10EffectSamplerVariable
*iface
)
6094 return d3d10_effect_variable_AsString((ID3D10EffectVariable
*)iface
);
6097 static struct ID3D10EffectShaderResourceVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsShaderResource(
6098 ID3D10EffectSamplerVariable
*iface
)
6100 return d3d10_effect_variable_AsShaderResource((ID3D10EffectVariable
*)iface
);
6103 static struct ID3D10EffectRenderTargetViewVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsRenderTargetView(
6104 ID3D10EffectSamplerVariable
*iface
)
6106 return d3d10_effect_variable_AsRenderTargetView((ID3D10EffectVariable
*)iface
);
6109 static struct ID3D10EffectDepthStencilViewVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsDepthStencilView(
6110 ID3D10EffectSamplerVariable
*iface
)
6112 return d3d10_effect_variable_AsDepthStencilView((ID3D10EffectVariable
*)iface
);
6115 static struct ID3D10EffectConstantBuffer
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsConstantBuffer(
6116 ID3D10EffectSamplerVariable
*iface
)
6118 return d3d10_effect_variable_AsConstantBuffer((ID3D10EffectVariable
*)iface
);
6121 static struct ID3D10EffectShaderVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsShader(
6122 ID3D10EffectSamplerVariable
*iface
)
6124 return d3d10_effect_variable_AsShader((ID3D10EffectVariable
*)iface
);
6127 static struct ID3D10EffectBlendVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsBlend(
6128 ID3D10EffectSamplerVariable
*iface
)
6130 return d3d10_effect_variable_AsBlend((ID3D10EffectVariable
*)iface
);
6133 static struct ID3D10EffectDepthStencilVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsDepthStencil(
6134 ID3D10EffectSamplerVariable
*iface
)
6136 return d3d10_effect_variable_AsDepthStencil((ID3D10EffectVariable
*)iface
);
6139 static struct ID3D10EffectRasterizerVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsRasterizer(
6140 ID3D10EffectSamplerVariable
*iface
)
6142 return d3d10_effect_variable_AsRasterizer((ID3D10EffectVariable
*)iface
);
6145 static struct ID3D10EffectSamplerVariable
* STDMETHODCALLTYPE
d3d10_effect_sampler_variable_AsSampler(
6146 ID3D10EffectSamplerVariable
*iface
)
6148 return d3d10_effect_variable_AsSampler((ID3D10EffectVariable
*)iface
);
6151 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_SetRawValue(ID3D10EffectSamplerVariable
*iface
,
6152 void *data
, UINT offset
, UINT count
)
6154 return d3d10_effect_variable_SetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
6157 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetRawValue(ID3D10EffectSamplerVariable
*iface
,
6158 void *data
, UINT offset
, UINT count
)
6160 return d3d10_effect_variable_GetRawValue((ID3D10EffectVariable
*)iface
, data
, offset
, count
);
6163 /* ID3D10EffectSamplerVariable methods */
6165 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetSampler(ID3D10EffectSamplerVariable
*iface
,
6166 UINT index
, ID3D10SamplerState
**sampler
)
6168 FIXME("iface %p, index %u, sampler %p stub!\n", iface
, index
, sampler
);
6173 static HRESULT STDMETHODCALLTYPE
d3d10_effect_sampler_variable_GetBackingStore(ID3D10EffectSamplerVariable
*iface
,
6174 UINT index
, D3D10_SAMPLER_DESC
*desc
)
6176 FIXME("iface %p, index %u, desc %p stub!\n", iface
, index
, desc
);
6182 static const struct ID3D10EffectSamplerVariableVtbl d3d10_effect_sampler_variable_vtbl
=
6184 /* ID3D10EffectVariable methods */
6185 d3d10_effect_sampler_variable_IsValid
,
6186 d3d10_effect_sampler_variable_GetType
,
6187 d3d10_effect_sampler_variable_GetDesc
,
6188 d3d10_effect_sampler_variable_GetAnnotationByIndex
,
6189 d3d10_effect_sampler_variable_GetAnnotationByName
,
6190 d3d10_effect_sampler_variable_GetMemberByIndex
,
6191 d3d10_effect_sampler_variable_GetMemberByName
,
6192 d3d10_effect_sampler_variable_GetMemberBySemantic
,
6193 d3d10_effect_sampler_variable_GetElement
,
6194 d3d10_effect_sampler_variable_GetParentConstantBuffer
,
6195 d3d10_effect_sampler_variable_AsScalar
,
6196 d3d10_effect_sampler_variable_AsVector
,
6197 d3d10_effect_sampler_variable_AsMatrix
,
6198 d3d10_effect_sampler_variable_AsString
,
6199 d3d10_effect_sampler_variable_AsShaderResource
,
6200 d3d10_effect_sampler_variable_AsRenderTargetView
,
6201 d3d10_effect_sampler_variable_AsDepthStencilView
,
6202 d3d10_effect_sampler_variable_AsConstantBuffer
,
6203 d3d10_effect_sampler_variable_AsShader
,
6204 d3d10_effect_sampler_variable_AsBlend
,
6205 d3d10_effect_sampler_variable_AsDepthStencil
,
6206 d3d10_effect_sampler_variable_AsRasterizer
,
6207 d3d10_effect_sampler_variable_AsSampler
,
6208 d3d10_effect_sampler_variable_SetRawValue
,
6209 d3d10_effect_sampler_variable_GetRawValue
,
6210 /* ID3D10EffectSamplerVariable methods */
6211 d3d10_effect_sampler_variable_GetSampler
,
6212 d3d10_effect_sampler_variable_GetBackingStore
,
6215 /* ID3D10EffectType methods */
6217 static BOOL STDMETHODCALLTYPE
d3d10_effect_type_IsValid(ID3D10EffectType
*iface
)
6219 TRACE("iface %p\n", iface
);
6221 return (struct d3d10_effect_type
*)iface
!= &null_type
;
6224 static HRESULT STDMETHODCALLTYPE
d3d10_effect_type_GetDesc(ID3D10EffectType
*iface
, D3D10_EFFECT_TYPE_DESC
*desc
)
6226 struct d3d10_effect_type
*This
= (struct d3d10_effect_type
*)iface
;
6228 TRACE("iface %p, desc %p\n", iface
, desc
);
6230 if (This
== &null_type
)
6232 WARN("Null type specified\n");
6238 WARN("Invalid argument specified\n");
6239 return E_INVALIDARG
;
6242 desc
->TypeName
= This
->name
;
6243 desc
->Class
= This
->type_class
;
6244 desc
->Type
= This
->basetype
;
6245 desc
->Elements
= This
->element_count
;
6246 desc
->Members
= This
->member_count
;
6247 desc
->Rows
= This
->row_count
;
6248 desc
->Columns
= This
->column_count
;
6249 desc
->PackedSize
= This
->size_packed
;
6250 desc
->UnpackedSize
= This
->size_unpacked
;
6251 desc
->Stride
= This
->stride
;
6256 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_type_GetMemberTypeByIndex(ID3D10EffectType
*iface
,
6259 struct d3d10_effect_type
*This
= (struct d3d10_effect_type
*)iface
;
6260 struct d3d10_effect_type
*t
;
6262 TRACE("iface %p, index %u\n", iface
, index
);
6264 if (index
>= This
->member_count
)
6266 WARN("Invalid index specified\n");
6267 return (ID3D10EffectType
*)&null_type
;
6270 t
= (&This
->members
[index
])->type
;
6272 TRACE("Returning member %p, %s\n", t
, debugstr_a(t
->name
));
6274 return (ID3D10EffectType
*)t
;
6277 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_type_GetMemberTypeByName(ID3D10EffectType
*iface
,
6280 struct d3d10_effect_type
*This
= (struct d3d10_effect_type
*)iface
;
6283 TRACE("iface %p, name %s\n", iface
, debugstr_a(name
));
6287 WARN("Invalid name specified\n");
6288 return (ID3D10EffectType
*)&null_type
;
6291 for (i
= 0; i
< This
->member_count
; ++i
)
6293 struct d3d10_effect_type_member
*typem
= &This
->members
[i
];
6297 if (!strcmp(typem
->name
, name
))
6299 TRACE("Returning type %p.\n", typem
->type
);
6300 return (ID3D10EffectType
*)typem
->type
;
6305 WARN("Invalid name specified\n");
6307 return (ID3D10EffectType
*)&null_type
;
6310 static struct ID3D10EffectType
* STDMETHODCALLTYPE
d3d10_effect_type_GetMemberTypeBySemantic(ID3D10EffectType
*iface
,
6313 struct d3d10_effect_type
*This
= (struct d3d10_effect_type
*)iface
;
6316 TRACE("iface %p, semantic %s\n", iface
, debugstr_a(semantic
));
6320 WARN("Invalid semantic specified\n");
6321 return (ID3D10EffectType
*)&null_type
;
6324 for (i
= 0; i
< This
->member_count
; ++i
)
6326 struct d3d10_effect_type_member
*typem
= &This
->members
[i
];
6328 if (typem
->semantic
)
6330 if (!strcmp(typem
->semantic
, semantic
))
6332 TRACE("Returning type %p.\n", typem
->type
);
6333 return (ID3D10EffectType
*)typem
->type
;
6338 WARN("Invalid semantic specified\n");
6340 return (ID3D10EffectType
*)&null_type
;
6343 static LPCSTR STDMETHODCALLTYPE
d3d10_effect_type_GetMemberName(ID3D10EffectType
*iface
, UINT index
)
6345 struct d3d10_effect_type
*This
= (struct d3d10_effect_type
*)iface
;
6346 struct d3d10_effect_type_member
*typem
;
6348 TRACE("iface %p, index %u\n", iface
, index
);
6350 if (index
>= This
->member_count
)
6352 WARN("Invalid index specified\n");
6356 typem
= &This
->members
[index
];
6358 TRACE("Returning name %s\n", debugstr_a(typem
->name
));
6363 static LPCSTR STDMETHODCALLTYPE
d3d10_effect_type_GetMemberSemantic(ID3D10EffectType
*iface
, UINT index
)
6365 struct d3d10_effect_type
*This
= (struct d3d10_effect_type
*)iface
;
6366 struct d3d10_effect_type_member
*typem
;
6368 TRACE("iface %p, index %u\n", iface
, index
);
6370 if (index
>= This
->member_count
)
6372 WARN("Invalid index specified\n");
6376 typem
= &This
->members
[index
];
6378 TRACE("Returning semantic %s\n", debugstr_a(typem
->semantic
));
6380 return typem
->semantic
;
6383 static const struct ID3D10EffectTypeVtbl d3d10_effect_type_vtbl
=
6385 /* ID3D10EffectType */
6386 d3d10_effect_type_IsValid
,
6387 d3d10_effect_type_GetDesc
,
6388 d3d10_effect_type_GetMemberTypeByIndex
,
6389 d3d10_effect_type_GetMemberTypeByName
,
6390 d3d10_effect_type_GetMemberTypeBySemantic
,
6391 d3d10_effect_type_GetMemberName
,
6392 d3d10_effect_type_GetMemberSemantic
,