mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-27 04:25:12 +00:00
texture_cache: Handle greater guest_size with equal resources.
This commit is contained in:
parent
37887e8fde
commit
f10d63a02c
@ -222,14 +222,15 @@ std::tuple<ImageId, int, int> TextureCache::ResolveOverlap(const ImageInfo& imag
|
|||||||
-1, -1};
|
-1, -1};
|
||||||
}
|
}
|
||||||
|
|
||||||
ImageId new_image_id{};
|
ASSERT(image_info.type == tex_cache_image.info.type);
|
||||||
if (image_info.type == tex_cache_image.info.type) {
|
if (image_info.resources == tex_cache_image.info.resources) {
|
||||||
ASSERT(image_info.resources > tex_cache_image.info.resources);
|
// Could happen due to texture and render target guest_size mismatch
|
||||||
new_image_id = ExpandImage(image_info, cache_image_id);
|
return {cache_image_id, -1, -1};
|
||||||
} else {
|
|
||||||
UNREACHABLE();
|
|
||||||
}
|
}
|
||||||
return {new_image_id, -1, -1};
|
|
||||||
|
// At this point, something is wrong if we aren't expanding the image
|
||||||
|
ASSERT(image_info.resources > tex_cache_image.info.resources);
|
||||||
|
return {ExpandImage(image_info, cache_image_id), -1, -1};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Right overlap, the image requested is a possible subresource of the image from cache.
|
// Right overlap, the image requested is a possible subresource of the image from cache.
|
||||||
|
Loading…
Reference in New Issue
Block a user