38 Commits

Author SHA1 Message Date
Chip Davis
0f5af085e7 Scripts: Support ubsan when building the dylib. 2020-11-03 16:25:59 -06:00
Bill Hollings
9f2fc8f7d0 Update dependency libraries to match Vulkan SDK 1.2.154. 2020-09-28 19:03:00 -04:00
Bill Hollings
a23f99c3e5 Refactor MoltenVKShaderConverter frameworks.
Combine MoltenVKSPIRVToMSLConverter and MoltenVKGLSLToSPIRVConverter
frameworks into a single MoltenVKShaderConverter framework.

Update corresponding directory structures, symlinks, scripts, and build paths.
Update MoltenVK code to use new framework name for headers.
Add symlinks in API-Samples demo to support legacy
MoltenVKGLSLToSPIRVConverter header paths.

In addition to simplifying shader converter code and build management, the
use of only one shader converter framework fixes a race condition within Xcode,
prior to Xcode 12, when multiple targets use the same dependency XCFramework.
2020-09-23 11:09:46 -04:00
Bill Hollings
a47bcdf2c5 Support fat platform libraries in XCFrameworks and dylibs.
Remove EXCLUDED_ARCHS from all Xcode projects to allow fat platform libraries to be built.
Script copy_lib_to_staging.sh no longer breaks fat libraries into single-architecture
libraries, and simply copies fat file to XCFramework staging area.
This permits support for arm64 on macOS, and arm64e on iOS and tvOS.
Creating a Simulator dylib containing both x86_64 and arm64 (Apple Silicon)
architectures is not currently supported by Xcode, so Simulator dylibs are skipped.
2020-09-14 12:01:13 -04:00
Bill Hollings
9406fce556 Fix syntax crash in create_xcframework_func.sh. 2020-09-11 15:01:03 -04:00
Bill Hollings
7af7a3b29b create_xcframework_func.sh script check for header availability before copying.
XCFramework headers are still unusable due to an Xcode bug (documented in
create_xcframework_func.sh), but in testing for this, modifications to
create_xcframework_func.sh were made to test for the header file so that this
will work correctly when the Xcode bug is fixed and headers can be reintroduced.
2020-09-04 12:09:45 -04:00
Bill Hollings
56df7d61d7 Remove MoltenVK fat libraries and frameworks and use XCFramework instead.
- Delete fat library and framework scripts and templates.
- MoltenVK build package now only includes one XCFramework, and separate platform dylibs.
- Modify fetchDependencies and Makefile targets to not build fat libraries,
  and to build simulators separately than platforms instead.
- Script package_moltenvk.sh now copies dylibs for all built platforms.
- Consolidate package_all.sh and delete package_one_os.sh.
- Swap names of copy_lib_to_staging.sh and copy_to_staging.sh scripts.
- Cube demo now uses MoltenVK as XCFramework, and support Simulator builds.
- Hologram demo now uses MoltenVK as dylibs from new packaging location.
- API-Samples demo now uses MoltenVK as XCFramework.
- Update documentation.
2020-09-01 14:39:46 -04:00
Bill Hollings
536d6cf0d4 Add MoltenVK XCFramework.
Add package_moltenvk_xcframework.sh.
Rename package_shader_converter.sh to package_shader_converter_xcframework.sh.
2020-08-27 23:43:06 -04:00
Bill Hollings
e97d11a4f5 Shader converters as XCFramework.
Create shader converters as XCFrameworks.
Don't create shader converters as fat libs, dylibs, or regular frameworks.
Rename create_xcframework.sh to create_xcframework_func.sh.
Use separate MoltenVK packaging scripts for one or all OS's.
Add package_one_os.sh.
Remove package_shader_converter_lib.sh.
Remove redundant GLSL shader converter dependencies in MoltenVK packaging targets.
2020-08-27 19:29:14 -04:00
Bill Hollings
dd59aea71f Use external libraries as XCFrameworks.
Exclude arm64 architectures on macOS and Simulators.
Exclude arm64e architectures on iOS and tvOS.
Stop building fat libraries for external libraries.
Remove package_ext_libs.sh script.
Don't include Headers in ext lib XCFrameworks because of Xcode12 bug in using them.
2020-08-20 15:24:35 -04:00
Bill Hollings
7579cf6a3b Create external libraries as XCFrameworks.
Add script copy_to_staging.sh.
Add script copy_ext_lib_to_staging.sh.
Add script create_xcframework.sh.
Add script create_ext_lib_xcframeworks.sh.
2020-08-20 12:45:12 -04:00
Bill Hollings
d4b5df532e Re-add support for bitcode generation on iOS and tvOS.
Set BITCODE_GENERATION_MODE build setting in all Xcode projects.
create_dylib.sh support BITCODE_GENERATION_MODE.
2020-08-11 20:18:50 -04:00
Bill Hollings
834d391aec Update dependency libraries to match Vulkan SDK 1.2.148.
fetchDependencies support option to skip all library builds.
fetchDependencies avoid sync locks if not building in parallel.
fetchDependencies build glslang headers.
Update ExternalRevisions/README.md glslang build integration section.
Update What's New.
2020-07-27 22:25:44 -04:00
Bill Hollings
927bfddbc7 VkPhysicalDeviceProperties::pipelineCacheUUID include MoltenVK Git revision hash. 2020-07-20 17:53:11 -04:00
Bill Hollings
1acc1ac8ed Fix failure of MoltenVKShaderConverter Xcode build target packaging script.
Update outstanding uses of MVK_BUILT_PROD_PATH to MVK_BUILT_PROD_DIR.
2020-07-08 12:51:29 -04:00
Bill Hollings
b9f1d7519a Makefile add debug build targets.
Fix crash during creation of fat dSYMs.
Travis only build macOS version of everything.
2020-06-23 16:08:00 -04:00
Bill Hollings
abb8792843 fetchDependencies build external libraries in parallel by platform.
Log ext lib build steps to provide user feedback.
Add package_ext_libs_finish.sh script to separate packaging
libraries from building them, to avoid build database conflicts.
Travis only build macOS ext libs.
2020-06-22 00:00:00 -04:00
Bill Hollings
ac204382db Merge simulator support with tvOS support. 2020-06-19 15:05:43 -04:00
Bill Hollings
9fea13773d Support iOS simulator and fat library builds of MoltenVK libraries.
Create fat builds of static, dynamic & framework libraries if both iOS
and simulator versions have been created from separate manual Xcode builds.

Refactor scripts for creating fat libraries to reuse across projects.
Add MVK_BUILT_PROD_DIR to replace use of BUILT_PRODUCTS_DIR in most scripts
to allow flexibility across per-platform compilation.
2020-06-19 09:53:43 -04:00
Bill Hollings
491698e49d Support iOS simulator and fat library builds of external dependency libraries.
Create fat builds of external libraries if both iOS and simulator versions
have been created from separate manual Xcode builds.
Add Scripts/create_fat_libs.sh.
Remove Scripts/package_ext_libs_ios.sh and Scripts/package_ext_libs_macos.sh.
2020-06-17 13:22:10 -04:00
Aman Gupta
aabc94995b forgot a script 2020-06-15 15:54:31 -07:00
Aman Gupta
44a2ec5836 add tvOS boilerplate 2020-06-09 14:47:11 -07:00
Bill Hollings
4a5bf6953c Update fetchDependencies script to use pre-built spirv-tools files by default. 2020-06-02 13:30:52 -04:00
Bill Hollings
2b2bfc3fbd Move generation of API-Samples SPIR-V header files out of fetchDependencies.
Add Demos/LunarG-VulkanSamples/API-Samples/generateSPIRVShaders script.
Update user documentation.
2020-04-12 12:53:17 -04:00
Bill Hollings
a58f6bc441 Update to Vulkan SDK 1.2.135 library dependencies.
Add Scripts/packagePregenSpirvToolsHeaders script to automate packaging Spirv-Tools
headers in support of the fetchDependencies --skip-spirv-tools-build option.
Update Docs/Whats_New.md.
2020-04-02 16:35:48 -04:00
Bill Hollings
ddfa225f79 Fix crash in fetchDependencies on build paths containing spaces. 2019-11-14 17:11:10 -05:00
Bill Hollings
19c397e0b7 Move generation of SPIRV-Cross/mvkSpirvCrossRevisionDerived.h to separate script.
Add Scripts/gen_spirv_cross_rev_hdr.sh script and
call from ExternalDependencies SPIRV-Cross build.
2019-10-22 16:51:27 -04:00
Chip Davis
321af99cad Link to CoreGraphics.framework.
This is needed for color space support. I guess AppKit reexports this
framework on macOS, but UIKit on iOS doesn't.
2019-08-05 23:18:58 -05:00
Bill Hollings
62f374bf7e Allow building external dependency libraries in Debug mode.
Add ExternalDependencies (Debug) scheme to ExternalDependencies Xcode project.
Add --debug option to fetchDependencies script.
Support Release, Debug & Latest directories in External/build directory.
Enable DEPLOYMENT_POSTPROCESSING build setting when compiling
SPIRV-Tools to avoid warning spam when building dylibs.
Disable visibility warnings when building MoltenVKShaderConverter
in Release mode from external libraries built in Debug mode.
Always use -Xlinker -w option when creating dylibs to disable visibility warnings.
2019-04-18 15:08:39 -04:00
Bill Hollings
c388619792 Suppress visibility warning spam when building Debug macOS from SPIRV-Cross Release
Pass -Xlinker -w when building Debug macOS dylibs.
Include -w in OTHER_LDFLAGS when building Debug macOS MoltenVKShaderConverter tool.
2019-04-02 12:25:49 -04:00
Bill Hollings
0f22e2a70e MSL: Fix crash where variable storage buffer pointers are passed down.
Explicitly build dSYM files in BUILT_PRODUCTS_DIR
to avoid conflict between macOS and iOS build locations.
Update to latest SPIRV-Cross version.
2019-03-28 11:58:05 -04:00
Bill Hollings
0ac1edbac0 Project build enhancements, and MoltenVKShaderConverter
tool now validates converted MSL with a test compilation.

Project build scripts now build dylib and framework in separate build directories
to enable MoltenVKShaderConverter to link to static library instead of dynamic library.
Final Package structure remains the same.
In Debug build, copy dylib dSYM files to Package.
Package/Latest directory now links relative to local Debug or Release directory.
Add install option to Makefile.
MoltenVKShaderConverter tool now validates converted MSL with a test compilation.
Clean up various MSL conversion and compilation error logging.
MVKCommandResourceFactory wrap Metal library compile with autorelease pool.
Build ExternalDependencies with same symbol hiding as MoltenVK to suppress visibility warnings.
Update What's New document.
2019-03-22 19:36:21 -04:00
Bill Hollings
64648d19c3 Move MoltenVK clean on dependency build from fetchDependencies.sh to package_ext_libs.sh. 2019-02-24 16:21:20 -05:00
Bill Hollings
6f2dc4bdcb Add static and dynamic libraries to MoltenVKShaderConverter project.
Refactor build scripts.
Update paths to MoltenVKGLSLToSPIRVConverter framework in demos.
Fix rare build race condition on MoltenVKShaderConverter link to MoltenVK.
2019-02-18 22:19:37 +00:00
Bill Hollings
d34b0812fe Allow building external libraries from fetchDependencies script or Xcode.
The fetchDependencies script puts build files in External/build directory.
Xcode puts build files in standard Library/.../DerivedData directory.
Copy compiled external static library files to External/build/iOS &
External/build/macOS regardless of location of intermediates.
2018-12-25 21:43:29 -05:00
Bill Hollings
025259426c Refactor the build environment.
Support creation of static library and build framework and dynamic library from it.
Add Makefile to better support command line or script building integration.
Update demos to each use one of framework, static library, and dynamic library.
Refactor and rename the build scripts.
Refactor and rename the Xcode Schemes.
Update build and runtime documentation.
Update What's New document.
2018-10-30 23:16:12 -04:00
François Bertel
014b936c4e Make PhaseScriptExecution works when SRCROOT path has whitespaces. 2018-10-08 14:11:39 -04:00
Bill Hollings
e721dd6e2c Update build process.
Allow building and packaging MoltenVK for of only iOS or only macOS.
Move packaging scripts out of Xcode projects and into script files.
2018-09-07 11:46:58 -04:00