Connor McAdams : d3dcompiler: Implement d3d10 reflection Get{Input, Output}ParameterDesc() methods.
Alexandre Julliard
julliard at winehq.org
Wed Nov 13 16:01:12 CST 2019
Module: wine
Branch: master
Commit: d8ff297052f26ffd27b8d8caa2eabd5fbaec4409
URL: https://source.winehq.org/git/wine.git/?a=commit;h=d8ff297052f26ffd27b8d8caa2eabd5fbaec4409
Author: Connor McAdams <conmanx360 at gmail.com>
Date: Wed Nov 13 16:27:22 2019 +0100
d3dcompiler: Implement d3d10 reflection Get{Input, Output}ParameterDesc() methods.
Signed-off-by: Connor McAdams <conmanx360 at gmail.com>
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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 f480c72986..7a27811482 100644
--- a/dlls/d3dcompiler_43/reflection.c
+++ b/dlls/d3dcompiler_43/reflection.c
@@ -1930,17 +1930,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 *reflection = impl_from_ID3D10ShaderReflection(iface);
- return E_NOTIMPL;
+ TRACE("iface %p, index %u, desc %p.\n", iface, index, desc);
+
+ if (!desc || !reflection->isgn || index >= reflection->isgn->element_count)
+ {
+ WARN("Invalid argument specified.\n");
+ return E_INVALIDARG;
+ }
+
+ memcpy(desc, &reflection->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 *reflection = impl_from_ID3D10ShaderReflection(iface);
- return E_NOTIMPL;
+ TRACE("iface %p, index %u, desc %p.\n", iface, index, desc);
+
+ if (!desc || !reflection->osgn || index >= reflection->osgn->element_count)
+ {
+ WARN("Invalid argument specified.\n");
+ return E_INVALIDARG;
+ }
+
+ memcpy(desc, &reflection->osgn->elements[index], sizeof(*desc));
+
+ return S_OK;
}
static const struct ID3D10ShaderReflectionVtbl d3d10_shader_reflection_vtbl =
More information about the wine-cvs
mailing list