diff options
Diffstat (limited to 'tests/language-feature/capability/capabilitySimplification1.slang')
| -rw-r--r-- | tests/language-feature/capability/capabilitySimplification1.slang | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/language-feature/capability/capabilitySimplification1.slang b/tests/language-feature/capability/capabilitySimplification1.slang new file mode 100644 index 000000000..b694673e9 --- /dev/null +++ b/tests/language-feature/capability/capabilitySimplification1.slang @@ -0,0 +1,34 @@ +//TEST:SIMPLE(filecheck=CHECK): -target glsl -entry computeMain -stage compute -profile sm_5_0 +//TEST:SIMPLE(filecheck=CHECK_IGNORE_CAPS): -target glsl -emit-spirv-directly -entry computeMain -stage compute -profile sm_5_0 -ignore-capabilities + + +// CHECK_IGNORE_CAPS-NOT: error 36107 + +// CHECK: error 36107 +// CHECK-SAME: entrypoint 'computeMain' does not support compilation target 'glsl' with stage 'compute' +// CHECK: capabilitySimplification1.slang(21): note: see using of 'WaveMultiPrefixProduct' +// CHECK-NOT: see using of 'WaveMultiPrefixProduct' +// CHECK: {{.*}}.meta.slang({{.*}}): note: see definition of 'WaveMultiPrefixProduct' +// CHECK: {{.*}}.meta.slang({{.*}}): note: see declaration of 'require' + +void nestedSafeCall() +{ + AllMemoryBarrier(); +} + +void nestedBadCall() +{ + WaveMultiPrefixProduct(1, 0); +} + +void nestedCall() +{ + nestedSafeCall(); + nestedBadCall(); +} + +[numthreads(1,1,1)] +void computeMain() +{ + nestedCall(); +} |
