Skip to content

Commit

Permalink
remote debugging, oh joy
Browse files Browse the repository at this point in the history
  • Loading branch information
ElectronicRU committed Nov 2, 2021
1 parent 15c8c55 commit bddafe5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
4 changes: 3 additions & 1 deletion crevice-tests/src/gpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,11 @@ where
"std140 value did not round-trip through wgpu successfully.\n\
Input: {:?}\n\
Output: {:?}\n\n\
Data: {:?}\n\
Bytes: {:?}\n\n\
GLSL shader:\n{}\n\n\
WGSL shader:\n{}",
value, output, glsl_shader, wgsl_shader,
value, output, data, bytes, glsl_shader, wgsl_shader,
);

panic!("wgpu round-trip failure for {}", T::NAME);
Expand Down
15 changes: 8 additions & 7 deletions crevice-tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,23 +344,24 @@ fn array_strides_small_value() {
fn array_strides_vec3() {
#[derive(Debug, PartialEq, AsStd140, AsStd430, GlslStruct)]
struct ArrayOfVector3 {
inner: [Vector3<f32>; 4],
inner: [Vector3<u32>; 5],
}

assert_std140!((size = 64, align = 16) ArrayOfVector3 {
assert_std140!((size = 80, align = 16) ArrayOfVector3 {
inner: 0,
});

assert_std430!((size = 64, align = 16) ArrayOfVector3 {
assert_std430!((size = 80, align = 16) ArrayOfVector3 {
inner: 0,
});

test_round_trip_struct(ArrayOfVector3 {
inner: [
[0.0, 1.0, 2.0].into(),
[3.0, 4.0, 5.0].into(),
[6.0, 7.0, 8.0].into(),
[9.0, 10.0, 11.0].into(),
[0x00010203, 0x04050607, 0x08091011].into(),
[0x12131415, 0x16171819, 0x20212223].into(),
[0x24252627, 0x28293031, 0x32333435].into(),
[0x36373839, 0x40414243, 0x44454647].into(),
[0x48495051, 0x52535455, 0x56575859].into(),
],
})
}

0 comments on commit bddafe5

Please sign in to comment.