diff --git a/ash/src/vk.rs b/ash/src/vk.rs index f80ddb6..ab4b2e0 100644 --- a/ash/src/vk.rs +++ b/ash/src/vk.rs @@ -13432,8 +13432,8 @@ pub const REMAINING_MIP_LEVELS: u32 = !0; pub const REMAINING_ARRAY_LAYERS: u32 = !0; pub const WHOLE_SIZE: u64 = !0; pub const ATTACHMENT_UNUSED: u32 = !0; -pub const TRUE: usize = 1; -pub const FALSE: usize = 0; +pub const TRUE: Bool32 = 1; +pub const FALSE: Bool32 = 0; pub const QUEUE_FAMILY_IGNORED: u32 = !0; pub const QUEUE_FAMILY_EXTERNAL: u32 = !0 - 1; pub const QUEUE_FAMILY_FOREIGN_EXT: u32 = !0 - 2; diff --git a/generator/src/lib.rs b/generator/src/lib.rs index 4e37ab2..63b9438 100644 --- a/generator/src/lib.rs +++ b/generator/src/lib.rs @@ -24,6 +24,7 @@ pub enum CType { U32, U64, Float, + Bool32, } impl CType { @@ -33,6 +34,7 @@ impl CType { CType::U32 => Term::intern("u32"), CType::U64 => Term::intern("u64"), CType::Float => Term::intern("f32"), + CType::Bool32 => Term::intern("Bool32"), }; quote!{#term} } @@ -1399,7 +1401,12 @@ pub fn generate_constant<'a>( let name = constant_name(&constant.name); let ident = Ident::from(name.as_str()); let value = c.to_tokens(); - let ty = c.ty().to_tokens(); + let ty = if name == "TRUE" || name == "FALSE" { + CType::Bool32 + } else { + c.ty() + }; + let ty = ty.to_tokens(); quote!{ pub const #ident: #ty = #value; }