[pr-fix][rendering] Request VSync when tearing is off #222

Open
hingeowl wants to merge 1 commit from hingeowl/Darner:pr/vsync-when-tearing-off into main
Contributor

Re-submitted from the previous CodeFloe repository (original commit b4d44f981d38fc13951dd90107e9484597e4f402, preserving original authorship by hamb) so it is not lost after the forge move.

What it changes

  • Requests VSync when tearing is off (was Refs #80 on CodeFloe).

Notes

  • Rebased cleanly onto main (f3840d7).
  • Submitted primarily to preserve the patch on GTA Hub for review/testing; standalone verification on current main has not been run yet.
Re-submitted from the previous CodeFloe repository (original commit `b4d44f981d38fc13951dd90107e9484597e4f402`, preserving original authorship by hamb) so it is not lost after the forge move. ### What it changes - Requests VSync when tearing is off (was Refs #80 on CodeFloe). ### Notes - Rebased cleanly onto `main` (`f3840d7`). - Submitted primarily to preserve the patch on GTA Hub for review/testing; standalone verification on current `main` has not been run yet.
Refs #80

(cherry picked from commit b4d44f981d38fc13951dd90107e9484597e4f402)
First-time contributor

Tested 98f3a84f on a real RTX 4070 Ti SUPER / D3D12 queue, driver 617.14 and Windows 11. I compiled the PR’s present_chain and present_vsync_available functions unchanged into a standalone probe. Its recorder forwards every call to the actual IDXGISwapChain3::Present and records the returned HRESULT. Two separate HWND flip-discard chains, one created with ALLOW_TEARING and one without.

  • Tearing off: the release call site submitted (interval 0, flags 0); the PR submitted (1, 0). Both returned S_OK.
  • Already paced: the PR submitted (0, 0), S_OK. With tearing enabled on a chain supporting it, the PR submitted (0, ALLOW_TEARING), S_OK.
  • Forced the flag on the chain created without tearing support. DXGI returned DXGI_ERROR_INVALID_CALL, then the PR retried (1, 0) successfully and returned tearing_refused=true. This failure came from Windows.
  • With the DLSS-G capability inputs supplied by the fixture, an active proxy without reported VSync support submitted (0, 0); supplying support changed it to (1, 0). Both DXGI calls succeeded. A live DLSS-G proxy and the physical display’s scan-out were outside this test.

This confirms the actual intervals, flags and refusal fallback on hardware. No FPS or visible-tearing claim.

Tested 98f3a84f on a real RTX 4070 Ti SUPER / D3D12 queue, driver 617.14 and Windows 11. I compiled the PR’s present_chain and present_vsync_available functions unchanged into a standalone probe. Its recorder forwards every call to the actual IDXGISwapChain3::Present and records the returned HRESULT. Two separate HWND flip-discard chains, one created with ALLOW_TEARING and one without. - Tearing off: the release call site submitted (interval 0, flags 0); the PR submitted (1, 0). Both returned S_OK. - Already paced: the PR submitted (0, 0), S_OK. With tearing enabled on a chain supporting it, the PR submitted (0, ALLOW_TEARING), S_OK. - Forced the flag on the chain created **without** tearing support. DXGI returned DXGI_ERROR_INVALID_CALL, then the PR retried (1, 0) successfully and returned tearing_refused=true. This failure came from Windows. - With the DLSS-G capability inputs supplied by the fixture, an active proxy without reported VSync support submitted (0, 0); supplying support changed it to (1, 0). Both DXGI calls succeeded. A live DLSS-G proxy and the physical display’s scan-out were outside this test. This confirms the actual intervals, flags and refusal fallback on hardware. No FPS or visible-tearing claim.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'pr/vsync-when-tearing-off:hingeowl-pr/vsync-when-tearing-off'
git switch 'hingeowl-pr/vsync-when-tearing-off'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'hingeowl-pr/vsync-when-tearing-off'
git switch 'hingeowl-pr/vsync-when-tearing-off'
git rebase 'main'
git switch 'main'
git merge --ff-only 'hingeowl-pr/vsync-when-tearing-off'
git switch 'hingeowl-pr/vsync-when-tearing-off'
git rebase 'main'
git switch 'main'
git merge --no-ff 'hingeowl-pr/vsync-when-tearing-off'
git switch 'main'
git merge --squash 'hingeowl-pr/vsync-when-tearing-off'
git switch 'main'
git merge --ff-only 'hingeowl-pr/vsync-when-tearing-off'
git switch 'main'
git merge 'hingeowl-pr/vsync-when-tearing-off'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
TrustNo1/Darner!222
No description provided.