diff --git a/Docs/MoltenVK_Configuration_Parameters.md b/Docs/MoltenVK_Configuration_Parameters.md index 3b786edc..642007dc 100644 --- a/Docs/MoltenVK_Configuration_Parameters.md +++ b/Docs/MoltenVK_Configuration_Parameters.md @@ -675,7 +675,8 @@ features that are difficult to support otherwise. Unlike `MVK_USE_METAL_PRIVATE_API`, this setting may be overridden at run time. -This option is not available unless MoltenVK were built with `MVK_USE_METAL_PRIVATE_API` set to `1`. +This option is not available unless **MoltenVK** was built with `MVK_USE_METAL_PRIVATE_API` set to `1`. + --------------------------------------- #### MVK_CONFIG_SHADER_DUMP_DIR @@ -685,5 +686,5 @@ This option is not available unless MoltenVK were built with `MVK_USE_METAL_PRIV _(The default value is an empty string)._ -If not empty, MoltenVK will dump all SPIRV shaders, compiled MSL shaders, and pipeline shader lists to the given directory. +If not empty, **MoltenVK** will dump all SPIR-V shaders, compiled MSL shaders, and pipeline shader lists to the given directory. The directory will be non-recursively created if it doesn't already exist. diff --git a/Docs/Whats_New.md b/Docs/Whats_New.md index 2d3f8eab..772116f5 100644 --- a/Docs/Whats_New.md +++ b/Docs/Whats_New.md @@ -16,13 +16,31 @@ Copyright (c) 2015-2024 [The Brenwill Workshop Ltd.](http://www.brenwill.com) MoltenVK 1.2.9 -------------- -Released TBD +Released 2024/05/07 - Add support for extensions: - `VK_EXT_host_image_copy` - To support legacy apps, restore `MoltenVK/dylib` directory via symlink to `MoltenVK/dynamic/dylib`. -- Add `MVKPerformanceTracker::previous` to track latest-but-one performance measurements. +- Enhancements to `MVKPerformanceStatistics`. Add `MVKPerformanceTracker::previous`, + `MVKQueuePerformance::waitSubmitCommandBuffers`, and `MVKQueuePerformance::waitPresentSwapchains`. +- Add `MVK_CONFIG_SHADER_DUMP_DIR` configuration parameter to optionally dump shaders to files. +- Return **MoltenVK** log level string in `pMessageIdName` field of debug utils callback data. - Fix crash when using `VK_EXT_metal_objects` under _ARC_. +- Fix deadlock when creating a swapchain on a thread other than the main thread. +- Fix potential memory leak in `vkQueueWaitIdle()`. +- Ensure buffer bindings are actually used to avoid potential overrun on Metal buffer indexes. +- Update dependency libraries to match _Vulkan SDK 1.3.283_. +- Update `MVK_PRIVATE_API_VERSION` to `41`. +- Update to latest SPIRV-Cross: + - MSL: Add support for overlapping bindings. + - MSL: Use recursive template for `spvArrayCopy()`. + - MSL: Improve argument buffer descriptor aliasing implementation. + - MSL: Workaround compiler issue with image fence when used as reference. + - MSL: Fix SUMulExtended for 64-bit inputs. + - MSL: Handle Atomic{S,U}{Min,Max} with mismatched image sign. + - MSL: Handle missing FP16 trancendental overloads. + - MSL: Remove pointer wrapper stored in `spvDescriptorArray()` to avoid potential Metal compiler bug. + MoltenVK 1.2.8 diff --git a/ExternalRevisions/SPIRV-Cross_repo_revision b/ExternalRevisions/SPIRV-Cross_repo_revision index 33caece3..2f048d95 100644 --- a/ExternalRevisions/SPIRV-Cross_repo_revision +++ b/ExternalRevisions/SPIRV-Cross_repo_revision @@ -1 +1 @@ -de0e72a0db21d1a12eb37cbfd15199b3e66fc9d9 +2ccc81fd826e4dd4a2db2f94b8e6eb738a89f5f1 diff --git a/ExternalRevisions/Volk_repo_revision b/ExternalRevisions/Volk_repo_revision index f4dd505e..1c27313d 100644 --- a/ExternalRevisions/Volk_repo_revision +++ b/ExternalRevisions/Volk_repo_revision @@ -1 +1 @@ -01986ac85fa2e5c70df09aeae9c907e27c5d50b2 +3a8068a57417940cf2bf9d837a7bb60d015ca2f1 diff --git a/ExternalRevisions/Vulkan-Headers_repo_revision b/ExternalRevisions/Vulkan-Headers_repo_revision index 23f918a4..13d69390 100644 --- a/ExternalRevisions/Vulkan-Headers_repo_revision +++ b/ExternalRevisions/Vulkan-Headers_repo_revision @@ -1 +1 @@ -577baa05033cf1d9236b3d078ca4b3269ed87a2b +eaa319dade959cb61ed2229c8ea42e307cc8f8b3 diff --git a/ExternalRevisions/Vulkan-Tools_repo_revision b/ExternalRevisions/Vulkan-Tools_repo_revision index baa6090f..cec2f39f 100644 --- a/ExternalRevisions/Vulkan-Tools_repo_revision +++ b/ExternalRevisions/Vulkan-Tools_repo_revision @@ -1 +1 @@ -da49add44591bee19975e4668e418591effd8240 +09f5cc6b0758a05ccd6bcde1342256c15c76670e diff --git a/ExternalRevisions/glslang_repo_revision b/ExternalRevisions/glslang_repo_revision index c361a845..3dcfcd7a 100644 --- a/ExternalRevisions/glslang_repo_revision +++ b/ExternalRevisions/glslang_repo_revision @@ -1 +1 @@ -ee2f5d09eaf8f4e8d0d598bd2172fce290d4ca60 +e8dd0b6903b34f1879520b444634c75ea2deedf5 diff --git a/MoltenVK/MoltenVK/GPUObjects/MVKQueue.mm b/MoltenVK/MoltenVK/GPUObjects/MVKQueue.mm index 5abd4854..ad830061 100644 --- a/MoltenVK/MoltenVK/GPUObjects/MVKQueue.mm +++ b/MoltenVK/MoltenVK/GPUObjects/MVKQueue.mm @@ -147,7 +147,6 @@ VkResult MVKQueue::waitIdle(MVKCommandUse cmdUse) { @autoreleasepool { auto* mtlCmdBuff = getMTLCommandBuffer(cmdUse); - [mtlCmdBuff commit]; [mtlCmdBuff waitUntilCompleted]; } diff --git a/MoltenVK/MoltenVK/Utility/MVKBaseObject.h b/MoltenVK/MoltenVK/Utility/MVKBaseObject.h index 84fb292e..a6aa1c62 100644 --- a/MoltenVK/MoltenVK/Utility/MVKBaseObject.h +++ b/MoltenVK/MoltenVK/Utility/MVKBaseObject.h @@ -226,7 +226,7 @@ static inline const MVKConfiguration& mvkGetMVKConfig(MVKBaseObject* mvkObj) { } /** Returns the reporting level string associated with the specified MoltenVK log level. */ -static constexpr char* mvkGetReportingLevelString(MVKConfigLogLevel logLevel) { +static inline const char* mvkGetReportingLevelString(MVKConfigLogLevel logLevel) { switch (logLevel) { case MVK_CONFIG_LOG_LEVEL_ERROR: return "mvk-error"; case MVK_CONFIG_LOG_LEVEL_WARNING: return "mvk-warn"; diff --git a/Templates/Vulkan-Headers/VK_EXT_metal_objects-unret.gitdiff b/Templates/Vulkan-Headers/VK_EXT_metal_objects-unret.gitdiff deleted file mode 100644 index 49aec35a..00000000 --- a/Templates/Vulkan-Headers/VK_EXT_metal_objects-unret.gitdiff +++ /dev/null @@ -1,46 +0,0 @@ -diff --git a/include/vulkan/vulkan_metal.h b/include/vulkan/vulkan_metal.h -index e6f7bf7..c6bccf5 100644 ---- a/include/vulkan/vulkan_metal.h -+++ b/include/vulkan/vulkan_metal.h -@@ -52,28 +52,28 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateMetalSurfaceEXT( - #define VK_EXT_metal_objects 1 - #ifdef __OBJC__ - @protocol MTLDevice; --typedef id MTLDevice_id; -+typedef __unsafe_unretained id MTLDevice_id; - #else - typedef void* MTLDevice_id; - #endif - - #ifdef __OBJC__ - @protocol MTLCommandQueue; --typedef id MTLCommandQueue_id; -+typedef __unsafe_unretained id MTLCommandQueue_id; - #else - typedef void* MTLCommandQueue_id; - #endif - - #ifdef __OBJC__ - @protocol MTLBuffer; --typedef id MTLBuffer_id; -+typedef __unsafe_unretained id MTLBuffer_id; - #else - typedef void* MTLBuffer_id; - #endif - - #ifdef __OBJC__ - @protocol MTLTexture; --typedef id MTLTexture_id; -+typedef __unsafe_unretained id MTLTexture_id; - #else - typedef void* MTLTexture_id; - #endif -@@ -81,7 +81,7 @@ typedef void* MTLTexture_id; - typedef struct __IOSurface* IOSurfaceRef; - #ifdef __OBJC__ - @protocol MTLSharedEvent; --typedef id MTLSharedEvent_id; -+typedef __unsafe_unretained id MTLSharedEvent_id; - #else - typedef void* MTLSharedEvent_id; - #endif diff --git a/Templates/spirv-tools/build.zip b/Templates/spirv-tools/build.zip index 79bcd7c6..e2a51b1c 100644 Binary files a/Templates/spirv-tools/build.zip and b/Templates/spirv-tools/build.zip differ diff --git a/fetchDependencies b/fetchDependencies index 76f185fc..a870c300 100755 --- a/fetchDependencies +++ b/fetchDependencies @@ -320,14 +320,6 @@ else update_repo ${REPO_NAME} ${REPO_URL} ${REPO_REV} fi -# Apply a Git diff file to add an __unsafe_unretained ownership -# qualifier to the Metal object declarations in vulkan_metal.h. -# This should be a temporary patch until the VK_EXT_metal_objects extension can be properly modified. -echo "Adding __unsafe_unretained ownership qualifier to the Metal objects in vulkan_metal.h." -cd ${REPO_NAME} -git apply ../../Templates/${REPO_NAME}/VK_EXT_metal_objects-unret.gitdiff -cd - > /dev/null - # ----------------- SPIRV-Cross -------------------