DarkRadiant: master dbcaf845

Author Committer Branch Timestamp Parent
orbweaver orbweaver master 29.06.2021 19:08 master c52cfae1
Changeset Fix mipmap block size calculation for DDS textures

Unlike the mipmap dimension calculation (which incorrectly rounded up when it
should be doing a simple integer truncation), the block size calculation was
incorrectly rounding down. The new code is more or less copy-pasted from the
TDM codebase, and matches the suggested algorithm documented by Microsoft.

This fixes the inability to upload mipmaps in a 60x128 DXT5 test texture.
mod - radiantcore/imagefile/dds.cpp Diff File