diff --git a/SPIRV/Logger.h b/SPIRV/Logger.h index dece1c4b5..c64a3b8a3 100644 --- a/SPIRV/Logger.h +++ b/SPIRV/Logger.h @@ -43,7 +43,7 @@ namespace spv { // A class for holding all SPIR-V build status messages, including // missing/TBD functionalities, warnings, and errors. -class SpvBuildLogger { +class GLSLANG_EXPORT SpvBuildLogger { public: SpvBuildLogger() {} @@ -59,7 +59,7 @@ public: // Returns all messages accumulated in the order of: // TBD functionalities, missing functionalities, warnings, errors. - GLSLANG_EXPORT std::string getAllMessages() const; + std::string getAllMessages() const; private: SpvBuildLogger(const SpvBuildLogger&); diff --git a/glslang/Include/visibility.h b/glslang/Include/visibility.h index d6b6bb343..9bb8f3faa 100644 --- a/glslang/Include/visibility.h +++ b/glslang/Include/visibility.h @@ -48,4 +48,7 @@ #define GLSLANG_EXPORT #endif - +// Symbols marked with this macro are only meant for public use by the test suite +// and do not appear in publicly installed headers. They are not considered to be +// part of the glslang library ABI. +#define GLSLANG_EXPORT_FOR_TESTS GLSLANG_EXPORT diff --git a/glslang/MachineIndependent/localintermediate.h b/glslang/MachineIndependent/localintermediate.h index 390a405fb..80638a6bf 100644 --- a/glslang/MachineIndependent/localintermediate.h +++ b/glslang/MachineIndependent/localintermediate.h @@ -1063,6 +1063,7 @@ public: int checkLocationRT(int set, int location); int addUsedOffsets(int binding, int offset, int numOffsets); bool addUsedConstantId(int id); + GLSLANG_EXPORT_FOR_TESTS static int computeTypeLocationSize(const TType&, EShLanguage); static int computeTypeUniformLocationSize(const TType&); diff --git a/glslang/MachineIndependent/reflection.h b/glslang/MachineIndependent/reflection.h index 221d93f8b..8315b1128 100644 --- a/glslang/MachineIndependent/reflection.h +++ b/glslang/MachineIndependent/reflection.h @@ -37,8 +37,8 @@ #define _REFLECTION_INCLUDED #include "../Public/ShaderLang.h" -#include "../Include/Types.h" - +#include "../Include/BaseTypes.h" +#include "../Include/visibility.h" #include #include @@ -65,6 +65,7 @@ public: virtual ~TReflection() {} // grow the reflection stage by stage + GLSLANG_EXPORT_FOR_TESTS bool addStage(EShLanguage, const TIntermediate&); // for mapping a uniform index to a uniform object's description diff --git a/glslang/OSDependent/osinclude.h b/glslang/OSDependent/osinclude.h index 0d677e4af..da1c4f695 100644 --- a/glslang/OSDependent/osinclude.h +++ b/glslang/OSDependent/osinclude.h @@ -35,9 +35,10 @@ #ifndef __OSINCLUDE_H #define __OSINCLUDE_H +#include "../Include/visibility.h" namespace glslang { -void OS_DumpMemoryCounters(); +GLSLANG_EXPORT void OS_DumpMemoryCounters(); } // end namespace glslang