Module: wine Branch: master Commit: 6b6f8d5c2f59d17b37f6e17c9ccf84d5a6096719 URL: https://source.winehq.org/git/wine.git/?a=commit;h=6b6f8d5c2f59d17b37f6e17c9...
Author: Connor McAdams conmanx360@gmail.com Date: Wed Nov 13 16:27:23 2019 +0100
d3dcompiler: Implement d3d10 reflection GetResourceBindingDesc() method.
Signed-off-by: Connor McAdams conmanx360@gmail.com Signed-off-by: Matteo Bruni mbruni@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/d3dcompiler_43/reflection.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c index 7a27811482..02210df7d5 100644 --- a/dlls/d3dcompiler_43/reflection.c +++ b/dlls/d3dcompiler_43/reflection.c @@ -1922,9 +1922,19 @@ static struct ID3D10ShaderReflectionConstantBuffer * STDMETHODCALLTYPE d3d10_sha static HRESULT STDMETHODCALLTYPE d3d10_shader_reflection_GetResourceBindingDesc(ID3D10ShaderReflection *iface, UINT index, D3D10_SHADER_INPUT_BIND_DESC *desc) { - FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc); + struct d3dcompiler_shader_reflection *reflection = impl_from_ID3D10ShaderReflection(iface);
- return E_NOTIMPL; + TRACE("iface %p, index %u, desc %p.\n", iface, index, desc); + + if (!desc || index >= reflection->bound_resource_count) + { + WARN("Invalid argument specified.\n"); + return E_INVALIDARG; + } + + memcpy(desc, &reflection->bound_resources[index], sizeof(*desc)); + + return S_OK; }
static HRESULT STDMETHODCALLTYPE d3d10_shader_reflection_GetInputParameterDesc(ID3D10ShaderReflection *iface,