summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureCacheBase.cpp
diff options
context:
space:
mode:
authorMarkus Wick <markus+github@selfnet.de>2015-05-02 13:27:38 +0200
committerMarkus Wick <markus+github@selfnet.de>2015-05-02 13:27:38 +0200
commita76bfb1f5587cb083d4bd3c3e272ed4ae638ec5b (patch)
treed43fb30fbeeebc283b9b88bd77b6821114edb7a3 /Source/Core/VideoCommon/TextureCacheBase.cpp
parent74109231971e84c5303528f99b951593a0f16d4e (diff)
parent54f44439715975d5b6e6e15ad7bad5c20ae625ef (diff)
Merge pull request #2356 from Armada651/dump-efb
VideoCommon: Implement EFB dumping for both backends.
Diffstat (limited to 'Source/Core/VideoCommon/TextureCacheBase.cpp')
-rw-r--r--Source/Core/VideoCommon/TextureCacheBase.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp
index 53168f45e7..251ee54783 100644
--- a/Source/Core/VideoCommon/TextureCacheBase.cpp
+++ b/Source/Core/VideoCommon/TextureCacheBase.cpp
@@ -873,6 +873,13 @@ void TextureCache::CopyRenderTargetToTexture(u32 dstAddr, unsigned int dstFormat
entry->FromRenderTarget(dstAddr, dstFormat, srcFormat, srcRect, isIntensity, scaleByHalf, cbufid, colmat);
+ if (g_ActiveConfig.bDumpEFBTarget)
+ {
+ static int count = 0;
+ entry->Save(StringFromFormat("%sefb_frame_%i.png", File::GetUserPath(D_DUMPTEXTURES_IDX).c_str(),
+ count++), 0);
+ }
+
textures.insert(TexCache::value_type(dstAddr, entry));
}