aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp')
-rw-r--r--src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp
index 4bbd9ad62fc..6e00a70c887 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp
+++ b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp
@@ -35,11 +35,13 @@
#include "JitManager.h"
#include "fetch_jit.h"
+#pragma push_macro("DEBUG")
+#undef DEBUG
+
#if defined(_WIN32)
#include "llvm/ADT/Triple.h"
#endif
#include "llvm/IR/Function.h"
-#include "llvm/Support/DynamicLibrary.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/SourceMgr.h"
@@ -53,6 +55,8 @@
#include "llvm/ExecutionEngine/JITEventListener.h"
#endif
+#pragma pop_macro("DEBUG")
+
#include "core/state.h"
#include "state_llvm.h"
@@ -237,6 +241,8 @@ bool JitManager::SetupModuleFromIR(const uint8_t *pIR)
return false;
}
+ newModule->setDataLayout(mpExec->getDataLayout());
+
mpCurrentModule = newModule.get();
#if defined(_WIN32)
// Needed for MCJIT on windows
@@ -251,7 +257,6 @@ bool JitManager::SetupModuleFromIR(const uint8_t *pIR)
return true;
}
-
//////////////////////////////////////////////////////////////////////////
/// @brief Dump function x86 assembly to file.
/// @note This should only be called after the module has been jitted to x86 and the