diff options
-rw-r--r-- | o3d/core/cross/image_utils.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/o3d/core/cross/image_utils.h b/o3d/core/cross/image_utils.h index c9ee2d4..28e8b34 100644 --- a/o3d/core/cross/image_utils.h +++ b/o3d/core/cross/image_utils.h @@ -79,7 +79,7 @@ inline unsigned int ComputeMipMapCount( // Gets the smallest power-of-two value that is at least as high as // dimension. This is the POT dimension used in ScaleUpToPOT. inline unsigned int ComputePOTSize(unsigned int dimension) { - return 1 << base::bits::Log2Ceiling(dimension); + return (dimension == 0) ? 0 : 1 << base::bits::Log2Ceiling(dimension); } // Computes one dimension of a mip. |