Fix #1879: Check for valid variable before checking for unsized arrays.

The order of error checking was not quite being correct (maybe there is no correct
ordering, when many checks must be done and they affect each other).
So, check for block-name reuse twice.
This commit is contained in:
John Kessenich 2019-09-05 02:26:39 -06:00
parent 34953810a6
commit 664ad418f8
4 changed files with 17 additions and 7 deletions

View file

@ -1661,6 +1661,8 @@ public:
virtual bool isImage() const { return basicType == EbtSampler && getSampler().isImage(); }
virtual bool isSubpass() const { return basicType == EbtSampler && getSampler().isSubpass(); }
virtual bool isTexture() const { return basicType == EbtSampler && getSampler().isTexture(); }
// Check the block-name convention of creating a block without populating it's members:
virtual bool isUnusableName() const { return isStruct() && structure == nullptr; }
virtual bool isParameterized() const { return typeParameters != nullptr; }
#ifdef GLSLANG_WEB
bool isAtomic() const { return false; }