From a810aa31f5f366d69e67be96c169fec7d6041df7 Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 7 Mar 2024 17:28:19 -0800 Subject: Link-time constant and linkage API improvements. (#3708) * Link-time constant and linkage API improvements. * Fix. * Allow module name to be empty. * Fix. * Fix. * Fix compile error. --- source/slang/slang-ir.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'source/slang/slang-ir.cpp') diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp index fd5ea0fc7..696e862d6 100644 --- a/source/slang/slang-ir.cpp +++ b/source/slang/slang-ir.cpp @@ -5075,14 +5075,12 @@ namespace Slang getIntValue(getIntType(), (IRIntegerValue)mode)); } - IRInst* IRBuilder::addNumThreadsDecoration(IRInst* inst, Int x, Int y, Int z) + IRInst* IRBuilder::addNumThreadsDecoration(IRInst* inst, IRInst* x, IRInst* y, IRInst* z) { - IRType* intType = getIntType(); - IRInst* operands[3] = { - getIntValue(intType, x), - getIntValue(intType, y), - getIntValue(intType, z) + x, + y, + z }; return addDecoration(inst, kIROp_NumThreadsDecoration, operands, 3); -- cgit v1.2.3