GPU: composite multiple PresentX planes (Series S UI) #1997

Manually merged
github merged 13 commits from gh-pr/1997/head into gh-pr/1997/base 2026-11-26 04:51:04 +00:00
Owner

@⁠Calvix2k on GitHub · 2026-11-25 02:37 UTC · original
Calvix2k:codex/present-planes-211 → main · +699 −54 · 2 files · 13 commits · merged 2026-11-25 21:52 UTC

Re-lands Yaekai's #211 (with swarm's and Blitz Studios' follow-up commits from the same branch) on main 940d32f. #211 was closed by the automated asset-policy check; the change is code only — no assets, no new dependencies — and cargo xtask policy passes on this head.

Why

PresentX receives several planes, but the host presents only the first (queue.rs: *plane.resources). A Series S title presents the scene at 1080p in plane 0 and its UI at 4K in plane 1, so the UI (account picker, menus, HUD) never reaches the swap chain: the window shows the scene or, before the world, black. #904 has the reproduction data; on my RX 7800 XT / Windows 10 the same build shows a black window on Series S until this compositor is in.

What

  • queue.rs::present gathers every plane's resource and current state instead of the first.
  • host.rs gains a small compositor: a fullscreen-triangle Texture2D shader (compiled with D3DCompile, no new dependency) draws plane 0 opaque and later planes alpha-blended into a swap chain sized to the largest plane, so a 1080p scene under a 4K UI composites 1:1. The root signature is serialized explicitly and the pipeline states are built once per format.
  • Single-plane presents keep the copy path untouched; if the compositor cannot be created, presentation falls back to the single-plane copy and logs why (tested).

Verification

  • cargo test -p victory-gpu --features diagnostics --lib: 147 passed, 1 failed — the one failure is draw::tests::a_texture_written_in_one_format_reads_in_another_through_a_placed_view, which fails identically on unmodified main 940d32f here (checked separately).
  • host::tests::present_compositor_builds_both_pipeline_states and host::present_plane_tests::compositor_failure_preserves_single_plane_presentation pass on this host, as do the composited-pixel tests for the recovery path.
  • In the game: with this compositor ported into a fork build, --console series-s shows the account picker and menus (1080p scene plane under a 4K UI plane) where main shows a black window. That run is what the plane sizes in the PR description come from (0: 1920×1080, 1: 3840×2160, both format 28).

Known follow-up (not in this PR)

With the UI visible, Series S then reaches the placed-descriptor crash tracked in #1118 (descriptor::record on a handle in a GPU-only page). This PR does not change descriptor memory; it only makes the planes that the title already presents reach the screen.

Authors of the commits are Yaekai, swarm and Blitz Studios; I only rebased them onto current main, resolved nothing (the cherry-picks applied cleanly) and ran the checks above.

**@⁠Calvix2k** on GitHub · 2026-11-25 02:37 UTC · [original](https://github.com/Marvisak/VIctory/pull/1997) `Calvix2k:codex/present-planes-211` → `main` · +699 −54 · 2 files · 13 commits · merged 2026-11-25 21:52 UTC Re-lands Yaekai's #211 (with swarm's and Blitz Studios' follow-up commits from the same branch) on `main` `940d32f`. #211 was closed by the automated asset-policy check; the change is code only — no assets, no new dependencies — and `cargo xtask policy` passes on this head. ## Why `PresentX` receives several planes, but the host presents only the first (`queue.rs`: `*plane.resources`). A Series S title presents the scene at 1080p in plane 0 and its UI at 4K in plane 1, so the UI (account picker, menus, HUD) never reaches the swap chain: the window shows the scene or, before the world, black. #904 has the reproduction data; on my RX 7800 XT / Windows 10 the same build shows a black window on Series S until this compositor is in. ## What - `queue.rs::present` gathers every plane's resource and current state instead of the first. - `host.rs` gains a small compositor: a fullscreen-triangle `Texture2D` shader (compiled with `D3DCompile`, no new dependency) draws plane 0 opaque and later planes alpha-blended into a swap chain sized to the largest plane, so a 1080p scene under a 4K UI composites 1:1. The root signature is serialized explicitly and the pipeline states are built once per format. - Single-plane presents keep the copy path untouched; if the compositor cannot be created, presentation falls back to the single-plane copy and logs why (tested). ## Verification - `cargo test -p victory-gpu --features diagnostics --lib`: 147 passed, 1 failed — the one failure is `draw::tests::a_texture_written_in_one_format_reads_in_another_through_a_placed_view`, which fails identically on unmodified `main 940d32f` here (checked separately). - `host::tests::present_compositor_builds_both_pipeline_states` and `host::present_plane_tests::compositor_failure_preserves_single_plane_presentation` pass on this host, as do the composited-pixel tests for the recovery path. - In the game: with this compositor ported into a fork build, `--console series-s` shows the account picker and menus (1080p scene plane under a 4K UI plane) where `main` shows a black window. That run is what the plane sizes in the PR description come from (0: 1920×1080, 1: 3840×2160, both format 28). ## Known follow-up (not in this PR) With the UI visible, Series S then reaches the placed-descriptor crash tracked in #1118 (`descriptor::record` on a handle in a GPU-only page). This PR does not change descriptor memory; it only makes the planes that the title already presents reach the screen. Authors of the commits are Yaekai, swarm and Blitz Studios; I only rebased them onto current `main`, resolved nothing (the cherry-picks applied cleanly) and ran the checks above.
When the multi-plane compositor cannot be created, the frame was dropped
(`return None`). Show plane 0 through the single-plane copy path instead,
and keep retrying the compositor on the next present. The test now asserts
that the failing frame is presented, not skipped.
(cherry picked from commit 5a1b9ad5ae79f1e7b0bb6e29ea89af928d43e6bf)
(cherry picked from commit 660568e673b20f333bc9c8c2d37267190b3b1093)
The ported fix in the previous commit was written against a `host_resource`
that lent its host texture; on `main` it returns a clone, so the composed
list cannot hold `&ID3D12Resource` across the `host.present` call. Hold the
clones and lend them to `present`; the per-texture state bookkeeping is
unchanged.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:51:03 +00:00
github manually merged commit fdc5ff5c9e into gh-pr/1997/base 2026-11-26 04:51:04 +00:00
Author
Owner

@⁠DesertGamer on GitHub · 2026-11-25 02:40 UTC · original

VIctory V2: community PRs, merged and tested

Open PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch.

Where it stands today: launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1).

⚠️ Entering the world on a real GPU can hang it and make Windows reset the driver. Try it at your own risk.

Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help:
https://DesertGamer/VIctory-V2

Unofficial community fork of Marvisak/VIctory, GPL-3.0.

**@⁠DesertGamer** on GitHub · 2026-11-25 02:40 UTC · [original](https://github.com/Marvisak/VIctory/pull/1997#issuecomment-7151034681) ### VIctory V2: community PRs, merged and tested Open PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch. **Where it stands today:** launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1). :warning: Entering the world on a real GPU can hang it and make Windows reset the driver. Try it at your own risk. Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help: https://DesertGamer/VIctory-V2 *Unofficial community fork of Marvisak/VIctory, GPL-3.0.*
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-25 02:49 UTC · original

I checked the compositor-initialization failure path on d732465f64dd868dd0d71811d5596519cdcba889 with WARP. The original test checks recovery on a later frame. In the failed frame itself, the two-plane call returns without presenting the primary plane.

5a1b9ad is one commit on that exact head. It selects the primary plane before sizing the swap chain when compositor setup fails.

The same synthetic test uses a red 32×32 scene and a premultiplied blue 64×64 overlay. At the injected setup failure, the original head skipped the frame. The fixed build presented the 32×32 scene and read back [255, 0, 0, 255]. The next two-plane frame initialized the compositor, resized to 64×64, and read back [127, 0, 128, 255]. Focused test 10/10, full WARP GPU suite 148 passed and 2 ignored, strict GPU Clippy and asset policy passed.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-25 02:49 UTC · [original](https://github.com/Marvisak/VIctory/pull/1997#issuecomment-7151240824) I checked the compositor-initialization failure path on d732465f64dd868dd0d71811d5596519cdcba889 with WARP. The original test checks recovery on a later frame. In the failed frame itself, the two-plane call returns without presenting the primary plane. [5a1b9ad](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/5a1b9ad5ae79f1e7b0bb6e29ea89af928d43e6bf) is one commit on that exact head. It selects the primary plane before sizing the swap chain when compositor setup fails. The same synthetic test uses a red 32×32 scene and a premultiplied blue 64×64 overlay. At the injected setup failure, the original head skipped the frame. The fixed build presented the 32×32 scene and read back [255, 0, 0, 255]. The next two-plane frame initialized the compositor, resized to 64×64, and read back [127, 0, 128, 255]. Focused test 10/10, full WARP GPU suite 148 passed and 2 ignored, strict GPU Clippy and asset policy passed.
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-25 02:56 UTC · original

A separate PresentX case on d732465f64dd868dd0d71811d5596519cdcba889: two distinct title texture resources can alias one host texture. With one alias per plane, the original path records the temporary COPY_SOURCE state for the second alias and restores it last.

660568e is one commit on that exact head. It reuses the original state for each alias, restores it once, and records one pair of compositor barriers per host texture while still drawing each plane.

The WARP regression clears a real shared BGRA8 render target and submits both title aliases through PresentX. The original head leaves the shared state at COPY_SOURCE (0x800); the fixed build leaves RENDER_TARGET (0x4). Focused test 10/10, full WARP GPU suite 149 passed and 2 ignored. Strict GPU Clippy and asset policy passed. This change merges cleanly with 5a1b9ad.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-25 02:56 UTC · [original](https://github.com/Marvisak/VIctory/pull/1997#issuecomment-7151390086) A separate PresentX case on d732465f64dd868dd0d71811d5596519cdcba889: two distinct title texture resources can alias one host texture. With one alias per plane, the original path records the temporary COPY_SOURCE state for the second alias and restores it last. [660568e](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/660568e673b20f333bc9c8c2d37267190b3b1093) is one commit on that exact head. It reuses the original state for each alias, restores it once, and records one pair of compositor barriers per host texture while still drawing each plane. The WARP regression clears a real shared BGRA8 render target and submits both title aliases through PresentX. The original head leaves the shared state at COPY_SOURCE (0x800); the fixed build leaves RENDER_TARGET (0x4). Focused test 10/10, full WARP GPU suite 149 passed and 2 ignored. Strict GPU Clippy and asset policy passed. This change merges cleanly with 5a1b9ad.
Author
Owner

@⁠upipibi on GitHub · 2026-11-25 03:00 UTC · original

Ran on Windows 11 with an RTX 3070 (Ampere, driver 616.56), debug build, at d732465. victory-shader: 244 passed, 3 failed, 3 ignored. The 3 are #1744's NVIDIA failures on main (the two stride_tests heap-buffer reads and gathers_at_a_level_match_the_hardware). victory-gpu: 142 passed, 2 failed, with only the two NVIDIA heap-cap failures main also has (dynamic_slots_are_held_until_released, lists_share_a_table_and_copies_keep_their_views). Same as main on this hardware. Not run: a title.

AI-assisted (Claude Code).

**@⁠upipibi** on GitHub · 2026-11-25 03:00 UTC · [original](https://github.com/Marvisak/VIctory/pull/1997#issuecomment-7151491945) Ran on Windows 11 with an RTX 3070 (Ampere, driver 616.56), debug build, at `d732465`. `victory-shader`: 244 passed, 3 failed, 3 ignored. The 3 are #1744's NVIDIA failures on `main` (the two `stride_tests` heap-buffer reads and `gathers_at_a_level_match_the_hardware`). `victory-gpu`: 142 passed, 2 failed, with only the two NVIDIA heap-cap failures `main` also has (`dynamic_slots_are_held_until_released`, `lists_share_a_table_and_copies_keep_their_views`). Same as `main` on this hardware. Not run: a title. AI-assisted (Claude Code).
Author
Owner

@⁠akimfomin on GitHub · 2026-11-25 03:48 UTC · original

Calvix2k, PortBridge checked the source SRV selection at d732465f. It shares the swap-chain policy and maps typed R16G16B16A16_UNORM and SNORM to FLOAT plus R8G8B8A8_SNORM to UNORM. D3D12 excludes these casts for this creation path.

The patch keeps their own typed format. The exact source-extracted CPU test flags the three original choices and passes with the patch. Nine controls stay the same, including format 28 in your report and the existing typeless and sRGB selections. On RTX 4070 Ti SUPER, the standalone shader used valid own-format views only. Both 16-bit formats matched their float32 reference words. The 8-bit SNORM sample exceeded our strict numeric tolerance (maximum error 1.54e-5 versus 2e-6), so I kept the failed control in the results.

Patch, source and raw output. This is separate from the alias and fallback fixes already in the thread. It establishes a view-selection issue on synthetic inputs. AI-assisted PortBridge verification (OpenAI Codex).

**@⁠akimfomin** on GitHub · 2026-11-25 03:48 UTC · [original](https://github.com/Marvisak/VIctory/pull/1997#issuecomment-7152258834) Calvix2k, [PortBridge](https://github.com/akimfomin/PortBridge) checked the source SRV selection at `d732465f`. It shares the swap-chain policy and maps typed `R16G16B16A16_UNORM` and `SNORM` to FLOAT plus `R8G8B8A8_SNORM` to UNORM. [D3D12 excludes these casts](https://microsoft.github.io/DirectX-Specs/d3d/RelaxedCasting.html#casting-rules-for-rs2-drivers) for this creation path. The patch keeps their own typed format. The exact source-extracted CPU test flags the three original choices and passes with the patch. Nine controls stay the same, including format 28 in your report and the existing typeless and sRGB selections. On RTX 4070 Ti SUPER, the standalone shader used valid own-format views only. Both 16-bit formats matched their float32 reference words. The 8-bit SNORM sample exceeded our strict numeric tolerance (maximum error 1.54e-5 versus 2e-6), so I kept the failed control in the results. [Patch, source and raw output](https://github.com/akimfomin/PortBridge/blob/76cab7e78fe434355308f1beca264eee064875d2/research/rendering-night/victory-1997-typed-srv/TYPED-SRV.md). This is separate from the alias and fallback fixes already in the thread. It establishes a view-selection issue on synthetic inputs. AI-assisted PortBridge verification (OpenAI Codex).
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 09:16 UTC · original · edited 2026-11-25 16:45 UTC

Automated triage for the maintainers.

Merge candidate. Rebased onto main 67e8ae1 and merges cleanly again. queue.rs::present now reads every plane at a 0x48-byte stride (Plane, size asserted) and Host::present draws plane 0 opaque and later planes premultiplied-alpha into a swap chain sized to the largest plane (Compositor in host.rs). Single-plane presents keep the copy path, and no longer emit a COPY_SOURCE→COPY_SOURCE barrier. Since the last review:

  • 0258df3/181bec0 (andrewpozdnakov7-jpg, authorship kept): a failed compositor setup presents plane 0 in the same frame, and two title resources aliasing one host texture get one barrier pair and one restore. Both have tests.
  • fdc5ff5 adapts to host_resource returning an owned clone.

On your reply: the stride and blend evidence (the Series S render, plus the independent GTX 1650 A/B in this thread, black menus without the PR) is enough for this. Planes are stretched over the full target; any placement in the rest of the plane struct is ignored, a fine shortcut for now.

Non-blocking: the SRV uses swap_format(d.Format), which turns typed R16G16B16A16 UNORM/SNORM/UINT/SINT into FLOAT and R8G8B8A8 SNORM into UNORM. D3D12 does not allow those casts for a typed resource. The title's planes (format 28) are not affected. A failing compositor is also rebuilt (D3DCompile) on every multi-plane present.

CI: passing.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 09:16 UTC · [original](https://github.com/Marvisak/VIctory/pull/1997#issuecomment-7158106340) · edited 2026-11-25 16:45 UTC <!-- victory-triage v1 head=fdc5ff5c9ee17cde0095f83675615c65dd11999d verdict=merge-candidate at=2026-11-25T16:45:09Z --> Automated triage for the maintainers. **Merge candidate.** Rebased onto `main` `67e8ae1` and merges cleanly again. `queue.rs::present` now reads every plane at a 0x48-byte stride (`Plane`, size asserted) and `Host::present` draws plane 0 opaque and later planes premultiplied-alpha into a swap chain sized to the largest plane (`Compositor` in `host.rs`). Single-plane presents keep the copy path, and no longer emit a COPY_SOURCE→COPY_SOURCE barrier. Since the last review: - `0258df3`/`181bec0` (andrewpozdnakov7-jpg, authorship kept): a failed compositor setup presents plane 0 in the same frame, and two title resources aliasing one host texture get one barrier pair and one restore. Both have tests. - `fdc5ff5` adapts to `host_resource` returning an owned clone. On your reply: the stride and blend evidence (the Series S render, plus the independent GTX 1650 A/B in this thread, black menus without the PR) is enough for this. Planes are stretched over the full target; any placement in the rest of the plane struct is ignored, a fine shortcut for now. Non-blocking: the SRV uses `swap_format(d.Format)`, which turns typed R16G16B16A16 UNORM/SNORM/UINT/SINT into FLOAT and R8G8B8A8 SNORM into UNORM. D3D12 does not allow those casts for a typed resource. The title's planes (format 28) are not affected. A failing compositor is also rebuilt (`D3DCompile`) on every multi-plane present. CI: passing. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠Calvix2k on GitHub · 2026-11-25 10:23 UTC · original

Going through the triage's list:

Plane stride (0x48). The layout is token: u64 at 0, count: u32 at 8, resources: *const This at 0x10, then 0x30 bytes this patch never reads; size_of::<Plane>() == 0x48 is asserted at compile time. The first 0x18 bytes are the part main already reads for plane 0, so only the step to plane 1 is new, and the Series S run is its evidence: walking with 0x48, plane 1 resolves to a live 3840×2160 texture whose desc comes back as 3840×2160 (the log line quoted in the description), and the composited UI draws. A wrong stride would hand host_resource a pointer that is not a tracked resource, and the overlay would be missing rather than composited. I do not have GDK documentation for the struct to cite; if the maintainers require that, this is the part that would need it.

Blend mode. Planes after the first are blended as premultiplied (ONE/INV_SRC_ALPHA). That is an assumption about the title's UI plane, evidenced only by the render: with it the account picker and menus composite correctly (text and panels, no dark fringe); straight alpha would darken premultiplied content. It is stated as an assumption in the code comment, not as a measured fact.

Skipped frame on compositor failure — fixed in 5c42b8c. A failing create_compositor now logs and presents plane 0 through the single-plane copy instead of returning None; the compositor is retried on the next present. The test asserts the frame is presented (is_some) rather than skipped, and the existing pixel check on the retry still passes.

The other thread items (two planes aliasing one host texture leaving it in COPY_SOURCE, and SRV formats D3D12 will not cast) are real but separate: they live in the aliasing/format paths, not in this patch, and I would rather they land as their own fixes than grow this one.

Other compositor PRs (#1287, #1330, #1970): maintainer's choice. This one is the variant with an in-game Series S render behind it (plane sizes logged, UI visible) plus the failure fallback above.

**@⁠Calvix2k** on GitHub · 2026-11-25 10:23 UTC · [original](https://github.com/Marvisak/VIctory/pull/1997#issuecomment-7159621142) Going through the triage's list: **Plane stride (0x48).** The layout is `token: u64` at 0, `count: u32` at 8, `resources: *const This` at 0x10, then 0x30 bytes this patch never reads; `size_of::<Plane>() == 0x48` is asserted at compile time. The first 0x18 bytes are the part `main` already reads for plane 0, so only the step to plane 1 is new, and the Series S run is its evidence: walking with 0x48, plane 1 resolves to a live 3840×2160 texture whose desc comes back as 3840×2160 (the log line quoted in the description), and the composited UI draws. A wrong stride would hand `host_resource` a pointer that is not a tracked resource, and the overlay would be missing rather than composited. I do not have GDK documentation for the struct to cite; if the maintainers require that, this is the part that would need it. **Blend mode.** Planes after the first are blended as premultiplied (`ONE`/`INV_SRC_ALPHA`). That is an assumption about the title's UI plane, evidenced only by the render: with it the account picker and menus composite correctly (text and panels, no dark fringe); straight alpha would darken premultiplied content. It is stated as an assumption in the code comment, not as a measured fact. **Skipped frame on compositor failure — fixed in `5c42b8c`.** A failing `create_compositor` now logs and presents plane 0 through the single-plane copy instead of returning `None`; the compositor is retried on the next present. The test asserts the frame is presented (`is_some`) rather than skipped, and the existing pixel check on the retry still passes. **The other thread items** (two planes aliasing one host texture leaving it in `COPY_SOURCE`, and SRV formats D3D12 will not cast) are real but separate: they live in the aliasing/format paths, not in this patch, and I would rather they land as their own fixes than grow this one. **Other compositor PRs (#1287, #1330, #1970):** maintainer's choice. This one is the variant with an in-game Series S render behind it (plane sizes logged, UI visible) plus the failure fallback above.
Author
Owner

@⁠crissuper20 on GitHub · 2026-11-25 13:09 UTC · original

In-game A/B on a GTX 1650 (Turing, 4 GB, driver 32.0.16.2124), --console series-s, diag build, host FidelityFX, same save and input. Base: 940d32f + #2016 #1775 #454 #1731.

menus and loading screens
base black (every capture is blank)
base + this PR at 5c42b8c render correctly

The same holds with #492, #2332 and #1868 added, and removing only this PR from that stack makes it black again. The world itself is still black on this card either way.

AI-assisted (Claude Code); measured on my own machine.

**@⁠crissuper20** on GitHub · 2026-11-25 13:09 UTC · [original](https://github.com/Marvisak/VIctory/pull/1997#issuecomment-7163365290) In-game A/B on a GTX 1650 (Turing, 4 GB, driver 32.0.16.2124), `--console series-s`, diag build, host FidelityFX, same save and input. Base: `940d32f` + #2016 #1775 #454 #1731. | | menus and loading screens | |---|---| | base | black (every capture is blank) | | base + this PR at `5c42b8c` | render correctly | The same holds with #492, #2332 and #1868 added, and removing only this PR from that stack makes it black again. The world itself is still black on this card either way. AI-assisted (Claude Code); measured on my own machine.
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-25 14:02 UTC · original

I ported the two fixes from the triage note onto the exact author head 5c42b8c6a2e119c7f28532484823e709c85b70b1. The fork branch preserves that head and carries two commits.

  • Compositor initialization failure with a 32×32 scene and 64×64 overlay. On 5c42b8c, the single-plane control copies 32×32 → 32×32, then the injected failure attempts 32×32 → 64×64 and WARP reports device removal (0x887A0020). The adjusted test reads the actual back buffer before Present. With the fix, it sees a 32×32 red frame [255, 0, 0, 255] in that same present. A successful retry composes 64×64 and reads [127, 0, 128, 255]. f0fed71
  • Two distinct title resources backed by one host texture. The same WARP PresentX fixture leaves that texture at COPY_SOURCE (0x800) on 5c42b8c and restores RENDER_TARGET (0x4) on the tested branch. The compositor records one transition pair per host texture and still draws both planes. 6c65329

The focused pair passed 10/10. The full WARP GPU suite had 149 passed and 2 ignored with both settings of VICTORY_D3D12_DEBUG. Strict GPU Clippy in both configurations and asset policy passed.

Please preserve the Git author of each commit if you cherry-pick them. If you fold either change into another commit, please add:

Co-authored-by: andrewpozdnakov7-jpg [email protected]

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-25 14:02 UTC · [original](https://github.com/Marvisak/VIctory/pull/1997#issuecomment-7164673215) I ported the two fixes from the triage note onto the exact author head 5c42b8c6a2e119c7f28532484823e709c85b70b1. The [fork branch](https://github.com/andrewpozdnakov7-jpg/VIctory/tree/review/1997-present-plane-fixes) preserves that head and carries two commits. - Compositor initialization failure with a 32×32 scene and 64×64 overlay. On 5c42b8c, the single-plane control copies 32×32 → 32×32, then the injected failure attempts 32×32 → 64×64 and WARP reports device removal (0x887A0020). The adjusted test reads the actual back buffer before Present. With the fix, it sees a 32×32 red frame [255, 0, 0, 255] in that same present. A successful retry composes 64×64 and reads [127, 0, 128, 255]. [f0fed71](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/f0fed71b413c6c721989fad5256dea3b84116589) - Two distinct title resources backed by one host texture. The same WARP PresentX fixture leaves that texture at COPY_SOURCE (0x800) on 5c42b8c and restores RENDER_TARGET (0x4) on the tested branch. The compositor records one transition pair per host texture and still draws both planes. [6c65329](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/6c65329829e2924a3e262e4e105c086e751a762c) The focused pair passed 10/10. The full WARP GPU suite had 149 passed and 2 ignored with both settings of VICTORY_D3D12_DEBUG. Strict GPU Clippy in both configurations and asset policy passed. Please preserve the Git author of each commit if you cherry-pick them. If you fold either change into another commit, please add: Co-authored-by: andrewpozdnakov7-jpg <[email protected]>
Author
Owner

@⁠Calvix2k on GitHub · 2026-11-25 16:38 UTC · original

Picked both up with their authorship preserved and rebased onto main 67e8ae1:

  • 0258df3 — "GPU: present the primary plane when compositor setup fails" (your f0fed71)
  • 181bec0 — "GPU: restore each presented host texture state once" (your 6c65329)
  • fdc5ff5 — one adaptation by me: host_resource returns an owned clone on main, so the composed list holds the clones and lends them to present; your state bookkeeping is unchanged.

Resolving the rebase also kept main's side of the two queue.rs hunks around Plane/Why; the multi-plane present path is the PR's.

Verification on Windows 10 / RX 7800 XT: cargo test -p victory-gpu --features diagnostics --lib 200 passed, 1 ignored, plus the known placed-view failure on a runtime without ID3D12Device10 (#1999); clippy -D warnings clean. The PR is mergeable again. Thanks for the focused port and the WARP runs — that is more than the triage asked for.

**@⁠Calvix2k** on GitHub · 2026-11-25 16:38 UTC · [original](https://github.com/Marvisak/VIctory/pull/1997#issuecomment-7168294141) Picked both up with their authorship preserved and rebased onto `main 67e8ae1`: - `0258df3` — "GPU: present the primary plane when compositor setup fails" (your `f0fed71`) - `181bec0` — "GPU: restore each presented host texture state once" (your `6c65329`) - `fdc5ff5` — one adaptation by me: `host_resource` returns an owned clone on `main`, so the composed list holds the clones and lends them to `present`; your state bookkeeping is unchanged. Resolving the rebase also kept `main`'s side of the two `queue.rs` hunks around `Plane`/`Why`; the multi-plane present path is the PR's. Verification on Windows 10 / RX 7800 XT: `cargo test -p victory-gpu --features diagnostics --lib` 200 passed, 1 ignored, plus the known placed-view failure on a runtime without `ID3D12Device10` (#1999); clippy `-D warnings` clean. The PR is mergeable again. Thanks for the focused port and the WARP runs — that is more than the triage asked for.
Author
Owner

@⁠CocoBeans64 on GitHub · 2026-11-25 19:51 UTC · original

Tested on Windows 10 22H2 (19045), RX 6800 XT, Agility SDK runtime (#84), merged with #1793 on 13f91ca, diag build, --console series-s with the PC FidelityFX SDK 2.4.0.
Without this PR, Series S shows the logo video and then a black window, although input works and the menus run at 30 fps. With it, the menus show and the world is reached. In the 300 s after the world shows: median 1.7 fps (Series X native: 1.5), GPU 168 ms/frame (Series X: ~216). No crash.

**@⁠CocoBeans64** on GitHub · 2026-11-25 19:51 UTC · [original](https://github.com/Marvisak/VIctory/pull/1997#issuecomment-7172861056) Tested on Windows 10 22H2 (19045), RX 6800 XT, Agility SDK runtime (#84), merged with #1793 on `13f91ca`, diag build, `--console series-s` with the PC FidelityFX SDK 2.4.0. Without this PR, Series S shows the logo video and then a black window, although input works and the menus run at 30 fps. With it, the menus show and the world is reached. In the 300 s after the world shows: median 1.7 fps (Series X native: 1.5), GPU 168 ms/frame (Series X: ~216). No crash.
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!1997
No description provided.