GPU: count a frame when the swap chain accepts the present #1151

Open
UwUCammie wants to merge 2 commits from upstream-pr/1154 into main
UwUCammie commented 2026-11-25 21:52:19 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by UwUCammie on 2026-11-25T21:52:19Z.


The FPS counter advances even when the swap chain returns a failure or an occlusion status. The caller also receives a result indicating that the frame was shown.

Count a frame only when Present returns S_OK. A transition to occlusion produces one warning. The first failing HRESULT still goes through the error diagnostic added in b9011c9, with the original frame number. The regression feeds the meter two successes separated by an occlusion and a repeated error. Only the two successes reach the counter.

Cross-built the Windows GPU tests and ran the original host tests under Wine 11.22 on an RX 7900 XT with RADV 26.3.1 (38 passed, one ignored). The meter regression also passed after merging dc4c0fc.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6614492998 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1154). Originally posted by [UwUCammie](https://github.com/UwUCammie) on 2026-11-25T21:52:19Z. --- The FPS counter advances even when the swap chain returns a failure or an occlusion status. The caller also receives a result indicating that the frame was shown. Count a frame only when `Present` returns `S_OK`. A transition to occlusion produces one warning. The first failing HRESULT still goes through the error diagnostic added in `b9011c9`, with the original frame number. The regression feeds the meter two successes separated by an occlusion and a repeated error. Only the two successes reach the counter. Cross-built the Windows GPU tests and ran the original host tests under Wine 11.22 on an RX 7900 XT with RADV 26.3.1 (38 passed, one ignored). The meter regression also passed after merging `dc4c0fc`.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1154:upstream-pr/1154'
git switch 'upstream-pr/1154'

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 'upstream-pr/1154'
git switch 'upstream-pr/1154'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1154'
git switch 'upstream-pr/1154'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1154'
git switch 'main'
git merge --squash 'upstream-pr/1154'
git switch 'main'
git merge --ff-only 'upstream-pr/1154'
git switch 'main'
git merge 'upstream-pr/1154'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
fxceless/victory-fork!1151
No description provided.