Revoke #01c4568786
This commit is contained in:
parent
dfb9f06e5c
commit
0d49ec0045
1 changed files with 2 additions and 13 deletions
|
@ -123,9 +123,7 @@ template <u32 GOB_EXTENT>
|
||||||
return {
|
return {
|
||||||
.width = AdjustMipBlockSize<GOB_SIZE_X>(num_tiles.width, block_size.width, level),
|
.width = AdjustMipBlockSize<GOB_SIZE_X>(num_tiles.width, block_size.width, level),
|
||||||
.height = AdjustMipBlockSize<GOB_SIZE_Y>(num_tiles.height, block_size.height, level),
|
.height = AdjustMipBlockSize<GOB_SIZE_Y>(num_tiles.height, block_size.height, level),
|
||||||
.depth = level == 0 && num_levels == 1
|
.depth = AdjustMipBlockSize<GOB_SIZE_Z>(num_tiles.depth, block_size.depth, level),
|
||||||
? block_size.depth
|
|
||||||
: AdjustMipBlockSize<GOB_SIZE_Z>(num_tiles.depth, block_size.depth, level),
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -167,13 +165,6 @@ template <u32 GOB_EXTENT>
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] constexpr Extent3D TileShift(const LevelInfo& info, u32 level) {
|
[[nodiscard]] constexpr Extent3D TileShift(const LevelInfo& info, u32 level) {
|
||||||
if (level == 0 && info.num_levels == 1) {
|
|
||||||
return Extent3D{
|
|
||||||
.width = info.block.width,
|
|
||||||
.height = info.block.height,
|
|
||||||
.depth = info.block.depth,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
const Extent3D blocks = NumLevelBlocks(info, level);
|
const Extent3D blocks = NumLevelBlocks(info, level);
|
||||||
return Extent3D{
|
return Extent3D{
|
||||||
.width = AdjustTileSize(info.block.width, GOB_SIZE_X, blocks.width),
|
.width = AdjustTileSize(info.block.width, GOB_SIZE_X, blocks.width),
|
||||||
|
@ -1297,9 +1288,7 @@ u32 MapSizeBytes(const ImageBase& image) {
|
||||||
|
|
||||||
static_assert(CalculateLevelSize(LevelInfo{{1920, 1080, 1}, {0, 2, 0}, {1, 1}, 2, 0, 1}, 0) ==
|
static_assert(CalculateLevelSize(LevelInfo{{1920, 1080, 1}, {0, 2, 0}, {1, 1}, 2, 0, 1}, 0) ==
|
||||||
0x7f8000);
|
0x7f8000);
|
||||||
static_assert(CalculateLevelSize(LevelInfo{{32, 32, 1}, {0, 0, 4}, {1, 1}, 4, 0, 1}, 0) == 0x40000);
|
static_assert(CalculateLevelSize(LevelInfo{{32, 32, 1}, {0, 0, 4}, {1, 1}, 4, 0}, 0) == 0x4000);
|
||||||
|
|
||||||
static_assert(CalculateLevelSize(LevelInfo{{128, 8, 1}, {0, 4, 0}, {1, 1}, 4, 0, 1}, 0) == 0x40000);
|
|
||||||
|
|
||||||
static_assert(CalculateLevelOffset(PixelFormat::R8_SINT, {1920, 1080, 1}, {0, 2, 0}, 0, 7) ==
|
static_assert(CalculateLevelOffset(PixelFormat::R8_SINT, {1920, 1080, 1}, {0, 2, 0}, 0, 7) ==
|
||||||
0x2afc00);
|
0x2afc00);
|
||||||
|
|
Loading…
Reference in a new issue