According to the Vulkan spec:
> * If `buffer` is a `VkBuffer` not created with the
> `VK_BUFFER_CREATE_SPARSE_BINDING_BIT` bit set[...] then the
> `memoryTypeBits` member always contains at least one bit set
> corresponding to a `VkMemoryType` with a `propertyFlags` that has
> both the `VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT` bit and the
> `VK_MEMORY_PROPERTY_HOST_COHERENT_BIT` bit set. In other words,
> mappable coherent memory **can** always be attached to these
> objects.
There is no exception for texel buffers. Even though desktop Metal
disallows textures in shared memory, even linear textures created from a
buffer, we have to advertise host-coherent memory for texel buffers.
Some applications actually depend on this behavior, so it's not just a
theoretical concern.
To support host-coherent texel buffers, we implicitly create a managed
buffer and copy data between the device memory and the managed buffer,
just like for a linear image.
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Naturally, Metal complains when a fragment shader write to a
`[[depth]]` output, but there be no depth attachment. I imagine that it
will also complain if the shader write to ``[[stencil]]`` with no
stencil attachment, or it write to a ``[[color(n)]]`` output with no
corresponding attachment.
MVKShaderConverterTool add support to output SPIR-V as header (.h) files.
Add MVKShaderConverterTool Xcode target.
Add MVKShaderConverterTool Package Xcode scheme.
fetchDependencies builds MVKShaderConverterTool and runs
it on shader files in VulkanSamples API-Samples directory.
Added MVKQueuePerformance::frameInterval performance tracker.
Added MVKPerformanceTracker::latestDuration to track duration of most recent activity.
Swapchain performance can be retrieved with other activity performance through
vkGetPerformanceStatisticsMVK().
Performance logging of all activities can be performed periodically
on a frame-count basis, or inline as the activity occurs.
Add MVK_CONFIG_PERFORMANCE_LOGGING_INLINE env var to enable/disable
logging of performance of each activity when it happens.
Removed vkGetSwapchainPerformanceMVK() and MVKSwapchainPerformance from API.
Updated VK_MVK_MOLTENVK_SPEC_VERSION to 25.
Updated MoltenVK version to 1.0.42.
Add MVKPresentableSwapchainImage and MVKPeerSwapchainImage subclasses to
MVKSwapchainImage, with MVKPresentableSwapchainImage instances created inside
swapchain, and MVKPeerSwapchainImage instances created using vkCreateImage().
MVKPeerSwapchainImage retrieve and share CAMetalDrawable from corresponding
MVKPresentableSwapchainImage.
Remove obsolete MVKSwapchainImageAvailability::waitCount member that was initializing
randomly and corrupting swapchain image acquisition ordering evaluations.
Rename several member functions to clarify purpose.
Fix the make install build command to overwrite the existing framework
in the system framework library.
Update README.md to clarify the instructions for using make install.
Add Scripts/packagePregenSpirvToolsHeaders script to automate packaging Spirv-Tools
headers in support of the fetchDependencies --skip-spirv-tools-build option.
Update Docs/Whats_New.md.
Move call to MVKSwapchainImage::resetMetalDrawable() from immediately after
presentation until request to acquire, to preserve image content for copying
after presentation in cases such as an app screen capture operation.
Testing indicates this deferral has little or no adverse effect on the performance
of retrieving the drawable when next needed.
See GitHub issues 792 & 832. Depth/stencil textures issued from MTLHeap can be flaky in
some situations, including depth-only rendering on Intel GPUs, and corruption when DS
texture with sampling usage is combined with non-DS texture on a single placement heap.
Add MVKPixelFormats::getMTLTextureUsageFromVkImageUsageFlags(), which takes
into account limitations of pixel formats.
MVKImage remove getMTLTextureUsage(), getSupportsAnyFormatFeature()
and getSupportsAllFormatFeatures().
MVKPixelFormats tracks MVKPhysicalDevice, not just MVKVulkanAPIObject.
MVKPixelFormats refactor constructors and internal retrieval of MTLDevice.
Add MTLPixelFormat to mvkMTLTextureUsageFromVkImageUsageFlags() params for compatibility.
Remove optionality of hasResolveAttachment param in
mvkMTLStoreActionFromVkAttachmentStoreOp() to support C calling.