Issue an error if "uniform" or "varying" qualifiers are applied to void types.

Issue #179.
This commit is contained in:
Matt Pharr
2012-02-21 12:26:42 -08:00
parent 95224f3f11
commit 8603f9838f
7 changed files with 69 additions and 17 deletions

View File

@@ -382,24 +382,21 @@ AtomicType::GetBaseType() const {
const AtomicType *
AtomicType::GetAsVaryingType() const {
if (this == AtomicType::Void)
return this;
Assert(this != AtomicType::Void);
return typeTable[basicType][Varying][isConst ? 1 : 0];
}
const AtomicType *
AtomicType::GetAsUniformType() const {
if (this == AtomicType::Void)
return this;
Assert(this != AtomicType::Void);
return typeTable[basicType][Uniform][isConst ? 1 : 0];
}
const AtomicType *
AtomicType::GetAsUnboundVariabilityType() const {
if (this == AtomicType::Void)
return this;
Assert(this != AtomicType::Void);
return typeTable[basicType][Unbound][isConst ? 1 : 0];
}