Reaper: Address Feedback.

This commit is contained in:
Fernando Sahmkow 2021-06-14 13:42:22 +02:00
parent 25e2362427
commit 2fd0207e2e
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