diff options
| author | Scott Mansell <phiren@gmail.com> | 2015-09-05 02:45:29 +1200 |
|---|---|---|
| committer | Scott Mansell <phiren@gmail.com> | 2015-09-06 21:16:51 +1200 |
| commit | b9be3245e1bcd3929baf4d1c66fe5a14b336cdbc (patch) | |
| tree | 74ad51f328cce90485ee1fdf1f97f2546b01e2bc /Source/Core/VideoBackends/OGL/TextureCache.cpp | |
| parent | 52948bb3ef016abd7e35e775b17b7cf3f487d49c (diff) | |
Move common EFB copy code into VideoCommon
Addded a few duplicated depth copy texture formats to the enum
in TextureDecoder.h. These texture formats were already implemented
in TextureCacheBase and the ogl/dx11 texture cache implementations.
Diffstat (limited to 'Source/Core/VideoBackends/OGL/TextureCache.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/OGL/TextureCache.cpp | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/Source/Core/VideoBackends/OGL/TextureCache.cpp b/Source/Core/VideoBackends/OGL/TextureCache.cpp index d388da2084..c8c71ccc29 100644 --- a/Source/Core/VideoBackends/OGL/TextureCache.cpp +++ b/Source/Core/VideoBackends/OGL/TextureCache.cpp @@ -213,7 +213,7 @@ void TextureCache::TCacheEntry::Load(unsigned int width, unsigned int height, TextureCache::SetStage(); } -void TextureCache::TCacheEntry::FromRenderTarget(u32 dstAddr, unsigned int dstFormat, u32 dstStride, +void TextureCache::TCacheEntry::FromRenderTarget(u8* dstPointer, unsigned int dstFormat, u32 dstStride, PEControl::PixelFormat srcFormat, const EFBRectangle& srcRect, bool isIntensity, bool scaleByHalf, unsigned int cbufid, const float *colmat) @@ -264,24 +264,14 @@ void TextureCache::TCacheEntry::FromRenderTarget(u32 dstAddr, unsigned int dstFo if (!g_ActiveConfig.bSkipEFBCopyToRam) { - int encoded_size = TextureConverter::EncodeToRamFromTexture( - dstAddr, + TextureConverter::EncodeToRamFromTexture( + dstPointer, + this, read_texture, srcFormat == PEControl::Z24, isIntensity, - dstFormat, scaleByHalf, - srcRect, - dstStride); - - u8* dst = Memory::GetPointer(dstAddr); - u64 const new_hash = GetHash64(dst,encoded_size,g_ActiveConfig.iSafeTextureCache_ColorSamples); - - size_in_bytes = (u32)encoded_size; - - TextureCache::MakeRangeDynamic(dstAddr, encoded_size); - - hash = new_hash; + srcRect); } FramebufferManager::SetFramebuffer(0); |
