Commit a0d60f2b by John Kessenich

gcc: potentially a compiler-bug work around

parent 2505057a
...@@ -1378,6 +1378,8 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan ...@@ -1378,6 +1378,8 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
arg0 = unaryArg; arg0 = unaryArg;
} }
TString featureString;
const char* feature = nullptr;
switch (callNode.getOp()) { switch (callNode.getOp()) {
case EOpTextureGather: case EOpTextureGather:
case EOpTextureGatherOffset: case EOpTextureGatherOffset:
...@@ -1386,8 +1388,8 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan ...@@ -1386,8 +1388,8 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
// Figure out which variants are allowed by what extensions, // Figure out which variants are allowed by what extensions,
// and what arguments must be constant for which situations. // and what arguments must be constant for which situations.
TString featureString = fnCandidate.getName() + "(...)"; featureString = fnCandidate.getName() + "(...)";
const char* feature = featureString.c_str(); feature = featureString.c_str();
profileRequires(loc, EEsProfile, 310, nullptr, feature); profileRequires(loc, EEsProfile, 310, nullptr, feature);
int compArg = -1; // track which argument, if any, is the constant component argument int compArg = -1; // track which argument, if any, is the constant component argument
switch (callNode.getOp()) { switch (callNode.getOp()) {
...@@ -1443,8 +1445,8 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan ...@@ -1443,8 +1445,8 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
bias = fnCandidate.getParamCount() > 4; bias = fnCandidate.getParamCount() > 4;
if (bias) { if (bias) {
TString biasFeatureString = fnCandidate.getName() + "with bias argument"; featureString = fnCandidate.getName() + "with bias argument";
const char* feature = biasFeatureString.c_str(); feature = featureString.c_str();
profileRequires(loc, ~EEsProfile, 450, nullptr, feature); profileRequires(loc, ~EEsProfile, 450, nullptr, feature);
requireExtensions(loc, 1, &E_GL_AMD_texture_gather_bias_lod, feature); requireExtensions(loc, 1, &E_GL_AMD_texture_gather_bias_lod, feature);
} }
...@@ -1466,8 +1468,8 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan ...@@ -1466,8 +1468,8 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
bias = fnCandidate.getParamCount() > 5; bias = fnCandidate.getParamCount() > 5;
if (bias) { if (bias) {
TString featureString = fnCandidate.getName() + "with bias argument"; featureString = fnCandidate.getName() + "with bias argument";
const char* feature = featureString.c_str(); feature = featureString.c_str();
profileRequires(loc, ~EEsProfile, 450, nullptr, feature); profileRequires(loc, ~EEsProfile, 450, nullptr, feature);
requireExtensions(loc, 1, &E_GL_AMD_texture_gather_bias_lod, feature); requireExtensions(loc, 1, &E_GL_AMD_texture_gather_bias_lod, feature);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment