Rico Schüller : d3dcompiler: Implement ID3D11ShaderReflectionConstantBuffer::GetVariableByIndex().
Alexandre Julliard
julliard at winehq.org
Tue Feb 22 10:36:10 CST 2011
Module: wine
Branch: master
Commit: 73f9d9f516d69145e67da660aa2b0d04eef97310
URL: http://source.winehq.org/git/wine.git/?a=commit;h=73f9d9f516d69145e67da660aa2b0d04eef97310
Author: Rico Schüller <kgbricola at web.de>
Date: Mon Feb 21 22:52:16 2011 +0100
d3dcompiler: Implement ID3D11ShaderReflectionConstantBuffer::GetVariableByIndex().
---
dlls/d3dcompiler_43/reflection.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c
index bba25d9..473fe45 100644
--- a/dlls/d3dcompiler_43/reflection.c
+++ b/dlls/d3dcompiler_43/reflection.c
@@ -32,9 +32,11 @@ enum D3DCOMPILER_SIGNATURE_ELEMENT_SIZE
};
const struct ID3D11ShaderReflectionConstantBufferVtbl d3dcompiler_shader_reflection_constant_buffer_vtbl;
+const struct ID3D11ShaderReflectionVariableVtbl d3dcompiler_shader_reflection_variable_vtbl;
/* 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 BOOL copy_name(const char *ptr, char **name)
{
@@ -593,9 +595,17 @@ static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_constant_buffer_G
static ID3D11ShaderReflectionVariable * STDMETHODCALLTYPE d3dcompiler_shader_reflection_constant_buffer_GetVariableByIndex(
ID3D11ShaderReflectionConstantBuffer *iface, UINT index)
{
- FIXME("iface %p, index %u stub!\n", iface, index);
+ struct d3dcompiler_shader_reflection_constant_buffer *This = impl_from_ID3D11ShaderReflectionConstantBuffer(iface);
- return NULL;
+ TRACE("iface %p, index %u\n", iface, index);
+
+ if (index >= This->variable_count)
+ {
+ WARN("Invalid index specified\n");
+ return &null_variable.ID3D11ShaderReflectionVariable_iface;
+ }
+
+ return &This->variables[index].ID3D11ShaderReflectionVariable_iface;
}
static ID3D11ShaderReflectionVariable * STDMETHODCALLTYPE d3dcompiler_shader_reflection_constant_buffer_GetVariableByName(
More information about the wine-cvs
mailing list