mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-16 18:47:57 -05:00
Fixed block height settings for RenderTargets and Depth Buffers, and added block width and block depth
This commit is contained in:
@ -161,7 +161,9 @@ struct TICEntry {
|
||||
BitField<21, 3, TICHeaderVersion> header_version;
|
||||
};
|
||||
union {
|
||||
BitField<0, 3, u32> block_width;
|
||||
BitField<3, 3, u32> block_height;
|
||||
BitField<6, 3, u32> block_depth;
|
||||
|
||||
// High 16 bits of the pitch value
|
||||
BitField<0, 16, u32> pitch_high;
|
||||
@ -202,13 +204,24 @@ struct TICEntry {
|
||||
return depth_minus_1 + 1;
|
||||
}
|
||||
|
||||
u32 BlockWidth() const {
|
||||
ASSERT(IsTiled());
|
||||
// The block height is stored in log2 format.
|
||||
return 1 << block_width;
|
||||
}
|
||||
|
||||
u32 BlockHeight() const {
|
||||
ASSERT(header_version == TICHeaderVersion::BlockLinear ||
|
||||
header_version == TICHeaderVersion::BlockLinearColorKey);
|
||||
ASSERT(IsTiled());
|
||||
// The block height is stored in log2 format.
|
||||
return 1 << block_height;
|
||||
}
|
||||
|
||||
u32 BlockDepth() const {
|
||||
ASSERT(IsTiled());
|
||||
// The block height is stored in log2 format.
|
||||
return 1 << block_depth;
|
||||
}
|
||||
|
||||
bool IsTiled() const {
|
||||
return header_version == TICHeaderVersion::BlockLinear ||
|
||||
header_version == TICHeaderVersion::BlockLinearColorKey;
|
||||
|
Reference in New Issue
Block a user