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

@ -49,7 +49,7 @@ private:
static std::unique_ptr<HiresTexture> Load(const std::string& base_filename, u32 width,
u32 height);
static bool LoadDDSTexture(HiresTexture* tex, const std::string& filename);
static bool LoadDDSTexture(Level& level, const std::string& filename);
static bool LoadDDSTexture(Level& level, const std::string& filename, u32 mip_level);
static bool LoadTexture(Level& level, const std::vector<u8>& buffer);
static void Prefetch();