A bunch of semantic checks were missing for binary arithmetic operations. Refactor the "promote" logic to fix these.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21784 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2013-05-30 19:15:35 +00:00
parent 0f359f0e35
commit 69762564de
5 changed files with 154 additions and 122 deletions

View file

@ -416,7 +416,7 @@ bool TParseContext::constErrorCheck(TIntermTyped* node)
//
bool TParseContext::integerErrorCheck(TIntermTyped* node, const char* token)
{
if ((node->getBasicType() == EbtInt || node->getBasicType() == EbtUint) && node->getVectorSize() == 1 && ! node->isArray())
if ((node->getBasicType() == EbtInt || node->getBasicType() == EbtUint) && node->isScalar() && ! node->isArray())
return false;
error(node->getLine(), "scalar integer expression required", token, "");