From a2f410f9da69888f62f524105a93da330f56a89a Mon Sep 17 00:00:00 2001 From: Shinmegumi Date: Fri, 1 Aug 2025 19:29:41 +0200 Subject: [PATCH] revert c267178e84192c1ba3a5ed6740220e467bd051c9 revert Revert "[vk] Remove improper check for image depth in texture cache. (#164)" This reverts commit 6fd10fd85eda83ce660f79bf6e5491806df2cf6d. Confirmed that this was not the cause of the slowdown issue so can be reverted for proper testing with other changes after a rebase. --- src/video_core/texture_cache/texture_cache.h | 1 + src/video_core/texture_cache/util.cpp | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index 6c733fe902..78b6684c49 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -1426,6 +1426,7 @@ ImageId TextureCache

::JoinImages(const ImageInfo& info, GPUVAddr gpu_addr, DA if (solution) { gpu_addr = solution->gpu_addr; cpu_addr = solution->cpu_addr; + // TODO: properly update new_info.size.depth. new_info.resources = solution->resources; join_overlap_ids.push_back(overlap_id); join_copies_to_do.emplace_back(JoinCopy{false, overlap_id}); diff --git a/src/video_core/texture_cache/util.cpp b/src/video_core/texture_cache/util.cpp index 1a6f0d1ad1..f61a8558d9 100644 --- a/src/video_core/texture_cache/util.cpp +++ b/src/video_core/texture_cache/util.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project // SPDX-FileCopyrightText: Ryujinx Team and Contributors // SPDX-License-Identifier: GPL-2.0-or-later AND MIT @@ -1216,10 +1219,10 @@ std::optional FindSubresource(const ImageInfo& candidate, const return std::nullopt; } if (existing.type == ImageType::e3D) { - const u32 mip_depth = std::max(1U, existing.size.depth << base->level); - if (mip_depth < candidate.size.depth + base->layer) { - return std::nullopt; - } + // const u32 mip_depth = std::max(1U, existing.size.depth << base->level); + // if (mip_depth < candidate.size.depth + base->layer) { + // return std::nullopt; + // } } else if (existing.resources.layers < candidate.resources.layers + base->layer) { return std::nullopt; }