-
Notifications
You must be signed in to change notification settings - Fork 2k
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
macOS/iOS fixes plus other generic fixes for clang and validation warnings #1117
macOS/iOS fixes plus other generic fixes for clang and validation warnings #1117
Conversation
…S_MVK / DVK_USE_PLATFORM_IOS_MVK
The CI script is failing for macOS since the OpenMP_omp_LIBRARY path should now be Even though it was building before, OpenMP was not actually working for any platform: Win, Linux, or macOS. This is because the openmp compiler flags were not being set for the target and OpenMP_CXX_LIBRARY_DIRS is no longer defined or set by cmake's FindOpenMP.cmake module. Instead, you need to use OpenMP_CXX_LIBRARIES which provides the path for cmake's UPDATE: Finally got it working after three tries! |
Thank you very much for your PR. This is very much appreciated. I will take a look at this, but it may take a few weeks. |
Thanks for agreeing to look at this. No rush so feel free to take your time. There are a lot of small things collected in this PR. Each commit is a separate item (except Note this PR has one non-duplicated commit 677b77b compared to #1119. If you are considering incorporating both PRs, then please merge this one #1117 first, then #1119 afterwards. Thanks. |
… MoltenVK library
d041ac6
to
677b77b
Compare
Thanks for merging. |
This fixes a recently reported macOS command line build issue against merged PR #965. In addition this fixes some other macOS issues and adds generic fixes for clang warnings and some validation layer warnings in a few examples:
getAssetPath()
andgetShaderBathPath()
to be tolerant of command line and Xcode builds with associated binary locations (e.g. in /bin or /bin/Debug or /bin/Release).debugUtilsMessageCallback()
to be tolerant of cases whenpMessageIdName
is null, which can occur when validation is on and MoltenVK issues errors[mvk-error]
or warnings[mvk-warn]
such as using deprecatedVK_USE_PLATFORM_IOS_MVK
orVK_USE_PLATFORM_MACOS_MVK
defines.getValueAsInt()
and missing overrides in the variablerateshading example.VK_USE_PLATFORM_METAL_EXT
which supercedes the deprecatedVK_USE_PLATFORM_IOS_MVK
andVK_USE_PLATFORM_MACOS_MVK
platform defines. This touches a lot of files but the changes are straight forward. The only issue is thatVK_USE_PLATFORM_METAL_EXT
requires initialization using a Metal layer vs. the view, so I had to make a few Apple-only changes to support this. I retained the deprecated platform options for backwards compatibility, but the default cmake setting is nowVK_USE_PLATFORM_METAL_EXT
.VK_EXT_extended_dynamic_state3
.vkCmdDraw()
vertexCount
argument in the particlesystem example since the previous code used the particle buffer size and not the particle count. This lead to multiple drawing artifacts as would be expected.VK_KHR_maintenance1
extension.VULKAN_SDK
at a local install and cmake will use it if the system global installation is not available.Tested on Windows 10, Manjaro Arch Linux, and macOS Ventura 13.6.6