mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-11 19:48:54 +01:00
graphicsdriver/metal: Bug fix: synchronizing must be skipped on iOS
This commit is contained in:
parent
9f76b96c1f
commit
5a176d6f4f
@ -832,6 +832,13 @@ func (i *Image) IsInvalidated() bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (i *Image) syncTexture() {
|
func (i *Image) syncTexture() {
|
||||||
|
// The texture's storage must be 'managed' to synchronize.
|
||||||
|
//
|
||||||
|
// https://developer.apple.com/documentation/metal/mtlblitcommandencoder/1400757-synchronize
|
||||||
|
if storageMode == mtl.StorageModeShared {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
i.graphics.t.Call(func() error {
|
i.graphics.t.Call(func() error {
|
||||||
if i.graphics.cb != (mtl.CommandBuffer{}) {
|
if i.graphics.cb != (mtl.CommandBuffer{}) {
|
||||||
panic("metal: command buffer must be empty at syncTexture: flush is not called yet?")
|
panic("metal: command buffer must be empty at syncTexture: flush is not called yet?")
|
||||||
|
Loading…
Reference in New Issue
Block a user