66 Commits

Author SHA1 Message Date
Bill Hollings
12592abbc9 Update copyright notices to year 2023. 2023-01-13 12:19:37 -05:00
Bill Hollings
4d003bf256 Document new linkage model used by Xcode 14 and later, and how to link
MoltenVK to an app or game using Xcode 13 or earlier.
2022-11-15 18:48:36 -05:00
Bill Hollings
608342b528 Update documentation for prefilling Metal command buffers options. 2022-10-18 12:41:13 -04:00
Bill Hollings
0cc6e1d3a4 Fix support for MVK_HIDE_VULKAN_SYMBOLS build setting.
- Remove separate extension entry points for 1.3 promoted
  vkCmdBeginRenderingKHR() and vkCmdEndRenderingKHR() functions,
  which caused build breaks when MVK_HIDE_VULKAN_SYMBOLS=1.
- For consistency, hide vkGetMoltenVKConfigurationMVK(),
  vkSetMoltenVKConfigurationMVK(), and vkGetVersionStringsMVK()
  when MVK_HIDE_VULKAN_SYMBOLS=1, which was an oversight in original
  implementation of hiding Vulkan functions.
- Update build `README.md` for generic command line build settings
  and MVK_HIDE_VULKAN_SYMBOLS in particular.
2022-10-09 16:32:26 -04:00
Bill Hollings
ac39eb24e1 Add support for Vulkan 1.2.
- Set MVK_VULKAN_API_VERSION from VK_API_VERSION_1_2.
- Update MoltenVK version to 1.2.0.
- Remove several previously overlooked extension suffixes
  in use of promoted Vulkan struct and enum values.
- Update documentation.
2022-09-26 11:25:49 -04:00
Bill Hollings
26d4a13e34 Support Xcode 14, macOS 13, and iOS/tvOS 16.
- Update minimum Xcode deployment targets to macOS 10.13, iOS 11, and tvOS 11,
  to avoid Xcode build warnings.
- Add support for MTLLanguageVersion3_0 enumeration.
- Build efficiencies:
  - Build scripts create_dylib.sh and gen_moltenvk_rev_hdr.sh
    only run if build dependencies require it.
  - Packaging and copy_to_staging.sh scripts are too complex to define dependencies,
    and are fast, so configured to run every time, to avoid build warning.
- Replace use of deprecated sprintf() with  snprintf().
- Replace use of deprecated kIOMasterPortDefault with  kIOMainPortDefault.
- Support old-style GPU debug capture only if building for earlier minimum
  deployment targets, to avoid deprecation warning.
- Update minimum Xcode deployment targets of Cube demo to macOS 10.14, iOS 12,
  and tvOS 12, to avoid Xcode build warning regarding MTLSharedEvent in .
- Update README.md document regarding minimum Xcode deployment targets.
2022-07-06 18:15:10 -04:00
Bill Hollings
9fa373ebbb MoltenVK_icd.json support VK_KHR_portability_enumeration extension.
Update README.md and MoltenVK_Runtime_UserGuide.md to document the impact
of the VK_KHR_portability_enumeration extension during runtime loading on macOS.
Update MoltenVK version to 1.1.10.
2022-04-15 13:57:10 -04:00
Nikita Fediuchin
4efb90b3c1 Update license year 2022-02-04 13:33:27 +02:00
Bill Hollings
5de7f5551c Support building MoltenVK with static Vulkan linkage symbols hidden.
Add build environment variable MVK_HIDE_VULKAN_SYMBOLS. to allow MoltenVK
to be built with static Vulkan API symbols hidden, to avoid library linking
conflicts when bound to a Vulkan Loader that also exports identical symbols.

The default value of MVK_HIDE_VULKAN_SYMBOLS is 0,
meaning Vulkan static symbols are exposed by default.

Add MVK_PUBLIC_VULKAN_SYMBOL directive to mark each Vulkan call symbols
for exporting or hiding.

Update the MoltenVK Xcode project to add the MVK_HIDE_VULKAN_SYMBOLS build
setting, and set the ENABLE_TESTABILITY build setting to NO, because it
conflicts with stripping symbols.

Update MoltenVK version to 1.1.7.
2021-11-17 18:22:33 -05: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
bce76f1d29 GitHub repository enhancements.
Document availability of GitHub Discussions in `README.md`.
Expose .github/workflows/CI.yml in MoltenVKPackaging Xcode project.
2021-02-12 10:46:57 -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
Artyom Kohver
972f292cca
Update README.md 2021-01-09 00:13:44 +03:00
Artyom Kohver
3d46b93591
Hide note about a reader if you already use one. 2021-01-09 00:08:13 +03: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
1329f3adee Update build scripts to build for Mac Catalyst. 2020-11-30 18:52:34 -05:00
Bill Hollings
fe3c2e156b Update validation policy in README.md document to cover attrition of existing validation code. 2020-10-02 12:38:30 -04:00
Bill Hollings
78c58cc026 Add validation policy for MoltenVK development to README.md document.
Remove unnecessary image view format validation.
2020-10-02 12:22:32 -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
e9c4b4813b Cleanup Vulkan 1.1 info.
Update remaining documents to reference Vulkan 1.1 instead of 1.0.
Per Vulkan 1.1 spec, remove now-obsolete MVKInstance code
that emits error if app requests higher Vulkan version.
Upgrade MoltenVK version to 1.1.0.
2020-09-11 11:16:34 -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
5e5d6439da Update documentation to cover tvOS, iOS Simulator, and tvOS Simulator. 2020-06-23 23:06:08 -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
d984d403bf Makefile supports building fat iOS and tvOS libraries from command line. 2020-06-22 15:56:22 -04:00
Bill Hollings
ac204382db Merge simulator support with tvOS support. 2020-06-19 15:05:43 -04:00
Bill Hollings
50828dde93 fetchDependencies supports iOS simulator fat external library builds.
fetchDependencies supports options for specifying which platform options to build for.
Fix SPIRV-Tools builds to avoid code stripping warnings.
2020-06-17 19:10:33 -04:00
Bill Hollings
23818e30ec Fixes for the make install build command.
Fix the make install build command to overwrite the existing framework
in the system framework library.
Update README.md to clarify the instructions for using make install.
2020-04-02 21:11:14 -04:00
Bill Hollings
c1f1dd09d5 Update documentation to clarify that MoltenVK is not a fully-compliant implementation of Vulkan. 2020-03-19 18:01:05 -04:00
Bill Hollings
8ec682938b Update copyright to 2020. 2020-01-07 16:47:29 -05:00
Bill Hollings
5c7904c3a7 Add request for feedback from people who reject MoltenVK to README.md document.
Update MoltenVK version to 1.0.38.
2019-09-25 15:41:40 -05:00
Bill Hollings
65eed2fe33 Reduce memory leaks when autorelease pools are not available.
Remove use of autorelease.
Rename getXXX() functions that returned autoreleased objects to newXXX() that don't.
Calling functions now responsible for releasing returned objects from these functions.
Move creation and tracking of texture->texture views for copying to MVKImage.
MVKCmdCopyImage retrieve texture view from MVKImage.
MVKMTLFunction responsible for releasing its MTLFunction.
Add dev notes to README.md.
2019-07-17 18:24:07 -04:00
Bill Hollings
ef8de08ff1 Skip SPIRV-Tools build in Travis.
Add fetchDependencies option to skip building SPIRV-Tools and use a template of pre-generated headers.
Modify .travis.yml to use this.
2019-06-16 12:00:22 -04:00
Bill Hollings
fbf2af58a0 Fixes and consolidation of external library header references.
All external library header references consistently include framework references.
Cleanup references to external library headers that are no longer required.
Simplify and consolidate external library header paths in Xcode projects.
Add MVK_EXCLUDE_SPIRV_TOOLS build option to avoid use of SPIRV-Tools library.
Remove all other references to headers within SPIRV-Tools library.
2019-05-28 17:19:43 -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
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
c57e29bc5c Clarify Xcode version requirements in documentation. 2019-02-13 14:34:55 -05:00
Bill Hollings
677f2cb9be Modify README.md to direct developers to Vulkan SDK. 2019-02-08 19:36:52 -05:00
Bill Hollings
fe55930fd5 Update Brenwill copyright noticies to 2019. 2019-01-01 21:13:25 -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
Bill Hollings
5d8d4d2440 Fixes to documentation for extensions and building.
Indicate both vk_KHR_maintenance1 & vk_AMD_negative_viewport_height extensions are available.
2018-09-16 14:46:01 -04:00
Bill Hollings
2d4de6db68 Fixes to attachment and image clearing to pass CTS tests.
MVKCmdClearAttachments support clearing multiple attachment layers.
MVKCmdClearImage use renderpass clear, and support clearning multiple image layers.
Rename mvkCmdClearImage() to mvkCmdClearColorImage().
MVKDevice add getFormatIsSupported() to allow devices to test for format support.
MVKFramebuffer support multiple layers.
mvk_datatypes.h support both 2D and 3D mipmap calculations and allow
mvkMTLPrimitiveTopologyClassFromVkPrimitiveTopology() in iOS.
Remove support for VK_FORMAT_B10G11R11_UFLOAT_PACK32 & VK_FORMAT_E5B9G9R9_UFLOAT_PACK32
since format components are reversed on Metal.
Move OS extension source files to new OS directory.
Update to latest SPIRV-Cross version.
Update MoltenVK version to 1.0.16.
2018-07-23 20:12:57 -04:00
Bill Hollings
86bb51554b Support IOSurface on iOS only if IPHONEOS_DEPLOYMENT_TARGET is at least iOS 11.0.
On iOS, only compile IOSurface support, and link IOSurface framework to
libMoltenVK.dylib, if IPHONEOS_DEPLOYMENT_TARGET is at least iOS 11.0.
Update to latest version of SPIRV-Cross.
Update MoltenVK version to 1.0.15.
2018-07-12 18:26:54 -04:00
Hanton Yang
a8cedc9e10 Fix typos in README.md 2018-05-24 13:23:35 +08:00
Bill Hollings
40cdcbba5c Remove mutex locks on MVKDescriptorPool.
Update docs to indicate support for Vulkan 1.0, instead of 1.1.
2018-05-14 15:48:27 -04:00
Hanton
8598b779d1
Update python brew install command
python3 is renamed to python in Homebrew formula. [Link](https://docs.brew.sh/Homebrew-and-Python)
>> Homebrew provides one formula for Python 3.x (python) and another for Python 2.7.x (python@2).
2018-04-21 11:06:40 +08:00
Bill Hollings
c08e22e097 vkCmdCopyBufferToImage() & vkCmdCopyImageToBuffer() support a VkBuffer
that is bound to an offseted position in a VkDeviceMemory.
2018-04-09 14:26:02 -04:00
Vincent Duvert
9a3ab266d1 Use ninja if available to build dependencies
If the ninja build system is installed, ask CMake to generate Ninja build files and use
it for the build.
2018-04-06 08:27:22 +02:00
Bill Hollings
979a7f801f Reorganize External dependencies.
fetchDependencies script now in top directory to avoid Travis caching of
External directory. fetchDependencies is now smart about fetching vs cloning
and building only what is necessary.
2018-03-30 22:16:27 -04:00
Bill Hollings
126e5ff9e1 Add instructions in README.md about building MoltenVK via the command line. 2018-03-30 13:03:37 -04:00