Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Commit

Permalink
Added a bunch more profiling zones
Browse files Browse the repository at this point in the history
  • Loading branch information
Causeless committed Nov 28, 2023
1 parent 45be45b commit 75f63b6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Entities/SceneLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#include "ActivityMan.h"
#include "ThreadMan.h"

#include "tracy/Tracy.hpp"

namespace RTE {

ConcreteClassInfo(SceneLayerTracked, Entity, 0);
Expand Down Expand Up @@ -302,6 +304,7 @@ namespace RTE {

// Start a new thread to clear the backbuffer bitmap asynchronously.
m_BitmapClearTask = g_ThreadMan.GetPriorityThreadPool().submit([this, clearTo](BITMAP *bitmap, std::vector<IntRect> drawings) {
ZoneScopedN("Clear Tracked Backbuffer");
ClearDrawings(bitmap, drawings, clearTo);
}, m_BackBitmap, m_Drawings);

Expand Down
8 changes: 8 additions & 0 deletions System/PathFinder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#include "SceneMan.h"
#include "ThreadMan.h"

#include "tracy/tracy.hpp"

namespace RTE {

// One pathfinder per thread, lazily initialized. Shouldn't access this directly, use GetPather() instead.
Expand Down Expand Up @@ -136,6 +138,8 @@ namespace RTE {
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

int PathFinder::CalculatePath(Vector start, Vector end, std::list<Vector> &pathResult, float &totalCostResult, float digStrength) {
ZoneScoped;

++m_CurrentPathingRequests;

// Make sure start and end are within scene bounds.
Expand Down Expand Up @@ -250,6 +254,8 @@ namespace RTE {
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

std::vector<int> PathFinder::RecalculateAreaCosts(std::deque<Box> &boxList, int nodeUpdateLimit) {
ZoneScoped;

std::unordered_set<int> nodeIDsToUpdate;

while (!boxList.empty()) {
Expand Down Expand Up @@ -463,6 +469,8 @@ namespace RTE {
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

bool PathFinder::UpdateNodeList(const std::vector<int> &nodeVec) {
ZoneScoped;

std::atomic<bool> anyChange = false;

// Update all the costs going out from each node.
Expand Down

0 comments on commit 75f63b6

Please sign in to comment.