From 6b35ad4a88f7705acff95094290afcb024a7ef2f Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Wed, 28 Sep 2022 01:40:34 +0900 Subject: [PATCH] internal/mipmap: bug fix: mipmap images were unexpectedly volatile Closes #2354 --- internal/mipmap/mipmap.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/mipmap/mipmap.go b/internal/mipmap/mipmap.go index b45f9324e..0f85fa983 100644 --- a/internal/mipmap/mipmap.go +++ b/internal/mipmap/mipmap.go @@ -181,7 +181,12 @@ func (m *Mipmap) level(level int) *buffered.Image { m.setImg(level, nil) return nil } - s := buffered.NewImage(w2, h2, atlas.ImageTypeVolatile) + + t := atlas.ImageTypeRegular + if m.volatile { + t = atlas.ImageTypeVolatile + } + s := buffered.NewImage(w2, h2, t) dstRegion := graphicsdriver.Region{ X: 0,