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:
parent
fab2d7d8a3
commit
f3f2fec52d
|
@ -3205,14 +3205,14 @@ static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_GetCon
|
||||||
static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_GetConstantBufferByName(ID3D10Effect *iface,
|
static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_GetConstantBufferByName(ID3D10Effect *iface,
|
||||||
const char *name)
|
const char *name)
|
||||||
{
|
{
|
||||||
struct d3d10_effect *This = impl_from_ID3D10Effect(iface);
|
struct d3d10_effect *effect = impl_from_ID3D10Effect(iface);
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
|
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))
|
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");
|
WARN("Invalid name specified\n");
|
||||||
|
|
||||||
return (ID3D10EffectConstantBuffer *)&null_local_buffer.ID3D10EffectVariable_iface;
|
return (ID3D10EffectConstantBuffer *)&null_local_buffer.ID3D10EffectVariable_iface;
|
||||||
|
|
|
@ -6543,7 +6543,6 @@ todo_wine {
|
||||||
ID3D10Device_Release(device3);
|
ID3D10Device_Release(device3);
|
||||||
|
|
||||||
cb = child_effect->lpVtbl->GetConstantBufferByName(child_effect, "s_cb");
|
cb = child_effect->lpVtbl->GetConstantBufferByName(child_effect, "s_cb");
|
||||||
todo_wine
|
|
||||||
ok(cb->lpVtbl->IsValid(cb), "Expected valid constant buffer.\n");
|
ok(cb->lpVtbl->IsValid(cb), "Expected valid constant buffer.\n");
|
||||||
|
|
||||||
hr = cb->lpVtbl->GetConstantBuffer(cb, &buffer);
|
hr = cb->lpVtbl->GetConstantBuffer(cb, &buffer);
|
||||||
|
|
Loading…
Reference in New Issue