blob: abb7b1a99141b9428ddc729ef1771fb5fb1ba088 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
//TEST:COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type
//TEST:COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type
//TEST_INPUT: set outputBuffer = out ubuffer(data=[0 0 0 0], stride=4)
RWStructuredBuffer<uint> outputBuffer;
[numthreads(1,1,1)]
void computeMain()
{
int c = 1;
let lambda = (int x, int y) => x + y + c;
let result = lambda(3, 4);
outputBuffer[0] = result; // Expecting outputBuffer[0] to be 8
// CHECK: 8
}
|