Implements GetInputParameterDesc/GetOutputParameterDesc methods for D3D10 shader reflection interface.
Signed-off-by: Connor McAdams conmanx360@gmail.com --- dlls/d3dcompiler_43/reflection.c | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-)
diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c index 670d08bd2e..6153b69c3c 100644 --- a/dlls/d3dcompiler_43/reflection.c +++ b/dlls/d3dcompiler_43/reflection.c @@ -428,17 +428,37 @@ static HRESULT STDMETHODCALLTYPE d3d10_shader_reflection_GetResourceBindingDesc( static HRESULT STDMETHODCALLTYPE d3d10_shader_reflection_GetInputParameterDesc( ID3D10ShaderReflection *iface, UINT index, D3D10_SIGNATURE_PARAMETER_DESC *desc) { - FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc); + struct d3dcompiler_shader_reflection *This = impl_from_ID3D10ShaderReflection(iface);
- return E_NOTIMPL; + TRACE("iface %p, index %u, desc %p\n", iface, index, desc); + + if (!desc || !This->isgn || index >= This->isgn->element_count) + { + WARN("Invalid argument specified\n"); + return E_INVALIDARG; + } + + memcpy(desc, &This->isgn->elements[index], sizeof(*desc)); + + return S_OK; }
static HRESULT STDMETHODCALLTYPE d3d10_shader_reflection_GetOutputParameterDesc( ID3D10ShaderReflection *iface, UINT index, D3D10_SIGNATURE_PARAMETER_DESC *desc) { - FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc); + struct d3dcompiler_shader_reflection *This = impl_from_ID3D10ShaderReflection(iface);
- return E_NOTIMPL; + TRACE("iface %p, index %u, desc %p\n", iface, index, desc); + + if (!desc || !This->osgn || index >= This->osgn->element_count) + { + WARN("Invalid argument specified\n"); + return E_INVALIDARG; + } + + memcpy(desc, &This->osgn->elements[index], sizeof(*desc)); + + return S_OK; }
const struct ID3D10ShaderReflectionVtbl d3d10_shader_reflection_vtbl =