diff --git a/.travis.yml b/.travis.yml index f5808122..503dc992 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: objective-c # macOS and Xcode Version os: osx -osx_image: xcode11.5 +osx_image: xcode12 # Build with verbose logging to avoid Travis timing out. script: diff --git a/Demos/LunarG-VulkanSamples/API-Samples/API-Samples.xcodeproj/project.pbxproj b/Demos/LunarG-VulkanSamples/API-Samples/API-Samples.xcodeproj/project.pbxproj index fd36baa0..7cc7ff1d 100644 --- a/Demos/LunarG-VulkanSamples/API-Samples/API-Samples.xcodeproj/project.pbxproj +++ b/Demos/LunarG-VulkanSamples/API-Samples/API-Samples.xcodeproj/project.pbxproj @@ -547,7 +547,7 @@ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1160; + LastUpgradeCheck = 1200; }; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "API-Samples" */; compatibilityVersion = "Xcode 8.0"; @@ -748,6 +748,11 @@ COPY_PHASE_STRIP = NO; ENABLE_BITCODE = NO; ENABLE_TESTABILITY = YES; + "EXCLUDED_ARCHS[sdk=appletvos*]" = arm64e; + "EXCLUDED_ARCHS[sdk=appletvsimulator*]" = arm64; + "EXCLUDED_ARCHS[sdk=iphoneos*]" = arm64e; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; + "EXCLUDED_ARCHS[sdk=macosx*]" = arm64; GCC_C_LANGUAGE_STANDARD = c99; GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -777,6 +782,11 @@ CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = NO; ENABLE_BITCODE = NO; + "EXCLUDED_ARCHS[sdk=appletvos*]" = arm64e; + "EXCLUDED_ARCHS[sdk=appletvsimulator*]" = arm64; + "EXCLUDED_ARCHS[sdk=iphoneos*]" = arm64e; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; + "EXCLUDED_ARCHS[sdk=macosx*]" = arm64; GCC_C_LANGUAGE_STANDARD = c99; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREPROCESSOR_DEFINITIONS = ( diff --git a/Demos/LunarG-VulkanSamples/API-Samples/API-Samples.xcodeproj/xcshareddata/xcschemes/API-Samples-iOS.xcscheme b/Demos/LunarG-VulkanSamples/API-Samples/API-Samples.xcodeproj/xcshareddata/xcschemes/API-Samples-iOS.xcscheme index cc7a3549..6dfcf408 100644 --- a/Demos/LunarG-VulkanSamples/API-Samples/API-Samples.xcodeproj/xcshareddata/xcschemes/API-Samples-iOS.xcscheme +++ b/Demos/LunarG-VulkanSamples/API-Samples/API-Samples.xcodeproj/xcshareddata/xcschemes/API-Samples-iOS.xcscheme @@ -1,6 +1,6 @@ - - - - diff --git a/Demos/LunarG-VulkanSamples/API-Samples/API-Samples.xcodeproj/xcshareddata/xcschemes/API-Samples-macOS.xcscheme b/Demos/LunarG-VulkanSamples/API-Samples/API-Samples.xcodeproj/xcshareddata/xcschemes/API-Samples-macOS.xcscheme index e35909ee..4e9d68aa 100644 --- a/Demos/LunarG-VulkanSamples/API-Samples/API-Samples.xcodeproj/xcshareddata/xcschemes/API-Samples-macOS.xcscheme +++ b/Demos/LunarG-VulkanSamples/API-Samples/API-Samples.xcodeproj/xcshareddata/xcschemes/API-Samples-macOS.xcscheme @@ -1,6 +1,6 @@ - - - - diff --git a/Demos/LunarG-VulkanSamples/Cube/Cube.xcodeproj/project.pbxproj b/Demos/LunarG-VulkanSamples/Cube/Cube.xcodeproj/project.pbxproj index ac1fa37d..02353401 100644 --- a/Demos/LunarG-VulkanSamples/Cube/Cube.xcodeproj/project.pbxproj +++ b/Demos/LunarG-VulkanSamples/Cube/Cube.xcodeproj/project.pbxproj @@ -287,7 +287,7 @@ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1160; + LastUpgradeCheck = 1200; }; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Cube" */; compatibilityVersion = "Xcode 8.0"; @@ -514,6 +514,11 @@ COPY_PHASE_STRIP = NO; ENABLE_BITCODE = NO; ENABLE_TESTABILITY = YES; + "EXCLUDED_ARCHS[sdk=appletvos*]" = arm64e; + "EXCLUDED_ARCHS[sdk=appletvsimulator*]" = arm64; + "EXCLUDED_ARCHS[sdk=iphoneos*]" = arm64e; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; + "EXCLUDED_ARCHS[sdk=macosx*]" = arm64; GCC_C_LANGUAGE_STANDARD = c99; GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -544,6 +549,11 @@ CLANG_ENABLE_OBJC_ARC = NO; ENABLE_BITCODE = NO; ENABLE_NS_ASSERTIONS = NO; + "EXCLUDED_ARCHS[sdk=appletvos*]" = arm64e; + "EXCLUDED_ARCHS[sdk=appletvsimulator*]" = arm64; + "EXCLUDED_ARCHS[sdk=iphoneos*]" = arm64e; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; + "EXCLUDED_ARCHS[sdk=macosx*]" = arm64; GCC_C_LANGUAGE_STANDARD = c99; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_SYMBOLS_PRIVATE_EXTERN = NO; diff --git a/Demos/LunarG-VulkanSamples/Cube/Cube.xcodeproj/xcshareddata/xcschemes/Cube-iOS.xcscheme b/Demos/LunarG-VulkanSamples/Cube/Cube.xcodeproj/xcshareddata/xcschemes/Cube-iOS.xcscheme index 7a573850..90782be8 100644 --- a/Demos/LunarG-VulkanSamples/Cube/Cube.xcodeproj/xcshareddata/xcschemes/Cube-iOS.xcscheme +++ b/Demos/LunarG-VulkanSamples/Cube/Cube.xcodeproj/xcshareddata/xcschemes/Cube-iOS.xcscheme @@ -1,6 +1,6 @@ - - - - diff --git a/Demos/LunarG-VulkanSamples/Cube/Cube.xcodeproj/xcshareddata/xcschemes/Cube-macOS.xcscheme b/Demos/LunarG-VulkanSamples/Cube/Cube.xcodeproj/xcshareddata/xcschemes/Cube-macOS.xcscheme index 4e45bff9..e4a0e111 100644 --- a/Demos/LunarG-VulkanSamples/Cube/Cube.xcodeproj/xcshareddata/xcschemes/Cube-macOS.xcscheme +++ b/Demos/LunarG-VulkanSamples/Cube/Cube.xcodeproj/xcshareddata/xcschemes/Cube-macOS.xcscheme @@ -1,6 +1,6 @@ - - - - diff --git a/Demos/LunarG-VulkanSamples/Cube/Cube.xcodeproj/xcshareddata/xcschemes/Cube-tvOS.xcscheme b/Demos/LunarG-VulkanSamples/Cube/Cube.xcodeproj/xcshareddata/xcschemes/Cube-tvOS.xcscheme index f551b02d..7ec8e938 100644 --- a/Demos/LunarG-VulkanSamples/Cube/Cube.xcodeproj/xcshareddata/xcschemes/Cube-tvOS.xcscheme +++ b/Demos/LunarG-VulkanSamples/Cube/Cube.xcodeproj/xcshareddata/xcschemes/Cube-tvOS.xcscheme @@ -1,6 +1,6 @@ - - - - diff --git a/Demos/LunarG-VulkanSamples/Hologram/Hologram.xcodeproj/project.pbxproj b/Demos/LunarG-VulkanSamples/Hologram/Hologram.xcodeproj/project.pbxproj index 13038911..a1b2d558 100644 --- a/Demos/LunarG-VulkanSamples/Hologram/Hologram.xcodeproj/project.pbxproj +++ b/Demos/LunarG-VulkanSamples/Hologram/Hologram.xcodeproj/project.pbxproj @@ -265,7 +265,7 @@ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1160; + LastUpgradeCheck = 1200; }; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Hologram" */; compatibilityVersion = "Xcode 8.0"; @@ -426,6 +426,11 @@ COPY_PHASE_STRIP = NO; ENABLE_BITCODE = NO; ENABLE_TESTABILITY = YES; + "EXCLUDED_ARCHS[sdk=appletvos*]" = arm64e; + "EXCLUDED_ARCHS[sdk=appletvsimulator*]" = arm64; + "EXCLUDED_ARCHS[sdk=iphoneos*]" = arm64e; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; + "EXCLUDED_ARCHS[sdk=macosx*]" = arm64; GCC_C_LANGUAGE_STANDARD = c99; GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -457,6 +462,11 @@ CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = NO; ENABLE_BITCODE = NO; + "EXCLUDED_ARCHS[sdk=appletvos*]" = arm64e; + "EXCLUDED_ARCHS[sdk=appletvsimulator*]" = arm64; + "EXCLUDED_ARCHS[sdk=iphoneos*]" = arm64e; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; + "EXCLUDED_ARCHS[sdk=macosx*]" = arm64; GCC_C_LANGUAGE_STANDARD = c99; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREPROCESSOR_DEFINITIONS = GLM_FORCE_RADIANS; diff --git a/Demos/LunarG-VulkanSamples/Hologram/Hologram.xcodeproj/xcshareddata/xcschemes/Hologram-iOS.xcscheme b/Demos/LunarG-VulkanSamples/Hologram/Hologram.xcodeproj/xcshareddata/xcschemes/Hologram-iOS.xcscheme index c859b9b4..b045bc2d 100644 --- a/Demos/LunarG-VulkanSamples/Hologram/Hologram.xcodeproj/xcshareddata/xcschemes/Hologram-iOS.xcscheme +++ b/Demos/LunarG-VulkanSamples/Hologram/Hologram.xcodeproj/xcshareddata/xcschemes/Hologram-iOS.xcscheme @@ -1,6 +1,6 @@ - - - - diff --git a/Demos/LunarG-VulkanSamples/Hologram/Hologram.xcodeproj/xcshareddata/xcschemes/Hologram-macOS.xcscheme b/Demos/LunarG-VulkanSamples/Hologram/Hologram.xcodeproj/xcshareddata/xcschemes/Hologram-macOS.xcscheme index c68b9a64..222a360c 100644 --- a/Demos/LunarG-VulkanSamples/Hologram/Hologram.xcodeproj/xcshareddata/xcschemes/Hologram-macOS.xcscheme +++ b/Demos/LunarG-VulkanSamples/Hologram/Hologram.xcodeproj/xcshareddata/xcschemes/Hologram-macOS.xcscheme @@ -1,6 +1,6 @@ - - - - diff --git a/ExternalDependencies.xcodeproj/project.pbxproj b/ExternalDependencies.xcodeproj/project.pbxproj index 768e3214..0a33ae1e 100644 --- a/ExternalDependencies.xcodeproj/project.pbxproj +++ b/ExternalDependencies.xcodeproj/project.pbxproj @@ -11,8 +11,6 @@ isa = PBXAggregateTarget; buildConfigurationList = 2FEA0AE52490320500EEF3AD /* Build configuration list for PBXAggregateTarget "ExternalDependencies-tvOS" */; buildPhases = ( - A9A5F2C1249D09820016D8B1 /* Create Fat Libraries */, - 2FEA0AE42490320500EEF3AD /* Package External Libraries */, ); dependencies = ( 2FEA0CF12490325400EEF3AD /* PBXTargetDependency */, @@ -26,7 +24,6 @@ isa = PBXAggregateTarget; buildConfigurationList = A972A7E721CEC72F0013AB25 /* Build configuration list for PBXAggregateTarget "ExternalDependencies-macOS" */; buildPhases = ( - A9679AB021D26C7000856BF7 /* Package Libraries */, ); dependencies = ( A972A7E921CEC76A0013AB25 /* PBXTargetDependency */, @@ -40,8 +37,6 @@ isa = PBXAggregateTarget; buildConfigurationList = A972A7ED21CEC8030013AB25 /* Build configuration list for PBXAggregateTarget "ExternalDependencies-iOS" */; buildPhases = ( - A932E9C6249A7B9B00D64150 /* Create Fat Libraries */, - A9679AAF21D26C1400856BF7 /* Package Libraries */, ); dependencies = ( A972A7F121CEC8140013AB25 /* PBXTargetDependency */, @@ -55,6 +50,7 @@ isa = PBXAggregateTarget; buildConfigurationList = A972A7F521CEC81B0013AB25 /* Build configuration list for PBXAggregateTarget "ExternalDependencies" */; buildPhases = ( + A9194DF624E8990C00FB127B /* Create XCFramework */, A9FC5F8B249DB48D003CB086 /* Package Finish */, ); dependencies = ( @@ -1728,6 +1724,9 @@ A913F24424CF87AE006CB02F /* ShaderLang.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShaderLang.h; sourceTree = ""; }; A913F25724CF87AE006CB02F /* CodeGen.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CodeGen.cpp; sourceTree = ""; }; A913F25824CF87AE006CB02F /* Link.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Link.cpp; sourceTree = ""; }; + A9194DE624E77A2E00FB127B /* copy_to_staging.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = copy_to_staging.sh; sourceTree = ""; }; + A9194DF424E8940600FB127B /* copy_ext_lib_to_staging.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = copy_ext_lib_to_staging.sh; sourceTree = ""; }; + A9194DF524E8979100FB127B /* create_ext_lib_xcframeworks.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = create_ext_lib_xcframeworks.sh; sourceTree = ""; }; A932E9C5249A743B00D64150 /* create_fat_lib_func.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = create_fat_lib_func.sh; sourceTree = ""; }; A932E9DF249BC44D00D64150 /* create_fat_ext_libs.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = create_fat_ext_libs.sh; sourceTree = ""; }; A9415EF624366B0E00566F16 /* packagePregenSpirvToolsHeaders */ = {isa = PBXFileReference; lastKnownFileType = text; path = packagePregenSpirvToolsHeaders; sourceTree = ""; }; @@ -1760,7 +1759,6 @@ A95D911923A7F1E500CBCC60 /* Logger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Logger.h; sourceTree = ""; }; A95D911A23A7F1E500CBCC60 /* doc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = doc.cpp; sourceTree = ""; }; A95D911B23A7F1E500CBCC60 /* disassemble.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = disassemble.cpp; sourceTree = ""; }; - A9679AAE21D269D900856BF7 /* package_ext_libs.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = package_ext_libs.sh; sourceTree = ""; }; A972A80F21CECBBF0013AB25 /* libSPIRVTools.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSPIRVTools.a; sourceTree = BUILT_PRODUCTS_DIR; }; A972A82321CECBE90013AB25 /* libSPIRVTools.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSPIRVTools.a; sourceTree = BUILT_PRODUCTS_DIR; }; A972ABDC21CED7BC0013AB25 /* libglslang.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libglslang.a; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -2179,6 +2177,7 @@ A9765DEE2485758500FDD115 /* validation_state.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = validation_state.cpp; sourceTree = ""; }; A9765DEF2485758500FDD115 /* validate_primitives.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = validate_primitives.cpp; sourceTree = ""; }; A9765DF02485758500FDD115 /* decoration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = decoration.h; sourceTree = ""; }; + A991DB2124E6016E00AEEC36 /* create_xcframework.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = create_xcframework.sh; sourceTree = ""; }; A9C2104521D14FD7006BA2D3 /* fetchDependencies */ = {isa = PBXFileReference; lastKnownFileType = text; path = fetchDependencies; sourceTree = ""; }; A9C2104721D15843006BA2D3 /* ExternalRevisions */ = {isa = PBXFileReference; lastKnownFileType = folder; path = ExternalRevisions; sourceTree = ""; }; A9FC5F7F249DA96D003CB086 /* package_ext_libs_finish.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = package_ext_libs_finish.sh; sourceTree = ""; }; @@ -2381,10 +2380,13 @@ A9679AAB21D2699800856BF7 /* Scripts */ = { isa = PBXGroup; children = ( + A9194DF424E8940600FB127B /* copy_ext_lib_to_staging.sh */, + A9194DE624E77A2E00FB127B /* copy_to_staging.sh */, + A9194DF524E8979100FB127B /* create_ext_lib_xcframeworks.sh */, A932E9DF249BC44D00D64150 /* create_fat_ext_libs.sh */, A932E9C5249A743B00D64150 /* create_fat_lib_func.sh */, + A991DB2124E6016E00AEEC36 /* create_xcframework.sh */, A9FC5F7F249DA96D003CB086 /* package_ext_libs_finish.sh */, - A9679AAE21D269D900856BF7 /* package_ext_libs.sh */, A9415EF624366B0E00566F16 /* packagePregenSpirvToolsHeaders */, ); path = Scripts; @@ -3725,6 +3727,7 @@ buildPhases = ( 2FEA0AE92490321700EEF3AD /* Headers */, 2FEA0B1C2490321700EEF3AD /* Sources */, + A9194DF124E8855F00FB127B /* Copy to Staging */, ); buildRules = ( ); @@ -3741,6 +3744,7 @@ buildPhases = ( 2FEA0B4C2490322100EEF3AD /* Headers */, 2FEA0C0A2490322100EEF3AD /* Sources */, + A9194DEE24E8852B00FB127B /* Copy to Staging */, ); buildRules = ( ); @@ -3757,6 +3761,7 @@ buildPhases = ( 2FEA0CDA2490322B00EEF3AD /* Headers */, 2FEA0CE32490322B00EEF3AD /* Sources */, + A9194DEC24E884FC00FB127B /* Copy to Staging */, ); buildRules = ( ); @@ -3773,6 +3778,7 @@ buildPhases = ( A976290021CC608E00B52A68 /* Headers */, A976290121CC609100B52A68 /* Sources */, + A9194DE724E8431600FB127B /* Copy to Staging */, ); buildRules = ( ); @@ -3789,6 +3795,7 @@ buildPhases = ( A97628FF21CC608900B52A68 /* Headers */, A97628FE21CC608400B52A68 /* Sources */, + A9194DEB24E85ABC00FB127B /* Copy to Staging */, ); buildRules = ( ); @@ -3805,6 +3812,7 @@ buildPhases = ( A972A7FD21CECBBF0013AB25 /* Headers */, A972A80521CECBBF0013AB25 /* Sources */, + A9194DED24E8851900FB127B /* Copy to Staging */, ); buildRules = ( ); @@ -3821,6 +3829,7 @@ buildPhases = ( A972A81121CECBE90013AB25 /* Headers */, A972A81921CECBE90013AB25 /* Sources */, + A9194DEF24E8853B00FB127B /* Copy to Staging */, ); buildRules = ( ); @@ -3837,6 +3846,7 @@ buildPhases = ( A972ABCA21CED7BC0013AB25 /* Headers */, A972ABD221CED7BC0013AB25 /* Sources */, + A9194DF024E8854D00FB127B /* Copy to Staging */, ); buildRules = ( ); @@ -3853,6 +3863,7 @@ buildPhases = ( A972ABDE21CED7CB0013AB25 /* Headers */, A972ABE621CED7CB0013AB25 /* Sources */, + A9194DF224E8856E00FB127B /* Copy to Staging */, ); buildRules = ( ); @@ -3869,7 +3880,7 @@ A9F55D25198BE6A7004EC31B /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1160; + LastUpgradeCheck = 1200; ORGANIZATIONNAME = "The Brenwill Workshop Ltd."; TargetAttributes = { 2FEA0ADD2490320500EEF3AD = { @@ -3918,7 +3929,7 @@ /* End PBXProject section */ /* Begin PBXShellScriptBuildPhase section */ - 2FEA0AE42490320500EEF3AD /* Package External Libraries */ = { + A9194DE724E8431600FB127B /* Copy to Staging */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -3927,16 +3938,16 @@ ); inputPaths = ( ); - name = "Package External Libraries"; + name = "Copy to Staging"; outputFileListPaths = ( ); outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "export MVK_OS=\"tvOS\"\nexport MVK_BUILT_PROD_DIR=\"${BUILT_PRODUCTS_DIR}-${MVK_OS}\"\n\n. \"${SRCROOT}/Scripts/package_ext_libs.sh\"\n"; + shellScript = ". \"${SRCROOT}/Scripts/copy_ext_lib_to_staging.sh\"\n"; }; - A932E9C6249A7B9B00D64150 /* Create Fat Libraries */ = { + A9194DEB24E85ABC00FB127B /* Copy to Staging */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -3945,16 +3956,16 @@ ); inputPaths = ( ); - name = "Create Fat Libraries"; + name = "Copy to Staging"; outputFileListPaths = ( ); outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "export MVK_OS=\"iOS\"\nexport MVK_OS_PROD_EXTN=\"iphoneos\"\nexport MVK_SIM_PROD_EXTN=\"iphonesimulator\"\n\n. \"${SRCROOT}/Scripts/create_fat_ext_libs.sh\"\n"; + shellScript = ". \"${SRCROOT}/Scripts/copy_ext_lib_to_staging.sh\"\n"; }; - A9679AAF21D26C1400856BF7 /* Package Libraries */ = { + A9194DEC24E884FC00FB127B /* Copy to Staging */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -3963,16 +3974,16 @@ ); inputPaths = ( ); - name = "Package Libraries"; + name = "Copy to Staging"; outputFileListPaths = ( ); outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "export MVK_OS=\"iOS\"\nexport MVK_BUILT_PROD_DIR=\"${BUILT_PRODUCTS_DIR}-${MVK_OS}\"\n\n. \"${SRCROOT}/Scripts/package_ext_libs.sh\"\n"; + shellScript = ". \"${SRCROOT}/Scripts/copy_ext_lib_to_staging.sh\"\n"; }; - A9679AB021D26C7000856BF7 /* Package Libraries */ = { + A9194DED24E8851900FB127B /* Copy to Staging */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -3981,16 +3992,16 @@ ); inputPaths = ( ); - name = "Package Libraries"; + name = "Copy to Staging"; outputFileListPaths = ( ); outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "export MVK_OS=\"macOS\"\nexport MVK_BUILT_PROD_DIR=\"${BUILT_PRODUCTS_DIR}\"\n\n. \"${SRCROOT}/Scripts/package_ext_libs.sh\"\n"; + shellScript = ". \"${SRCROOT}/Scripts/copy_ext_lib_to_staging.sh\"\n"; }; - A9A5F2C1249D09820016D8B1 /* Create Fat Libraries */ = { + A9194DEE24E8852B00FB127B /* Copy to Staging */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -3999,14 +4010,104 @@ ); inputPaths = ( ); - name = "Create Fat Libraries"; + name = "Copy to Staging"; outputFileListPaths = ( ); outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "export MVK_OS=\"tvOS\"\nexport MVK_OS_PROD_EXTN=\"appletvos\"\nexport MVK_SIM_PROD_EXTN=\"appletvsimulator\"\n\n. \"${SRCROOT}/Scripts/create_fat_ext_libs.sh\"\n"; + shellScript = ". \"${SRCROOT}/Scripts/copy_ext_lib_to_staging.sh\"\n"; + }; + A9194DEF24E8853B00FB127B /* Copy to Staging */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "Copy to Staging"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = ". \"${SRCROOT}/Scripts/copy_ext_lib_to_staging.sh\"\n"; + }; + A9194DF024E8854D00FB127B /* Copy to Staging */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "Copy to Staging"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = ". \"${SRCROOT}/Scripts/copy_ext_lib_to_staging.sh\"\n"; + }; + A9194DF124E8855F00FB127B /* Copy to Staging */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "Copy to Staging"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = ". \"${SRCROOT}/Scripts/copy_ext_lib_to_staging.sh\"\n\n"; + }; + A9194DF224E8856E00FB127B /* Copy to Staging */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "Copy to Staging"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = ". \"${SRCROOT}/Scripts/copy_ext_lib_to_staging.sh\"\n"; + }; + A9194DF624E8990C00FB127B /* Create XCFramework */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "Create XCFramework"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = ". \"${SRCROOT}/Scripts/create_ext_lib_xcframeworks.sh\"\n"; }; A9FC5F8B249DB48D003CB086 /* Package Finish */ = { isa = PBXShellScriptBuildPhase; @@ -5307,6 +5408,11 @@ COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + "EXCLUDED_ARCHS[sdk=appletvos*]" = arm64e; + "EXCLUDED_ARCHS[sdk=appletvsimulator*]" = arm64; + "EXCLUDED_ARCHS[sdk=iphoneos*]" = arm64e; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; + "EXCLUDED_ARCHS[sdk=macosx*]" = arm64; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; @@ -5356,6 +5462,11 @@ COPY_PHASE_STRIP = YES; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + "EXCLUDED_ARCHS[sdk=appletvos*]" = arm64e; + "EXCLUDED_ARCHS[sdk=appletvsimulator*]" = arm64; + "EXCLUDED_ARCHS[sdk=iphoneos*]" = arm64e; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; + "EXCLUDED_ARCHS[sdk=macosx*]" = arm64; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_NO_COMMON_BLOCKS = YES; diff --git a/ExternalDependencies.xcodeproj/xcshareddata/xcschemes/ExternalDependencies (Debug).xcscheme b/ExternalDependencies.xcodeproj/xcshareddata/xcschemes/ExternalDependencies (Debug).xcscheme index 18da2b70..afa27165 100644 --- a/ExternalDependencies.xcodeproj/xcshareddata/xcschemes/ExternalDependencies (Debug).xcscheme +++ b/ExternalDependencies.xcodeproj/xcshareddata/xcschemes/ExternalDependencies (Debug).xcscheme @@ -1,6 +1,6 @@ m }]; if (hasPresentTime) { +#if MVK_OS_SIMULATOR + // If MTLDrawable.presentedTime/addPresentedHandler isn't supported, just treat it as if the + // present happened when requested + _swapchain->recordPresentTime(presentID, desiredPresentTime, desiredPresentTime); +#else if ([_mtlDrawable respondsToSelector: @selector(addPresentedHandler:)]) { [_mtlDrawable addPresentedHandler: ^(id drawable) { // Record the presentation time @@ -1191,7 +1196,9 @@ void MVKPresentableSwapchainImage::presentCAMetalDrawable(id m // present happened when requested _swapchain->recordPresentTime(presentID, desiredPresentTime, desiredPresentTime); } +#endif } + } // Resets the MTLTexture and CAMetalDrawable underlying this image. diff --git a/MoltenVK/MoltenVK/GPUObjects/MVKSync.mm b/MoltenVK/MoltenVK/GPUObjects/MVKSync.mm index 4f8ec3d5..c63a16e5 100644 --- a/MoltenVK/MoltenVK/GPUObjects/MVKSync.mm +++ b/MoltenVK/MoltenVK/GPUObjects/MVKSync.mm @@ -78,7 +78,7 @@ MVKSemaphoreImpl::~MVKSemaphoreImpl() { #pragma mark - -#pragma mark MVKSemaphoreMTLEvent +#pragma mark MVKSemaphoreMTLFence // Could use any encoder. Assume BLIT is fastest and lightest. // Nil mtlCmdBuff will do nothing. diff --git a/MoltenVKPackaging.xcodeproj/project.pbxproj b/MoltenVKPackaging.xcodeproj/project.pbxproj index 5c40bb2c..cc8eefc1 100644 --- a/MoltenVKPackaging.xcodeproj/project.pbxproj +++ b/MoltenVKPackaging.xcodeproj/project.pbxproj @@ -338,7 +338,7 @@ A90B2B1D1A9B6170008EE819 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1160; + LastUpgradeCheck = 1200; TargetAttributes = { A9FEADBC1F3517480010240E = { DevelopmentTeam = VU3TCKU48B; diff --git a/MoltenVKPackaging.xcodeproj/xcshareddata/xcschemes/MVKShaderConverterTool Package.xcscheme b/MoltenVKPackaging.xcodeproj/xcshareddata/xcschemes/MVKShaderConverterTool Package.xcscheme index 7764ac00..e47c8065 100644 --- a/MoltenVKPackaging.xcodeproj/xcshareddata/xcschemes/MVKShaderConverterTool Package.xcscheme +++ b/MoltenVKPackaging.xcodeproj/xcshareddata/xcschemes/MVKShaderConverterTool Package.xcscheme @@ -1,6 +1,6 @@ - - - - diff --git a/Scripts/copy_ext_lib_to_staging.sh b/Scripts/copy_ext_lib_to_staging.sh new file mode 100755 index 00000000..a2dbe9d6 --- /dev/null +++ b/Scripts/copy_ext_lib_to_staging.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +export MVK_XCFWK_STAGING_DIR="${PROJECT_DIR}/External/build/Intermediates/XCFrameworkStaging/${CONFIGURATION}" +. "${SRCROOT}/Scripts/copy_to_staging.sh" diff --git a/Scripts/copy_to_staging.sh b/Scripts/copy_to_staging.sh new file mode 100755 index 00000000..740abdd1 --- /dev/null +++ b/Scripts/copy_to_staging.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +# Query the architectures in the built static library. If it contains only a single architecture, +# copy the file into a separate file in its own directory within the XCFrameworkStaging directory. +# If it contains mulitple architectures, extract each architecture into a separate file in its own +# directory within the XCFrameworkStaging directory. +# +# Requires the variable MVK_XCFWK_STAGING_DIR. +# +export MVK_PROD_FILENAME="lib${PRODUCT_NAME}.a" +export MVK_BUILT_PROD_FILE="${BUILT_PRODUCTS_DIR}/${MVK_PROD_FILENAME}" + +IFS=' ' read -ra archs <<< $(lipo -archs "${MVK_BUILT_PROD_FILE}") +if [ ${#archs[@]} -eq '1' ]; then + arch="${archs[0]}" + staging_dir="${MVK_XCFWK_STAGING_DIR}/${arch}${EFFECTIVE_PLATFORM_NAME}" + mkdir -p "${staging_dir}" + cp -a "${MVK_BUILT_PROD_FILE}" "${staging_dir}/${MVK_PROD_FILENAME}" +else + for arch in ${archs[@]}; do + staging_dir="${MVK_XCFWK_STAGING_DIR}/${arch}${EFFECTIVE_PLATFORM_NAME}" + mkdir -p "${staging_dir}" + lipo "${MVK_BUILT_PROD_FILE}" -thin ${arch} -output "${staging_dir}/${MVK_PROD_FILENAME}" + done +fi + + + + + + + + diff --git a/Scripts/create_ext_lib_xcframeworks.sh b/Scripts/create_ext_lib_xcframeworks.sh new file mode 100755 index 00000000..83f99328 --- /dev/null +++ b/Scripts/create_ext_lib_xcframeworks.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +. "${PROJECT_DIR}/Scripts/create_xcframework.sh" + +export MVK_EXT_DIR="${PROJECT_DIR}/External" +export MVK_XCFWK_STAGING_DIR="${MVK_EXT_DIR}/build/Intermediates/XCFrameworkStaging" +export MVK_XCFWK_DEST_DIR="${MVK_EXT_DIR}/build" + +# Assemble the headers for the external libraries +abs_ext_dir=`cd "${MVK_EXT_DIR}"; pwd; cd - > /dev/null` +hdr_dir="${MVK_XCFWK_STAGING_DIR}/Headers" +rm -rf "${hdr_dir}" +mkdir -p "${hdr_dir}" +ln -sfn "${abs_ext_dir}/SPIRV-Cross" "${hdr_dir}/SPIRVCross" +ln -sfn "${abs_ext_dir}/glslang/External/spirv-tools/include/spirv-tools" "${hdr_dir}/SPIRVTools" +ln -sfn "${abs_ext_dir}/glslang" "${hdr_dir}/glslang" + +create_xcframework "SPIRVCross" +create_xcframework "SPIRVTools" +create_xcframework "glslang" diff --git a/Scripts/create_xcframework.sh b/Scripts/create_xcframework.sh new file mode 100755 index 00000000..de6dec6f --- /dev/null +++ b/Scripts/create_xcframework.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +# Creates a universal XCFramework for a product from any libraries that can be found for the product. +# +# Takes one parameter: +# 1 - product_name +# +# Requires the variables MVK_XCFWK_STAGING_DIR and MVK_XCFWK_DEST_DIR. +# +function create_xcframework() { + prod_name=${1} + xcfwk_path="${MVK_XCFWK_DEST_DIR}/${CONFIGURATION}/${prod_name}.xcframework" + hdr_path="${MVK_XCFWK_STAGING_DIR}/Headers/${prod_name}" + + xcfwk_cmd="xcodebuild -create-xcframework -output \"${xcfwk_path}\"" + + for prod_staging_dir in "${MVK_XCFWK_STAGING_DIR}/${CONFIGURATION}"/*; do + prod_lib_path="${prod_staging_dir}/lib${prod_name}.a" + xcfwk_cmd+=" -library \"${prod_lib_path}\"" +# xcfwk_cmd+=" -headers \"${hdr_path}\"" # Headers currently break build during usage due to Xcode 12 bug: https://developer.apple.com/forums/thread/651043?answerId=628400022#628400022 + done + + rm -rf "${xcfwk_path}" + eval "${xcfwk_cmd}" +} diff --git a/Scripts/package_ext_libs.sh b/Scripts/package_ext_libs.sh deleted file mode 100755 index 8ec1a591..00000000 --- a/Scripts/package_ext_libs.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -set -e - -export MVK_EXT_LIB_DST_PATH="${PROJECT_DIR}/External/build/" -export MVK_EXT_LIB_DST_OS_PATH="${MVK_EXT_LIB_DST_PATH}/${CONFIGURATION}/${MVK_OS}" - -rm -rf "${MVK_EXT_LIB_DST_OS_PATH}" -mkdir -p "${MVK_EXT_LIB_DST_OS_PATH}" - -cp -a "${MVK_BUILT_PROD_DIR}/"*.a "${MVK_EXT_LIB_DST_OS_PATH}" diff --git a/fetchDependencies b/fetchDependencies index 583993ae..50989d9f 100755 --- a/fetchDependencies +++ b/fetchDependencies @@ -480,9 +480,10 @@ if [ "$XC_USE_BCKGND" != "" ]; then wait fi -# Update latest symlink and clean MoltenVK for rebuild +# Build XCFrameworks, update latest symlink, and clean MoltenVK for rebuild PROJECT_DIR="." CONFIGURATION=${XC_CONFIG} +. "./Scripts/create_ext_lib_xcframeworks.sh" . "./Scripts/package_ext_libs_finish.sh" echo ========== Finished at `date +"%r"` ==========