From 7ffb9f53e41c409a51c41318442067cc6c7e4f48 Mon Sep 17 00:00:00 2001 From: Jerran Schmidt Date: Wed, 2 Jul 2025 14:22:42 +1000 Subject: Fix for emitting ArrayStride decoration for arrays of opaque types (#7568) * WIP opaque type decoration fix * Clearer intent * Formatting * Added test for fix --- source/slang/slang-ir-util.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'source/slang/slang-ir-util.cpp') diff --git a/source/slang/slang-ir-util.cpp b/source/slang/slang-ir-util.cpp index 687841d5e..69bd2c6c2 100644 --- a/source/slang/slang-ir-util.cpp +++ b/source/slang/slang-ir-util.cpp @@ -2408,4 +2408,17 @@ bool isSignedType(IRType* type) } } +bool isIROpaqueType(IRType* type) +{ + switch (type->getOp()) + { + case kIROp_TextureType: + case kIROp_SamplerStateType: + case kIROp_SamplerComparisonStateType: + return true; + default: + return false; + } +} + } // namespace Slang -- cgit v1.2.3