diff options
| author | Yong He <yonghe@outlook.com> | 2024-12-17 22:30:22 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-17 22:30:22 -0800 |
| commit | 45af2467289bd39baff0269bb7de8a538f617dec (patch) | |
| tree | de45c041f03d0e6b8d72235edbee7b7671220c0c /tests/spirv | |
| parent | 6e24244832d9032f0993cb088af625238096b723 (diff) | |
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>
Diffstat (limited to 'tests/spirv')
| -rw-r--r-- | tests/spirv/push-constant-space.slang | 18 |
1 files changed, 18 insertions, 0 deletions
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<uint4> data; + RWStructuredBuffer<float> output; +}; +ParameterBlock<Data> gData; + +[numthreads(1,1,1)] +void taskMain(uniform uint a) +{ + gData.output[0] = gData.data[0].x + a; +} |
