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

@ -100,7 +100,7 @@ void TIntermediate::merge(TInfoSink& infoSink, TIntermediate& unit)
else if (outputPrimitive != unit.outputPrimitive)
error(infoSink, "Contradictory output layout primitives");
if (vertices == 0)
if (vertices == TQualifier::layoutNotSet)
vertices = unit.vertices;
else if (vertices != unit.vertices) {
if (language == EShLangGeometry)
@ -409,7 +409,7 @@ void TIntermediate::finalCheck(TInfoSink& infoSink)
case EShLangVertex:
break;
case EShLangTessControl:
if (vertices == 0)
if (vertices == TQualifier::layoutNotSet)
error(infoSink, "At least one shader must specify an output layout(vertices=...)");
break;
case EShLangTessEvaluation:
@ -425,7 +425,7 @@ void TIntermediate::finalCheck(TInfoSink& infoSink)
error(infoSink, "At least one shader must specify an input layout primitive");
if (outputPrimitive == ElgNone)
error(infoSink, "At least one shader must specify an output layout primitive");
if (vertices == 0)
if (vertices == TQualifier::layoutNotSet)
error(infoSink, "At least one shader must specify a layout(max_vertices = value)");
break;
case EShLangFragment: