- Report error, but do not fail on request for timestamp query pool
that is too large for MTLCounterSampleBuffer.
- Change reported error to VK_ERROR_OUT_OF_DEVICE_MEMORY and clarify
text of error reported when timestamp query pool is too large.
- Clarify error reported for occlusion query pool errors (unrelated).
- Make MVKDevice::enableFeatures() functions into templates to pass struct type.
- Add mvkGetAddressOfFirstMember() to retrieve the address of the first member of
a struct, taking into consideration whether the struct has a Vulkan pNext member.
- Add mvk::getTypeName() and mvk::getOrdinalSuffix() string functions.
- Build one universal build, instead of per-platform.
- Upload this single build artifact to GitHub.
- Upgrade to v3 of action dependencies to remove Node.js deprecation warnings.
- Avoid use of deprecated set-output GitHub action command.
- Use macOS 13 and Xcode 14.3.
- README.md document access to binary artifacts.
- MVKPresentableSwapchainImage::presentCAMetalDrawable() and
addPresentedHandler() pass MVKImagePresentInfo by value instead
of reference, to avoid callbacks colliding with tracked
MVKImagePresentInfos being cleared when
MVKQueuePresentSurfaceSubmission is destroyed after it is run.
Also undeprecate the original vkGet/SetMoltenVKConfigurationMVK().
In expectation of the upcoming VK_EXT_layer_settings extension, it is felt that
adding these additional functions at this time would be confusing to app devs.
- Reinstate VK_MVK_moltenvk extension, but log warning message when it is enabled.
- Add vkGetMoltenVKConfiguration2MVK() and vkSetMoltenVKConfiguration2MVK()
to set config without passing a dummy VkInstance, and deprecate
vkGetMoltenVKConfigurationMVK() and vkSetMoltenVKConfigurationMVK().
The VK_MVK_moltenvk extension has never been brought inside Vulkan, and
the functions have never been supported by the Vulkan Loader and Layers.
Most of the functionality has long been replaced by the official
VK_metal_objects extension.
- Remove VK_MVK_moltenvk as an advertised extension.
- Refactor vk_mvk_moltenvk.h header file into separate headers files:
- mvk_config.h - Valid public config functions
- mvk_private_api.h - Valid development debugging functions used with care
- mvk_deprecated_api.h - Formally deprecated functions.
- Retain skeleton vk_mvk_moltenvk.h header file for legacy compatibility only.
- Update documentation and header comments to explain changes.
- MVKRenderSubpass add separate getDepthFormat() & getStencilFormat(),
and isDepthAttachmentUsed() & isStencilAttachmentUsed() and use
instead of testing pixel format for depth and stencil components.
- Add MVKRenderingAttachmentIterator class to consistently iterate,
and take actions, on the attachments in VkRenderingInfo to create
synthetic MVKRenderPass and extract image views and clear colors.
- Remove mvkCreateRenderPass() and mvkCreateFramebuffer() in favor
of additional constructors, and remove mvkGetDepthStencilFormat() in
favor of retrieving formats for separate depth and stencil attachments.
- MVKRenderpass constructors reorganize order of adding attachments and
subpasses, and connecting the two.
- Renmame MVKRenderPassAttachment to MVKAttachmentDescription.
- MVKPipeline reorganize member variables to minimize gaps in content
and remove unnecessary _isRasterizingDepthStencil member var (unrelated).
- MVKDevice track VkBuffers marked with VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT.
- Add SPIRVToMSLConversionResultInfo::usesPhysicalStorageBufferAddressesCapability
to detect and track shaders that use PhysicalStorageBufferAddresses capability,
and track such shader stages within pipeline.
- MVKResourcesCommandEncoderState encode usage of VkBuffers marked with
VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT when pipeline uses
PhysicalStorageBufferAddresses capability.
- Rename MVKResourcesCommandEncoderState::encodeArgumentBufferResourceUsage()
to encodeResourceUsage().
- MVKDevice move some functions to public scope and remove friend classes.
- MVKDeviceMemory ensure _vkMemAllocFlags is always initialized (unrelated).
- Rename MVKFoundation template method contains() to mvkContains() (unrelated).
- Add MVK_XCODE_14_3 macro to compile for iOS/tvOS 16.4 and above.
- Add support for BC compression on iOS/tvOS 16.4 and above where supported.
- Consolidate MVKPixelFormats::modifyMTLFormatCapabilities(mtlDev)
and centralize querying MTLDevice format methods for all platforms.
- Fix memory leak when waiting on timeline semaphores.
- For correctness, set VkPhysicalDeviceLimits::lineWidthGranularity to 1.
- Update MoltenVK to version 1.2.4.
- Update Whats_New.md document with recent changes.
- Cleanup VkPhysicalDeviceShaderAtomicFloatFeaturesEXT enablement and documentation.
- Cleanup VkPhysicalDevicePipelineCreationCacheControlFeaturesEXT enablement.
- Expand MVK_CONFIG_TRACE_VULKAN_CALLS to log thread ID only if requested.
- Add MVKCompressor template class, and mvkCompress() & mvkDecompress()
functions to support general data compression.
- Add MVKConfiguration::shaderSourceCompressionAlgorithm and
env var MVK_CONFIG_SHADER_COMPRESSION_ALGORITHM to support
compressing MSL shader source code held in a pipeline cache.
- Add MVKShaderCompilationPerformance::mslCompress and mslDecompress
to allow performance of MSL compression to be tracked and queried.
- Add support for logging performance stats accumulated in a VkDevice,
when it is destroyed. Good for CTS testing.
- Change MVKConfiguration::logActivityPerformanceInline boolean to
activityPerformanceLoggingStyle enumeration value.
- Add MVK_CONFIG_ACTIVITY_PERFORMANCE_LOGGING_STYLE environment variable and
build setting to set MVKConfiguration::activityPerformanceLoggingStyle value.
- Don't retain converted MSL source code in MVKShaderModule.
- Add SPIRVToMSLConversionResult and GLSLToSPIRVConversionResult
structures to capture all feedback from shader conversions.
- Fix crash when VkCommandBufferInheritanceInfo::renderPass is VK_NULL_HANDLE.
- Do not clear attachments when dynamic rendering is resumed.
- Allow ending dynamic rendering to trigger next multiview pass if needed.
- Move deciding to begin next multiview pass to MVKCommandEncoder.
- Fix premature caching of occlusion query results during tessellation rendering.
Tessellation ends Metal renderpass for compute control and eval stages.
Wait until end of Metal renderpass after rasterization stage.
- vkCmdCopyQueryPoolResults(): Fix loss of queries when query
count is not a multiple of GPU threadgroup execution width.
- Disable occlusion recording while clearing attachments or render area.
- MVKCmdClearAttachments improve labelling of MTLDebugGroup to better
distinguish clearing renderpass render area from vkCmdClearAttachments()
in an Xcode GPU capture (unrelated but helpful during debugging).
- MVKCmdClearAttachments re-order member variables to
optimize memory requirements (unrelated).
- MVKCommandBuffer remove unused renderpass tracking functions (unrelated).
- Support querying scaling capabilities and present mode compatibilies
when querying surface capabilities.
- Rename MVKPresentTimingInfo to MVKImagePresentInfo and add present mode
and fence to support dynamic present mode changes and fence signaling.
- MVKPresentableSwapchainImage remove static functions from class declaration.
- MVKSwapchain support releasing swapchain images on command.
- MVKSwapchain support configuring with scaling and gravity info, apply it to
CAMetalLayer.and do not return VK_SUBOPTIMAL_KHR if swapchain was configured
with scaling info.
- Rename MVKSwapchain::acquireNextImageKHR to acquireNextImage.
- CAMetalLayer naturalDrawableSizeMVK compute precise drawable size.
- CAMetalLayer remove obsolete and unused updatedDrawableSizeMVK method.
- Rename MVKConfiguration::swapchainMagFilterUseNearest to
swapchainMinMagFilterUseNearest to apply CAMetalLayer size
filtering to both magnification and minification, and rename
corresponding env var MVK_CONFIG_SWAPCHAIN_MAG_FILTER_USE_NEAREST
to MVK_CONFIG_SWAPCHAIN_MIN_MAG_FILTER_USE_NEAREST.
- Detect when size of surface has changed under the covers.
- Change rounding of surface size provided by Metal from truncation to
rounding-with-half-to-even.
- Remove MVKLogSizeOf() logging macro as redundant to mvkPrintSizeOf() macro.
- Update maxClipDistances and maxCombinedClipAndCullDistances to more accurate values.
- Update maxDrawIndexedIndexValue to acknowledge primitive restart.
- Ensure Vulkan public symbols are not stripped from the library when
statically linked to an app that calls all Vulkan functions dynamically.
- Per Vulkan 1.2 spec, support calling vkGetInstanceProcAddr() with a
null instance, when vkGetInstanceProcAddr itself is the function name.
- Replace uses of strcmp() with mvkStringsAreEqual() to protect against
null pointers, and provide a direct bool output (unrelated cleanup).
- Fix Metal validation error caused by CAMetalDrawable released before
MTLCommandBuffer is finished using it.
- When presenting, MVKPresentableSwapchainImage retains in-flight
CAMetalDrawable until MTLCommandBuffer completion.
- Fix memory leak of MVKFences and MVKSemaphores when a
swapchain image is acquired more than it is presented.
- Force MVKPresentableSwapchainImage to untrack any tracked fences or
semaphores when it is destroyed.
- Update MoltenVK version to 1.2.2.
Metal uses MTLRenderPassDescriptor properties renderTargetWidth,
renderTargetHeight, and renderTargetArrayLength to preallocate tile memory
storage on machines using tiled rendering. This memory preallocation is not
necessary if we are not rendering to attachments, and some apps actively
define extremely oversized framebuffers when they know they are not rendering
to actual attachments, making this internal tile memory allocation even more
wasteful, occasionally to the point of triggering OOM crashes.
Update MoltenVK version to 1.2.2.
of VK_KHR_shader_float_controls.
The introduction of shaderSignedZeroInfNanPreserveFloat32 was causing Metal
fast math to be aggressively disabled by the use of SignedZeroInfNanPreserve
in shaders in some apps, causing a regression in shader performance in those apps.
- Change MVKConfiguration::fastMathEnabled from bool to enumeration to distinguish
between always using fast math or allowing shaders to selectively disable it.
- Default value to fast math always.
Push constants and attachment clearing can temporarily override Metal buffer
bindings for descriptor sets and vertex attributes. Mark the overridden buffer
bindings and ensure they are reinstated when the pipeline is updated.
- Add MVKMTLBufferBinding::isOverridden to track if buffer binding is
temporarily overridden.
- Rename MVKResourcesCommandEncoderState::markIndexDirty()
to markBufferIndexOverridden() to mark buffer bindings as overridden.
- Rename MVKGraphicsResourcesCommandEncoderState::markBufferIndexDirty()
to markBufferIndexOverridden().
- Rename MVKComputeResourcesCommandEncoderState::markBufferIndexDirty()
to markBufferIndexOverridden().
- Add MVKResourcesCommandEncoderState::markOverriddenBufferIndexesDirty()
to mark overridden buffer bindings as dirty.
- Add MVKGraphicsResourcesCommandEncoderState::markOverriddenBufferIndexesDirty()
and call when render pipeline change is encoded
- Add MVKComputeResourcesCommandEncoderState::markOverriddenBufferIndexesDirty()
and call when compute pipeline change is encoded.
- Redefine enumeration values of MVKPrefillMetalCommandBuffersStyle.
- Add option to defer encoding prefilled MTLCommandBuffer to queue submission.
- Remove option to create an autorelease pool in the MVKCommandEncoder
to span immediate command encodings, because it causes crashes when
multiple command buffers were overlapping prefilling on the same thread.
- Replace MTLCommandEncoder retain/release macros with template member functions.
- Rename MVKCommandPool::newMTLCommandBuffer() to getMTLCommandBuffer()
and do not retain the returned MTLCommandBuffer (unrelated).
- Revert MoltenVK logging to use stderr instead of stdout (unrelated).
- Merge branch from master.