From a766d27447aa0fcf69334c0467d9b1124892e180 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Thu, 4 Sep 2025 04:05:26 +0800 Subject: Diagnose on structured buffers containing resources (#8222) closes https://github.com/shader-slang/slang/issues/3313 --- source/slang/slang-ir.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/slang/slang-ir.cpp') diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp index ab59112f3..c63ca2bec 100644 --- a/source/slang/slang-ir.cpp +++ b/source/slang/slang-ir.cpp @@ -8781,6 +8781,15 @@ IRType* unwrapArray(IRType* type) return t; } +IRType* unwrapArrayAndPointers(IRType* type) +{ + if (const auto a = as(type)) + return unwrapArrayAndPointers(a->getElementType()); + if (const auto p = as(type)) + return unwrapArrayAndPointers(p->getValueType()); + return type; +} + // // IRTargetIntrinsicDecoration // -- cgit v1.2.3