Commit e8c6ea22 authored by Rico Schüller's avatar Rico Schüller Committed by Alexandre Julliard

d3dcompiler: Implement ID3D11ShaderReflectionVariable::GetBuffer().

parent 49651c10
......@@ -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;
......
......@@ -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))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment