diff options
Diffstat (limited to 'source/slang/slang-check-modifier.cpp')
| -rw-r--r-- | source/slang/slang-check-modifier.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/slang/slang-check-modifier.cpp b/source/slang/slang-check-modifier.cpp index f9ad3a02f..900f503db 100644 --- a/source/slang/slang-check-modifier.cpp +++ b/source/slang/slang-check-modifier.cpp @@ -1532,6 +1532,8 @@ bool isModifierAllowedOnDecl(bool isGLSLInput, ASTNodeType modifierType, Decl* d if (!as<VarDeclBase>(decl)) return false; return isGlobalDecl(decl) || isEffectivelyStatic(decl); + case ASTNodeType::DynModifier: + return as<InterfaceDecl>(decl) || as<VarDecl>(decl) || as<ParamDecl>(decl); default: return true; } @@ -1671,6 +1673,7 @@ Modifier* SemanticsVisitor::checkModifier( { auto moduleDecl = getModuleDecl(decl); bool isGLSLInput = getOptionSet().getBoolOption(CompilerOptionName::AllowGLSL); + if (!isGLSLInput && moduleDecl && moduleDecl->findModifier<GLSLModuleModifier>()) isGLSLInput = true; if (!isModifierAllowedOnDecl(isGLSLInput, m->astNodeType, decl)) |
