From 8425c6429299590653d6a40cd127d9fbed4c76d7 Mon Sep 17 00:00:00 2001
From: Dave Houlton <euclid@lindenlab.com>
Date: Fri, 19 Nov 2021 15:51:53 -0700
Subject: SL-13565 restore the trampled tracy zones

---
 indra/newview/llvieweroctree.cpp | 10 ++++++++--
 indra/newview/llworld.cpp        |  1 +
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp
index 62243cbde8..b7d0e06116 100644
--- a/indra/newview/llvieweroctree.cpp
+++ b/indra/newview/llvieweroctree.cpp
@@ -1125,12 +1125,18 @@ void LLOcclusionCullingGroup::checkOcclusion()
         else
         {
             GLuint available;
-            glGetQueryObjectuivARB(mOcclusionQuery[LLViewerCamera::sCurCameraID], GL_QUERY_RESULT_AVAILABLE_ARB, &available);
+            {
+                LL_PROFILE_ZONE_NAMED("co - query available");
+                glGetQueryObjectuivARB(mOcclusionQuery[LLViewerCamera::sCurCameraID], GL_QUERY_RESULT_AVAILABLE_ARB, &available);
+            }
 
             if (available)
             {   
                 GLuint query_result;    // Will be # samples drawn, or a boolean depending on mHasOcclusionQuery2 (both are type GLuint)
-                glGetQueryObjectuivARB(mOcclusionQuery[LLViewerCamera::sCurCameraID], GL_QUERY_RESULT_ARB, &query_result);
+                {
+                    LL_PROFILE_ZONE_NAMED("co - query result");
+                    glGetQueryObjectuivARB(mOcclusionQuery[LLViewerCamera::sCurCameraID], GL_QUERY_RESULT_ARB, &query_result);
+                }
 #if LL_TRACK_PENDING_OCCLUSION_QUERIES
                 sPendingQueries.erase(mOcclusionQuery[LLViewerCamera::sCurCameraID]);
 #endif
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index d5cce6a52a..d7f16713d2 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -885,6 +885,7 @@ void LLWorld::waterHeightRegionInfo(std::string const& sim_name, F32 water_heigh
 
 void LLWorld::precullWaterObjects(LLCamera& camera, LLCullResult* cull, bool include_void_water)
 {
+    LL_PROFILE_ZONE_SCOPED;
 	if (!gAgent.getRegion())
 	{
 		return;
-- 
cgit v1.2.3