Repository navigation
Conversation
Resolved conflicts: - src/startup_stubs/d3d12_present.inl: kept main's plane-surface present_to_window and added the branch's output_closed check to its early return. - tests/startup_run_ps1_check.py: kept the branch's --managed-window expectation and main's longer debugger record; main's native-shader case also runs with -Render, so it expects --managed-window too. - tools/startup/debug_launch.py: kept main's grab_window/capture_window split and capture-thread shutdown, with the branch's "not window_close" condition on the final capture. - tools/startup/run.ps1: pass both --capture-every and --managed-window arguments.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
KelboLive
left a comment
There was a problem hiding this comment.
LGTM — clean follow-up that wires output-window Close through both host modes.
- WM_CLOSE handler signals X2W_SESSION_CLOSE_EVENT for managed windows and hides the window for direct hosts.
- present loop respects the output_closed flag.
- debug_launch.py creates and monitors the close event in managed mode, terminates the job, and logs the event.
- run.ps1 passes --managed-window when -Render is used.
- Test fixture covers minimize → restore → close → timer path.
- CMake wiring adds the test to the smoke preset.
The approach is consistent with existing session-close patterns in the codebase.
KelboLive
left a comment
There was a problem hiding this comment.
LGTM — clean follow-up that wires output-window Close through both host modes.
- WM_CLOSE handler signals X2W_SESSION_CLOSE_EVENT for managed windows and hides the window for direct hosts.
- present loop respects the output_closed flag.
- debug_launch.py creates and monitors the close event in managed mode, terminates the job, and logs the event.
- run.ps1 passes --managed-window when -Render is used.
- Test fixture covers minimize → restore → close → timer path.
- CMake wiring adds the test to the smoke preset.
The approach is consistent with existing session-close patterns in the codebase.
Leyukaka
left a comment
There was a problem hiding this comment.
Reviewed head a2cb59d5 against main 212d4b5f by reading the diff and git objects, plus git merge-tree. Nothing was built or run.
Verdict: comment. The close handling answers the changes request on #2344, and the pr preset now lists the affected tests, but the branch conflicts with main.
-
Conflict in
tools/startup/run.ps1.git merge-tree --write-tree 212d4b5f a2cb59d5exits 1 withCONFLICT (content)there.main(539c3ad) appends@holdArgsto the same debugger line where this PR appends@windowArgs. Keeping both as@captureArgs @holdArgs @windowArgs, with both$holdArgsand$windowArgsdefinitions, matches the auto-mergedstartup_run_ps1_check.py: it appends--managed-window 1after the passed arguments, and its-SuspendOtherscases don't pass-Render. The other files auto-merge. -
Dropping the inherited event name is still unpinned.
debug_launch.py:221drops an inheritedX2W_SESSION_CLOSE_EVENT, but the check passes its stale name (startup_output_window_close_check.py:23) only together with--managed-window 1, anddebug_launch.py:229then overwrites the value. With line 221 removed the check still passes. A launcher run without--managed-windowand with a stale name would cover it: with the pop removed, the child takes the managed branch and exits 22 (startup_present_producer.cpp:170-172) instead of 0.
What checks out:
d3d12_present.inl:39-54: Close no longer minimizes (main:39) and does not exit the process. With an event it can open and set, it returns. Otherwise it marks the output closed, stops the hider timer, shows the hidden windows again and hides the output window.present_to_windowrefuses after Close (:179), sod3d12_xs_device.cpp:7381records the frame as not shown. That is what the changes request on #2344 asked for: the launcher ends the session, and a direct host stays alive.- No test on
mainasserts the old minimize-on-close behaviour (WM_CLOSE,SC_CLOSEandminimihave no match undertests/, apart from an unrelated shader check). - The direct-host case now checks that the hidden helper window comes back (
startup_present_producer.cpp:174) and stays visible after a hider timer message (:176-180). By reading, that catches dropping the reshow call at Close. It should also catchpresent_to_windowignoring the closed flag, provided the present on the hidden window returns a success code. - CMake adds only
add_test/set_tests_properties, an include path anduser32. InCMakePresets.json, theprbuild preset gains thestartup_present_producertarget and theprtest filter gainsstartup_output_window_close,startup_present_producer_warpandstartup_run_ps1. The Windows build-and-test check passes ona2cb59d5.
Minor:
- The
return 2path atdebug_launch.py:1278is not reached with the test child. --managed-windowis missing from the usage text at the top ofdebug_launch.py;docs/startup-runtime.md:261mentions it.- The body mentions a follow-up commit; those changes are inside the merge commit
2ef859e5, sogit diff 44f14769 2ef859e5 -- tests/shows them.
The body presents this PR as the replacement for #2344, which is still open at 44f14769 (both of its commits are in this branch) and whose changes request is on 5633a0d3.
|
Review of head This needs a rebase.
Checked, by reading, on the default path: without MUST
SHOULD / NIT: none beyond the review of 29 November. Held: not mergeable until rebased. AI-assisted. |
pigalot
left a comment
There was a problem hiding this comment.
Reviewed a2cb59d5. It conflicts with main 17b662a2, so I built and tested the PR head on its own (it already contains main up to 7e5c378d), not an integrated tree.
I merged main into this branch earlier as 44f14769 (pushed to #2344's branch, which this PR builds on); I checked that resolution again here with git show --remerge-diff 44f14769. It touches only the four conflicted files: present_to_window keeps main's plane-surface signature with the output_closed check added, the final window capture keeps not window_close, run.ps1 passes both @captureArgs and @windowArgs, and startup_run_ps1_check.py expects --managed-window 1 for -Render, translate and native cases. Nothing else is in it.
Blocking: conflicts with main. git merge-tree --write-tree 17b662a2 a2cb59d5 reports three files:
tools/startup/run.ps1:mainappends@holdArgsto the debugger line this PR appends@windowArgsto. Both are needed:@captureArgs @holdArgs @windowArgs.tests/startup_run_ps1_check.py:main(75db835) addednative_defaultand two more record fields next to this PR'swant.extend(["--managed-window", "1"]). Keepmain'snative_defaultline andexpectedlist, and the PR's two lines.CMakePresets.json: theprtest filter.mainaddedstartup_inline_retire_(on|control)_warp,startup_resource_retire_title_inline_warp_debug0,startup_table_lock_(control_)?warpandstartup_compute_packed_d16_x_uav_reference; keep those and add this PR's three names.
I have not built those resolutions. Please merge main (a merge, not a rebase) and I will retest the new head.
What I ran at a2cb59d5. Built startup_present_producer and d3d12_xs_shim in dev and release, then
ctest --test-dir out/build/<preset> --no-tests=error -j 1 --output-on-failure -R '^(startup_output_window_close|startup_present_producer_(warp|hardware)|startup_run_ps1.*)$'
4/4 passed in Debug and Release /O2, no skips. git diff --check against main is clean.
Mutants (dev build, startup_output_window_close for the shim and launcher, startup_run_ps1 for run.ps1): 20 run, 14 killed, 5 survive, 1 equivalent.
Killed:
- shim: event branch disabled (child exits 22);
output_closednever set;present_to_windowignoringoutput_closed; reshow step at Close dropped; minimize instead of hide. - launcher:
--managed-windowtest inverted; event name not passed to the child; job not terminated on Close; job exit code 1 instead of 0; close message dropped; no wait after Close. run.ps1:@windowArgsnot passed; flag set without-Render; flag value0.
Survive:
debug_launch.py:221,env.pop("X2W_SESSION_CLOSE_EVENT", None)removed. This confirms Leyukaka's second point: the check only passes the stale name together with--managed-window 1, where line 229 overwrites it. A launcher run with the stale name and no--managed-windowwould pin it.debug_launch.py:1278,return 0 if child_stopped else 2replaced byreturn 0. The test child always dies with the job, so the failure path is not reached.debug_launch.py:1257,and not window_closeremoved from the final capture. Diagnostics only.d3d12_present.inl:46,if (sent) return 0;removed, and- the same line inverted to
if (!sent) return 0;. In both the managed window is also hidden before the job ends it; the test cannot tell.
Equivalent: KillTimer at Close removed. Presents are refused after Close, so a later timer tick sees no shown frame and leaves the title window visible.
None of the survivors blocks; the first is worth a test case while the branch is being updated anyway.
Other notes.
- The second commit by the author,
2ef859e5, is a merge ofmainthat also carries the follow-up changes (fixture, check, docs, preset, a comment indebug_launch.py);git show --remerge-diff 2ef859e5shows them.a2cb59d5is a clean merge. - #2344 is still open with the same work up to
44f14769. One of the two should be closed as superseded. - Title run of this head (prwatch job 38) ended in an error and gave no verdict, so this review does not rely on one.
Environment: Windows 11 25H2 build 26200.9974; MSVC 19.52.37029; Python 3.12.10; NVIDIA GeForce RTX 5090 driver 32.0.16.1088, debug layer enabled; inbox WARP.
CI: Build and test on Windows passed on a2cb59d5.
This reply was AI-assisted.
Replacement submission for #2344. This branch contains the existing output-window close work plus the verified review follow-up commit. The original PR remains open because its author-owned branch was not writable from this account; these PRs overlap in scope, so please keep only one submission and close/mark the other as superseded when choosing.
Validation:
startup_present_producerbuilt successfully, andstartup_output_window_close,startup_present_producer_warp, andstartup_run_ps1passed (3/3).