On Mon, Oct 28, 2019 at 6:16 PM Connor McAdams conmanx360@gmail.com wrote:
Move the methods for d3d10 reflection into d3dcompiler, as well as the D3D10Reflect function.
Signed-off-by: Connor McAdams conmanx360@gmail.com
dlls/d3d10/d3d10_main.c | 22 ----- dlls/d3d10/d3d10_private.h | 8 -- dlls/d3d10/shader.c | 112 ------------------------- dlls/d3dcompiler_43/reflection.c | 139 +++++++++++++++++++++++++++++++ 4 files changed, 139 insertions(+), 142 deletions(-)
I think I'd like it better if you just use the "d3dcompiler:" prefix in the patch subject for this one.
+static HRESULT STDMETHODCALLTYPE d3d10_shader_reflection_QueryInterface(ID3D10ShaderReflection *iface, REFIID riid, void **object) +{
- TRACE("iface %p, riid %s, object %p\n", iface, debugstr_guid(riid), object);
- if (IsEqualGUID(riid, &IID_ID3D10ShaderReflection)
|| IsEqualGUID(riid, &IID_IUnknown))
- {
IUnknown_AddRef(iface);
*object = iface;
return S_OK;
- }
- WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid));
- *object = NULL;
- return E_NOINTERFACE;
+}
This is a good opportunity to fix up the formatting (e.g. add missing periods at the end of debug messages).
+static ULONG STDMETHODCALLTYPE d3d10_shader_reflection_AddRef(ID3D10ShaderReflection *iface) +{
- struct d3dcompiler_shader_reflection *This = impl_from_ID3D10ShaderReflection(iface);
- ULONG refcount = InterlockedIncrement(&This->refcount);
- TRACE("%p increasing refcount to %u\n", This, refcount);
- return refcount;
+}
Or avoiding "This" as the object variable.
FWIW you should probably put the whole d3d10 stuff inside an #ifndef D3D_COMPILER_VERSION / #endif so that it doesn't get built for d3dcompiler_xx.