mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-17 17:05:02 +00:00
Fix incompatible format images being passed on overlap resolve (#794)
This commit is contained in:
parent
b97b5a7db4
commit
416e23fe76
1 changed files with 5 additions and 2 deletions
|
@ -109,9 +109,12 @@ ImageId TextureCache::ResolveOverlap(const ImageInfo& image_info, ImageId cache_
|
||||||
}
|
}
|
||||||
|
|
||||||
if (image_info.pixel_format != tex_cache_image.info.pixel_format ||
|
if (image_info.pixel_format != tex_cache_image.info.pixel_format ||
|
||||||
image_info.size != tex_cache_image.info.size ||
|
|
||||||
image_info.guest_size_bytes <= tex_cache_image.info.guest_size_bytes) {
|
image_info.guest_size_bytes <= tex_cache_image.info.guest_size_bytes) {
|
||||||
return merged_image_id ? merged_image_id : cache_image_id;
|
auto result_id = merged_image_id ? merged_image_id : cache_image_id;
|
||||||
|
const auto& result_image = slot_images[result_id];
|
||||||
|
return IsVulkanFormatCompatible(image_info.pixel_format, result_image.info.pixel_format)
|
||||||
|
? result_id
|
||||||
|
: ImageId{};
|
||||||
}
|
}
|
||||||
|
|
||||||
ImageId new_image_id{};
|
ImageId new_image_id{};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue