- Document the name of the MoltenVK driver layer.
- Support future multiple string members in MVKConfiguration.
- Add static assert on number of string members in MVKConfigruation.
- Rename global mvkConfig() to getGlobalMVKConfig().
- Rename global mvkSetConfig() to mvkSetGlobalConfig().
- Remove unused mvkPrintSizeOf() macro. (unrelated).
- Trim trailing spaces from Markdown documents because
it causes double-spaces in some Markdown readers (unrelated).
- Add MoltenVK_Configuration_Parameters.md to
document the MoltenVK configuration parameters.
- Deprecate vkSetMoltenVKConfigurationMVK().
- Deprecate mvk_config.h and move content to mvk_private_api.h and mvk_deprecated_api.h.
- Streamline lock on retrieval of MVKLayerManager singleton (unrelated).
- Consolidate info about CAMetalLayer and headless in MVKSurface.
- MVKSwapchainImage remove getCAMetalDrawable()
and focus on abstracting getMTLTexture().
- MVKPresentableSwapchainImage::getCAMetalDrawable() return nil if headless.
- Add MVKPresentableSwapchainImage::_mtlTextureHeadless to support
a fixed MTLTexture that is not retrieved from a CAMetalDrawable.
- MVKPresentableSwapchainImage refactor signalling semaphores and fences.
- MVKPresentableSwapchainImage don't lock when signalling semaphores and fences.
- If no present occurs, actualPresentTime will be zero. Set it to current
time, instead of to desiredPresentTime, since it's more accurate.
- Rework timestamps:
- Remove _mvkTimestampBase so mvkGetTimestamp() is equal to
mach_absolute_time(), which is used in presentation timing.
- Add mvkGetRuntimeNanoseconds().
- Rename mvkGetAbsoluteTime() to mvkGetContinuousNanoseconds().
- Remove mvkGetTimestampPeriod() as unused.
- MVKSemaphoreMTLEvent::encodeDeferredSignal remove redundant nil test (unrelated).
- Fix swapchain and surface bugs when windowing system
is accessed from off the main thread (unrelated).
- Log warning when deprecated functions vkCreateMacOSSurfaceMVK()
or vkCreateIOSSurfaceMVK() are used (unrelated).
- Remove documentation for visionos, as support is not ready (unrelated).
- Move patch point tracking from pipeline state to render state, and
remove MVKPipelineCommandEncoderState subclasses no longer needed.
- Move sample location tracking from renderpass input to pipeline
static or dynamic state tracking.
- Restart Metal render pass when sample locations change, and enable
VkPhysicalDeviceSampleLocationsPropertiesEXT::variableSampleLocations.
- Fix regression that broke VK_POLYGON_MODE_LINE (unrelated).
- Fix regression in marking MVKRenderingCommandEncoderState
dirty after vkCmdClearAttachments() (unrelated).
- On Apple GPUs, set timestampPeriod to 1.0.
- On non-Apple GPUs, calculate timestampPeriod each time it is retrieved.
- On older devices that do not support GPU timestamps, use nanosecond
CPU timestamps to be consistent with timestampPeriod of 1.0.
- Change MVKConfiguration::timestampPeriodLowPassAlpha and environment
variable MVK_CONFIG_TIMESTAMP_PERIOD_LOWPASS_ALPHA to 1.0, to use
only latest value by default.
- Add build-time verification that MVKConfigMembers.def
includes all members of MVKConfiguration (unrelated).
- Fix runtime failure on Metal versions that don't support dynamic attribute stride.
- Add MVKCommandEncoder::encodeVertexAttributeBuffer() consolidation function.
- Remove unnecessary validations that will be caught by Vulkan validation layers.
- To reduce memory, remove command class and pools for rendering commands that
are not supported, and perform no validation.
- Document extension conformance limitations in MoltenVK_Runtime_UserGuide.md.
- Add MVKPipelineCommandEncoderState subclasses
MVKGraphicsPipelineCommandEncoderState & MVKComputePipelineCommandEncoderState,
track patch control points in MVKGraphicsPipelineCommandEncoderState,
and add getGraphicsPipeline() & getComputePipeline() to simplify casting.
- Rename MVKRasterizingCommandEncoderState to MVKRenderingCommandEncoderState,
and MVKCommandEncoder::_rasterizingState to _renderingState.
- Rename MVKCmdRenderPass.h/mm to MVKCmdRendering.h/mm.
- Move MVKCmdExecuteCommands from MVKCmdRenderPass.h/mm to MVKCmdPipeline.h/mm.
- While working on vkCmdSetLogicOpEXT(), add support for
vkCmdSetLogicOpEnableEXT() from VK_EXT_extended_dynamic_state3.
- Add MVKRasterizingCommandEncoderState to consolidate handling
of static and dynamic rasterizing states in a consistent manner.
- Rework MVKDepthStencilCommandEncoderState to consolidate handling
of static and dynamic depth states in a consistent manner.
- MVKMTLDepthStencilDescriptorData clean up content setting, and struct layout.
- Add MVKRenderStateType to enumerate render state types.
- Add MVKRenderStateFlags to track binary info about states (enabled, dirty, etc).
- Add MVKMTLBufferBinding::stride.
- Add MVKPhysicalDeviceMetalFeatures::dynamicVertexStride.
- Set MVKPhysicalDeviceMetalFeatures::vertexStrideAlignment
to 1 for Apple5+ GPUs (unrelated).
- Set VkPhysicalDeviceLimits::maxVertexInputBindingStride
to unlimited for Apple2+ GPUs (unrelated).
- Add mvkVkRect2DFromMTLScissorRect() and simplify
mvkMTLViewportFromVkViewport() and mvkMTLScissorRectFromVkRect2D().
- MVKFoundation:
- Add mvkEnableAllFlags() and mvkDisableAllFlags().
- Improve performance of mvkClear(), mvkCopy() & mvkAreEqual()
when content is a single simple primitive type (unrelated).
- Declare more functions as static constexpr (unrelated).
- Add MVKConfiguration::timestampPeriodLowPassAlpha, along with matching
MVK_CONFIG_TIMESTAMP_PERIOD_LOWPASS_ALPHA env var.
- Add MVKConfigMembers.def file to describe MVKConfiguration members,
to support consistent batch handling of members.
- Add env var & build settings MVK_CONFIG_DEBUG, plus legacy
MVK_CONFIG_ALLOW_METAL_EVENTS & MVK_CONFIG_ALLOW_METAL_FENCES.
- Simplify environment variable retrieval functions and macros.
- Rename MVKDevice::updateTimestampsAndPeriod() to updateTimestampPeriod().
- In MoltenVK Xcode projects, set iOS & tvOS deployment targets to 12.0,
to avoid warnings while building MoltenVK.
- Add DYLD_LIBRARY_PATH to runcts script, to ensure Vulkan and MoltenVK
libraries are found during CTS runs.
- Update Whats_New.md and MoltenVK_Runtime_UserGuide.md documents.
This just provides support for the `SPV_KHR_non_semantic_info`
extension, which supports extended instruction sets that do not affect
the semantics of a SPIR-V shader (e.g. debug info). SPIRV-Cross already
handles these instruction sets, so no additional work is required on our
part to support this extension.
This extension has a direct Metal equivalent in the
`-[MTLDevice sampleTimestamps:gpuTimestamp:]` method. However, that
method returns CPU timestamps in the Mach absolute time domain, which is
*not* that of `CLOCK_MONOTONIC_RAW` but of `CLOCK_UPTIME_RAW`. The
function that corresponds to `CLOCK_MONOTONIC_RAW` is
`mach_continuous_time()`. Therefore, this implementation uses the
`mach_continuous_time()` function for the CPU timestamp. Perhaps we
should lobby the WG for `VK_TIME_DOMAIN_CLOCK_UPTIME_RAW_EXT`.
This turned out to be a little bit more involved than I had hoped. But,
with this, we can now use the `VK_FORMAT_A4R4G4B4_UNORM_PACK16` and
`VK_FORMAT_A4B4G4R4_UNORM_PACK16` formats from shaders, use them as blit
sources, and even clear them. Storage images and render targets of these
formats aren't supported, however. To support the latter would require
the insertion of a swizzle into the fragment shader before returning.
The former cannot be reasonably supported.
As of macOS Big Sur and iOS/tvOS 14, the `discard_fragment()` function
in MSL is defined to have demote semantics; that is, fragment shader
output is discarded, but the fragment shader thread continues to run as
a helper invocation. This is very useful for Direct3D emulation, since
this is the semantic that HLSL `discard` has.
Signed-off-by: Chip Davis <chip@holochip.com>
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.
- Cleanup VkPhysicalDeviceShaderAtomicFloatFeaturesEXT enablement and documentation.
- Cleanup VkPhysicalDevicePipelineCreationCacheControlFeaturesEXT enablement.
- Expand MVK_CONFIG_TRACE_VULKAN_CALLS to log thread ID only if requested.
- 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.
- 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.
VK_EXT_descriptor_indexing extension is enabled.
- Change MVKConfiguration::useMetalArgumentBuffers to enum instead of boolean
and default to enabling Metal argument buffers for VK_EXT_descriptor_indexing.
- Leave Metal argument buffers disabled by default until they are improved.
- Enable VkPhysicalDeviceVulkan12Features::descriptorIndexing.
- Add MVKPhysicalDeviceVulkan12FeaturesNoExt to track and enable Vulkan 1.2
features not part of any prior extensions absorbed by Vulkan 1.2.
- Update VK_MVK_MOLTENVK_SPEC_VERSION to version `36`.
- MVKDeviceTrackingMixin remove unnecessary inline declarations.
- MoltenShaderConveter tool support Metal Argument Buffers and MSL 3.0.
- Enable shaderSignedZeroInfNanPreserveFloat16 and
shaderSignedZeroInfNanPreserveFloat32.
Other float control properties are not settable in Metal.
- MVKShaderModule log whether compiling with fast math enabled.
- Update MoltenVK_Runtime_UserGuide.md and Whats_New.md documents.
- runcts script enable MVK_CONFIG_FAST_MATH_ENABLED by default.
- Add [CAMetalLayer screenMVK] extension method to retrieve screen.
- If the layer has a delegate view, use it to locate the screen, otherwise
revert to iterating across windows, looking for the CAMetalLayer, to identify
the window the layer is in, from which to retrieve the screen.
- Fix the iteration of the layer hierarchy, to accommodate that Apple may
add superlayers to the CAMetalLayer under the covers.
- Update MoltenVK_Runtime_UserGuide.md to encourage the app to ensure the view
is the delegate of the CAMetalLayer, to more efficiently access the screen.
Support by the MTLDevice for Metal Tier 2 argument buffers has an
impact on both descriptor indexing and buffer device address support.
Add MVKPhysicalDeviceMetalFeatures::argumentBuffersTier, to track
the MTLDevice argument buffers support tier, set it from
[MTLDevice argumentBuffersSupport], and subsequently enable support for
VK_KHR_buffer_device_address and VK_EXT_buffer_device_address extensions,
and set descriptor indexing resource counts, based on it.
Update documentation requirements.
- Update to latest SPIRV-Cross to support `SPV_KHR_physical_storage_buffer`
for `VK_KHR_buffer_device_address` and `VK_EXT_buffer_device_address`
- Add support for `VK_EXT_buffer_device_address` extension.
- Advertise support for `VK_KHR_buffer_device_address`
and `VK_EXT_buffer_device_address` on macOS 12.5.
- Add appropriate extension reporting and enablement for
`VkPhysicalDeviceBufferDeviceAddressFeatures`,
`VkPhysicalDeviceBufferDeviceAddressFeaturesEXT`, and
`VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR`.
- Support reading `VkMemoryAllocateFlagsInfo` to identify memory allocations that
need to support buffer pointer access (in case needed in future on non-shared memory).
- Update `Whats_New.md` and `MoltenVK_Runtime_UserGuide` documents.
Add VK_KHR_separate_depth_stencil_layouts and enable its features.
Metal generally ignores image layouts, so nothing further needed.
Update Whats_New.md and MoltenVK_Runtime_UserGuide.md documents
with recently-added extensions.
Passes almost all supported separate_layouts CTS tests, with the
few remaining tests failing due to issues with unrelated capabilities.
Unrelated cleanup:
- MVKDevice enable extensions before features.
- MVKDevice reorder ivar declarations to reduce
memory layout gaps, and define default values.
- Rename VkSemaphoreStyle to MVKSemaphoreStyle to
remove potential conflicts with Vulkan Vk name space.