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.
If the texture is not properly aligned, creation will fail. Make sure
we ask for enough memory to hold all planes with alignment, or a plane
could wind up beyond the bounds of the heap.
The Metal Feature Set Tables lied. The maximum point size supported by a
device varies; values higher than the true maximum are clamped. For
example, my AMD Radeon Pro 460 clamps point sizes above 64, and my Intel
HD Graphics 530 clamps them above 256. 64 is the minimum maximum
mandated by Vulkan, so that's what we'll report.
The minimum number of samplers is the lesser of 96 or *n* times the
per-stage maximum, where *n* is the number of stages supported. So we
need to account for compute shaders as well as graphics pipeline
shaders.
For some reason, when we create the `MTLCaptureScope` with capture
enabled, in addition to the reference from object creation, Metal
retains the object for no apparent reason in the base `MTLCaptureScope`
initializer. This causes us to leak the capture scope--and with it, the
queue. Let's hope Apple isn't doing anything with that extra reference.
Starting in iOS/tvOS 13, Apple family 4 and up support 124 fragment
input components, matching macOS. Reduce Mac max to 124 to prevent Metal
from complaining when using more than 124 components.
Tessellation control shaders must support at least 120 per-patch output
components, so make sure the limit is that value.