Shader version: 410
-invocations = 0
+invocations = -1
max_vertices = -1
input primitive = none
output primitive = none
ERROR: Linking geometry stage: At least one shader must specify a layout(max_vertices = value)
Shader version: 410
-invocations = 0
+invocations = 1
max_vertices = -1
input primitive = none
output primitive = none
Shader version: 420
-invocations = 0
+invocations = -1
max_vertices = -1
input primitive = triangles
output primitive = none
ERROR: Linking geometry stage: At least one shader must specify a layout(max_vertices = value)
Shader version: 420
-invocations = 0
+invocations = 1
max_vertices = -1
input primitive = triangles
output primitive = none
Shader version: 420
-invocations = 0
+invocations = -1
max_vertices = -1
input primitive = triangles
output primitive = none
ERROR: Linking geometry stage: At least one shader must specify a layout(max_vertices = value)
Shader version: 420
-invocations = 0
+invocations = 1
max_vertices = -1
input primitive = triangles
output primitive = none
Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
Shader version: 450
-invocations = 0
+invocations = -1
max_vertices = -1
input primitive = none
output primitive = none
ERROR: Linking geometry stage: At least one shader must specify a layout(max_vertices = value)
Shader version: 450
-invocations = 0
+invocations = 1
max_vertices = -1
input primitive = none
output primitive = none
Shader version: 150
-invocations = 0
+invocations = -1
max_vertices = -1
input primitive = none
output primitive = points
noMain2.geom
Shader version: 150
-invocations = 0
+invocations = -1
max_vertices = -1
input primitive = none
output primitive = line_strip
main(
Shader version: 150
-invocations = 0
+invocations = 1
max_vertices = -1
input primitive = none
output primitive = points
max_vertices_0.geom
Shader version: 330
-invocations = 0
+invocations = -1
max_vertices = 0
input primitive = points
output primitive = triangle_strip
Shader version: 330
-invocations = 0
+invocations = 1
max_vertices = 0
input primitive = points
output primitive = triangle_strip
MemoryModel Logical GLSL450
EntryPoint Geometry 4 "main" 18 70 10 29 33
ExecutionMode 4 InputTrianglesAdjacency
- ExecutionMode 4 Invocations 0
+ ExecutionMode 4 Invocations 1
ExecutionMode 4 OutputTriangleStrip
ExecutionMode 4 OutputVertices 30
Source GLSL 150
MemoryModel Logical GLSL450
EntryPoint Geometry 4 "main" 20 13
ExecutionMode 4 Triangles
- ExecutionMode 4 Invocations 0
+ ExecutionMode 4 Invocations 1
ExecutionMode 4 OutputTriangleStrip
ExecutionMode 4 OutputVertices 3
Source GLSL 330
TLayoutGeometry geometry; // geometry/tessellation shader in/out primitives
bool pixelCenterInteger; // fragment shader
bool originUpperLeft; // fragment shader
- int invocations; // 0 means no declaration
+ int invocations;
int vertices; // both for tessellation "vertices" and geometry "max_vertices"
TVertexSpacing spacing;
TVertexOrder order;
geometry = ElgNone;
originUpperLeft = false;
pixelCenterInteger = false;
- invocations = 0; // 0 means no declaration
+ invocations = TQualifier::layoutNotSet;
vertices = TQualifier::layoutNotSet;
spacing = EvsNone;
order = EvoNone;
pixelCenterInteger = src.pixelCenterInteger;
if (src.originUpperLeft)
originUpperLeft = src.originUpperLeft;
- if (src.invocations != 0)
+ if (src.invocations != TQualifier::layoutNotSet)
invocations = src.invocations;
if (src.vertices != TQualifier::layoutNotSet)
vertices = src.vertices;
// For the version, it uses the latest git tag followed by the number of commits.
// For the date, it uses the current date (when then script is run).
-#define GLSLANG_REVISION "SPIRV99.841"
-#define GLSLANG_DATE "12-Dec-2015"
+#define GLSLANG_REVISION "SPIRV99.842"
+#define GLSLANG_DATE "13-Dec-2015"
case EShLangGeometry:
if (id == "invocations") {
profileRequires(loc, ECompatibilityProfile | ECoreProfile, 400, nullptr, "invocations");
- publicType.shaderQualifiers.invocations = value;
+ if (value == 0)
+ error(loc, "must be at least 1", "invocations", "");
+ else
+ publicType.shaderQualifiers.invocations = value;
return;
}
if (id == "max_vertices") {
if (shaderQualifiers.geometry != ElgNone)
error(loc, message, TQualifier::getGeometryString(shaderQualifiers.geometry), "");
- if (shaderQualifiers.invocations > 0)
+ if (shaderQualifiers.invocations != TQualifier::layoutNotSet)
error(loc, message, "invocations", "");
if (shaderQualifiers.vertices != TQualifier::layoutNotSet) {
if (language == EShLangGeometry)
if (language == EShLangTessControl)
checkIoArraysConsistency(loc);
}
- if (publicType.shaderQualifiers.invocations) {
+ if (publicType.shaderQualifiers.invocations != TQualifier::layoutNotSet) {
if (publicType.qualifier.storage != EvqVaryingIn)
error(loc, "can only apply to 'in'", "invocations", "");
if (! intermediate.setInvocations(publicType.shaderQualifiers.invocations))
// overlap/alias/missing I/O, etc.
inOutLocationCheck(infoSink);
+ // invocations
+ if (invocations == TQualifier::layoutNotSet)
+ invocations = 1;
+
if (inIoAccessed("gl_ClipDistance") && inIoAccessed("gl_ClipVertex"))
error(infoSink, "Can only use one of gl_ClipDistance or gl_ClipVertex (gl_ClipDistance is preferred)");
if (profile == EEsProfile) {
if (numFragOut > 1 && fragOutWithNoLocation)
error(infoSink, "when more than one fragment shader output, all must have location qualifiers");
- }
+ }
}
TIntermSequence& TIntermediate::findLinkerObjects() const
public:
explicit TIntermediate(EShLanguage l, int v = 0, EProfile p = ENoProfile) : language(l), treeRoot(0), profile(p), version(v), spv(0),
numMains(0), numErrors(0), recursive(false),
- invocations(0), vertices(TQualifier::layoutNotSet), inputPrimitive(ElgNone), outputPrimitive(ElgNone), pixelCenterInteger(false), originUpperLeft(false),
+ invocations(TQualifier::layoutNotSet), vertices(TQualifier::layoutNotSet), inputPrimitive(ElgNone), outputPrimitive(ElgNone),
+ pixelCenterInteger(false), originUpperLeft(false),
vertexSpacing(EvsNone), vertexOrder(EvoNone), pointMode(false), earlyFragmentTests(false), depthLayout(EldNone), depthReplacing(false), blendEquations(0), xfbMode(false)
{
localSize[0] = 1;
bool setInvocations(int i)
{
- if (invocations > 0)
+ if (invocations != TQualifier::layoutNotSet)
return invocations == i;
invocations = i;
return true;