summaryrefslogtreecommitdiff
path: root/indra/newview/llvieweroctree.cpp
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-03-06 10:09:59 -0800
committerGraham Linden <graham@lindenlab.com>2019-03-06 10:09:59 -0800
commit3f48633b7df7bff19bae217527b92ec2be5e36e6 (patch)
tree022ec1908cea2ec54494143c364a35560278ee41 /indra/newview/llvieweroctree.cpp
parent3396b728d2167c41a6ce4a6ba9dfa1fc13db2333 (diff)
Make octree walk stop thrashing the caches with tex work.
Add many more fast timer blocks to differentiate where time goes in UI and Shadow rendering.
Diffstat (limited to 'indra/newview/llvieweroctree.cpp')
-rw-r--r--indra/newview/llvieweroctree.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp
index 6c3b98bef9..459ee1f35c 100644
--- a/indra/newview/llvieweroctree.cpp
+++ b/indra/newview/llvieweroctree.cpp
@@ -1110,16 +1110,13 @@ void LLOcclusionCullingGroup::checkOcclusion()
static LLCachedControl<bool> wait_for_query(gSavedSettings, "RenderSynchronousOcclusion", true);
- if (wait_for_query && mOcclusionIssued[LLViewerCamera::sCurCameraID] < gFrameCount)
+ U32 target_read_frame = (gFrameCount > 2) ? (gFrameCount - 2) : 0;
+ if (wait_for_query && (mOcclusionIssued[LLViewerCamera::sCurCameraID] < target_read_frame))
{ //query was issued last frame, wait until it's available
- S32 max_loop = 1024;
+ S32 max_loop = 64;
LL_RECORD_BLOCK_TIME(FTM_OCCLUSION_WAIT);
while (!available && max_loop-- > 0)
{
- //do some usefu work while we wait
- F32 max_time = llmin(gFrameIntervalSeconds.value()*10.f, 1.f);
- LLAppViewer::instance()->updateTextureThreads(max_time);
-
glGetQueryObjectuivARB(mOcclusionQuery[LLViewerCamera::sCurCameraID], GL_QUERY_RESULT_AVAILABLE_ARB, &available);
}
}