d3d12: compose a present with several planes #368

Merged
Jerkin42 merged 1 commit from upstream-pr/368 into main 2026-11-28 09:22:22 +00:00
Jerkin42 commented 2026-11-28 04:26:04 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by Jerkin42 on 2026-11-28T04:26:04Z.


Summary

PresentX with more than one plane returned E_NOTIMPL. ProjectScarlett in Series S mode presents its scaled 3D picture and a full-size interface as two planes, so on upstream the window stays blank white there (PresentX failed planes=2).

present::compose adds a small compositor. It draws each plane into the back buffer, the first opaque and the rest alpha-blended over it, using each plane's source rectangle and destination (bytes 24 and 32 of the 72-byte retail plane, as the single-plane path already reads them). The progress and performance panels are copied on top as before. A single plane covering its whole texture and the whole screen still takes the existing copy path unchanged. At most four planes are accepted. A later plane without a texture is skipped, and the swap chain takes the size of the widest plane.

Tested

  • The checks relevant to this change passed (one Lanes case that also fails on main here, see below)
  • Changed or new behaviour is covered by a Lanes scenario, or the reason it cannot be is stated below
  • Where the table calls for AMD and NVIDIA, they passed on both. Otherwise, say which vendor still needs to run them: NVIDIA run by @NathansDomainSolutions (comment): verify --only present, 8 of 8 passed including guest-present-planes (RTX 4070, driver 620.73.04, GE-Proton11-14).

New present check guest-present-planes (xbox-frame-planes.exe, built from frame_guest.cpp with GUEST_FRAME_PLANES). It presents each of the two frames as two planes. The first plane is the frame. The second is a full-size texture cleared transparent, with an opaque green square over the inset. The screen samples must show the frame's color at the corners and the green square in the middle. Without this change the present returns E_NOTIMPL and the check fails.

In ProjectScarlett (Series S profile), the title screen and the game showed up in the window with the interface over the 3D picture.

GPU, driver and backend: AMD RX 9060 XT, Mesa RADV 26.1.8, Linux 7.3.1; checks on Proton Experimental (private rootful Xwayland), the game on GE-Proton 11-14

Commands run and their results:

python tuxbox.py check --proton ".../Proton - Experimental" --prefix <small check prefix> --windows-dxc <dxc 2505>
  passed   Build the shader compiler
  passed   Python tests
  passed   Shader compiler tests
  passed   DXBC tests
  passed   XG layout tests
  passed   Storage codec tests
  passed   D3D12 Windows typecheck
  passed   Build
  FAILED   Lanes and fixtures on the GPU   (1 FAIL: invalid-route)
  passed   D3D12 regression controls
  passed   Shader translator on the GPU
PASS  guest-present
PASS  guest-present-rgb10
PASS  guest-present-planes
PASS  guest-present-4k-owned
PASS  guest-present-4k-oversized
PASS  guest-present-4k-fit
PASS  guest-present-4k-splash

Rebased onto main 5ff179c (the splash now paints into the title's window and stops before the swap chain exists, so the compose path no longer reveals it). invalid-route also fails on plain main here: it checks route-game.exe's exit status and has failed on this machine before.

The mesh regression control, which failed in an earlier run of this branch, passed this time. It is intermittent on RADV here (the amplified dispatch's word 76 sometimes reads 0) and fails the same way on branches that do not touch D3D12.

Checks

No evidence JSON changes.

🤖 Generated with Claude Code

<!-- greyfinch-sync:brcly/TuxBox:issue:5536638584 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/368). Originally posted by [Jerkin42](https://github.com/Jerkin42) on 2026-11-28T04:26:04Z. --- ## Summary PresentX with more than one plane returned `E_NOTIMPL`. ProjectScarlett in Series S mode presents its scaled 3D picture and a full-size interface as two planes, so on upstream the window stays blank white there (`PresentX failed planes=2`). `present::compose` adds a small compositor. It draws each plane into the back buffer, the first opaque and the rest alpha-blended over it, using each plane's source rectangle and destination (bytes 24 and 32 of the 72-byte retail plane, as the single-plane path already reads them). The progress and performance panels are copied on top as before. A single plane covering its whole texture and the whole screen still takes the existing copy path unchanged. At most four planes are accepted. A later plane without a texture is skipped, and the swap chain takes the size of the widest plane. ## Tested - [x] The checks relevant to this change passed (one Lanes case that also fails on `main` here, see below) - [x] Changed or new behaviour is covered by a Lanes scenario, or the reason it cannot be is stated below - [x] Where the table calls for AMD and NVIDIA, they passed on both. Otherwise, say which vendor still needs to run them: NVIDIA run by @NathansDomainSolutions ([comment](https://github.com/brcly/TuxBox/pull/368#issuecomment-7236303111)): `verify --only present`, 8 of 8 passed including `guest-present-planes` (RTX 4070, driver 620.73.04, GE-Proton11-14). New present check `guest-present-planes` (`xbox-frame-planes.exe`, built from `frame_guest.cpp` with `GUEST_FRAME_PLANES`). It presents each of the two frames as two planes. The first plane is the frame. The second is a full-size texture cleared transparent, with an opaque green square over the inset. The screen samples must show the frame's color at the corners and the green square in the middle. Without this change the present returns `E_NOTIMPL` and the check fails. In ProjectScarlett (Series S profile), the title screen and the game showed up in the window with the interface over the 3D picture. GPU, driver and backend: AMD RX 9060 XT, Mesa RADV 26.1.8, Linux 7.3.1; checks on Proton Experimental (private rootful Xwayland), the game on GE-Proton 11-14 Commands run and their results: ```text python tuxbox.py check --proton ".../Proton - Experimental" --prefix <small check prefix> --windows-dxc <dxc 2505> passed Build the shader compiler passed Python tests passed Shader compiler tests passed DXBC tests passed XG layout tests passed Storage codec tests passed D3D12 Windows typecheck passed Build FAILED Lanes and fixtures on the GPU (1 FAIL: invalid-route) passed D3D12 regression controls passed Shader translator on the GPU PASS guest-present PASS guest-present-rgb10 PASS guest-present-planes PASS guest-present-4k-owned PASS guest-present-4k-oversized PASS guest-present-4k-fit PASS guest-present-4k-splash ``` Rebased onto `main` 5ff179c (the splash now paints into the title's window and stops before the swap chain exists, so the compose path no longer reveals it). `invalid-route` also fails on plain `main` here: it checks `route-game.exe`'s exit status and has failed on this machine before. The `mesh` regression control, which failed in an earlier run of this branch, passed this time. It is intermittent on RADV here (the amplified dispatch's word 76 sometimes reads 0) and fails the same way on branches that do not touch D3D12. ## Checks No evidence JSON changes. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Jerkin42 commented 2026-11-28 04:26:17 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by Jerkin42 on 2026-11-28T04:26:17Z.


I only have an AMD card (RX 9060 XT, RADV), so the NVIDIA half of the checks is still open. If someone with an NVIDIA GPU can run python tuxbox.py check on this branch and post the summary, that would cover the vendor row. Thank you!

<!-- greyfinch-sync:brcly/TuxBox:comment:7234038647 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/368#issuecomment-7234038647). Originally posted by [Jerkin42](https://github.com/Jerkin42) on 2026-11-28T04:26:17Z. --- I only have an AMD card (RX 9060 XT, RADV), so the NVIDIA half of the checks is still open. If someone with an NVIDIA GPU can run `python tuxbox.py check` on this branch and post the summary, that would cover the vendor row. Thank you!
NathansDomainSolutions commented 2026-11-28 08:00:41 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by NathansDomainSolutions on 2026-11-28T08:00:41Z.


NVIDIA run for this: python tuxbox.py verify --only present, all 8 passed, including guest-present-planes.

  • RTX 4070 (10de:2786), driver 620.73.04, GE-Proton11-14, Linux 7.3.6, Hyprland (private rootful Xwayland for the window checks)
  • Built from a local integration branch: main (cba382c) plus this PR (a81bdd6) plus #372, #373, #375, #376, #378 and #380. None of the others touch present/.
PASS  guest-present
PASS  guest-present-rgb10
PASS  guest-present-planes
PASS  guest-present-4k-owned
PASS  guest-present-4k-oversized
PASS  guest-present-4k-fit
PASS  guest-present-4k-splash
PASS  lanes-overlay

I'll report back if the ProjectScarlett player-select screen, which presents black here at the default profile, changes with it.

(Tested with Claude Code assisting.)

<!-- greyfinch-sync:brcly/TuxBox:comment:7236303111 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/368#issuecomment-7236303111). Originally posted by [NathansDomainSolutions](https://github.com/NathansDomainSolutions) on 2026-11-28T08:00:41Z. --- NVIDIA run for this: `python tuxbox.py verify --only present`, all 8 passed, including `guest-present-planes`. - RTX 4070 (`10de:2786`), driver 620.73.04, GE-Proton11-14, Linux 7.3.6, Hyprland (private rootful Xwayland for the window checks) - Built from a local integration branch: `main` (`cba382c`) plus this PR (`a81bdd6`) plus #372, #373, #375, #376, #378 and #380. None of the others touch `present/`. ```text PASS guest-present PASS guest-present-rgb10 PASS guest-present-planes PASS guest-present-4k-owned PASS guest-present-4k-oversized PASS guest-present-4k-fit PASS guest-present-4k-splash PASS lanes-overlay ``` I'll report back if the ProjectScarlett player-select screen, which presents black here at the default profile, changes with it. (Tested with Claude Code assisting.)
Jerkin42 commented 2026-11-28 08:02:34 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by Jerkin42 on 2026-11-28T08:02:34Z.


Thank you, @NathansDomainSolutions! That covers the NVIDIA row; I've added your result to the description.

If the player-select screen changes with it, I'd be glad to hear either way. On the RX 9060 XT the Series S profile presents its two planes with this PR, but I haven't checked that screen at the default profile.

<!-- greyfinch-sync:brcly/TuxBox:comment:7236323715 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/368#issuecomment-7236323715). Originally posted by [Jerkin42](https://github.com/Jerkin42) on 2026-11-28T08:02:34Z. --- Thank you, @NathansDomainSolutions! That covers the NVIDIA row; I've added your result to the description. If the player-select screen changes with it, I'd be glad to hear either way. On the RX 9060 XT the Series S profile presents its two planes with this PR, but I haven't checked that screen at the default profile.
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
brcly/TuxBox!368
No description provided.