From f5f87b89be22dc1637fae3245f1250368d0ed763 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Mon, 2 Mar 2009 08:52:49 +0100 Subject: [PATCH] d3d10: Implement ID3D10EffectTechnique::GetPassByIndex(). --- dlls/d3d10/effect.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index 88cf8bb2e47..61b4a6fc6ac 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -682,9 +682,22 @@ static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_technique_Ge static struct ID3D10EffectPass * STDMETHODCALLTYPE d3d10_effect_technique_GetPassByIndex(ID3D10EffectTechnique *iface, UINT index) { - FIXME("iface %p, index %u stub!\n", iface, index); + struct d3d10_effect_technique *This = (struct d3d10_effect_technique *)iface; + struct d3d10_effect_pass *p; - return NULL; + TRACE("iface %p, index %u\n", iface, index); + + if (index >= This->pass_count) + { + WARN("Invalid index specified\n"); + return NULL; + } + + p = &This->passes[index]; + + TRACE("Returning pass %p, \"%s\"\n", p, p->name); + + return (ID3D10EffectPass *)p; } static struct ID3D10EffectPass * STDMETHODCALLTYPE d3d10_effect_technique_GetPassByName(ID3D10EffectTechnique *iface,