GPU: Allow using a configurable block height when unswizzling textures.

This commit is contained in:
Subv 2018-04-15 19:53:15 -05:00
parent db5f2bfa7e
commit 6b63aaa5b4
4 changed files with 23 additions and 7 deletions

View file

@ -105,6 +105,13 @@ struct TICEntry {
return height_minus_1 + 1;
}
u32 BlockHeight() const {
ASSERT(header_version == TICHeaderVersion::BlockLinear ||
header_version == TICHeaderVersion::BlockLinearColorKey);
// The block height is stored in log2 format.
return 1 << block_height;
}
bool IsTiled() const {
return header_version == TICHeaderVersion::BlockLinear ||
header_version == TICHeaderVersion::BlockLinearColorKey;