Repository navigation
Conversation
KelboLive
left a comment
There was a problem hiding this comment.
LGTM — ready for approval from another maintainer once reviewed.
No outstanding issues identified. Safe to merge.
Leyukaka
left a comment
There was a problem hiding this comment.
Changes requested at 462c3d8 (by reading the code; nothing was built or run).
With X2W_PRESENT_COMPOSITE unset, the window compositor is still created for one plane: present_to_window(..., presented.drawable, present_composite_enabled() ? window_planes : 1) (d3d12_xs_device.cpp:7578). That capacity goes to PlaneCompositor::create on the first present only (d3d12_present.inl:169, :139). record stops at max_planes_ drawn planes (plane_compositor.h:120-121), and the blend pipeline is built only when max_planes_ > 1 (:54). So the new planes > 1 branch selects every plane, but only the lowest drawable one is drawn:
- plane 0 presentable: plane 0 alone, same as main. The case in docs/startup-runtime.md "Presented planes" (plane 0 drawn black, plane 1 holds the picture) is unchanged.
- plane 0 not drawable: plane 1 alone. This is the only behaviour change.
Also:
- docs/startup-runtime.md:300-304, :1660 and :1737, and the comments at d3d12_xs_device.cpp:7453-7454, :7462-7464, :7571-7572 and d3d12_present.inl:7, still say plane 0 alone by default.
presented_planes()is in the anonymous namespace of d3d12_xs_device.cpp and no file under tests/ references it, so the changed line is not tested.startup_present_planesandstartup_present_composite_*are not in theprtest preset filter, so the green checks do not cover it either.
#3376 changes the same selection line, passes window_planes as the capacity, and updates the docs and startup_present_planes. It covers what this PR intends, so fixing the capacity here would duplicate it; the two conflict in presented_planes(), so one of them has to close (my notes on #3376 are on that PR).
|
Reviewed at 462c3d8 against main 77d1ba4 (by reading the code; nothing built). MUST
SHOULD NIT Holding, not merging: standing changes request, plus 1. AI-assisted. |
|
Withdrawing this in favour of #3376. The review point is correct. With #3376 covers the same behaviour and closes that gap: Nothing here was built or run. |
|
Separately: my earlier review on this pull request — "LGTM — ready for approval from another maintainer… Safe to merge" — was wrong and should be disregarded. It was posted before I had checked the compositor capacity, and it does not reflect the code. GitHub does not allow deleting a submitted review, so this comment is the retraction. The maintainer's request for changes stands, and the work continues in #3376. |
When a game presents multiple planes (e.g., plane 0 for UI, plane 1 for the main picture), the window presenter previously only showed plane 0 by default. If plane 0 was empty or black in some titles, the output window would appear completely black even though audio and other rendering were working correctly.
This change updates
presented_planes()to automatically composite all planes when more than one is present (unless explicitly overridden viaX2W_PRESENT_PLANE), ensuring the main picture is visible.Changes
src/startup_stubs/d3d12_xs_device.cpp: Updated the logic inpresented_planes()to include all planes for compositing whenplanes > 1, rather than defaulting to just plane 0.Testing