Skip to content

Commit ba7ddce

Browse files
test: remove elements' u8 in vertex_format byte slices
1 parent 894d036 commit ba7ddce

1 file changed

Lines changed: 44 additions & 50 deletions

File tree

  • tests/gpu-tests/vertex_formats

tests/gpu-tests/vertex_formats/mod.rs

Lines changed: 44 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -94,16 +94,14 @@ async fn vertex_formats_all(ctx: TestingContext) {
9494
entry_point: "vertex_block_0",
9595
attributes: attributes_block_0,
9696
input: &[
97-
128u8, 128u8, 128u8, 128u8, // Unorm8x4 (0.5, 0.5, 0.5, 0.5)
98-
0u8, 128u8, 0u8, 128u8, // Unorm16x2 (0.5, 0.5)
99-
0u8, 64u8, 0u8, 64u8, 0u8, 64u8, 0u8,
100-
64u8, // Unorm16x4 (0.25, 0.25, 0.25, 0.25)
101-
127u8, 127u8, 127u8, 127u8, // Snorm8x4 (1, 1, 1, 1)
102-
0u8, 128u8, 0u8, 128u8, // Snorm16x2 (-1, -1)
103-
255u8, 127u8, 255u8, 127u8, 255u8, 127u8, 255u8,
104-
127u8, // Snorm16x4 (1, 1, 1, 1)
105-
255u8, 255u8, // Unorm8x2 (1, 1)
106-
128u8, 128u8, // Snorm8x2 (-1, -1)
97+
128, 128, 128, 128, // Unorm8x4 (0.5, 0.5, 0.5, 0.5)
98+
0, 128, 0, 128, // Unorm16x2 (0.5, 0.5)
99+
0, 64, 0, 64, 0, 64, 0, 64, // Unorm16x4 (0.25, 0.25, 0.25, 0.25)
100+
127, 127, 127, 127, // Snorm8x4 (1, 1, 1, 1)
101+
0, 128, 0, 128, // Snorm16x2 (-1, -1)
102+
255, 127, 255, 127, 255, 127, 255, 127, // Snorm16x4 (1, 1, 1, 1)
103+
255, 255, // Unorm8x2 (1, 1)
104+
128, 128, // Snorm8x2 (-1, -1)
107105
],
108106
checksums: &[0.0, 0.0, 6.0, 4.0, 0.0, 0.0],
109107
},
@@ -112,15 +110,14 @@ async fn vertex_formats_all(ctx: TestingContext) {
112110
entry_point: "vertex_block_1",
113111
attributes: attributes_block_1,
114112
input: &[
115-
4u8, 8u8, 16u8, 32u8, // Uint8x4 (4, 8, 16, 32)
116-
64u8, 0u8, 128u8, 0u8, // Uint16x2 (64, 128)
117-
0u8, 1u8, 0u8, 2u8, 0u8, 4u8, 0u8, 8u8, // Uint16x4 (256, 512, 1024, 2048)
118-
127u8, 127u8, 2u8, 0u8, // Sint8x4 (127, 127, 2, 0)
119-
255u8, 255u8, 1u8, 0u8, // Sint16x2 (-1, 1)
120-
128u8, 255u8, 128u8, 255u8, 0u8, 1u8, 240u8,
121-
255u8, // Sint16x4 (-128, -128, 256, -16)
122-
1u8, 2u8, // Uint8x2 (1, 2)
123-
128u8, 128u8, // Sint8x2 (-128, -128)
113+
4, 8, 16, 32, // Uint8x4 (4, 8, 16, 32)
114+
64, 0, 128, 0, // Uint16x2 (64, 128)
115+
0, 1, 0, 2, 0, 4, 0, 8, // Uint16x4 (256, 512, 1024, 2048)
116+
127, 127, 2, 0, // Sint8x4 (127, 127, 2, 0)
117+
255, 255, 1, 0, // Sint16x2 (-1, 1)
118+
128, 255, 128, 255, 0, 1, 240, 255, // Sint16x4 (-128, -128, 256, -16)
119+
1, 2, // Uint8x2 (1, 2)
120+
128, 128, // Sint8x2 (-128, -128)
124121
],
125122
checksums: &[4095.0, -16.0, 0.0, 0.0, 0.0, 0.0],
126123
},
@@ -129,12 +126,11 @@ async fn vertex_formats_all(ctx: TestingContext) {
129126
entry_point: "vertex_block_2",
130127
attributes: attributes_block_2,
131128
input: &[
132-
1u8, 0u8, 0u8, 0u8, // Uint32x2 (1)
133-
2u8, 0u8, 0u8, 0u8, 4u8, 0u8, 0u8, 0u8, // Uint32x2 (2, 4)
134-
8u8, 0u8, 0u8, 0u8, 16u8, 0u8, 0u8, 0u8, 32u8, 0u8, 0u8,
135-
0u8, // Uint32x3 (8, 16, 32)
136-
64u8, 0u8, 0u8, 0u8, 128u8, 0u8, 0u8, 0u8, 0u8, 1u8, 0u8, 0u8, 0u8, 2u8, 0u8,
137-
0u8, // Uint32x4 (64, 128, 256, 512)
129+
1, 0, 0, 0, // Uint32x2 (1)
130+
2, 0, 0, 0, 4, 0, 0, 0, // Uint32x2 (2, 4)
131+
8, 0, 0, 0, 16, 0, 0, 0, 32, 0, 0, 0, // Uint32x3 (8, 16, 32)
132+
64, 0, 0, 0, 128, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0,
133+
0, // Uint32x4 (64, 128, 256, 512)
138134
],
139135
checksums: &[1023.0, 0.0, 0.0, 0.0, 0.0, 0.0],
140136
},
@@ -143,12 +139,11 @@ async fn vertex_formats_all(ctx: TestingContext) {
143139
entry_point: "vertex_block_3",
144140
attributes: attributes_block_3,
145141
input: &[
146-
128u8, 255u8, 255u8, 255u8, // Sint32 (-128)
147-
120u8, 0u8, 0u8, 0u8, 8u8, 0u8, 0u8, 0u8, // Sint32x2 (120, 8)
148-
252u8, 255u8, 255u8, 255u8, 2u8, 0u8, 0u8, 0u8, 2u8, 0u8, 0u8,
149-
0u8, // Sint32x3 (-4, 2, 2)
150-
24u8, 252u8, 255u8, 255u8, 88u8, 2u8, 0u8, 0u8, 44u8, 1u8, 0u8, 0u8, 99u8, 0u8,
151-
0u8, 0u8, // Sint32x4 (-1000, 600, 300, 99)
142+
128, 255, 255, 255, // Sint32 (-128)
143+
120, 0, 0, 0, 8, 0, 0, 0, // Sint32x2 (120, 8)
144+
252, 255, 255, 255, 2, 0, 0, 0, 2, 0, 0, 0, // Sint32x3 (-4, 2, 2)
145+
24, 252, 255, 255, 88, 2, 0, 0, 44, 1, 0, 0, 99, 0, 0,
146+
0, // Sint32x4 (-1000, 600, 300, 99)
152147
],
153148
checksums: &[0.0, -1.0, 0.0, 0.0, 0.0, 0.0],
154149
},
@@ -157,16 +152,15 @@ async fn vertex_formats_all(ctx: TestingContext) {
157152
entry_point: "vertex_block_4",
158153
attributes: attributes_block_4,
159154
input: &[
160-
0u8, 0u8, 0u8, 63u8, // Float32 (0.5)
161-
0u8, 0u8, 0u8, 191u8, 0u8, 0u8, 128u8, 64u8, // Float32x2 (-0.5, 4.0)
162-
0u8, 0u8, 0u8, 192u8, 0u8, 0u8, 204u8, 194u8, 0u8, 0u8, 200u8,
163-
66u8, // Float32x3 (-2.0, -102.0, 100.0)
164-
0u8, 0u8, 92u8, 66u8, 0u8, 0u8, 72u8, 194u8, 0u8, 0u8, 32u8, 65u8, 0u8, 0u8, 128u8,
165-
63u8, // Float32x4 (55.0, -50.0, 10.0, 1.0)
166-
0u8, 68u8, // Float16 (4.0)
167-
0u8, 60u8, 72u8, 53u8, // Float16x2 (1.0, 0.33)
168-
72u8, 57u8, 0u8, 192u8, 0u8, 188u8, 0u8,
169-
184u8, // Float16x4 (0.66, -2.0, -1.0, -0.5)
155+
0, 0, 0, 63, // Float32 (0.5)
156+
0, 0, 0, 191, 0, 0, 128, 64, // Float32x2 (-0.5, 4.0)
157+
0, 0, 0, 192, 0, 0, 204, 194, 0, 0, 200,
158+
66, // Float32x3 (-2.0, -102.0, 100.0)
159+
0, 0, 92, 66, 0, 0, 72, 194, 0, 0, 32, 65, 0, 0, 128,
160+
63, // Float32x4 (55.0, -50.0, 10.0, 1.0)
161+
0, 68, // Float16 (4.0)
162+
0, 60, 72, 53, // Float16x2 (1.0, 0.33)
163+
72, 57, 0, 192, 0, 188, 0, 184, // Float16x4 (0.66, -2.0, -1.0, -0.5)
170164
],
171165
checksums: &[0.0, 0.0, 0.0, 0.0, 2.5, 16.0],
172166
},
@@ -175,14 +169,14 @@ async fn vertex_formats_all(ctx: TestingContext) {
175169
entry_point: "vertex_block_6",
176170
attributes: attributes_block_6,
177171
input: &[
178-
1u8, 2u8, // Uint16 (513)
179-
1u8, 2u8, // Sint16 (513)
180-
0u8, 64u8, // Unorm16 (0.25)
181-
0u8, 64u8, // Snorm16 (0.5)
182-
32u8, // Uint8 (32)
183-
255u8, // Sint8 (-1)
184-
128u8, // Unorm8 (0.5)
185-
128u8, // Snorm8 (-1)
172+
1, 2, // Uint16 (513)
173+
1, 2, // Sint16 (513)
174+
0, 64, // Unorm16 (0.25)
175+
0, 64, // Snorm16 (0.5)
176+
32, // Uint8 (32)
177+
255, // Sint8 (-1)
178+
128, // Unorm8 (0.5)
179+
128, // Snorm8 (-1)
186180
],
187181
checksums: &[513.0 + 32.0, 513.0 - 1.0, 0.25 + 0.5, 0.5 - 1.0, 0.0, 0.0],
188182
},
@@ -191,7 +185,7 @@ async fn vertex_formats_all(ctx: TestingContext) {
191185
entry_point: "vertex_block_7",
192186
attributes: attributes_block_7,
193187
input: &[
194-
128u8, 85u8, 170u8, 64u8, // Unorm8x4Bgra (0.67, 0.33, 0.5, 0.25)
188+
128, 85, 170, 64, // Unorm8x4Bgra (0.67, 0.33, 0.5, 0.25)
195189
],
196190
checksums: &[0.0, 0.0, 1.75, 0.0, 0.0, 0.0],
197191
},

0 commit comments

Comments
 (0)