Add locations to opaque types for OpenGL

This commit is contained in:
Neil Roberts 2018-03-19 20:05:40 +01:00
parent 95b1334aa2
commit 1fe4a44759
3 changed files with 4 additions and 1 deletions

View file

@ -431,7 +431,8 @@ struct TDefaultIoResolverBase : public glslang::TIoMapResolver
// no locations added if already present, a built-in variable, a block, or an opaque
if (type.getQualifier().hasLocation() || type.isBuiltIn() ||
type.getBasicType() == EbtBlock || type.containsOpaque())
type.getBasicType() == EbtBlock ||
(type.containsOpaque() && intermediate.getSpv().openGl == 0))
return -1;
// no locations on blocks of built-in variables