yum-mirror/slang

Making it easier to work with shaders

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

Gangzheng TongAdd check for the variable requirement (#6677)da5cf478c

master
396 B19 linesraw
1//TEST:SIMPLE(filecheck=CHECK):-target spirv
2[require(hlsl)]
3struct MyType
4{}
5
6//CHECK: ([[# @LINE+2]]): error 36107
7[numthreads(1,1,1)]
8void f1()
9{
10    MyType t;  // compile to spirv should result error here.
11}
12
13ConstantBuffer<MyType> t2;
14//CHECK: ([[# @LINE+2]]): error 36107
15[numthreads(1,1,1)]
16void f2()  // compile to spirv should result error here.
17{
18    ConstantBuffer<MyType> t3 = t2; 
19}