[iOS] Spine fix Metal deadlock (#2816)

This commit is contained in:
Byeong Gwan 2025-04-17 18:19:14 +09:00 committed by GitHub
parent 8b99da4cb4
commit 759c8115c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -131,6 +131,10 @@ internal final class SpineRenderer: NSObject, MTKViewDelegate {
let commandBuffer = commandQueue.makeCommandBuffer(),
let renderPassDescriptor = view.currentRenderPassDescriptor,
let renderEncoder = commandBuffer.makeRenderCommandEncoder(descriptor: renderPassDescriptor) else {
// this can happen if,
// - CAMetalLayer is configured with drawable timeout, and CAMetalLayer is run out of Drawable
// - CAMetalLayer is added to the window with frame size of zero or incorrect layout constraint -> currentRenderPassDescriptor is null
bufferingSemaphore.signal()
return
}