summaryrefslogtreecommitdiff
path: root/source/slang/slang-check-modifier.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-check-modifier.cpp')
-rw-r--r--source/slang/slang-check-modifier.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/slang/slang-check-modifier.cpp b/source/slang/slang-check-modifier.cpp
index 96ec0acc8..1a7f64944 100644
--- a/source/slang/slang-check-modifier.cpp
+++ b/source/slang/slang-check-modifier.cpp
@@ -1125,7 +1125,11 @@ namespace Slang
if (auto decl = as<Decl>(syntaxNode))
{
- if (!isModifierAllowedOnDecl(getLinkage()->getAllowGLSLInput(), m->astNodeType, decl))
+ auto moduleDecl = getModuleDecl(decl);
+ bool isGLSLInput = getLinkage()->getAllowGLSLInput();
+ if (!isGLSLInput && moduleDecl && moduleDecl->findModifier<GLSLModuleModifier>())
+ isGLSLInput = true;
+ if (!isModifierAllowedOnDecl(isGLSLInput, m->astNodeType, decl))
{
getSink()->diagnose(m, Diagnostics::modifierNotAllowed, m);
return m;