pjs/gfx/angle/angle-shared.patch

81 строка
2.3 KiB
Diff

# HG changeset patch
# User Vladimir Vukicevic <vladimir@pobox.com>
# Date 1280525409 25200
# Node ID d683bc8242ec4b6e19196fc6f6d090a6da2fa07d
# Parent 3693726d10c60b8b2637407709d595151c191a64
[mq]: angle-shared.patch
diff --git a/gfx/angle/include/GLSLANG/ShaderLang.h b/gfx/angle/include/GLSLANG/ShaderLang.h
--- a/gfx/angle/include/GLSLANG/ShaderLang.h
+++ b/gfx/angle/include/GLSLANG/ShaderLang.h
@@ -6,8 +6,24 @@
#ifndef _COMPILER_INTERFACE_INCLUDED_
#define _COMPILER_INTERFACE_INCLUDED_
+#include "nscore.h"
+
#include "ResourceLimits.h"
+#ifdef WIN32
+# if !defined(MOZ_ENABLE_LIBXUL) && !defined(MOZ_STATIC_BUILD)
+# ifdef ANGLE_BUILD
+# define ANGLE_API NS_EXPORT
+# else
+# define ANGLE_API NS_IMPORT
+# endif
+# else
+# define ANGLE_API /*nothing*/
+# endif
+#else
+# define ANGLE_API NS_EXTERNAL_VIS
+#endif
+
//
// This is the platform independent interface between an OGL driver
// and the shading language compiler.
@@ -20,11 +36,11 @@ extern "C" {
// Driver must call this first, once, before doing any other
// compiler operations.
//
-int ShInitialize();
+ANGLE_API int ShInitialize();
//
// Driver should call this at shutdown.
//
-int ShFinalize();
+ANGLE_API int ShFinalize();
//
// Types of languages the compiler can consume.
//
@@ -70,8 +86,8 @@ typedef void* ShHandle;
//
// Driver calls these to create and destroy compiler objects.
//
-ShHandle ShConstructCompiler(EShLanguage, EShSpec, const TBuiltInResource*);
-void ShDestruct(ShHandle);
+ANGLE_API ShHandle ShConstructCompiler(EShLanguage, EShSpec, const TBuiltInResource*);
+ANGLE_API void ShDestruct(ShHandle);
//
// The return value of ShCompile is boolean, indicating
@@ -80,7 +96,7 @@ void ShDestruct(ShHandle);
// The info-log should be written by ShCompile into
// ShHandle, so it can answer future queries.
//
-int ShCompile(
+ANGLE_API int ShCompile(
const ShHandle,
const char* const shaderStrings[],
const int numStrings,
@@ -92,8 +108,8 @@ int ShCompile(
// All the following return 0 if the information is not
// available in the object passed down, or the object is bad.
//
-const char* ShGetInfoLog(const ShHandle);
-const char* ShGetObjectCode(const ShHandle);
+ANGLE_API const char* ShGetInfoLog(const ShHandle);
+ANGLE_API const char* ShGetObjectCode(const ShHandle);
#ifdef __cplusplus
}