[PATCH 5/7] d3dcompiler: Fix a couple failure return values in >= 46 D3DReflect().

Matteo Bruni mbruni at codeweavers.com
Tue Nov 12 12:47:27 CST 2019


Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
---
 dlls/d3dcompiler_43/reflection.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c
index ac24ba0a2d0..f480c72986f 100644
--- a/dlls/d3dcompiler_43/reflection.c
+++ b/dlls/d3dcompiler_43/reflection.c
@@ -2005,13 +2005,21 @@ HRESULT WINAPI D3DReflect(const void *data, SIZE_T data_size, REFIID riid, void
     if (temp[6] != data_size)
     {
         WARN("Wrong size supplied.\n");
+#if D3D_COMPILER_VERSION >= 46
+        return D3DERR_INVALIDCALL;
+#else
         return E_FAIL;
+#endif
     }
 
     if (!IsEqualGUID(riid, &IID_ID3D11ShaderReflection))
     {
         WARN("Wrong riid %s, accept only %s!\n", debugstr_guid(riid), debugstr_guid(&IID_ID3D11ShaderReflection));
+#if D3D_COMPILER_VERSION >= 46
+        return E_INVALIDARG;
+#else
         return E_NOINTERFACE;
+#endif
     }
 
     object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
-- 
2.21.0




More information about the wine-devel mailing list