summaryrefslogtreecommitdiff
path: root/core/io
diff options
context:
space:
mode:
authorLyuma <xn.lyuma@gmail.com>2022-01-18 20:29:39 -0800
committerLyuma <xn.lyuma@gmail.com>2022-01-22 17:20:17 -0800
commitb1b20f5f9103e2842c20a96c54d00c8572657b1a (patch)
tree648806946f11a2f948b1d71b4f189bb946d43d13 /core/io
parentf8b8d0d4b82a5eb6ea3829398fd5076f1c49c148 (diff)
Pad etcpak input to 4x4 blocks. Fixes #49981
Diffstat (limited to 'core/io')
-rw-r--r--core/io/image.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/io/image.cpp b/core/io/image.cpp
index 7956d0bad7..9df2b6835c 100644
--- a/core/io/image.cpp
+++ b/core/io/image.cpp
@@ -1434,12 +1434,11 @@ int Image::_get_dst_image_size(int p_width, int p_height, Format p_format, int &
}
// Set mipmap size.
- // It might be necessary to put this after the minimum mipmap size check because of the possible occurrence of "1 >> 1".
if (r_mm_width) {
- *r_mm_width = bw >> 1;
+ *r_mm_width = w;
}
if (r_mm_height) {
- *r_mm_height = bh >> 1;
+ *r_mm_height = h;
}
// Reach target mipmap.