mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Merge pull request #10456 from unknownbrackets/gpu-flips
Display: Avoid limiting FPS without a clear
This commit is contained in:
commit
c1a23658d1
8 changed files with 19 additions and 5 deletions
|
@ -918,7 +918,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) {
|
||||
if (lastFlipsTooFrequent >= FLIP_DELAY_MIN_FLIPS && gpuStats.numClears > 0) {
|
||||
delayCycles = cyclesAhead;
|
||||
} else {
|
||||
++lastFlipsTooFrequent;
|
||||
|
|
|
@ -1297,6 +1297,9 @@ 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();
|
||||
|
|
|
@ -408,6 +408,7 @@ 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;
|
||||
}
|
||||
}
|
||||
|
@ -560,5 +561,9 @@ void SoftwareTransform(
|
|||
}
|
||||
}
|
||||
|
||||
if (gstate.isModeClear()) {
|
||||
gpuStats.numClears++;
|
||||
}
|
||||
|
||||
result->action = SW_DRAW_PRIMITIVES;
|
||||
}
|
||||
|
|
|
@ -518,7 +518,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\n"
|
||||
"Draw calls: %i, flushes %i, clears %i\n"
|
||||
"Cached Draw calls: %i\n"
|
||||
"Num Tracked Vertex Arrays: %i\n"
|
||||
"GPU cycles executed: %d (%f per vertex)\n"
|
||||
|
@ -532,6 +532,7 @@ 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,
|
||||
|
|
|
@ -492,7 +492,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\n"
|
||||
"Draw calls: %i, flushes %i, clears %i\n"
|
||||
"Cached Draw calls: %i\n"
|
||||
"Num Tracked Vertex Arrays: %i\n"
|
||||
"GPU cycles executed: %d (%f per vertex)\n"
|
||||
|
@ -506,6 +506,7 @@ 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,
|
||||
|
|
|
@ -693,7 +693,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\n"
|
||||
"Draw calls: %i, flushes %i, clears %i\n"
|
||||
"Cached Draw calls: %i\n"
|
||||
"Num Tracked Vertex Arrays: %i\n"
|
||||
"GPU cycles executed: %d (%f per vertex)\n"
|
||||
|
@ -707,6 +707,7 @@ 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,
|
||||
|
|
|
@ -68,6 +68,7 @@ struct GPUStatistics {
|
|||
numFlushes = 0;
|
||||
numTexturesDecoded = 0;
|
||||
numReadbacks = 0;
|
||||
numClears = 0;
|
||||
msProcessingDisplayLists = 0;
|
||||
vertexGPUCycles = 0;
|
||||
otherGPUCycles = 0;
|
||||
|
@ -87,6 +88,7 @@ struct GPUStatistics {
|
|||
int numShaderSwitches;
|
||||
int numTexturesDecoded;
|
||||
int numReadbacks;
|
||||
int numClears;
|
||||
double msProcessingDisplayLists;
|
||||
int vertexGPUCycles;
|
||||
int otherGPUCycles;
|
||||
|
|
|
@ -656,7 +656,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\n"
|
||||
"Draw calls: %i, flushes %i, clears %i\n"
|
||||
"Cached Draw calls: %i\n"
|
||||
"Num Tracked Vertex Arrays: %i\n"
|
||||
"GPU cycles executed: %d (%f per vertex)\n"
|
||||
|
@ -672,6 +672,7 @@ 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,
|
||||
|
|
Loading…
Add table
Reference in a new issue