summaryrefslogtreecommitdiff
path: root/tests/diagnostics
diff options
context:
space:
mode:
Diffstat (limited to 'tests/diagnostics')
-rw-r--r--tests/diagnostics/nested-constant-buffer-in-parameter-block.slang20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/diagnostics/nested-constant-buffer-in-parameter-block.slang b/tests/diagnostics/nested-constant-buffer-in-parameter-block.slang
new file mode 100644
index 000000000..eb9ecdd14
--- /dev/null
+++ b/tests/diagnostics/nested-constant-buffer-in-parameter-block.slang
@@ -0,0 +1,20 @@
+//TEST:SIMPLE(filecheck=CHECK): -target metal
+
+struct S
+{
+ // CHECK-DAG: ([[# @LINE+1]]): error 56100:
+ ConstantBuffer<int> cb;
+}
+
+ParameterBlock<S> s;
+
+// CHECK-DAG: ([[# @LINE+1]]): error 56100:
+ParameterBlock<ConstantBuffer<int>> s2;
+
+RWStructuredBuffer<int> outputBuffer;
+
+[numthreads(1,1,1)]
+void kernelMain()
+{
+ outputBuffer[0] = s.cb + s2;
+} \ No newline at end of file