From 45af2467289bd39baff0269bb7de8a538f617dec Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 17 Dec 2024 22:30:22 -0800 Subject: Add verification logic on push and specialization constants. (#5887) * Add verification logic on push and specialization constants. * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> --- tests/spirv/push-constant-space.slang | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tests/spirv/push-constant-space.slang (limited to 'tests/spirv') diff --git a/tests/spirv/push-constant-space.slang b/tests/spirv/push-constant-space.slang new file mode 100644 index 000000000..847c60b7d --- /dev/null +++ b/tests/spirv/push-constant-space.slang @@ -0,0 +1,18 @@ +// Test that push constants should not occupy the default +// space. + +//TEST:SIMPLE(filecheck=CHECK): -target spirv + +// CHECK-NOT: OpDecorate {{.*}} DescriptorSet 1 + +struct Data { + StructuredBuffer data; + RWStructuredBuffer output; +}; +ParameterBlock gData; + +[numthreads(1,1,1)] +void taskMain(uniform uint a) +{ + gData.output[0] = gData.data[0].x + a; +} -- cgit v1.2.3