Skip to content

Commit

Permalink
Updates encase and encase_derive_impl requirement to 0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
mnmaita committed Apr 25, 2024
1 parent 8fc7f3f commit 73ba70b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/bevy_color/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ bytemuck = { version = "1", features = ["derive"] }
serde = { version = "1.0", features = ["derive"], optional = true }
thiserror = "1.0"
wgpu-types = { version = "0.19", default-features = false, optional = true }
encase = { version = "0.7", default-features = false }
encase = { version = "0.8", default-features = false }

[features]
serialize = ["serde"]
Expand Down
1 change: 1 addition & 0 deletions crates/bevy_color/src/linear_rgba.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ impl encase::ShaderType for LinearRgba {
encase::private::Metadata {
alignment,
has_uniform_min_alignment: false,
is_pod: false,
min_size: size,
extra: (),
}
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_encase_derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ proc-macro = true

[dependencies]
bevy_macro_utils = { path = "../bevy_macro_utils", version = "0.14.0-dev" }
encase_derive_impl = "0.7"
encase_derive_impl = "0.8"

[lints]
workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_render/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ flate2 = { version = "1.0.22", optional = true }
ruzstd = { version = "0.6.0", optional = true }
# For transcoding of UASTC/ETC1S universal formats, and for .basis file support
basis-universal = { version = "0.3.0", optional = true }
encase = { version = "0.7", features = ["glam"] }
encase = { version = "0.8", features = ["glam"] }
# For wgpu profiling using tracing. Use `RUST_LOG=info` to also capture the wgpu spans.
profiling = { version = "1", features = [
"profile-with-tracing",
Expand Down
5 changes: 5 additions & 0 deletions crates/bevy_render/src/render_resource/uniform_buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,11 @@ impl<'a> BufferMut for QueueWriteBufferViewWrapper<'a> {
fn write<const N: usize>(&mut self, offset: usize, val: &[u8; N]) {
self.buffer_view.write(offset, val);
}

#[inline]
fn write_slice(&mut self, offset: usize, val: &[u8]) {
self.buffer_view.write_slice(offset, val);
}
}

impl<'a, T: ShaderType + WriteInto> IntoBinding<'a> for &'a DynamicUniformBuffer<T> {
Expand Down

0 comments on commit 73ba70b

Please sign in to comment.