mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-15 06:10:39 +00:00
d3dcompiler: Implement ID3D11ShaderRefleflection::GetVariableByName().
This commit is contained in:
parent
0d198362aa
commit
3c75a985e3
|
@ -418,9 +418,36 @@ static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetPatchConstantP
|
|||
static struct ID3D11ShaderReflectionVariable * STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetVariableByName(
|
||||
ID3D11ShaderReflection *iface, LPCSTR name)
|
||||
{
|
||||
FIXME("iface %p, name %s stub!\n", iface, name);
|
||||
struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface);
|
||||
unsigned int i, k;
|
||||
|
||||
return NULL;
|
||||
TRACE("iface %p, name %s\n", iface, debugstr_a(name));
|
||||
|
||||
if (!name)
|
||||
{
|
||||
WARN("Invalid name specified\n");
|
||||
return &null_variable.ID3D11ShaderReflectionVariable_iface;
|
||||
}
|
||||
|
||||
for (i = 0; i < This->constant_buffer_count; ++i)
|
||||
{
|
||||
struct d3dcompiler_shader_reflection_constant_buffer *cb = &This->constant_buffers[i];
|
||||
|
||||
for (k = 0; k < cb->variable_count; ++k)
|
||||
{
|
||||
struct d3dcompiler_shader_reflection_variable *v = &cb->variables[k];
|
||||
|
||||
if (!strcmp(v->name, name))
|
||||
{
|
||||
TRACE("Returning ID3D11ShaderReflectionVariable %p.\n", v);
|
||||
return &v->ID3D11ShaderReflectionVariable_iface;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
WARN("Invalid name specified\n");
|
||||
|
||||
return &null_variable.ID3D11ShaderReflectionVariable_iface;
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetResourceBindingDescByName(
|
||||
|
|
Loading…
Reference in a new issue