-
Notifications
You must be signed in to change notification settings - Fork 329
Closed
Labels
Milestone
Description
Metal has a limit, the error looks like this (see forum):
/Library/Caches/com.apple.xbs/Sources/Metal/Metal-56.6.1/ToolsLayers/Debug/MTLDebugDevice.mm:89: failed assertion `newBufferWith*:length 0x20000000 must not exceed 256 MB.'
The limit appears to be exposed on MTLDevice as maxBufferLength property.
Here are some iOS numbers from SO:
- iPad Pro (12.9", 2nd generation) iOS 13.3 - 993 MB (1041235968 bytes)
- iPhone 11 iOS 13.3 - 960 MB (1007468544 bytes)
- iPhone 8 iOS 12.4 - 747 MB (783597568 bytes)
- iPhone 6 iOS 12.1 - 256 MB (268435456 bytes)
The closest thing in other APIs that I could find is Vulkan's VkPhysicalDeviceMaintenance3Properties::maxMemoryAllocationSize
Proposal: introduce a limit for the maximum buffer size, with baseline value of 256Mb.