Commit f3f2fec5 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

d3d10/effect: Forward to pool effect in GetConstantBufferByName().

parent fab2d7d8
......@@ -3205,14 +3205,14 @@ static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_GetCon
static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_GetConstantBufferByName(ID3D10Effect *iface,
const char *name)
{
struct d3d10_effect *This = impl_from_ID3D10Effect(iface);
struct d3d10_effect *effect = impl_from_ID3D10Effect(iface);
unsigned int i;
TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
for (i = 0; i < This->local_buffer_count; ++i)
for (i = 0; i < effect->local_buffer_count; ++i)
{
struct d3d10_effect_variable *l = &This->local_buffers[i];
struct d3d10_effect_variable *l = &effect->local_buffers[i];
if (l->name && !strcmp(l->name, name))
{
......@@ -3221,6 +3221,9 @@ static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_GetCon
}
}
if (effect->pool)
return effect->pool->lpVtbl->GetConstantBufferByName(effect->pool, name);
WARN("Invalid name specified\n");
return (ID3D10EffectConstantBuffer *)&null_local_buffer.ID3D10EffectVariable_iface;
......
......@@ -6543,7 +6543,6 @@ todo_wine {
ID3D10Device_Release(device3);
cb = child_effect->lpVtbl->GetConstantBufferByName(child_effect, "s_cb");
todo_wine
ok(cb->lpVtbl->IsValid(cb), "Expected valid constant buffer.\n");
hr = cb->lpVtbl->GetConstantBuffer(cb, &buffer);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment