From df9d2b6e9613d15d39e3e870fc09686e41b6c37f Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 24 Mar 2023 10:31:32 -0500 Subject: SL-19321 Optimization pass -- reduce occlusion culling frame stalls, reduce shadow draw distance in probes. --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llvieweroctree.cpp | 4 +++- indra/newview/pipeline.cpp | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 6d7e93b364..5ade88e32b 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -14261,6 +14261,17 @@ Value 1 + RenderOcclusionTimeout + + Comment + Maximum number of frames to wait on an occlusion query before forcibly reading it back + Persist + 1 + Type + S32 + Value + 8 + UseObjectCacheOcclusion Comment diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp index d1d23cfb8e..a2d8d30fb2 100644 --- a/indra/newview/llvieweroctree.cpp +++ b/indra/newview/llvieweroctree.cpp @@ -1131,7 +1131,9 @@ void LLOcclusionCullingGroup::checkOcclusion() mOcclusionCheckCount[LLViewerCamera::sCurCameraID]++; } - if (available || mOcclusionCheckCount[LLViewerCamera::sCurCameraID] > 4) + static LLCachedControl occlusion_timeout(gSavedSettings, "RenderOcclusionTimeout", 4); + + if (available || mOcclusionCheckCount[LLViewerCamera::sCurCameraID] > occlusion_timeout) { mOcclusionCheckCount[LLViewerCamera::sCurCameraID] = 0; GLuint query_result; // Will be # samples drawn, or a boolean depending on mHasOcclusionQuery2 (both are type GLuint) diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 18b0192346..f059c87c91 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -9419,7 +9419,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera) } else { - for (S32 j = 0; j < 4; j++) + for (S32 j = 0; j < (gCubeSnapshot ? 3 : 4); j++) { if (!hasRenderDebugMask(RENDER_DEBUG_SHADOW_FRUSTA) && !gCubeSnapshot) { -- cgit v1.2.3