mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-12 22:17:26 +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.
|
// (#1019). Always using mtl.LoadActionLoad is safe.
|
||||||
if dst.screen {
|
if dst.screen {
|
||||||
rpd.ColorAttachments[0].LoadAction = mtl.LoadActionClear
|
rpd.ColorAttachments[0].LoadAction = mtl.LoadActionClear
|
||||||
|
rpd.ColorAttachments[0].StoreAction = mtl.StoreActionDontCare
|
||||||
} else {
|
} else {
|
||||||
rpd.ColorAttachments[0].LoadAction = mtl.LoadActionLoad
|
rpd.ColorAttachments[0].LoadAction = mtl.LoadActionLoad
|
||||||
|
rpd.ColorAttachments[0].StoreAction = mtl.StoreActionStore
|
||||||
}
|
}
|
||||||
rpd.ColorAttachments[0].StoreAction = mtl.StoreActionStore
|
|
||||||
|
|
||||||
t := dst.mtlTexture()
|
t := dst.mtlTexture()
|
||||||
g.lastDstTexture = t
|
g.lastDstTexture = t
|
||||||
|
Loading…
Reference in New Issue
Block a user