76 Commits

Author SHA1 Message Date
Bill Hollings
664296abd0 Fix small memory leak during swapchain creation.
Add ability to profile Cube demo on macOS.
2021-06-22 11:50:58 -04:00
Bill Hollings
a7a8a88904 Upgrade projects to Xcode 13 build settings. 2021-06-14 11:35:43 -04:00
Bill Hollings
269fca63ba Upgrade project builds to use C++17. 2021-06-14 10:39:42 -04:00
Bill Hollings
ef34fb7f37 Set project build optimizations to -O2 for all Release mode builds. 2021-06-10 18:32:38 -04:00
Bill Hollings
c0e5f88bf5 Support Xcode 12.5 build settings. 2021-04-30 19:41:54 -04:00
Bill Hollings
d4844490f4 Fix memory leak where swapchains and images were not destroyed due to a retention loop.
Add Cube app iOS device rotation support, to test swapchain destruction on iOS.
2021-03-26 17:45:16 -04:00
Bill Hollings
5648258da7 Remove LunarG/VulkanSamples as a dependency library.
LunarG is planning to retire the LunarG/VulkanSamples repository.
Remove dependency to it, and remove the affected Hologram and API-Samples demo apps.
Update documents, including directing developers to the
KhronosGroup/Vulkan-Samples repository for official demo apps.
2021-03-03 16:43:11 -05:00
Bill Hollings
4d60058efb Remove ONLY_ACTIVE_ARCH from Debug builds.
Debug builds now build for all platform architectures.
2021-02-12 09:50:17 -05:00
Bill Hollings
e5e1f65dfc Update Xcode build settings to cover Xcode 12.4. 2021-02-01 13:50:42 -05:00
Bill Hollings
ff8460ac0b Documentation updates.
Add link to Vulkan SDK Getting Started doc to README.md and
MoltenVK_Runtime_UserGuide.md documents.
Add Github CI badge to README.md, and remove Travis CI badge.
Make document notices of use of Markdown into comments
so they are invisible when using a Markdown reader.
2021-01-21 14:49:24 -05:00
Bill Hollings
015031c955 Update copyright notices to year 2021 and Xcode build settings check to Xcode 12.3. 2021-01-21 13:37:07 -05:00
Bill Hollings
fbc3600787 Support Xcode 12.3 and remove Travis CI ref from project. 2021-01-21 12:27:37 -05:00
Bill Hollings
1ec58c9a92 Support building for Mac Catalyst on macOS 11.0+.
Define MVK_MACCAT build macro and use it to conditionally compile code to align
with build features and capabilities of Mac Catalyst platform on macOS 11.0+.
Treat Mac Catalyst as minor variation of macOS 11.0.
Update documentation.

Currently only support Mac Catalyst on macOS 11.0+, to avoid complexities of
deselecting iOS features and capabilities for Mac Catalyst on previous macOS versions.

Mac Catalyst (and Simulators) require use of XCFrameworks.
Currently unable to generate a dylib for Mac Catalyst.
2020-12-01 19:26:15 -05:00
Bill Hollings
a71267797d Upgrade to Xcode 12.2 build settings. 2020-10-21 23:01:33 -04:00
Bill Hollings
0e72c06e68 Update Xcode build settings check to Xcode 12.0. 2020-10-05 22:46:51 -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
f00de1b5c6 Cleanup master xcode12 merge issues in Demos. 2020-09-11 16:05:29 -04:00
Bill Hollings
51777ca49c Merge branch 'master' of https://github.com/billhollings/MoltenVK into xcode12 2020-09-11 14:03:03 -04:00
Bill Hollings
b7b1435d8b Support Xcode 11.7. 2020-09-11 11:35:44 -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
7c2951f419 Demos exclude arm64 architectures on macOS and Simulators.
Demos exclude arm64e architectures on iOS and tvOS.
2020-08-25 14:22:49 -04:00
Bill Hollings
fe89118435 Support Xcode 12 settings. 2020-08-13 13:13:30 -04:00
Bill Hollings
7aca997250 Support Xcode 11.6. 2020-07-18 00:11:56 -04:00
Bill Hollings
5e5d6439da Update documentation to cover tvOS, iOS Simulator, and tvOS Simulator. 2020-06-23 23:06:08 -04:00
Bill Hollings
5419d229d0 Cube demo run on tvOS and tvOS Simulator. 2020-06-23 21:06:48 -04:00
Bill Hollings
b4de675878 Cube demo running in iOS simulator. 2020-06-23 12:50:40 -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
7cf3b26b37 Demo API-Samples generateSPIRVShaders no longer builds MoltenVKShaderController tool.
The tool will be built during MoltenVK build, and rebuilding just the tool
was clearing away the main MoltenVK build.
2020-06-09 22:38:48 -04:00
Bill Hollings
752c1a908d Refactor Xcode build architectures
Set ARCHS build setting to $(ARCHS_STANDARD_64_BIT) in Xcode projects.
Remove ARCHS and VALID_ARCHS build settings in Xcode targets.
2020-06-09 16:39:23 -04:00
Bill Hollings
9685f5d00a Support Xcode 11.5. 2020-05-22 18:48:29 -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
bd35b76b8d API-Samples demos add input_attachment and push_descriptors demos. 2020-04-11 21:45:47 -04:00
Bill Hollings
eb99488f04 Reinstate VulkanSamples API-Samples demo apps.
MVKShaderConverterTool add support to output SPIR-V as header (.h) files.
Add MVKShaderConverterTool Xcode target.
Add MVKShaderConverterTool Package Xcode scheme.
fetchDependencies builds MVKShaderConverterTool and runs
it on shader files in VulkanSamples API-Samples directory.
2020-04-11 16:19:03 -04:00
Bill Hollings
a644c98864 Disable API-Samples demos and document in Demos/README.md. 2020-04-05 20:44:44 -04:00
Bill Hollings
50eba6fee1 Support Xcode 11.4. 2020-03-25 20:24:07 -04:00
Bill Hollings
8ec682938b Update copyright to 2020. 2020-01-07 16:47:29 -05:00
Bill Hollings
b213996c5e Support Xcode 11.3.
Update What's New document.
2019-12-12 12:38:17 -05:00
Bill Hollings
025abe501a Support Xcode 11.2. 2019-11-04 20:39:41 -05:00
Bill Hollings
93ae214bc8 Support additional capabilities in 1D images, including rendering, clearing, and mipmaps.
Add `MVK_CONFIG_TEXTURE_1D_AS_2D` environment variable, enabled by default.
Modify 1D warning messages to recommend use of `MVK_CONFIG_TEXTURE_1D_AS_2D`.
Update to latest version of SPIRV-Cross.
Align pipeline cache contents to latest CompilerMSL::Options structure.
Clean up code signing on demo Xcode projects.
2019-10-25 14:40:59 -04:00
Bill Hollings
c6e9d6b189 Support Xcode 11.1. 2019-10-11 15:16:13 -04:00
Bill Hollings
a2951a19e6 Support Xcode 11.
Declare _formatDescriptions[] in mvk_datatypes.mm as officially writable
because Clang now locates static const in non-writable memory.
Update build settings to Xcode 11.
Update MoltenVK_Runtime_UserGuide.md about embedding `libMoltenVK.dylib` in an application.
2019-10-01 00:25:09 -04:00
Bill Hollings
355e200a29 Revert to supporting host-coherent memory for linear images on macOS.
MVKImage::getMemoryRequirements() include host-coherent for linear images.
Cube demo on macOS not use staging buffers for loading images.
2019-07-29 15:52:24 -04:00
Bill Hollings
095dd3339b Update to latest version of SPIRV-Cross.
Update demos to latest dependency library versions.
Update to Xcode 10.3.
Update What's New document.
2019-07-24 14:39:38 -04:00
Bill Hollings
0a138c6115 Cube demo use staging buffers on macOS because host-coherent texture memory unavailable. 2019-07-16 13:02:37 -04:00
Bill Hollings
aa6a10570a Support VK_EXT_metal_surface extension.
Modify demo apps to pass OS layer instead of view.
2019-07-03 20:23:43 -04:00
Bill Hollings
c3aaf976ae Add support for the VK_NV_glsl_shader extension.
Support runtime shader compilation from GLSL.
Return VK_ERROR_INVALID_SHADER_NV on shader and pipeline compilation errors.
Add MVKShaderCompilationPerformance::glslToSPRIV to track GLSL conversion performance.
Rename MoltenVKGLSLToSPIRVConverter MVKShaderStage enum to MVKGLSLConversionShaderStage
to avoid naming conflicts with MoltenVK MVKShaderStage enum.
Hologram demo load SPIR-V directly instead of using GLSL through either
MoltenVKGLSLToSPIRVConverter or VK_NV_glsl_shader extension.
Update to latest version of VulkanSamples that supports MVKGLSLConversionShaderStage.
2019-05-10 12:21:03 -04:00
Bill Hollings
ef86d58552 Update to latest version of SPIRV-Cross.
Clean up demo build warnings.
Update What's New document.
2019-04-05 12:08:32 -04: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
e5a890775b Add support for VK_EXTX_portability_subset extension.
Add KhronosGroup/Vulkan-Portability as external dependency repo.
Add ExternalRevisions/Vulkan-Portability_repo_revision.
Add vk_extx_portability_subset.h header file to mvk_vulkan.h.
MVKImageView allow constructor with no image or device.
Add mvkVkComponentMappingsMatch() & mvkVkComponentSwizzlesMatch() functions.
Cleanup some local var init warnings.
2019-01-27 19:52:59 -05:00