[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: [PATCH v6 10/12] d3dcompiler: Partially implement d3d10 ShaderReflectionVariable methods.
From: Connor McAdams <conmanx360 () gmail ! com>
Date: 2019-10-31 21:55:49
Message-ID: 20191031215551.437-10-conmanx360 () gmail ! com
[Download RAW message or body]
Partially implement ID3D10ShaderReflectionVariable methods.
Signed-off-by: Connor McAdams <conmanx360@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 9f9a983a2e..365e991193 100644
--- a/dlls/d3dcompiler_43/reflection.c
+++ b/dlls/d3dcompiler_43/reflection.c
@@ -1076,6 +1076,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) @@ \
-1616,6 +1666,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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic