diff options
| author | degasus <wickmarkus@web.de> | 2015-10-29 17:48:35 +0100 |
|---|---|---|
| committer | degasus <wickmarkus@web.de> | 2015-11-15 11:59:52 +0100 |
| commit | dcdf8fd3ced5e5d2b94299bc710a69ee06bab0d6 (patch) | |
| tree | 9ec976d055973f7607b6d7aeaf48bb4a17eada99 /Source/Core/VideoCommon | |
| parent | d7d870435367b2a9eb2f5153c954b354efd98202 (diff) | |
TextureCache: Split efb2ram from efb2tex
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 |
