Commit Graph

345 Commits (6ed99747750685c8a34d595a0c516bbeeeed4299)

Author SHA1 Message Date
Ansariel Hiller 4c529c85d1
Fix fast cache ignoring its time constraint (#4237) 2025-06-10 12:53:06 +03: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
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
Jonathan "Geenz" Goodman ccdcbfeebd Merge branch 'release/2025.03' into release/2025.04 2025-04-01 13:10:33 -04:00
Andrey Kleshchev 8d5dab9f67 #3809 Fix J2C Upload 2025-03-31 09:56:10 +03:00
Andrey Kleshchev 2b44a97a16 Avoid recalculating pixel area when possible 2025-03-27 18:29:19 +02: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
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
Andrey Kleshchev 847fd636cd Merge branch release/2025.03
# Conflicts:
#	indra/newview/llmeshrepository.cpp
#	indra/newview/llmeshrepository.h
2025-02-19 17:29:48 +02:00
Maxim Nikolenko 09c60de43c
#3210 Fix for "Texture will be downscaled" log message happening too often 2025-02-12 17:09:44 +02:00
Jonathan "Geenz" Goodman 93a88e6025
Water Exclusion Surfaces (#3517)
* #3455 Add support for water exclusion surfaces
2025-02-07 05:55:47 -05:00
Andrey Kleshchev b84f3ff6b1 viewer#2780 Speed up terrain loading on teleport
Terrain was arriving and processing too late resulting in issues like
"Lower terrain material incorrectly shown momentarily"
2025-02-05 18:50:31 +02:00
Andrey Kleshchev 6dc819e22a #3364 Fix update rate being stuck high due to bias
if bias stays unchanged at 4.f, there is no reason to keep refreshing
at high rate.
2025-01-16 10:02:54 +02:00
Dave Parks 1120a7ccb9
#3210 Fix for "Texture will be downscaled" happening too often. (#3212) 2024-12-05 13:52:03 -06:00
Dave Parks 4b5d4be5a8
#3106 Lower maximum texture bias back to 4, reintroduce camera importance texture scaling (#3207) 2024-12-04 12:33:04 -06:00
Andrey Kleshchev 8d52d06fcb Crash at getDiscardLevel() 2024-11-19 23:28:09 +02:00
Dave Parks 2b255535ef
2590 mac intel and radeon pro 5300m horrible fps 2 (#3030)
* OpenGL 3.3 compatibility pass.  Fix for FBO driven downscaling corrupting textures.
* Increase maximum texture bias, immediately scale down when textures are loaded higher resolution than desired
* #2590 Fix for some frame stalls on Intel Macs
2024-11-12 15:26:38 -08:00
Andrey Kleshchev fa5aba2b67 viewer#2875 Proportionally agressive vram cleanup 2024-10-25 13:53:11 +03:00
Brad Linden 49abe2c8bc Merge remote-tracking branch 'origin/release/2024.08-DeltaFPS' into develop 2024-09-04 12:51:24 -07:00
Dave Parks cb9f3dcfe9
#2482 Low end NVIDIA compatibility pass (#2486)
- Use GL_NVX_gpu_memory_info when available
- Disable transparent water on Mid+ and lower
- Adjust GPU benchmark to better tell the truth
- Texture bias tune up
- viewer-private/#277 - Report foreground_time in viewer stats
2024-09-04 11:34:44 -05:00
RunitaiLinden 1f58884db9 #2438 Address frame stalls in updateImageDecodePriority 2024-08-28 13:14:58 -05:00
RunitaiLinden feecf09573 #2431 Fix for redundant searching for pixeismall.j2c causing frame stalls 2024-08-27 15:59:41 -05:00
Dave Parks 0edf6e230e
#2388 Texture downrezzing tune up. (#2414)
- Hold onto unreferenced textures for 30 seconds.
- Don't downres unless memory is low
- Downres when viewer is backgrounded.
2024-08-23 16:35:52 -05:00
Dave Parks ed6732eda8
#2315 Ensure textures are deleted when they are no longer referenced. (#2343)
* #2315 WIP -- Clean up deletion rules in texture list.  Incidental decruft.

* Touch up assertions.

* Move mLastReferencedTimer to LLViewerMediaTexture since it's no longer used by LLViewerTexture
2024-08-20 06:59:07 -05:00
Beq Janus 50e05c70d3
Interim fix for particles no longer rezzing properly. (#2227)
In a previous PR, I noted:

Note this change moves the calcPixelArea() call to the top BEFORE we user getPixelArea(). Either that call is entirely redundant (i.e. if calc was called earlier in the frame) or we were using the stale pixelArea (one frame behind). If the former is true then it might be faster to just do an AABB frustum check.

It turns out that by moving the calcPixelArea to the "correct place", we break the rezzing of particles which are then being downsampled as a result. Moving this back to the "incorrect" location undoes the immediate effect but this whole scenario may need to be re-examined.
2024-08-12 21:01:34 +03:00
Andrey Kleshchev 793f5ac341 Crash at LLViewerTexture::updateClass() 2024-08-02 12:21:11 +03:00
Andrey Kleshchev beb177bb23 viewer#2153 Crash at LLViewerTextureList::updateImageDecodePriority
Crash at getTextureEntry which calls getTE(mTEOffset)
2024-07-31 18:16:18 +03:00
TommyTheTerrible 27a2531c5b
Fix: Stop textures from being set as inactive if still on a face. (#2017)
Textures were being set to Inactive even if still in scene, causing them to be deleted and re-decoded in a loop.
2024-07-14 00:39:09 +03:00
Rye Mutt 2a7030992f
Update tracy profiler to 0.10 (#1946) 2024-07-09 16:53:43 -05:00
Ansariel 9fdca96f8b Re-enable compiler warnings C4244 and C4396 except for lltracerecording.h and llunittype.h for now 2024-07-08 20:27:14 +02:00
Dave Parks 08b933a0c6
#1870 Tune up for better experience on integrated intel with low memory (#1872)
* More deterministic vsize calculation.   Add control for choosing downscale method.
* Quick hack to make GLTF preview work again
2024-07-03 17:42:24 -05:00
Beq Janus 475d0df4c1
Experimental fix for blurry textures (#1875)
This change removes the distance based bias (which is a large contributor to premature blurring) but adds a check using the importance factor to give some balance.
importance should be between 0 and 1 and is higher when the texture is facing the camera, lower when it is side on,
The unimportance setting defines the cutoff vaklue below which we'll consider the textures worth "down scaling" by the bias factor. The setting is inplace to allow us to play with this, 0.25 is current default.

Note this change moves the calcPixelArea() call to the top BEFORE we user getPixelArea(). Either that call is entirely redundant (i.e. if calc was called earlier in the frame)  or we were using the stale pixelArea (one frame behind). If the former is true then it might be faster to just do an AABB frustum check.
2024-07-02 12:57:39 -05:00
Dave Parks ab87978cbc
1836 dont store texture in system memory unless absolutely necessary (#1843)
* #1836 Texture memory usage overhaul.  Much decrufting
- don't keep a copy of textures in system memory
- use GPU to downrez textures instead of reloading from cache
- use GPU to generate brightness/darkness bumpmaps
2024-06-27 13:12:43 -05:00
Brad Linden 7c42711ca3 Merge remote-tracking branch 'origin/DRTVWR-600-maint-A' into project/gltf_development 2024-06-10 16:22:12 -07:00
Ansariel c0fad3028f Re-enable compiler warnings C4018, C4100, C4231 and C4506 2024-06-10 16:42:43 +02:00
Ansariel b42f9d836b Re-enable a lot of compiler warnings for MSVC and address the C4267 "possible loss of precision" warnings 2024-06-01 15:49:26 +02:00
Dave Parks d1a8a9d0c3
#1596 Fix for GLTF uploads failing after loading from .glb file (#1602) 2024-05-30 16:28:56 -05:00
Dave Parks 2f41200384
Remove tinygltf dependency from LL::GLTF (#1541)
* #1535 Image loading/saving support in boost::json driven GLTF parser
* #1536 GLB Support in boost::json drvien GLTF parser
2024-05-28 09:45:40 -05:00
Ansariel e2e37cced8 Fix line endlings 2024-05-22 22:40:26 +03:00
Ansariel 1b67dd855c Merge remote-tracking branch 'origin/main' into DRTVWR-600-maint-A
# Conflicts:
#	autobuild.xml
#	indra/cmake/CMakeLists.txt
#	indra/cmake/GoogleMock.cmake
#	indra/llaudio/llaudioengine_fmodstudio.cpp
#	indra/llaudio/llaudioengine_fmodstudio.h
#	indra/llaudio/lllistener_fmodstudio.cpp
#	indra/llaudio/lllistener_fmodstudio.h
#	indra/llaudio/llstreamingaudio_fmodstudio.cpp
#	indra/llaudio/llstreamingaudio_fmodstudio.h
#	indra/llcharacter/llmultigesture.cpp
#	indra/llcharacter/llmultigesture.h
#	indra/llimage/llimage.cpp
#	indra/llimage/llimagepng.cpp
#	indra/llimage/llimageworker.cpp
#	indra/llimage/tests/llimageworker_test.cpp
#	indra/llmessage/tests/llmockhttpclient.h
#	indra/llprimitive/llgltfmaterial.h
#	indra/llrender/llfontfreetype.cpp
#	indra/llui/llcombobox.cpp
#	indra/llui/llfolderview.cpp
#	indra/llui/llfolderviewmodel.h
#	indra/llui/lllineeditor.cpp
#	indra/llui/lllineeditor.h
#	indra/llui/lltextbase.cpp
#	indra/llui/lltextbase.h
#	indra/llui/lltexteditor.cpp
#	indra/llui/lltextvalidate.cpp
#	indra/llui/lltextvalidate.h
#	indra/llui/lluictrl.h
#	indra/llui/llview.cpp
#	indra/llwindow/llwindowmacosx.cpp
#	indra/newview/app_settings/settings.xml
#	indra/newview/llappearancemgr.cpp
#	indra/newview/llappearancemgr.h
#	indra/newview/llavatarpropertiesprocessor.cpp
#	indra/newview/llavatarpropertiesprocessor.h
#	indra/newview/llbreadcrumbview.cpp
#	indra/newview/llbreadcrumbview.h
#	indra/newview/llbreastmotion.cpp
#	indra/newview/llbreastmotion.h
#	indra/newview/llconversationmodel.h
#	indra/newview/lldensityctrl.cpp
#	indra/newview/lldensityctrl.h
#	indra/newview/llface.inl
#	indra/newview/llfloatereditsky.cpp
#	indra/newview/llfloatereditwater.cpp
#	indra/newview/llfloateremojipicker.h
#	indra/newview/llfloaterimsessiontab.cpp
#	indra/newview/llfloaterprofiletexture.cpp
#	indra/newview/llfloaterprofiletexture.h
#	indra/newview/llgesturemgr.cpp
#	indra/newview/llgesturemgr.h
#	indra/newview/llimpanel.cpp
#	indra/newview/llimpanel.h
#	indra/newview/llinventorybridge.cpp
#	indra/newview/llinventorybridge.h
#	indra/newview/llinventoryclipboard.cpp
#	indra/newview/llinventoryclipboard.h
#	indra/newview/llinventoryfunctions.cpp
#	indra/newview/llinventoryfunctions.h
#	indra/newview/llinventorygallery.cpp
#	indra/newview/lllistbrowser.cpp
#	indra/newview/lllistbrowser.h
#	indra/newview/llpanelobjectinventory.cpp
#	indra/newview/llpanelprofile.cpp
#	indra/newview/llpanelprofile.h
#	indra/newview/llpreviewgesture.cpp
#	indra/newview/llsavedsettingsglue.cpp
#	indra/newview/llsavedsettingsglue.h
#	indra/newview/lltooldraganddrop.cpp
#	indra/newview/llurllineeditorctrl.cpp
#	indra/newview/llvectorperfoptions.cpp
#	indra/newview/llvectorperfoptions.h
#	indra/newview/llviewerparceloverlay.cpp
#	indra/newview/llviewertexlayer.cpp
#	indra/newview/llviewertexturelist.cpp
#	indra/newview/macmain.h
#	indra/test/test.cpp
2024-05-22 19:04:52 +02:00
Andrey Kleshchev 2008f87f10 Revert "viewer#819 Avoid reading the same XML file multiple times"
This reverts commit a865d42397.

Reason for revert: viewer#1420, reverting to not hold maint-A (is deepCopy not full?)
2024-05-13 21:25:58 +03:00
Alexander Gavriliuk f9473e8afc secondlife/viewer#1333 BOOL to bool conversion leftovers: ternaries 2024-05-07 10:18:51 +02:00
Andrey Lihatskiy 38c2a5bde9 Merge branch 'marchcat/w-whitespace' into marchcat/x-ws-merge 2024-05-01 08:16:58 +03:00
Andrey Lihatskiy 1b68f71348 #824 Process source files in bulk: replace tabs with spaces, convert CRLF to LF, and trim trailing whitespaces as needed 2024-04-29 07:56:09 +03:00
Andrey Lihatskiy 9bc190c8d3
Merge pull request #1211 from secondlife/marchcat/x-merge
Release (Maint W) -> Maint X merge
2024-04-12 17:05:23 +03:00
Andrey Kleshchev f5a7fba76a viewer-private#226 Unhandled PngError throws application into a loop
png_read_info triggered a PngError, LLAppViewer::frame() handled it
instead of LLPngWrapper::readPng, and since status didn't
change viewer tried to decode image again and again and again.
2024-04-12 16:03:07 +03:00
Andrey Lihatskiy eab5beb54c Merge branch 'main' into marchcat/x-merge
# Conflicts:
#	indra/llimage/llimageworker.cpp
#	indra/llimage/llimageworker.h
#	indra/newview/llcontrolavatar.cpp
#	indra/newview/llfloaterprofiletexture.cpp
#	indra/newview/lloutfitslist.cpp
#	indra/newview/lloutfitslist.h
#	indra/newview/lltexturefetch.cpp
2024-04-12 15:43:34 +03:00
Ansariel d0102af56d Merge branch 'main' of https://github.com/secondlife/viewer into DRTVWR-600-maint-A
# Conflicts:
#	indra/llcommon/llapp.cpp
#	indra/llcommon/llapp.h
#	indra/llimage/llimageworker.cpp
#	indra/llui/llcontainerview.cpp
#	indra/llui/llcontainerview.h
#	indra/llui/llkeywords.cpp
#	indra/llui/lltabcontainer.cpp
#	indra/llui/lltextbase.cpp
#	indra/newview/llappviewer.cpp
#	indra/newview/llfavoritesbar.cpp
#	indra/newview/llfavoritesbar.h
#	indra/newview/llfloaterimnearbychathandler.cpp
#	indra/newview/llfloaterpreference.cpp
#	indra/newview/llhudnametag.h
#	indra/newview/llinventorypanel.cpp
#	indra/newview/llinventorypanel.h
#	indra/newview/llmeshrepository.cpp
#	indra/newview/lloutfitgallery.cpp
#	indra/newview/lloutfitslist.cpp
#	indra/newview/llpaneleditwearable.cpp
#	indra/newview/llpanelprofilepicks.cpp
#	indra/newview/llpanelvoicedevicesettings.h
#	indra/newview/llpreviewscript.cpp
#	indra/newview/llpreviewscript.h
#	indra/newview/llselectmgr.cpp
#	indra/newview/lltranslate.cpp
#	indra/newview/llviewerassetupload.cpp
#	indra/newview/llviewermessage.cpp
2024-04-11 21:59:38 +02:00
Andrey Lihatskiy 71ed19839e Merge branch 'main' into DRTVWR-600-maint-A
# Conflicts:
#	indra/newview/llappviewer.cpp
#	indra/newview/llfloaterchangeitemthumbnail.cpp
#	indra/newview/llpanelprofile.cpp
#	indra/newview/llselectmgr.cpp
#	indra/newview/lltexturectrl.cpp
#	indra/newview/lltexturectrl.h
#	indra/newview/lltooldraganddrop.cpp
#	indra/newview/llviewerdisplay.cpp
#	indra/newview/llvovolume.cpp
2024-03-27 00:45:06 +02:00