yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
1ea2ab1b6
master
1//TEST:SIMPLE(filecheck=CHECK): -target metal 2 3struct T 4{ 5 RWStructuredBuffer<int> buf; 6} 7 8struct U 9{ 10 ConstantBuffer<T> t; 11} 12 13struct S 14{ 15 ConstantBuffer<RWStructuredBuffer<int>> cb; 16} 17 18// CHECK-DAG: ([[# @LINE+1]]): error 56101: 19ParameterBlock<S> s1; 20 21// CHECK-DAG: ([[# @LINE+1]]): error 56101: 22ParameterBlock<U> s2; 23 24// CHECK-DAG: ([[# @LINE+1]]): error 56101: 25ParameterBlock<ConstantBuffer<RWStructuredBuffer<int>>> s3; 26 27RWStructuredBuffer<int> outputBuffer; 28 29[numthreads(1,1,1)] 30void kernelMain() 31{ 32 outputBuffer[0] = s1.cb[0] + s2.t.buf[0] + s3[0]; 33}