summaryrefslogtreecommitdiff
path: root/tests/metal/nested-parameter-block-reflection.slang
diff options
context:
space:
mode:
Diffstat (limited to 'tests/metal/nested-parameter-block-reflection.slang')
-rw-r--r--tests/metal/nested-parameter-block-reflection.slang18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/metal/nested-parameter-block-reflection.slang b/tests/metal/nested-parameter-block-reflection.slang
new file mode 100644
index 000000000..8282f5573
--- /dev/null
+++ b/tests/metal/nested-parameter-block-reflection.slang
@@ -0,0 +1,18 @@
+//TEST:REFLECTION(filecheck=CHECK): -target metal
+
+// CHECK:"name": "tex",
+// CHECK:"binding": {"kind": "metalArgumentBufferElement", "index": 1}
+
+struct Data { int3 content; }
+struct Params
+{
+ ParameterBlock<Data> pdata;
+ Texture2D tex;
+}
+ParameterBlock<Params> gParams;
+RWStructuredBuffer<float4> output;
+[numthreads(1,1,1)]
+void computeMain()
+{
+ output[0] = gParams.tex.Load(gParams.pdata.content);
+} \ No newline at end of file