posttransformanalyzer: Cleanup statistics

Remove redundant fields, rename misses to vertices_transformed.
This commit is contained in:
Arseny Kapoulkine
2017-05-22 20:31:33 -07:00
parent afa5749474
commit d43a2a421c
2 changed files with 5 additions and 11 deletions
+2 -3
View File
@@ -45,8 +45,7 @@ void optimizePreTransform(void* destination, const void* vertices, unsigned int*
struct PostTransformCacheStatistics
{
unsigned int hits, misses;
float hit_percent, miss_percent;
unsigned int vertices_transformed;
float acmr; // transformed vertices / triangle count; best case 0.5, worst case 3.0, optimum depends on topology
float atvr; // transformed vertices / vertex count; best case 1.0, worse case 6.0, optimum is 1.0 (each vertex is transformed once)
};
@@ -61,7 +60,7 @@ struct OverdrawStatistics
{
unsigned int pixels_covered;
unsigned int pixels_shaded;
float overdraw;
float overdraw; // shaded pixels / covered pixels; best case 1.0
};
// Overdraw analyzer
+3 -8
View File
@@ -20,17 +20,12 @@ namespace
{
// cache miss
cache_time_stamps[index] = time_stamp++;
result.misses++;
result.vertices_transformed++;
}
}
result.hits = static_cast<unsigned int>(index_count) - result.misses;
result.hit_percent = 100 * static_cast<float>(result.hits) / index_count;
result.miss_percent = 100 * static_cast<float>(result.misses) / index_count;
result.acmr = static_cast<float>(result.misses) / (index_count / 3);
result.atvr = static_cast<float>(result.misses) / vertex_count;
result.acmr = static_cast<float>(result.vertices_transformed) / (index_count / 3);
result.atvr = static_cast<float>(result.vertices_transformed) / vertex_count;
return result;
}