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-emit.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/slang/slang-emit.cpp') diff --git a/source/slang/slang-emit.cpp b/source/slang/slang-emit.cpp index 7d8f1438d..f5b818c5d 100644 --- a/source/slang/slang-emit.cpp +++ b/source/slang/slang-emit.cpp @@ -1304,6 +1304,9 @@ Result linkAndOptimizeIR( #endif validateIRModuleIfEnabled(codeGenContext, irModule); + if (!validateStructuredBufferResourceTypes(irModule, sink, targetRequest)) + return SLANG_FAIL; + // Many of our target languages and/or downstream compilers // don't support `struct` types that have resource-type fields. // In order to work around this limitation, we will rewrite the -- cgit v1.2.3