aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJPikachu <jpikachu@eden-emu.dev>2025-07-27 19:56:22 +0200
committercrueter <crueter@eden-emu.dev>2025-07-27 19:56:22 +0200
commiteeb68768d6c74007f18052f3082c136ebde95c30 (patch)
treea4f92a82194f58bca8cee5352e70b55c8dbd72ad /src
parent0b29fb7c8ad3f83bf59233311498fdbfc74cd680 (diff)
[vk] Exclude size equal alpha different copies from incompatible copy (#138)
Should fix bugs in Splatoon 2 and TotK Co-authored-by: Maufeat <sahyno1996@gmail.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/138 Co-authored-by: JPikachu <jpikachu@eden-emu.dev> Co-committed-by: JPikachu <jpikachu@eden-emu.dev>
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_vulkan/vk_texture_cache.cpp6
-rw-r--r--src/video_core/surface.cpp9
2 files changed, 13 insertions, 2 deletions
diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.cpp b/src/video_core/renderer_vulkan/vk_texture_cache.cpp
index 6272d6231a..9259639107 100644
--- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp
+++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -1368,8 +1371,7 @@ void TextureCacheRuntime::CopyImage(Image& dst, Image& src,
std::span<const VideoCommon::ImageCopy> copies) {
// As per the size-compatible formats section of vulkan, copy manually via ReinterpretImage
// these images that aren't size-compatible
- if (HasAlpha(src.info.format) != HasAlpha(dst.info.format) ||
- BytesPerBlock(src.info.format) != BytesPerBlock(dst.info.format)) {
+ if (BytesPerBlock(src.info.format) != BytesPerBlock(dst.info.format)) {
auto oneCopy = VideoCommon::ImageCopy{
.src_offset = VideoCommon::Offset3D(0, 0, 0),
.dst_offset = VideoCommon::Offset3D(0, 0, 0),
diff --git a/src/video_core/surface.cpp b/src/video_core/surface.cpp
index c791bfa4e4..1998849e84 100644
--- a/src/video_core/surface.cpp
+++ b/src/video_core/surface.cpp
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: 2014 Citra Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -263,6 +266,12 @@ bool HasAlpha(PixelFormat pixel_format) {
case PixelFormat::B8G8R8A8_SRGB:
case PixelFormat::BC1_RGBA_SRGB:
case PixelFormat::A4B4G4R4_UNORM:
+ case PixelFormat::BC2_SRGB:
+ case PixelFormat::BC2_UNORM:
+ case PixelFormat::BC3_SRGB:
+ case PixelFormat::BC3_UNORM:
+ case PixelFormat::BC7_SRGB:
+ case PixelFormat::BC7_UNORM:
return true;
default:
return false;