PKGBUILDs/angleproject/mingw-w64/0005-Export-shader-API-via-...

59 lines
1.6 KiB
Diff

From 7b0e3346df5a0c8a6b5dd2215a4ecbb659082f5a Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 25 Sep 2016 23:07:03 +0200
Subject: [PATCH 05/10] Export shader API via libGLESv2.dll
Required by Qt WebKit
---
src/compiler/translator/ShaderLang.cpp | 11 +++++++++++
src/compiler/translator/ShaderVars.cpp | 11 +++++++++++
2 files changed, 22 insertions(+)
diff --git a/src/compiler/translator/ShaderLang.cpp b/src/compiler/translator/ShaderLang.cpp
index b776ca5..15918be 100644
--- a/src/compiler/translator/ShaderLang.cpp
+++ b/src/compiler/translator/ShaderLang.cpp
@@ -9,6 +9,17 @@
// as defined in ShaderLang.h
//
+// ensure this gets exported
+#ifndef COMPONENT_BUILD
+#define COMPONENT_BUILD
+#endif
+#ifdef ANGLE_TRANSLATOR_STATIC
+#undef ANGLE_TRANSLATOR_STATIC
+#endif
+#ifndef ANGLE_TRANSLATOR_IMPLEMENTATION
+#define ANGLE_TRANSLATOR_IMPLEMENTATION
+#endif
+
#include "GLSLANG/ShaderLang.h"
#include "compiler/translator/Compiler.h"
diff --git a/src/compiler/translator/ShaderVars.cpp b/src/compiler/translator/ShaderVars.cpp
index 8e217f1..a4d451c 100644
--- a/src/compiler/translator/ShaderVars.cpp
+++ b/src/compiler/translator/ShaderVars.cpp
@@ -7,6 +7,17 @@
// Methods for GL variable types (varyings, uniforms, etc)
//
+// ensure this gets exported
+#ifndef COMPONENT_BUILD
+#define COMPONENT_BUILD
+#endif
+#ifdef ANGLE_TRANSLATOR_STATIC
+#undef ANGLE_TRANSLATOR_STATIC
+#endif
+#ifndef ANGLE_TRANSLATOR_IMPLEMENTATION
+#define ANGLE_TRANSLATOR_IMPLEMENTATION
+#endif
+
#include <GLSLANG/ShaderLang.h>
#include "common/debug.h"
--
2.10.2