Just some refactoring of the GPUStatistics struct, and more use of StringWriter

This commit is contained in:
Henrik Rydgård committed 2026-05-29 14:40:31 +02:00
1 parent 3b6ecc4001
commit f60e27a9b7
62 files changed
+413 -426

No files matched your search

+3 -3
View File
@@ -48,7 +48,7 @@ void FragmentTestCacheGLES::BindTestTexture(int slot) {
const FragmentTestID id = GenerateTestID();
const auto cached = cache_.find(id);
if (cached != cache_.end()) {
cached->second.lastFrame = gpuStats.numFlips;
cached->second.lastFrame = gpuStats.totals.numFlips;
GLRTexture *tex = cached->second.texture;
if (tex == lastTexture_) {
// Already bound, hurray.
@@ -78,7 +78,7 @@ void FragmentTestCacheGLES::BindTestTexture(int slot) {
// We only need to do this once for the texture.
render_->SetTextureSampler(slot, GL_CLAMP_TO_EDGE, GL_CLAMP_TO_EDGE, GL_NEAREST, GL_NEAREST, 0.0f);
FragmentTestTexture item;
item.lastFrame = gpuStats.numFlips;
item.lastFrame = gpuStats.totals.numFlips;
item.texture = tex;
cache_[id] = item;
}
@@ -156,7 +156,7 @@ void FragmentTestCacheGLES::Clear(bool deleteThem) {
void FragmentTestCacheGLES::Decimate() {
if (--decimationCounter_ <= 0) {
for (auto tex = cache_.begin(); tex != cache_.end(); ) {
if (tex->second.lastFrame + FRAGTEST_TEXTURE_OLD_AGE < gpuStats.numFlips) {
if (tex->second.lastFrame + FRAGTEST_TEXTURE_OLD_AGE < gpuStats.totals.numFlips) {
render_->DeleteTexture(tex->second.texture);
cache_.erase(tex++);
} else {