From b0864e5c44e64bbe80ca28cc5203778e78e09956 Mon Sep 17 00:00:00 2001 From: Matus Talcik Date: Mon, 29 Oct 2018 13:32:17 +0100 Subject: [PATCH] Change code function of VkShaderModule to take &[u32] according to spec --- generator/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generator/src/lib.rs b/generator/src/lib.rs index 4c03705..f061e6a 100644 --- a/generator/src/lib.rs +++ b/generator/src/lib.rs @@ -1337,8 +1337,8 @@ pub fn derive_setters(_struct: &vkxml::Struct) -> Option { // Unique cases if name == "pCode" { return Some(quote!{ - pub fn code(mut self, code: &'a [u8]) -> #name_builder<'a> { - self.inner.code_size = code.len(); + pub fn code(mut self, code: &'a [u32]) -> #name_builder<'a> { + self.inner.code_size = code.len() * 4; self.inner.p_code = code.as_ptr() as *const u32; self }