summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureCacheBase.cpp
diff options
context:
space:
mode:
authorMarkus Wick <degasus@users.noreply.github.com>2016-12-27 01:43:57 +0100
committerGitHub <noreply@github.com>2016-12-27 01:43:57 +0100
commitfd54d4f767ad162d6258a41e98df31a85b7d740e (patch)
treefcd6e3dcaed1c305ac3ea021040880d796395335 /Source/Core/VideoCommon/TextureCacheBase.cpp
parent1af9f68240d8bcd87b684e9736da784f7740f438 (diff)
parentabf9bb170bf954220a50921a10f57eaa30e17779 (diff)
Merge pull request #4569 from degasus/texcache2
TextureCache: Extract BP enum check to VideoCommon.
Diffstat (limited to 'Source/Core/VideoCommon/TextureCacheBase.cpp')
-rw-r--r--Source/Core/VideoCommon/TextureCacheBase.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp
index d26110b5d0..b70cfd8391 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(is_depth_copy, srcRect, scaleByHalf, cbufid, colmat);
u64 hash = entry->CalculateHash();
entry->SetHashes(hash, hash);