From 8c6e02bd094bbc0c9afb141265be9675f99ddb61 Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 17 Jun 2020 22:41:56 -0700 Subject: Dynamic dipatch non-static functions. --- source/slang/slang-ir.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'source/slang/slang-ir.cpp') diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp index 34ea23b85..77011b569 100644 --- a/source/slang/slang-ir.cpp +++ b/source/slang/slang-ir.cpp @@ -3083,6 +3083,20 @@ namespace Slang return inst; } + IRInst* IRBuilder::emitGetAddress( + IRType* type, + IRInst* value) + { + auto inst = createInst( + this, + kIROp_getAddr, + type, + value); + + addInst(inst); + return inst; + } + IRInst* IRBuilder::emitSwizzle( IRType* type, IRInst* base, -- cgit v1.2.3