This is now supported in MSL 2.3. Support varies by device; devices that
support this return `YES` from `supportsPullModelInterpolation`. Based
on my testing, AMD devices do not yet support this, and Intel devices
do. Apple GPUs probably also support this, in order to support OpenGL on
top.
Update SPIRV-Cross to pull in the changes needed for this.
They can now be used as blit destinations and be cleared with a render
pass.
This also fixes a bug where we were incorrectly validating that the
format supported shader writes if the image were linear, even on
iOS/tvOS.
Add macros to set MTLPixelFormatASTC_*_HDR to MTLPixelFormatInvalid on tvOS.
Use MTLRenderPipelineDescriptor::inputPrimitiveTopologyMVK instead of native method.
Starting in macOS 10.15, all desktop GPUs support 256 kiB offsets. Apple
GPUs, however, do not support this until family 7. It isn't clear which
one is the supported limit on Apple Silicon Macs with family 5 or 6
GPUs, so I have left the Apple Silicon limit at 64 kiB for now.
Don't pass descriptor type to MVKDescriptor functions, which already know their
descriptor type, and remove redundant switch tests in each subclass.
Move sanity tests for correct descriptor type to callers.
MVKBufferDescriptor increment dynamic offset index as consumed during binding.
Remove need to track dynamic offset indexes in MVKDescriptorSetLayoutBinding.
Also, enable rendering caps on linear textures. This is supported on
Apple GPUs.
Conversely, disable capabilities supported by desktop GPUs that are not
supported on Apple GPUs.
Sadly, no support for 16-bit packed pixel formats on non-Apple GPUs.
MVKDevice track enabled VkPhysicalDeviceInlineUniformBlockFeaturesEXT features.
Disable prefilled MTLCommandBuffers if update after binding enabled.
Update to latest SPIRV-Cross that includes support for unsized arrays.
MVKDescriptorSetLayoutBinding::getDescriptorCount() considers descriptor set
it is being applied to if it has a variable descriptor count.
Consolidate descriptor creation for inline uniform block with other types.
Don't track dynamic offsets consumed by the descriptor set layout. Instead,
during descriptor binding, track dynamic offsets consumed by each binding and set.
Increase per-stage texture count to 96 for A11 SoC's and above.
Report VkPhysicalDeviceLimits::maxPerStageDescriptorStorageImages as Metal limit of 8.
Add MVKPhysicalDeviceMetalFeatures::maxPerStageStorageTextureCount and set to 8.
Update VK_MVK_MOLTENVK_SPEC_VERSION to 29.
This implementation uses `MTLSharedEvent` where possible, and emulates
it on the host otherwise. Unlike binary semaphores, `MTLSharedEvent`s
map well to timeline semaphores; there should be no problems using them
when they're available.
I'm extremely confident in the `MTLSharedEvent`-based implementation. It
passes nearly all the synchronization tests. I'm less confident in the
emulated implementation.
VK_EXT_descriptor_indexing adds no new functions, but does add six structures to
existing pNext chains. This initial commit processes these structs, but does not
yet perform any operational functionality for this extension.
Both Intel and NV Vulkan drivers enable `strictLines`. My testing shows
in fact that AMD and Apple Silicon exhibit the non-strict-line behavior,
while Intel shows the strict-line behavior.
Metal currently does not support overlapping attribute loads and asserts on
them. Prevent it by shortening format's vector length to fit within the stride,
but print a cautionary message.
An example of affected program is Kingdom Come: Deliverance, which sets
attribute format to RGBA32 in IA and binding stride to 12, while the shader
input is just a float3.
Even if we used a texture view. We can't constrain the depth planes in a
3D texture using a texture view, so we need to set the render depth
plane in that case.
Bind descriptors based on binding number within pipeline layout, not order within
layout, and descriptor set looks up descriptor using binding layout it was created with.