Merge pull request #6317 from ameerj/fps-fix
perf_stats: Rework FPS counter to be more accurate
This commit is contained in:
commit
7d86a6ff02
10 changed files with 26 additions and 14 deletions
|
@ -13,6 +13,7 @@
|
|||
#include "core/frontend/emu_window.h"
|
||||
#include "core/hardware_interrupt_manager.h"
|
||||
#include "core/memory.h"
|
||||
#include "core/perf_stats.h"
|
||||
#include "video_core/engines/fermi_2d.h"
|
||||
#include "video_core/engines/kepler_compute.h"
|
||||
#include "video_core/engines/kepler_memory.h"
|
||||
|
@ -191,6 +192,10 @@ u64 GPU::GetTicks() const {
|
|||
return nanoseconds_num * gpu_ticks_num + (nanoseconds_rem * gpu_ticks_num) / gpu_ticks_den;
|
||||
}
|
||||
|
||||
void GPU::RendererFrameEndNotify() {
|
||||
system.GetPerfStats().EndGameFrame();
|
||||
}
|
||||
|
||||
void GPU::FlushCommands() {
|
||||
rasterizer->FlushCommands();
|
||||
}
|
||||
|
|
|
@ -247,6 +247,8 @@ public:
|
|||
return use_nvdec;
|
||||
}
|
||||
|
||||
void RendererFrameEndNotify();
|
||||
|
||||
enum class FenceOperation : u32 {
|
||||
Acquire = 0,
|
||||
Increment = 1,
|
||||
|
|
|
@ -155,6 +155,7 @@ void RendererOpenGL::SwapBuffers(const Tegra::FramebufferConfig* framebuffer) {
|
|||
|
||||
++m_current_frame;
|
||||
|
||||
gpu.RendererFrameEndNotify();
|
||||
rasterizer.TickFrame();
|
||||
|
||||
context->SwapBuffers();
|
||||
|
|
|
@ -154,6 +154,7 @@ void RendererVulkan::SwapBuffers(const Tegra::FramebufferConfig* framebuffer) {
|
|||
if (swapchain.Present(render_semaphore)) {
|
||||
blit_screen.Recreate();
|
||||
}
|
||||
gpu.RendererFrameEndNotify();
|
||||
rasterizer.TickFrame();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue