From 2d0912bfe2de7799b32e80722fa5c8dc279a339b Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Wed, 31 Jan 2024 03:28:04 +0800 Subject: Correctly apply glsl local size layout to entry points during lowering (#3528) * Correctly apply glsl local size layout to entry points during lowering * Test for glsl layout correctness --- source/slang/slang-ir.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'source/slang/slang-ir.cpp') 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, -- cgit v1.2.3