mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 17:14:06 +00:00
d3dcompiler: Implement ID3D10ShaderReflectionConstantBuffer GetVariableByName() method.
Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a812c1a5ef
commit
44e65ebd7c
|
@ -2093,7 +2093,29 @@ static ID3D10ShaderReflectionVariable * STDMETHODCALLTYPE d3d10_shader_reflectio
|
|||
static ID3D10ShaderReflectionVariable * STDMETHODCALLTYPE d3d10_shader_reflection_constant_buffer_GetVariableByName(
|
||||
ID3D10ShaderReflectionConstantBuffer *iface, const char *name)
|
||||
{
|
||||
FIXME("iface %p, name %s stub!\n", iface, name);
|
||||
struct d3dcompiler_shader_reflection_constant_buffer *cb = impl_from_ID3D10ShaderReflectionConstantBuffer(iface);
|
||||
unsigned int i;
|
||||
|
||||
TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
|
||||
|
||||
if (!name)
|
||||
{
|
||||
WARN("Invalid argument specified.\n");
|
||||
return &null_variable.ID3D10ShaderReflectionVariable_iface;
|
||||
}
|
||||
|
||||
for (i = 0; i < cb->variable_count; ++i)
|
||||
{
|
||||
struct d3dcompiler_shader_reflection_variable *v = &cb->variables[i];
|
||||
|
||||
if (!strcmp(v->name, name))
|
||||
{
|
||||
TRACE("Returning ID3D10ShaderReflectionVariable %p.\n", v);
|
||||
return &v->ID3D10ShaderReflectionVariable_iface;
|
||||
}
|
||||
}
|
||||
|
||||
WARN("Invalid name specified.\n");
|
||||
|
||||
return &null_variable.ID3D10ShaderReflectionVariable_iface;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue