From a40f3ebdab4832c272b28cd40e757fce6da25670 Mon Sep 17 00:00:00 2001 From: sum2012 Date: Sun, 14 Oct 2018 10:59:43 +0800 Subject: [PATCH] Revert "Display: Avoid limiting FPS without a clear" This revert f9750dd13723c6b1b2837235e9f98e7d8fe3485a --- Core/HLE/sceDisplay.cpp | 2 +- GPU/Common/FramebufferCommon.cpp | 3 --- GPU/Common/SoftwareTransformCommon.cpp | 5 ----- GPU/D3D11/GPU_D3D11.cpp | 3 +-- GPU/Directx9/GPU_DX9.cpp | 3 +-- GPU/GLES/GPU_GLES.cpp | 3 +-- GPU/GPU.h | 2 -- GPU/GPUCommon.cpp | 3 --- GPU/Vulkan/GPU_Vulkan.cpp | 3 +-- 9 files changed, 5 insertions(+), 22 deletions(-) diff --git a/Core/HLE/sceDisplay.cpp b/Core/HLE/sceDisplay.cpp index 9d8bfe0990df..9f36a0082983 100644 --- a/Core/HLE/sceDisplay.cpp +++ b/Core/HLE/sceDisplay.cpp @@ -928,7 +928,7 @@ u32 sceDisplaySetFramebuf(u32 topaddr, int linesize, int pixelformat, int sync) u64 now = CoreTiming::GetTicks(); s64 cyclesAhead = nextFlipCycles - now; if (cyclesAhead > FLIP_DELAY_CYCLES_MIN) { - if (lastFlipsTooFrequent >= FLIP_DELAY_MIN_FLIPS && gpuStats.numClears > 0) { + if (lastFlipsTooFrequent >= FLIP_DELAY_MIN_FLIPS) { delayCycles = cyclesAhead; } else { ++lastFlipsTooFrequent; diff --git a/GPU/Common/FramebufferCommon.cpp b/GPU/Common/FramebufferCommon.cpp index fadf9263348a..88460d0aa23f 100644 --- a/GPU/Common/FramebufferCommon.cpp +++ b/GPU/Common/FramebufferCommon.cpp @@ -1310,9 +1310,6 @@ bool FramebufferManagerCommon::NotifyFramebufferCopy(u32 src, u32 dst, int size, } return false; } else if (dstBuffer) { - if (isMemset) { - gpuStats.numClears++; - } WARN_LOG_ONCE(btucpy, G3D, "Memcpy fbo upload %08x -> %08x", src, dst); if (g_Config.bBlockTransferGPU) { FlushBeforeCopy(); diff --git a/GPU/Common/SoftwareTransformCommon.cpp b/GPU/Common/SoftwareTransformCommon.cpp index fc943993b454..fd56e2974ef4 100644 --- a/GPU/Common/SoftwareTransformCommon.cpp +++ b/GPU/Common/SoftwareTransformCommon.cpp @@ -448,7 +448,6 @@ void SoftwareTransform( // Need to rescale from a [0, 1] float. This is the final transformed value. result->depth = ToScaledDepth((s16)(int)(transformed[1].z * 65535.0f)); result->action = SW_CLEAR; - gpuStats.numClears++; return; } } @@ -601,9 +600,5 @@ void SoftwareTransform( } } - if (gstate.isModeClear()) { - gpuStats.numClears++; - } - result->action = SW_DRAW_PRIMITIVES; } diff --git a/GPU/D3D11/GPU_D3D11.cpp b/GPU/D3D11/GPU_D3D11.cpp index dfd0c3d282b0..0284af1264ad 100644 --- a/GPU/D3D11/GPU_D3D11.cpp +++ b/GPU/D3D11/GPU_D3D11.cpp @@ -311,7 +311,7 @@ void GPU_D3D11::GetStats(char *buffer, size_t bufsize) { float vertexAverageCycles = gpuStats.numVertsSubmitted > 0 ? (float)gpuStats.vertexGPUCycles / (float)gpuStats.numVertsSubmitted : 0.0f; snprintf(buffer, bufsize - 1, "DL processing time: %0.2f ms\n" - "Draw calls: %i, flushes %i, clears %i\n" + "Draw calls: %i, flushes %i\n" "Cached Draw calls: %i\n" "Num Tracked Vertex Arrays: %i\n" "GPU cycles executed: %d (%f per vertex)\n" @@ -325,7 +325,6 @@ void GPU_D3D11::GetStats(char *buffer, size_t bufsize) { gpuStats.msProcessingDisplayLists * 1000.0f, gpuStats.numDrawCalls, gpuStats.numFlushes, - gpuStats.numClears, gpuStats.numCachedDrawCalls, gpuStats.numTrackedVertexArrays, gpuStats.vertexGPUCycles + gpuStats.otherGPUCycles, diff --git a/GPU/Directx9/GPU_DX9.cpp b/GPU/Directx9/GPU_DX9.cpp index 154a5e44d67e..072267db6695 100644 --- a/GPU/Directx9/GPU_DX9.cpp +++ b/GPU/Directx9/GPU_DX9.cpp @@ -286,7 +286,7 @@ void GPU_DX9::GetStats(char *buffer, size_t bufsize) { float vertexAverageCycles = gpuStats.numVertsSubmitted > 0 ? (float)gpuStats.vertexGPUCycles / (float)gpuStats.numVertsSubmitted : 0.0f; snprintf(buffer, bufsize - 1, "DL processing time: %0.2f ms\n" - "Draw calls: %i, flushes %i, clears %i\n" + "Draw calls: %i, flushes %i\n" "Cached Draw calls: %i\n" "Num Tracked Vertex Arrays: %i\n" "GPU cycles executed: %d (%f per vertex)\n" @@ -300,7 +300,6 @@ void GPU_DX9::GetStats(char *buffer, size_t bufsize) { gpuStats.msProcessingDisplayLists * 1000.0f, gpuStats.numDrawCalls, gpuStats.numFlushes, - gpuStats.numClears, gpuStats.numCachedDrawCalls, gpuStats.numTrackedVertexArrays, gpuStats.vertexGPUCycles + gpuStats.otherGPUCycles, diff --git a/GPU/GLES/GPU_GLES.cpp b/GPU/GLES/GPU_GLES.cpp index 2a75ead250e2..b69cf2934b52 100644 --- a/GPU/GLES/GPU_GLES.cpp +++ b/GPU/GLES/GPU_GLES.cpp @@ -504,7 +504,7 @@ void GPU_GLES::GetStats(char *buffer, size_t bufsize) { float vertexAverageCycles = gpuStats.numVertsSubmitted > 0 ? (float)gpuStats.vertexGPUCycles / (float)gpuStats.numVertsSubmitted : 0.0f; snprintf(buffer, bufsize - 1, "DL processing time: %0.2f ms\n" - "Draw calls: %i, flushes %i, clears %i\n" + "Draw calls: %i, flushes %i\n" "Cached Draw calls: %i\n" "Num Tracked Vertex Arrays: %i\n" "GPU cycles executed: %d (%f per vertex)\n" @@ -518,7 +518,6 @@ void GPU_GLES::GetStats(char *buffer, size_t bufsize) { gpuStats.msProcessingDisplayLists * 1000.0f, gpuStats.numDrawCalls, gpuStats.numFlushes, - gpuStats.numClears, gpuStats.numCachedDrawCalls, gpuStats.numTrackedVertexArrays, gpuStats.vertexGPUCycles + gpuStats.otherGPUCycles, diff --git a/GPU/GPU.h b/GPU/GPU.h index 08d036560cac..31b0453ecbe7 100644 --- a/GPU/GPU.h +++ b/GPU/GPU.h @@ -69,7 +69,6 @@ struct GPUStatistics { numTexturesDecoded = 0; numReadbacks = 0; numUploads = 0; - numClears = 0; msProcessingDisplayLists = 0; vertexGPUCycles = 0; otherGPUCycles = 0; @@ -90,7 +89,6 @@ struct GPUStatistics { int numTexturesDecoded; int numReadbacks; int numUploads; - int numClears; double msProcessingDisplayLists; int vertexGPUCycles; int otherGPUCycles; diff --git a/GPU/GPUCommon.cpp b/GPU/GPUCommon.cpp index a0ecf7dc4d2d..462ff5c0b227 100644 --- a/GPU/GPUCommon.cpp +++ b/GPU/GPUCommon.cpp @@ -1525,9 +1525,6 @@ void GPUCommon::Execute_Prim(u32 op, u32 diff) { if (gstate_c.skipDrawReason & (SKIPDRAW_SKIPFRAME | SKIPDRAW_NON_DISPLAYED_FB)) { // Rough estimate, not sure what's correct. cyclesExecuted += EstimatePerVertexCost() * count; - if (gstate.isModeClear()) { - gpuStats.numClears++; - } return; } diff --git a/GPU/Vulkan/GPU_Vulkan.cpp b/GPU/Vulkan/GPU_Vulkan.cpp index 839cf1328470..6dd995f2f762 100644 --- a/GPU/Vulkan/GPU_Vulkan.cpp +++ b/GPU/Vulkan/GPU_Vulkan.cpp @@ -527,7 +527,7 @@ void GPU_Vulkan::GetStats(char *buffer, size_t bufsize) { float vertexAverageCycles = gpuStats.numVertsSubmitted > 0 ? (float)gpuStats.vertexGPUCycles / (float)gpuStats.numVertsSubmitted : 0.0f; snprintf(buffer, bufsize - 1, "DL processing time: %0.2f ms\n" - "Draw calls: %i, flushes %i, clears %i\n" + "Draw calls: %i, flushes %i\n" "Cached Draw calls: %i\n" "Num Tracked Vertex Arrays: %i\n" "GPU cycles executed: %d (%f per vertex)\n" @@ -543,7 +543,6 @@ void GPU_Vulkan::GetStats(char *buffer, size_t bufsize) { gpuStats.msProcessingDisplayLists * 1000.0f, gpuStats.numDrawCalls, gpuStats.numFlushes, - gpuStats.numClears, gpuStats.numCachedDrawCalls, gpuStats.numTrackedVertexArrays, gpuStats.vertexGPUCycles + gpuStats.otherGPUCycles,