mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-27 19:22:49 +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.
|
// (#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
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The store action should always be 'store' even for the screen (#1700).
|
||||||
|
rpd.ColorAttachments[0].StoreAction = mtl.StoreActionStore
|
||||||
|
|
||||||
t := dst.mtlTexture()
|
t := dst.mtlTexture()
|
||||||
if t == (mtl.Texture{}) {
|
if t == (mtl.Texture{}) {
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user