Skip to content

Commit

Permalink
Update zerocopy
Browse files Browse the repository at this point in the history
  • Loading branch information
gridbugs committed Dec 29, 2023
1 parent 3bd5019 commit 731a342
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion wgpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ chargrid_runtime = { path = "../runtime", version = "0.3" }
wgpu = { version = "0.17", features = ["spirv"] }
wgpu_glyph = "0.21"
winit = "0.28"
zerocopy = "0.6"
zerocopy = { version = "0.7", features = ["derive"] }
log = "0.4"
grid_2d = "0.15"
pollster = "0.3"
Expand Down
4 changes: 2 additions & 2 deletions wgpu/src/wgpu_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ struct WgpuContext {
}

#[repr(C)]
#[derive(Clone, Copy, zerocopy::AsBytes, zerocopy::FromBytes)]
#[derive(Clone, Copy, zerocopy::AsBytes, zerocopy::FromZeroes, zerocopy::FromBytes)]
struct BackgroundCellInstance {
background_colour: [f32; 3],
foreground_colour: [f32; 3],
Expand All @@ -110,7 +110,7 @@ impl Default for BackgroundCellInstance {
}

#[repr(C)]
#[derive(Debug, Clone, Copy, zerocopy::AsBytes, zerocopy::FromBytes)]
#[derive(Debug, Clone, Copy, zerocopy::AsBytes, zerocopy::FromZeroes, zerocopy::FromBytes)]
struct GlobalUniforms {
cell_size_relative_to_window: [f32; 2],
offset_to_centre: [f32; 2],
Expand Down

0 comments on commit 731a342

Please sign in to comment.