blob: 2b584ad0078e7b1a9f7a5704c3657ef8f0c0b5de (
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
26
27
28
29
30
31
32
33
34
35
|
//TEST:SIMPLE(filecheck=CHECK): -target hlsl -stage compute -entry computeMain
//TEST:SIMPLE(filecheck=CHECK): -target glsl -stage compute -entry computeMain
// CHECK-NOT: {{.* }}= 0;
RWStructuredBuffer<int> outputBuffer;
struct MyStruct_base
{
int a = 1;
int b;
};
struct MyStruct : MyStruct_base
{
int c = 1;
int d;
};
MyStruct getStruct()
{
MyStruct myStruct;
return myStruct;
}
[numthreads(1, 1, 1)]
void computeMain(int3 dispatchThreadID: SV_DispatchThreadID)
{
MyStruct myStruct = getStruct();
// BUF: 1
outputBuffer[0] = true
&& myStruct.a == 1
&& myStruct.b == 0
&& myStruct.c == 1
&& myStruct.d == 0
;
}
|