Fix compiler error in code generated for GLSL struct (#1166)

This commit is contained in:
mitchmindtree 2019-02-07 13:55:24 +11:00 committed by Lucas Kent
parent 5893dad066
commit d3888242ff
2 changed files with 2 additions and 1 deletions

View File

@ -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)

View File

@ -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] },
});
}
}