diff options
Diffstat (limited to 'Source/Core/VideoCommon')
| -rw-r--r-- | Source/Core/VideoCommon/TextureCacheBase.cpp | 19 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/TextureCacheBase.h | 4 |
2 files changed, 23 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp index 8f1d700dfd..44fdf9fe48 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/TextureCacheBase.cpp @@ -1050,6 +1050,25 @@ void TextureCacheBase::CopyRenderTargetToTexture(u32 dstAddr, unsigned int dstFo entry->FromRenderTarget(dst, dstFormat, dstStride, srcFormat, srcRect, isIntensity, scaleByHalf, cbufid, colmat); + if (g_ActiveConfig.bSkipEFBCopyToRam) + { + entry->Zero(dst); + } + else + { + g_texture_cache->CopyEFB( + dst, + entry->format, + entry->native_width, + entry->BytesPerRow(), + entry->NumBlocksY(), + entry->memory_stride, + srcFormat, + srcRect, + isIntensity, + scaleByHalf); + } + u64 hash = entry->CalculateHash(); entry->SetHashes(hash, hash); diff --git a/Source/Core/VideoCommon/TextureCacheBase.h b/Source/Core/VideoCommon/TextureCacheBase.h index 9e7b4a7c71..1dbddd253f 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.h +++ b/Source/Core/VideoCommon/TextureCacheBase.h @@ -130,6 +130,10 @@ public: virtual TCacheEntryBase* CreateTexture(const TCacheEntryConfig& config) = 0; + virtual void CopyEFB(u8* dst, u32 format, u32 native_width, u32 bytes_per_row, u32 num_blocks_y, u32 memory_stride, + PEControl::PixelFormat srcFormat, const EFBRectangle& srcRect, + bool isIntensity, bool scaleByHalf) = 0; + virtual void CompileShaders() = 0; // currently only implemented by OGL virtual void DeleteShaders() = 0; // currently only implemented by OGL |
