Skip to content
Snippets Groups Projects
Commit a94b251b authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Smol opt to occlusion culling from Ansariel

parent f00a23bb
No related branches found
No related tags found
No related merge requests found
......@@ -1107,9 +1107,10 @@ void LLOcclusionCullingGroup::checkOcclusion()
static LLCachedControl<bool> wait_for_query(gSavedSettings, "RenderSynchronousOcclusion", true);
if (wait_for_query && mOcclusionIssued[LLViewerCamera::sCurCameraID] < gFrameCount)
U32 target_read_frame = !gGLManager.mIsIntel ? ((gFrameCount > 2) ? (gFrameCount - 2) : 0) : gFrameCount;
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 = !gGLManager.mIsIntel ? 64 : 1024;
LL_RECORD_BLOCK_TIME(FTM_OCCLUSION_WAIT);
while (!available && max_loop-- > 0)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment