blob: a449ce671e1f2ad40af07effaf3ebbb2dbd047cb (
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
25
|
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk
struct S
{
int vertices[3][3];
}
//TEST_INPUT:set cs = cbuffer(data=[1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1])
ConstantBuffer<S> cs;
//TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0 0], stride=4),name=s_buf
RWStructuredBuffer<S> s_buf;
//TEST_INPUT:ubuffer(data=[0 0 0 0 0], stride=4):out,name=outputBuffer
RWStructuredBuffer<int> outputBuffer;
// CHECK: 6
[numthreads(1, 1, 1)]
void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
{
s_buf[0].vertices[1][1] = 5;
outputBuffer[0] = s_buf[0].vertices[1][1] + cs.vertices[1][0];
}
|