diff options
| author | Yong He <yonghe@outlook.com> | 2023-07-10 12:23:07 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-10 12:23:07 -0700 |
| commit | e4d7def727f75cee3f8fdfe6f286da2b8114b329 (patch) | |
| tree | 197686d1c1736e3fd141b4b62bff5dc193a897c0 /source/slang/slang-lower-to-ir.cpp | |
| parent | 5569b4850dabbb7dbcb72278bb2918c281e0d475 (diff) | |
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 <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-lower-to-ir.cpp')
| -rw-r--r-- | source/slang/slang-lower-to-ir.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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<DeclLoweringVisitor, LoweredValInfo> 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<DeclLoweringVisitor, LoweredValInfo> } } - FuncDeclBaseTypeInfo info; - _lowerFuncDeclBaseTypeInfo( - subContext, - createDefaultSpecializedDeclRef(context, nullptr, decl), - info); - auto irFuncType = info.type; auto& irResultType = info.resultType; auto& parameterLists = info.parameterLists; |
