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
|
|
@ -144,10 +144,6 @@ struct Versioning {
|
|||
EProfile EDesktopProfile = static_cast<EProfile>(ENoProfile | ECoreProfile | ECompatibilityProfile);
|
||||
|
||||
// Declare pointers to put into the table for versioning.
|
||||
#ifdef GLSLANG_WEB
|
||||
const Versioning* Es300Desktop130 = nullptr;
|
||||
const Versioning* Es310Desktop420 = nullptr;
|
||||
#else
|
||||
const Versioning Es300Desktop130Version[] = { { EEsProfile, 0, 300, 0, nullptr },
|
||||
{ EDesktopProfile, 0, 130, 0, nullptr },
|
||||
{ EBadProfile } };
|
||||
|
|
@ -162,7 +158,6 @@ EProfile EDesktopProfile = static_cast<EProfile>(ENoProfile | ECoreProfile | ECo
|
|||
{ EDesktopProfile, 0, 450, 0, nullptr },
|
||||
{ EBadProfile } };
|
||||
const Versioning* Es310Desktop450 = &Es310Desktop450Version[0];
|
||||
#endif
|
||||
|
||||
// The main descriptor of what a set of function prototypes can look like, and
|
||||
// a pointer to extra versioning information, when needed.
|
||||
|
|
@ -264,10 +259,8 @@ const BuiltInFunction BaseFunctions[] = {
|
|||
{ EOpAtomicXor, "atomicXor", 2, TypeIU, ClassV1FIOCV, Es310Desktop420 },
|
||||
{ EOpAtomicExchange, "atomicExchange", 2, TypeIU, ClassV1FIOCV, Es310Desktop420 },
|
||||
{ EOpAtomicCompSwap, "atomicCompSwap", 3, TypeIU, ClassV1FIOCV, Es310Desktop420 },
|
||||
#ifndef GLSLANG_WEB
|
||||
{ EOpMix, "mix", 3, TypeB, ClassRegular, Es310Desktop450 },
|
||||
{ EOpMix, "mix", 3, TypeIU, ClassLB, Es310Desktop450 },
|
||||
#endif
|
||||
|
||||
{ EOpNull }
|
||||
};
|
||||
|
|
@ -386,10 +379,8 @@ void AddTabledBuiltin(TString& decls, const BuiltInFunction& function)
|
|||
if (arg == function.numArguments - 1 && (function.classes & ClassLO))
|
||||
decls.append("out ");
|
||||
if (arg == 0) {
|
||||
#ifndef GLSLANG_WEB
|
||||
if (function.classes & ClassCV)
|
||||
decls.append("coherent volatile ");
|
||||
#endif
|
||||
if (function.classes & ClassFIO)
|
||||
decls.append("inout ");
|
||||
if (function.classes & ClassFO)
|
||||
|
|
@ -416,11 +407,6 @@ void AddTabledBuiltin(TString& decls, const BuiltInFunction& function)
|
|||
// See if the tabled versioning information allows the current version.
|
||||
bool ValidVersion(const BuiltInFunction& function, int version, EProfile profile, const SpvVersion& /* spVersion */)
|
||||
{
|
||||
#if defined(GLSLANG_WEB)
|
||||
// all entries in table are valid
|
||||
return true;
|
||||
#endif
|
||||
|
||||
// nullptr means always valid
|
||||
if (function.versioning == nullptr)
|
||||
return true;
|
||||
|
|
@ -501,7 +487,6 @@ TBuiltIns::TBuiltIns()
|
|||
prefixes[EbtFloat] = "";
|
||||
prefixes[EbtInt] = "i";
|
||||
prefixes[EbtUint] = "u";
|
||||
#if !defined(GLSLANG_WEB)
|
||||
prefixes[EbtFloat16] = "f16";
|
||||
prefixes[EbtInt8] = "i8";
|
||||
prefixes[EbtUint8] = "u8";
|
||||
|
|
@ -509,7 +494,6 @@ TBuiltIns::TBuiltIns()
|
|||
prefixes[EbtUint16] = "u16";
|
||||
prefixes[EbtInt64] = "i64";
|
||||
prefixes[EbtUint64] = "u64";
|
||||
#endif
|
||||
|
||||
postfixes[2] = "2";
|
||||
postfixes[3] = "3";
|
||||
|
|
@ -519,13 +503,11 @@ TBuiltIns::TBuiltIns()
|
|||
dimMap[Esd2D] = 2;
|
||||
dimMap[Esd3D] = 3;
|
||||
dimMap[EsdCube] = 3;
|
||||
#ifndef GLSLANG_WEB
|
||||
dimMap[Esd1D] = 1;
|
||||
dimMap[EsdRect] = 2;
|
||||
dimMap[EsdBuffer] = 1;
|
||||
dimMap[EsdSubpass] = 2; // potentially unused for now
|
||||
dimMap[EsdAttachmentEXT] = 2; // potentially unused for now
|
||||
#endif
|
||||
}
|
||||
|
||||
TBuiltIns::~TBuiltIns()
|
||||
|
|
@ -543,10 +525,6 @@ TBuiltIns::~TBuiltIns()
|
|||
//
|
||||
void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvVersion)
|
||||
{
|
||||
#ifdef GLSLANG_WEB
|
||||
version = 310;
|
||||
profile = EEsProfile;
|
||||
#endif
|
||||
addTabledBuiltins(version, profile, spvVersion);
|
||||
|
||||
//============================================================================
|
||||
|
|
@ -555,7 +533,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
//
|
||||
//============================================================================
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
//
|
||||
// Derivatives Functions.
|
||||
//
|
||||
|
|
@ -1500,7 +1477,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"void atomicStore(coherent volatile out double, double, int, int, int);"
|
||||
"\n");
|
||||
}
|
||||
#endif // !GLSLANG_WEB
|
||||
|
||||
if ((profile == EEsProfile && version >= 300) ||
|
||||
(profile != EEsProfile && version >= 150)) { // GL_ARB_shader_bit_encoding
|
||||
|
|
@ -1528,7 +1504,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"\n");
|
||||
}
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
if ((profile != EEsProfile && version >= 400) ||
|
||||
(profile == EEsProfile && version >= 310)) { // GL_OES_gpu_shader5
|
||||
|
||||
|
|
@ -1606,7 +1581,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
|
||||
"\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((profile == EEsProfile && version >= 300) ||
|
||||
(profile != EEsProfile && version >= 150)) {
|
||||
|
|
@ -1635,7 +1609,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"\n");
|
||||
}
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
if ((profile == EEsProfile && version >= 310) ||
|
||||
(profile != EEsProfile && version >= 150)) {
|
||||
commonBuiltins.append(
|
||||
|
|
@ -1655,7 +1628,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"vec4 unpackUnorm4x8(highp uint);"
|
||||
"\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
//
|
||||
// Matrix Functions.
|
||||
|
|
@ -1714,7 +1686,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
//
|
||||
// Original-style texture functions existing in all stages.
|
||||
// (Per-stage functions below.)
|
||||
|
|
@ -4257,7 +4228,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"void EndPrimitive();"
|
||||
"\n");
|
||||
}
|
||||
#endif // !GLSLANG_WEB
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
|
|
@ -4294,7 +4264,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"void groupMemoryBarrier();"
|
||||
);
|
||||
}
|
||||
#ifndef GLSLANG_WEB
|
||||
if ((profile != EEsProfile && version >= 420) || esBarrier) {
|
||||
if (spvVersion.vulkan == 0 || spvVersion.vulkanRelaxed) {
|
||||
commonBuiltins.append("void memoryBarrierAtomicCounter();");
|
||||
|
|
@ -4842,7 +4811,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"void SetMeshOutputsEXT(uint, uint);"
|
||||
"\n");
|
||||
}
|
||||
#endif // !GLSLANG_WEB
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
|
|
@ -4864,13 +4832,11 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"highp float diff;" // f - n
|
||||
);
|
||||
} else {
|
||||
#ifndef GLSLANG_WEB
|
||||
commonBuiltins.append(
|
||||
"float near;" // n
|
||||
"float far;" // f
|
||||
"float diff;" // f - n
|
||||
);
|
||||
#endif
|
||||
}
|
||||
|
||||
commonBuiltins.append(
|
||||
|
|
@ -4879,7 +4845,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"\n");
|
||||
}
|
||||
|
||||
#if !defined(GLSLANG_WEB)
|
||||
if (spvVersion.spv == 0 && IncludeLegacy(version, profile, spvVersion)) {
|
||||
//
|
||||
// Matrix state. p. 31, 32, 37, 39, 40.
|
||||
|
|
@ -4997,7 +4962,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
|
||||
"\n");
|
||||
}
|
||||
#endif // !GLSLANG_WEB
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
|
|
@ -5027,7 +4991,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"\n");
|
||||
}
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
//============================================================================
|
||||
//
|
||||
// Define the interface to the mesh/task shader.
|
||||
|
|
@ -5310,19 +5273,15 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"in highp int gl_InstanceID;" // needs qualifier fixed later
|
||||
);
|
||||
if (spvVersion.vulkan > 0)
|
||||
#endif
|
||||
stageBuiltins[EShLangVertex].append(
|
||||
"in highp int gl_VertexIndex;"
|
||||
"in highp int gl_InstanceIndex;"
|
||||
);
|
||||
#ifndef GLSLANG_WEB
|
||||
if (version < 310)
|
||||
#endif
|
||||
stageBuiltins[EShLangVertex].append(
|
||||
"highp vec4 gl_Position;" // needs qualifier fixed later
|
||||
"highp float gl_PointSize;" // needs qualifier fixed later
|
||||
);
|
||||
#ifndef GLSLANG_WEB
|
||||
else
|
||||
stageBuiltins[EShLangVertex].append(
|
||||
"out gl_PerVertex {"
|
||||
|
|
@ -5800,7 +5759,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"mediump vec2 gl_PointCoord;" // needs qualifier fixed later
|
||||
);
|
||||
}
|
||||
#endif
|
||||
if (version >= 300) {
|
||||
stageBuiltins[EShLangFragment].append(
|
||||
"highp vec4 gl_FragCoord;" // needs qualifier fixed later
|
||||
|
|
@ -5809,7 +5767,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"highp float gl_FragDepth;" // needs qualifier fixed later
|
||||
);
|
||||
}
|
||||
#ifndef GLSLANG_WEB
|
||||
if (version >= 310) {
|
||||
stageBuiltins[EShLangFragment].append(
|
||||
"bool gl_HelperInvocation;" // needs qualifier fixed later
|
||||
|
|
@ -5854,15 +5811,12 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"flat in highp int gl_ShadingRateEXT;" // GL_EXT_fragment_shading_rate
|
||||
);
|
||||
}
|
||||
#endif
|
||||
|
||||
stageBuiltins[EShLangFragment].append("\n");
|
||||
|
||||
if (version >= 130)
|
||||
add2ndGenerationSamplingImaging(version, profile, spvVersion);
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
|
||||
if ((profile != EEsProfile && version >= 140) ||
|
||||
(profile == EEsProfile && version >= 310)) {
|
||||
stageBuiltins[EShLangFragment].append(
|
||||
|
|
@ -6254,7 +6208,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif // !GLSLANG_WEB
|
||||
|
||||
// printf("%s\n", commonBuiltins.c_str());
|
||||
// printf("%s\n", stageBuiltins[EShLangFragment].c_str());
|
||||
|
|
@ -6273,26 +6226,14 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c
|
|||
|
||||
// enumerate all the types
|
||||
const TBasicType bTypes[] = { EbtFloat, EbtInt, EbtUint,
|
||||
#if !defined(GLSLANG_WEB)
|
||||
EbtFloat16
|
||||
#endif
|
||||
EbtFloat16
|
||||
};
|
||||
#ifdef GLSLANG_WEB
|
||||
bool skipBuffer = true;
|
||||
bool skipCubeArrayed = true;
|
||||
const int image = 0;
|
||||
#else
|
||||
bool skipBuffer = (profile == EEsProfile && version < 310) || (profile != EEsProfile && version < 140);
|
||||
bool skipCubeArrayed = (profile == EEsProfile && version < 310) || (profile != EEsProfile && version < 130);
|
||||
for (int image = 0; image <= 1; ++image) // loop over "bool" image vs sampler
|
||||
#endif
|
||||
{
|
||||
for (int shadow = 0; shadow <= 1; ++shadow) { // loop over "bool" shadow or not
|
||||
#ifdef GLSLANG_WEB
|
||||
const int ms = 0;
|
||||
#else
|
||||
for (int ms = 0; ms <= 1; ++ms) // loop over "bool" multisample or not
|
||||
#endif
|
||||
{
|
||||
if ((ms || image) && shadow)
|
||||
continue;
|
||||
|
|
@ -6304,9 +6245,6 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c
|
|||
continue;
|
||||
|
||||
for (int arrayed = 0; arrayed <= 1; ++arrayed) { // loop over "bool" arrayed or not
|
||||
#ifdef GLSLANG_WEB
|
||||
for (int dim = Esd2D; dim <= EsdCube; ++dim) { // 2D, 3D, and Cube
|
||||
#else
|
||||
for (int dim = Esd1D; dim < EsdNumDims; ++dim) { // 1D, ..., buffer, subpass
|
||||
if (dim == EsdAttachmentEXT)
|
||||
continue;
|
||||
|
|
@ -6330,7 +6268,6 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c
|
|||
continue;
|
||||
if (ms && arrayed && profile == EEsProfile && version < 310)
|
||||
continue;
|
||||
#endif
|
||||
if (dim == Esd3D && shadow)
|
||||
continue;
|
||||
if (dim == EsdCube && arrayed && skipCubeArrayed)
|
||||
|
|
@ -6340,25 +6277,21 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c
|
|||
|
||||
// Loop over the bTypes
|
||||
for (size_t bType = 0; bType < sizeof(bTypes)/sizeof(TBasicType); ++bType) {
|
||||
#ifndef GLSLANG_WEB
|
||||
if (bTypes[bType] == EbtFloat16 && (profile == EEsProfile || version < 450))
|
||||
continue;
|
||||
if (dim == EsdRect && version < 140 && bType > 0)
|
||||
continue;
|
||||
#endif
|
||||
if (shadow && (bTypes[bType] == EbtInt || bTypes[bType] == EbtUint))
|
||||
continue;
|
||||
//
|
||||
// Now, make all the function prototypes for the type we just built...
|
||||
//
|
||||
TSampler sampler;
|
||||
#ifndef GLSLANG_WEB
|
||||
if (dim == EsdSubpass) {
|
||||
sampler.setSubpass(bTypes[bType], ms ? true : false);
|
||||
} else if (dim == EsdAttachmentEXT) {
|
||||
sampler.setAttachmentEXT(bTypes[bType]);
|
||||
} else
|
||||
#endif
|
||||
if (image) {
|
||||
sampler.setImage(bTypes[bType], (TSamplerDim)dim, arrayed ? true : false,
|
||||
shadow ? true : false,
|
||||
|
|
@ -6371,12 +6304,10 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c
|
|||
|
||||
TString typeName = sampler.getString();
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
if (dim == EsdSubpass) {
|
||||
addSubpassSampling(sampler, typeName, version, profile);
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
|
||||
addQueryFunctions(sampler, typeName, version, profile);
|
||||
|
||||
|
|
@ -6384,7 +6315,6 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c
|
|||
addImageFunctions(sampler, typeName, version, profile);
|
||||
else {
|
||||
addSamplingFunctions(sampler, typeName, version, profile);
|
||||
#ifndef GLSLANG_WEB
|
||||
addGatherFunctions(sampler, typeName, version, profile);
|
||||
if (spvVersion.vulkan > 0 && sampler.isCombined() && !sampler.shadow) {
|
||||
// Base Vulkan allows texelFetch() for
|
||||
|
|
@ -6400,7 +6330,6 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c
|
|||
addSamplingFunctions(sampler, textureTypeName, version, profile);
|
||||
addQueryFunctions(sampler, textureTypeName, version, profile);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -6431,16 +6360,6 @@ void TBuiltIns::addQueryFunctions(TSampler sampler, const TString& typeName, int
|
|||
|
||||
int sizeDims = dimMap[sampler.dim] + (sampler.arrayed ? 1 : 0) - (sampler.dim == EsdCube ? 1 : 0);
|
||||
|
||||
#ifdef GLSLANG_WEB
|
||||
commonBuiltins.append("highp ");
|
||||
commonBuiltins.append("ivec");
|
||||
commonBuiltins.append(postfixes[sizeDims]);
|
||||
commonBuiltins.append(" textureSize(");
|
||||
commonBuiltins.append(typeName);
|
||||
commonBuiltins.append(",int);\n");
|
||||
return;
|
||||
#endif
|
||||
|
||||
if (sampler.isImage() && ((profile == EEsProfile && version < 310) || (profile != EEsProfile && version < 420)))
|
||||
return;
|
||||
|
||||
|
|
@ -6760,11 +6679,6 @@ void TBuiltIns::addSubpassSampling(TSampler sampler, const TString& typeName, in
|
|||
//
|
||||
void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName, int version, EProfile profile)
|
||||
{
|
||||
#ifdef GLSLANG_WEB
|
||||
profile = EEsProfile;
|
||||
version = 310;
|
||||
#endif
|
||||
|
||||
//
|
||||
// texturing
|
||||
//
|
||||
|
|
@ -6839,11 +6753,7 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName,
|
|||
continue;
|
||||
|
||||
// loop over 16-bit floating-point texel addressing
|
||||
#if defined(GLSLANG_WEB)
|
||||
const int f16TexAddr = 0;
|
||||
#else
|
||||
for (int f16TexAddr = 0; f16TexAddr <= 1; ++f16TexAddr)
|
||||
#endif
|
||||
{
|
||||
if (f16TexAddr && sampler.type != EbtFloat16)
|
||||
continue;
|
||||
|
|
@ -6852,11 +6762,7 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName,
|
|||
totalDims--;
|
||||
}
|
||||
// loop over "bool" lod clamp
|
||||
#if defined(GLSLANG_WEB)
|
||||
const int lodClamp = 0;
|
||||
#else
|
||||
for (int lodClamp = 0; lodClamp <= 1 ;++lodClamp)
|
||||
#endif
|
||||
{
|
||||
if (lodClamp && (profile == EEsProfile || version < 450))
|
||||
continue;
|
||||
|
|
@ -6864,11 +6770,7 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName,
|
|||
continue;
|
||||
|
||||
// loop over "bool" sparse or not
|
||||
#if defined(GLSLANG_WEB)
|
||||
const int sparse = 0;
|
||||
#else
|
||||
for (int sparse = 0; sparse <= 1; ++sparse)
|
||||
#endif
|
||||
{
|
||||
if (sparse && (profile == EEsProfile || version < 450))
|
||||
continue;
|
||||
|
|
@ -7045,11 +6947,6 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName,
|
|||
//
|
||||
void TBuiltIns::addGatherFunctions(TSampler sampler, const TString& typeName, int version, EProfile profile)
|
||||
{
|
||||
#ifdef GLSLANG_WEB
|
||||
profile = EEsProfile;
|
||||
version = 310;
|
||||
#endif
|
||||
|
||||
switch (sampler.dim) {
|
||||
case Esd2D:
|
||||
case EsdRect:
|
||||
|
|
@ -7288,11 +7185,6 @@ void TBuiltIns::addGatherFunctions(TSampler sampler, const TString& typeName, in
|
|||
//
|
||||
void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language)
|
||||
{
|
||||
#ifdef GLSLANG_WEB
|
||||
version = 310;
|
||||
profile = EEsProfile;
|
||||
#endif
|
||||
|
||||
//
|
||||
// Initialize the context-dependent (resource-dependent) built-in strings for parsing.
|
||||
//
|
||||
|
|
@ -7350,7 +7242,6 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
|
|||
s.append(builtInConstant);
|
||||
}
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
if (version >= 310) {
|
||||
// geometry
|
||||
|
||||
|
|
@ -7673,7 +7564,6 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
|
|||
snprintf(builtInConstant, maxSize, "const int gl_MaxTransformFeedbackInterleavedComponents = %d;", resources.maxTransformFeedbackInterleavedComponents);
|
||||
s.append(builtInConstant);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// compute
|
||||
|
|
@ -7695,7 +7585,6 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
|
|||
s.append("\n");
|
||||
}
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
// images (some in compute below)
|
||||
if ((profile == EEsProfile && version >= 310) ||
|
||||
(profile != EEsProfile && version >= 130)) {
|
||||
|
|
@ -7797,7 +7686,6 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
|
|||
|
||||
s.append("\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
s.append("\n");
|
||||
}
|
||||
|
|
@ -7900,11 +7788,6 @@ static void BuiltInVariable(const char* blockName, const char* name, TBuiltInVar
|
|||
//
|
||||
void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language, TSymbolTable& symbolTable)
|
||||
{
|
||||
#ifdef GLSLANG_WEB
|
||||
version = 310;
|
||||
profile = EEsProfile;
|
||||
#endif
|
||||
|
||||
//
|
||||
// Tag built-in variables and functions with additional qualifier and extension information
|
||||
// that cannot be declared with the text strings.
|
||||
|
|
@ -7924,7 +7807,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
BuiltInVariable("gl_InstanceIndex", EbvInstanceIndex, symbolTable);
|
||||
}
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
if (spvVersion.vulkan == 0) {
|
||||
SpecialQualifier("gl_VertexID", EvqVertexId, EbvVertexId, symbolTable);
|
||||
SpecialQualifier("gl_InstanceID", EvqInstanceId, EbvInstanceId, symbolTable);
|
||||
|
|
@ -8098,7 +7980,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
|
||||
case EShLangTessEvaluation:
|
||||
case EShLangGeometry:
|
||||
#endif // !GLSLANG_WEB
|
||||
SpecialQualifier("gl_Position", EvqPosition, EbvPosition, symbolTable);
|
||||
SpecialQualifier("gl_PointSize", EvqPointSize, EbvPointSize, symbolTable);
|
||||
|
||||
|
|
@ -8108,7 +7989,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
BuiltInVariable("gl_out", "gl_Position", EbvPosition, symbolTable);
|
||||
BuiltInVariable("gl_out", "gl_PointSize", EbvPointSize, symbolTable);
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
SpecialQualifier("gl_ClipVertex", EvqClipVertex, EbvClipVertex, symbolTable);
|
||||
|
||||
BuiltInVariable("gl_in", "gl_ClipDistance", EbvClipDistance, symbolTable);
|
||||
|
|
@ -8288,8 +8168,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
symbolTable.setVariableExtensions("gl_ShadingRateFlag4HorizontalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // !GLSLANG_WEB
|
||||
break;
|
||||
|
||||
case EShLangFragment:
|
||||
|
|
@ -8306,7 +8184,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
}
|
||||
}
|
||||
SpecialQualifier("gl_FragDepth", EvqFragDepth, EbvFragDepth, symbolTable);
|
||||
#ifndef GLSLANG_WEB
|
||||
SpecialQualifier("gl_FragDepthEXT", EvqFragDepth, EbvFragDepth, symbolTable);
|
||||
SpecialQualifier("gl_FragStencilRefARB", EvqFragStencil, EbvFragStencilRef, symbolTable);
|
||||
SpecialQualifier("gl_HelperInvocation", EvqVaryingIn, EbvHelperInvocation, symbolTable);
|
||||
|
|
@ -8848,7 +8725,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
symbolTable.setFunctionExtensions("stencilAttachmentReadEXT", 1, &E_GL_EXT_shader_tile_image);
|
||||
symbolTable.setFunctionExtensions("depthAttachmentReadEXT", 1, &E_GL_EXT_shader_tile_image);
|
||||
symbolTable.setFunctionExtensions("colorAttachmentReadEXT", 1, &E_GL_EXT_shader_tile_image);
|
||||
#endif // !GLSLANG_WEB
|
||||
break;
|
||||
|
||||
case EShLangCompute:
|
||||
|
|
@ -8861,7 +8737,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
BuiltInVariable("gl_DeviceIndex", EbvDeviceIndex, symbolTable);
|
||||
BuiltInVariable("gl_ViewIndex", EbvViewIndex, symbolTable);
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
if ((profile != EEsProfile && version >= 140) ||
|
||||
(profile == EEsProfile && version >= 310)) {
|
||||
symbolTable.setVariableExtensions("gl_DeviceIndex", 1, &E_GL_EXT_device_group);
|
||||
|
|
@ -9010,10 +8885,8 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
symbolTable.setVariableExtensions("gl_ShadingRateFlag2HorizontalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate);
|
||||
symbolTable.setVariableExtensions("gl_ShadingRateFlag4HorizontalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate);
|
||||
}
|
||||
#endif // !GLSLANG_WEB
|
||||
break;
|
||||
|
||||
#if !defined(GLSLANG_WEB)
|
||||
case EShLangRayGen:
|
||||
case EShLangIntersect:
|
||||
case EShLangAnyHit:
|
||||
|
|
@ -9582,7 +9455,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
symbolTable.setVariableExtensions("gl_ShadingRateFlag4HorizontalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
assert(false && "Language not supported");
|
||||
|
|
@ -9598,7 +9470,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
|
||||
relateTabledBuiltins(version, profile, spvVersion, language, symbolTable);
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
symbolTable.relateToOperator("doubleBitsToInt64", EOpDoubleBitsToInt64);
|
||||
symbolTable.relateToOperator("doubleBitsToUint64", EOpDoubleBitsToUint64);
|
||||
symbolTable.relateToOperator("int64BitsToDouble", EOpInt64BitsToDouble);
|
||||
|
|
@ -10195,7 +10066,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
default:
|
||||
assert(false && "Language not supported");
|
||||
}
|
||||
#endif // !GLSLANG_WEB
|
||||
}
|
||||
|
||||
//
|
||||
|
|
@ -10209,7 +10079,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)
|
||||
{
|
||||
#ifndef GLSLANG_WEB
|
||||
if (profile != EEsProfile && version >= 430 && version < 440) {
|
||||
symbolTable.setVariableExtensions("gl_MaxTransformFeedbackBuffers", 1, &E_GL_ARB_enhanced_layouts);
|
||||
symbolTable.setVariableExtensions("gl_MaxTransformFeedbackInterleavedComponents", 1, &E_GL_ARB_enhanced_layouts);
|
||||
|
|
@ -10281,7 +10150,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
default:
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
} // end namespace glslang
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue