yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
9ec6b9168
master
1//DISABLE_TEST:SIMPLE(filecheck=CHECK): -target hlsl -stage compute -entry computeMain 2//DISABLE_TEST:SIMPLE(filecheck=CHECK): -target glsl -stage compute -entry computeMain 3 4// CHECK-NOT: {{.* }}= 0; 5 6RWStructuredBuffer<int> outputBuffer; 7 8struct MyStruct_base 9{ 10 int a; 11}; 12struct MyStruct : MyStruct_base 13{ 14 int b; 15 int c; 16}; 17MyStruct getStruct() 18{ 19 MyStruct myStruct; 20 return myStruct; 21} 22[numthreads(1, 1, 1)] 23void computeMain(int3 dispatchThreadID: SV_DispatchThreadID) 24{ 25 MyStruct myStruct = getStruct(); 26 27// BUF: 1 28 outputBuffer[0] = true 29 && myStruct.a == 0 30 && myStruct.b == 0 31 && myStruct.c == 0 32 ; 33}