Semantics: 'invocations' defaults to 1, not 0.

'invocations' was using 0 as the "shader never set" flag and as the
default. Formalize this and explicit set to 1 and link time.
This commit is contained in:
John Kessenich 2015-12-13 10:59:17 -07:00
parent 04bb8a01d6
commit 61d9fb9048
13 changed files with 34 additions and 26 deletions

View file

@ -126,7 +126,8 @@ 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(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;
@ -204,7 +205,7 @@ public:
bool setInvocations(int i)
{
if (invocations > 0)
if (invocations != TQualifier::layoutNotSet)
return invocations == i;
invocations = i;
return true;