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.
Replicate MVKVector.h and MVKVectorAllocator.h into MVKSmallVector.h and
MVKSmallVectorAllocator.h, and collapse class hierarchies.
Add MVKArrayRef struct to allow the contents of MVKSmallVector and MVKVector
to be passed between functions consistently.
Add contents() function to MVKVector to return MVKArrayRef.
MVKCommand constructor not longer take MVKCommandTypePool.
Remove MVKCommand::returnToPool().
MVKCommandTypePool no longer track MVKCommandPool.
Remove MVKCommand.mm.
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.
Move MVKVulkanAPIObject to its own .h/mm files.
Add MVKCmdDebug.h/mm files.
Change extension on MVKExtensions.cpp and MVKBaseObject.cpp to .mm.
Remove unused command use in MVKQueue submit() and waitIdle() functions.
MVKCommandPool constructor use default isPooling value in MVKCommandTypePool constructors.
MVKSwapchainImage pass image index in constructor.
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.
Add MVKDebugReportCallback class.
Add MVKVulkanAPIObject class as base class of classes exposed in Vulkan API.
Remove MVKRefCountedDeviceObject class and move ref-counting to MVKVulkanAPIObject.
Rename MVKDispatchableObject class to MVKDispatchableVulkanAPIObject.
Introduce multiple inheritance mixin classes into class hierarchy.
Add MVKBaseObject::getVulkanAPIObject() function to find Vulkan API object
controlling any subobject that needs to report something.
MVKCommandResourceFactory functions pass in calling object for reporting.
Add MVKBaseObject::reportMessage() & reportError() functions.
Replace mvkNotifyErrorWithText() static function with reportError()
instance function to allow access to debug reporting.
Redefine MVKLog*() functions to call reportError() instance method.
Delete MVKLogging.cpp.
Remove MVKLogging.h from MoltenVKShaderConverter project.
Add mvk_datatypes.hpp to redirect errors in mvk_datatypes.h functions to debug
reporting. Use mvk_datatypes.hpp internally for all references to these functions.
Convert several static methods to instance methods.
Refactor platform defines in MVKSurface.h.
Explicitly count MVKExtensionList extension count to avoid relying on struct size.
Remove MVKCommandBuffer::recordResult() and use setConfigurationResult().
Change log indication of error in logs from [***MoltenVK ERROR***] to [mvk-error],
for consistency with other log level indications.
Update MoltenVK version to 1.0.35.
In the past, MoltenVK signaled fences and semaphores immediately when
Metal reported that the batch was finished executing. But, some commands
do work in completion handlers that run concurrently with this. In
particular, in #278 I shunted copying query pool results onto a
different dispatch queue. This caused a race between this block and the
block which signals fences and semaphores.
Since some commands do work in completion handlers, the handler which
signals semaphores and fences must wait until these handlers finish
running. Also because of this, it is not adequate to submit a fence-only
request to implement `vkQueueWaitIdle()`. So, that function must now
wait for all submissions to complete. To preserve the invariant that
fence-only submissions are equivalent to `vkQueueWaitIdle()`, this
change also makes fence signaling wait for all submissions.
If the queue is continually supplied with new work, this implementation
may delay signaling fences indefinitely. Ideally, fences would only wait
for all work up to that point to complete before signaling. But I'm not
sure how to accomplish that yet.
Fixes#454.
Sometimes, the `CAMetalLayer` backing a view can be replaced--for
example, when the window is moved to another screen, or the style bits
on the window are changed. In that case, we must allow the client the
opportunity to recreate the surface and swapchain.
Layer-backed views always set themselves as the layer's delegate; we use
this fact to Key-Value Observe the view's `layer` property.
Other alternatives considered:
* Registering for `NSViewGlobalFrameDidChange` notifications. Aside from
only working on macOS, this doesn't actually catch every case where we
want to report a lost surface. I'm not even sure it works at all for
Metal.
* Holding a reference to the view, and checking when its layer property
has changed.
* Holding a weak reference to the layer; that way, the reference will
become `nil` when the layer is replaced. But this requires ARC.
Some projects also link against SPIRV-Cross statically, and in order to
avoid ABI conflicts, we should use a private namespace for the
SPIRV-Cross dependency to avoid bugs. See SPIRV-Cross issue #902 for
more information. The new namespace is MVK_spirv_cross, and the code
now makes use of the SPIRV_CROSS_NAMESPACE macro rather than spirv_cross.
Refactor build scripts.
Update paths to MoltenVKGLSLToSPIRVConverter framework in demos.
Fix rare build race condition on MoltenVKShaderConverter link to MoltenVK.
Add mvkGetRegistryID() function to check OS support for registry ID.
Rename build setting MVK_FORCE_LOW_POWER_GPU to MVK_CONFIG_FORCE_LOW_POWER_GPU
and make it an env var / build setting combo.
Rename env var MVK_LOG_LEVEL to MVK_CONFIG_LOG_LEVEL.
Rename MVKLogging.mm to MVKLogging.cpp.
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.
This allows clients to initialize 3D image objects with data in a BC1,
BC2, or BC3 (aka DXTn, aka S3TC) format. Since Metal doesn't support
this natively, DXTn-compressed image data are manually decompressed
prior to upload or copying. This particular algorithm was derived from
Wine, from code originally authored by Connor McAdams. It's somewhat
primitive, and could probably stand some vectorization, but it's a good
first start.
The meat of the algorithm is pulled into a header, "MVKDXTnCodec.def",
intended to be used by both CPU and shader code. CPU uploads, which in
MoltenVK happen when binding a `VkDeviceMemory` object to an image, run
the code normally. GPU uploads, i.e. copying from a buffer to a texture,
run the algorithm as a compute shader, possibly storing the results to
an intermediate buffer to then copy directly to the texture.
Intermediate buffers are used when uploading to mip levels higher than
0, since desktop Metal doesn't support directly writing to higher mip
levels from a shader.
Only uploads are supported. Downloads are not implemented yet.
Theoretically, this could be extended to other compressed formats as
well, allowing MoltenVK to support all texture compression formats on
all platforms.
Fixes to create_dylib.sh to cleanup bitcode and architecture support.
Update to latest SPIRV-Cross version.
Update MoltenVK version to 1.0.26.
Update Xcode projects to Xcode 10.1.
Update What's New document.