[PR #6551] [MERGED] Enable hot reload of renderer settings that aren't already hot reload capable #26731

Open
opened 2026-01-31 09:17:48 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/6551
Author: @miniksa
Created: 6/17/2020
Status: ✅ Merged
Merged: 6/19/2020
Merged by: @undefined

Base: master ← Head: dev/miniksa/hot_reload


📝 Commits (4)

  • 98a6d2b Add hot reload of renderer settings that escaped that treatment in the past.
  • 8cd6733 drop the pixel shader buffer when dropping other resources.
  • 9c516d4 try/catch around the functions that are noexcept.
  • c3946b4 Don't use atomic, use the LockForWriting that guarantees it can't go at the same time as a painting frame. More granular locking is a good idea, but this isn't the way to do it at this time.

📊 Changes

3 files changed (+61 additions, -11 deletions)

View changed files

📝 src/cascadia/TerminalControl/TermControl.cpp (+21 -6)
📝 src/renderer/dx/DxRenderer.cpp (+39 -5)
📝 src/renderer/dx/DxRenderer.hpp (+1 -0)

📄 Description

Summary of the Pull Request

PR Checklist

Detailed Description of the Pull Request / Additional comments

  • I found four settings that weren't hot reloadable with the 3927 comment above them:
  1. Experimental retro terminal effect
  2. Experimental software rendering
  3. Experimental full repaint rendering
  4. Antialiasing settings for text

I made them all hot reloadable by telling the TermControl to propagate them on settings change to the DxEngine.
Then I set up the DxEngine inside the setters to only set them if they changed. And if they do change, to trigger a full repaint and/or a complete drop and recreate of the entire DX device chain (as would happen if it were lost for another reason like a user-mode graphics failure, disconnected display, etc.)
I made the boolean an atomic because the settings can be coming in off of another thread (the XAML eventing one) and the renderer is picking the status up on its thread at the top of the BeginPaint frame.

Validation Steps Performed

  • Opened it up and toggled all the settings while staring at PowerShell
  • Opened it up and toggled all the settings while staring at something intensive like a cacafire fire

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/6551 **Author:** [@miniksa](https://github.com/miniksa) **Created:** 6/17/2020 **Status:** ✅ Merged **Merged:** 6/19/2020 **Merged by:** [@undefined](undefined) **Base:** `master` ← **Head:** `dev/miniksa/hot_reload` --- ### 📝 Commits (4) - [`98a6d2b`](https://github.com/microsoft/terminal/commit/98a6d2b36548c5d27ebca4790fff5385e9da5e4d) Add hot reload of renderer settings that escaped that treatment in the past. - [`8cd6733`](https://github.com/microsoft/terminal/commit/8cd67333890fb8c6a153cdd616e915cacb6c4c12) drop the pixel shader buffer when dropping other resources. - [`9c516d4`](https://github.com/microsoft/terminal/commit/9c516d472ebaed8440e6386c55900c09bf8b09cb) try/catch around the functions that are noexcept. - [`c3946b4`](https://github.com/microsoft/terminal/commit/c3946b44cf8272279a9a03b9e0708d609a59d032) Don't use atomic, use the LockForWriting that guarantees it can't go at the same time as a painting frame. More granular locking is a good idea, but this isn't the way to do it at this time. ### 📊 Changes **3 files changed** (+61 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalControl/TermControl.cpp` (+21 -6) 📝 `src/renderer/dx/DxRenderer.cpp` (+39 -5) 📝 `src/renderer/dx/DxRenderer.hpp` (+1 -0) </details> ### 📄 Description ## Summary of the Pull Request ## PR Checklist * [x] Closes #3927 * [x] I work here. * [x] Tested manually. * [x] Requires documentation to be updated: (generate doc bug here) * [x] Am core contributor. ## Detailed Description of the Pull Request / Additional comments - I found four settings that weren't hot reloadable with the 3927 comment above them: 1. Experimental retro terminal effect 2. Experimental software rendering 3. Experimental full repaint rendering 4. Antialiasing settings for text I made them all hot reloadable by telling the `TermControl` to propagate them on settings change to the `DxEngine`. Then I set up the `DxEngine` inside the setters to only set them if they changed. And if they do change, to trigger a full repaint and/or a complete drop and recreate of the entire DX device chain (as would happen if it were lost for another reason like a user-mode graphics failure, disconnected display, etc.) I made the boolean an atomic because the settings can be coming in off of another thread (the XAML eventing one) and the renderer is picking the status up on its thread at the top of the BeginPaint frame. ## Validation Steps Performed - [x] Opened it up and toggled all the settings while staring at PowerShell - [x] Opened it up and toggled all the settings while staring at something intensive like a `cacafire` fire --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:17:48 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#26731