mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-26 23:10:38 +00:00
Cleanup, add another GPU stat
This commit is contained in:
parent
10db7de53c
commit
ab1072224f
@ -77,8 +77,9 @@ public:
|
|||||||
void Divert(const Value &newTo, float newDuration = -1.0f) {
|
void Divert(const Value &newTo, float newDuration = -1.0f) {
|
||||||
const Value newFrom = valid_ ? Current(Position()) : newTo;
|
const Value newFrom = valid_ ? Current(Position()) : newTo;
|
||||||
|
|
||||||
|
double now = time_now_d();
|
||||||
// Are we already part way through another transition?
|
// Are we already part way through another transition?
|
||||||
if (time_now_d() < start_ + delay_ + duration_ && valid_) {
|
if (now < start_ + delay_ + duration_ && valid_) {
|
||||||
if (newTo == to_) {
|
if (newTo == to_) {
|
||||||
// Already on course. Don't change.
|
// Already on course. Don't change.
|
||||||
return;
|
return;
|
||||||
@ -88,17 +89,17 @@ public:
|
|||||||
if (newDuration >= 0.0f) {
|
if (newDuration >= 0.0f) {
|
||||||
newOffset *= newDuration / duration_;
|
newOffset *= newDuration / duration_;
|
||||||
}
|
}
|
||||||
start_ = time_now_d() - newOffset - delay_;
|
start_ = now - newOffset - delay_;
|
||||||
} else if (time_now_d() <= start_ + delay_) {
|
} else if (now <= start_ + delay_) {
|
||||||
// Start the delay over again.
|
// Start the delay over again.
|
||||||
start_ = time_now_d();
|
start_ = now;
|
||||||
} else {
|
} else {
|
||||||
// Since we've partially animated to the other value, skip delay.
|
// Since we've partially animated to the other value, skip delay.
|
||||||
start_ = time_now_d() - delay_;
|
start_ = now - delay_;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Already finished, so restart.
|
// Already finished, so restart.
|
||||||
start_ = time_now_d();
|
start_ = now;
|
||||||
finishApplied_ = false;
|
finishApplied_ = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -194,6 +194,7 @@ void TextureShaderCache::Decimate() {
|
|||||||
++tex;
|
++tex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
gpuStats.numClutTextures = (int)texCache_.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
Draw2DPipeline *TextureShaderCache::GetDepalettizeShader(uint32_t clutMode, GETextureFormat textureFormat, GEBufferFormat bufferFormat, bool smoothedDepal, u32 depthUpperBits) {
|
Draw2DPipeline *TextureShaderCache::GetDepalettizeShader(uint32_t clutMode, GETextureFormat textureFormat, GEBufferFormat bufferFormat, bool smoothedDepal, u32 depthUpperBits) {
|
||||||
|
@ -27,7 +27,6 @@
|
|||||||
#include "GPU/Common/Draw2D.h"
|
#include "GPU/Common/Draw2D.h"
|
||||||
#include "GPU/Common/ShaderCommon.h"
|
#include "GPU/Common/ShaderCommon.h"
|
||||||
|
|
||||||
|
|
||||||
class ClutTexture {
|
class ClutTexture {
|
||||||
public:
|
public:
|
||||||
enum { MAX_RAMPS = 3 };
|
enum { MAX_RAMPS = 3 };
|
||||||
|
@ -105,6 +105,7 @@ struct GPUStatistics {
|
|||||||
numBlockTransfers = 0;
|
numBlockTransfers = 0;
|
||||||
numReplacerTrackedTex = 0;
|
numReplacerTrackedTex = 0;
|
||||||
numCachedReplacedTextures = 0;
|
numCachedReplacedTextures = 0;
|
||||||
|
numClutTextures = 0;
|
||||||
msProcessingDisplayLists = 0;
|
msProcessingDisplayLists = 0;
|
||||||
vertexGPUCycles = 0;
|
vertexGPUCycles = 0;
|
||||||
otherGPUCycles = 0;
|
otherGPUCycles = 0;
|
||||||
@ -142,6 +143,7 @@ struct GPUStatistics {
|
|||||||
int numBlockTransfers;
|
int numBlockTransfers;
|
||||||
int numReplacerTrackedTex;
|
int numReplacerTrackedTex;
|
||||||
int numCachedReplacedTextures;
|
int numCachedReplacedTextures;
|
||||||
|
int numClutTextures;
|
||||||
double msProcessingDisplayLists;
|
double msProcessingDisplayLists;
|
||||||
int vertexGPUCycles;
|
int vertexGPUCycles;
|
||||||
int otherGPUCycles;
|
int otherGPUCycles;
|
||||||
|
@ -1756,7 +1756,7 @@ size_t GPUCommonHW::FormatGPUStatsCommon(char *buffer, size_t size) {
|
|||||||
"Draw: %d (%d dec, %d culled), flushes %d, clears %d, bbox jumps %d (%d updates)\n"
|
"Draw: %d (%d dec, %d culled), flushes %d, clears %d, bbox jumps %d (%d updates)\n"
|
||||||
"Vertices: %d dec: %d drawn: %d\n"
|
"Vertices: %d dec: %d drawn: %d\n"
|
||||||
"FBOs active: %d (evaluations: %d)\n"
|
"FBOs active: %d (evaluations: %d)\n"
|
||||||
"Textures: %d, dec: %d, invalidated: %d, hashed: %d kB\n"
|
"Textures: %d, dec: %d, invalidated: %d, hashed: %d kB, clut %d\n"
|
||||||
"readbacks %d (%d non-block), upload %d (cached %d), depal %d\n"
|
"readbacks %d (%d non-block), upload %d (cached %d), depal %d\n"
|
||||||
"block transfers: %d\n"
|
"block transfers: %d\n"
|
||||||
"replacer: tracks %d references, %d unique textures\n"
|
"replacer: tracks %d references, %d unique textures\n"
|
||||||
@ -1781,6 +1781,7 @@ size_t GPUCommonHW::FormatGPUStatsCommon(char *buffer, size_t size) {
|
|||||||
gpuStats.numTexturesDecoded,
|
gpuStats.numTexturesDecoded,
|
||||||
gpuStats.numTextureInvalidations,
|
gpuStats.numTextureInvalidations,
|
||||||
gpuStats.numTextureDataBytesHashed / 1024,
|
gpuStats.numTextureDataBytesHashed / 1024,
|
||||||
|
gpuStats.numClutTextures,
|
||||||
gpuStats.numBlockingReadbacks,
|
gpuStats.numBlockingReadbacks,
|
||||||
gpuStats.numReadbacks,
|
gpuStats.numReadbacks,
|
||||||
gpuStats.numUploads,
|
gpuStats.numUploads,
|
||||||
|
Loading…
Reference in New Issue
Block a user