Skip to content

Commit

Permalink
Track gfx memory in tracy
Browse files Browse the repository at this point in the history
  • Loading branch information
guusw committed Feb 21, 2023
1 parent b5e7009 commit 30a4ba5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/gfx/renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include <tracy/Tracy.hpp>
#include <thread>
#include <algorithm>
#include <tracy/Tracy.hpp>
#include <magic_enum.hpp>
#include <spdlog/spdlog.h>
#include <span>
Expand Down Expand Up @@ -291,7 +290,7 @@ struct RendererImpl final : public ContextData {

for (auto &rt : hacks.clearedHints)
hasher(rt);

hasher(viewData.cachedView.isFlipped);
hasher(referenceOutputSize);
if (viewData.renderTarget) {
Expand Down Expand Up @@ -760,7 +759,13 @@ struct RendererImpl final : public ContextData {

processProcessorDynamicValueCleanupQueue();

#ifdef TRACY_ENABLE
TracyPlot("Drawables Processed", int64_t(frameStats.numDrawables));

TracyPlotConfig("GFX WorkerMemory", tracy::PlotFormatType::Memory, true, true, 0);
TracyPlot("GFX WorkerMemory", int64_t(workerMemory.getMemoryResource().totalRequestedBytes));

#endif
}

void clearOldCacheItems() {
Expand Down

0 comments on commit 30a4ba5

Please sign in to comment.