Rico Schüller : d3dcompiler: Implement ID3D11ShaderReflectionVariable::GetDesc().
Alexandre Julliard
julliard at winehq.org
Tue Feb 22 10:36:10 CST 2011
Module: wine
Branch: master
Commit: 49651c105e7efb1a4ee1726c362fc77a4330c91e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=49651c105e7efb1a4ee1726c362fc77a4330c91e
Author: Rico Schüller <kgbricola at web.de>
Date: Mon Feb 21 22:52:27 2011 +0100
d3dcompiler: Implement ID3D11ShaderReflectionVariable::GetDesc().
---
dlls/d3dcompiler_43/reflection.c | 29 +++++++++++++++++++++++++++--
1 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c
index 7004a82..1165976 100644
--- a/dlls/d3dcompiler_43/reflection.c
+++ b/dlls/d3dcompiler_43/reflection.c
@@ -648,12 +648,37 @@ const struct ID3D11ShaderReflectionConstantBufferVtbl d3dcompiler_shader_reflect
/* ID3D11ShaderReflectionVariable methods */
+static inline struct d3dcompiler_shader_reflection_variable *impl_from_ID3D11ShaderReflectionVariable(ID3D11ShaderReflectionVariable *iface)
+{
+ return CONTAINING_RECORD(iface, struct d3dcompiler_shader_reflection_variable, ID3D11ShaderReflectionVariable_iface);
+}
+
static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_variable_GetDesc(
ID3D11ShaderReflectionVariable *iface, D3D11_SHADER_VARIABLE_DESC *desc)
{
- FIXME("iface %p, desc %p stub!\n", iface, desc);
+ struct d3dcompiler_shader_reflection_variable *This = impl_from_ID3D11ShaderReflectionVariable(iface);
- return E_NOTIMPL;
+ TRACE("iface %p, desc %p\n", iface, desc);
+
+ if (This == &null_variable)
+ {
+ WARN("Null variable specified\n");
+ return E_FAIL;
+ }
+
+ if (!desc)
+ {
+ WARN("Invalid argument specified\n");
+ return E_FAIL;
+ }
+
+ desc->Name = This->name;
+ desc->StartOffset = This->start_offset;
+ desc->Size = This->size;
+ desc->uFlags = This->flags;
+ desc->DefaultValue = This->default_value;
+
+ return S_OK;
}
static ID3D11ShaderReflectionType * STDMETHODCALLTYPE d3dcompiler_shader_reflection_variable_GetType(
More information about the wine-cvs
mailing list