summaryrefslogtreecommitdiffstats
path: root/src/angle/src/d3dcompiler/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/angle/src/d3dcompiler/main.cpp')
-rw-r--r--src/angle/src/d3dcompiler/main.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/angle/src/d3dcompiler/main.cpp b/src/angle/src/d3dcompiler/main.cpp
index 7742596226..47f80af7d3 100644
--- a/src/angle/src/d3dcompiler/main.cpp
+++ b/src/angle/src/d3dcompiler/main.cpp
@@ -52,6 +52,12 @@
#include <qt_windows.h>
#include <d3dcommon.h>
+#ifdef D3DCOMPILER_LINKED
+namespace D3D {
+# include <d3dcompiler.h>
+}
+#endif // D3DCOMPILER_LINKED
+
Q_LOGGING_CATEGORY(QT_D3DCOMPILER, "qt.angle.d3dcompiler")
namespace D3DCompiler {
@@ -127,6 +133,7 @@ private:
static bool loadCompiler()
{
+#ifndef D3DCOMPILER_LINKED
static HMODULE d3dcompiler = 0;
if (!d3dcompiler) {
const wchar_t *dllNames[] = {
@@ -157,7 +164,9 @@ static bool loadCompiler()
if (!d3dcompiler)
qCDebug(QT_D3DCOMPILER) << "Unable to load D3D shader compiler.";
}
-
+#else // !D3DCOMPILER_LINKED
+ compile = &D3D::D3DCompile;
+#endif // D3DCOMPILER_LINKED
return bool(compile);
}