diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index aa78ff8b6..3ae3d1424 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -10,12 +10,12 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel # See the following, which includes links to supported macOS versions, including supported Xcode versions -# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources +# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources jobs: build: strategy: matrix: - xcode: [ "14.3.1" ] + xcode: [ "15.0" ] platform: [ "all", "macos", "ios" ] os: [ "macos-13" ] upload_artifacts: [ true ] diff --git a/Docs/Whats_New.md b/Docs/Whats_New.md index 2308d5d67..ff09d596c 100644 --- a/Docs/Whats_New.md +++ b/Docs/Whats_New.md @@ -13,6 +13,15 @@ Copyright (c) 2015-2023 [The Brenwill Workshop Ltd.](http://www.brenwill.com) +MoltenVK 1.2.7 +-------------- + +Released TBD + +- Reduce disk space consumed after running `fetchDependencies` script by removing intermediate file caches. + + + MoltenVK 1.2.6 -------------- diff --git a/MoltenVK/MoltenVK/API/mvk_config.h b/MoltenVK/MoltenVK/API/mvk_config.h index 21041efc1..077a4a1fa 100644 --- a/MoltenVK/MoltenVK/API/mvk_config.h +++ b/MoltenVK/MoltenVK/API/mvk_config.h @@ -45,7 +45,7 @@ extern "C" { */ #define MVK_VERSION_MAJOR 1 #define MVK_VERSION_MINOR 2 -#define MVK_VERSION_PATCH 6 +#define MVK_VERSION_PATCH 7 #define MVK_MAKE_VERSION(major, minor, patch) (((major) * 10000) + ((minor) * 100) + (patch)) #define MVK_VERSION MVK_MAKE_VERSION(MVK_VERSION_MAJOR, MVK_VERSION_MINOR, MVK_VERSION_PATCH) diff --git a/MoltenVK/MoltenVK/GPUObjects/MVKPipeline.mm b/MoltenVK/MoltenVK/GPUObjects/MVKPipeline.mm index e6e05fa5b..7cb4a3cea 100644 --- a/MoltenVK/MoltenVK/GPUObjects/MVKPipeline.mm +++ b/MoltenVK/MoltenVK/GPUObjects/MVKPipeline.mm @@ -2506,7 +2506,8 @@ void serialize(Archive & archive, CompilerMSL::Options& opt) { opt.force_sample_rate_shading, opt.manual_helper_invocation_updates, opt.check_discarded_frag_stores, - opt.sample_dref_lod_array_as_grad); + opt.sample_dref_lod_array_as_grad, + opt.replace_recursive_inputs); } template diff --git a/README.md b/README.md index e44e34a61..5c205b08b 100644 --- a/README.md +++ b/README.md @@ -165,8 +165,8 @@ platforms and simulators. The `--visionos` and `--visionossim` selections must b with a separate invocation of `fetchDependencies`, because those selections require Xcode 15+, and will cause a multi-platform build on older versions of Xcode to abort. -Running `fetchDependencies` repeatedly with different platforms will accumulate -targets in the `XCFramework`. +Running `fetchDependencies` repeatedly with different platforms will accumulate targets +in the `XCFramework`, if the `--keep-cache` option is used on each invocation. For more information about the external open-source libraries used by **MoltenVK**, see the [`ExternalRevisions/README.md`](ExternalRevisions/README.md) document. diff --git a/Scripts/create_ext_lib_xcframeworks.sh b/Scripts/create_ext_lib_xcframeworks.sh index 33cd977d8..9cacc5f0e 100755 --- a/Scripts/create_ext_lib_xcframeworks.sh +++ b/Scripts/create_ext_lib_xcframeworks.sh @@ -1,5 +1,7 @@ #!/bin/bash +if [ "${SKIP_PACKAGING}" = "Y" ]; then exit 0; fi + . "${PROJECT_DIR}/Scripts/create_xcframework_func.sh" export MVK_EXT_DIR="${PROJECT_DIR}/External" diff --git a/Scripts/package_ext_libs_finish.sh b/Scripts/package_ext_libs_finish.sh index d44a2d30b..ec4d4753a 100755 --- a/Scripts/package_ext_libs_finish.sh +++ b/Scripts/package_ext_libs_finish.sh @@ -1,5 +1,7 @@ #!/bin/bash +if [ "${SKIP_PACKAGING}" = "Y" ]; then exit 0; fi + set -e export MVK_EXT_LIB_DST_PATH="${PROJECT_DIR}/External/build/" @@ -7,6 +9,12 @@ export MVK_EXT_LIB_DST_PATH="${PROJECT_DIR}/External/build/" # Assign symlink to Latest ln -sfn "${CONFIGURATION}" "${MVK_EXT_LIB_DST_PATH}/Latest" +# Remove the large Intermediates directory if no longer needed +if [ "${KEEP_CACHE}" != "Y" ]; then + echo Removing Intermediates library at "${MVK_EXT_LIB_DST_PATH}/Intermediates" + rm -rf "${MVK_EXT_LIB_DST_PATH}/Intermediates" +fi + # Clean MoltenVK to ensure the next MoltenVK build will use the latest external library versions. make --quiet clean diff --git a/fetchDependencies b/fetchDependencies index f03f36c86..8b80bf901 100755 --- a/fetchDependencies +++ b/fetchDependencies @@ -67,6 +67,12 @@ # --no-parallel-build # Build the external libraries serially instead of in parallel. This is the default. # +# --keep-cache +# Do not remove the External/build/Intermediates cache directory after building. +# Removing the Intermediates directory returns significant disk space after the +# build, and is the default behaviour. Use this option if you intend to run this +# script repeatedly to incrementally build one platform at a time. +# # --glslang-root path # "path" specifies a directory path to a KhronosGroup/glslang repository. # This repository does need to be built and the build directory must be in the @@ -117,6 +123,7 @@ V_HEADERS_ROOT="" SPIRV_CROSS_ROOT="" GLSLANG_ROOT="" BLD_SPV_TLS="" +export KEEP_CACHE="" while (( "$#" )); do case "$1" in @@ -191,6 +198,10 @@ while (( "$#" )); do XC_USE_BCKGND="" shift 1 ;; + --keep-cache) + KEEP_CACHE="Y" + shift 1 + ;; -v) XC_BUILD_VERBOSITY="" shift 1 @@ -410,7 +421,6 @@ function execute_xcodebuild_command () { # 2 - Platform # 3 - Destination (Optional. Defaults to same as platform) function build_impl() { - BLD_SPECIFIED="Y" XC_OS=${1} XC_PLTFM=${2} if [ "${3}" != "" ]; then @@ -442,7 +452,9 @@ function build_impl() { # Select whether or not to run the build in parallel. # 1 - OS # 2 - platform +# 3 - Destination (Optional. Defaults to same as platform) function build() { + BLD_SPECIFIED="Y" if [ "$XC_USE_BCKGND" != "" ]; then build_impl "${1}" "${2}" "${3}" & else @@ -453,6 +465,7 @@ function build() { EXT_DEPS=ExternalDependencies XC_PROJ="${EXT_DEPS}.xcodeproj" XC_DD_PATH="${EXT_DIR}/build" +export SKIP_PACKAGING="Y" # Determine if xcpretty is present XCPRETTY_PATH=$(command -v xcpretty 2> /dev/null || true) # ignore failures @@ -512,9 +525,10 @@ if [ "$XC_USE_BCKGND" != "" ]; then fi if [ "$BLD_SPECIFIED" != "" ]; then - # Build XCFrameworks, update latest symlink, and clean MoltenVK for rebuild + # Build XCFrameworks, update latest symlink, remove intermediates, and clean MoltenVK for rebuild PROJECT_DIR="." CONFIGURATION=${XC_CONFIG} + SKIP_PACKAGING="" . "./Scripts/create_ext_lib_xcframeworks.sh" . "./Scripts/package_ext_libs_finish.sh" else