summaryrefslogtreecommitdiffstats
path: root/source/slang/emit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/emit.cpp')
-rw-r--r--source/slang/emit.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/slang/emit.cpp b/source/slang/emit.cpp
index bf98a1b24..187ef29bc 100644
--- a/source/slang/emit.cpp
+++ b/source/slang/emit.cpp
@@ -5426,6 +5426,23 @@ struct EmitVisitor
emit("hitAttributeNV\n");
}
+ if(varDecl->findDecoration<IRGloballyCoherentDecoration>())
+ {
+ switch(getTarget(context))
+ {
+ default:
+ break;
+
+ case CodeGenTarget::HLSL:
+ emit("globallycoherent\n");
+ break;
+
+ case CodeGenTarget::GLSL:
+ emit("coherent\n");
+ break;
+ }
+ }
+
if (!layout)
return;