mirror of
https://github.com/yuzu-emu/yuzu-android
synced 2024-11-22 20:33:39 +00:00
Merge yuzu-emu#13171
This commit is contained in:
parent
4052ffb97b
commit
597a1da426
1 changed files with 6 additions and 2 deletions
|
@ -2114,7 +2114,9 @@ void TextureCache<P>::TrackImage(ImageBase& image, ImageId image_id) {
|
|||
ASSERT(False(image.flags & ImageFlagBits::Tracked));
|
||||
image.flags |= ImageFlagBits::Tracked;
|
||||
if (False(image.flags & ImageFlagBits::Sparse)) {
|
||||
if (image.cpu_addr < ~(1ULL << 40)) {
|
||||
device_memory.UpdatePagesCachedCount(image.cpu_addr, image.guest_size_bytes, 1);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (True(image.flags & ImageFlagBits::Registered)) {
|
||||
|
@ -2140,7 +2142,9 @@ void TextureCache<P>::UntrackImage(ImageBase& image, ImageId image_id) {
|
|||
ASSERT(True(image.flags & ImageFlagBits::Tracked));
|
||||
image.flags &= ~ImageFlagBits::Tracked;
|
||||
if (False(image.flags & ImageFlagBits::Sparse)) {
|
||||
if (image.cpu_addr < ~(1ULL << 40)) {
|
||||
device_memory.UpdatePagesCachedCount(image.cpu_addr, image.guest_size_bytes, -1);
|
||||
}
|
||||
return;
|
||||
}
|
||||
ASSERT(True(image.flags & ImageFlagBits::Registered));
|
||||
|
|
Loading…
Reference in a new issue