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-lower-to-ir.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source/slang/slang-lower-to-ir.cpp') diff --git a/source/slang/slang-lower-to-ir.cpp b/source/slang/slang-lower-to-ir.cpp index cf564605c..7b649ff0d 100644 --- a/source/slang/slang-lower-to-ir.cpp +++ b/source/slang/slang-lower-to-ir.cpp @@ -8577,6 +8577,12 @@ struct DeclLoweringVisitor : DeclVisitor else outerGeneric = emitOuterGenerics(subContext, decl, decl); + FuncDeclBaseTypeInfo info; + _lowerFuncDeclBaseTypeInfo( + subContext, + createDefaultSpecializedDeclRef(context, nullptr, decl), + info); + // need to create an IR function here IRFunc* irFunc = subBuilder->createFunc(); @@ -8598,12 +8604,6 @@ struct DeclLoweringVisitor : DeclVisitor } } - FuncDeclBaseTypeInfo info; - _lowerFuncDeclBaseTypeInfo( - subContext, - createDefaultSpecializedDeclRef(context, nullptr, decl), - info); - auto irFuncType = info.type; auto& irResultType = info.resultType; auto& parameterLists = info.parameterLists; -- cgit v1.2.3