GLSL front-end: Check recursively for opaque types in a block; these are all illegal.
This commit is contained in:
parent
ee21fc9081
commit
3cd0024ea8
6 changed files with 23 additions and 10 deletions
|
|
@ -1161,6 +1161,19 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
virtual bool containsOpaque() const
|
||||
{
|
||||
if (basicType == EbtSampler || basicType == EbtAtomicUint)
|
||||
return true;
|
||||
if (! structure)
|
||||
return false;
|
||||
for (unsigned int i = 0; i < structure->size(); ++i) {
|
||||
if ((*structure)[i].type->containsOpaque())
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Array editing methods. Array descriptors can be shared across
|
||||
// type instances. This allows all uses of the same array
|
||||
// to be updated at once. E.g., all nodes can be explicitly sized
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue