diff --git a/src/bimg_p.h b/src/bimg_p.h index ff968d8..52e759b 100644 --- a/src/bimg_p.h +++ b/src/bimg_p.h @@ -85,7 +85,7 @@ namespace bimg if (_hasMips) { const uint32_t max = bx::max(_width, _height, _depth); - const uint32_t num = 1 + bx::ceilLog2(max); + const uint32_t num = 1 + bx::floorLog2(max); return uint8_t(num); }