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

Fix vulkan version parsing #325

Merged
merged 1 commit into from
May 28, 2023

Conversation

Crydsch
Copy link
Contributor

@Crydsch Crydsch commented May 2, 2023

This PR fixes an issue with the cmake script cmake/check_vulkan_version.cmake
where it would not parse the output of vulkaninfo correctly.
This results in the wrong header version being detected and therefore failing the driver check.

This PR fixes Issue #317

There are two bugs that have been addressed:

  1. Even if the script detect a complete version in the vulkan header file (VK_HEADER_VERSION_COMPLETE) it fails to parse it, because the if statement is not evaluating the string value correctly.
    This has been fixed by checking with STREQUAL.

  2. When parsing the apiVersion itself the used regex used, expects some extra text and brackets, which are not present on all installations/drivers. Was there a change perhaps?
    I checked this on 3 Machines with Ubuntu20, Ubuntu22 and Fedora38. With Vulkan 1.1.182, Vulkan 1.3.238 and Vulkan 1.3.243 installed respectively.

    The version always looks like this: apiVersion = 4206830 (1.3.238)

    This has been fixed by relaxing the regex by adding * to these brackets and text matches.
    With these changes it parses the version correctly and should still parse these other formats as well.

Signed-off-by: crydsch <crydsch@lph.zone>
@marcogmaia
Copy link

Thanks, this fixed the issue for me.

@axsaucedo
Copy link
Member

Thank you for your contribution!

@axsaucedo axsaucedo merged commit 63567a7 into KomputeProject:master May 28, 2023
@Crydsch Crydsch deleted the fix_check_vulkan_version branch August 16, 2023 11:00
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

Successfully merging this pull request may close these issues.

3 participants