summaryrefslogtreecommitdiff
path: root/indra
AgeCommit message (Collapse)Author
2025-03-12Fixes: Add guard to prevent shadow texture resize with invalid mRT ↵William Weaver
dimensions after shader changes; **Replaces forced shader refresh with lightweight guard** This commit introduces a guard in `LLPipeline::resizeShadowTexture()` to prevent shadow texture resizing when the shadow render target (mRT) has invalid (zero) dimensions. **This replaces a previous, less efficient approach of forcing a full shader recompile whenever `RenderShadowResolutionScale` was changed in-session.** **Background and Problem:** Previously, the code forced a full shader recompile whenever `RenderShadowResolutionScale` changed in-session (after toggling advanced graphics settings like SSAO or HDR). While this “sledgehammer” approach did fix broken shadow rendering, it unnecessarily thrashed the shader cache and reset many pipeline states. **Solution:** This commit removes the forced shader recompile in favor of a guard check in `LLPipeline::resizeShadowTexture()`. The guard ensures mRT (the shadow render target) has non-zero dimensions before resizing. If mRT is zero for that frame, the resize operation is skipped, and a warning is logged. Once mRT becomes valid (usually in the next frame), the shadow texture is resized successfully without requiring a full shader refresh. **Detailed changes:** - Reverted the binding of `RenderShadowResolutionScale` to `handleSetShaderChanged`. - Restored the original `handleShadowsResized` listener for `RenderShadowResolutionScale` in `llviewercontrol.cpp`. - Added guard checks in `LLPipeline::resizeShadowTexture()` to skip resizing when `mRT->width` or `mRT->height` is zero. - Added logging statements to track how many frames are skipped. **Benefits:** - Prevents shader thrashing while still avoiding shadow corruption. - Shadows now update correctly as soon as mRT dimensions are valid. - Maintains a detailed record of frames skipped. - **Lightweight and targeted interim solution, much less disruptive than a full shader recompile.** Testing: 1. Reproduce the bug as described in the bug report (toggle SSAO, then change RenderShadowResolutionScale). 2. Verify that shadows are no longer broken after these steps. 3. Check the logs for the warning message indicating skipped frames when the bug is triggered. 4. Confirm that under normal operation (without shader changes causing mRT issues), shadow resizing works as expected without excessive warnings. Documentation: No user-facing documentation changes are needed for this interim fix. However, internal developer documentation should note this guard and the ongoing investigation into the root cause. Further Development: This guard is a temporary fix. The root cause of why mRT becomes invalid after shader changes needs to be investigated and resolved. See the bug report for detailed next steps for investigation.
2025-03-11**fix: Correctly update shadows on RenderShadowResolutionScale change**William Weaver
Shadows were not updating correctly after a shader change occurred in-session and then the RenderShadowResolutionScale setting was adjusted. This issue is present in Second Life Release 7.1.12.1355088671 (64-bit) and Second Life Test 7.1.12.250701803 (64-bit). **Specifically, after any shader-related setting is changed in-session (such as toggling Advanced Graphics options like SSAO, HDR, Depth of Field, SSR, Antialiasing, or changing the Graphics Quality preset), subsequent adjustments to `RenderShadowResolutionScale` via Debug Settings result in broken shadow rendering.** The shadows become corrupted or disappear entirely and do not reflect the new resolution scale. Correct shadow rendering is only restored by toggling a shader or restarting the viewer. This behavior is inconsistent with other render settings that update immediately after modification and degrades the user experience when dynamically adjusting shadow quality. This commit changes the signal listener for "RenderShadowResolutionScale" in **llviewercontrol.cpp** from `handleShadowsResized` to `handleSetShaderChanged`. `handleSetShaderChanged` ensures a full shader update, which is necessary for this setting to take effect immediately—similar to other render settings like RenderDeferredSSAO. This change ensures that shadows update correctly and immediately when the resolution scale is changed in Debug Settings, even after prior shader changes in the session, without requiring additional shader toggling or viewer restarts. This provides a smoother and more responsive experience for advanced users adjusting shadow quality in various rendering scenarios. --- **Steps to Reproduce (Bug)** _Verified in Second Life Release 7.1.12.1355088671 (64-bit) and Second Life Test 7.1.12.250701803 (64-bit):_ 1. **Fresh Install Preparation:** Ensure a clean Second Life installation state. Ideally, uninstall and reinstall the viewer or clear/rename all folders in `AppData\Local\Second Life` and `AppData\Roaming\Second Life` before launching. 2. Launch the Second Life Viewer and log in. 3. Enable the Debug Menu: Open Preferences (Ctrl+P), go to the "Advanced" tab, and check "Show Advanced Settings". 4. Open Debug Settings: Click the "Advanced" menu in the menu bar and select "Debug Settings." 5. Locate the `RenderShadowResolutionScale` setting (which should be set to 1.0 on a clean install). 6. Initially, changing `RenderShadowResolutionScale` at this point may not exhibit the bug. Proceed to the next steps to reliably trigger it. 7. **Trigger the Bug:** Open Preferences (Ctrl+P) again and go to the "Graphics" tab. 8. Click the "Advanced Settings" button. 9. **Toggle *any* of the following Advanced Graphics options:** - Screen Space Ambient Occlusion - HDR and Emissive Rendering - Depth of Field - Screen Space Reflections - Antialiasing - *Alternatively*, change the "Graphics Quality" preset slider (e.g., Low to Ultra or any other change). 10. Return to the Debug Settings floater. 11. Change the value of `RenderShadowResolutionScale` to a different value (e.g., from 1.0 to 0.5 or 2.0). 12. **Observe the Bug:** Notice that shadow rendering does not update correctly—shadows become corrupted or disappear. 13. **Workaround (in buggy version):** To restore correct shadow rendering without the fix, either: - Toggle a different shader (e.g., change graphics presets in Preferences, or toggle SSAO, SSR, etc.), or - Restart the viewer. **Steps to Verify (Fix):** 1. Build the viewer with this commit applied. 2. Launch the viewer and log in. 3. Repeat steps 1–9 from "Steps to Reproduce (Bug)" to ensure an Advanced Graphics setting is toggled before proceeding. 4. Open Debug Settings and locate `RenderShadowResolutionScale`. 5. Change the value of `RenderShadowResolutionScale` (e.g., from 1.0 to 0.5 or 2.0). 6. **Verify the Fix:** Confirm that shadow rendering updates immediately and correctly—even after toggling Advanced Graphics settings—with the shadows visibly changing resolution in real time. No shader toggling or viewer restart is required. --- - No specific regression testing is required for this targeted fix. However, standard viewer functionality should be verified after building to ensure no unintended side effects have been introduced. Pay particular attention to shadow rendering in various environments and lighting conditions to confirm the fix has not negatively impacted other shadow-related features. --- - No documentation changes are needed as this is a bug fix for an existing debug setting.
2025-03-01Merge pull request #3634 from secondlife/release/2024.12-ForeverFPSJonathan "Geenz" Goodman
Update develop with ForeverFPS
2025-03-01Merge pull request #3626 from secondlife/rider/transfer_messageJonathan "Geenz" Goodman
https://github.com/secondlife/server/issues/1493 New notification for transfer ownership
2025-03-01Merge pull request #3623 from secondlife/rider/server_autopilotJonathan "Geenz" Goodman
https://github.com/secondlife/server/issues/966 Honor flag sent by server indicating server side autopilot is engaged. When flag is set allow server to update local avatar rotation.
2025-02-26Server Issue #1493: New notification message for llTransferOwnership.Rider Linden
2025-02-26Private Issue #297: Code review feedback.Rider Linden
2025-02-26Private Issue #297: Accept new flags in ScriptTeleportRequest message. Flags ↵Rider Linden
indicate if the world map should be opened and focused.
2025-02-26Issue #2687: Honor flag sent by server indicating server side autopilot is ↵Rider Linden
engaged. When flag is set allow sever to update local avatar rotation.
2025-02-26Revert "#2639 GPU test twice to fix misreported bandwidth (#3558)"Andrey Kleshchev
This reverts commit b0d80552b3177269eb24ef9a1e0d58a98d95a96f.
2025-02-26#3270 use TELEPORT_LOCAL when teleporting within a region via landmarkMaxim Nikolenko
2025-02-25Mitigation for #3331Jonathan "Geenz" Goodman
2025-02-24Merge branch 'release/2024.12-ForeverFPS' into geenz/eep-setting-fixesJonathan "Geenz" Goodman
2025-02-24Backout minimal+ change.Jonathan "Geenz" Goodman
2025-02-24#3332 Remake glyph count into cache generationAndrey Kleshchev
1. Cover reset with 'generation' 2. Fix lapse of judgement with mLastFontGlyphCount, it should have been saved before render(), not after
2025-02-23Quick fix for null pointer in LLDrawPoolWaterJonathan "Geenz" Goodman
2025-02-23CleanupJonathan "Geenz" Goodman
2025-02-22Accidental double linearization, try roughness ^2 for water punctual light.Jonathan "Geenz" Goodman
2025-02-22viewer-private#398 Fix constant asset rerequestsAndrey Kleshchev
2025-02-19#3581 #3563 Fix callback deletion not workingAndrey Kleshchev
2025-02-18#3511 fix for PBR skies being too bright on Low GraphicsMaxim Nikolenko
2025-02-18#3557 Waves not applying without Transparent WaterAndrey Kleshchev
2025-02-15#2639 GPU test twice to fix misreported bandwidth (#3558)Andrey Kleshchev
A workaround, hopefully temporary. First test returns half the throughput, do two tests. May be caused by driver, may be some 'energy saving', will need to be checked later. It was working the same way prior to ExtraFPS, but viewer was running an extra CPU test.
2025-02-14Switch from GL_RGB16F to GL_R11F_G11F_B10F for probes (#3562)Jonathan "Geenz" Goodman
* #3561 Switch from GL_RGB16F to GL_R11F_G11F_B10F for reflection probes to help reduce memory bandwidth and VRAM pressure.
2025-02-13Merge pull request #3549 from secondlife/marchcat/foreverfps-xcode-16Andrey Lihatskiy
Update ForeverFPS build to use macos15/xcode16.1
2025-02-13Follow-up fixes from developAndrey Lihatskiy
2025-02-13Fix xcode16 build errorsAndrey Lihatskiy
2025-02-13viewer-private#394 Ensure correct item id is used on macMaxim Nikolenko
2025-02-12viewer-private#396 Use benefits for picks countAndrey Kleshchev
2025-02-12viewer-private#395 Fix voice not reconnectingAndrey Kleshchev
2025-02-12#3210 Fix for "Texture will be downscaled" log message happening too oftenMaxim Nikolenko
2025-02-11#3332 Fix buffers not accounting for dynamic cache valuesAndrey Kleshchev
And fix previous lapse of judgement with GLYPH_BATCH_SIZE
2025-02-11Additional water fixes and tweaks. (#3524)Jonathan "Geenz" Goodman
* Incorporation of feedback for #3456
2025-02-10#3332 Font issues with multy-byte and multy-glyps charactersAndrey Kleshchev
2025-02-10#3332 Issues with text buffer updatesAndrey Kleshchev
2025-02-07#3332 Switching screens can break text renderingAndrey Kleshchev
2025-02-07viewer-private#375 add more logging in attempt to get more infoMaxim Nikolenko
2025-02-07#3505 Fix updateMenu() being called too frequently on fetch callbackAndrey Kleshchev
The actual problem is fetch dumping thousands of callbacks, but this should mitigate the problem
2025-02-07#3505 Make inventory run less content checksAndrey Kleshchev
2025-02-07#3505 Make checkFolderForContentsOfType cheaperAndrey Kleshchev
2025-02-07Water Exclusion Surfaces (#3517)Jonathan "Geenz" Goodman
* #3455 Add support for water exclusion surfaces
2025-02-06Add some haze to the distance on water. (#3508)Jonathan "Geenz" Goodman
* #3507 Add distance haze to water to get us closer to 6.6.17's appearance.
2025-02-05Merge pull request #3497 from secondlife/rye/forever-3445Rye
Fix media failing to function on PBR materials (#3445)
2025-02-04#3346 crash at LLConversationItemSession::clearAndDeparentModelsMaxim Nikolenko
2025-02-03Fix media failing to function on PBR materials (#3445)Rye
2025-01-31#3491 Rename all uses of Release Candidate to BetaMaxim Nikolenko
2025-01-30#3456 Water improvements to get us closer to 6.6.17 (#3490)Jonathan "Geenz" Goodman
* A lot of tweaking for water. * Get water much closer to 6.6.17. This won't produce 1:1 results, but it should be much closer to where we once were.
2025-01-30#3400 Reimplement LLError marker for crash statisticsAndrey Kleshchev
2025-01-29viewer#2576 Crash when banning a residentMaxim Nikolenko
Co-authored-by: Andrey Kleshchev <andreykproductengine@lindenlab.com>
2025-01-28#3466 Crash at LLScrollingPanelParam::drawMaxim Nikolenko