Fix Aurora draw call display in performance overlay

It was getting reset at the start of the frame... Just cache the values.
This commit is contained in:
PJB3005
2026-04-07 22:17:48 +02:00
parent 74942f3c76
commit 8f77ca72b1
3 changed files with 22 additions and 13 deletions
+14 -13
View File
@@ -10,6 +10,7 @@
#include "d/actor/d_a_alink.h"
#include "d/actor/d_a_horse.h"
#include "d/d_com_inf_game.h"
#include "dusk/dusk.h"
#include "m_Do/m_Do_main.h"
namespace dusk {
@@ -109,31 +110,31 @@ namespace dusk {
}
hasPrevious = true;
AuroraStats const* stats = aurora_get_stats();
const auto& stats = lastFrameAuroraStats;
ImGuiStringViewText(
fmt::format(FMT_STRING("Queued pipelines: {}\n"), stats->queuedPipelines));
fmt::format(FMT_STRING("Queued pipelines: {}\n"), stats.queuedPipelines));
ImGuiStringViewText(
fmt::format(FMT_STRING("Done pipelines: {}\n"), stats->createdPipelines));
fmt::format(FMT_STRING("Done pipelines: {}\n"), stats.createdPipelines));
ImGuiStringViewText(
fmt::format(FMT_STRING("Draw call count: {}\n"), stats->drawCallCount));
fmt::format(FMT_STRING("Draw call count: {}\n"), stats.drawCallCount));
ImGuiStringViewText(fmt::format(FMT_STRING("Merged draw calls: {}\n"),
stats->mergedDrawCallCount));
stats.mergedDrawCallCount));
ImGuiStringViewText(fmt::format(FMT_STRING("Vertex size: {}\n"),
BytesToString(stats->lastVertSize)));
BytesToString(stats.lastVertSize)));
ImGuiStringViewText(fmt::format(FMT_STRING("Uniform size: {}\n"),
BytesToString(stats->lastUniformSize)));
BytesToString(stats.lastUniformSize)));
ImGuiStringViewText(fmt::format(FMT_STRING("Index size: {}\n"),
BytesToString(stats->lastIndexSize)));
BytesToString(stats.lastIndexSize)));
ImGuiStringViewText(fmt::format(FMT_STRING("Storage size: {}\n"),
BytesToString(stats->lastStorageSize)));
BytesToString(stats.lastStorageSize)));
ImGuiStringViewText(fmt::format(FMT_STRING("Tex upload size: {}\n"),
BytesToString(stats->lastTextureUploadSize)));
BytesToString(stats.lastTextureUploadSize)));
ImGuiStringViewText(fmt::format(
FMT_STRING("Total: {}\n"),
BytesToString(stats->lastVertSize + stats->lastUniformSize +
stats->lastIndexSize + stats->lastStorageSize +
stats->lastTextureUploadSize)));
BytesToString(stats.lastVertSize + stats.lastUniformSize +
stats.lastIndexSize + stats.lastStorageSize +
stats.lastTextureUploadSize)));
// TODO: persist to config
ShowCornerContextMenu(m_debugOverlayCorner, m_cameraOverlayCorner);