From fa7547c6ebbad5e227613e76927db6e20f34624c Mon Sep 17 00:00:00 2001
From: Graham Linden <graham@lindenlab.com>
Date: Fri, 17 May 2019 19:49:30 -0700
Subject: SL-10625

Revert perf optimization to not wait for occlusion queries until there's a good chance they're complete
because Intel HD driver versions between 6471 and 6577 are broken and hang forever (6709 and 6861 are fixed).
---
 indra/newview/llvieweroctree.cpp | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp
index 459ee1f35c..6365df09e1 100644
--- a/indra/newview/llvieweroctree.cpp
+++ b/indra/newview/llvieweroctree.cpp
@@ -1110,10 +1110,9 @@ void LLOcclusionCullingGroup::checkOcclusion()
 
 				static LLCachedControl<bool> wait_for_query(gSavedSettings, "RenderSynchronousOcclusion", true);
 
-                U32 target_read_frame = (gFrameCount > 2) ? (gFrameCount - 2) : 0;
-				if (wait_for_query && (mOcclusionIssued[LLViewerCamera::sCurCameraID] < target_read_frame))
+				if (wait_for_query && mOcclusionIssued[LLViewerCamera::sCurCameraID] < gFrameCount)
 				{ //query was issued last frame, wait until it's available
-					S32 max_loop = 64;
+					S32 max_loop = 1024;
 					LL_RECORD_BLOCK_TIME(FTM_OCCLUSION_WAIT);
 					while (!available && max_loop-- > 0)
 					{
-- 
cgit v1.2.3