overloadF(1, 1); // ERROR
overloadF(1);
}
+
+varying vec4 gl_TexCoord[35]; // ERROR, size too big
layout(location = 10) out S cs[2]; // 10 through 10 + 2 * 22 - 1 = 53\r
layout(location = 54) out float cf;\r
layout(location = 53) out float cg; // ERROR, collision at 31\r
+\r
+float gl_ClipDistance[17]; // ERROR, size too big
\ No newline at end of file
ERROR: 0:108: 'overloadE' : no matching overloaded function found \r
ERROR: 0:111: 'overloadE' : no matching overloaded function found \r
ERROR: 0:117: 'overloadF' : no matching overloaded function found \r
-ERROR: 44 compilation errors. No code generated.\r
+ERROR: 0:121: 'gl_TexCoord array size' : must be less than gl_MaxTextureCoords (32)\r
+ERROR: 45 compilation errors. No code generated.\r
\r
\r
ERROR: node is still EOpNull!\r
0:? 3.400000\r
0:? 'concall' (const float)\r
0:? 0.295520\r
+0:? 'gl_TexCoord' (smooth out 35-element array of 4-component vector of float)\r
+0:? 'gl_TexCoord' (smooth out 35-element array of 4-component vector of float)\r
\r
\r
Linked vertex stage:\r
ERROR: 0:30: '' : cannot use layout qualifiers on a function parameter \r
ERROR: 0:31: '' : cannot use auxiliary or interpolation qualifiers on a function parameter \r
ERROR: 0:42: 'location' : repeated use of location 53\r
-ERROR: 12 compilation errors. No code generated.\r
+ERROR: 0:44: 'gl_ClipDistance array size' : must be less than gl_MaxClipDistances (8)\r
+ERROR: 13 compilation errors. No code generated.\r
\r
\r
ERROR: node is still EOpNull!\r
0:16 Sequence\r
0:16 move second child to first child (float)\r
0:16 direct index (float)\r
-0:16 gl_ClipDistance: direct index for structure (unsized array of float)\r
+0:16 gl_ClipDistance: direct index for structure (17-element array of float)\r
0:16 '__anon__0' (out block{gl_ClipDistance})\r
0:16 Constant:\r
0:16 0 (const uint)\r
Current functionality level: ESSL 3.0
-- create version system
++ create version system
Link Validation
+ provide input config file for setting limits
- number of input/output compononents
- tessellation limits
- tessellation primitive array sizing consistency
- - Non ES: gl_TexCoord can only have a max array size of up to gl_MaxTextureCoords
+ + Non ES: gl_TexCoord can only have a max array size of up to gl_MaxTextureCoords
+ + Non ES: gl_ClipDistance ...
- ...
+ exactly one main
+ ES 3.0: fragment outputs all have locations, if more than one
- ES 3.0: location aliasing/overlap (except desktop vertex shader inputs)
- Non ES: binding overlap
- - location overlap
+ + location overlap
+ Non ES: geometry shader input array sizes and input layout qualifier declaration
+ Non ES: read or write to both gl_ClipVertex and gl_ClipDistance
+ Non ES: write to only one of gl_FragColor, gl_FragData, or user-declared
// source have to figure out how to create revision.h just to get a build\r
// going. However, if it is not updated, it can be a version behind.\r
\r
-#define GLSLANG_REVISION "24391"\r
-#define GLSLANG_DATE "2013/12/06 11:24:47"\r
+#define GLSLANG_REVISION "24396"\r
+#define GLSLANG_DATE "2013/12/06 14:45:15"\r
//
// See if this version/profile allows use of the line-continuation character '\'.
//
+// Returns true if a line continuation should be done.
+//
bool TParseContext::lineContinuationCheck(TSourceLoc loc, bool endOfComment)
{
const char* message = "line continuation";
profileRequires(loc, EEsProfile, 300, 0, message);
profileRequires(loc, ECoreProfile | ECompatibilityProfile, 420, 0, message);
}
+
+ return lineContinuationAllowed;
}
bool TParseContext::builtInName(const TString& identifier)
return;
}
+ if (identifier.compare("gl_TexCoord") == 0)
+ limitCheck(loc, type.getArraySize(), "gl_MaxTextureCoords", "gl_TexCoord array size");
+ else if (identifier.compare("gl_ClipDistance") == 0)
+ limitCheck(loc, type.getArraySize(), "gl_MaxClipDistances", "gl_ClipDistance array size");
+
newType.shareArraySizes(type);
if (language == EShLangGeometry && type.getQualifier().storage == EvqVaryingIn)
inductiveLoopBodyCheck(loop->getBody(), loopIndex, symbolTable);
}
+// See if the provide value is less than the symbol indicated by limit,
+// which should be a constant in the symbol table.
+void TParseContext::limitCheck(TSourceLoc loc, int value, const char* limit, const char* feature)
+{
+ TSymbol* symbol = symbolTable.find(limit);
+ assert(symbol->getAsVariable());
+ const TConstUnionArray& constArray = symbol->getAsVariable()->getConstArray();
+ assert(! constArray.empty());
+ if (value >= constArray[0].getIConst())
+ error(loc, "must be less than", feature, "%s (%d)", limit, constArray[0].getIConst());
+}
+
//
// Do any additional error checking, etc., once we know the parsing is done.
//
void opaqueCheck(TSourceLoc, const TType&, const char* op);
void structTypeCheck(TSourceLoc, TPublicType&);
void inductiveLoopCheck(TSourceLoc, TIntermNode* init, TIntermLoop* loop);
+ void limitCheck(TSourceLoc, int value, const char* limit, const char* feature);
+
void inductiveLoopBodyCheck(TIntermNode*, int loopIndexId, TSymbolTable&);
void constantIndexExpressionCheck(TIntermNode*);