summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureCacheBase.cpp
diff options
context:
space:
mode:
authorMarkus Wick <degasus@users.noreply.github.com>2017-04-12 01:09:30 +0200
committerGitHub <noreply@github.com>2017-04-12 01:09:30 +0200
commit29344cb5ff7cfaae08349726a092b78689c17a45 (patch)
tree64ac677546927d8565e0a7c1dc2dcfe3824fe244 /Source/Core/VideoCommon/TextureCacheBase.cpp
parent8ecc5e9b7a43c346ffa87572d45ff7e38c83c632 (diff)
parent5e7bd03d0b8aaf16b4baa716d73c4804760a84c0 (diff)
Merge pull request #5202 from stenzek/efb-copy-source-format
TextureConversionShader: Consider source format of EFB for EFB2RAM
Diffstat (limited to 'Source/Core/VideoCommon/TextureCacheBase.cpp')
-rw-r--r--Source/Core/VideoCommon/TextureCacheBase.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp
index c12c53be27..89d473cfec 100644
--- a/Source/Core/VideoCommon/TextureCacheBase.cpp
+++ b/Source/Core/VideoCommon/TextureCacheBase.cpp
@@ -969,7 +969,8 @@ void TextureCacheBase::CopyRenderTargetToTexture(u32 dstAddr, unsigned int dstFo
ColorMask[0] = ColorMask[1] = ColorMask[2] = ColorMask[3] = 255.0f;
ColorMask[4] = ColorMask[5] = ColorMask[6] = ColorMask[7] = 1.0f / 255.0f;
unsigned int cbufid = -1;
- bool efbHasAlpha = bpmem.zcontrol.pixel_format == PEControl::RGBA6_Z24;
+ u32 srcFormat = bpmem.zcontrol.pixel_format;
+ bool efbHasAlpha = srcFormat == PEControl::RGBA6_Z24;
if (is_depth_copy)
{
@@ -1278,8 +1279,9 @@ void TextureCacheBase::CopyRenderTargetToTexture(u32 dstAddr, unsigned int dstFo
if (copy_to_ram)
{
- CopyEFB(dst, dstFormat, tex_w, bytes_per_row, num_blocks_y, dstStride, is_depth_copy, srcRect,
- isIntensity, scaleByHalf);
+ EFBCopyFormat format(srcFormat, static_cast<TextureFormat>(dstFormat));
+ CopyEFB(dst, format, tex_w, bytes_per_row, num_blocks_y, dstStride, is_depth_copy, srcRect,
+ scaleByHalf);
}
else
{