mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 02:38:53 +01:00
internal/graphicsdriver/metal: Optimize the screen writing
This commit is contained in:
parent
5e83f409e6
commit
80ac0646d5
@ -796,10 +796,11 @@ 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
|
||||
}
|
||||
rpd.ColorAttachments[0].StoreAction = mtl.StoreActionStore
|
||||
|
||||
t := dst.mtlTexture()
|
||||
g.lastDstTexture = t
|
||||
|
Loading…
Reference in New Issue
Block a user