diff options
author | Orkun <orkuntezerm@gmail.com> | 2017-11-19 02:24:31 +0300 |
---|---|---|
committer | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-12-16 15:38:36 +0100 |
commit | e021097c80b3bce96f84cba9572ea1ea846cf1b7 (patch) | |
tree | ce57f87e423c768ab5cd2922020b447bb7a68b4e /thirdparty/squish/squish.cpp | |
parent | 92a8a505a086cf6b4a134a385da77f9e3365d42b (diff) |
Fix #12220: Add Decompress Bc5 to Squish
This Commit fixes the corrupted file preview described in #12220.
Added DecompressColourBc5 function to squish.
Diffstat (limited to 'thirdparty/squish/squish.cpp')
-rw-r--r-- | thirdparty/squish/squish.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/thirdparty/squish/squish.cpp b/thirdparty/squish/squish.cpp index 1d22a64ad6..fd11a147de 100644 --- a/thirdparty/squish/squish.cpp +++ b/thirdparty/squish/squish.cpp @@ -135,7 +135,13 @@ void Decompress( u8* rgba, void const* block, int flags ) colourBlock = reinterpret_cast< u8 const* >( block ) + 8; // decompress colour - DecompressColour( rgba, colourBlock, ( flags & kDxt1 ) != 0 ); + // -- GODOT start -- + //DecompressColour( rgba, colourBlock, ( flags & kDxt1 ) != 0 ); + if(( flags & ( kBc5 ) ) != 0) + DecompressColourBc5( rgba, colourBlock); + else + DecompressColour( rgba, colourBlock, ( flags & kDxt1 ) != 0 ); + // -- GODOT end -- // decompress alpha separately if necessary if( ( flags & kDxt3 ) != 0 ) |