Replies: 2 comments 1 reply
-
On iOS(tvOS) with unified memory model I think there is no extra penalty. Using private only makes life more complicated/slower: To create a buffer with content we need to create a shared buffer and blit data to private buffer. https://developer.apple.com/documentation/metal/setting_resource_storage_modes/choosing_a_resource_storage_mode_in_ios_and_tvos?language=objc On macOS there could be performance issue with discrete graphics.
On discrete memory: both cases do a copy from system to video memory with slightly different API. So I think managed could handle the problem better for both unified and discreet mode. Quick modification in BufferMtl::create renderer_mtl.mm that uses managed:
This should only happen on macos. Can you check if this is faster? |
Beta Was this translation helpful? Give feedback.
-
Yes, I get much faster. I also tried to modify the
|
Beta Was this translation helpful? Give feedback.
-
Hi! I noticed the performance is much slower on Metal backend compared with DX11 when rendering a mesh with millions of triangles. And I found all the non-dynamic vertex/index buffer is created with default flag which is MTLStorageModeShared. Why the default option for non-dynamic vertex/index buffers isn't managed or private for metal backend? Is there another way to create a private vertex buffer for performance? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions