blob: d3bd046f0824dd0672e3ee3804cd7840eda30a75 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
//TEST(compute):COMPARE_COMPUTE: -shaderobj
//TEST(compute):COMPARE_COMPUTE: -vk -shaderobj
int test(int r)
{
struct Val
{
int a;
int b;
}
Val a;
a.a = 1;
a.b = 2;
return a.a + a.b;
}
//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer
RWStructuredBuffer<int> outputBuffer;
[numthreads(1, 1, 1)]
void computeMain(int3 dispatchThreadID: SV_DispatchThreadID)
{
outputBuffer[0] = test(dispatchThreadID.x);
}
|