@@ -30,7 +30,7 @@ macro_rules! write_layout {
30
30
}
31
31
32
32
/// gid is checked between `0..LAYOUT_COUNT`
33
- pub const LAYOUT_COUNT : usize = 0x40 ;
33
+ pub const LAYOUT_COUNT : usize = 0x60 ;
34
34
/// at byte offset 0x100 * N starts layout N
35
35
pub const LAYOUT_MAX_SIZE : usize = 0x100 / 0x4 ;
36
36
pub const LAYOUT_LEN : usize = LAYOUT_COUNT * LAYOUT_MAX_SIZE ;
@@ -52,10 +52,74 @@ pub fn eval_layouts(gid: u32, out: &mut [u32]) {
52
52
0xC => write_layout ! ( out, offset, UVec4 ( x, y, z, w) ) ,
53
53
0xD => write_layout ! ( out, offset, IVec4 ( x, y, z, w) ) ,
54
54
0xE => write_layout ! ( out, offset, Vec4 ( ) ) , // private members
55
+ 0xF => write_layout ! ( out, offset, Quat ( ) ) , // private members
55
56
56
57
// experiments structs
57
58
0x10 => write_layout ! ( out, offset, Struct0x10 ( a, b) ) ,
58
59
0x11 => write_layout ! ( out, offset, Struct0x11 ( a, b) ) ,
60
+ 0x12 => write_layout ! ( out, offset, Struct0x12 ( a, b, c, d, e) ) ,
61
+ 0x13 => write_layout ! ( out, offset, Struct0x13 ( a) ) ,
62
+
63
+ // mat
64
+ 0x20 => write_layout ! ( out, offset, Mat2 ( ) ) , // private members
65
+ 0x21 => write_layout ! ( out, offset, Mat3 ( x_axis, y_axis, z_axis) ) ,
66
+ 0x22 => write_layout ! ( out, offset, Mat3A ( x_axis, y_axis, z_axis) ) ,
67
+ 0x23 => write_layout ! ( out, offset, Mat4 ( x_axis, y_axis, z_axis, w_axis) ) ,
68
+ // f64
69
+ 0x24 => write_layout ! ( out, offset, f64 ( ) ) ,
70
+ 0x25 => write_layout ! ( out, offset, DVec2 ( x, y) ) ,
71
+ 0x26 => write_layout ! ( out, offset, DVec3 ( x, y, z) ) ,
72
+ 0x27 => write_layout ! ( out, offset, DVec4 ( x, y, z, w) ) ,
73
+ 0x28 => write_layout ! ( out, offset, DQuat ( x, y, z, w) ) ,
74
+ 0x29 => write_layout ! ( out, offset, DMat2 ( ) ) , // private members
75
+ 0x2a => write_layout ! ( out, offset, DMat3 ( x_axis, y_axis, z_axis) ) ,
76
+ 0x2b => write_layout ! ( out, offset, DMat4 ( x_axis, y_axis, z_axis, w_axis) ) ,
77
+
78
+ // i8
79
+ 0x30 => write_layout ! ( out, offset, i8 ( ) ) ,
80
+ 0x31 => write_layout ! ( out, offset, I8Vec2 ( x, y) ) ,
81
+ 0x32 => write_layout ! ( out, offset, I8Vec3 ( x, y, z) ) ,
82
+ 0x33 => write_layout ! ( out, offset, I8Vec4 ( x, y, z, w) ) ,
83
+ // i16
84
+ 0x34 => write_layout ! ( out, offset, i16 ( ) ) ,
85
+ 0x35 => write_layout ! ( out, offset, I16Vec2 ( x, y) ) ,
86
+ 0x36 => write_layout ! ( out, offset, I16Vec3 ( x, y, z) ) ,
87
+ 0x37 => write_layout ! ( out, offset, I16Vec4 ( x, y, z, w) ) ,
88
+ // i64
89
+ 0x38 => write_layout ! ( out, offset, i64 ( ) ) ,
90
+ 0x39 => write_layout ! ( out, offset, I64Vec2 ( x, y) ) ,
91
+ 0x3a => write_layout ! ( out, offset, I64Vec3 ( x, y, z) ) ,
92
+ 0x3b => write_layout ! ( out, offset, I64Vec4 ( x, y, z, w) ) ,
93
+
94
+ // u8
95
+ 0x40 => write_layout ! ( out, offset, u8 ( ) ) ,
96
+ 0x41 => write_layout ! ( out, offset, U8Vec2 ( x, y) ) ,
97
+ 0x42 => write_layout ! ( out, offset, U8Vec3 ( x, y, z) ) ,
98
+ 0x43 => write_layout ! ( out, offset, U8Vec4 ( x, y, z, w) ) ,
99
+ // u16
100
+ 0x44 => write_layout ! ( out, offset, u16 ( ) ) ,
101
+ 0x45 => write_layout ! ( out, offset, U16Vec2 ( x, y) ) ,
102
+ 0x46 => write_layout ! ( out, offset, U16Vec3 ( x, y, z) ) ,
103
+ 0x47 => write_layout ! ( out, offset, U16Vec4 ( x, y, z, w) ) ,
104
+ // u64
105
+ 0x48 => write_layout ! ( out, offset, u64 ( ) ) ,
106
+ 0x49 => write_layout ! ( out, offset, U64Vec2 ( x, y) ) ,
107
+ 0x4a => write_layout ! ( out, offset, U64Vec3 ( x, y, z) ) ,
108
+ 0x4b => write_layout ! ( out, offset, U64Vec4 ( x, y, z, w) ) ,
109
+ // Affine
110
+ 0x4c => write_layout ! ( out, offset, Affine2 ( matrix2, translation) ) ,
111
+ 0x4d => write_layout ! ( out, offset, Affine3A ( matrix3, translation) ) ,
112
+ 0x4e => write_layout ! ( out, offset, DAffine2 ( matrix2, translation) ) ,
113
+ 0x4f => write_layout ! ( out, offset, DAffine3 ( matrix3, translation) ) ,
114
+
115
+ // bool
116
+ 0x50 => write_layout ! ( out, offset, bool ( ) ) ,
117
+ 0x51 => write_layout ! ( out, offset, BVec2 ( x, y) ) ,
118
+ 0x52 => write_layout ! ( out, offset, BVec3 ( x, y, z) ) ,
119
+ 0x53 => write_layout ! ( out, offset, BVec3A ( ) ) , // private members
120
+ 0x54 => write_layout ! ( out, offset, BVec4 ( x, y, z, w) ) ,
121
+ 0x55 => write_layout ! ( out, offset, BVec4A ( ) ) ,
122
+
59
123
_ => { }
60
124
}
61
125
}
@@ -80,4 +144,19 @@ mod experiments {
80
144
/// * 16 (GPU): 32 size, 16 alignment, 16 b offset
81
145
pub b : f32 ,
82
146
}
147
+
148
+ #[ repr( C ) ]
149
+ pub struct Struct0x12 {
150
+ pub a : BVec3 ,
151
+ pub b : f32 ,
152
+ pub c : BVec2 ,
153
+ pub d : f32 ,
154
+ pub e : BVec4 ,
155
+ }
156
+
157
+ #[ repr( C ) ]
158
+ #[ repr( align( 16 ) ) ]
159
+ pub struct Struct0x13 {
160
+ pub a : f32 ,
161
+ }
83
162
}
0 commit comments