Added a share_mutex to the JointKey::construct to fix the lockup when the unordered_map gets corrupted.
Set the shared_lock when reading and unique_lock when writing to.
Added a share_mutex to the JointKey::construct to fix the lockup when the unordered_map gets corrupted.
Set the shared_lock when reading and unique_lock when writing to.
1. 'sActive' variables are atomic, no locks needed
2. Fix trylocks. There are internal locks inside loadMeshLOD so without
checking locks 3 and 4 viewer would be locked on each loadMeshLOD,
potentially making main thread wait for threads to unlock.
Cleaned up the Dump function to instead of using strings, use newer std::format to be cleaner writing to the log as well as use LL_CONT to use logic while writing to the data log.
Added new chart to the LLViewerTextureList::Dump for Comparing Full Size vs the current Discard Level
Also added a few labels to the other comparison tables.
Now that 2K textures are loading correctly an issue came up.
mMaxDiscardLevel could be set to 6 (from discard_level) with 2K textures which is above the current MAX_DISCARD_LEVEL.
The side effect was the texture to not scale down due to the checks on it as well as the mFetchTexture code would also not process the texture if the discard level is above the MAX_DISCARD_LEVEL.
In the LLViewerWindow.cpp update method, the DebugShowColor was loaded from LLCachedControl as a Bool, when in fact it is stored as a S32 value.
This causes a exception to trigger for the load code in RelWithDebInfo mode and may cause issues in Release.
Changed the code to treat as S32 and check the value to == 1 as it is only goes from 0 to 1
Adjusts pick coordinates to use the center of the screen in mouselook mode, resolving an issue where objects and HUDs were unclickable due to incorrect picking based on the hidden cursor position.
Updated the LLViewerTextureList::dump() to support tracking the # of textures at all possible boost levels vs. b 12 possible sizes
Cleaned up the code a bit for the headers to scale to the width of the table
Issue was caused by comparison of mMaxVirtualSize when it equaled the height X width exactly, it would skip down 1 discard level.
Also, fixed up loop to go from min_discard to < MAX_DISCARD_LEVEL and if now found, sets discard_level to MAX_DISCARD_LEVEL.
This prevents the need to do the llclamp farther down.