}
spirv_tools_dir = glslang_spirv_tools_dir
-if (!defined(glslang_angle)) {
- glslang_angle = false
-}
config("glslang_public") {
include_dirs = [ "." ]
sources += [ "SPIRV/SpvTools.cpp" ]
defines += [ "ENABLE_OPT=1" ]
}
- if (invoker.is_angle) {
- defines += [ "GLSLANG_ANGLE" ]
- }
if (is_win) {
sources += [ "glslang/OSDependent/Windows/ossource.cpp" ]
}
glslang_sources_common("glslang_lib_sources") {
- enable_opt = !glslang_angle
- enable_hlsl = !glslang_angle
- is_angle = glslang_angle
+ enable_opt = true
+ enable_hlsl = true
}
glslang_sources_common("glslang_sources") {
enable_opt = true
enable_hlsl = true
- is_angle = false
}
source_set("glslang_default_resource_limits_sources") {
{
#ifdef GLSLANG_WEB
return spv::SourceLanguageESSL;
-#elif defined(GLSLANG_ANGLE)
- return spv::SourceLanguageGLSL;
#endif
switch (source) {
// 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)
{
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
std::ofstream out;
out.open(baseName, std::ios::binary | std::ios::out);
if (out.fail())
#ifdef GLSLANG_WEB
const Versioning* Es300Desktop130 = nullptr;
const Versioning* Es310Desktop420 = nullptr;
-#elif defined(GLSLANG_ANGLE)
- const Versioning* Es300Desktop130 = nullptr;
- const Versioning* Es310Desktop420 = nullptr;
- const Versioning* Es310Desktop450 = nullptr;
#else
const Versioning Es300Desktop130Version[] = { { EEsProfile, 0, 300, 0, nullptr },
{ EDesktopProfile, 0, 130, 0, nullptr },
// 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) || defined(GLSLANG_ANGLE)
+#if defined(GLSLANG_WEB)
// all entries in table are valid
return true;
#endif
prefixes[EbtFloat] = "";
prefixes[EbtInt] = "i";
prefixes[EbtUint] = "u";
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
prefixes[EbtFloat16] = "f16";
prefixes[EbtInt8] = "i8";
prefixes[EbtUint8] = "u8";
dimMap[Esd3D] = 3;
dimMap[EsdCube] = 3;
#ifndef GLSLANG_WEB
-#ifndef GLSLANG_ANGLE
dimMap[Esd1D] = 1;
-#endif
dimMap[EsdRect] = 2;
dimMap[EsdBuffer] = 1;
dimMap[EsdSubpass] = 2; // potentially unused for now
#ifdef GLSLANG_WEB
version = 310;
profile = EEsProfile;
-#elif defined(GLSLANG_ANGLE)
- version = 450;
- profile = ECoreProfile;
#endif
addTabledBuiltins(version, profile, spvVersion);
"vec4 fwidthCoarse(vec4 p);"
);
-#ifndef GLSLANG_ANGLE
TString derivativesAndControl16bits (
"float16_t dFdx(float16_t);"
"f16vec2 dFdx(f16vec2);"
"\n"
);
}
-#endif // !GLSLANG_ANGLE
if ((profile == EEsProfile && version >= 310) ||
(profile != EEsProfile && version >= 430)) {
"\n");
}
-#ifndef GLSLANG_ANGLE
if (profile != EEsProfile && version >= 440) {
commonBuiltins.append(
"uint64_t atomicMin(coherent volatile inout uint64_t, uint64_t);"
"void atomicStore(coherent volatile out double, double, int, int, int);"
"\n");
}
-#endif // !GLSLANG_ANGLE
#endif // !GLSLANG_WEB
if ((profile == EEsProfile && version >= 300) ||
"\n");
}
-#ifndef GLSLANG_ANGLE
if (profile != EEsProfile && version >= 150) { // ARB_gpu_shader_fp64
commonBuiltins.append(
"double fma(double, double, double);"
"f64vec4 fma(f64vec4, f64vec4, f64vec4 );"
"\n");
}
-#endif
if ((profile == EEsProfile && version >= 310) ||
(profile != EEsProfile && version >= 400)) {
"\n");
}
-#ifndef GLSLANG_ANGLE
if (profile != EEsProfile && version >= 150) { // ARB_gpu_shader_fp64
commonBuiltins.append(
"double frexp(double, out int);"
"\n");
}
#endif
-#endif
if ((profile == EEsProfile && version >= 300) ||
(profile != EEsProfile && version >= 150)) {
}
#ifndef GLSLANG_WEB
-#ifndef GLSLANG_ANGLE
//
// Original-style texture functions existing in all stages.
// (Per-stage functions below.)
"\n");
}
}
-#endif // !GLSLANG_ANGLE
// Bitfield
if ((profile == EEsProfile && version >= 310) ||
"\n");
}
-#ifndef GLSLANG_ANGLE
// GL_ARB_shader_ballot
if (profile != EEsProfile && version >= 450) {
commonBuiltins.append(
"bool textureFootprintGradClampNV(sampler2D, vec2, vec2, vec2, float, int, bool, out gl_TextureFootprint2DNV);"
"\n");
}
-#endif // !GLSLANG_ANGLE
if ((profile == EEsProfile && version >= 300 && version < 310) ||
(profile != EEsProfile && version >= 150 && version < 450)) { // GL_EXT_shader_integer_mix
"\n");
}
-#ifndef GLSLANG_ANGLE
// GL_AMD_gpu_shader_half_float/Explicit types
if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 310)) {
commonBuiltins.append(
"\n");
}
-#endif // !GLSLANG_ANGLE
//============================================================================
//
if (spvVersion.vulkan == 0 && IncludeLegacy(version, profile, spvVersion))
stageBuiltins[EShLangVertex].append("vec4 ftransform();");
-#ifndef GLSLANG_ANGLE
//
// Original-style texture Functions with lod.
//
"\n");
}
}
-#endif // !GLSLANG_ANGLE
if ((profile != EEsProfile && version >= 150) ||
(profile == EEsProfile && version >= 310)) {
commonBuiltins.append("void debugPrintfEXT();\n");
-#ifndef GLSLANG_ANGLE
if (profile != EEsProfile && version >= 450) {
// coopMatStoreNV perhaps ought to have "out" on the buf parameter, but
// adding it introduces undesirable tempArgs on the stack. What we want
"\n");
}
-#endif // !GLSLANG_ANGLE
// GL_ARB_derivative_control
if (profile != EEsProfile && version >= 400) {
"bool helperInvocationEXT();"
"\n");
-#ifndef GLSLANG_ANGLE
// GL_AMD_shader_explicit_vertex_parameter
if (profile != EEsProfile && version >= 450) {
stageBuiltins[EShLangFragment].append(
"void executeCallableEXT(uint, int);"
"\n");
}
-#endif // !GLSLANG_ANGLE
//E_SPV_NV_compute_shader_derivatives
if ((profile == EEsProfile && version >= 320) || (profile != EEsProfile && version >= 450)) {
stageBuiltins[EShLangCompute].append(derivativeControls);
stageBuiltins[EShLangCompute].append("\n");
}
-#ifndef GLSLANG_ANGLE
if (profile != EEsProfile && version >= 450) {
stageBuiltins[EShLangCompute].append(derivativesAndControl16bits);
stageBuiltins[EShLangCompute].append(derivativesAndControl64bits);
"void SetMeshOutputsEXT(uint, uint);"
"\n");
}
-#endif // !GLSLANG_ANGLE
#endif // !GLSLANG_WEB
//============================================================================
"\n");
}
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
if (spvVersion.spv == 0 && IncludeLegacy(version, profile, spvVersion)) {
//
// Matrix state. p. 31, 32, 37, 39, 40.
"\n");
}
-#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
+#endif // !GLSLANG_WEB
//============================================================================
//
}
#ifndef GLSLANG_WEB
-#ifndef GLSLANG_ANGLE
//============================================================================
//
// Define the interface to the mesh/task shader.
"\n");
}
}
-#endif // !GLSLANG_ANGLE
//============================================================================
//
"\n");
}
-#ifndef GLSLANG_ANGLE
// GL_ARB_shader_ballot
if (profile != EEsProfile && version >= 450) {
const char* ballotDecls =
}
}
}
-#endif // !GLSLANG_ANGLE
-
#endif // !GLSLANG_WEB
// printf("%s\n", commonBuiltins.c_str());
// enumerate all the types
const TBasicType bTypes[] = { EbtFloat, EbtInt, EbtUint,
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
EbtFloat16
#endif
};
#ifdef GLSLANG_WEB
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
for (int dim = Esd1D; dim < EsdNumDims; ++dim) { // 1D, ..., buffer, subpass
-#endif
if (dim == EsdSubpass && spvVersion.vulkan == 0)
continue;
if (dim == EsdSubpass && (image || shadow || arrayed))
#ifdef GLSLANG_WEB
profile = EEsProfile;
version = 310;
-#elif defined(GLSLANG_ANGLE)
- profile = ECoreProfile;
- version = 450;
#endif
//
continue;
// loop over 16-bit floating-point texel addressing
-#if defined(GLSLANG_WEB) || defined(GLSLANG_ANGLE)
+#if defined(GLSLANG_WEB)
const int f16TexAddr = 0;
#else
for (int f16TexAddr = 0; f16TexAddr <= 1; ++f16TexAddr)
totalDims--;
}
// loop over "bool" lod clamp
-#if defined(GLSLANG_WEB) || defined(GLSLANG_ANGLE)
+#if defined(GLSLANG_WEB)
const int lodClamp = 0;
#else
for (int lodClamp = 0; lodClamp <= 1 ;++lodClamp)
continue;
// loop over "bool" sparse or not
-#if defined(GLSLANG_WEB) || defined(GLSLANG_ANGLE)
+#if defined(GLSLANG_WEB)
const int sparse = 0;
#else
for (int sparse = 0; sparse <= 1; ++sparse)
#ifdef GLSLANG_WEB
profile = EEsProfile;
version = 310;
-#elif defined(GLSLANG_ANGLE)
- profile = ECoreProfile;
- version = 450;
#endif
switch (sampler.dim) {
#ifdef GLSLANG_WEB
version = 310;
profile = EEsProfile;
-#elif defined(GLSLANG_ANGLE)
- version = 450;
- profile = ECoreProfile;
#endif
//
s.append("\n");
}
-#ifndef GLSLANG_ANGLE
// atomic counters (some in compute below)
if ((profile == EEsProfile && version >= 310) ||
(profile != EEsProfile && version >= 420)) {
s.append("\n");
}
-#endif // !GLSLANG_ANGLE
// GL_ARB_cull_distance
if (profile != EEsProfile && version >= 450) {
s.append(builtInConstant);
}
-#ifndef GLSLANG_ANGLE
// SPV_NV_mesh_shader
if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) {
snprintf(builtInConstant, maxSize, "const int gl_MaxMeshOutputVerticesNV = %d;", resources.maxMeshOutputVerticesNV);
s.append("\n");
}
#endif
-#endif
s.append("\n");
}
#ifdef GLSLANG_WEB
version = 310;
profile = EEsProfile;
-#elif defined(GLSLANG_ANGLE)
- version = 450;
- profile = ECoreProfile;
#endif
//
#endif // !GLSLANG_WEB
break;
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
case EShLangRayGen:
case EShLangIntersect:
case EShLangAnyHit:
void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language, TSymbolTable& symbolTable, const TBuiltInResource &resources)
{
#ifndef GLSLANG_WEB
-#if defined(GLSLANG_ANGLE)
- profile = ECoreProfile;
- version = 450;
-#endif
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);
#ifdef GLSLANG_WEB
profile = EEsProfile;
version = 310;
-#elif defined(GLSLANG_ANGLE)
- profile = ECoreProfile;
- version = 450;
#endif
(*symbolTables[language]).adoptLevels(*commonTable[CommonIndex(profile, language)]);
#ifdef GLSLANG_WEB
profile = EEsProfile;
version = 310;
-#elif defined(GLSLANG_ANGLE)
- profile = ECoreProfile;
- version = 450;
#endif
std::unique_ptr<TBuiltInParseables> builtInParseables(CreateBuiltInParseables(infoSink, source));
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangCompute, source,
infoSink, commonTable, symbolTables);
-#ifndef GLSLANG_ANGLE
// check for ray tracing stages
if (profile != EEsProfile && version >= 450) {
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangRayGen, source,
(profile == EEsProfile && version >= 320))
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangTask, source,
infoSink, commonTable, symbolTables);
-#endif // !GLSLANG_ANGLE
#endif // !GLSLANG_WEB
return true;
// Function to Print all builtins
void DumpBuiltinSymbolTable(TInfoSink& infoSink, const TSymbolTable& symbolTable)
{
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
infoSink.debug << "BuiltinSymbolTable {\n";
symbolTable.dump(infoSink, true);
break;
}
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
// Correct for stage type...
switch (stage) {
case EShLangGeometry:
: userInput.scanVersion(version, profile, versionNotFirstToken);
bool versionNotFound = version == 0;
if (forceDefaultVersionAndProfile && source == EShSourceGlsl) {
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
if (! (messages & EShMsgSuppressWarnings) && ! versionNotFound &&
(version != defaultVersion || profile != defaultProfile)) {
compiler->infoSink.info << "Warning, (version, profile) forced to be ("
#ifdef GLSLANG_WEB
profile = EEsProfile;
version = 310;
-#elif defined(GLSLANG_ANGLE)
- profile = ECoreProfile;
- version = 450;
#endif
bool versionWillBeError = (versionNotFound || (profile == EEsProfile && version >= 300 && versionNotFirst));
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
bool warnVersionNotFirst = false;
if (! versionWillBeError && versionNotFirstToken) {
if (messages & EShMsgRelaxedErrors)
parseContext->setLimits(*resources);
if (! goodVersion)
parseContext->addError();
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
if (warnVersionNotFirst) {
TSourceLoc loc;
loc.init();
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
// the preprocessor and outputting newlines appropriately if the source string
parseContext.infoSink.info << parseContext.getNumErrors() << " compilation errors. No code generated.\n\n";
}
-#ifndef GLSLANG_ANGLE
if (messages & EShMsgAST)
intermediate.output(parseContext.infoSink, true);
-#endif
return success;
}
};
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
// Take a single compilation unit, and run the preprocessor on it.
// Return: True if there were no issues found in preprocessing,
// False if during preprocessing any unknown version, pragmas or
&environment);
}
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
// Fill in a string with the result of preprocessing ShaderStrings
// Returns true if all extensions, pragmas and version strings were valid.
//
}
TProgram::TProgram() :
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
reflection(0),
#endif
linked(false)
TProgram::~TProgram()
{
delete infoSink;
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
delete reflection;
#endif
if (stages[stage].size() == 0)
return true;
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
int numEsShaders = 0, numNonEsShaders = 0;
for (auto it = stages[stage].begin(); it != stages[stage].end(); ++it) {
if ((*it)->intermediate->getProfile() == EEsProfile) {
#endif
intermediate[stage]->finalCheck(*infoSink, (messages & EShMsgKeepUncalled) != 0);
-#ifndef GLSLANG_ANGLE
if (messages & EShMsgAST)
intermediate[stage]->output(*infoSink, true);
-#endif
return intermediate[stage]->getNumErrors() == 0;
}
return infoSink->debug.c_str();
}
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
//
// Reflection implementation.
return ioMapper->doMap(pResolver, *infoSink);
}
-#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
+#endif // !GLSLANG_WEB
} // end namespace glslang
}
}
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
//
// Dump functions.
virtual int getNumExtensions() const { return extensions == nullptr ? 0 : (int)extensions->size(); }
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;
void dumpExtensions(TInfoSink& infoSink) const;
#endif
}
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;
#endif
virtual const TSpirvInstruction& getSpirvInstruction() const { return spirvInst; }
#endif
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
virtual void dump(TInfoSink& infoSink, bool complete = false) const override;
#endif
virtual const char** getExtensions() const override { return anonContainer.getMemberExtensions(memberNumber); }
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;
#endif
void relateToOperator(const char* name, TOperator op);
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;
#endif
TSymbolTableLevel* clone() const;
}
long long getMaxSymbolId() { return uniqueId; }
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
void dump(TInfoSink& infoSink, bool complete = false) const;
#endif
void copyTable(const TSymbolTable& copyOf);
// POSSIBILITY OF SUCH DAMAGE.
//
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
#include "localintermediate.h"
#include "../Include/InfoSink.h"
} // end namespace glslang
-#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
+#endif // !GLSLANG_WEB
// POSSIBILITY OF SUCH DAMAGE.
//
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
#include "../Include/Common.h"
#include "../Include/InfoSink.h"
} // end namespace glslang
-#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
+#endif // !GLSLANG_WEB
// POSSIBILITY OF SUCH DAMAGE.
//
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
#ifndef _IOMAPPER_INCLUDED
#define _IOMAPPER_INCLUDED
#endif // _IOMAPPER_INCLUDED
-#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
+#endif // !GLSLANG_WEB
//
void TIntermediate::merge(TInfoSink& infoSink, TIntermediate& unit)
{
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
mergeCallGraphs(infoSink, unit);
mergeModes(infoSink, unit);
mergeTrees(infoSink, unit);
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_TRUE(member) if (unit.member) member = unit.member;
//
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 writeTypeComparison = false;
bool errorReported = false;
public:
explicit TIntermediate(EShLanguage l, int v = 0, EProfile p = ENoProfile) :
language(l),
-#ifndef GLSLANG_ANGLE
profile(p), version(v),
-#endif
treeRoot(0),
resources(TBuiltInResource{}),
numEntryPoints(0), numErrors(0), numPushConstants(0), recursive(false),
void setVersion(int v)
{
-#ifndef GLSLANG_ANGLE
version = v;
-#endif
}
void setProfile(EProfile p)
{
-#ifndef GLSLANG_ANGLE
profile = p;
-#endif
}
int getVersion() const { return version; }
typedef std::list<TCall> TGraph;
TGraph callGraph;
-#ifdef GLSLANG_ANGLE
- const EProfile profile = ECoreProfile;
- const int version = 450;
-#else
EProfile profile; // source profile
int version; // source version
-#endif
SpvVersion spvVersion;
TIntermNode* treeRoot;
std::set<std::string> requestedExtensions; // cumulation of all enabled or required extensions; not connected to what subset of the shader used them
const SpvVersion& spvVersion, EShLanguage language, TInfoSink& infoSink,
bool forwardCompatible, EShMessages messages)
:
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
forwardCompatible(forwardCompatible),
profile(profile),
#endif
bool suppressWarnings() const { return true; }
bool isForwardCompatible() const { return false; }
#else
-#ifdef GLSLANG_ANGLE
- const bool forwardCompatible = true;
- const EProfile profile = ECoreProfile;
-#else
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)
-#endif
bool isEsProfile() const { return profile == EEsProfile; }
void requireProfile(const TSourceLoc& loc, int profileMask, const char* featureDesc);
void profileRequires(const TSourceLoc& loc, int profileMask, int minVersion, int numExtensions,
// POSSIBILITY OF SUCH DAMAGE.
//
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
#include "../Include/Common.h"
#include "reflection.h"
} // end namespace glslang
-#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
+#endif // !GLSLANG_WEB
// POSSIBILITY OF SUCH DAMAGE.
//
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
#ifndef _REFLECTION_INCLUDED
#define _REFLECTION_INCLUDED
#endif // _REFLECTION_INCLUDED
-#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
+#endif // !GLSLANG_WEB
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.
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
// the shaders that are to be linked together. After calling shader.parse()
TIntermediate* getIntermediate(EShLanguage stage) const { return intermediate[stage]; }
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
// Reflection Interface
// If resolver is not provided it uses the previous approach
// and respects auto assignment and offsets.
GLSLANG_EXPORT bool mapIO(TIoMapResolver* pResolver = nullptr, TIoMapper* pIoMapper = nullptr);
-#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
+#endif // !GLSLANG_WEB
protected:
GLSLANG_EXPORT bool linkStage(EShLanguage, EShMessages);
TIntermediate* intermediate[EShLangCount];
bool newedIntermediate[EShLangCount]; // track which intermediate were "new" versus reusing a singleton unit in a stage
TInfoSink* infoSink;
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
TReflection* reflection;
#endif
bool linked;
result.linkingOutput = program.getInfoLog();
result.linkingError = program.getInfoDebugLog();
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
if (success)
program.mapIO();
#endif
glslang::TProgram program;
program.addShader(&shader);
success &= program.link(controls);
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
if (success)
program.mapIO();
#endif
program.addShader(&shader);
success &= program.link(controls);
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
if (success)
program.mapIO();
#endif
glslang::TProgram program;
program.addShader(&shader);
success &= program.link(controls);
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+#if !defined(GLSLANG_WEB)
if (success)
program.mapIO();
#endif