[PATCH 5/8] d3dcompiler: Partially implement ID3D10ShaderReflectionVariable.
Connor McAdams
conmanx360 at gmail.com
Wed Nov 6 17:43:02 CST 2019
Partially implement ID3D10ShaderReflectionVariable methods.
Signed-off-by: Connor McAdams <conmanx360 at gmail.com>
---
dlls/d3dcompiler_43/reflection.c | 51 ++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c
index 4c40c40e58..e7e0bb69c9 100644
--- a/dlls/d3dcompiler_43/reflection.c
+++ b/dlls/d3dcompiler_43/reflection.c
@@ -860,6 +860,56 @@ static const struct ID3D11ShaderReflectionConstantBufferVtbl d3dcompiler_shader_
d3dcompiler_shader_reflection_constant_buffer_GetVariableByName,
};
+/* ID3D10ShaderReflectionVariable methods */
+#ifndef D3D_COMPILER_VERSION
+static inline struct d3dcompiler_shader_reflection_variable *impl_from_ID3D10ShaderReflectionVariable(ID3D10ShaderReflectionVariable *iface)
+{
+ return CONTAINING_RECORD(iface, struct d3dcompiler_shader_reflection_variable, ID3D10ShaderReflectionVariable_iface);
+}
+
+static HRESULT STDMETHODCALLTYPE d3d10_shader_reflection_variable_GetDesc(
+ ID3D10ShaderReflectionVariable *iface, D3D10_SHADER_VARIABLE_DESC *desc)
+{
+ struct d3dcompiler_shader_reflection_variable *reflection = impl_from_ID3D10ShaderReflectionVariable(iface);
+
+ TRACE("iface %p, desc %p.\n", iface, desc);
+
+ if (reflection == &null_variable)
+ {
+ WARN("Null variable specified.\n");
+ return E_FAIL;
+ }
+
+ if (!desc)
+ {
+ WARN("Invalid argument specified.\n");
+ return E_FAIL;
+ }
+
+ desc->Name = reflection->name;
+ desc->StartOffset = reflection->start_offset;
+ desc->Size = reflection->size;
+ desc->uFlags = reflection->flags;
+ desc->DefaultValue = reflection->default_value;
+
+ return S_OK;
+}
+
+static ID3D10ShaderReflectionType * STDMETHODCALLTYPE d3d10_shader_reflection_variable_GetType(
+ ID3D10ShaderReflectionVariable *iface)
+{
+ FIXME("iface %p stub!\n", iface);
+
+ return &null_type.ID3D10ShaderReflectionType_iface;
+}
+
+static const struct ID3D10ShaderReflectionVariableVtbl d3d10_shader_reflection_variable_vtbl =
+{
+ d3d10_shader_reflection_variable_GetDesc,
+ d3d10_shader_reflection_variable_GetType,
+};
+#endif
+
/* ID3D11ShaderReflectionVariable methods */
static inline struct d3dcompiler_shader_reflection_variable *impl_from_ID3D11ShaderReflectionVariable(ID3D11ShaderReflectionVariable *iface)
@@ -1400,6 +1450,7 @@ static HRESULT d3dcompiler_parse_variables(struct d3dcompiler_shader_reflection_
DWORD offset;
v->ID3D11ShaderReflectionVariable_iface.lpVtbl = &d3dcompiler_shader_reflection_variable_vtbl;
+ v->ID3D10ShaderReflectionVariable_iface.lpVtbl = &d3d10_shader_reflection_variable_vtbl;
v->constant_buffer = cb;
read_dword(&ptr, &offset);
--
2.20.1
More information about the wine-devel
mailing list