Reaper: Address Feedback.

This commit is contained in:
Fernando Sahmkow 2021-06-14 13:42:22 +02:00
parent 954ad2a61e
commit 0dd98842bf
6 changed files with 43 additions and 20 deletions

View file

@ -283,4 +283,11 @@ std::pair<u32, u32> GetASTCBlockSize(PixelFormat format) {
return {DefaultBlockWidth(format), DefaultBlockHeight(format)};
}
u64 EstimatedDecompressedSize(u64 base_size, PixelFormat format) {
constexpr u64 RGBA8_PIXEL_SIZE = 4;
const u64 base_block_size = static_cast<u64>(DefaultBlockWidth(format)) *
static_cast<u64>(DefaultBlockHeight(format)) * RGBA8_PIXEL_SIZE;
return (base_size * base_block_size) / BytesPerBlock(format);
}
} // namespace VideoCore::Surface