mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 17:26:01 +08:00
[iOS] Spine fix Metal deadlock (#2816)
This commit is contained in:
parent
8b99da4cb4
commit
759c8115c4
@ -131,6 +131,10 @@ internal final class SpineRenderer: NSObject, MTKViewDelegate {
|
|||||||
let commandBuffer = commandQueue.makeCommandBuffer(),
|
let commandBuffer = commandQueue.makeCommandBuffer(),
|
||||||
let renderPassDescriptor = view.currentRenderPassDescriptor,
|
let renderPassDescriptor = view.currentRenderPassDescriptor,
|
||||||
let renderEncoder = commandBuffer.makeRenderCommandEncoder(descriptor: renderPassDescriptor) else {
|
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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user