summaryrefslogtreecommitdiff
path: root/source/slang/slang-emit.cpp
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2025-09-04 04:05:26 +0800
committerGitHub <noreply@github.com>2025-09-03 20:05:26 +0000
commita766d27447aa0fcf69334c0467d9b1124892e180 (patch)
tree67ca5615e4a8c94d7454ee43375eeffc8c8a7d4c /source/slang/slang-emit.cpp
parentbf607e2f3fa183e9a2b18c7a98438a05247d6ed3 (diff)
Diagnose on structured buffers containing resources (#8222)
closes https://github.com/shader-slang/slang/issues/3313
Diffstat (limited to 'source/slang/slang-emit.cpp')
-rw-r--r--source/slang/slang-emit.cpp3
1 files changed, 3 insertions, 0 deletions
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