yum-mirror/slang

Making it easier to work with shaders

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

Jay KwakFix intermittent debug failures with Debug build (#7369)7dad68f86

master
1.1 KiB29 linesraw
1//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_NOT_SUPP): -entry computeMain -stage compute -target spirv
2//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_NOT_SUPP): -entry computeMain -stage compute -target glsl
3//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_NOT_SUPP): -entry computeMain -stage compute -target wgsl
4
5//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_SUPP):
6//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_SUPP): -entry computeMain -stage compute -target hlsl
7//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_SUPP): -entry computeMain -stage compute -target metal
8//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_SUPP): -entry computeMain -stage compute -target cpp
9//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_SUPP): -entry computeMain -stage compute -target cuda
10
11// Some compilation targets allow missing returns while some do not.
12// This test ensures that either errors and warnings are emitted appropriately.
13
14RWStructuredBuffer<uint> out;
15
16// CHECK_NOT_SUPP: warning 41010: non-void function
17// CHECK_NOT_SUPP: error 41009: non-void function
18
19// CHECK_SUPP: warning 41010: non-void function
20
21uint func()
22{
23}
24
25[shader("compute")]
26void computeMain()
27{
28    out[0] = func();
29}