[PR #1611] [CLOSED] Implement DXGI guidance for variable refresh displays #24616

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/1611
Author: @miniksa
Created: 6/25/2019
Status: Closed

Base: masterHead: miniksa-varrefresh


📝 Commits (2)

  • 3ee161b Proposed changes to enable variable refresh rate.
  • ab9aec4 ResizeBuffers needs the same swap chain flag or odd things happen when crossing a DPI boundary.

📊 Changes

3 files changed (+55 additions, -3 deletions)

View changed files

📝 src/renderer/dx/DxRenderer.cpp (+51 -3)
📝 src/renderer/dx/DxRenderer.hpp (+2 -0)
📝 src/renderer/dx/precomp.h (+2 -0)

📄 Description

Summary of the Pull Request

Implements guidance examples from https://docs.microsoft.com/en-us/windows/desktop/direct3ddxgi/variable-refresh-rate-displays to hopefully resolve variable refresh rate display issues.

References

PR Checklist

  • Closes Windows Terminal doesn't have a RC/RES file or an IDI_APPLICATION (#1413)
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed (n/a, visual)
  • Requires documentation to be updated (no)
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: I am a core contributor.

Detailed Description of the Pull Request / Additional comments

  • Adds check during DXGI creation for tearing support
  • Uses tearing check status to apply appropriate flags to swap chain creation, swap chain buffer resize, and presentation calls.
  • Sets presentation sync to 0 to present immediately (per variable refresh doc). I don't remember why I had this as 1. It might become a problem. If it does, we'll conditionally change it back and forth. But reading the docs now, I think 0 is OK.

Validation Steps Performed

  • All manual since we don't have automated visual tests:
    • I checked that everything was looking fine on a standard 1080p 60hz monitor still
    • I changed my second monitor to 150% scaling and dragged the window back and forth with a full line of text at the pwsh prompt to ensure that everything fit correctly as the display size updated and caused refreshes of buffer and scaling sizes

🔄 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/1611 **Author:** [@miniksa](https://github.com/miniksa) **Created:** 6/25/2019 **Status:** ❌ Closed **Base:** `master` ← **Head:** `miniksa-varrefresh` --- ### 📝 Commits (2) - [`3ee161b`](https://github.com/microsoft/terminal/commit/3ee161b6a75c3a81613444c2ae70891740993cb6) Proposed changes to enable variable refresh rate. - [`ab9aec4`](https://github.com/microsoft/terminal/commit/ab9aec45b35221078a7bbee494669d5f114d4d85) ResizeBuffers needs the same swap chain flag or odd things happen when crossing a DPI boundary. ### 📊 Changes **3 files changed** (+55 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/renderer/dx/DxRenderer.cpp` (+51 -3) 📝 `src/renderer/dx/DxRenderer.hpp` (+2 -0) 📝 `src/renderer/dx/precomp.h` (+2 -0) </details> ### 📄 Description <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Implements guidance examples from https://docs.microsoft.com/en-us/windows/desktop/direct3ddxgi/variable-refresh-rate-displays to hopefully resolve variable refresh rate display issues. <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> ## References <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [x] Closes #1413 * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [x] Tests added/passed (n/a, visual) * [x] Requires documentation to be updated (no) * [x] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: I am a core contributor. <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments - Adds check during DXGI creation for tearing support - Uses tearing check status to apply appropriate flags to swap chain creation, swap chain buffer resize, and presentation calls. - Sets presentation sync to 0 to present immediately (per variable refresh doc). I don't remember why I had this as 1. It might become a problem. If it does, we'll conditionally change it back and forth. But reading the docs now, I think 0 is OK. <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed - All manual since we don't have automated visual tests: - I checked that everything was looking fine on a standard 1080p 60hz monitor still - I changed my second monitor to 150% scaling and dragged the window back and forth with a full line of text at the pwsh prompt to ensure that everything fit correctly as the display size updated and caused refreshes of buffer and scaling sizes --- <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:04:23 +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#24616