diff --git a/CHANGELOG_VULKANO.md b/CHANGELOG_VULKANO.md index c5f03832..7ecbfb82 100644 --- a/CHANGELOG_VULKANO.md +++ b/CHANGELOG_VULKANO.md @@ -4,6 +4,7 @@ files. - Add a `union` method for the extensions types. - Make `BufferUsage` derive `PartialEq` and `Eq` +- Fix a compiler error in struct code generated by the `shader!` macro. # Version 0.11.1 (2018-11-16) diff --git a/vulkano-shaders/src/structs.rs b/vulkano-shaders/src/structs.rs index d7ef54ca..d0b18675 100644 --- a/vulkano-shaders/src/structs.rs +++ b/vulkano-shaders/src/structs.rs @@ -135,7 +135,7 @@ fn write_struct(doc: &Spirv, struct_id: u32, members: &[u32]) -> (TokenStream, O if diff >= 1 { rust_members.push(Member { name: Ident::new(&format!("_dummy{}", next_padding_num), Span::call_site()), - ty: quote!{ [u8; {}] }, + ty: quote!{ [u8; #diff as usize] }, }); } }