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