From 6e4b82741893be55f6216c31e19650029c667078 Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 30 Jul 2024 20:28:34 -0700 Subject: Fixes for Metal ParameterBlock support. (#4752) --- .../nested-constant-buffer-in-parameter-block.slang | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/diagnostics/nested-constant-buffer-in-parameter-block.slang (limited to 'tests/diagnostics/nested-constant-buffer-in-parameter-block.slang') 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 cb; +} + +ParameterBlock s; + +// CHECK-DAG: ([[# @LINE+1]]): error 56100: +ParameterBlock> s2; + +RWStructuredBuffer outputBuffer; + +[numthreads(1,1,1)] +void kernelMain() +{ + outputBuffer[0] = s.cb + s2; +} \ No newline at end of file -- cgit v1.2.3