-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Acquire a mutex before releasing CAMetalDrawables on main thread. (#7888
) PresentDrawable was moved to main thread by default in #7535 and stopped most crashes when a drawable is released. But there still appears to be crashes if a drawable is released on main thread at the same time that -nextDrawable is called from the Filament render thread. (It's likely that the drawable pool in CAMetalLayer is completely non-thread-safe.) So, add a mutex to the swapchain and always acquire it before creating or releasing a CAMetalDrawable. Users can opt out of this behavior by passing -DFILAMENT_LOCK_METAL_DRAWABLE_POOL=0.
- Loading branch information
Showing
2 changed files
with
27 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters