Commit Graph

575 Commits (94f09bb129f3865a4c37fa2a29f2221926dec767)

Author SHA1 Message Date
Hecklezz 5fb9e75cd8 [FIRE-36087] Fix crash in updateImagesCreateTextures accessing potentially freed image pointer
Merged upstream in SLViewer PR#4984
2025-11-13 19:56:19 +10:00
Ansariel f530540d00 Reverting changes to texture pipeline back to stock LL 2025-08-17 17:26:08 +02:00
Ansariel c4333e2222 Merge branch 'develop' of https://github.com/secondlife/viewer
# Conflicts:
#	indra/llinventory/llsettingssky.cpp
#	indra/newview/llviewertexturelist.cpp
#	indra/newview/skins/default/xui/en/floater_world_map.xml
2025-06-16 12:55:12 +02:00
Ansariel b7063272ff Merge branch 'master' of https://github.com/FirestormViewer/phoenix-firestorm-ll-master 2025-06-16 12:46:50 +02:00
Ansariel 3f4d28329f Merge branch 'master' of https://github.com/FirestormViewer/phoenix-firestorm 2025-06-15 17:58:08 +02:00
minerjr 502d10f268 Shorten ID from texture dump
Removed full ID from dump of texture and replaced with first 7 values like the other Developer texture options.
2025-06-14 19:59:49 -03:00
Ansariel Hiller 4c529c85d1
Fix fast cache ignoring its time constraint (#4237) 2025-06-10 12:53:06 +03:00
Ansariel 4cfdea8395 Merge branch 'master' of https://github.com/FirestormViewer/phoenix-firestorm
# Conflicts:
#	indra/newview/skins/default/xui/zh/strings.xml
2025-06-07 17:50:44 +02:00
Ansariel a525d89977 Fix texture fast cache ignoring its time limit constraint 2025-06-02 23:29:53 +02:00
Ansariel 159c05a5ac Merge branch 'master' of https://github.com/FirestormViewer/phoenix-firestorm-ll-master
# Conflicts:
#	.github/workflows/qatest.yaml
#	indra/newview/skins/default/xui/ja/strings.xml
2025-05-30 13:26:29 +02:00
Jonathan "Geenz" Goodman fe4f85e587 Merge remote-tracking branch 'origin/main' into geenz/2025.04-to-develop 2025-05-28 11:52:16 -04:00
Ansariel 355a80ab91 Merge branch 'develop' of https://github.com/secondlife/viewer
# Conflicts:
#	indra/llimagej2coj/llimagej2coj.cpp
#	indra/newview/llfloaterworldmap.cpp
#	indra/newview/llfloaterworldmap.h
#	indra/newview/llviewertexturelist.cpp
#	indra/newview/skins/default/xui/en/floater_world_map.xml
2025-05-23 13:13:24 +02:00
Ansariel 12f5023de5 Merge branch 'master' of https://github.com/FirestormViewer/phoenix-firestorm 2025-05-09 19:26:27 +02:00
Beq 3b03dfce7b remove dbg with a high overheadeven when logging disabled 2025-05-08 22:02:13 +01:00
TommyTheTerrible 89512d44f8
updateImageDecodePriority - Avoid Long Face Loop (#4019, #4021)
* updateImageDecodePriority - Avoid Long Face Loop

To avoid running a long loop on thousands of faces, some textures were being set to a BOOST level to avoid the updateImageDecodePriority function entirely but this was causing many of them to never be deleted over the course of a user's travels.

Instead of relying on BOOST, this commit changes the logic of the texture channel loop such that the face loop will only run if the number of faces is below the threshold.

To do this, we move the face_count incrementing outside of the face loop into the channel loop and increment it using the getNumFaces function instead.

We then check the face_count against the maximum number of faces we want to check and if it exceeds the number we set the number of faces for the face loop to check down to zero.

This avoids branch prediction misses and the long face loop issue.

Later, if the face_count is above the threshold, we assign the virtual size to the maximum.

I personally believe the max_faces_to_check should be lower than 1024, but I left that value in for continuity. I use 64 faces as my max on my compiled version of the viewer without any noticeable issues for memory use.

* updateImageDecodePriority - Face Loop Increment Swap

Looks like compilers like knowing the incrementing in the for loop information for optimizations and parallelization.

Sorry for the tiny commit.

* updateImageDecodePriority - Suggested Cleanup

Remove trailing white-space.

Co-authored-by: Andrey Lihatskiy <alihatskiy@productengine.com>
2025-05-05 11:52:58 +03:00
Ansariel 88bced3a4f Merge branch 'master' of https://github.com/FirestormViewer/phoenix-firestorm
# Conflicts:
#	indra/newview/skins/default/xui/ja/strings.xml
2025-05-03 13:16:00 +02:00
minerjr 237733dbb4 FIRE-35428 - Mega prim issue - fix compressed sculpted textures
Fix for the mega prims.
Issue was cause by Linux reporting 0 GB of VRAM which forces texture compression on.
Texture compression affects the textures used for the generation of the mesh for the sculpted textures.
When sculpted image created, added check to turn off compression for the texture.
Also fixed issues where Sculpted textures loaded from fast cache would also cause artifacts. Disabled writing sculpted textures to fast cache.
2025-04-25 17:41:14 -03:00
Ansariel 9d6c74a051 Merge branch 'master' of https://github.com/FirestormViewer/phoenix-firestorm 2025-04-25 22:21:12 +02:00
Ansariel 120f85c9e0 Merge branch 'master' of https://github.com/FirestormViewer/phoenix-firestorm-develop
# Conflicts:
#	indra/newview/app_settings/settings.xml
#	indra/newview/llvieweraudio.cpp
#	indra/newview/llvoavatar.h
2025-04-25 22:20:59 +02:00
Beq 6fc1ed0a85 Fix viewertexturelist on Mac 2025-04-24 18:28:33 +01:00
minerjr d362e4ed8f Cleaned up comments (incorrect comment from JIRA title) 2025-04-22 16:54:35 -03:00
minerjr 8443e783a2 Change dump to use older std::setw instead of std::format
Changed dump method for LLViewerTextureList to use std::setw instead of std::format due to gcc 11 support.
2025-04-22 16:49:01 -03:00
minerjr 3c9cd68cc5 Cleaned up the LLViewerTextureList::Dump to write to the LL_INFOS directly
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.
2025-04-21 10:25:18 -03:00
minerjr 263f3e726a Add Full Size v. Discard Level to LLViewerTextureList::Dump
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.
2025-04-20 16:02:59 -03:00
minerjr e001d0f6e1 UpdatedLLViewerTextureList::dump() to have boost level vs. size
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
2025-04-16 07:47:45 -03:00
Ansariel 6c214f773f Merge branch 'master' of https://github.com/FirestormViewer/phoenix-firestorm-202503 2025-04-04 00:42:49 +02:00
Ansariel 01831e462e Merge branch 'master' of https://github.com/FirestormViewer/phoenix-firestorm 2025-04-03 23:07:22 +02:00
minerjr f182deb680 Updated array to more modern style (Leave 1980's C code behind)
Changed the array's from C array's to std::array's... old habits die hard.
Also clarified a set of comments.
Fixed up white spaces being added. Visual studio 2022 is inserting them and not sure why.
2025-04-03 11:39:12 -03:00
minerjr 9312c6aa2d Added more stats for the LLViewerTextureList::dump and fixed bug
Added table to show horizonal size X vertical size counts
Added table to show discard level vs size counts

Added -1 as a valid discard level (this was causing possible crashes by not handling)
Added extra # of discard levels to handle larger texture sizes (2048 can scale down to 7, 4096 to 8 and invalid sizes can go +1 more)

Fixed out of bounds and possible buffer overflow issue due to getCurrentDiscard having -1 to > MAX_DISCARD_LEVEL + 1 be outputs.
2025-04-03 08:33:06 -03:00
Jonathan "Geenz" Goodman ccdcbfeebd Merge branch 'release/2025.03' into release/2025.04 2025-04-01 13:10:33 -04:00
Ansariel 82b05f1063 Merge branch 'release/2025.04' of https://github.com/secondlife/viewer
# Conflicts:
#	indra/llui/llfloater.h
#	indra/newview/llfloatersnapshot.h
#	indra/newview/llstatusbar.cpp
#	indra/newview/llviewerwindow.cpp
#	indra/newview/skins/default/xui/da/floater_about.xml
#	indra/newview/skins/default/xui/de/panel_snapshot_inventory.xml
#	indra/newview/skins/default/xui/de/strings.xml
#	indra/newview/skins/default/xui/en/floater_snapshot.xml
#	indra/newview/skins/default/xui/en/panel_snapshot_inventory.xml
#	indra/newview/skins/default/xui/en/panel_tools_texture.xml
#	indra/newview/skins/default/xui/es/strings.xml
#	indra/newview/skins/default/xui/fr/panel_snapshot_inventory.xml
#	indra/newview/skins/default/xui/fr/strings.xml
#	indra/newview/skins/default/xui/it/panel_snapshot_inventory.xml
#	indra/newview/skins/default/xui/it/strings.xml
#	indra/newview/skins/default/xui/ja/panel_settings_water.xml
#	indra/newview/skins/default/xui/ja/panel_snapshot_inventory.xml
#	indra/newview/skins/default/xui/ja/strings.xml
#	indra/newview/skins/default/xui/pt/strings.xml
#	indra/newview/skins/default/xui/ru/strings.xml
#	indra/newview/skins/default/xui/zh/panel_snapshot_inventory.xml
#	indra/newview/skins/default/xui/zh/strings.xml
#	scripts/messages/message_template.msg
#	scripts/messages/message_template.msg.sha1
2025-03-31 23:55:28 +02:00
Andrey Kleshchev 8d5dab9f67 #3809 Fix J2C Upload 2025-03-31 09:56:10 +03:00
Ansariel 99e1699479 Merge branch 'release/2025.03' of https://github.com/secondlife/viewer
# Conflicts:
#	indra/llappearance/llwearable.cpp
#	indra/newview/llappviewer.cpp
#	indra/newview/llappviewerwin32.cpp
#	indra/newview/llviewerassetstorage.cpp
#	indra/newview/llviewertexturelist.cpp
#	indra/newview/llviewerwindow.cpp
2025-03-27 19:36:45 +01:00
Ansariel f0e2f3f9e4 Merge branch 'master' of https://github.com/FirestormViewer/phoenix-firestorm 2025-03-27 18:42:36 +01:00
Andrey Kleshchev 2b44a97a16 Avoid recalculating pixel area when possible 2025-03-27 18:29:19 +02:00
minerjr fe125e167b FIRE-35280 - Inventory gallery and combination view no longer display thumbnails
Reverted change to the LLViewerTextureList's updateImageFetchTextures which was intended to skip processing UI textures to downscale as they don't need to be changed, but the problem is if a new local texture is created it does not get processed.
2025-03-23 14:14:57 -03:00
Ansariel 62e5fffd8e Merge branch 'release/2025.03' of https://github.com/secondlife/viewer
# Conflicts:
#	indra/newview/lldrawpooltree.cpp
#	indra/newview/lllocalbitmaps.cpp
#	indra/newview/lltextureview.cpp
#	indra/newview/llviewertexture.cpp
#	indra/newview/skins/default/colors.xml
2025-03-23 12:29:33 +01:00
Ansariel b140406910 Merge branch 'master' of https://github.com/FirestormViewer/phoenix-firestorm 2025-03-23 11:46:47 +01:00
Andrey Kleshchev 18e06771e5 #3364 Fix a case of excessive texture updates
when bias fluctuates a bit.
Make bias' effect a bit more gradual.
2025-03-21 09:44:51 +02:00
minerjr c082f0cd76 FIRE-35081 - Handled animated/media textures, grass, tree and light textures
Added new boost levels for Tree, Grass and Light textures (More for tracking as they have custom hard coded values for the mPixelArea which causes issues with loading of sizes.
Added adjustments for the calcPixelArea and calcImportanceToCamera as well as getTextureVirtualSize
Added virtual texture size updates for Media textures

Added code to scale down off screen textures (saves a lot of texture VRAM.
Added additional features for the LLViewerTextureList::Dump

Only issue is server controlled textures which animate tend to load low quality, then upscale as well as Sculpted Volume's which force textures to reload.
2025-03-17 23:13:41 -03:00
minerjr 5b0801e535 [FIRE-35081] - Fixed blurry textures and scaling issues
Added new calculation to the LLCamera for draw distance multiplier
Removed the Inverse aspect as not longer used
Modified the LLFace to no long user the inverse aspect.
Updated mInFrustum to use mImportanceToCamera as it was correct
LLViewerCamera removed the mCosCameraFOV (not used anymore)
Added LLViewerMenu option under Developer->Dump->Texture List to dump texture list to info for debugging.
LLViewerTexture viewer for LOD textures, now loops to make the texture fit to cover the max discard value instead of calculating with logs and divisions.
LLViewerTextureList updated to to dump texture list to the Infos, and updated to boost for not only textures based upon the importance to the camera, but to boost a second time for textures close to the camera. Also capped the mMaxVirtualSize to try to help track down texture size changes
Updated LLPipeline to use same getDrawDistanceMultiplier as the texture calcPixelArea code.
2025-03-12 00:32:16 +00:00
minerjr c64a294cf1 Fixed up animations to always be running (Frustum may need revision
Fixed up animations to always be running, so they should not stutter or be in odd places when turning the camera.
May need to revise the mInFrustum as trying to make sure it's within the actual visual location. Need to test with
2025-03-12 00:32:16 +00:00
minerjr 87eb902f7a [FIRE-35081] Blurry prims not changing with graphics settings, not happening with SL Viewer
Changed the textures to divide the texture vsize  by the Aspect Ratio and Fields of view. to better control when a texture needs to be scaled down.
Fixed issue when low screen image size could cause an assert on the on screen console due to negative sizes(Calculated to -30 from the value and code that uses the negative location
Updated the logic in LLViewerObjectList to fix the issue of mObjects being modified at possibly any time by the code it calling.
2025-03-12 00:32:16 +00:00
Ansariel d49359c086 Merge branch 'release/2025.03' of https://github.com/secondlife/viewer
# Conflicts:
#	indra/llaudio/llaudioengine_openal.cpp
#	indra/llui/lltextbox.h
#	indra/newview/llnotificationhandlerutil.cpp
#	indra/newview/llviewertexture.cpp
#	indra/newview/skins/default/xui/de/strings.xml
#	indra/newview/skins/default/xui/es/strings.xml
#	indra/newview/skins/default/xui/fr/strings.xml
#	indra/newview/skins/default/xui/it/strings.xml
#	indra/newview/skins/default/xui/pl/strings.xml
#	indra/newview/skins/default/xui/pt/strings.xml
#	indra/newview/skins/default/xui/ru/strings.xml
#	indra/newview/skins/default/xui/tr/strings.xml
2025-03-08 13:15:21 +01:00
Andrey Kleshchev b8eda5b115 #3673 Crash at updateImageDecodePriority 2025-03-06 20:55:39 +02:00
Andrey Kleshchev 85c77ee910 #3611 Decrease TextureScaleMinAreaFactor 2025-03-05 23:00:01 +02:00
Ansariel d4589f5972 Merge branch 'master' of https://github.com/FirestormViewer/phoenix-firestorm-foreverfps 2025-03-05 13:05:13 +01:00
Ansariel d19e6abc5e Merge branch 'release/2025.03' of https://github.com/secondlife/viewer
# Conflicts:
#	indra/newview/llappviewer.cpp
#	indra/newview/llgiveinventory.cpp
#	indra/newview/llstartup.cpp
#	indra/newview/lltooldraganddrop.cpp
#	indra/newview/llvoavatar.cpp
#	indra/newview/skins/default/xui/fr/floater_avatar_textures.xml
#	indra/newview/skins/default/xui/it/floater_avatar_textures.xml
#	indra/newview/skins/default/xui/ja/floater_avatar_textures.xml
#	indra/newview/skins/default/xui/pl/floater_avatar_textures.xml
#	indra/newview/skins/default/xui/zh/floater_avatar_textures.xml
2025-03-01 01:09:19 +01:00
minerjr 55a39da74e FIRE-35081 Blurry prims not changing with graphics settings, not happening with SL Viewer - cont.
Refined the logic for the textures to include animated textures to not be downscaled They are not forced to be high boost level.
Update the logic of how to process the on screen max vsize to be simpler.
Added split time max_time for the updateImagesCreateTextures, as originally they were two different functions and can save doubled the time for each.
Added time limit on LLViewerObjectList::updateApparentAngles, as it it affects the Textures in the texture list and worked on a fixed # of objects per frame and each object is variable in the amount of processing required, affecting frame rate and # of textures updated.
2025-02-27 08:55:47 -04:00
minerjr 097bbc7c26 FIRE-35081 - Updated logic
Updated the math to remove the need to store the variable and use it again
Updated the "TextureCameraBoost" to default to 7, as we add 1 to the value now instead of using max (TextureCameraBoost, 1.0f)
2025-02-22 11:12:36 -04:00