Merge pull request #2356 from Armada651/dump-efb

VideoCommon: Implement EFB dumping for both backends.
This commit is contained in:
Markus Wick 2015-05-02 13:27:38 +02:00
commit a76bfb1f55
2 changed files with 7 additions and 7 deletions

View File

@ -228,13 +228,6 @@ void TextureCache::TCacheEntry::FromRenderTarget(u32 dstAddr, unsigned int dstFo
FramebufferManager::SetFramebuffer(0); FramebufferManager::SetFramebuffer(0);
if (g_ActiveConfig.bDumpEFBTarget)
{
static int count = 0;
SaveTexture(StringFromFormat("%sefb_frame_%i.png", File::GetUserPath(D_DUMPTEXTURES_IDX).c_str(),
count++), GL_TEXTURE_2D_ARRAY, texture, config.width, config.height, 0);
}
g_renderer->RestoreAPIState(); g_renderer->RestoreAPIState();
} }

View File

@ -873,6 +873,13 @@ void TextureCache::CopyRenderTargetToTexture(u32 dstAddr, unsigned int dstFormat
entry->FromRenderTarget(dstAddr, dstFormat, srcFormat, srcRect, isIntensity, scaleByHalf, cbufid, colmat); 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)); textures.insert(TexCache::value_type(dstAddr, entry));
} }