blob: 1acfeeba7f10199aae787685a0cbd81a1f86964e (
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
36
37
38
39
40
41
42
43
44
45
|
//TEST:SIMPLE(filecheck=CHECK): -target hlsl -stage compute -entry computeMain
RWStructuredBuffer<int> outputBuffer;
//CHECK: error 30851
struct DefaultStructNoInit
{
int data0 = 2;
int data1 = 2;
};
extension DefaultStructNoInit
{
}
struct DefaultStructWithInit
{
int data0;
int data1 = 3;
int data2;
};
extension DefaultStructWithInit
{
__init()
{
data0 = 3;
data2 = 3;
}
}
[numthreads(1, 1, 1)]
void computeMain(uint3 dispatchThreadID: SV_DispatchThreadID)
{
DefaultStructNoInit noInit = DefaultStructNoInit();
DefaultStructWithInit withInit = DefaultStructWithInit();
// BUF: 1
outputBuffer[0] = true
&& noInit.data0 == 2
&& noInit.data1 == 2
&& withInit.data0 == 3
&& withInit.data1 == 3
&& withInit.data2 == 3
;
}
|