From 04f319066dd13917dc652855eec3614bc79c56f7 Mon Sep 17 00:00:00 2001 From: degasus Date: Mon, 26 Dec 2016 20:54:37 +0100 Subject: TextureCache: Extract BP enum check to VideoCommon. We have TOO many video backends. --- Source/Core/VideoCommon/TextureCacheBase.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'Source/Core/VideoCommon/TextureCacheBase.cpp') diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp index d26110b5d0..4d63e52a0a 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/TextureCacheBase.cpp @@ -862,9 +862,8 @@ TextureCacheBase::TCacheEntryBase* TextureCacheBase::Load(const u32 stage) } void TextureCacheBase::CopyRenderTargetToTexture(u32 dstAddr, unsigned int dstFormat, u32 dstStride, - PEControl::PixelFormat srcFormat, - const EFBRectangle& srcRect, bool isIntensity, - bool scaleByHalf) + bool is_depth_copy, const EFBRectangle& srcRect, + bool isIntensity, bool scaleByHalf) { // Emulation methods: // @@ -936,7 +935,7 @@ void TextureCacheBase::CopyRenderTargetToTexture(u32 dstAddr, unsigned int dstFo unsigned int cbufid = -1; bool efbHasAlpha = bpmem.zcontrol.pixel_format == PEControl::RGBA6_Z24; - if (srcFormat == PEControl::Z24) + if (is_depth_copy) { switch (dstFormat) { @@ -1240,7 +1239,7 @@ void TextureCacheBase::CopyRenderTargetToTexture(u32 dstAddr, unsigned int dstFo if (copy_to_ram) { - CopyEFB(dst, dstFormat, tex_w, bytes_per_row, num_blocks_y, dstStride, srcFormat, srcRect, + CopyEFB(dst, dstFormat, tex_w, bytes_per_row, num_blocks_y, dstStride, is_depth_copy, srcRect, isIntensity, scaleByHalf); } else @@ -1321,7 +1320,7 @@ void TextureCacheBase::CopyRenderTargetToTexture(u32 dstAddr, unsigned int dstFo entry->SetEfbCopy(dstStride); entry->is_custom_tex = false; - entry->FromRenderTarget(dst, srcFormat, srcRect, scaleByHalf, cbufid, colmat); + entry->FromRenderTarget(dst, is_depth_copy, srcRect, scaleByHalf, cbufid, colmat); u64 hash = entry->CalculateHash(); entry->SetHashes(hash, hash); -- cgit v1.2.3 From abf9bb170bf954220a50921a10f57eaa30e17779 Mon Sep 17 00:00:00 2001 From: degasus Date: Mon, 26 Dec 2016 21:33:57 +0100 Subject: TextureCache: Drop unused parameter in backend API. --- Source/Core/VideoCommon/TextureCacheBase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/VideoCommon/TextureCacheBase.cpp') diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp index 4d63e52a0a..b70cfd8391 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/TextureCacheBase.cpp @@ -1320,7 +1320,7 @@ void TextureCacheBase::CopyRenderTargetToTexture(u32 dstAddr, unsigned int dstFo entry->SetEfbCopy(dstStride); entry->is_custom_tex = false; - entry->FromRenderTarget(dst, is_depth_copy, srcRect, scaleByHalf, cbufid, colmat); + entry->FromRenderTarget(is_depth_copy, srcRect, scaleByHalf, cbufid, colmat); u64 hash = entry->CalculateHash(); entry->SetHashes(hash, hash); -- cgit v1.2.3