summaryrefslogtreecommitdiff
path: root/source/slang/slang-emit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-emit.cpp')
-rw-r--r--source/slang/slang-emit.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/slang/slang-emit.cpp b/source/slang/slang-emit.cpp
index ea209b598..cf4070df4 100644
--- a/source/slang/slang-emit.cpp
+++ b/source/slang/slang-emit.cpp
@@ -1320,6 +1320,14 @@ Result linkAndOptimizeIR(
byteAddressBufferOptions);
}
+ // For SPIR-V, this function is called elsewhere, so that it can happen after address space
+ // specialization
+ if (target != CodeGenTarget::SPIRV && target != CodeGenTarget::SPIRVAssembly)
+ {
+ bool skipFuncParamValidation = true;
+ validateAtomicOperations(skipFuncParamValidation, sink, irModule->getModuleInst());
+ }
+
// For CUDA targets only, we will need to turn operations
// the implicitly reference the "active mask" into ones
// that use (and pass around) an explicit mask instead.