From e4d7def727f75cee3f8fdfe6f286da2b8114b329 Mon Sep 17 00:00:00 2001 From: Yong He Date: Mon, 10 Jul 2023 12:23:07 -0700 Subject: Fix hit object emit for HLSL + FuncType specialization bug fix. (#2976) * Fix hit object emit for HLSL. * Fix a bug involving specialization of functon type. * Add a test case. --------- Co-authored-by: Yong He --- source/slang/slang-ir-link.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/slang/slang-ir-link.cpp') diff --git a/source/slang/slang-ir-link.cpp b/source/slang/slang-ir-link.cpp index 14e79560e..f57919e44 100644 --- a/source/slang/slang-ir-link.cpp +++ b/source/slang/slang-ir-link.cpp @@ -1198,10 +1198,11 @@ IRInst* cloneInst( IRInst* clonedArg = cloneValue(context, originalArg); newArgs[aa] = clonedArg; } + auto funcType = cloneType(context, originalInst->getFullType()); context->builder = oldBuilder; IRInst* clonedInst = builder->createIntrinsicInst( - cloneType(context, originalInst->getFullType()), + funcType, originalInst->getOp(), argCount, newArgs.getArrayView().getBuffer()); builder->addInst(clonedInst); -- cgit v1.2.3