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

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2021-09-21 08:22:19 +03:00 committed by Alexandre Julliard
parent fab2d7d8a3
commit f3f2fec52d
2 changed files with 6 additions and 4 deletions

View File

@ -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;

View File

@ -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);