mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-17 08:11:51 +00:00
vk/gl: Fix debug overlay stats
This commit is contained in:
parent
aa06ac119f
commit
69eb1401a9
@ -452,6 +452,7 @@ namespace rsx
|
||||
atomic_t<u32> m_unavoidable_hard_faults_this_frame = { 0 };
|
||||
atomic_t<u32> m_texture_upload_calls_this_frame = { 0 };
|
||||
atomic_t<u32> m_texture_upload_misses_this_frame = { 0 };
|
||||
atomic_t<u32> m_texture_copies_ellided_this_frame = { 0 };
|
||||
static const u32 m_predict_max_flushes_per_frame = 50; // Above this number the predictions are disabled
|
||||
|
||||
// Invalidation
|
||||
@ -2327,6 +2328,10 @@ namespace rsx
|
||||
// Deferred reconstruct
|
||||
result.external_subresource_desc.cache_range = lookup_range;
|
||||
}
|
||||
else if (result.texcoord_xform.clamp)
|
||||
{
|
||||
m_texture_copies_ellided_this_frame++;
|
||||
}
|
||||
|
||||
if (!result.ref_address)
|
||||
{
|
||||
@ -3421,6 +3426,7 @@ namespace rsx
|
||||
m_unavoidable_hard_faults_this_frame.store(0u);
|
||||
m_texture_upload_calls_this_frame.store(0u);
|
||||
m_texture_upload_misses_this_frame.store(0u);
|
||||
m_texture_copies_ellided_this_frame.store(0u);
|
||||
}
|
||||
|
||||
void on_flush()
|
||||
@ -3503,5 +3509,10 @@ namespace rsx
|
||||
{
|
||||
return (m_texture_upload_calls_this_frame)? (m_texture_upload_misses_this_frame * 100 / m_texture_upload_calls_this_frame) : 0;
|
||||
}
|
||||
|
||||
u32 get_texture_copies_ellided_this_frame() const
|
||||
{
|
||||
return m_texture_copies_ellided_this_frame;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -342,7 +342,7 @@ void GLGSRender::flip(const rsx::display_flip_info_t& info)
|
||||
int y_loc = 0;
|
||||
const auto println = [&](const std::string& text)
|
||||
{
|
||||
m_text_printer.print_text(cmd, 4, 0, width, height, text);
|
||||
m_text_printer.print_text(cmd, 4, y_loc, width, height, text);
|
||||
y_loc += 16;
|
||||
};
|
||||
|
||||
@ -364,17 +364,18 @@ void GLGSRender::flip(const rsx::display_flip_info_t& info)
|
||||
const auto num_texture_upload = m_gl_texture_cache.get_texture_upload_calls_this_frame();
|
||||
const auto num_texture_upload_miss = m_gl_texture_cache.get_texture_upload_misses_this_frame();
|
||||
const auto texture_upload_miss_ratio = m_gl_texture_cache.get_texture_upload_miss_percentage();
|
||||
const auto texture_copies_ellided = m_gl_texture_cache.get_texture_copies_ellided_this_frame();
|
||||
|
||||
println(fmt::format("Unreleased textures: %7d", num_dirty_textures));
|
||||
println(fmt::format("Texture memory: %12dM", texture_memory_size));
|
||||
println(fmt::format("Flush requests: %12d = %2d (%3d%%) hard faults, %2d unavoidable, %2d misprediction(s), %2d speculation(s)", num_flushes, num_misses, cache_miss_ratio, num_unavoidable, num_mispredict, num_speculate));
|
||||
println(fmt::format("Texture uploads: %15u (%u from CPU - %02u%%)", num_texture_upload, num_texture_upload_miss, texture_upload_miss_ratio));
|
||||
println(fmt::format("Texture uploads: %11u (%u from CPU - %02u%%, %u copies avoided)", num_texture_upload, num_texture_upload_miss, texture_upload_miss_ratio, texture_copies_ellided));
|
||||
|
||||
const auto vertex_cache_hit_count = (info.stats.vertex_cache_request_count - info.stats.vertex_cache_miss_count);
|
||||
const auto vertex_cache_hit_ratio = info.stats.vertex_cache_request_count
|
||||
? (vertex_cache_hit_count * 100) / info.stats.vertex_cache_request_count
|
||||
: 0;
|
||||
println(fmt::format("Vertex cache hits: %12u/%u (%u%%)", vertex_cache_hit_count, info.stats.vertex_cache_request_count, vertex_cache_hit_ratio));
|
||||
println(fmt::format("Vertex cache hits: %9u/%u (%u%%)", vertex_cache_hit_count, info.stats.vertex_cache_request_count, vertex_cache_hit_ratio));
|
||||
}
|
||||
|
||||
if (gl::debug::g_vis_texture)
|
||||
|
@ -801,18 +801,19 @@ void VKGSRender::flip(const rsx::display_flip_info_t& info)
|
||||
const auto num_texture_upload = m_texture_cache.get_texture_upload_calls_this_frame();
|
||||
const auto num_texture_upload_miss = m_texture_cache.get_texture_upload_misses_this_frame();
|
||||
const auto texture_upload_miss_ratio = m_texture_cache.get_texture_upload_miss_percentage();
|
||||
const auto texture_copies_ellided = m_texture_cache.get_texture_copies_ellided_this_frame();
|
||||
|
||||
println(fmt::format("Unreleased textures: %8d", num_dirty_textures));
|
||||
println(fmt::format("Texture cache memory: %7dM", texture_memory_size));
|
||||
println(fmt::format("Temporary texture memory: %3dM", tmp_texture_memory_size));
|
||||
println(fmt::format("Flush requests: %13d = %2d (%3d%%) hard faults, %2d unavoidable, %2d misprediction(s), %2d speculation(s)", num_flushes, num_misses, cache_miss_ratio, num_unavoidable, num_mispredict, num_speculate));
|
||||
println(fmt::format("Texture uploads: %14u (%u from CPU - %02u%%)", num_texture_upload, num_texture_upload_miss, texture_upload_miss_ratio));
|
||||
println(fmt::format("Texture uploads: %12u (%u from CPU - %02u%%, %u copies avoided)", num_texture_upload, num_texture_upload_miss, texture_upload_miss_ratio, texture_copies_ellided));
|
||||
|
||||
const auto vertex_cache_hit_count = (info.stats.vertex_cache_request_count - info.stats.vertex_cache_miss_count);
|
||||
const auto vertex_cache_hit_ratio = info.stats.vertex_cache_request_count
|
||||
? (vertex_cache_hit_count * 100) / info.stats.vertex_cache_request_count
|
||||
: 0;
|
||||
println(fmt::format("Vertex cache hits: %12u/%u (%u%%)", vertex_cache_hit_count, info.stats.vertex_cache_request_count, vertex_cache_hit_ratio));
|
||||
println(fmt::format("Vertex cache hits: %10u/%u (%u%%)", vertex_cache_hit_count, info.stats.vertex_cache_request_count, vertex_cache_hit_ratio));
|
||||
}
|
||||
|
||||
direct_fbo->release();
|
||||
|
Loading…
Reference in New Issue
Block a user