From 051ae8acec0a641bcaf86e7eeff35eff29e8922d Mon Sep 17 00:00:00 2001 From: Yong He Date: Mon, 9 Dec 2024 04:47:53 -0800 Subject: Fix crash during emitCast of attributed type, allow MaxIters to take linktime const. (#5791) * Fix crash during emitCast of attributed type. * Allow [MaxIters] to take link time constants. --------- Co-authored-by: Ellie Hermaszewska --- source/slang/slang-ir.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/slang/slang-ir.cpp') diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp index f6c662a98..29fbcc3c9 100644 --- a/source/slang/slang-ir.cpp +++ b/source/slang/slang-ir.cpp @@ -3890,6 +3890,8 @@ enum class TypeCastStyle }; static TypeCastStyle _getTypeStyleId(IRType* type) { + type = (IRType*)unwrapAttributedType(type); + if (auto vectorType = as(type)) { return _getTypeStyleId(vectorType->getElementType()); -- cgit v1.2.3