Rico Schüller : d3dcompiler: Implement ID3DShaderReflection::GetResourceBindingDescByName().
Alexandre Julliard
julliard at winehq.org
Mon Feb 14 10:02:04 CST 2011
Module: wine
Branch: master
Commit: cacff4b3a0e49d2e47f87ae8ec5fb88096d288cb
URL: http://source.winehq.org/git/wine.git/?a=commit;h=cacff4b3a0e49d2e47f87ae8ec5fb88096d288cb
Author: Rico Schüller <kgbricola at web.de>
Date: Thu Feb 10 20:06:12 2011 +0100
d3dcompiler: Implement ID3DShaderReflection::GetResourceBindingDescByName().
---
dlls/d3dcompiler_43/reflection.c | 27 +++++++++++++++++++++++++--
1 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c
index f3646e8..e1ba543 100644
--- a/dlls/d3dcompiler_43/reflection.c
+++ b/dlls/d3dcompiler_43/reflection.c
@@ -296,9 +296,32 @@ static struct ID3D11ShaderReflectionVariable * STDMETHODCALLTYPE d3dcompiler_sha
static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetResourceBindingDescByName(
ID3D11ShaderReflection *iface, LPCSTR name, D3D11_SHADER_INPUT_BIND_DESC *desc)
{
- FIXME("iface %p, name %s, desc %p stub!\n", iface, name, desc);
+ struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface);
+ unsigned int i;
- return E_NOTIMPL;
+ TRACE("iface %p, name %s, desc %p\n", iface, debugstr_a(name), desc);
+
+ if (!desc || !name)
+ {
+ WARN("Invalid argument specified\n");
+ return E_INVALIDARG;
+ }
+
+ for (i = 0; i < This->bound_resource_count; ++i)
+ {
+ D3D11_SHADER_INPUT_BIND_DESC *d = &This->bound_resources[i];
+
+ if (!strcmp(d->Name, name))
+ {
+ TRACE("Returning D3D11_SHADER_INPUT_BIND_DESC %p.\n", d);
+ *desc = *d;
+ return S_OK;
+ }
+ }
+
+ WARN("Invalid name specified\n");
+
+ return E_INVALIDARG;
}
static UINT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetMovInstructionCount(
More information about the wine-cvs
mailing list