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