[PATCH v5 03/14] d3dcompiler: Fix declaration issues if used outside of d3dcompiler
Connor McAdams
conmanx360 at gmail.com
Thu Oct 31 16:16:03 CDT 2019
If used outside of other d3dcompiler_xx versions, GUID's do not need to
be initialized, and when used for the reflection functions only, certain
functions in utils.c don't need to be defined.
Signed-off-by: Connor McAdams <conmanx360 at gmail.com>
---
dlls/d3dcompiler_43/reflection.c | 3 +++
dlls/d3dcompiler_43/utils.c | 2 ++
2 files changed, 5 insertions(+)
diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c
index b163fca9e7..8f71bd9ce8 100644
--- a/dlls/d3dcompiler_43/reflection.c
+++ b/dlls/d3dcompiler_43/reflection.c
@@ -18,7 +18,10 @@
*
*/
+#ifdef D3D_COMPILER_VERSION
#include "initguid.h"
+#endif
+
#include "d3dcompiler_private.h"
#include "winternl.h"
diff --git a/dlls/d3dcompiler_43/utils.c b/dlls/d3dcompiler_43/utils.c
index 079bd1c6bc..27c0ba8c91 100644
--- a/dlls/d3dcompiler_43/utils.c
+++ b/dlls/d3dcompiler_43/utils.c
@@ -758,6 +758,7 @@ void compilation_message(struct compilation_messages *msg, const char *fmt, __ms
}
}
+#ifdef D3D_COMPILER_VERSION
BOOL add_declaration(struct hlsl_scope *scope, struct hlsl_ir_var *decl, BOOL local_var)
{
struct hlsl_ir_var *var;
@@ -2327,3 +2328,4 @@ void add_function_decl(struct wine_rb_tree *funcs, char *name, struct hlsl_ir_fu
func->intrinsic = intrinsic;
wine_rb_put(funcs, func->name, &func->entry);
}
+#endif
--
2.20.1
More information about the wine-devel
mailing list