summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-ir.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-ir.cpp')
-rw-r--r--source/slang/slang-ir.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp
index 1dbb21a0d..94de28089 100644
--- a/source/slang/slang-ir.cpp
+++ b/source/slang/slang-ir.cpp
@@ -5032,6 +5032,19 @@ namespace Slang
getIntValue(getIntType(), (IRIntegerValue)mode));
}
+ IRInst* IRBuilder::addNumThreadsDecoration(IRInst* inst, Int x, Int y, Int z)
+ {
+ IRType* intType = getIntType();
+
+ IRInst* operands[3] = {
+ getIntValue(intType, x),
+ getIntValue(intType, y),
+ getIntValue(intType, z)
+ };
+
+ return addDecoration(inst, kIROp_NumThreadsDecoration, operands, 3);
+ }
+
IRInst* IRBuilder::emitSwizzle(
IRType* type,
IRInst* base,