back to limit vps instead of fps as this fix fps limit and now it works correctly as now the sync between the plug in and the core is almost correct.

fixed fps display in the top bar, now it shows the real fps of the game.
some code clean up and some corrections to make everything work right in the reference renderer.
multiples xfb now is broken even in single core as is was not an error caused by dual core, i really dono where the error is,everything looks correct but if you test a game with multiples xfb or the ipl you will see the error.
ector if you can take a look at he code and throw me some ideas i'll thank you.
please test.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5272 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Rodolfo Osvaldo Bogado
2010-04-03 22:22:55 +00:00
parent 962fef0626
commit a4736f7f6b
11 changed files with 39 additions and 86 deletions

View File

@ -340,7 +340,7 @@ bool Renderer::Init()
s_LastFrameDumped = false;
s_AVIDumping = false;
// We're not using fixed function, except for some 2D.
// We're not using fixed function.
// Let's just set the matrices to identity to be sure.
D3DXMATRIX mtx;
D3DXMatrixIdentity(&mtx);
@ -572,19 +572,13 @@ void Renderer::RenderToXFB(u32 xfbAddr, u32 fbWidth, u32 fbHeight, const EFBRect
{
if(!fbWidth || !fbHeight)
return;
//VideoFifo_CheckEFBAccess();
// If we're about to write to a requested XFB, make sure the previous
// contents make it to the screen first.
if (g_ActiveConfig.bUseXFB)
{
VideoFifo_CheckSwapRequestAt(xfbAddr, fbWidth, fbHeight);
}
VideoFifo_CheckEFBAccess();
FBManager.CopyToXFB(xfbAddr, fbWidth, fbHeight, sourceRc);
XFBWrited = true;
// XXX: Without the VI, how would we know what kind of field this is? So
// just use progressive.
if (!g_ActiveConfig.bUseXFB)
{
// XXX: Without the VI, how would we know what kind of field this is? So
// just use progressive.
Renderer::Swap(xfbAddr, FIELD_PROGRESSIVE, fbWidth, fbHeight);
Common::AtomicStoreRelease(s_swapRequested, FALSE);
}
@ -1019,9 +1013,7 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight)
}
// this function is called after the XFB field is changed, not after
// EFB is copied to XFB. In this way, flickering is reduced in games
// and seems to also give more FPS in ZTP
if (field == FIELD_LOWER)
xfbAddr -= fbWidth * 2;
// and seems to also give more FPS in ZTP
u32 xfbCount = 0;
const XFBSource** xfbSourceList = FBManager.GetXFBSource(xfbAddr, fbWidth, fbHeight, xfbCount);
@ -1029,9 +1021,7 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight)
{
g_VideoInitialize.pCopiedToXFB(false);
return;
}
}
Renderer::ResetAPIState();
// Set the backbuffer as the rendering target
@ -1319,7 +1309,7 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight)
D3D::dev->SetDepthStencilSurface(FBManager.GetEFBDepthRTSurface());
UpdateViewport();
VertexShaderManager::SetViewportChanged();
g_VideoInitialize.pCopiedToXFB(false);
g_VideoInitialize.pCopiedToXFB(true);
XFBWrited = false;
}