Semantics: Geometry stage can support max_vertices = 0.

To do this, more generally use a named -1 as a not set value.
This commit is contained in:
John Kessenich 2015-12-11 15:44:12 -07:00
parent 3c24a06c8c
commit 494a02a2b0
18 changed files with 93 additions and 36 deletions

View file

@ -126,7 +126,7 @@ class TIntermediate {
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(0), inputPrimitive(ElgNone), outputPrimitive(ElgNone), pixelCenterInteger(false), originUpperLeft(false),
invocations(0), 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;
@ -212,7 +212,7 @@ public:
int getInvocations() const { return invocations; }
bool setVertices(int m)
{
if (vertices > 0)
if (vertices != TQualifier::layoutNotSet)
return vertices == m;
vertices = m;
return true;