Present: two planes are put together in the scene's own format, not 8-bit #1709

Open
101Leafy wants to merge 1 commit from upstream-pr/1709 into main
101Leafy commented 2026-11-28 23:41:25 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by 101Leafy on 2026-11-28T23:41:25Z.


With two planes, the scene and the interface were put together into an 8-bit back buffer whatever format the scene was drawn in, so a 10-bit or float scene banded its gradients on the way to the screen.

The composer now draws into the scene's own format. A scene the swap chain cannot take as it is (R9G9B9E5) still composes, into half floats, and the composer is made again when the format changes. This is a fix with no switch.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5545714321 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1709). Originally posted by [101Leafy](https://github.com/101Leafy) on 2026-11-28T23:41:25Z. --- With two planes, the scene and the interface were put together into an 8-bit back buffer whatever format the scene was drawn in, so a 10-bit or float scene banded its gradients on the way to the screen. The composer now draws into the scene's own format. A scene the swap chain cannot take as it is (R9G9B9E5) still composes, into half floats, and the composer is made again when the format changes. This is a fix with no switch.
UwUCammie commented 2026-11-28 23:42:10 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by UwUCammie on 2026-11-28T23:42:10Z.


Could the composer be created only after the resize block in Host::present_planes? On a two-plane format change, p.composer = Some(c) drops the old composer before settle_now(WHY_SYNC). Its views vector owns the shader-visible descriptor heaps that earlier queued presents can still be using. After a successful resize the code then clears the new composer and creates it a second time.

The existing post-resize creation block covers first use as well. Keeping the current composer through the fence and successful resize would preserve those heaps and avoid the second PSO creation. I traced this on 32dedcee; I haven't reproduced a device loss.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7247606273 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1709#issuecomment-7247606273). Originally posted by [UwUCammie](https://github.com/UwUCammie) on 2026-11-28T23:42:10Z. --- Could the composer be created only after the resize block in `Host::present_planes`? On a two-plane format change, `p.composer = Some(c)` drops the old composer before `settle_now(WHY_SYNC)`. Its `views` vector owns the shader-visible descriptor heaps that earlier queued presents can still be using. After a successful resize the code then clears the new composer and creates it a second time. The existing post-resize creation block covers first use as well. Keeping the current composer through the fence and successful resize would preserve those heaps and avoid the second PSO creation. I traced this on `32dedcee`; I haven't reproduced a device loss.
nick0451 commented 2026-11-29 02:46:28 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by nick0451 on 2026-11-29T02:46:28Z.


Tried on an RTX 3090, Windows 11, merged onto main d148613 (#1709 and #1668 each separately). Series S, DLSS performance, a balcony save, 2 rounds each against main.

Both run cleanly: no crash, 24.7 / 25.4 fps against main's 25.6 (inside the noise), the same picture. But neither change takes effect in this setup: the log says display output: compositing two planes (overlay active) … base_format=28 overlay_format=28, so both planes are R8G8B8A8_UNORM. That's neither a 10-bit/float scene (#1709) nor an sRGB plane, 29 or 91 (#1668). Someone whose log shows another base_format or overlay_format is needed to see the difference.

Side note: both branches carry the same three base commits (the 768 KiB policy limit, victory-gpu clippy, checked_div in the LDS cap). On current main, cargo xtask policy fails on lower.rs (704,996 bytes) and clippy stops at manual_checked_ops, so those commits fix real failures there.

🤖 Generated with Claude Code

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7249638568 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1709#issuecomment-7249638568). Originally posted by [nick0451](https://github.com/nick0451) on 2026-11-29T02:46:28Z. --- Tried on an RTX 3090, Windows 11, merged onto main `d148613` (#1709 and #1668 each separately). Series S, DLSS performance, a balcony save, 2 rounds each against main. Both run cleanly: no crash, 24.7 / 25.4 fps against main's 25.6 (inside the noise), the same picture. **But neither change takes effect in this setup:** the log says `display output: compositing two planes (overlay active) … base_format=28 overlay_format=28`, so both planes are R8G8B8A8_UNORM. That's neither a 10-bit/float scene (#1709) nor an sRGB plane, 29 or 91 (#1668). Someone whose log shows another `base_format` or `overlay_format` is needed to see the difference. Side note: both branches carry the same three base commits (the 768 KiB policy limit, victory-gpu clippy, `checked_div` in the LDS cap). On current main, `cargo xtask policy` fails on `lower.rs` (704,996 bytes) and clippy stops at `manual_checked_ops`, so those commits fix real failures there. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
101Leafy commented 2026-11-29 07:17:31 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by 101Leafy on 2026-11-29T07:17:31Z.


Done in 7cab8dd: the composer is now made after the resize block, and a format change drops the old one only once the queued presents have settled. Rebased on current main.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7252381863 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1709#issuecomment-7252381863). Originally posted by [101Leafy](https://github.com/101Leafy) on 2026-11-29T07:17:31Z. --- Done in 7cab8dd: the composer is now made after the resize block, and a format change drops the old one only once the queued presents have settled. Rebased on current main.
trustno1-coder commented 2026-11-29 08:28:23 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-11-29T08:28:23Z.


Thank you! An earlier version of this pull request was merged into main with its original commits and is part of v2026.11.29.01, where you are credited. GitHub does not show it as merged because new commits were pushed here after that merge. It stays open so those newer commits can be looked at next.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7253126278 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1709#issuecomment-7253126278). Originally posted by [trustno1-coder](https://github.com/trustno1-coder) on 2026-11-29T08:28:23Z. --- Thank you! An earlier version of this pull request was merged into main with its original commits and is part of [v2026.11.29.01](https://github.com/trustno1-coder/VIctory-NVIDIA/releases/tag/v2026.11.29.01), where you are credited. GitHub does not show it as merged because new commits were pushed here after that merge. It stays open so those newer commits can be looked at next.
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/1709:upstream-pr/1709'
git switch 'upstream-pr/1709'

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/1709'
git switch 'upstream-pr/1709'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1709'
git switch 'upstream-pr/1709'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1709'
git switch 'main'
git merge --squash 'upstream-pr/1709'
git switch 'main'
git merge --ff-only 'upstream-pr/1709'
git switch 'main'
git merge 'upstream-pr/1709'
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
trustno1-coder/VIctory-NVIDIA!1709
No description provided.