waitForDrawable(_:)
Schedules a wait operation on the command queue to ensure the display is no longer using a specific Metal drawable.
Declaration
func waitForDrawable(_ drawable: any MTLDrawable)Parameters
- drawable:
Mtldrawable instance to signal.
Discussion
Use this method to ensure the display is no longer using a MTLDrawable instance before executing any subsequent commands.
This method returns immediately and doesn’t perform any synchronization on the current thread. You are responsible for calling this method before committing any command buffers containing commands that target this drawable.
Call this method multiple times if you commit your command buffers to multiple command queues.