#![allow(non_upper_case_globals)] #![allow(non_snake_case)] #![allow(non_camel_case_types)] #![deny(rust_2018_idioms)] pub mod prelude; pub mod custom; pub mod enums; pub mod structs; pub mod types; pub mod functions; pub fn VK_MAKE_VERSION(major: u32, minor: u32, patch: u32) -> u32 { (major as u32) << 22 | (minor as u32) << 12 | (patch as u32) } pub fn VK_GET_VERSION(version: u32) -> (u32, u32, u32) { let major = version >> 22; let minor = (version >> 12) & 0x03FF; let patch = version & 0x00CF; (major, minor, patch) } #[test] fn check_vk_version() { assert_eq!((1, 2, 135), VK_GET_VERSION(VK_MAKE_VERSION(1, 2, 135))); }