mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 10:48:53 +01:00
graphicsdriver/metal: Bug fix: avoid using mtl.LoadActionDontCare
Fixes #1019
This commit is contained in:
parent
38d8cbf6af
commit
9298b044e3
@ -587,13 +587,11 @@ func (d *Driver) Draw(indexLen int, indexOffset int, mode driver.CompositeMode,
|
||||
d.view.update()
|
||||
|
||||
rpd := mtl.RenderPassDescriptor{}
|
||||
if d.dst.screen {
|
||||
rpd.ColorAttachments[0].LoadAction = mtl.LoadActionDontCare
|
||||
rpd.ColorAttachments[0].StoreAction = mtl.StoreActionStore
|
||||
} else {
|
||||
rpd.ColorAttachments[0].LoadAction = mtl.LoadActionLoad
|
||||
rpd.ColorAttachments[0].StoreAction = mtl.StoreActionStore
|
||||
}
|
||||
// Even though the destination pixels are not used, mtl.LoadActionDontCare might cause glitches
|
||||
// (#1019). Always using mtl.LoadActionLoad is safe.
|
||||
rpd.ColorAttachments[0].LoadAction = mtl.LoadActionLoad
|
||||
rpd.ColorAttachments[0].StoreAction = mtl.StoreActionStore
|
||||
|
||||
var t mtl.Texture
|
||||
if d.dst.screen {
|
||||
if d.screenDrawable == (ca.MetalDrawable{}) {
|
||||
|
Loading…
Reference in New Issue
Block a user