From 01c82642ac01342114f41f2428890042c3040c9b Mon Sep 17 00:00:00 2001
From: "Jonathan \"Geenz\" Goodman" <geenz@lindenlab.com>
Date: Wed, 29 May 2024 19:31:58 -0700
Subject: [PATCH]  #1581 Only render mirrors when reflection probes are
 enabled. (#1592)

---
 indra/newview/llheroprobemanager.cpp | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/indra/newview/llheroprobemanager.cpp b/indra/newview/llheroprobemanager.cpp
index 1c084248689..ff47ca87ec9 100644
--- a/indra/newview/llheroprobemanager.cpp
+++ b/indra/newview/llheroprobemanager.cpp
@@ -75,7 +75,7 @@ LLHeroProbeManager::~LLHeroProbeManager()
 // helper class to seed octree with probes
 void LLHeroProbeManager::update()
 {
-    if (!LLPipeline::RenderMirrors || gTeleportDisplay || LLStartUp::getStartupState() < STATE_PRECACHE)
+    if (!LLPipeline::RenderMirrors || !LLPipeline::sReflectionProbesEnabled || gTeleportDisplay || LLStartUp::getStartupState() < STATE_PRECACHE)
     {
         return;
     }
@@ -212,6 +212,12 @@ void LLHeroProbeManager::update()
 
 void LLHeroProbeManager::renderProbes()
 {
+    if (!LLPipeline::RenderMirrors || !LLPipeline::sReflectionProbesEnabled || gTeleportDisplay ||
+        LLStartUp::getStartupState() < STATE_PRECACHE)
+    {
+        return;
+    }
+
     static LLCachedControl<S32> sDetail(gSavedSettings, "RenderHeroReflectionProbeDetail", -1);
     static LLCachedControl<S32> sLevel(gSavedSettings, "RenderHeroReflectionProbeLevel", 3);
 
-- 
GitLab