- MVKResource::getHostMemoryAddress() return nullptr if
MVKDeviceMemory::getHostMemoryAddress() returns null pointer,
regardless of local offset.
- Remove unnecessary enum value kMVKVkFormatFeatureFlagsTexTransfer
to reduce redundancy between read and transfer feature flag options.
- Fix spelling of mvkVkOffset3DFromMTLOrigin() (unrelated).
- MVKResource remove unnecessary inline qualifiers (unrelated).
- MVKDevice remove some obsolete commentary (unrelated).
Apple's Automatic Reference Counting automatically releases
the Metal objects returned by VK_EXT_metal_objects.
The fetchDependencies script now applies
Templates/Vulkan-Headers/VK_EXT_metal_objects-unret.gitdiff
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.
Apple's iOS App Store does not permit an app to link to naked dylibs.
Instead, these must be placed in frameworks, which are embedded in a
dynamic version of MoltenVK.xcframework.
- Use Xcode to directly generate a MoltenVK.framework for each platform,
and remove create_dylib*.sh scripts.
- Move static XCFramework, containing libMoltenVK.a static libraries,
to Package/Latest/MoltenVK/static/MoltenVK.xcframework.
- Generate dynamic XCFramework, containing MoltenVK.framework dynamic
libraries, in Package/Latest/MoltenVK/dynamic/MoltenVK.xcframework.
- Add macro MVK_VERSION_STRING to create version string at compile time,
use it to validate the CURRENT_PROJECT_VERSION build setting at compile time,
and use it at runtime instead of mvkGetMoltenVKVersionString() function.
- Add -w to OTHER_LDFLAGS to dynamic framework builds to suppress
spurious linker warnings of the type
"ld: warning: no platform load command found in '...', assuming: iOS"
issued from the new linker introduced in Xcode 15.
- Add MoltenVK-MacCat Xcode target and MoltenVK Package (MacCat only)
Xcode scheme to avoid building dynamic MoltenVK.framework for the
Mac Catalyst platform, because Xcode does not support doing so.
- Always run MoltenVK build scripts, to ensure all components are
added to the XCFrameworks, and MoltenVK/Package is always refreshed,
even if code compilation is not required.
- Cube demo link to dynamic MoltenVK.framework through
dynamic/MoltenVK.xcframework, instead of to naked libMoltenVK.dylib.
- Update the version of Volk used by the Cube demo, to support
loading MoltenVK from dynamic frameworks inside Volk.
- Update README.md and MoltenVK_Runtime_UserGuide.md documents.
- Update MVK_PRIVATE_API_VERSION to 40.
- Fix make install to install /usr/local/lib/libMoltenVK.dylib on macOS (unrelated).
- Remove unused MTLAttributeStrideStatic declaration prior to Xcode 15 (unrelated).
- Expose MTLRenderPipelineDescriptor.sampleMaskMVK and
MTLSamplerDescriptor.lodBiasMVK properties when
MVK_USE_METAL_PRIVATE_API build setting is disabled.
- MVKCmdSetDepthBias & MVKCmdSetDepthBounds subclass from MVKSingleValueCommand.
- MVKRenderingCommandEncoderState simplify calls to set depth bias
and depth bounds, and make consistent with other settings.
- Refactor MVKRenderingCommandEncoderState::setContent() and
setMTLContent() to remove need for intermediate value copies.
- MVKPipeline remove test for depth bounds support since
it's checked before GPU encoding.
- MVKDepthBias member order same as in Vulkan calls.
- Whats_New.md consolidate notes about MVK_USE_METAL_PRIVATE_API.
This isn't even a regular SPI. It's not even present in the Metal
framework. It's exposed by the driver. Only AMD drivers support the
method we need for now.
Metal actually supports this, but this is a hidden property of the
`MTLSamplerDescriptor`. It's not part of the public API. Guard our use
of it appropriately.
This support was always there in Metal. It was just hidden from public
view--but not from prying eyes on the Objective-C metadata.
I had initially thought they were using OpenGL/Vulkan values for the
logic operation. When that didn't work, I then tried D3D11 values. I
guess D3D11 makes sense, because the Intel GPU drivers were the first to
support this in Metal.
Move the definition of `MVK_USE_METAL_PRIVATE_API` into
`"MVKCommonEnvironment.h"` so we can use it from non-C++ code.
With the new `MVK_CONFIG_USE_METAL_PRIVATE_API`, the user can prevent their
use at run time without recompiling MoltenVK. This may be useful for
troubleshooting purposes.
The extra member is because the compiler adds tail padding to make the
struct aligned on an 8-byte boundary, so the `static_assert()` fails
without it.
- Add MVK_USE_METAL_PRIVATE_API build setting to allow MoltenVK
to be built with access to Metal private API calls.
- Add support for VkPhysicalDeviceFeatures::wideLines feature
when MVK_USE_METAL_PRIVATE_API is enabled in a MoltenVK build.
- Set lineWidthRange and lineWidthGranularity to reasonable arbitrary values.
- Xcode now supports building dylib for iOS Simulator
(but unfortunately not yet tvOS Simulator).
- Restore support for iOS Simulator destination in recent update to
Cube demo that uses dynamic-linking, by using script build phase
to overwrite the iOS build of MoltenVK with the iOS Simulator build.
Fix issue where push constants contain a buffer address, but no descriptor
resources are encoded, resulting in addressed buffer not resident in GPU.
- Add MVKGPUAddressableBuffersCommandEncoderState to track when the
GPU-addressable buffer usage needs to be encoded, and only encode
them once per Metal renderpass.
- Set MVKGPUAddressableBuffersCommandEncoderState dirty whenever
a buffer is bound for a descriptor or a push constant.
Unrelated changes:
- MVKCommandEncoder::finalizeDrawState() reorder encoding of encoder
states to encode resource and push-constant encoder states together.
- Move getGraphicsPipeline() and getComputePipeline() to MVKCommandEncoder.
- MVKDevice Remove preallocation on _resources and _gpuAddressableBuffers.
- Align conditions for VkPhysicalDeviceVulkan12Features::bufferDeviceAddress
to those for VK_KHR_buffer_device_address/VK_EXT_buffer_device_address.
- MVKImage add functions to consolidate mapping plane indexes to memory bindings
to add safety in situation where one memory binding supports all planes.
- Update MoltenVK version to 1.2.8 (unrelated).
- Statically expose vkGetInstanceProcAddr(), even
when MVK_HIDE_VULKAN_SYMBOLS is enabled.
- To support Volk, link Cube demo dynamically to libMoltenVK.dylib
instead of statically to MoltenVK.xcframework.
- 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).
- Don't update value of timestampPeriod on first measurement.
- Force that first measurement upon creation of MVKPhysicalDevice, so an
accurate value for timestampPeriod will be calculated when next queried.
- 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).
- Don't create global MVKPixelFormats instance during launch,
as this triggers a call to MTLCopyAllDevices(), which can
deadlock if app is also launching other services that use Metal.
- Update to latest SPIRV-Cross contining the fix.
- Modify CTS options in runcts script to avoid outputting full CTS log,
and use less file caching, all to reduce memory and filespace consumption,
and possibly improve performance (unrelated).
- Update MoltenVKShaderConverter tool to include Metal 3.1 support
and improved argument buffer settings (unrelated).
- Force Github CI to use Python 3.11, to avoid crash in
glslang::update_glslang_sources.py due to use of distutils,
removed in Python 3.12 (unrelated).
- Small unrelated non-functional edits.
- Add --keep-cache option to control whether or not to retain the
External/build/Intermediates directory (default not retained).
- Export KEEP_CACHE & SKIP_PACKAGING to be available within scripts
used by ExternalDependencies Xcode builds.
- Move BLD_SPECIFIED to build() instead of build_impl() to avoid
updating it from background thread (which will fail).
- Update MoltenVK version to 1.2.7 (unrelated).
- Add CompilerMSL::Options::replace_recursive_inputs to pipeline cache (unrelated).
- Update GitHub CI to Xcode 15.0.
- Update Whats_new.md document.
- 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.