mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-29 13:55:29 +03:00
Use target format bpb when calculating linear mip level size
This commit is contained in:
parent
849184452c
commit
0f7c04ffb4
@ -64,7 +64,7 @@ namespace skyline::gpu::texture {
|
||||
|
||||
for (size_t i{}; i < levelCount; i++) {
|
||||
size_t linearSize{util::DivideCeil<size_t>(dimensions.width, formatBlockWidth) * formatBpb * util::DivideCeil<size_t>(dimensions.height, formatBlockHeight) * dimensions.depth};
|
||||
size_t targetLinearSize{targetFormatBpb == 0 ? linearSize : util::DivideCeil<size_t>(dimensions.width, targetFormatBlockWidth) * formatBpb * util::DivideCeil<size_t>(dimensions.height, targetFormatBlockHeight) * dimensions.depth};
|
||||
size_t targetLinearSize{targetFormatBpb == 0 ? linearSize : util::DivideCeil<size_t>(dimensions.width, targetFormatBlockWidth) * targetFormatBpb * util::DivideCeil<size_t>(dimensions.height, targetFormatBlockHeight) * dimensions.depth};
|
||||
|
||||
mipLevels.emplace_back(
|
||||
dimensions,
|
||||
|
Loading…
Reference in New Issue
Block a user