Remove GLSLANG_WEB and GLSLANG_WEB_DEVEL
This CL removes the GLSLANG_WEB and GLSLANG_WEB_DEVEL cmake build options and their usage in the codebase. Issue #2958
This commit is contained in:
parent
c8c669fc2a
commit
d291b15911
48 changed files with 49 additions and 1540 deletions
|
|
@ -151,8 +151,6 @@
|
|||
|
||||
namespace glslang {
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
|
||||
//
|
||||
// Initialize all extensions, almost always to 'disable', as once their features
|
||||
// are incorporated into a core version, their features are supported through allowing that
|
||||
|
|
@ -385,8 +383,6 @@ void TParseVersions::initializeExtensionBehavior()
|
|||
spvUnsupportedExt.push_back(E_GL_ARB_bindless_texture);
|
||||
}
|
||||
|
||||
#endif // GLSLANG_WEB
|
||||
|
||||
// Get code that is not part of a shared symbol table, is specific to this shader,
|
||||
// or needed by the preprocessor (which does not use a shared symbol table).
|
||||
void TParseVersions::getPreamble(std::string& preamble)
|
||||
|
|
@ -395,9 +391,6 @@ void TParseVersions::getPreamble(std::string& preamble)
|
|||
preamble =
|
||||
"#define GL_ES 1\n"
|
||||
"#define GL_FRAGMENT_PRECISION_HIGH 1\n"
|
||||
#ifdef GLSLANG_WEB
|
||||
;
|
||||
#else
|
||||
"#define GL_OES_texture_3D 1\n"
|
||||
"#define GL_OES_standard_derivatives 1\n"
|
||||
"#define GL_EXT_frag_depth 1\n"
|
||||
|
|
@ -596,11 +589,8 @@ void TParseVersions::getPreamble(std::string& preamble)
|
|||
if (version >= 130) {
|
||||
preamble +="#define GL_FRAGMENT_PRECISION_HIGH 1\n";
|
||||
}
|
||||
|
||||
#endif // GLSLANG_WEB
|
||||
}
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
if ((!isEsProfile() && version >= 140) ||
|
||||
(isEsProfile() && version >= 310)) {
|
||||
preamble +=
|
||||
|
|
@ -628,7 +618,6 @@ void TParseVersions::getPreamble(std::string& preamble)
|
|||
preamble +=
|
||||
"#define GL_EXT_terminate_invocation 1\n"
|
||||
;
|
||||
#endif
|
||||
|
||||
// #define VULKAN XXXX
|
||||
const int numberBufSize = 12;
|
||||
|
|
@ -640,7 +629,6 @@ void TParseVersions::getPreamble(std::string& preamble)
|
|||
preamble += "\n";
|
||||
}
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
// #define GL_SPIRV XXXX
|
||||
if (spvVersion.openGl > 0) {
|
||||
preamble += "#define GL_SPIRV ";
|
||||
|
|
@ -648,9 +636,7 @@ void TParseVersions::getPreamble(std::string& preamble)
|
|||
preamble += numberBuf;
|
||||
preamble += "\n";
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
// GL_EXT_spirv_intrinsics
|
||||
if (!isEsProfile()) {
|
||||
switch (language) {
|
||||
|
|
@ -671,7 +657,6 @@ void TParseVersions::getPreamble(std::string& preamble)
|
|||
default: break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
//
|
||||
|
|
@ -683,7 +668,6 @@ const char* StageName(EShLanguage stage)
|
|||
case EShLangVertex: return "vertex";
|
||||
case EShLangFragment: return "fragment";
|
||||
case EShLangCompute: return "compute";
|
||||
#ifndef GLSLANG_WEB
|
||||
case EShLangTessControl: return "tessellation control";
|
||||
case EShLangTessEvaluation: return "tessellation evaluation";
|
||||
case EShLangGeometry: return "geometry";
|
||||
|
|
@ -695,7 +679,6 @@ const char* StageName(EShLanguage stage)
|
|||
case EShLangCallable: return "callable";
|
||||
case EShLangMesh: return "mesh";
|
||||
case EShLangTask: return "task";
|
||||
#endif
|
||||
default: return "unknown stage";
|
||||
}
|
||||
}
|
||||
|
|
@ -720,7 +703,6 @@ void TParseVersions::requireStage(const TSourceLoc& loc, EShLanguage stage, cons
|
|||
requireStage(loc, static_cast<EShLanguageMask>(1 << stage), featureDesc);
|
||||
}
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
//
|
||||
// When to use requireProfile():
|
||||
//
|
||||
|
|
@ -758,7 +740,6 @@ void TParseVersions::profileRequires(const TSourceLoc& loc, int profileMask, int
|
|||
{
|
||||
if (profile & profileMask) {
|
||||
bool okay = minVersion > 0 && version >= minVersion;
|
||||
#ifndef GLSLANG_WEB
|
||||
for (int i = 0; i < numExtensions; ++i) {
|
||||
switch (getExtensionBehavior(extensions[i])) {
|
||||
case EBhWarn:
|
||||
|
|
@ -771,7 +752,6 @@ void TParseVersions::profileRequires(const TSourceLoc& loc, int profileMask, int
|
|||
default: break; // some compilers want this
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (! okay)
|
||||
error(loc, "not supported for this version or the enabled extensions", featureDesc, "");
|
||||
}
|
||||
|
|
@ -1362,7 +1342,7 @@ void TParseVersions::coopmatCheck(const TSourceLoc& loc, const char* op, bool bu
|
|||
requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, op);
|
||||
}
|
||||
}
|
||||
#endif // GLSLANG_WEB
|
||||
|
||||
// Call for any operation removed because SPIR-V is in use.
|
||||
void TParseVersions::spvRemoved(const TSourceLoc& loc, const char* op)
|
||||
{
|
||||
|
|
@ -1380,26 +1360,20 @@ void TParseVersions::vulkanRemoved(const TSourceLoc& loc, const char* op)
|
|||
// Call for any operation that requires Vulkan.
|
||||
void TParseVersions::requireVulkan(const TSourceLoc& loc, const char* op)
|
||||
{
|
||||
#ifndef GLSLANG_WEB
|
||||
if (spvVersion.vulkan == 0)
|
||||
error(loc, "only allowed when using GLSL for Vulkan", op, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
// Call for any operation that requires SPIR-V.
|
||||
void TParseVersions::requireSpv(const TSourceLoc& loc, const char* op)
|
||||
{
|
||||
#ifndef GLSLANG_WEB
|
||||
if (spvVersion.spv == 0)
|
||||
error(loc, "only allowed when generating SPIR-V", op, "");
|
||||
#endif
|
||||
}
|
||||
void TParseVersions::requireSpv(const TSourceLoc& loc, const char *op, unsigned int version)
|
||||
{
|
||||
#ifndef GLSLANG_WEB
|
||||
if (spvVersion.spv < version)
|
||||
error(loc, "not supported for current targeted SPIR-V version", op, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
} // end namespace glslang
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue