yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
6b63ff026
master
1//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type 2//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-output-using-type 3 4Tuple<bool, float> createTuple() { 5 return {}; 6} 7 8// We should also enable the following use of initialization list: 9 10Tuple<bool, float> createTuple2() { 11 return {false, 1.0}; 12} 13 14 15//TEST_INPUT: set output = out ubuffer(data=[0 0 0 0], stride=4) 16RWStructuredBuffer<float> output; 17 18[numthreads(1, 1, 1)] 19void computeMain() 20{ 21 let hit = createTuple(); 22 output[0] = hit._1 + 1.0; 23 24 let hit2 = createTuple2(); 25 output[1] = hit2._1 + 1.0; 26 // CHECK: 1.0 27 // CHECK: 2.0 28}