summaryrefslogtreecommitdiff
path: root/source/slang/slang-check-decl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-check-decl.cpp')
-rw-r--r--source/slang/slang-check-decl.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/slang/slang-check-decl.cpp b/source/slang/slang-check-decl.cpp
index a2311b186..bb762c1c6 100644
--- a/source/slang/slang-check-decl.cpp
+++ b/source/slang/slang-check-decl.cpp
@@ -267,6 +267,9 @@ namespace Slang
/// Is `decl` a global shader parameter declaration?
bool isGlobalShaderParameter(VarDeclBase* decl)
{
+ // If it's an *actual* global it is not a global shader parameter
+ if (decl->hasModifier<ActualGlobalModifier>()) { return false; }
+
// A global shader parameter must be declared at global or namespace
// scope, so that it has a single definition across the module.
//