mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-20 02:47:02 +02:00
Preserve native slices when PS5 volume texture depth grows
This commit is contained in:
+8
-2
@@ -804,8 +804,14 @@ TextureCache::OverlapResult TextureCache::ResolveOverlap(const ImageInfo& reques
|
||||
if (requested.IsBlock() && !cached.info.IsBlock()) {
|
||||
return {ExpandImage(requested, cached_id)};
|
||||
}
|
||||
if (requested.data.size == cached.info.data.size &&
|
||||
(requested.IsVolume() || cached.info.IsVolume())) {
|
||||
// Volume depth is not an array-layer count. A larger depth can retain the
|
||||
// same block-slice layout while requiring a larger native image.
|
||||
if ((requested.IsVolume() || cached.info.IsVolume()) &&
|
||||
(requested.data.size == cached.info.data.size ||
|
||||
(requested.type == cached.info.type && requested.resources == cached.info.resources &&
|
||||
requested.extent.width == cached.info.extent.width &&
|
||||
requested.extent.height == cached.info.extent.height &&
|
||||
requested.extent.depth > cached.info.extent.depth))) {
|
||||
return {ExpandImage(requested, cached_id)};
|
||||
}
|
||||
// PPSA08394
|
||||
|
||||
Reference in New Issue
Block a user