diff options
author | Dave Parks <davep@lindenlab.com> | 2022-11-30 13:25:00 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2022-11-30 13:25:00 -0600 |
commit | 87bb72a47a1fc64b98e498120e332de76e6a9211 (patch) | |
tree | 1e48ca7915525368bf3eda06447ab4edcaf0be60 /indra/newview | |
parent | adbd264d35f5fabe28249839da6c12e5dac4127f (diff) |
SL-18154 WIP -- CPU sampling (AMD uProf) profile guided optimizations to reduce CPU usage of background threads.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llappviewer.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 6e0bbb05ee..dcc12a865b 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2181,6 +2181,12 @@ bool LLAppViewer::initThreads() // get the number of concurrent threads that can run S32 cores = std::thread::hardware_concurrency(); + U32 max_cores = gSavedSettings.getU32("EmulateCoreCount"); + if (max_cores != 0) + { + cores = llmin(cores, (S32) max_cores); + } + // The only configurable thread count right now is ImageDecode // The viewer typically starts around 8 threads not including image decode, // so try to leave at least one core free |