GPU: retry a failing compositor once per second per format #3675

Open
andrewpozdnakov7-jpg wants to merge 1 commit from upstream-pr/3675 into main
andrewpozdnakov7-jpg commented 2026-11-28 05:27:54 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T05:27:54Z.


If compositor creation fails, PresentX shows the primary plane for that frame. A failing format now waits one second before attempting compositor creation again. Primary-plane presentation continues during the delay. The deadline starts when creation returns an error.

The regression injects a creation failure and reads the primary's red pixel from the swap chain. The next frame has the same primary readback and never calls the injected creator. Once the test makes the deadline expire, a real compositor retry succeeds and the expected premultiplied overlay pixel is read back.

On app-local WARP 1.0.22 and Agility 1.620.2, all four focused checks passed with the D3D12 debug switch off and on. Strict GPU Clippy and the asset policy passed.

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

AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:Marvisak/VIctory:issue:5537054751 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3675). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-28T05:27:54Z. --- If compositor creation fails, PresentX shows the primary plane for that frame. A failing format now waits one second before attempting compositor creation again. Primary-plane presentation continues during the delay. The deadline starts when creation returns an error. The regression injects a creation failure and reads the primary's red pixel from the swap chain. The next frame has the same primary readback and never calls the injected creator. Once the test makes the deadline expire, a real compositor retry succeeds and the expected premultiplied overlay pixel is read back. On app-local WARP 1.0.22 and Agility 1.620.2, all four focused checks passed with the D3D12 debug switch off and on. Strict GPU Clippy and the asset policy passed. Please retain the Git author on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding this change into another commit. AI-assisted with OpenAI Codex.
andrewpozdnakov7-jpg commented 2026-11-28 05:35:23 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T05:35:23Z.


Windows CI passed at 07d7048, including Clippy on both build configurations and the repository test job. The two local WARP runs verified primary-plane output on failure and during the cooldown, then correct compositing after retry.

The one-second retry delay applies to the failing format. The next step is maintainer review.

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

AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7234761941 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3675#issuecomment-7234761941). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-28T05:35:23Z. --- [Windows CI](https://github.com/Marvisak/VIctory/actions/runs/46112226566/job/140878094296) passed at `07d7048`, including Clippy on both build configurations and the repository test job. The two local WARP runs verified primary-plane output on failure and during the cooldown, then correct compositing after retry. The one-second retry delay applies to the failing format. The next step is maintainer review. Please retain the Git author on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding this change into another commit. AI-assisted with OpenAI Codex.
andrewpozdnakov7-jpg commented 2026-11-28 05:47:46 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T05:47:46Z.


Test-only commit 6966268 extends the existing PresentX fixture on 07d7048 to alternate RGBA8 and BGRA8 while the RGBA compositor is cooling down.

After the injected RGBA creation failure, BGRA still composes the 64×64 overlay and returns the expected raw BGRA pixel [128, 0, 127, 255]. Returning to RGBA shows its 32×32 primary without another creation attempt. BGRA then reuses the working compositor. Expiring the RGBA deadline lets RGBA compose the overlay and clear its failure entry.

The equivalent generated sequence on 63bcca43 retried RGBA immediately. For a second negative control, I replaced the per-format deadline check with a global cooldown. That made the same sequence return the 32×32 BGRA primary during the RGBA cooldown, so the new check catches that regression too.

The committed fixture passed on app-local WARP 1.0.22 with Agility 1.620.2 and the D3D12 debug switch off and on. Strict all-features GPU Clippy and the staged asset policy passed. Generated textures only.

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

AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7234889794 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3675#issuecomment-7234889794). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-28T05:47:46Z. --- [Test-only commit `6966268`](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/6966268e0c81ea569db89e330f3ef791941becb3) extends the existing PresentX fixture on `07d7048` to alternate RGBA8 and BGRA8 while the RGBA compositor is cooling down. After the injected RGBA creation failure, BGRA still composes the 64×64 overlay and returns the expected raw BGRA pixel `[128, 0, 127, 255]`. Returning to RGBA shows its 32×32 primary without another creation attempt. BGRA then reuses the working compositor. Expiring the RGBA deadline lets RGBA compose the overlay and clear its failure entry. The equivalent generated sequence on `63bcca43` retried RGBA immediately. For a second negative control, I replaced the per-format deadline check with a global cooldown. That made the same sequence return the 32×32 BGRA primary during the RGBA cooldown, so the new check catches that regression too. The committed fixture passed on app-local WARP 1.0.22 with Agility 1.620.2 and the D3D12 debug switch off and on. Strict all-features GPU Clippy and the staged asset policy passed. Generated textures only. Please retain the Git author on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding the test into another commit. AI-assisted with OpenAI Codex.
andrewpozdnakov7-jpg commented 2026-11-28 06:12:39 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T06:12:39Z.


I combined #3675 at 07d7048 with #3682 at 31b94f1 in 714e9e7. Both changes touched the presentation fixture, so I resolved it into one test that submits nine planes through all three states.

On WARP, the injected compositor failure and the next frame during cooldown both stayed at 32×32 and showed the red primary. After expiring the cooldown, the next frame was 64×64 and read back [127, 0, 128, 255] from the eighth plane's blend. The larger ninth plane stayed out of the output dimensions. The cooldown entry cleared after recovery.

The isolated test passed with app-local WARP 1.0.22 and Agility 1.620.2, with the D3D12 debug switch off and on. Strict GPU Clippy and the asset policy passed. A maintainer can use this resolution if both changes are accepted.

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

AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7235150024 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3675#issuecomment-7235150024). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-28T06:12:39Z. --- I combined #3675 at `07d7048` with #3682 at `31b94f1` in [714e9e7](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/714e9e74d9037aeb02c5fa0b4642fd5e48dd7afb). Both changes touched the presentation fixture, so I resolved it into one test that submits nine planes through all three states. On WARP, the injected compositor failure and the next frame during cooldown both stayed at 32×32 and showed the red primary. After expiring the cooldown, the next frame was 64×64 and read back `[127, 0, 128, 255]` from the eighth plane's blend. The larger ninth plane stayed out of the output dimensions. The cooldown entry cleared after recovery. The isolated test passed with app-local WARP 1.0.22 and Agility 1.620.2, with the D3D12 debug switch off and on. Strict GPU Clippy and the asset policy passed. A maintainer can use this resolution if both changes are accepted. Please retain the Git authors on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding this resolution into another commit. AI-assisted with OpenAI Codex.
andrewpozdnakov7-jpg commented 2026-11-28 08:08:53 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T08:08:53Z.


I combined #3693 with the earlier #3675/#3682 integration in ce22778. The only added code is compositor bytecode reuse in host.rs.

On signed app-local WARP, nine test frames alternated RGBA8 and BGRA8 and checked every pixel. After six successful frames I injected a compositor creation error on the next format switch. The primary plane was red on the failed frame and during the cooldown. After expiry the blend returned. Across those nine frames, seven compositors were created and the two shader stages were compiled once each. The same checks passed with the D3D12 debug switch off and on. The plane-limit regression, swap-chain retry test, strict GPU Clippy, and the asset policy also passed.

A maintainer can use the branch if the three changes land together. Please retain the Git authors on cherry-pick or rebase, or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding this resolution into another commit.

AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7236393871 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3675#issuecomment-7236393871). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-28T08:08:53Z. --- I combined #3693 with the [earlier #3675/#3682 integration](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/714e9e74d9037aeb02c5fa0b4642fd5e48dd7afb) in [ce22778](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/ce22778cc78eb667cda43b85ae26b09248db7053). The only added code is compositor bytecode reuse in `host.rs`. On signed app-local WARP, nine test frames alternated RGBA8 and BGRA8 and checked every pixel. After six successful frames I injected a compositor creation error on the next format switch. The primary plane was red on the failed frame and during the cooldown. After expiry the blend returned. Across those nine frames, seven compositors were created and the two shader stages were compiled once each. The same checks passed with the D3D12 debug switch off and on. The plane-limit regression, swap-chain retry test, strict GPU Clippy, and the asset policy also passed. A maintainer can use the branch if the three changes land together. Please retain the Git authors on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding this resolution into another commit. AI-assisted with OpenAI Codex.
futurepro62 commented 2026-11-30 00:05:46 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by futurepro62 on 2026-11-30T00:05:46Z.


Full-suite run on NVIDIA, since this PR has no test report yet. Tested exact head 07d7048 (on its base 63bcca4).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.98.1 MSVC (pinned), dxil.dll from Windows SDK 10.0.26100 (the loader's default), debug.
  • cargo build --workspace --locked, then cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware: 866 passed, 0 failed, 10 ignored.
  • No new #[test] functions in the diff.
  • --skip leaves out tests that fail on main 63bcca4 on this card too, not because of this PR: heap_direct_texture_reads_mark_their_heap_index ends the victory-shader test process with 0xc0000005 (#2571), so without the skip the rest of that crate never reports; dynamic_slots_are_held_until_released, lists_share_a_table_and_copies_keep_their_views and the two stride_tests hit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317); gathers_at_a_level_match_the_hardware fails on lane 0 (#1744).

Not tested

  • AMD (the tests take the default adapter), a release build, the title (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
<!-- greyfinch-sync:Marvisak/VIctory:comment:7264962914 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3675#issuecomment-7264962914). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-30T00:05:46Z. --- Full-suite run on NVIDIA, since this PR has no test report yet. Tested exact head `07d7048` (on its base `63bcca4`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.98.1 MSVC (pinned), `dxil.dll` from Windows SDK 10.0.26100 (the loader's default), debug. - `cargo build --workspace --locked`, then `cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware`: **866 passed, 0 failed, 10 ignored**. - No new `#[test]` functions in the diff. - `--skip` leaves out tests that fail on main `63bcca4` on this card too, not because of this PR: `heap_direct_texture_reads_mark_their_heap_index` ends the `victory-shader` test process with `0xc0000005` (#2571), so without the skip the rest of that crate never reports; `dynamic_slots_are_held_until_released`, `lists_share_a_table_and_copies_keep_their_views` and the two `stride_tests` hit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317); `gathers_at_a_level_match_the_hardware` fails on lane 0 (#1744). **Not tested** - AMD (the tests take the default adapter), a release build, the title (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
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/3675:upstream-pr/3675'
git switch 'upstream-pr/3675'

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