Fixed Frame dumping in VideoSoftware.

Old code dumped the efb, which was no-longer relevant since the
backend gained xfb support.
New code dumps the colour texture which is about to be rendered to
the screen so correctly reflects the bypassXFB option.
This commit is contained in:
Scott Mansell
2014-07-14 23:51:55 +12:00
parent 3ac4e9f171
commit 92eed47213
6 changed files with 26 additions and 33 deletions

View File

@ -152,10 +152,14 @@ void SWRenderer::DrawDebugText()
SWRenderer::RenderText(debugtext.c_str(), 20, 20, 0xFFFFFF00);
}
u8* SWRenderer::getColorTexture() {
u8* SWRenderer::getNextColorTexture() {
return s_xfbColorTexture[!s_currentColorTexture];
}
u8* SWRenderer::getCurrentColorTexture() {
return s_xfbColorTexture[s_currentColorTexture];
}
void SWRenderer::swapColorTexture() {
s_currentColorTexture = !s_currentColorTexture;
}
@ -168,7 +172,7 @@ void SWRenderer::UpdateColorTexture(EfbInterface::yuv422_packed *xfb, u32 fbWidt
}
u32 offset = 0;
u8 *TexturePointer = getColorTexture();
u8 *TexturePointer = getNextColorTexture();
for (u16 y = 0; y < fbHeight; y++)
{
@ -202,7 +206,7 @@ void SWRenderer::Swap(u32 fbWidth, u32 fbHeight)
{
GLInterface->Update(); // just updates the render window position and the backbuffer size
if (!g_SWVideoConfig.bHwRasterizer)
SWRenderer::DrawTexture(s_xfbColorTexture[s_currentColorTexture], fbWidth, fbHeight);
SWRenderer::DrawTexture(getCurrentColorTexture(), fbWidth, fbHeight);
swstats.frameCount++;
SWRenderer::SwapBuffer();