Explorar o código

Updated glslang.

Бранимир Караџић %!s(int64=3) %!d(string=hai) anos
pai
achega
bf1da0a094

+ 1 - 3
3rdparty/glslang/SPIRV/GlslangToSpv.cpp

@@ -294,8 +294,6 @@ spv::SourceLanguage TranslateSourceLanguage(glslang::EShSource source, EProfile
 {
 {
 #ifdef GLSLANG_WEB
 #ifdef GLSLANG_WEB
     return spv::SourceLanguageESSL;
     return spv::SourceLanguageESSL;
-#elif defined(GLSLANG_ANGLE)
-    return spv::SourceLanguageGLSL;
 #endif
 #endif
 
 
     switch (source) {
     switch (source) {
@@ -9570,7 +9568,7 @@ void OutputSpvBin(const std::vector<unsigned int>& spirv, const char* baseName)
 // Write SPIR-V out to a text file with 32-bit hexadecimal words
 // Write SPIR-V out to a text file with 32-bit hexadecimal words
 void OutputSpvHex(const std::vector<unsigned int>& spirv, const char* baseName, const char* varName)
 void OutputSpvHex(const std::vector<unsigned int>& spirv, const char* baseName, const char* varName)
 {
 {
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
     std::ofstream out;
     std::ofstream out;
     out.open(baseName, std::ios::binary | std::ios::out);
     out.open(baseName, std::ios::binary | std::ios::out);
     if (out.fail())
     if (out.fail())

+ 11 - 3
3rdparty/glslang/StandAlone/ResourceLimits.cpp

@@ -37,9 +37,9 @@
 #include <sstream>
 #include <sstream>
 #include <cctype>
 #include <cctype>
 
 
-#include "ResourceLimits.h"
+#include "glslang/Public/ResourceLimits.h"
 
 
-namespace glslang {
+TBuiltInResource Resources;
 
 
 const TBuiltInResource DefaultTBuiltInResource = {
 const TBuiltInResource DefaultTBuiltInResource = {
     /* .MaxLights = */ 32,
     /* .MaxLights = */ 32,
@@ -529,4 +529,12 @@ void DecodeResourceLimits(TBuiltInResource* resources, char* config)
     }
     }
 }
 }
 
 
-}  // end namespace glslang
+TBuiltInResource* GetResources()
+{
+   return &Resources;
+}
+
+const TBuiltInResource* GetDefaultResources()
+{
+    return &DefaultTBuiltInResource;
+}

+ 7 - 8
3rdparty/glslang/StandAlone/StandAlone.cpp

@@ -41,7 +41,7 @@
 #define _CRT_SECURE_NO_WARNINGS
 #define _CRT_SECURE_NO_WARNINGS
 #endif
 #endif
 
 
-#include "ResourceLimits.h"
+#include "glslang/Public/ResourceLimits.h"
 #include "Worklist.h"
 #include "Worklist.h"
 #include "DirStackFileIncluder.h"
 #include "DirStackFileIncluder.h"
 #include "./../glslang/Include/ShHandle.h"
 #include "./../glslang/Include/ShHandle.h"
@@ -149,7 +149,6 @@ bool LinkFailed = false;
 // array of unique places to leave the shader names and infologs for the asynchronous compiles
 // array of unique places to leave the shader names and infologs for the asynchronous compiles
 std::vector<std::unique_ptr<glslang::TWorkItem>> WorkItems;
 std::vector<std::unique_ptr<glslang::TWorkItem>> WorkItems;
 
 
-TBuiltInResource Resources;
 std::string ConfigFile;
 std::string ConfigFile;
 
 
 //
 //
@@ -158,11 +157,11 @@ std::string ConfigFile;
 void ProcessConfigFile()
 void ProcessConfigFile()
 {
 {
     if (ConfigFile.size() == 0)
     if (ConfigFile.size() == 0)
-        Resources = glslang::DefaultTBuiltInResource;
+        *GetResources() = *GetDefaultResources();
 #ifndef GLSLANG_WEB
 #ifndef GLSLANG_WEB
     else {
     else {
         char* configString = ReadFileData(ConfigFile.c_str());
         char* configString = ReadFileData(ConfigFile.c_str());
-        glslang::DecodeResourceLimits(&Resources,  configString);
+        DecodeResourceLimits(GetResources(),  configString);
         FreeFileData(configString);
         FreeFileData(configString);
     }
     }
 #endif
 #endif
@@ -1417,7 +1416,7 @@ void CompileAndLinkShaderUnits(std::vector<ShaderCompUnit> compUnits)
 #ifndef GLSLANG_WEB
 #ifndef GLSLANG_WEB
         if (Options & EOptionOutputPreprocessed) {
         if (Options & EOptionOutputPreprocessed) {
             std::string str;
             std::string str;
-            if (shader->preprocess(&Resources, defaultVersion, ENoProfile, false, false, messages, &str, includer)) {
+            if (shader->preprocess(GetResources(), defaultVersion, ENoProfile, false, false, messages, &str, includer)) {
                 PutsIfNonEmpty(str.c_str());
                 PutsIfNonEmpty(str.c_str());
             } else {
             } else {
                 CompileFailed = true;
                 CompileFailed = true;
@@ -1428,7 +1427,7 @@ void CompileAndLinkShaderUnits(std::vector<ShaderCompUnit> compUnits)
         }
         }
 #endif
 #endif
 
 
-        if (! shader->parse(&Resources, defaultVersion, false, messages, includer))
+        if (! shader->parse(GetResources(), defaultVersion, false, messages, includer))
             CompileFailed = true;
             CompileFailed = true;
 
 
         program.addShader(shader);
         program.addShader(shader);
@@ -1612,7 +1611,7 @@ int singleMain()
 
 
 #ifndef GLSLANG_WEB
 #ifndef GLSLANG_WEB
     if (Options & EOptionDumpConfig) {
     if (Options & EOptionDumpConfig) {
-        printf("%s", glslang::GetDefaultTBuiltInResourceString().c_str());
+        printf("%s", GetDefaultTBuiltInResourceString().c_str());
         if (workList.empty())
         if (workList.empty())
             return ESuccess;
             return ESuccess;
     }
     }
@@ -1838,7 +1837,7 @@ void CompileFile(const char* fileName, ShHandle compiler)
     for (int i = 0; i < ((Options & EOptionMemoryLeakMode) ? 100 : 1); ++i) {
     for (int i = 0; i < ((Options & EOptionMemoryLeakMode) ? 100 : 1); ++i) {
         for (int j = 0; j < ((Options & EOptionMemoryLeakMode) ? 100 : 1); ++j) {
         for (int j = 0; j < ((Options & EOptionMemoryLeakMode) ? 100 : 1); ++j) {
             // ret = ShCompile(compiler, shaderStrings, NumShaderStrings, lengths, EShOptNone, &Resources, Options, (Options & EOptionDefaultDesktop) ? 110 : 100, false, messages);
             // ret = ShCompile(compiler, shaderStrings, NumShaderStrings, lengths, EShOptNone, &Resources, Options, (Options & EOptionDefaultDesktop) ? 110 : 100, false, messages);
-            ret = ShCompile(compiler, &shaderString, 1, nullptr, EShOptNone, &Resources, Options, (Options & EOptionDefaultDesktop) ? 110 : 100, false, messages);
+            ret = ShCompile(compiler, &shaderString, 1, nullptr, EShOptNone, GetResources(), Options, (Options & EOptionDefaultDesktop) ? 110 : 100, false, messages);
             // const char* multi[12] = { "# ve", "rsion", " 300 e", "s", "\n#err",
             // const char* multi[12] = { "# ve", "rsion", " 300 e", "s", "\n#err",
             //                         "or should be l", "ine 1", "string 5\n", "float glo", "bal",
             //                         "or should be l", "ine 1", "string 5\n", "float glo", "bal",
             //                         ";\n#error should be line 2\n void main() {", "global = 2.3;}" };
             //                         ";\n#error should be line 2\n void main() {", "global = 2.3;}" };

+ 10 - 5
3rdparty/glslang/StandAlone/resource_limits_c.cpp

@@ -26,15 +26,20 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 **/
 **/
 
 
-#include "resource_limits_c.h"
-#include "ResourceLimits.h"
+#include "glslang/Public/resource_limits_c.h"
+#include "glslang/Public/ResourceLimits.h"
 #include <stdlib.h>
 #include <stdlib.h>
 #include <string.h>
 #include <string.h>
 #include <string>
 #include <string>
 
 
+glslang_resource_t* glslang_resource(void)
+{
+    return reinterpret_cast<glslang_resource_t*>(GetResources());
+}
+
 const glslang_resource_t* glslang_default_resource(void)
 const glslang_resource_t* glslang_default_resource(void)
 {
 {
-    return reinterpret_cast<const glslang_resource_t*>(&glslang::DefaultTBuiltInResource);
+    return reinterpret_cast<const glslang_resource_t*>(GetDefaultResources());
 }
 }
 
 
 #if defined(__clang__) || defined(__GNUC__)
 #if defined(__clang__) || defined(__GNUC__)
@@ -47,7 +52,7 @@ const glslang_resource_t* glslang_default_resource(void)
 
 
 const char* glslang_default_resource_string()
 const char* glslang_default_resource_string()
 {
 {
-    std::string cpp_str = glslang::GetDefaultTBuiltInResourceString();
+    std::string cpp_str = GetDefaultTBuiltInResourceString();
     char* c_str = (char*)malloc(cpp_str.length() + 1);
     char* c_str = (char*)malloc(cpp_str.length() + 1);
     strcpy(c_str, cpp_str.c_str());
     strcpy(c_str, cpp_str.c_str());
     return c_str;
     return c_str;
@@ -61,5 +66,5 @@ const char* glslang_default_resource_string()
 
 
 void glslang_decode_resource_limits(glslang_resource_t* resources, char* config)
 void glslang_decode_resource_limits(glslang_resource_t* resources, char* config)
 {
 {
-    glslang::DecodeResourceLimits(reinterpret_cast<TBuiltInResource*>(resources), config);
+    DecodeResourceLimits(reinterpret_cast<TBuiltInResource*>(resources), config);
 }
 }

+ 1 - 1
3rdparty/glslang/glslang/CInterface/glslang_c_interface.cpp

@@ -33,7 +33,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "glslang/Include/glslang_c_interface.h"
 #include "glslang/Include/glslang_c_interface.h"
 
 
 #include "StandAlone/DirStackFileIncluder.h"
 #include "StandAlone/DirStackFileIncluder.h"
-#include "StandAlone/ResourceLimits.h"
+#include "glslang/Public/ResourceLimits.h"
 #include "glslang/Include/ShHandle.h"
 #include "glslang/Include/ShHandle.h"
 
 
 #include "glslang/Include/ResourceLimits.h"
 #include "glslang/Include/ResourceLimits.h"

+ 9 - 69
3rdparty/glslang/glslang/MachineIndependent/Initialize.cpp

@@ -147,10 +147,6 @@ EProfile EDesktopProfile = static_cast<EProfile>(ENoProfile | ECoreProfile | ECo
 #ifdef GLSLANG_WEB
 #ifdef GLSLANG_WEB
     const Versioning* Es300Desktop130 = nullptr;
     const Versioning* Es300Desktop130 = nullptr;
     const Versioning* Es310Desktop420 = nullptr;
     const Versioning* Es310Desktop420 = nullptr;
-#elif defined(GLSLANG_ANGLE)
-    const Versioning* Es300Desktop130 = nullptr;
-    const Versioning* Es310Desktop420 = nullptr;
-    const Versioning* Es310Desktop450 = nullptr;
 #else
 #else
     const Versioning Es300Desktop130Version[] = { { EEsProfile,      0, 300, 0, nullptr },
     const Versioning Es300Desktop130Version[] = { { EEsProfile,      0, 300, 0, nullptr },
                                                   { EDesktopProfile, 0, 130, 0, nullptr },
                                                   { EDesktopProfile, 0, 130, 0, nullptr },
@@ -420,7 +416,7 @@ void AddTabledBuiltin(TString& decls, const BuiltInFunction& function)
 // See if the tabled versioning information allows the current version.
 // See if the tabled versioning information allows the current version.
 bool ValidVersion(const BuiltInFunction& function, int version, EProfile profile, const SpvVersion& /* spVersion */)
 bool ValidVersion(const BuiltInFunction& function, int version, EProfile profile, const SpvVersion& /* spVersion */)
 {
 {
-#if defined(GLSLANG_WEB) || defined(GLSLANG_ANGLE)
+#if defined(GLSLANG_WEB)
     // all entries in table are valid
     // all entries in table are valid
     return true;
     return true;
 #endif
 #endif
@@ -505,7 +501,7 @@ TBuiltIns::TBuiltIns()
     prefixes[EbtFloat] =  "";
     prefixes[EbtFloat] =  "";
     prefixes[EbtInt]   = "i";
     prefixes[EbtInt]   = "i";
     prefixes[EbtUint]  = "u";
     prefixes[EbtUint]  = "u";
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
     prefixes[EbtFloat16] = "f16";
     prefixes[EbtFloat16] = "f16";
     prefixes[EbtInt8]  = "i8";
     prefixes[EbtInt8]  = "i8";
     prefixes[EbtUint8] = "u8";
     prefixes[EbtUint8] = "u8";
@@ -524,9 +520,7 @@ TBuiltIns::TBuiltIns()
     dimMap[Esd3D] = 3;
     dimMap[Esd3D] = 3;
     dimMap[EsdCube] = 3;
     dimMap[EsdCube] = 3;
 #ifndef GLSLANG_WEB
 #ifndef GLSLANG_WEB
-#ifndef GLSLANG_ANGLE
     dimMap[Esd1D] = 1;
     dimMap[Esd1D] = 1;
-#endif
     dimMap[EsdRect] = 2;
     dimMap[EsdRect] = 2;
     dimMap[EsdBuffer] = 1;
     dimMap[EsdBuffer] = 1;
     dimMap[EsdSubpass] = 2;  // potentially unused for now
     dimMap[EsdSubpass] = 2;  // potentially unused for now
@@ -551,9 +545,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
 #ifdef GLSLANG_WEB
 #ifdef GLSLANG_WEB
     version = 310;
     version = 310;
     profile = EEsProfile;
     profile = EEsProfile;
-#elif defined(GLSLANG_ANGLE)
-    version = 450;
-    profile = ECoreProfile;
 #endif
 #endif
     addTabledBuiltins(version, profile, spvVersion);
     addTabledBuiltins(version, profile, spvVersion);
 
 
@@ -599,7 +590,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
         "vec4  fwidthCoarse(vec4  p);"
         "vec4  fwidthCoarse(vec4  p);"
     );
     );
 
 
-#ifndef GLSLANG_ANGLE
     TString derivativesAndControl16bits (
     TString derivativesAndControl16bits (
         "float16_t dFdx(float16_t);"
         "float16_t dFdx(float16_t);"
         "f16vec2   dFdx(f16vec2);"
         "f16vec2   dFdx(f16vec2);"
@@ -1393,7 +1383,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
             "\n"
             "\n"
         );
         );
     }
     }
-#endif // !GLSLANG_ANGLE
 
 
     if ((profile == EEsProfile && version >= 310) ||
     if ((profile == EEsProfile && version >= 310) ||
         (profile != EEsProfile && version >= 430)) {
         (profile != EEsProfile && version >= 430)) {
@@ -1431,7 +1420,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
             "\n");
             "\n");
     }
     }
 
 
-#ifndef GLSLANG_ANGLE
     if (profile != EEsProfile && version >= 440) {
     if (profile != EEsProfile && version >= 440) {
         commonBuiltins.append(
         commonBuiltins.append(
             "uint64_t atomicMin(coherent volatile inout uint64_t, uint64_t);"
             "uint64_t atomicMin(coherent volatile inout uint64_t, uint64_t);"
@@ -1511,7 +1499,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
             "void atomicStore(coherent volatile out double, double, int, int, int);"
             "void atomicStore(coherent volatile out double, double, int, int, int);"
             "\n");
             "\n");
     }
     }
-#endif // !GLSLANG_ANGLE
 #endif // !GLSLANG_WEB
 #endif // !GLSLANG_WEB
 
 
     if ((profile == EEsProfile && version >= 300) ||
     if ((profile == EEsProfile && version >= 300) ||
@@ -1552,7 +1539,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
             "\n");
             "\n");
     }
     }
 
 
-#ifndef GLSLANG_ANGLE
     if (profile != EEsProfile && version >= 150) {  // ARB_gpu_shader_fp64
     if (profile != EEsProfile && version >= 150) {  // ARB_gpu_shader_fp64
             commonBuiltins.append(
             commonBuiltins.append(
                 "double fma(double, double, double);"
                 "double fma(double, double, double);"
@@ -1570,7 +1556,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
                 "f64vec4  fma(f64vec4,  f64vec4,  f64vec4 );"
                 "f64vec4  fma(f64vec4,  f64vec4,  f64vec4 );"
                 "\n");
                 "\n");
     }
     }
-#endif
 
 
     if ((profile == EEsProfile && version >= 310) ||
     if ((profile == EEsProfile && version >= 310) ||
         (profile != EEsProfile && version >= 400)) {
         (profile != EEsProfile && version >= 400)) {
@@ -1588,7 +1573,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
             "\n");
             "\n");
     }
     }
 
 
-#ifndef GLSLANG_ANGLE
     if (profile != EEsProfile && version >= 150) { // ARB_gpu_shader_fp64
     if (profile != EEsProfile && version >= 150) { // ARB_gpu_shader_fp64
         commonBuiltins.append(
         commonBuiltins.append(
             "double frexp(double, out int);"
             "double frexp(double, out int);"
@@ -1621,7 +1605,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
 
 
             "\n");
             "\n");
     }
     }
-#endif
 #endif
 #endif
 
 
     if ((profile == EEsProfile && version >= 300) ||
     if ((profile == EEsProfile && version >= 300) ||
@@ -1731,7 +1714,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
     }
     }
 
 
 #ifndef GLSLANG_WEB
 #ifndef GLSLANG_WEB
-#ifndef GLSLANG_ANGLE
     //
     //
     // Original-style texture functions existing in all stages.
     // Original-style texture functions existing in all stages.
     // (Per-stage functions below.)
     // (Per-stage functions below.)
@@ -1926,7 +1908,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
                 "\n");
                 "\n");
         }
         }
     }
     }
-#endif // !GLSLANG_ANGLE
 
 
     // Bitfield
     // Bitfield
     if ((profile == EEsProfile && version >= 310) ||
     if ((profile == EEsProfile && version >= 310) ||
@@ -2069,7 +2050,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
             "\n");
             "\n");
     }
     }
 
 
-#ifndef GLSLANG_ANGLE
     // GL_ARB_shader_ballot
     // GL_ARB_shader_ballot
     if (profile != EEsProfile && version >= 450) {
     if (profile != EEsProfile && version >= 450) {
         commonBuiltins.append(
         commonBuiltins.append(
@@ -3390,7 +3370,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
             "bool textureFootprintGradClampNV(sampler2D, vec2, vec2, vec2, float, int, bool, out gl_TextureFootprint2DNV);"
             "bool textureFootprintGradClampNV(sampler2D, vec2, vec2, vec2, float, int, bool, out gl_TextureFootprint2DNV);"
             "\n");
             "\n");
     }
     }
-#endif // !GLSLANG_ANGLE
 
 
     if ((profile == EEsProfile && version >= 300 && version < 310) ||
     if ((profile == EEsProfile && version >= 300 && version < 310) ||
         (profile != EEsProfile && version >= 150 && version < 450)) { // GL_EXT_shader_integer_mix
         (profile != EEsProfile && version >= 150 && version < 450)) { // GL_EXT_shader_integer_mix
@@ -3410,7 +3389,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
                               "\n");
                               "\n");
     }
     }
 
 
-#ifndef GLSLANG_ANGLE
     // GL_AMD_gpu_shader_half_float/Explicit types
     // GL_AMD_gpu_shader_half_float/Explicit types
     if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 310)) {
     if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 310)) {
         commonBuiltins.append(
         commonBuiltins.append(
@@ -4184,7 +4162,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
             "\n");
             "\n");
 
 
     }
     }
-#endif // !GLSLANG_ANGLE
 
 
     //============================================================================
     //============================================================================
     //
     //
@@ -4200,7 +4177,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
     if (spvVersion.vulkan == 0 && IncludeLegacy(version, profile, spvVersion))
     if (spvVersion.vulkan == 0 && IncludeLegacy(version, profile, spvVersion))
         stageBuiltins[EShLangVertex].append("vec4 ftransform();");
         stageBuiltins[EShLangVertex].append("vec4 ftransform();");
 
 
-#ifndef GLSLANG_ANGLE
     //
     //
     // Original-style texture Functions with lod.
     // Original-style texture Functions with lod.
     //
     //
@@ -4260,7 +4236,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
                 "\n");
                 "\n");
         }
         }
     }
     }
-#endif // !GLSLANG_ANGLE
 
 
     if ((profile != EEsProfile && version >= 150) ||
     if ((profile != EEsProfile && version >= 150) ||
         (profile == EEsProfile && version >= 310)) {
         (profile == EEsProfile && version >= 310)) {
@@ -4341,7 +4316,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
 
 
     commonBuiltins.append("void debugPrintfEXT();\n");
     commonBuiltins.append("void debugPrintfEXT();\n");
 
 
-#ifndef GLSLANG_ANGLE
     if (profile != EEsProfile && version >= 450) {
     if (profile != EEsProfile && version >= 450) {
         // coopMatStoreNV perhaps ought to have "out" on the buf parameter, but
         // coopMatStoreNV perhaps ought to have "out" on the buf parameter, but
         // adding it introduces undesirable tempArgs on the stack. What we want
         // adding it introduces undesirable tempArgs on the stack. What we want
@@ -4465,7 +4439,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
 
 
             "\n");
             "\n");
     }
     }
-#endif // !GLSLANG_ANGLE
 
 
     // GL_ARB_derivative_control
     // GL_ARB_derivative_control
     if (profile != EEsProfile && version >= 400) {
     if (profile != EEsProfile && version >= 400) {
@@ -4503,7 +4476,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
         "bool helperInvocationEXT();"
         "bool helperInvocationEXT();"
         "\n");
         "\n");
 
 
-#ifndef GLSLANG_ANGLE
     // GL_AMD_shader_explicit_vertex_parameter
     // GL_AMD_shader_explicit_vertex_parameter
     if (profile != EEsProfile && version >= 450) {
     if (profile != EEsProfile && version >= 450) {
         stageBuiltins[EShLangFragment].append(
         stageBuiltins[EShLangFragment].append(
@@ -4639,14 +4611,12 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
             "void executeCallableEXT(uint, int);"
             "void executeCallableEXT(uint, int);"
             "\n");
             "\n");
     }
     }
-#endif // !GLSLANG_ANGLE
 
 
     //E_SPV_NV_compute_shader_derivatives
     //E_SPV_NV_compute_shader_derivatives
     if ((profile == EEsProfile && version >= 320) || (profile != EEsProfile && version >= 450)) {
     if ((profile == EEsProfile && version >= 320) || (profile != EEsProfile && version >= 450)) {
         stageBuiltins[EShLangCompute].append(derivativeControls);
         stageBuiltins[EShLangCompute].append(derivativeControls);
         stageBuiltins[EShLangCompute].append("\n");
         stageBuiltins[EShLangCompute].append("\n");
     }
     }
-#ifndef GLSLANG_ANGLE
     if (profile != EEsProfile && version >= 450) {
     if (profile != EEsProfile && version >= 450) {
         stageBuiltins[EShLangCompute].append(derivativesAndControl16bits);
         stageBuiltins[EShLangCompute].append(derivativesAndControl16bits);
         stageBuiltins[EShLangCompute].append(derivativesAndControl64bits);
         stageBuiltins[EShLangCompute].append(derivativesAndControl64bits);
@@ -4670,7 +4640,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
             "void SetMeshOutputsEXT(uint, uint);"
             "void SetMeshOutputsEXT(uint, uint);"
             "\n");
             "\n");
     }
     }
-#endif // !GLSLANG_ANGLE
 #endif // !GLSLANG_WEB
 #endif // !GLSLANG_WEB
 
 
     //============================================================================
     //============================================================================
@@ -4708,7 +4677,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
             "\n");
             "\n");
     }
     }
 
 
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
     if (spvVersion.spv == 0 && IncludeLegacy(version, profile, spvVersion)) {
     if (spvVersion.spv == 0 && IncludeLegacy(version, profile, spvVersion)) {
         //
         //
         // Matrix state. p. 31, 32, 37, 39, 40.
         // Matrix state. p. 31, 32, 37, 39, 40.
@@ -4826,7 +4795,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
 
 
             "\n");
             "\n");
     }
     }
-#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
+#endif // !GLSLANG_WEB
 
 
     //============================================================================
     //============================================================================
     //
     //
@@ -4857,7 +4826,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
     }
     }
 
 
 #ifndef GLSLANG_WEB
 #ifndef GLSLANG_WEB
-#ifndef GLSLANG_ANGLE
     //============================================================================
     //============================================================================
     //
     //
     // Define the interface to the mesh/task shader.
     // Define the interface to the mesh/task shader.
@@ -4974,7 +4942,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
                 "\n");
                 "\n");
         }
         }
     }
     }
-#endif // !GLSLANG_ANGLE
 
 
     //============================================================================
     //============================================================================
     //
     //
@@ -5708,7 +5675,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
             "\n");
             "\n");
     }
     }
 
 
-#ifndef GLSLANG_ANGLE
     // GL_ARB_shader_ballot
     // GL_ARB_shader_ballot
     if (profile != EEsProfile && version >= 450) {
     if (profile != EEsProfile && version >= 450) {
         const char* ballotDecls =
         const char* ballotDecls =
@@ -6067,8 +6033,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
             }
             }
         }
         }
     }
     }
-#endif // !GLSLANG_ANGLE
-    
 #endif // !GLSLANG_WEB
 #endif // !GLSLANG_WEB
 
 
     // printf("%s\n", commonBuiltins.c_str());
     // printf("%s\n", commonBuiltins.c_str());
@@ -6088,7 +6052,7 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c
 
 
     // enumerate all the types
     // enumerate all the types
     const TBasicType bTypes[] = { EbtFloat, EbtInt, EbtUint,
     const TBasicType bTypes[] = { EbtFloat, EbtInt, EbtUint,
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
         EbtFloat16
         EbtFloat16
 #endif
 #endif
     };
     };
@@ -6121,12 +6085,8 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c
                 for (int arrayed = 0; arrayed <= 1; ++arrayed) { // loop over "bool" arrayed or not
                 for (int arrayed = 0; arrayed <= 1; ++arrayed) { // loop over "bool" arrayed or not
 #ifdef GLSLANG_WEB
 #ifdef GLSLANG_WEB
                     for (int dim = Esd2D; dim <= EsdCube; ++dim) { // 2D, 3D, and Cube
                     for (int dim = Esd2D; dim <= EsdCube; ++dim) { // 2D, 3D, and Cube
-#else
-#if defined(GLSLANG_ANGLE)
-                    for (int dim = Esd2D; dim < EsdNumDims; ++dim) { // 2D, ..., buffer, subpass
 #else
 #else
                     for (int dim = Esd1D; dim < EsdNumDims; ++dim) { // 1D, ..., buffer, subpass
                     for (int dim = Esd1D; dim < EsdNumDims; ++dim) { // 1D, ..., buffer, subpass
-#endif
                         if (dim == EsdSubpass && spvVersion.vulkan == 0)
                         if (dim == EsdSubpass && spvVersion.vulkan == 0)
                             continue;
                             continue;
                         if (dim == EsdSubpass && (image || shadow || arrayed))
                         if (dim == EsdSubpass && (image || shadow || arrayed))
@@ -6578,9 +6538,6 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName,
 #ifdef GLSLANG_WEB
 #ifdef GLSLANG_WEB
     profile = EEsProfile;
     profile = EEsProfile;
     version = 310;
     version = 310;
-#elif defined(GLSLANG_ANGLE)
-    profile = ECoreProfile;
-    version = 450;
 #endif
 #endif
 
 
     //
     //
@@ -6657,7 +6614,7 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName,
                                     continue;
                                     continue;
 
 
                                 // loop over 16-bit floating-point texel addressing
                                 // loop over 16-bit floating-point texel addressing
-#if defined(GLSLANG_WEB) || defined(GLSLANG_ANGLE)
+#if defined(GLSLANG_WEB)
                                 const int f16TexAddr = 0;
                                 const int f16TexAddr = 0;
 #else
 #else
                                 for (int f16TexAddr = 0; f16TexAddr <= 1; ++f16TexAddr)
                                 for (int f16TexAddr = 0; f16TexAddr <= 1; ++f16TexAddr)
@@ -6670,7 +6627,7 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName,
                                         totalDims--;
                                         totalDims--;
                                     }
                                     }
                                     // loop over "bool" lod clamp
                                     // loop over "bool" lod clamp
-#if defined(GLSLANG_WEB) || defined(GLSLANG_ANGLE)
+#if defined(GLSLANG_WEB)
                                     const int lodClamp = 0;
                                     const int lodClamp = 0;
 #else
 #else
                                     for (int lodClamp = 0; lodClamp <= 1 ;++lodClamp)
                                     for (int lodClamp = 0; lodClamp <= 1 ;++lodClamp)
@@ -6682,7 +6639,7 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName,
                                             continue;
                                             continue;
 
 
                                         // loop over "bool" sparse or not
                                         // loop over "bool" sparse or not
-#if defined(GLSLANG_WEB) || defined(GLSLANG_ANGLE)
+#if defined(GLSLANG_WEB)
                                         const int sparse = 0;
                                         const int sparse = 0;
 #else
 #else
                                         for (int sparse = 0; sparse <= 1; ++sparse)
                                         for (int sparse = 0; sparse <= 1; ++sparse)
@@ -6866,9 +6823,6 @@ void TBuiltIns::addGatherFunctions(TSampler sampler, const TString& typeName, in
 #ifdef GLSLANG_WEB
 #ifdef GLSLANG_WEB
     profile = EEsProfile;
     profile = EEsProfile;
     version = 310;
     version = 310;
-#elif defined(GLSLANG_ANGLE)
-    profile = ECoreProfile;
-    version = 450;
 #endif
 #endif
 
 
     switch (sampler.dim) {
     switch (sampler.dim) {
@@ -7112,9 +7066,6 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
 #ifdef GLSLANG_WEB
 #ifdef GLSLANG_WEB
     version = 310;
     version = 310;
     profile = EEsProfile;
     profile = EEsProfile;
-#elif defined(GLSLANG_ANGLE)
-    version = 450;
-    profile = ECoreProfile;
 #endif
 #endif
 
 
     //
     //
@@ -7547,7 +7498,6 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
         s.append("\n");
         s.append("\n");
     }
     }
 
 
-#ifndef GLSLANG_ANGLE
     // atomic counters (some in compute below)
     // atomic counters (some in compute below)
     if ((profile == EEsProfile && version >= 310) ||
     if ((profile == EEsProfile && version >= 310) ||
         (profile != EEsProfile && version >= 420)) {
         (profile != EEsProfile && version >= 420)) {
@@ -7584,7 +7534,6 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
 
 
         s.append("\n");
         s.append("\n");
     }
     }
-#endif // !GLSLANG_ANGLE
 
 
     // GL_ARB_cull_distance
     // GL_ARB_cull_distance
     if (profile != EEsProfile && version >= 450) {
     if (profile != EEsProfile && version >= 450) {
@@ -7601,7 +7550,6 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
         s.append(builtInConstant);
         s.append(builtInConstant);
     }
     }
 
 
-#ifndef GLSLANG_ANGLE
     // SPV_NV_mesh_shader
     // SPV_NV_mesh_shader
     if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) {
     if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) {
         snprintf(builtInConstant, maxSize, "const int gl_MaxMeshOutputVerticesNV = %d;", resources.maxMeshOutputVerticesNV);
         snprintf(builtInConstant, maxSize, "const int gl_MaxMeshOutputVerticesNV = %d;", resources.maxMeshOutputVerticesNV);
@@ -7624,7 +7572,6 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
 
 
         s.append("\n");
         s.append("\n");
     }
     }
-#endif
 #endif
 #endif
 
 
     s.append("\n");
     s.append("\n");
@@ -7731,9 +7678,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
 #ifdef GLSLANG_WEB
 #ifdef GLSLANG_WEB
     version = 310;
     version = 310;
     profile = EEsProfile;
     profile = EEsProfile;
-#elif defined(GLSLANG_ANGLE)
-    version = 450;
-    profile = ECoreProfile;
 #endif
 #endif
 
 
     //
     //
@@ -8793,7 +8737,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
 #endif // !GLSLANG_WEB
 #endif // !GLSLANG_WEB
         break;
         break;
 
 
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
     case EShLangRayGen:
     case EShLangRayGen:
     case EShLangIntersect:
     case EShLangIntersect:
     case EShLangAnyHit:
     case EShLangAnyHit:
@@ -9876,10 +9820,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
 void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language, TSymbolTable& symbolTable, const TBuiltInResource &resources)
 void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language, TSymbolTable& symbolTable, const TBuiltInResource &resources)
 {
 {
 #ifndef GLSLANG_WEB
 #ifndef GLSLANG_WEB
-#if defined(GLSLANG_ANGLE)
-    profile = ECoreProfile;
-    version = 450;
-#endif
     if (profile != EEsProfile && version >= 430 && version < 440) {
     if (profile != EEsProfile && version >= 430 && version < 440) {
         symbolTable.setVariableExtensions("gl_MaxTransformFeedbackBuffers", 1, &E_GL_ARB_enhanced_layouts);
         symbolTable.setVariableExtensions("gl_MaxTransformFeedbackBuffers", 1, &E_GL_ARB_enhanced_layouts);
         symbolTable.setVariableExtensions("gl_MaxTransformFeedbackInterleavedComponents", 1, &E_GL_ARB_enhanced_layouts);
         symbolTable.setVariableExtensions("gl_MaxTransformFeedbackInterleavedComponents", 1, &E_GL_ARB_enhanced_layouts);

+ 6 - 2
3rdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp

@@ -836,12 +836,16 @@ int TParseContext::getIoArrayImplicitSize(const TQualifier &qualifier, TString *
     } else if (language == EShLangMesh) {
     } else if (language == EShLangMesh) {
         unsigned int maxPrimitives =
         unsigned int maxPrimitives =
             intermediate.getPrimitives() != TQualifier::layoutNotSet ? intermediate.getPrimitives() : 0;
             intermediate.getPrimitives() != TQualifier::layoutNotSet ? intermediate.getPrimitives() : 0;
-        if (qualifier.builtIn == EbvPrimitiveIndicesNV || qualifier.builtIn == EbvPrimitiveTriangleIndicesEXT ||
-            qualifier.builtIn == EbvPrimitiveLineIndicesEXT || qualifier.builtIn == EbvPrimitivePointIndicesEXT) {
+        if (qualifier.builtIn == EbvPrimitiveIndicesNV) {
             expectedSize = maxPrimitives * TQualifier::mapGeometryToSize(intermediate.getOutputPrimitive());
             expectedSize = maxPrimitives * TQualifier::mapGeometryToSize(intermediate.getOutputPrimitive());
             str = "max_primitives*";
             str = "max_primitives*";
             str += TQualifier::getGeometryString(intermediate.getOutputPrimitive());
             str += TQualifier::getGeometryString(intermediate.getOutputPrimitive());
         }
         }
+        else if (qualifier.builtIn == EbvPrimitiveTriangleIndicesEXT || qualifier.builtIn == EbvPrimitiveLineIndicesEXT ||
+                 qualifier.builtIn == EbvPrimitivePointIndicesEXT) {
+            expectedSize = maxPrimitives;
+            str = "max_primitives";
+        }
         else if (qualifier.isPerPrimitive()) {
         else if (qualifier.isPerPrimitive()) {
             expectedSize = maxPrimitives;
             expectedSize = maxPrimitives;
             str = "max_primitives";
             str = "max_primitives";

+ 13 - 28
3rdparty/glslang/glslang/MachineIndependent/ShaderLang.cpp

@@ -298,9 +298,6 @@ void InitializeStageSymbolTable(TBuiltInParseables& builtInParseables, int versi
 #ifdef GLSLANG_WEB
 #ifdef GLSLANG_WEB
     profile = EEsProfile;
     profile = EEsProfile;
     version = 310;
     version = 310;
-#elif defined(GLSLANG_ANGLE)
-    profile = ECoreProfile;
-    version = 450;
 #endif
 #endif
 
 
     (*symbolTables[language]).adoptLevels(*commonTable[CommonIndex(profile, language)]);
     (*symbolTables[language]).adoptLevels(*commonTable[CommonIndex(profile, language)]);
@@ -322,9 +319,6 @@ bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable,  TS
 #ifdef GLSLANG_WEB
 #ifdef GLSLANG_WEB
     profile = EEsProfile;
     profile = EEsProfile;
     version = 310;
     version = 310;
-#elif defined(GLSLANG_ANGLE)
-    profile = ECoreProfile;
-    version = 450;
 #endif
 #endif
 
 
     std::unique_ptr<TBuiltInParseables> builtInParseables(CreateBuiltInParseables(infoSink, source));
     std::unique_ptr<TBuiltInParseables> builtInParseables(CreateBuiltInParseables(infoSink, source));
@@ -371,7 +365,6 @@ bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable,  TS
         InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangCompute, source,
         InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangCompute, source,
                                    infoSink, commonTable, symbolTables);
                                    infoSink, commonTable, symbolTables);
 
 
-#ifndef GLSLANG_ANGLE
     // check for ray tracing stages
     // check for ray tracing stages
     if (profile != EEsProfile && version >= 450) {
     if (profile != EEsProfile && version >= 450) {
         InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangRayGen, source,
         InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangRayGen, source,
@@ -399,7 +392,6 @@ bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable,  TS
         (profile == EEsProfile && version >= 320))
         (profile == EEsProfile && version >= 320))
         InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangTask, source,
         InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangTask, source,
                                    infoSink, commonTable, symbolTables);
                                    infoSink, commonTable, symbolTables);
-#endif // !GLSLANG_ANGLE
 #endif // !GLSLANG_WEB
 #endif // !GLSLANG_WEB
 
 
     return true;
     return true;
@@ -502,7 +494,7 @@ void SetupBuiltinSymbolTable(int version, EProfile profile, const SpvVersion& sp
 // Function to Print all builtins
 // Function to Print all builtins
 void DumpBuiltinSymbolTable(TInfoSink& infoSink, const TSymbolTable& symbolTable)
 void DumpBuiltinSymbolTable(TInfoSink& infoSink, const TSymbolTable& symbolTable)
 {
 {
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
     infoSink.debug << "BuiltinSymbolTable {\n";
     infoSink.debug << "BuiltinSymbolTable {\n";
 
 
     symbolTable.dump(infoSink, true);
     symbolTable.dump(infoSink, true);
@@ -606,7 +598,7 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo
         break;
         break;
     }
     }
 
 
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
     // Correct for stage type...
     // Correct for stage type...
     switch (stage) {
     switch (stage) {
     case EShLangGeometry:
     case EShLangGeometry:
@@ -884,7 +876,7 @@ bool ProcessDeferred(
                                 : userInput.scanVersion(version, profile, versionNotFirstToken);
                                 : userInput.scanVersion(version, profile, versionNotFirstToken);
     bool versionNotFound = version == 0;
     bool versionNotFound = version == 0;
     if (forceDefaultVersionAndProfile && source == EShSourceGlsl) {
     if (forceDefaultVersionAndProfile && source == EShSourceGlsl) {
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
         if (! (messages & EShMsgSuppressWarnings) && ! versionNotFound &&
         if (! (messages & EShMsgSuppressWarnings) && ! versionNotFound &&
             (version != defaultVersion || profile != defaultProfile)) {
             (version != defaultVersion || profile != defaultProfile)) {
             compiler->infoSink.info << "Warning, (version, profile) forced to be ("
             compiler->infoSink.info << "Warning, (version, profile) forced to be ("
@@ -910,13 +902,10 @@ bool ProcessDeferred(
 #ifdef GLSLANG_WEB
 #ifdef GLSLANG_WEB
     profile = EEsProfile;
     profile = EEsProfile;
     version = 310;
     version = 310;
-#elif defined(GLSLANG_ANGLE)
-    profile = ECoreProfile;
-    version = 450;
 #endif
 #endif
 
 
     bool versionWillBeError = (versionNotFound || (profile == EEsProfile && version >= 300 && versionNotFirst));
     bool versionWillBeError = (versionNotFound || (profile == EEsProfile && version >= 300 && versionNotFirst));
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
     bool warnVersionNotFirst = false;
     bool warnVersionNotFirst = false;
     if (! versionWillBeError && versionNotFirstToken) {
     if (! versionWillBeError && versionNotFirstToken) {
         if (messages & EShMsgRelaxedErrors)
         if (messages & EShMsgRelaxedErrors)
@@ -989,7 +978,7 @@ bool ProcessDeferred(
     parseContext->setLimits(*resources);
     parseContext->setLimits(*resources);
     if (! goodVersion)
     if (! goodVersion)
         parseContext->addError();
         parseContext->addError();
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
     if (warnVersionNotFirst) {
     if (warnVersionNotFirst) {
         TSourceLoc loc;
         TSourceLoc loc;
         loc.init();
         loc.init();
@@ -1027,7 +1016,7 @@ bool ProcessDeferred(
     return success;
     return success;
 }
 }
 
 
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
 
 
 // Responsible for keeping track of the most recent source string and line in
 // Responsible for keeping track of the most recent source string and line in
 // the preprocessor and outputting newlines appropriately if the source string
 // the preprocessor and outputting newlines appropriately if the source string
@@ -1250,16 +1239,14 @@ struct DoFullParse{
             parseContext.infoSink.info << parseContext.getNumErrors() << " compilation errors.  No code generated.\n\n";
             parseContext.infoSink.info << parseContext.getNumErrors() << " compilation errors.  No code generated.\n\n";
         }
         }
 
 
-#ifndef GLSLANG_ANGLE
         if (messages & EShMsgAST)
         if (messages & EShMsgAST)
             intermediate.output(parseContext.infoSink, true);
             intermediate.output(parseContext.infoSink, true);
-#endif
 
 
         return success;
         return success;
     }
     }
 };
 };
 
 
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
 // Take a single compilation unit, and run the preprocessor on it.
 // Take a single compilation unit, and run the preprocessor on it.
 // Return: True if there were no issues found in preprocessing,
 // Return: True if there were no issues found in preprocessing,
 //         False if during preprocessing any unknown version, pragmas or
 //         False if during preprocessing any unknown version, pragmas or
@@ -1927,7 +1914,7 @@ bool TShader::parse(const TBuiltInResource* builtInResources, int defaultVersion
                            &environment);
                            &environment);
 }
 }
 
 
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
 // Fill in a string with the result of preprocessing ShaderStrings
 // Fill in a string with the result of preprocessing ShaderStrings
 // Returns true if all extensions, pragmas and version strings were valid.
 // Returns true if all extensions, pragmas and version strings were valid.
 //
 //
@@ -1966,7 +1953,7 @@ const char* TShader::getInfoDebugLog()
 }
 }
 
 
 TProgram::TProgram() :
 TProgram::TProgram() :
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
     reflection(0),
     reflection(0),
 #endif
 #endif
     linked(false)
     linked(false)
@@ -1982,7 +1969,7 @@ TProgram::TProgram() :
 TProgram::~TProgram()
 TProgram::~TProgram()
 {
 {
     delete infoSink;
     delete infoSink;
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
     delete reflection;
     delete reflection;
 #endif
 #endif
 
 
@@ -2032,7 +2019,7 @@ bool TProgram::linkStage(EShLanguage stage, EShMessages messages)
     if (stages[stage].size() == 0)
     if (stages[stage].size() == 0)
         return true;
         return true;
 
 
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
     int numEsShaders = 0, numNonEsShaders = 0;
     int numEsShaders = 0, numNonEsShaders = 0;
     for (auto it = stages[stage].begin(); it != stages[stage].end(); ++it) {
     for (auto it = stages[stage].begin(); it != stages[stage].end(); ++it) {
         if ((*it)->intermediate->getProfile() == EEsProfile) {
         if ((*it)->intermediate->getProfile() == EEsProfile) {
@@ -2088,10 +2075,8 @@ bool TProgram::linkStage(EShLanguage stage, EShMessages messages)
 #endif
 #endif
     intermediate[stage]->finalCheck(*infoSink, (messages & EShMsgKeepUncalled) != 0);
     intermediate[stage]->finalCheck(*infoSink, (messages & EShMsgKeepUncalled) != 0);
 
 
-#ifndef GLSLANG_ANGLE
     if (messages & EShMsgAST)
     if (messages & EShMsgAST)
         intermediate[stage]->output(*infoSink, true);
         intermediate[stage]->output(*infoSink, true);
-#endif
 
 
     return intermediate[stage]->getNumErrors() == 0;
     return intermediate[stage]->getNumErrors() == 0;
 }
 }
@@ -2169,7 +2154,7 @@ const char* TProgram::getInfoDebugLog()
     return infoSink->debug.c_str();
     return infoSink->debug.c_str();
 }
 }
 
 
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
 
 
 //
 //
 // Reflection implementation.
 // Reflection implementation.
@@ -2251,6 +2236,6 @@ bool TProgram::mapIO(TIoMapResolver* pResolver, TIoMapper* pIoMapper)
     return ioMapper->doMap(pResolver, *infoSink);
     return ioMapper->doMap(pResolver, *infoSink);
 }
 }
 
 
-#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
+#endif // !GLSLANG_WEB
 
 
 } // end namespace glslang
 } // end namespace glslang

+ 1 - 1
3rdparty/glslang/glslang/MachineIndependent/SymbolTable.cpp

@@ -183,7 +183,7 @@ void TType::buildMangledName(TString& mangledName) const
     }
     }
 }
 }
 
 
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
 
 
 //
 //
 // Dump functions.
 // Dump functions.

+ 6 - 6
3rdparty/glslang/glslang/MachineIndependent/SymbolTable.h

@@ -117,7 +117,7 @@ public:
     virtual int getNumExtensions() const { return extensions == nullptr ? 0 : (int)extensions->size(); }
     virtual int getNumExtensions() const { return extensions == nullptr ? 0 : (int)extensions->size(); }
     virtual const char** getExtensions() const { return extensions->data(); }
     virtual const char** getExtensions() const { return extensions->data(); }
 
 
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
     virtual void dump(TInfoSink& infoSink, bool complete = false) const = 0;
     virtual void dump(TInfoSink& infoSink, bool complete = false) const = 0;
     void dumpExtensions(TInfoSink& infoSink) const;
     void dumpExtensions(TInfoSink& infoSink) const;
 #endif
 #endif
@@ -196,7 +196,7 @@ public:
     }
     }
     virtual const char** getMemberExtensions(int member) const { return (*memberExtensions)[member].data(); }
     virtual const char** getMemberExtensions(int member) const { return (*memberExtensions)[member].data(); }
 
 
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
     virtual void dump(TInfoSink& infoSink, bool complete = false) const;
     virtual void dump(TInfoSink& infoSink, bool complete = false) const;
 #endif
 #endif
 
 
@@ -329,7 +329,7 @@ public:
     virtual const TSpirvInstruction& getSpirvInstruction() const { return spirvInst; }
     virtual const TSpirvInstruction& getSpirvInstruction() const { return spirvInst; }
 #endif
 #endif
 
 
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
     virtual void dump(TInfoSink& infoSink, bool complete = false) const override;
     virtual void dump(TInfoSink& infoSink, bool complete = false) const override;
 #endif
 #endif
 
 
@@ -395,7 +395,7 @@ public:
     virtual const char** getExtensions() const override { return anonContainer.getMemberExtensions(memberNumber); }
     virtual const char** getExtensions() const override { return anonContainer.getMemberExtensions(memberNumber); }
 
 
     virtual int getAnonId() const { return anonId; }
     virtual int getAnonId() const { return anonId; }
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
     virtual void dump(TInfoSink& infoSink, bool complete = false) const override;
     virtual void dump(TInfoSink& infoSink, bool complete = false) const override;
 #endif
 #endif
 
 
@@ -582,7 +582,7 @@ public:
 
 
     void relateToOperator(const char* name, TOperator op);
     void relateToOperator(const char* name, TOperator op);
     void setFunctionExtensions(const char* name, int num, const char* const extensions[]);
     void setFunctionExtensions(const char* name, int num, const char* const extensions[]);
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
     void dump(TInfoSink& infoSink, bool complete = false) const;
     void dump(TInfoSink& infoSink, bool complete = false) const;
 #endif
 #endif
     TSymbolTableLevel* clone() const;
     TSymbolTableLevel* clone() const;
@@ -912,7 +912,7 @@ public:
     }
     }
 
 
     long long getMaxSymbolId() { return uniqueId; }
     long long getMaxSymbolId() { return uniqueId; }
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
     void dump(TInfoSink& infoSink, bool complete = false) const;
     void dump(TInfoSink& infoSink, bool complete = false) const;
 #endif
 #endif
     void copyTable(const TSymbolTable& copyOf);
     void copyTable(const TSymbolTable& copyOf);

+ 2 - 2
3rdparty/glslang/glslang/MachineIndependent/intermOut.cpp

@@ -36,7 +36,7 @@
 // POSSIBILITY OF SUCH DAMAGE.
 // POSSIBILITY OF SUCH DAMAGE.
 //
 //
 
 
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
 
 
 #include "localintermediate.h"
 #include "localintermediate.h"
 #include "../Include/InfoSink.h"
 #include "../Include/InfoSink.h"
@@ -1563,4 +1563,4 @@ void TIntermediate::output(TInfoSink& infoSink, bool tree)
 
 
 } // end namespace glslang
 } // end namespace glslang
 
 
-#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
+#endif // !GLSLANG_WEB

+ 2 - 2
3rdparty/glslang/glslang/MachineIndependent/iomapper.cpp

@@ -33,7 +33,7 @@
 // POSSIBILITY OF SUCH DAMAGE.
 // POSSIBILITY OF SUCH DAMAGE.
 //
 //
 
 
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
 
 
 #include "../Include/Common.h"
 #include "../Include/Common.h"
 #include "../Include/InfoSink.h"
 #include "../Include/InfoSink.h"
@@ -1710,4 +1710,4 @@ bool TGlslIoMapper::doMap(TIoMapResolver* resolver, TInfoSink& infoSink) {
 
 
 } // end namespace glslang
 } // end namespace glslang
 
 
-#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
+#endif // !GLSLANG_WEB

+ 2 - 2
3rdparty/glslang/glslang/MachineIndependent/iomapper.h

@@ -33,7 +33,7 @@
 // POSSIBILITY OF SUCH DAMAGE.
 // POSSIBILITY OF SUCH DAMAGE.
 //
 //
 
 
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
 
 
 #ifndef _IOMAPPER_INCLUDED
 #ifndef _IOMAPPER_INCLUDED
 #define _IOMAPPER_INCLUDED
 #define _IOMAPPER_INCLUDED
@@ -358,4 +358,4 @@ private:
 
 
 #endif // _IOMAPPER_INCLUDED
 #endif // _IOMAPPER_INCLUDED
 
 
-#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
+#endif // !GLSLANG_WEB

+ 3 - 3
3rdparty/glslang/glslang/MachineIndependent/linkValidate.cpp

@@ -89,7 +89,7 @@ void TIntermediate::warn(TInfoSink& infoSink, const char* message, EShLanguage u
 //
 //
 void TIntermediate::merge(TInfoSink& infoSink, TIntermediate& unit)
 void TIntermediate::merge(TInfoSink& infoSink, TIntermediate& unit)
 {
 {
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
     mergeCallGraphs(infoSink, unit);
     mergeCallGraphs(infoSink, unit);
     mergeModes(infoSink, unit);
     mergeModes(infoSink, unit);
     mergeTrees(infoSink, unit);
     mergeTrees(infoSink, unit);
@@ -161,7 +161,7 @@ void TIntermediate::mergeCallGraphs(TInfoSink& infoSink, TIntermediate& unit)
     callGraph.insert(callGraph.end(), unit.callGraph.begin(), unit.callGraph.end());
     callGraph.insert(callGraph.end(), unit.callGraph.begin(), unit.callGraph.end());
 }
 }
 
 
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
 
 
 #define MERGE_MAX(member) member = std::max(member, unit.member)
 #define MERGE_MAX(member) member = std::max(member, unit.member)
 #define MERGE_TRUE(member) if (unit.member) member = unit.member;
 #define MERGE_TRUE(member) if (unit.member) member = unit.member;
@@ -828,7 +828,7 @@ void TIntermediate::mergeImplicitArraySizes(TType& type, const TType& unitType)
 //
 //
 void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& symbol, const TIntermSymbol& unitSymbol, EShLanguage unitStage)
 void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& symbol, const TIntermSymbol& unitSymbol, EShLanguage unitStage)
 {
 {
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
     bool crossStage = getStage() != unitStage;
     bool crossStage = getStage() != unitStage;
     bool writeTypeComparison = false;
     bool writeTypeComparison = false;
     bool errorReported = false;
     bool errorReported = false;

+ 0 - 11
3rdparty/glslang/glslang/MachineIndependent/localintermediate.h

@@ -283,9 +283,7 @@ class TIntermediate {
 public:
 public:
     explicit TIntermediate(EShLanguage l, int v = 0, EProfile p = ENoProfile) :
     explicit TIntermediate(EShLanguage l, int v = 0, EProfile p = ENoProfile) :
         language(l),
         language(l),
-#ifndef GLSLANG_ANGLE
         profile(p), version(v),
         profile(p), version(v),
-#endif
         treeRoot(0),
         treeRoot(0),
         resources(TBuiltInResource{}),
         resources(TBuiltInResource{}),
         numEntryPoints(0), numErrors(0), numPushConstants(0), recursive(false),
         numEntryPoints(0), numErrors(0), numPushConstants(0), recursive(false),
@@ -358,15 +356,11 @@ public:
 
 
     void setVersion(int v)
     void setVersion(int v)
     {
     {
-#ifndef GLSLANG_ANGLE
         version = v;
         version = v;
-#endif
     }
     }
     void setProfile(EProfile p)
     void setProfile(EProfile p)
     {
     {
-#ifndef GLSLANG_ANGLE
         profile = p;
         profile = p;
-#endif
     }
     }
 
 
     int getVersion() const { return version; }
     int getVersion() const { return version; }
@@ -1101,13 +1095,8 @@ protected:
     typedef std::list<TCall> TGraph;
     typedef std::list<TCall> TGraph;
     TGraph callGraph;
     TGraph callGraph;
 
 
-#ifdef GLSLANG_ANGLE
-    const EProfile profile = ECoreProfile;
-    const int version = 450;
-#else
     EProfile profile;                           // source profile
     EProfile profile;                           // source profile
     int version;                                // source version
     int version;                                // source version
-#endif
     SpvVersion spvVersion;
     SpvVersion spvVersion;
     TIntermNode* treeRoot;
     TIntermNode* treeRoot;
     std::set<std::string> requestedExtensions;  // cumulation of all enabled or required extensions; not connected to what subset of the shader used them
     std::set<std::string> requestedExtensions;  // cumulation of all enabled or required extensions; not connected to what subset of the shader used them

+ 1 - 6
3rdparty/glslang/glslang/MachineIndependent/parseVersions.h

@@ -58,7 +58,7 @@ public:
                    const SpvVersion& spvVersion, EShLanguage language, TInfoSink& infoSink,
                    const SpvVersion& spvVersion, EShLanguage language, TInfoSink& infoSink,
                    bool forwardCompatible, EShMessages messages)
                    bool forwardCompatible, EShMessages messages)
         :
         :
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
         forwardCompatible(forwardCompatible),
         forwardCompatible(forwardCompatible),
         profile(profile),
         profile(profile),
 #endif
 #endif
@@ -116,14 +116,9 @@ public:
     bool relaxedErrors()    const { return false; }
     bool relaxedErrors()    const { return false; }
     bool suppressWarnings() const { return true; }
     bool suppressWarnings() const { return true; }
     bool isForwardCompatible() const { return false; }
     bool isForwardCompatible() const { return false; }
-#else
-#ifdef GLSLANG_ANGLE
-    const bool forwardCompatible = true;
-    const EProfile profile = ECoreProfile;
 #else
 #else
     bool forwardCompatible;      // true if errors are to be given for use of deprecated features
     bool forwardCompatible;      // true if errors are to be given for use of deprecated features
     EProfile profile;            // the declared profile in the shader (core by default)
     EProfile profile;            // the declared profile in the shader (core by default)
-#endif
     bool isEsProfile() const { return profile == EEsProfile; }
     bool isEsProfile() const { return profile == EEsProfile; }
     void requireProfile(const TSourceLoc& loc, int profileMask, const char* featureDesc);
     void requireProfile(const TSourceLoc& loc, int profileMask, const char* featureDesc);
     void profileRequires(const TSourceLoc& loc, int profileMask, int minVersion, int numExtensions,
     void profileRequires(const TSourceLoc& loc, int profileMask, int minVersion, int numExtensions,

+ 2 - 2
3rdparty/glslang/glslang/MachineIndependent/reflection.cpp

@@ -33,7 +33,7 @@
 // POSSIBILITY OF SUCH DAMAGE.
 // POSSIBILITY OF SUCH DAMAGE.
 //
 //
 
 
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
 
 
 #include "../Include/Common.h"
 #include "../Include/Common.h"
 #include "reflection.h"
 #include "reflection.h"
@@ -1271,4 +1271,4 @@ void TReflection::dump()
 
 
 } // end namespace glslang
 } // end namespace glslang
 
 
-#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
+#endif // !GLSLANG_WEB

+ 2 - 2
3rdparty/glslang/glslang/MachineIndependent/reflection.h

@@ -33,7 +33,7 @@
 // POSSIBILITY OF SUCH DAMAGE.
 // POSSIBILITY OF SUCH DAMAGE.
 //
 //
 
 
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
 
 
 #ifndef _REFLECTION_INCLUDED
 #ifndef _REFLECTION_INCLUDED
 #define _REFLECTION_INCLUDED
 #define _REFLECTION_INCLUDED
@@ -220,4 +220,4 @@ protected:
 
 
 #endif // _REFLECTION_INCLUDED
 #endif // _REFLECTION_INCLUDED
 
 
-#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
+#endif // !GLSLANG_WEB

+ 5 - 5
3rdparty/glslang/StandAlone/ResourceLimits.h → 3rdparty/glslang/glslang/Public/ResourceLimits.h

@@ -37,14 +37,16 @@
 
 
 #include <string>
 #include <string>
 
 
-#include "../glslang/Include/ResourceLimits.h"
+#include "../Include/ResourceLimits.h"
 
 
-namespace glslang {
+// Return pointer to user-writable Resource to pass through API in
+// future-proof way.
+extern TBuiltInResource* GetResources();
 
 
 // These are the default resources for TBuiltInResources, used for both
 // These are the default resources for TBuiltInResources, used for both
 //  - parsing this string for the case where the user didn't supply one,
 //  - parsing this string for the case where the user didn't supply one,
 //  - dumping out a template for user construction of a config file.
 //  - dumping out a template for user construction of a config file.
-extern const TBuiltInResource DefaultTBuiltInResource;
+extern const TBuiltInResource* GetDefaultResources();
 
 
 // Returns the DefaultTBuiltInResource as a human-readable string.
 // Returns the DefaultTBuiltInResource as a human-readable string.
 std::string GetDefaultTBuiltInResourceString();
 std::string GetDefaultTBuiltInResourceString();
@@ -52,6 +54,4 @@ std::string GetDefaultTBuiltInResourceString();
 // Decodes the resource limits from |config| to |resources|.
 // Decodes the resource limits from |config| to |resources|.
 void DecodeResourceLimits(TBuiltInResource* resources, char* config);
 void DecodeResourceLimits(TBuiltInResource* resources, char* config);
 
 
-}  // end namespace glslang
-
 #endif  // _STAND_ALONE_RESOURCE_LIMITS_INCLUDED_
 #endif  // _STAND_ALONE_RESOURCE_LIMITS_INCLUDED_

+ 5 - 5
3rdparty/glslang/glslang/Public/ShaderLang.h

@@ -728,7 +728,7 @@ private:
     TShader& operator=(TShader&);
     TShader& operator=(TShader&);
 };
 };
 
 
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
 
 
 //
 //
 // A reflection database and its interface, consistent with the OpenGL API reflection queries.
 // A reflection database and its interface, consistent with the OpenGL API reflection queries.
@@ -846,7 +846,7 @@ public:
     virtual void addStage(EShLanguage stage, TIntermediate& stageIntermediate) = 0;
     virtual void addStage(EShLanguage stage, TIntermediate& stageIntermediate) = 0;
 };
 };
 
 
-#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
+#endif // !GLSLANG_WEB
 
 
 // Make one TProgram per set of shaders that will get linked together.  Add all
 // Make one TProgram per set of shaders that will get linked together.  Add all
 // the shaders that are to be linked together.  After calling shader.parse()
 // the shaders that are to be linked together.  After calling shader.parse()
@@ -867,7 +867,7 @@ public:
 
 
     TIntermediate* getIntermediate(EShLanguage stage) const { return intermediate[stage]; }
     TIntermediate* getIntermediate(EShLanguage stage) const { return intermediate[stage]; }
 
 
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
 
 
     // Reflection Interface
     // Reflection Interface
 
 
@@ -961,7 +961,7 @@ public:
     // If resolver is not provided it uses the previous approach
     // If resolver is not provided it uses the previous approach
     // and respects auto assignment and offsets.
     // and respects auto assignment and offsets.
     GLSLANG_EXPORT bool mapIO(TIoMapResolver* pResolver = nullptr, TIoMapper* pIoMapper = nullptr);
     GLSLANG_EXPORT bool mapIO(TIoMapResolver* pResolver = nullptr, TIoMapper* pIoMapper = nullptr);
-#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
+#endif // !GLSLANG_WEB
 
 
 protected:
 protected:
     GLSLANG_EXPORT bool linkStage(EShLanguage, EShMessages);
     GLSLANG_EXPORT bool linkStage(EShLanguage, EShMessages);
@@ -972,7 +972,7 @@ protected:
     TIntermediate* intermediate[EShLangCount];
     TIntermediate* intermediate[EShLangCount];
     bool newedIntermediate[EShLangCount];      // track which intermediate were "new" versus reusing a singleton unit in a stage
     bool newedIntermediate[EShLangCount];      // track which intermediate were "new" versus reusing a singleton unit in a stage
     TInfoSink* infoSink;
     TInfoSink* infoSink;
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
     TReflection* reflection;
     TReflection* reflection;
 #endif
 #endif
     bool linked;
     bool linked;

+ 4 - 1
3rdparty/glslang/StandAlone/resource_limits_c.h → 3rdparty/glslang/glslang/Public/resource_limits_c.h

@@ -29,12 +29,15 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef _STAND_ALONE_RESOURCE_LIMITS_C_INCLUDED_
 #ifndef _STAND_ALONE_RESOURCE_LIMITS_C_INCLUDED_
 #define _STAND_ALONE_RESOURCE_LIMITS_C_INCLUDED_
 #define _STAND_ALONE_RESOURCE_LIMITS_C_INCLUDED_
 
 
-#include "../glslang/Include/glslang_c_interface.h"
+#include "../Include/glslang_c_interface.h"
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus
 extern "C" {
 extern "C" {
 #endif
 #endif
 
 
+// Returns a struct that can be use to create custom resource values.
+glslang_resource_t* glslang_resource(void);
+
 // These are the default resources for TBuiltInResources, used for both
 // These are the default resources for TBuiltInResources, used for both
 //  - parsing this string for the case where the user didn't supply one,
 //  - parsing this string for the case where the user didn't supply one,
 //  - dumping out a template for user construction of a config file.
 //  - dumping out a template for user construction of a config file.