mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-19 04:18:06 +00:00
texture_cache: avoid overestimation of ASTC texture sizes
This commit is contained in:
parent
e882f6c1c3
commit
9a10c66e40
3 changed files with 15 additions and 5 deletions
|
@ -1972,7 +1972,7 @@ void TextureCache<P>::RegisterImage(ImageId image_id) {
|
|||
if ((IsPixelFormatASTC(image.info.format) &&
|
||||
True(image.flags & ImageFlagBits::AcceleratedUpload)) ||
|
||||
True(image.flags & ImageFlagBits::Converted)) {
|
||||
tentative_size = EstimatedDecompressedSize(tentative_size, image.info.format);
|
||||
tentative_size = TranscodedAstcSize(tentative_size, image.info.format);
|
||||
}
|
||||
total_used_memory += Common::AlignUp(tentative_size, 1024);
|
||||
image.lru_index = lru_cache.Insert(image_id, frame_tick);
|
||||
|
@ -2142,7 +2142,7 @@ void TextureCache<P>::DeleteImage(ImageId image_id, bool immediate_delete) {
|
|||
if ((IsPixelFormatASTC(image.info.format) &&
|
||||
True(image.flags & ImageFlagBits::AcceleratedUpload)) ||
|
||||
True(image.flags & ImageFlagBits::Converted)) {
|
||||
tentative_size = EstimatedDecompressedSize(tentative_size, image.info.format);
|
||||
tentative_size = TranscodedAstcSize(tentative_size, image.info.format);
|
||||
}
|
||||
total_used_memory -= Common::AlignUp(tentative_size, 1024);
|
||||
const GPUVAddr gpu_addr = image.gpu_addr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue