From c2f5c3235c1d11bc376a6d085a50aaa6b8bd474f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rico=20Sch=C3=BCller?= Date: Wed, 9 Sep 2009 19:17:14 +0200 Subject: [PATCH] d3d10: Implement ID3D10EffectPass::GetAnnotationByIndex(). --- 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 07d3629bba6..d85cbe40765 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -1554,9 +1554,22 @@ static HRESULT STDMETHODCALLTYPE d3d10_effect_pass_GetPixelShaderDesc(ID3D10Effe static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_pass_GetAnnotationByIndex(ID3D10EffectPass *iface, UINT index) { - FIXME("iface %p, index %u stub!\n", iface, index); + struct d3d10_effect_pass *This = (struct d3d10_effect_pass *)iface; + struct d3d10_effect_variable *a; - return NULL; + TRACE("iface %p, index %u\n", iface, index); + + if (index >= This->annotation_count) + { + WARN("Invalid index specified\n"); + return (ID3D10EffectVariable *)&null_variable; + } + + a = &This->annotations[index]; + + TRACE("Returning annotation %p, %s\n", a, debugstr_a(a->name)); + + return (ID3D10EffectVariable *)a; } static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_pass_GetAnnotationByName(ID3D10EffectPass *iface, -- 2.11.4.GIT