Rico Schüller : d3dcompiler: Implement ID3D11ShaderReflectionVariable::GetBuffer().
Alexandre Julliard
julliard at winehq.org
Tue Feb 22 10:36:11 CST 2011
Module: wine
Branch: master
Commit: e8c6ea220d9f6566971582fd92a754b0c765364c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e8c6ea220d9f6566971582fd92a754b0c765364c
Author: Rico Schüller <kgbricola at web.de>
Date: Mon Feb 21 22:52:30 2011 +0100
d3dcompiler: Implement ID3D11ShaderReflectionVariable::GetBuffer().
---
dlls/d3dcompiler_43/d3dcompiler_private.h | 1 +
dlls/d3dcompiler_43/reflection.c | 9 ++++++---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/dlls/d3dcompiler_43/d3dcompiler_private.h b/dlls/d3dcompiler_43/d3dcompiler_private.h
index 3107733..4d90def 100644
--- a/dlls/d3dcompiler_43/d3dcompiler_private.h
+++ b/dlls/d3dcompiler_43/d3dcompiler_private.h
@@ -81,6 +81,7 @@ struct d3dcompiler_shader_reflection_variable
{
ID3D11ShaderReflectionVariable ID3D11ShaderReflectionVariable_iface;
+ struct d3dcompiler_shader_reflection_constant_buffer *constant_buffer;
struct d3dcompiler_shader_reflection_type *type;
char *name;
diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c
index 1165976..22522bf 100644
--- a/dlls/d3dcompiler_43/reflection.c
+++ b/dlls/d3dcompiler_43/reflection.c
@@ -36,7 +36,7 @@ const struct ID3D11ShaderReflectionVariableVtbl d3dcompiler_shader_reflection_va
/* null objects - needed for invalid calls */
static struct d3dcompiler_shader_reflection_constant_buffer null_constant_buffer = {{&d3dcompiler_shader_reflection_constant_buffer_vtbl}};
-static struct d3dcompiler_shader_reflection_variable null_variable = {{&d3dcompiler_shader_reflection_variable_vtbl}};
+static struct d3dcompiler_shader_reflection_variable null_variable = {{&d3dcompiler_shader_reflection_variable_vtbl}, &null_constant_buffer};
static BOOL copy_name(const char *ptr, char **name)
{
@@ -692,9 +692,11 @@ static ID3D11ShaderReflectionType * STDMETHODCALLTYPE d3dcompiler_shader_reflect
static ID3D11ShaderReflectionConstantBuffer * STDMETHODCALLTYPE d3dcompiler_shader_reflection_variable_GetBuffer(
ID3D11ShaderReflectionVariable *iface)
{
- FIXME("iface %p stub!\n", iface);
+ struct d3dcompiler_shader_reflection_variable *This = impl_from_ID3D11ShaderReflectionVariable(iface);
- return NULL;
+ TRACE("iface %p\n", iface);
+
+ return &This->constant_buffer->ID3D11ShaderReflectionConstantBuffer_iface;
}
static UINT STDMETHODCALLTYPE d3dcompiler_shader_reflection_variable_GetInterfaceSlot(
@@ -1031,6 +1033,7 @@ static HRESULT d3dcompiler_parse_variables(struct d3dcompiler_shader_reflection_
DWORD offset;
v->ID3D11ShaderReflectionVariable_iface.lpVtbl = &d3dcompiler_shader_reflection_variable_vtbl;
+ v->constant_buffer = cb;
read_dword(&ptr, &offset);
if (!copy_name(data + offset, &v->name))
More information about the wine-cvs
mailing list