Move FPSCounter calls to RenderBase.
This commit is contained in:
parent
a546ef3276
commit
1754cbda9d
|
@ -27,7 +27,6 @@
|
||||||
#include "VideoCommon/AVIDump.h"
|
#include "VideoCommon/AVIDump.h"
|
||||||
#include "VideoCommon/BPFunctions.h"
|
#include "VideoCommon/BPFunctions.h"
|
||||||
#include "VideoCommon/Fifo.h"
|
#include "VideoCommon/Fifo.h"
|
||||||
#include "VideoCommon/FPSCounter.h"
|
|
||||||
#include "VideoCommon/ImageWrite.h"
|
#include "VideoCommon/ImageWrite.h"
|
||||||
#include "VideoCommon/OnScreenDisplay.h"
|
#include "VideoCommon/OnScreenDisplay.h"
|
||||||
#include "VideoCommon/PixelEngine.h"
|
#include "VideoCommon/PixelEngine.h"
|
||||||
|
@ -38,8 +37,6 @@
|
||||||
namespace DX11
|
namespace DX11
|
||||||
{
|
{
|
||||||
|
|
||||||
static int s_fps = 0;
|
|
||||||
|
|
||||||
static u32 s_LastAA = 0;
|
static u32 s_LastAA = 0;
|
||||||
|
|
||||||
static Television s_television;
|
static Television s_television;
|
||||||
|
@ -181,8 +178,6 @@ Renderer::Renderer(void *&window_handle)
|
||||||
{
|
{
|
||||||
int x, y, w_temp, h_temp;
|
int x, y, w_temp, h_temp;
|
||||||
|
|
||||||
FPSCounter::Initialize();
|
|
||||||
|
|
||||||
Host_GetRenderWindowSize(x, y, w_temp, h_temp);
|
Host_GetRenderWindowSize(x, y, w_temp, h_temp);
|
||||||
|
|
||||||
D3D::Create((HWND)window_handle);
|
D3D::Create((HWND)window_handle);
|
||||||
|
@ -952,10 +947,6 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbHeight,const EFBRectangl
|
||||||
FramebufferManagerBase::SetLastXfbHeight(h);
|
FramebufferManagerBase::SetLastXfbHeight(h);
|
||||||
}
|
}
|
||||||
|
|
||||||
// update FPS counter
|
|
||||||
if (XFBWrited)
|
|
||||||
s_fps = FPSCounter::Update();
|
|
||||||
|
|
||||||
// Flip/present backbuffer to frontbuffer here
|
// Flip/present backbuffer to frontbuffer here
|
||||||
D3D::Present();
|
D3D::Present();
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,6 @@
|
||||||
#include "VideoCommon/BPStructs.h"
|
#include "VideoCommon/BPStructs.h"
|
||||||
#include "VideoCommon/DriverDetails.h"
|
#include "VideoCommon/DriverDetails.h"
|
||||||
#include "VideoCommon/Fifo.h"
|
#include "VideoCommon/Fifo.h"
|
||||||
#include "VideoCommon/FPSCounter.h"
|
|
||||||
#include "VideoCommon/ImageWrite.h"
|
#include "VideoCommon/ImageWrite.h"
|
||||||
#include "VideoCommon/OnScreenDisplay.h"
|
#include "VideoCommon/OnScreenDisplay.h"
|
||||||
#include "VideoCommon/PixelEngine.h"
|
#include "VideoCommon/PixelEngine.h"
|
||||||
|
@ -85,7 +84,6 @@ VideoConfig g_ogl_config;
|
||||||
|
|
||||||
// Declarations and definitions
|
// Declarations and definitions
|
||||||
// ----------------------------
|
// ----------------------------
|
||||||
static int s_fps = 0;
|
|
||||||
static GLuint s_ShowEFBCopyRegions_VBO = 0;
|
static GLuint s_ShowEFBCopyRegions_VBO = 0;
|
||||||
static GLuint s_ShowEFBCopyRegions_VAO = 0;
|
static GLuint s_ShowEFBCopyRegions_VAO = 0;
|
||||||
static SHADER s_ShowEFBCopyRegions;
|
static SHADER s_ShowEFBCopyRegions;
|
||||||
|
@ -340,7 +338,6 @@ Renderer::Renderer()
|
||||||
s_fps=0;
|
s_fps=0;
|
||||||
s_ShowEFBCopyRegions_VBO = 0;
|
s_ShowEFBCopyRegions_VBO = 0;
|
||||||
s_blendMode = 0;
|
s_blendMode = 0;
|
||||||
FPSCounter::Initialize();
|
|
||||||
|
|
||||||
bool bSuccess = true;
|
bool bSuccess = true;
|
||||||
|
|
||||||
|
@ -1583,8 +1580,6 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbHeight,const EFBRectangl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (XFBWrited)
|
|
||||||
s_fps = FPSCounter::Update();
|
|
||||||
// ---------------------------------------------------------------------
|
// ---------------------------------------------------------------------
|
||||||
if (!DriverDetails::HasBug(DriverDetails::BUG_BROKENSWAP))
|
if (!DriverDetails::HasBug(DriverDetails::BUG_BROKENSWAP))
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#include "VideoCommon/CPMemory.h"
|
#include "VideoCommon/CPMemory.h"
|
||||||
#include "VideoCommon/Debugger.h"
|
#include "VideoCommon/Debugger.h"
|
||||||
#include "VideoCommon/Fifo.h"
|
#include "VideoCommon/Fifo.h"
|
||||||
|
#include "VideoCommon/FPSCounter.h"
|
||||||
#include "VideoCommon/FramebufferManagerBase.h"
|
#include "VideoCommon/FramebufferManagerBase.h"
|
||||||
#include "VideoCommon/MainBase.h"
|
#include "VideoCommon/MainBase.h"
|
||||||
#include "VideoCommon/OpcodeDecoding.h"
|
#include "VideoCommon/OpcodeDecoding.h"
|
||||||
|
@ -64,6 +65,8 @@ int Renderer::s_LastEFBScale;
|
||||||
bool Renderer::s_skipSwap;
|
bool Renderer::s_skipSwap;
|
||||||
bool Renderer::XFBWrited;
|
bool Renderer::XFBWrited;
|
||||||
|
|
||||||
|
unsigned int Renderer::s_fps = 0;
|
||||||
|
|
||||||
PEControl::PixelFormat Renderer::prev_efb_format = PEControl::INVALID_FMT;
|
PEControl::PixelFormat Renderer::prev_efb_format = PEControl::INVALID_FMT;
|
||||||
unsigned int Renderer::efb_scale_numeratorX = 1;
|
unsigned int Renderer::efb_scale_numeratorX = 1;
|
||||||
unsigned int Renderer::efb_scale_numeratorY = 1;
|
unsigned int Renderer::efb_scale_numeratorY = 1;
|
||||||
|
@ -84,6 +87,8 @@ Renderer::Renderer()
|
||||||
|
|
||||||
OSDChoice = 0;
|
OSDChoice = 0;
|
||||||
OSDTime = 0;
|
OSDTime = 0;
|
||||||
|
|
||||||
|
FPSCounter::Initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
Renderer::~Renderer()
|
Renderer::~Renderer()
|
||||||
|
@ -521,6 +526,9 @@ void Renderer::Swap(u32 xfbAddr, u32 fbWidth, u32 fbHeight, const EFBRectangle&
|
||||||
// TODO: merge more generic parts into VideoCommon
|
// TODO: merge more generic parts into VideoCommon
|
||||||
g_renderer->SwapImpl(xfbAddr, fbWidth, fbHeight, rc, Gamma);
|
g_renderer->SwapImpl(xfbAddr, fbWidth, fbHeight, rc, Gamma);
|
||||||
|
|
||||||
|
if (XFBWrited)
|
||||||
|
s_fps = FPSCounter::Update();
|
||||||
|
|
||||||
frameCount++;
|
frameCount++;
|
||||||
GFX_DEBUGGER_PAUSE_AT(NEXT_FRAME, true);
|
GFX_DEBUGGER_PAUSE_AT(NEXT_FRAME, true);
|
||||||
|
|
||||||
|
|
|
@ -150,6 +150,8 @@ protected:
|
||||||
static bool s_skipSwap;
|
static bool s_skipSwap;
|
||||||
static bool XFBWrited;
|
static bool XFBWrited;
|
||||||
|
|
||||||
|
static unsigned int s_fps;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static PEControl::PixelFormat prev_efb_format;
|
static PEControl::PixelFormat prev_efb_format;
|
||||||
static unsigned int efb_scale_numeratorX;
|
static unsigned int efb_scale_numeratorX;
|
||||||
|
|
Loading…
Reference in New Issue