@@ -6,10 +6,18 @@ struct StorageBufferStruct
6
6
{
7
7
float4 Data;
8
8
};
9
+ struct StorageBufferStruct1
10
+ {
11
+ float4 Data;
12
+ };
13
+ struct StorageBufferStruct2
14
+ {
15
+ float4 Data;
16
+ };
9
17
10
- RWStructuredBuffer <StorageBufferStruct> RWStructBuff0 /*comment*/ :/*comment*/ register (u1)/*comment*/ ;
11
- RWStructuredBuffer <StorageBufferStruct > RWStructBuff1;
12
- RWStructuredBuffer <StorageBufferStruct > RWStructBuff2 : register (u2);
18
+ RWStructuredBuffer <StorageBufferStruct> RWStructBuff0 /*comment*/ :/*comment*/ register (u1)/*comment*/ ;
19
+ RWStructuredBuffer <StorageBufferStruct1 > RWStructBuff1;
20
+ RWStructuredBuffer <StorageBufferStruct2 > RWStructBuff2 : register (u2);
13
21
14
22
RWStructuredBuffer </*comment*/ int /*comment*/ > RWStructBuff3;
15
23
@@ -37,9 +45,9 @@ void TestLoad()
37
45
TexBuff_I.Load (Location.x);
38
46
TexBuff_U.Load (Location.x);
39
47
}
40
- StorageBufferStruct Data0 = RWStructBuff0[Location.x];
41
- StorageBufferStruct Data1 = RWStructBuff1[Location.y];
42
- StorageBufferStruct Data3 = RWStructBuff2[Location.w];
48
+ StorageBufferStruct Data0 = RWStructBuff0[Location.x];
49
+ StorageBufferStruct1 Data1 = RWStructBuff1[Location.y];
50
+ StorageBufferStruct2 Data2 = RWStructBuff2[Location.w];
43
51
44
52
int Data4 = RWStructBuff3[Location.z];
45
53
}
@@ -54,11 +62,15 @@ void TestStore(uint3 Location)
54
62
TexBuff_I[Location.x] = int2 (1 ,2 );
55
63
TexBuff_U[Location.x] = uint4 (1 ,2 ,3 ,4 );
56
64
}
57
- StorageBufferStruct Data0;
65
+ StorageBufferStruct Data0;
66
+ StorageBufferStruct1 Data1;
67
+ StorageBufferStruct2 Data2;
58
68
Data0.Data = float4 (0.0 , 1.0 , 2.0 , 3.0 );
69
+ Data1.Data = float4 (0.0 , 1.0 , 2.0 , 3.0 );
70
+ Data2.Data = float4 (0.0 , 1.0 , 2.0 , 3.0 );
59
71
RWStructBuff0[Location.x] = Data0;
60
- RWStructBuff1[Location.z] = Data0 ;
61
- RWStructBuff2[Location.y] = Data0 ;
72
+ RWStructBuff1[Location.z] = Data1 ;
73
+ RWStructBuff2[Location.y] = Data2 ;
62
74
RWStructBuff3[Location.x] = 16 ;
63
75
}
64
76
0 commit comments