From 77cdbb2101f4e27bf1800d4bc1077c0510668c25 Mon Sep 17 00:00:00 2001 From: Yong He Date: Mon, 30 Jan 2023 20:03:46 -0800 Subject: Add transposition logic for constructor opcodes. (#2618) * Add transposition logic for constructor opcodes. * Fix. * Add language server regression test. --------- Co-authored-by: Yong He --- source/slang/slang-ir.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source/slang/slang-ir.cpp') diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp index e72ba8c9f..2a4ae59a7 100644 --- a/source/slang/slang-ir.cpp +++ b/source/slang/slang-ir.cpp @@ -3723,6 +3723,18 @@ namespace Slang &defaultValue); } + IRInst* IRBuilder::emitMakeVectorFromScalar( + IRType* type, + IRInst* scalarValue) + { + return emitIntrinsicInst(type, kIROp_MakeVectorFromScalar, 1, &scalarValue); + } + + IRInst* IRBuilder::emitMatrixReshape(IRType* type, IRInst* inst) + { + return emitIntrinsicInst(type, kIROp_MatrixReshape, 1, &inst); + } + IRInst* IRBuilder::emitMakeVector( IRType* type, UInt argCount, -- cgit v1.2.3