Add semantic check for precision qualifier on wrong kind of type. Added a few more tests.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22170 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2013-06-25 21:53:59 +00:00
parent d3f85891a7
commit ef84d10e4c
4 changed files with 26 additions and 1 deletions

View file

@ -891,7 +891,8 @@ void TParseContext::precisionQualifierCheck(int line, TPublicType& publicType)
if (publicType.basicType == EbtFloat || publicType.basicType == EbtUint || publicType.basicType == EbtInt || publicType.basicType == EbtSampler) {
if (publicType.qualifier.precision == EpqNone)
error(line, "type requires declaration of default precision qualifier", TType::getBasicString(publicType.basicType), "");
}
} else if (publicType.qualifier.precision != EpqNone)
error(line, "type cannot have precision qualifier", TType::getBasicString(publicType.basicType), "");
}
void TParseContext::parameterSamplerCheck(int line, TStorageQualifier qualifier, const TType& type)