Skip to content

Commit

Permalink
test: remove elements' u8 in vertex_format byte slices
Browse files Browse the repository at this point in the history
  • Loading branch information
ErichDonGubler committed Jan 22, 2025
1 parent 3dd925b commit c536ad0
Showing 1 changed file with 44 additions and 50 deletions.
94 changes: 44 additions & 50 deletions tests/tests/vertex_formats/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,14 @@ async fn vertex_formats_all(ctx: TestingContext) {
entry_point: "vertex_block_0",
attributes: attributes_block_0,
input: &[
128u8, 128u8, 128u8, 128u8, // Unorm8x4 (0.5, 0.5, 0.5, 0.5)
0u8, 128u8, 0u8, 128u8, // Unorm16x2 (0.5, 0.5)
0u8, 64u8, 0u8, 64u8, 0u8, 64u8, 0u8,
64u8, // Unorm16x4 (0.25, 0.25, 0.25, 0.25)
127u8, 127u8, 127u8, 127u8, // Snorm8x4 (1, 1, 1, 1)
0u8, 128u8, 0u8, 128u8, // Snorm16x2 (-1, -1)
255u8, 127u8, 255u8, 127u8, 255u8, 127u8, 255u8,
127u8, // Snorm16x4 (1, 1, 1, 1)
255u8, 255u8, // Unorm8x2 (1, 1)
128u8, 128u8, // Snorm8x2 (-1, -1)
128, 128, 128, 128, // Unorm8x4 (0.5, 0.5, 0.5, 0.5)
0, 128, 0, 128, // Unorm16x2 (0.5, 0.5)
0, 64, 0, 64, 0, 64, 0, 64, // Unorm16x4 (0.25, 0.25, 0.25, 0.25)
127, 127, 127, 127, // Snorm8x4 (1, 1, 1, 1)
0, 128, 0, 128, // Snorm16x2 (-1, -1)
255, 127, 255, 127, 255, 127, 255, 127, // Snorm16x4 (1, 1, 1, 1)
255, 255, // Unorm8x2 (1, 1)
128, 128, // Snorm8x2 (-1, -1)
],
checksums: &[0.0, 0.0, 6.0, 4.0, 0.0, 0.0],
},
Expand All @@ -112,15 +110,14 @@ async fn vertex_formats_all(ctx: TestingContext) {
entry_point: "vertex_block_1",
attributes: attributes_block_1,
input: &[
4u8, 8u8, 16u8, 32u8, // Uint8x4 (4, 8, 16, 32)
64u8, 0u8, 128u8, 0u8, // Uint16x2 (64, 128)
0u8, 1u8, 0u8, 2u8, 0u8, 4u8, 0u8, 8u8, // Uint16x4 (256, 512, 1024, 2048)
127u8, 127u8, 2u8, 0u8, // Sint8x4 (127, 127, 2, 0)
255u8, 255u8, 1u8, 0u8, // Sint16x2 (-1, 1)
128u8, 255u8, 128u8, 255u8, 0u8, 1u8, 240u8,
255u8, // Sint16x4 (-128, -128, 256, -16)
1u8, 2u8, // Uint8x2 (1, 2)
128u8, 128u8, // Sint8x2 (-128, -128)
4, 8, 16, 32, // Uint8x4 (4, 8, 16, 32)
64, 0, 128, 0, // Uint16x2 (64, 128)
0, 1, 0, 2, 0, 4, 0, 8, // Uint16x4 (256, 512, 1024, 2048)
127, 127, 2, 0, // Sint8x4 (127, 127, 2, 0)
255, 255, 1, 0, // Sint16x2 (-1, 1)
128, 255, 128, 255, 0, 1, 240, 255, // Sint16x4 (-128, -128, 256, -16)
1, 2, // Uint8x2 (1, 2)
128, 128, // Sint8x2 (-128, -128)
],
checksums: &[4095.0, -16.0, 0.0, 0.0, 0.0, 0.0],
},
Expand All @@ -129,12 +126,11 @@ async fn vertex_formats_all(ctx: TestingContext) {
entry_point: "vertex_block_2",
attributes: attributes_block_2,
input: &[
1u8, 0u8, 0u8, 0u8, // Uint32x2 (1)
2u8, 0u8, 0u8, 0u8, 4u8, 0u8, 0u8, 0u8, // Uint32x2 (2, 4)
8u8, 0u8, 0u8, 0u8, 16u8, 0u8, 0u8, 0u8, 32u8, 0u8, 0u8,
0u8, // Uint32x3 (8, 16, 32)
64u8, 0u8, 0u8, 0u8, 128u8, 0u8, 0u8, 0u8, 0u8, 1u8, 0u8, 0u8, 0u8, 2u8, 0u8,
0u8, // Uint32x4 (64, 128, 256, 512)
1, 0, 0, 0, // Uint32x2 (1)
2, 0, 0, 0, 4, 0, 0, 0, // Uint32x2 (2, 4)
8, 0, 0, 0, 16, 0, 0, 0, 32, 0, 0, 0, // Uint32x3 (8, 16, 32)
64, 0, 0, 0, 128, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0,
0, // Uint32x4 (64, 128, 256, 512)
],
checksums: &[1023.0, 0.0, 0.0, 0.0, 0.0, 0.0],
},
Expand All @@ -143,12 +139,11 @@ async fn vertex_formats_all(ctx: TestingContext) {
entry_point: "vertex_block_3",
attributes: attributes_block_3,
input: &[
128u8, 255u8, 255u8, 255u8, // Sint32 (-128)
120u8, 0u8, 0u8, 0u8, 8u8, 0u8, 0u8, 0u8, // Sint32x2 (120, 8)
252u8, 255u8, 255u8, 255u8, 2u8, 0u8, 0u8, 0u8, 2u8, 0u8, 0u8,
0u8, // Sint32x3 (-4, 2, 2)
24u8, 252u8, 255u8, 255u8, 88u8, 2u8, 0u8, 0u8, 44u8, 1u8, 0u8, 0u8, 99u8, 0u8,
0u8, 0u8, // Sint32x4 (-1000, 600, 300, 99)
128, 255, 255, 255, // Sint32 (-128)
120, 0, 0, 0, 8, 0, 0, 0, // Sint32x2 (120, 8)
252, 255, 255, 255, 2, 0, 0, 0, 2, 0, 0, 0, // Sint32x3 (-4, 2, 2)
24, 252, 255, 255, 88, 2, 0, 0, 44, 1, 0, 0, 99, 0, 0,
0, // Sint32x4 (-1000, 600, 300, 99)
],
checksums: &[0.0, -1.0, 0.0, 0.0, 0.0, 0.0],
},
Expand All @@ -157,16 +152,15 @@ async fn vertex_formats_all(ctx: TestingContext) {
entry_point: "vertex_block_4",
attributes: attributes_block_4,
input: &[
0u8, 0u8, 0u8, 63u8, // Float32 (0.5)
0u8, 0u8, 0u8, 191u8, 0u8, 0u8, 128u8, 64u8, // Float32x2 (-0.5, 4.0)
0u8, 0u8, 0u8, 192u8, 0u8, 0u8, 204u8, 194u8, 0u8, 0u8, 200u8,
66u8, // Float32x3 (-2.0, -102.0, 100.0)
0u8, 0u8, 92u8, 66u8, 0u8, 0u8, 72u8, 194u8, 0u8, 0u8, 32u8, 65u8, 0u8, 0u8, 128u8,
63u8, // Float32x4 (55.0, -50.0, 10.0, 1.0)
0u8, 68u8, // Float16 (4.0)
0u8, 60u8, 72u8, 53u8, // Float16x2 (1.0, 0.33)
72u8, 57u8, 0u8, 192u8, 0u8, 188u8, 0u8,
184u8, // Float16x4 (0.66, -2.0, -1.0, -0.5)
0, 0, 0, 63, // Float32 (0.5)
0, 0, 0, 191, 0, 0, 128, 64, // Float32x2 (-0.5, 4.0)
0, 0, 0, 192, 0, 0, 204, 194, 0, 0, 200,
66, // Float32x3 (-2.0, -102.0, 100.0)
0, 0, 92, 66, 0, 0, 72, 194, 0, 0, 32, 65, 0, 0, 128,
63, // Float32x4 (55.0, -50.0, 10.0, 1.0)
0, 68, // Float16 (4.0)
0, 60, 72, 53, // Float16x2 (1.0, 0.33)
72, 57, 0, 192, 0, 188, 0, 184, // Float16x4 (0.66, -2.0, -1.0, -0.5)
],
checksums: &[0.0, 0.0, 0.0, 0.0, 2.5, 16.0],
},
Expand All @@ -175,14 +169,14 @@ async fn vertex_formats_all(ctx: TestingContext) {
entry_point: "vertex_block_6",
attributes: attributes_block_6,
input: &[
1u8, 2u8, // Uint16 (513)
1u8, 2u8, // Sint16 (513)
0u8, 64u8, // Unorm16 (0.25)
0u8, 64u8, // Snorm16 (0.5)
32u8, // Uint8 (32)
255u8, // Sint8 (-1)
128u8, // Unorm8 (0.5)
128u8, // Snorm8 (-1)
1, 2, // Uint16 (513)
1, 2, // Sint16 (513)
0, 64, // Unorm16 (0.25)
0, 64, // Snorm16 (0.5)
32, // Uint8 (32)
255, // Sint8 (-1)
128, // Unorm8 (0.5)
128, // Snorm8 (-1)
],
checksums: &[513.0 + 32.0, 513.0 - 1.0, 0.25 + 0.5, 0.5 - 1.0, 0.0, 0.0],
},
Expand All @@ -191,7 +185,7 @@ async fn vertex_formats_all(ctx: TestingContext) {
entry_point: "vertex_block_7",
attributes: attributes_block_7,
input: &[
128u8, 85u8, 170u8, 64u8, // Unorm8x4Bgra (0.67, 0.33, 0.5, 0.25)
128, 85, 170, 64, // Unorm8x4Bgra (0.67, 0.33, 0.5, 0.25)
],
checksums: &[0.0, 0.0, 1.75, 0.0, 0.0, 0.0],
},
Expand Down

0 comments on commit c536ad0

Please sign in to comment.