diff options
| author | Ellie Hermaszewska <ellieh@nvidia.com> | 2024-01-31 03:28:04 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-30 11:28:04 -0800 |
| commit | 2d0912bfe2de7799b32e80722fa5c8dc279a339b (patch) | |
| tree | 152bfe7c054f035090c84fabd7d9d12e9f5fc362 /source/slang/slang-ir.cpp | |
| parent | 470c5a28f5b84353f077c2d871db65cddd5f923a (diff) | |
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
Diffstat (limited to 'source/slang/slang-ir.cpp')
| -rw-r--r-- | source/slang/slang-ir.cpp | 13 |
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, |
