Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vk_version_*!-macros are wrong #20

Open
TimDiekmann opened this issue Mar 10, 2018 · 0 comments
Open

vk_version_*!-macros are wrong #20

TimDiekmann opened this issue Mar 10, 2018 · 0 comments

Comments

@TimDiekmann
Copy link

TimDiekmann commented Mar 10, 2018

The macros vk_version_major! and vk_version_minor!.

Expected:

#[macro_export]
macro_rules! vk_version_major {
    ($major: expr) => (($major as uint32_t) >> 22)
}
#[macro_export]
macro_rules! vk_version_minor {
    ($minor: expr) => ((($minor as uint32_t) >> 12) & 0x3ff)
}

Currently:

#[macro_export]
macro_rules! vk_version_major {
    ($major: expr) => (($major as uint32_t) << 22)
}
#[macro_export]
macro_rules! vk_version_minor {
    ($minor: expr) => ((($minor as uint32_t) << 12) & 0x3ff)
}

However, the macros have the same problem as in #16

@TimDiekmann TimDiekmann mentioned this issue Mar 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant