mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
graphicsdriver/metal: Bug fix: Synchronizing textures on iOS was necessary
Fixes #1337
This commit is contained in:
parent
20ccafce4b
commit
e565433fb0
@ -895,13 +895,8 @@ func (i *Image) IsInvalidated() bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (i *Image) syncTexture() {
|
func (i *Image) syncTexture() {
|
||||||
// The texture's storage must be 'managed' to synchronize.
|
// Calling SynchronizeTexturein mtl.m is ignored on iOS, but it looks like committing BliCommandEncoder is
|
||||||
//
|
// necessary (#1337).
|
||||||
// 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: flushIfNeeded is not called yet?")
|
panic("metal: command buffer must be empty at syncTexture: flushIfNeeded is not called yet?")
|
||||||
|
Loading…
Reference in New Issue
Block a user