128 Commits

Author SHA1 Message Date
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
7dd143411a
Merge pull request #298 from francoisbertelatschrodinger/whitespaces
Make PhaseScriptExecution works when SRCROOT path has whitespaces.
2018-10-15 13:54:07 -04:00
François Bertel
014b936c4e Make PhaseScriptExecution works when SRCROOT path has whitespaces. 2018-10-08 14:11:39 -04:00
Bill Hollings
4fba647123 Optimize scheme configuration and make consistent. 2018-10-03 10:09:47 -04:00
Bill Hollings
c933330406 Allocate MVKDescriptorSets from a pool within MVKDescriptorPool,
keyed by MVKDescriptorSetLayout reference.

Add MVKObjectPool subclass MVKDeviceObjectPool.
Enlarge window dimensions on macOS Cube demo.
2018-09-30 18:07:13 -04:00
Chip Davis
ec522f0168 Pull extension definitions into a common file.
`#include` this file to define the various bits and pieces needed to
support an extension. Now instead of having to change three places, we
now only need change one.

Also, sort the list of extensions. This list is starting to get a little
long and unruly, so before it gets completely out of hand, let's apply a
little semblance of order to it. The extensions are now arranged in the
following order: first, the Khronos-blessed extensions; then multivendor
extensions; then our (`MVK`) extensions; and finally other vendors'
extensions. These subgroups are sorted alphabetically, as Khronos'
master list is.

I'm not happy about the `MVK_EXTENSION_LAST` kluge. But, C++ apparently
doesn't let you stick a dangling comma on a constructor's initializer
list.
2018-09-19 20:57:29 -05: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
Bill Hollings
63ce4cf1f5 Vulkan extension enhancements.
Add MVKExtensionList struct to track supported and enabled Vulkan extensions within MVKInstance & MVKDevice.
Log supported and enabled Vulkan extensions for VkInstance & VkDevice.
Add error handling for descriptor sets & 3D images in VK_KHR_maintenance1 extension.
All header files load mvk_vulkan.h instead of vulkan.h for consistent use of macOS & iOS extensions.
2018-09-01 16:42:10 -04:00
Bill Hollings
c8a9841d8c Support pre-linking on both Xcode 9 & 10. Update library dependencies.
Remove linking MoltenVKSPIRVToMSLConverter from Build Phase in favour of PreLink.
Update to Vulkan header 1.1.83.
Update to latest version of library dependencies.
2018-08-23 14:02:05 -04:00
Bill Hollings
5bc8403cc1 Support Xcode 10.
Explicitly specify MoltenVKSPIRVToMSLConverter as prelink library.
Update build setting verification check.
2018-08-22 16:22:37 -04:00
Bill Hollings
008274ba67 Support Metal GPU capture scopes.
Add MVKGPUCaptureScope class.
MVKQueue support separate presentation and submission scopes.
2018-08-14 12:32: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
Nat Brown
4ef6a0f8c9 Removes references to IOSurface framework on IOS and markes the IOSurface features as unavailable. A better solution would be to not support IOSurface features prior to iOS 11.0 when the framework became partially public, but this is a good initial solution. 2018-07-09 06:26:11 -07:00
Bill Hollings
9ae35d73c4 Update Xcode version checks to Xcode 9.4. 2018-06-14 12:46:41 -04:00
Bill Hollings
84f92e0d0e Fix merge conflicts and missing OSX files from class extension file refactoring. 2018-05-04 13:02:07 -04:00
Bill Hollings
f857011ec1 Add features to support Vulkan CTS.
Dynamically create frag shaders for clearning attachments and images.
Dynamically create frag shaders for blitting scaled images.
MVKGraphicsPipeline don't create MTLRenderPipelineState if vertex function conversion fails.
MVKComputePipeline don't create MTLComputePipelineState if compute function conversion fails.
Handle SPIRV-Cross errors thrown during SPIR-V parsing in compiler construction.
Set undefined property limits to large, but not max, values to avoid casting issues in app.
Mark multiDrawIndirect features as available.
Update to latest SPIRV-Cross version.
Update to MoltenVK version 1.0.5.
2018-05-04 12:11:19 -04:00
Hanton Yang
723fa9650d Separate categories from MVKOSExtensions.
MTLTextureDescriptor+MoltenVK
MTLSamplerDescriptor+MoltenVK
CAMetalLayer+MoltenVK
2018-04-27 23:04:28 +08:00
Bill Hollings
9fe7e3659a Clean up reference to SDK in dylib build script. 2018-04-09 17:42:51 -04:00
Bill Hollings
20c98e5e46 Add support for caching converted MSL shader code offline from pipeline cache
via vkGetPipelineCacheData(), vkCreatePipelineCache() & vkMergePipelineCaches().

Add the cereal serialization framework as a dependency.
Update documentation. Update project settings to Xcode 9.3.
2018-03-30 12:13:50 -04:00
Bill Hollings
00fda690ca Align versioning of external libraries with those used by LunarG SDK.
Load external library versions using script instead of Git submodules.
SPIRV-Cross, Vulkan-LoaderAndValidationLayers & VulkanSamples versions recorded in files.
glslang version determined by Vulkan-LoaderAndValidationLayers.
SPIRV-Tools & SPIRV-Headers versions loaded by glslang.
When MoltenVK is built as part of the LunarG SDK, use external libraries
sourced from parent Vulkan-LoaderAndValidationLayers.
Use Vulkan headers from Vulkan-LoaderAndValidationLayers.
No longer generate Vulkan specification.
Update documentation.
2018-03-12 10:02:13 -04:00
Bill Hollings
a4e4222140 Populate VkPhysicalDeviceProperties vendorID, deviceID and pipelineCacheUUID.
Fix MVKShaderLibrary missing function prototype warning.
Update to latest SPIRV-Cross.
Update to latest Vulkan-Hpp.
Update to latest Vulkan-LoaderAndValidationLayers.
2018-02-21 14:24:21 -05:00
Karl Schultz
c4ce08402d Disable watermark in debug builds 2018-02-13 12:47:18 -07:00
Bill Hollings
9c4d66d7a6 Add Vulkan Loader and Validation Layer ICD JSON file. 2018-01-09 21:12:02 -05:00
Bill Hollings
9b185a9c3a Fixes to compute workgroup sizes and barriers.
Improved extraction of entry point name and workgroup size from SPIR-V.
Consolidate to a single ThirdPartyConfig.md document.
MSL enhancements to nested function use of globals.
Support customizing MSL based on iOS or macOS platform.
MSL threadgroup barrier memory scope only on iOS MSL 2.0.
Update to latest SPIRV libraries.
2017-12-26 22:20:20 -05:00
Bill Hollings
83f96078ec Add support for LunarG Vulkan Loader ICD API.
Return Loader-compatible structure for dispatchable Vulkan objects.
Add Vulkan-LoaderAndValidationLayers repository as submodule.
2017-12-21 10:48:51 -05:00
Bill Hollings
780d3efe62 Updates and fixes to dynamic library creation process.
Use clang instead of libtool for building dynamic library from static library.
Fix SDK issue when building dylib with Xcode 9 on Sierra.
Add scripts to update submodules to latest versions.
Update to latest versions of submodules.
Remove Brenwill code signing IDs from Demo projects.
2017-11-26 15:37:55 -05:00
Bill Hollings
fd7b8234f9 Initial open-source commit. 2017-11-17 11:14:29 -05:00