GPU: present packed-float primary planes through the compositor #3784

Open
andrewpozdnakov7-jpg wants to merge 3 commits from upstream-pr/3784 into main
andrewpozdnakov7-jpg commented 2026-11-28 19:17:13 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T19:17:13Z.


A single R11G11B10_FLOAT or R9G9B9E5_SHAREDEXP primary plane currently produces no frame because neither format can be copied into a DXGI swap chain. A shader-readable plane in either format can be drawn into the existing linear RGBA16F swap-chain format. RGBA8 continues to use the direct copy.

This brings in upipibi's finding, with their original test and fix commits retained. I extended the regression to check every pixel in five generated frames, including format changes back to RGBA8 and back to FP16. Both packed formats preserve four different quadrants, values above 1, and opaque alpha.

On Windows with WARP, the extended test reaches the RGBA8 control and then fails at the first packed-float frame before the fix. Both presenter tests pass with the fix. The readback matches all 5,120 RGBA pixels, and strict all-feature GPU Clippy and the asset policy passed. Upipibi also ran the extended test on an RTX 3070. Both presenter tests passed in three runs on the hardware and three runs with WARP requested. Their pre-fix control again failed on the first packed-float frame. Independent RTX 3070 run

Please retain the Git authors on cherry-pick or rebase, or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding the test extension into another commit.

Test extension AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:Marvisak/VIctory:issue:5543708089 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3784). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-28T19:17:13Z. --- A single R11G11B10_FLOAT or R9G9B9E5_SHAREDEXP primary plane currently produces no frame because neither format can be copied into a DXGI swap chain. A shader-readable plane in either format can be drawn into the existing linear RGBA16F swap-chain format. RGBA8 continues to use the direct copy. This brings in upipibi's [finding](https://github.com/Marvisak/VIctory/issues/1633#issuecomment-7244235458), with their original test and fix commits retained. I extended the regression to check every pixel in five generated frames, including format changes back to RGBA8 and back to FP16. Both packed formats preserve four different quadrants, values above 1, and opaque alpha. On Windows with WARP, the extended test reaches the RGBA8 control and then fails at the first packed-float frame before the fix. Both presenter tests pass with the fix. The readback matches all 5,120 RGBA pixels, and strict all-feature GPU Clippy and the asset policy passed. Upipibi also ran the extended test on an RTX 3070. Both presenter tests passed in three runs on the hardware and three runs with WARP requested. Their pre-fix control again failed on the first packed-float frame. [Independent RTX 3070 run](https://github.com/Marvisak/VIctory/pull/3784#issuecomment-7244961269) Please retain the Git authors on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding the test extension into another commit. Test extension AI-assisted with OpenAI Codex.
andrewpozdnakov7-jpg commented 2026-11-28 19:22:14 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T19:22:14Z.


Windows CI passed on feb2db7, including both Clippy configurations and the workspace tests. On local WARP, all 5,120 pixels in the five-frame readback matched, including HDR values in both packed formats and the RGBA8 controls. The new regression reaches the RGBA8 frame on the pre-fix revision and then fails at the first R11G11B10_FLOAT frame.

The next step is maintainer review. The two source commits from upipibi are kept with their original Git authorship. Please also retain the test extension's Git author on cherry-pick or rebase, or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding it into another commit.

Test extension AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7244493115 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3784#issuecomment-7244493115). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-28T19:22:14Z. --- [Windows CI](https://github.com/Marvisak/VIctory/actions/runs/46180371988/job/141088336731) passed on feb2db7, including both Clippy configurations and the workspace tests. On local WARP, all 5,120 pixels in the five-frame readback matched, including HDR values in both packed formats and the RGBA8 controls. The new regression reaches the RGBA8 frame on the pre-fix revision and then fails at the first R11G11B10_FLOAT frame. The next step is maintainer review. The two source commits from upipibi are kept with their original Git authorship. Please also retain the test extension's Git author on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding it into another commit. Test extension AI-assisted with OpenAI Codex.
upipibi commented 2026-11-28 20:00:08 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by upipibi on 2026-11-28T20:00:08Z.


RTX 3070 (616.56, Windows 11 Pro 10.0.26100, debug) run of the extended test at feb2db7.

cargo test --locked -p victory-gpu --lib --features diagnostics -- host::present_plane_tests::, which runs packed_float_single_planes_are_presented and compositor_failure_presents_primary_in_the_same_frame:

  • Hardware, 3 runs: 2 passed, 0 failed, 0 ignored each.
  • VICTORY_D3D12_WARP=1, 3 runs: 2 passed, 0 failed, 0 ignored each. At this head the test doesn't print the adapter. These runs took 0.08-0.09 s against 0.34-0.37 s on the card.
  • Control: git revert --no-commit bc80900 (the presenter change only; git diff --stat HEAD: host.rs, 3 insertions, 25 deletions), hardware. Result: 0 passed, 1 failed, frame 1 was not presented at host.rs:4293. That is the first packed-float frame after the RGBA8 control, as in the description's WARP control.

Not tested: a title run, other NVIDIA drivers, release, clippy.

AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7244961269 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3784#issuecomment-7244961269). Originally posted by [upipibi](https://github.com/upipibi) on 2026-11-28T20:00:08Z. --- RTX 3070 (616.56, Windows 11 Pro 10.0.26100, debug) run of the extended test at `feb2db7`. `cargo test --locked -p victory-gpu --lib --features diagnostics -- host::present_plane_tests::`, which runs `packed_float_single_planes_are_presented` and `compositor_failure_presents_primary_in_the_same_frame`: - **Hardware, 3 runs:** 2 passed, 0 failed, 0 ignored each. - **`VICTORY_D3D12_WARP=1`, 3 runs:** 2 passed, 0 failed, 0 ignored each. At this head the test doesn't print the adapter. These runs took 0.08-0.09 s against 0.34-0.37 s on the card. - **Control:** `git revert --no-commit bc80900` (the presenter change only; `git diff --stat HEAD`: `host.rs`, 3 insertions, 25 deletions), hardware. Result: 0 passed, 1 failed, `frame 1 was not presented` at `host.rs:4293`. That is the first packed-float frame after the RGBA8 control, as in the description's WARP control. Not tested: a title run, other NVIDIA drivers, release, clippy. AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this.
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/3784:upstream-pr/3784'
git switch 'upstream-pr/3784'

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