mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
internal/graphicsdriver/metal: Bug fix: The store action must always be 'store'
Closes #1700
This commit is contained in:
parent
337d8d5113
commit
ae0e30196b
@ -792,12 +792,13 @@ func (g *Graphics) draw(rps mtl.RenderPipelineState, dst *Image, dstRegion drive
|
||||
// (#1019). Always using mtl.LoadActionLoad is safe.
|
||||
if dst.screen {
|
||||
rpd.ColorAttachments[0].LoadAction = mtl.LoadActionClear
|
||||
rpd.ColorAttachments[0].StoreAction = mtl.StoreActionDontCare
|
||||
} else {
|
||||
rpd.ColorAttachments[0].LoadAction = mtl.LoadActionLoad
|
||||
rpd.ColorAttachments[0].StoreAction = mtl.StoreActionStore
|
||||
}
|
||||
|
||||
// The store action should always be 'store' even for the screen (#1700).
|
||||
rpd.ColorAttachments[0].StoreAction = mtl.StoreActionStore
|
||||
|
||||
t := dst.mtlTexture()
|
||||
if t == (mtl.Texture{}) {
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user