summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon
diff options
context:
space:
mode:
authorJules Blok <jules.blok@gmail.com>2023-12-29 03:51:59 +0100
committerGitHub <noreply@github.com>2023-12-29 03:51:59 +0100
commitf1d446da3f71f68e028c716641db23a273b49250 (patch)
treea0f87380dceb225a669cbd5c46c1fa27004e9f6c /Source/Core/VideoCommon
parent3ba333fd340913771233c34e6b3ffbecd105a47c (diff)
parentddb4566a418c1d0cf2a0067241b1b288e4558c9f (diff)
Merge pull request #12452 from Tilka/efb24
VideoCommon: apply "force 24-bit color" to EFB-to-VRAM copies as well
Diffstat (limited to 'Source/Core/VideoCommon')
-rw-r--r--Source/Core/VideoCommon/TextureConverterShaderGen.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/TextureConverterShaderGen.cpp b/Source/Core/VideoCommon/TextureConverterShaderGen.cpp
index 92d30895fb..da2e247a7f 100644
--- a/Source/Core/VideoCommon/TextureConverterShaderGen.cpp
+++ b/Source/Core/VideoCommon/TextureConverterShaderGen.cpp
@@ -19,6 +19,26 @@ TCShaderUid GetShaderUid(EFBCopyFormat dst_format, bool is_depth_copy, bool is_i
TCShaderUid out;
UidData* const uid_data = out.GetUidData();
+ if (g_ActiveConfig.bForceTrueColor)
+ {
+ // Increase the precision of EFB copies where it's likely to be safe.
+ switch (dst_format)
+ {
+ case EFBCopyFormat::RGB565:
+ // HACK: XFB is RGB8.
+ // Don't blindly do this in other places though,
+ // the enum value is used to identify XFB copies.
+ // The important thing here is that we need alpha = 1.
+ dst_format = EFBCopyFormat::XFB;
+ break;
+ case EFBCopyFormat::RGB5A3:
+ dst_format = EFBCopyFormat::RGBA8;
+ break;
+ default:
+ // Let's not touch the other formats for now, seems risky.
+ break;
+ }
+ }
uid_data->dst_format = dst_format;
uid_data->efb_has_alpha = bpmem.zcontrol.pixel_format == PixelFormat::RGBA6_Z24;
uid_data->is_depth_copy = is_depth_copy;