[PR #13906] AtlasEngine: Fix various bugs found in testing #29832

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

Original Pull Request: https://github.com/microsoft/terminal/pull/13906

State: closed
Merged: Yes


In testing the following issues were found in AtlasEngine and fixed:

  1. "Toggle terminal visual effects" action not working
  2. d2dMode failed to work with transparent backgrounds
  3. GetSwapChainHandle() is thread-unsafe due to it being called outside
    of the console lock and with single-threaded Direct2D enabled
  4. 2 swap chain buffers are less performant than 3
  5. Flip-Discard and Present() is less energy efficient than
    Flip-Sequential and Present1()
  6. d2dMode used to copy the front to back buffer for partial rendering,
    but always redraw the entire dirty region anyways
  7. Added support for DirectX 9 hardware
  8. If custom shaders are used not all pixels would be presented

Closes #13906

Validation Steps Performed

  1. Toggling visual effects runs retro shader
    With a custom shader set, it toggles the shader
    Toggling experimental.rendering.software toggles the shader
  2. "backgroundImage": "desktopWallpaper" works with D2D and D3D
  3. Adding a Sleep(3000) in _AttachDxgiSwapChainToXaml doesn't break
    Windows 10 nor Windows 11
  4. Screen animations run at 144 FPS even while moving the window
  5. No weird artefacts during cursor movement or scrolling
  6. No weird artefacts during cursor movement or scrolling
  7. Forcing DirectX 9.3 in dxcpl runs fine
**Original Pull Request:** https://github.com/microsoft/terminal/pull/13906 **State:** closed **Merged:** Yes --- In testing the following issues were found in AtlasEngine and fixed: 1. "Toggle terminal visual effects" action not working 2. `d2dMode` failed to work with transparent backgrounds 3. `GetSwapChainHandle()` is thread-unsafe due to it being called outside of the console lock and with single-threaded Direct2D enabled 4. 2 swap chain buffers are less performant than 3 5. Flip-Discard and `Present()` is less energy efficient than Flip-Sequential and `Present1()` 6. `d2dMode` used to copy the front to back buffer for partial rendering, but always redraw the entire dirty region anyways 7. Added support for DirectX 9 hardware 8. If custom shaders are used not all pixels would be presented Closes #13906 ## Validation Steps Performed 1. Toggling visual effects runs retro shader ✅ With a custom shader set, it toggles the shader ✅ Toggling `experimental.rendering.software` toggles the shader ✅ 2. `"backgroundImage": "desktopWallpaper"` works with D2D ✅ and D3D ✅ 3. Adding a `Sleep(3000)` in `_AttachDxgiSwapChainToXaml` doesn't break Windows 10 ✅ nor Windows 11 ✅ 4. Screen animations run at 144 FPS ✅ even while moving the window ✅ 5. No weird artefacts during cursor movement or scrolling ✅ 6. No weird artefacts during cursor movement or scrolling ✅ 7. Forcing DirectX 9.3 in `dxcpl` runs fine ✅
claunia added the pull-request label 2026-01-31 09:37:08 +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#29832