Update iOS build and CI to support standardization of FindVulkan.cmake#1500
Update iOS build and CI to support standardization of FindVulkan.cmake#1500SRSaunders wants to merge 8 commits intoKhronosGroup:mainfrom
Conversation
…s - use pre-builts instead
…le for debug builds
be4191b to
c67172f
Compare
| @@ -0,0 +1,39 @@ | |||
| #[[ | |||
|
|
|||
| Copyright (c) 2026, Francesco Giancane | |||
There was a problem hiding this comment.
I am generally OK with this attribution. I just need to double-check with my Company if there are extra lines to be added as well per our OSS policy.
There was a problem hiding this comment.
Also, if you do not mind, a Co-Authored-By: Giancane, Francesco <fgiancan@qti.qualcomm.com> tag in the commit message would be appreciated :)
There was a problem hiding this comment.
I just need to double-check with my Company if there are extra lines to be added as well per our OSS policy
That may indeed require changing the copyright to Qualcomm. Please let me know.
Also, going back to the commit message may be tricky. I would have to rebase and reword then force push again. Would it be okay to add this attribution to item 1 above in the PR description? I will do that anyways.
There was a problem hiding this comment.
yeah don't worry too much about that. There's no need to mess it up just for the tag, as it is not even mandatory. I am finishing double checking for the copyright. Keep you posted !
There was a problem hiding this comment.
Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
SPDX-License-Identifier: BSD-3-Clause-Clear
This is the copyright part for us. If you are posting a new commit on top of the existing ones the Co-Authored-By could be added there as well. Thanks!
There was a problem hiding this comment.
BSD-3-Clause-Clear should be compatible with Apache-2.0 for what matters.
There was a problem hiding this comment.
If this is a new/changed license we might want to internally clarify this first.
There was a problem hiding this comment.
For what it's worth, here is example of what existing Qualcomm Licenses look like in the project:
/* Copyright (c) 2024, Qualcomm Innovation Center, Inc. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 the "License";
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* ------------------------------------------------------------------------
*
* THIS IS A MODIFIED VERSION OF THE ORIGINAL FILE
*
* The original file, along with the original Apache-2.0 LICENSE can be found at:
* https://github.com/google-research/jax3d/tree/main/jax3d/projects/mobilenerf
*
* Modification details: Shader code was updated to work on Vulkan (originally
* built for WebGL)
* Contributor: (Qualcomm) Rodrigo Holztrattner - quic_rholztra@quicinc.com
*/
There was a problem hiding this comment.
If this is a new/changed license we might want to internally clarify this first.
Yes this is my updated version of copyright marks. Let me double check again if it's fine to license under Apache.
Description
This PR updates the iOS build and CI to support future standardization of FindVulkan.cmake where there may be fewer project customizations present for iOS build targets. With these changes the project will build and run for iOS and iOS Simulator with no project-specific FindVulkan.cmake present in the tree, instead relying on the cmake's standard version of the module.
However, one downside in this scenario is the Vulkan Validation Layer would not be found for iOS and samples that rely on it would not run (e.g. shader_debugprintf). In addition, iOS debug builds would run but would not benefit from validation messages(now fixed by item 4 below). A separate effort is pushing project additions to the upstream FindVulkan.cmake to allow eventual migration to the standard cmake version. In the mean time the project FindVulkan.cmake will remain in place and this PR will not result in iOS regressions in any scenario.The specific items that have changed are:
Vulkan_Target_SDKcmake variable is now defined locally within Vulkan-Samples/app/CmakeLists.txt vs. depending on its definition within the project's FindVulkan.cmake. This approach makes more sense since this was a project-specific customization of FindVulkan.cmake and is the only location in the project build system (outside of FindVulkan.cmake itself) where this variable is used. Note the purpose of this variable is to locate the directory where Vulkan icd and layer json files can be found - required for packaging an iOS app bundle.Vulkan_Layer_VALIDATIONcmake variable is now defined within the iOS-specific section in Vulkan-Samples/bldsys/cmake/global_options.cmake if it's not already defined or found by FindVulkan.cmake. This acts as a fail-safe fallback that avoids any regressions in finding the validation layer for iOS within the project.I have also taken the opportunity to address three other related items here:
VK_LAYER_KHRONOS_validationto be Optional for debug builds vs. Required. This applies to all platforms but allows debug builds to run even when the validation layer is not available. This is important for several use cases: a) Windows users who do not install the SDK, and b) on the iOS Simulator where the VVL library is not built for that target. I debated this change before making it, but I believe it is correct given that Windows build docs do not mention or require installation of the SDK, and the default build config for Visual Studio is debug. I am interested in feedback from maintainers on this regarding project intentions: i.e. Required forces a runtime error that prevents samples from running in debug mode, or Optional allows execution with a runtime warning message instead. I chose the latter.Fixes iOS build issues associated with pull request #1490. See additional discussion there.
Tested on Windows 11 and macOS Sequoia with macOS x86_64, iOS arm64, and iOS Simulator x86_64 targets.
General Checklist:
Please ensure the following points are checked:
Note: The Samples CI runs a number of checks including:
If this PR contains framework changes:
batchcommand line argument to make sure all samples still work properlySample Checklist
If your PR contains a new or modified sample, these further checks must be carried out in addition to the General Checklist: