diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-11-11 19:35:19 +0200 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-11-11 19:37:36 +0200 |
commit | 6712ac57ec201a28c8a3f208405a6926604bcbb5 (patch) | |
tree | 88f8e3bb1742977f97206932fa6886338209ac1b /indra/newview | |
parent | 5ff1b1b5d20a0402c571ebc9bba23d88fcfa93eb (diff) |
Revert "SL-13565, remove SL-10625 throttling erroneously applied to all GPUs"
This reverts commit d77b7bdc5484fab731f7537a15d690a1e022c246.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llappviewer.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 60421899f7..2fad3d8f24 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1482,6 +1482,21 @@ bool LLAppViewer::doFrame() display(); + static U64 last_call = 0; + if (!gTeleportDisplay || gGLManager.mIsIntel) // SL-10625...throttle early, throttle often with Intel + { + // Frame/draw throttling + U64 elapsed_time = LLTimer::getTotalTime() - last_call; + if (elapsed_time < mMinMicroSecPerFrame) + { + LL_RECORD_BLOCK_TIME(FTM_SLEEP); + // llclamp for when time function gets funky + U64 sleep_time = llclamp(mMinMicroSecPerFrame - elapsed_time, (U64)1, (U64)1e6); + micro_sleep(sleep_time, 0); + } + } + last_call = LLTimer::getTotalTime(); + pingMainloopTimeout("Main:Snapshot"); LLFloaterSnapshot::update(); // take snapshots LLFloaterOutfitSnapshot::update(); |