From 7e6aa85efd0ee5b30d310e71a06c9f4b404939f8 Mon Sep 17 00:00:00 2001 From: Vincent Lejeune Date: Sun, 31 Dec 2023 16:52:07 +0100 Subject: [PATCH] lighting: move profiling at the correct place. --- lib/ivis_opengl/pielighting.cpp | 2 -- src/display3d.cpp | 6 +++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/ivis_opengl/pielighting.cpp b/lib/ivis_opengl/pielighting.cpp index 718804ea2ba..be9b88f0c34 100644 --- a/lib/ivis_opengl/pielighting.cpp +++ b/lib/ivis_opengl/pielighting.cpp @@ -26,7 +26,6 @@ #include #include "culling.h" #include "src/profiling.h" -#include "lib/framework/debug.h" PIELIGHT& LightMap::operator()(int32_t x, int32_t y) @@ -92,7 +91,6 @@ namespace { void renderingNew::LightingManager::ComputeFrameData(const LightingData& data, const glm::mat4& worldViewProjectionMatrix) { - WZ_PROFILE_SCOPE("LightingManager_ComputeFrameData"); PointLightBuckets result; // Pick the first lights inside the view frustrum diff --git a/src/display3d.cpp b/src/display3d.cpp index 41a0bfa95bd..a791d662d66 100644 --- a/src/display3d.cpp +++ b/src/display3d.cpp @@ -88,6 +88,7 @@ #include "faction.h" #include "wzcrashhandlingproviders.h" #include "shadowcascades.h" +#include "profiling.h" /******************** Prototypes ********************/ @@ -1426,7 +1427,10 @@ static void drawTiles(iView *player) wzPerfEnd(PERF_EFFECTS); // The lightmap need to be ready at this point - getCurrentLightingManager().ComputeFrameData(getCurrentLightingData(), perspectiveViewMatrix); + { + WZ_PROFILE_SCOPE(LightingManager_ComputeFrameData); + getCurrentLightingManager().ComputeFrameData(getCurrentLightingData(), perspectiveViewMatrix); + } // prepare terrain for drawing perFrameTerrainUpdates();