这是indexloc提供的服务,不要输入任何密码
Skip to content

Limit for the maximum buffer size #1371

@kvark

Description

@kvark

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions