yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

ArielG-NVError if super-type capabilities are a super-set of sub-type (#7452)07f21ee31

master
687 B28 linesraw
1//TEST:SIMPLE(filecheck=CHECK): -target glsl -entry computeMain -stage compute -profile sm_5_0
2//TEST:SIMPLE(filecheck=CHECK_IGNORE_CAPS): -target glsl -emit-spirv-directly -entry computeMain -stage compute  -profile sm_5_0 -ignore-capabilities
3
4// CHECK_IGNORE_CAPS-NOT: error 36107
5
6[numthreads(1, 1, 1)]
7// CHECK: ([[# @LINE+1]]): error 36107: {{.*}}computeMain{{.*}}compute{{.*}}glsl
8void computeMain()
9{
10    nestedCall();
11}
12
13void nestedCall()
14{
15    nestedSafeCall();
16    nestedBadCall();
17}
18
19void nestedSafeCall()
20{
21    AllMemoryBarrier();
22}
23
24void nestedBadCall()
25{
26    // CHECK: ([[# @LINE+1]]): note: see using of 'WaveMultiPrefixCountBits'
27    WaveMultiPrefixCountBits(true, 0);
28}