early-access version 1792

This commit is contained in:
pineappleEA
2021-06-17 04:08:27 +02:00
parent 353c0bee63
commit d3ce8c0322
17 changed files with 124 additions and 50 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