HiresTextures: Do not load compressed textures with unaligned dimensions

D3D11 cannot handle block compressed textures where the first mip level
is not a multiple of the block size. The simple fix for texture pack
authors: leave these textures uncompressed. You can still use a .dds
container.
This commit is contained in:
Stenzek
2018-05-22 16:13:54 +10:00
parent 7eaba154a4
commit f7a0cae7f4
3 changed files with 25 additions and 10 deletions

View File

@ -335,7 +335,7 @@ std::unique_ptr<HiresTexture> HiresTexture::Load(const std::string& base_filenam
// Try loading DDS textures first, that way we maintain compression of DXT formats.
// TODO: Reduce the number of open() calls here. We could use one fd.
Level level;
if (!LoadDDSTexture(level, filename_iter->second.path))
if (!LoadDDSTexture(level, filename_iter->second.path, mip_level))
{
File::IOFile file;
file.Open(filename_iter->second.path, "rb");