mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-07 10:50:26 +00:00
some fixes over my last commit, now the speed with xfb disabled must be at least equal to the speed before the xfb implementation. fixed fps counter.
please give some testing to this changes to see if i going the right way. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5235 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
5cf6ed484b
commit
8812fe6a3a
@ -570,15 +570,17 @@ extern volatile u32 s_swapRequested;
|
||||
|
||||
void Renderer::RenderToXFB(u32 xfbAddr, u32 fbWidth, u32 fbHeight, const EFBRectangle& sourceRc)
|
||||
{
|
||||
VideoFifo_CheckEFBAccess();
|
||||
XFBWrited = true;
|
||||
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.
|
||||
VideoFifo_CheckSwapRequestAt(xfbAddr, fbWidth, fbHeight);
|
||||
if (g_ActiveConfig.bUseXFB)
|
||||
{
|
||||
VideoFifo_CheckSwapRequestAt(xfbAddr, fbWidth, fbHeight);
|
||||
}
|
||||
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)
|
||||
@ -1291,6 +1293,7 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight)
|
||||
}
|
||||
D3D::dev->SetRenderTarget(0, FBManager.GetEFBColorRTSurface());
|
||||
D3D::dev->SetDepthStencilSurface(FBManager.GetEFBDepthRTSurface());
|
||||
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
@ -1318,6 +1321,7 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight)
|
||||
D3D::dev->SetDepthStencilSurface(FBManager.GetEFBDepthRTSurface());
|
||||
UpdateViewport();
|
||||
VertexShaderManager::SetViewportChanged();
|
||||
g_VideoInitialize.pCopiedToXFB(false);
|
||||
XFBWrited = false;
|
||||
}
|
||||
|
||||
|
@ -356,7 +356,7 @@ void VideoFifo_CheckSwapRequestAt(u32 xfbAddr, u32 fbWidth, u32 fbHeight)
|
||||
// Run from the CPU thread (from VideoInterface.cpp)
|
||||
void Video_BeginField(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight)
|
||||
{
|
||||
if (s_PluginInitialized)
|
||||
if (s_PluginInitialized && g_ActiveConfig.bUseXFB)
|
||||
{
|
||||
// Make sure previous swap request has made it to the screen
|
||||
if (g_VideoInitialize.bOnThread)
|
||||
|
Loading…
Reference in New Issue
Block a user