yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
e19e04746
master
1//TEST(compute, vulkan):COMPARE_COMPUTE_EX(filecheck-buffer=CHK):-vk -compute -shaderobj -output-using-type 2 3// This tests if the scope(::) is recognized for a local variable declaration. 4 5//TEST_INPUT: ubuffer(data=[0 0], stride=4):out,name outputBuffer 6RWStructuredBuffer<int> outputBuffer; 7 8[UnscopedEnum] 9enum Number { 10 First = 1, 11 Second, 12}; 13 14static ::Number foo = First; 15 16[numthreads(4, 1, 1)] 17void computeMain(int3 dispatchThreadID: SV_DispatchThreadID) 18{ 19 // The scope(::) should be recognized 20 static ::Number bar = Second; 21 22 //CHK:1 23 //CHK-NEXT:2 24 outputBuffer[0] = int(foo); 25 outputBuffer[1] = int(bar); 26} 27