Fix Vulkan version macros

This commit is contained in:
Gabriel Majeri 2018-08-25 10:48:49 +03:00
parent a10935eaf7
commit 0786d71b39
2 changed files with 6 additions and 6 deletions

View file

@ -19,19 +19,19 @@ macro_rules! vk_make_version {
#[macro_export]
macro_rules! vk_version_major {
($major:expr) => {
($major as uint32_t) >> 22
($major as u32) >> 22
};
}
#[macro_export]
macro_rules! vk_version_minor {
($minor:expr) => {
(($minor as uint32_t) >> 12) & 0x3ff
(($minor as u32) >> 12) & 0x3ff
};
}
#[macro_export]
macro_rules! vk_version_patch {
($minor:expr) => {
($minor as uint32_t) & 0xfff
($minor as u32) & 0xfff
};
}
pub type RROutput = c_ulong;

View file

@ -163,21 +163,21 @@ pub fn vk_version_macros() -> Tokens {
#[macro_export]
macro_rules! vk_version_major {
($major:expr) => {
($major as uint32_t) >> 22
($major as u32) >> 22
};
}
#[macro_export]
macro_rules! vk_version_minor {
($minor:expr) => {
(($minor as uint32_t) >> 12) & 0x3ff
(($minor as u32) >> 12) & 0x3ff
};
}
#[macro_export]
macro_rules! vk_version_patch {
($minor:expr) => {
($minor as uint32_t) & 0xfff
($minor as u32) & 0xfff
};
}
}