yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
70273599e
master
1//TEST:COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type 2 3//TEST_INPUT: set outputBuffer = out ubuffer(data=[0 0 0 0], stride=4) 4RWStructuredBuffer<float> outputBuffer; 5 6[numthreads(1, 1, 1)] 7void computeMain() 8{ 9 let x = float(2); // Let variable should generate debug info 10 var y = float(3); // Var variable for comparison 11 float z = float(4); // Regular variable declaration 12 13 // Use the variables so they don't get optimized away 14 float result = x + y + z; 15 16 // CHECK: 9.0 17 outputBuffer[0] = result; 18} 19 20// This test verifies that 'let' variables now generate debug information 21// Previously, 'let' variables did not generate debug info, causing issues with debuggers