Remove an entry from GPUStats that didn't really belong.

This commit is contained in:
Henrik Rydgard 2016-04-02 11:06:05 +02:00
parent ad0da06f65
commit 727058fc27
7 changed files with 10 additions and 13 deletions

View File

@ -22,6 +22,7 @@
#include "Core/Dialog/PSPOskDialog.h" #include "Core/Dialog/PSPOskDialog.h"
#include "Core/Util/PPGeDraw.h" #include "Core/Util/PPGeDraw.h"
#include "Core/HLE/sceCtrl.h" #include "Core/HLE/sceCtrl.h"
#include "Core/HLE/sceDisplay.h"
#include "Core/HLE/sceUtility.h" #include "Core/HLE/sceUtility.h"
#include "Core/Config.h" #include "Core/Config.h"
#include "Core/Reporting.h" #include "Core/Reporting.h"
@ -746,7 +747,7 @@ void PSPOskDialog::RenderKeyboard()
if(isCombinated == true) if(isCombinated == true)
{ {
float animStep = (float)(gpuStats.numVBlanks % 40) / 20.0f; float animStep = (float)(__DisplayGetNumVblanks() % 40) / 20.0f;
// Fade in and out the next character so they know it's not part of the string yet. // Fade in and out the next character so they know it's not part of the string yet.
u32 alpha = (0.5f - (cosf(animStep * M_PI) / 2.0f)) * 128 + 127; u32 alpha = (0.5f - (cosf(animStep * M_PI) / 2.0f)) * 128 + 127;
color = CalcFadedColor((alpha << 24) | 0xFFFFFF); color = CalcFadedColor((alpha << 24) | 0xFFFFFF);

View File

@ -111,6 +111,7 @@ static const double timePerVblank = 1.001f / 60.0f;
static double curFrameTime; static double curFrameTime;
static double lastFrameTime; static double lastFrameTime;
static double nextFrameTime; static double nextFrameTime;
static int numVBlanks;
static int numVBlanksSinceFlip; static int numVBlanksSinceFlip;
static u64 frameStartTicks; static u64 frameStartTicks;
@ -161,6 +162,7 @@ void __DisplayVblankBeginCallback(SceUID threadID, SceUID prevCallbackId);
void __DisplayVblankEndCallback(SceUID threadID, SceUID prevCallbackId); void __DisplayVblankEndCallback(SceUID threadID, SceUID prevCallbackId);
int __DisplayGetFlipCount() { return actualFlips; } int __DisplayGetFlipCount() { return actualFlips; }
int __DisplayGetVCount() { return vCount; } int __DisplayGetVCount() { return vCount; }
int __DisplayGetNumVblanks() { return numVBlanks; }
static void ScheduleLagSync(int over = 0) { static void ScheduleLagSync(int over = 0) {
lagSyncScheduled = g_Config.bForceLagSync; lagSyncScheduled = g_Config.bForceLagSync;
@ -179,6 +181,7 @@ void __DisplayInit() {
width = 480; width = 480;
height = 272; height = 272;
numSkippedFrames = 0; numSkippedFrames = 0;
numVBlanks = 0;
numVBlanksSinceFlip = 0; numVBlanksSinceFlip = 0;
framebufIsLatched = false; framebufIsLatched = false;
framebuf.topaddr = 0x04000000; framebuf.topaddr = 0x04000000;
@ -399,13 +402,13 @@ static void CalculateFPS() {
double now = time_now_d(); double now = time_now_d();
if (now >= lastFpsTime + 1.0) { if (now >= lastFpsTime + 1.0) {
double frames = (gpuStats.numVBlanks - lastFpsFrame); double frames = (numVBlanks - lastFpsFrame);
actualFps = (actualFlips - lastActualFlips); actualFps = (actualFlips - lastActualFlips);
fps = frames / (now - lastFpsTime); fps = frames / (now - lastFpsTime);
flips = 60.0 * (double) (gpuStats.numFlips - lastNumFlips) / frames; flips = 60.0 * (double) (gpuStats.numFlips - lastNumFlips) / frames;
lastFpsFrame = gpuStats.numVBlanks; lastFpsFrame = numVBlanks;
lastNumFlips = gpuStats.numFlips; lastNumFlips = gpuStats.numFlips;
lastActualFlips = actualFlips; lastActualFlips = actualFlips;
lastFpsTime = now; lastFpsTime = now;
@ -606,8 +609,7 @@ void hleEnterVblank(u64 userdata, int cyclesLate) {
// Trigger VBlank interrupt handlers. // Trigger VBlank interrupt handlers.
__TriggerInterrupt(PSP_INTR_IMMEDIATE | PSP_INTR_ONLY_IF_ENABLED | PSP_INTR_ALWAYS_RESCHED, PSP_VBLANK_INTR, PSP_INTR_SUB_ALL); __TriggerInterrupt(PSP_INTR_IMMEDIATE | PSP_INTR_ONLY_IF_ENABLED | PSP_INTR_ALWAYS_RESCHED, PSP_VBLANK_INTR, PSP_INTR_SUB_ALL);
gpuStats.numVBlanks++; numVBlanks++;
numVBlanksSinceFlip++; numVBlanksSinceFlip++;
// TODO: Should this be done here or in hleLeaveVblank? // TODO: Should this be done here or in hleLeaveVblank?

View File

@ -37,6 +37,7 @@ void __DisplayGetDebugStats(char stats[], size_t bufsize);
void __DisplayGetFPS(float *out_vps, float *out_fps, float *out_actual_fps); void __DisplayGetFPS(float *out_vps, float *out_fps, float *out_actual_fps);
void __DisplayGetVPS(float *out_vps); void __DisplayGetVPS(float *out_vps);
void __DisplayGetAveragedFPS(float *out_vps, float *out_fps); void __DisplayGetAveragedFPS(float *out_vps, float *out_fps);
int __DisplayGetNumVblanks();
int __DisplayGetVCount(); int __DisplayGetVCount();
int __DisplayGetFlipCount(); int __DisplayGetFlipCount();

View File

@ -1867,7 +1867,6 @@ void DIRECTX9_GPU::FastLoadBoneMatrix(u32 target) {
void DIRECTX9_GPU::GetStats(char *buffer, size_t bufsize) { void DIRECTX9_GPU::GetStats(char *buffer, size_t bufsize) {
float vertexAverageCycles = gpuStats.numVertsSubmitted > 0 ? (float)gpuStats.vertexGPUCycles / (float)gpuStats.numVertsSubmitted : 0.0f; float vertexAverageCycles = gpuStats.numVertsSubmitted > 0 ? (float)gpuStats.vertexGPUCycles / (float)gpuStats.numVertsSubmitted : 0.0f;
snprintf(buffer, bufsize - 1, snprintf(buffer, bufsize - 1,
"Frames: %i\n"
"DL processing time: %0.2f ms\n" "DL processing time: %0.2f ms\n"
"Draw calls: %i, flushes %i\n" "Draw calls: %i, flushes %i\n"
"Cached Draw calls: %i\n" "Cached Draw calls: %i\n"
@ -1879,7 +1878,6 @@ void DIRECTX9_GPU::GetStats(char *buffer, size_t bufsize) {
"FBOs active: %i\n" "FBOs active: %i\n"
"Textures active: %i, decoded: %i invalidated: %i\n" "Textures active: %i, decoded: %i invalidated: %i\n"
"Vertex, Fragment shaders loaded: %i, %i\n", "Vertex, Fragment shaders loaded: %i, %i\n",
gpuStats.numVBlanks,
gpuStats.msProcessingDisplayLists * 1000.0f, gpuStats.msProcessingDisplayLists * 1000.0f,
gpuStats.numDrawCalls, gpuStats.numDrawCalls,
gpuStats.numFlushes, gpuStats.numFlushes,

View File

@ -2119,7 +2119,6 @@ void GLES_GPU::FastLoadBoneMatrix(u32 target) {
void GLES_GPU::GetStats(char *buffer, size_t bufsize) { void GLES_GPU::GetStats(char *buffer, size_t bufsize) {
float vertexAverageCycles = gpuStats.numVertsSubmitted > 0 ? (float)gpuStats.vertexGPUCycles / (float)gpuStats.numVertsSubmitted : 0.0f; float vertexAverageCycles = gpuStats.numVertsSubmitted > 0 ? (float)gpuStats.vertexGPUCycles / (float)gpuStats.numVertsSubmitted : 0.0f;
snprintf(buffer, bufsize - 1, snprintf(buffer, bufsize - 1,
"Frames: %i\n"
"DL processing time: %0.2f ms\n" "DL processing time: %0.2f ms\n"
"Draw calls: %i, flushes %i\n" "Draw calls: %i, flushes %i\n"
"Cached Draw calls: %i\n" "Cached Draw calls: %i\n"
@ -2131,7 +2130,6 @@ void GLES_GPU::GetStats(char *buffer, size_t bufsize) {
"FBOs active: %i\n" "FBOs active: %i\n"
"Textures active: %i, decoded: %i invalidated: %i\n" "Textures active: %i, decoded: %i invalidated: %i\n"
"Vertex, Fragment, Programs loaded: %i, %i, %i\n", "Vertex, Fragment, Programs loaded: %i, %i, %i\n",
gpuStats.numVBlanks,
gpuStats.msProcessingDisplayLists * 1000.0f, gpuStats.msProcessingDisplayLists * 1000.0f,
gpuStats.numDrawCalls, gpuStats.numDrawCalls,
gpuStats.numFlushes, gpuStats.numFlushes,

View File

@ -90,8 +90,7 @@ struct GPUStatistics {
int otherGPUCycles; int otherGPUCycles;
int gpuCommandsAtCallLevel[4]; int gpuCommandsAtCallLevel[4];
// Total statistics, updated by the GPU core in UpdateStats // Flip count. Doesn't really belong here.
int numVBlanks;
int numFlips; int numFlips;
}; };

View File

@ -1957,7 +1957,6 @@ void GPU_Vulkan::GetStats(char *buffer, size_t bufsize) {
const DrawEngineVulkanStats &drawStats = drawEngine_.GetStats(); const DrawEngineVulkanStats &drawStats = drawEngine_.GetStats();
float vertexAverageCycles = gpuStats.numVertsSubmitted > 0 ? (float)gpuStats.vertexGPUCycles / (float)gpuStats.numVertsSubmitted : 0.0f; float vertexAverageCycles = gpuStats.numVertsSubmitted > 0 ? (float)gpuStats.vertexGPUCycles / (float)gpuStats.numVertsSubmitted : 0.0f;
snprintf(buffer, bufsize - 1, snprintf(buffer, bufsize - 1,
"Frames: %i\n"
"DL processing time: %0.2f ms\n" "DL processing time: %0.2f ms\n"
"Draw calls: %i, flushes %i\n" "Draw calls: %i, flushes %i\n"
"Cached Draw calls: %i\n" "Cached Draw calls: %i\n"
@ -1970,7 +1969,6 @@ void GPU_Vulkan::GetStats(char *buffer, size_t bufsize) {
"Textures active: %i, decoded: %i invalidated: %i\n" "Textures active: %i, decoded: %i invalidated: %i\n"
"Vertex, Fragment, Pipelines loaded: %i, %i, %i\n" "Vertex, Fragment, Pipelines loaded: %i, %i, %i\n"
"Pushbuffer space used: UBO %d, Vtx %d, Idx %d\n", "Pushbuffer space used: UBO %d, Vtx %d, Idx %d\n",
gpuStats.numVBlanks,
gpuStats.msProcessingDisplayLists * 1000.0f, gpuStats.msProcessingDisplayLists * 1000.0f,
gpuStats.numDrawCalls, gpuStats.numDrawCalls,
gpuStats.numFlushes, gpuStats.numFlushes,