startup: output-window close review follow-up #3342
Open
romn4rch wants to merge 4 commits from
upstream-pr/3342 into main
pull from: upstream-pr/3342
merge into: R0Y00:main
R0Y00:main
R0Y00:codex/indirect-large-backed-views
R0Y00:codex/word3-preflight-check
R0Y00:codex/vertex-table-two-records
R0Y00:codex/live-index-alias
R0Y00:codex/copied-vertex-buffer-srv
R0Y00:codex/windows-stage-test-output
R0Y00:codex/preserve-live-srv-retirement
R0Y00:codex/share-render-target-tracking
R0Y00:codex/sgd5-negative-offset-fixture
R0Y00:coverage-dashboard
R0Y00:codex/mesh-loose-root
R0Y00:codex/mesh86-cache-padding
R0Y00:codex/xmem-scatter-preflight
R0Y00:codex/mesh-depth-ps
R0Y00:codex/indirect-dispatch-refresh
R0Y00:codex/compute-container-index
R0Y00:codex/startup-compute-formatted-load
R0Y00:codex/compute-indirect-producer
R0Y00:codex/compute-atomic-soffset
R0Y00:codex/mesh-dual-handoff
R0Y00:codex/startup-run-sh-watcher-control
R0Y00:codex/queue31-page-alias
R0Y00:codex/indexed-indirect-compute-root
R0Y00:codex/typed-buffer-view-metadata
R0Y00:codex/translated-indexed-address-alias
R0Y00:codex/fixed-mesh-create-result
R0Y00:codex/xmem-section-lease
R0Y00:codex/startup-slot86-mesh-cache
R0Y00:codex/restore-mesh-barrier-iteration
R0Y00:codex/translated-indirect-upload-index
R0Y00:codex/xapu-completion-opt-in
R0Y00:codex/translated-indexed-rect
R0Y00:codex/translated-indexed-indirect
R0Y00:codex/startup-mesh-lds-integration
R0Y00:codex/startup-console-ms24
R0Y00:codex/startup-slot57-mesh-request
R0Y00:codex/indirect-copy-provenance
R0Y00:codex/present-color-producer-trace
R0Y00:codex/compute-dispatch-binding-trace
R0Y00:codex/translated-indirect-table-buffers
R0Y00:codex/indirect-copy-provenance-base
R0Y00:codex/mix-half-literal-source
R0Y00:codex/translated-indirect-draw
R0Y00:codex/xmem-scatter-diagnostics
R0Y00:codex/slot148-recording-upload
R0Y00:codex/slot70-loading-art-verified
R0Y00:codex/command-list-upload-arena
R0Y00:codex/recover-failed-command-list
R0Y00:codex/startup-heap-timing-notes
R0Y00:codex/align-audio-input-timeline
R0Y00:codex/synthetic-depth-export-control
R0Y00:codex/startup-texture1d-on-windows
R0Y00:codex/1629-packed-position-fixture
R0Y00:codex/cpu-srv-refresh
R0Y00:codex/stream-root-srv-draw
R0Y00:codex/audio-mixer-timer
R0Y00:codex/startup-reload-published-shader
R0Y00:codex/priority-integrate-1284
R0Y00:codex/guest-sixteen-page-record
R0Y00:codex/aot-placed-dxr-batch
R0Y00:codex/guest-directory-selection
R0Y00:codex/gamesave-enumerate-read
R0Y00:codex/readme-archive-to-pixels
R0Y00:codex/pe-placed-view-draw
R0Y00:codex/archive-directory-gpu
R0Y00:codex/slot133-dxr-build
R0Y00:codex/materialize-placed-vertex-view
R0Y00:codex/dstorage-directory-offsets
R0Y00:codex/xg-nine-bc-copy
R0Y00:codex/xg-slot10-bc64-arrays
R0Y00:codex/dxr-guest-address-readback
R0Y00:codex/gpu-va-high-bits
R0Y00:codex/clarify-diagnostic-startup-scope
R0Y00:codex/xg-six-levels
R0Y00:codex/typed-derived-blend
R0Y00:codex/english-legal-text-progress
R0Y00:codex/address-bc-4ks
R0Y00:codex/dstorage-bounded-file-read
R0Y00:codex/wide-srv-offsets-menu
R0Y00:codex/startup-memory-srv
R0Y00:codex/bound-view-tail
R0Y00:codex/language-selector-readback
R0Y00:codex/setup-menu-progress
R0Y00:codex/cpu-plane-refresh
R0Y00:codex/startup-ubyte-vertex
R0Y00:codex/presenter-window-selection
R0Y00:codex/startup-uniform-buffer-lane
R0Y00:codex/intro-loop-timing
R0Y00:codex/static-clzero-loops
R0Y00:codex/document-rtx-intro
R0Y00:codex/startup-insertq
R0Y00:codex/nv12-startup-texture
R0Y00:codex/stream-stage-draw
R0Y00:codex/startup-null-uav-format
R0Y00:codex/startup-draw-capture
R0Y00:codex/shorten-windows-checks
R0Y00:codex/dstorage-rfc1950
R0Y00:codex/startup-dump-fence
R0Y00:codex/pr1135-review-base
R0Y00:codex/startup-stream-requests
R0Y00:codex/startup-chroma-view
R0Y00:codex/readme-graphics-pipeline-streams
R0Y00:codex/static-crt-free-tls
R0Y00:codex/arc-140t-rtx-5080-laptop-gpu-reports
R0Y00:codex/main-startup-progress-entry
R0Y00:codex/signed-dxil-catalogue
R0Y00:codex/reloc-free-preferred-base
R0Y00:codex/quad-dpp-bit-mask
R0Y00:codex/raw-srv-bounds
R0Y00:codex/rx9070-31044-hardware-report
R0Y00:codex/gpu-page-source-provenance
R0Y00:codex/runtime-placeholder-interior
R0Y00:codex/gpu-copy-queue-tile-order
R0Y00:codex/pe-pin-external-providers
R0Y00:codex/xmem-placeholder-reservations
R0Y00:codex/xmem-shared-physical-pages
R0Y00:codex/pe-package-startup
R0Y00:codex/xmem-tools-memory-query
R0Y00:codex/cpu-stack-output-import
R0Y00:codex/pe-load-security-cookie
R0Y00:codex/record-three-bvh-retests
R0Y00:codex/cpu-rbp-frame-anchor
R0Y00:codex/xmem-default-startup
R0Y00:codex/record-rtx-3050-ti-9597
R0Y00:codex/docs-readme-start-here
R0Y00:codex/check-compute-mad24-truncation
R0Y00:codex/docs-discord-community
R0Y00:codex/bound-rcx-branch-mutants
R0Y00:codex/rtx5060ti-bvh-62114
R0Y00:codex/837-neutral-readme-disclaimer
R0Y00:codex/record-rtx-3070-ti
R0Y00:codex/title-neutral-public-wording
R0Y00:codex/exe-shadow-frame-submissions
R0Y00:codex/exe-shadow-runtime-chain
R0Y00:codex/readme-polish
R0Y00:codex/gpu-coverage-nov23
R0Y00:codex/spirv-minlod
R0Y00:codex/shadow-shim-device
R0Y00:codex/exe-two-shadow-frames
R0Y00:codex/shim-dispatch-cleanup
R0Y00:codex/fix-spirv-cache-probe
R0Y00:codex/sampler-use
R0Y00:codex/ballot-bit-extract
R0Y00:codex/packed-fma-release
R0Y00:codex/cpu-packed-fma-o2
R0Y00:codex/publish-coverage-dashboard
R0Y00:codex/mesh-cbv-binding-order
R0Y00:codex/spirv-window-fixture
R0Y00:codex/ps-e32-float-uint
R0Y00:codex/ps-cbuffer-reads
R0Y00:codex/fixed-profile-rescan
R0Y00:codex/shim-compute-integration
R0Y00:codex/readme-visible-coverage
R0Y00:codex/readme-research-navigation
R0Y00:codex/integrate-pr-256
R0Y00:codex/indexed-mesh
R0Y00:codex/sampled-coverage
R0Y00:codex/first-ms
R0Y00:codex/dual-ps
R0Y00:codex/ps-attribute
R0Y00:codex/compute-first
R0Y00:codex/ps-export
R0Y00:codex/readme-research-status
R0Y00:codex/ps-layout
R0Y00:codex/blast-window
R0Y00:codex/chart-caption
R0Y00:codex/reviewer-roles
R0Y00:codex/blast-aot
R0Y00:codex/archive-program
R0Y00:codex/crc-stream-program
R0Y00:codex/exe-image-data-chain
R0Y00:codex/local-cpu-fixture-coverage
R0Y00:codex/exe-bound-frame-chain
R0Y00:codex/exe-mapped-comparison
R0Y00:codex/contribution-dependencies
R0Y00:codex/exe-entry-aot
R0Y00:codex/bink-frame-heap-integration
R0Y00:docs/hardware-seven-reports
R0Y00:codex/bink-custom-heap
R0Y00:codex/bink-heap-callers
R0Y00:codex/discussions-entry-points
R0Y00:codex/gpu-community-batch-64
R0Y00:codex/ffx-scratch-writers
R0Y00:codex/generic-project-documentation
R0Y00:codex/ffx-dispatch-rcas
R0Y00:codex/four-windows-gpu-reports
R0Y00:codex/title-neutral-project-wording
R0Y00:codex/community-coverage-provenance
R0Y00:codex/rcas-packed-texels
R0Y00:codex/community-gpu-retests
R0Y00:codex/community-build-and-gpu-reports
R0Y00:codex/ffx-provider-loop
R0Y00:codex/ffx-recurrent-views
R0Y00:codex/ffx-recurrent-resource
R0Y00:codex/amd-wave64-reports
R0Y00:codex/ffx-backend-slots
R0Y00:codex/upscaler-device-init
R0Y00:codex/ffx-context-lifecycle
R0Y00:codex/ffx-version-query
R0Y00:codex/ffx-provider-contract
R0Y00:codex/typed-object-callback
R0Y00:codex/cpu-ordinal-import
R0Y00:codex/chained-cpu-ranges
R0Y00:codex/cpu-import-call
R0Y00:codex/cpu-direct-call
R0Y00:codex/cpu-leaf-aot
R0Y00:codex/community-project-status
R0Y00:codex/script-state-path-replay
R0Y00:codex/script-state-evidence
R0Y00:codex/bc7-resident-tail
R0Y00:codex/bcpack-mip-tail
R0Y00:codex/bc7-texture-draw
R0Y00:codex/asset-ranges
R0Y00:codex/pixel-constants
R0Y00:codex/pixel-aot
R0Y00:codex/pre-exe-workloads
R0Y00:codex/root-signature-device-coverage
R0Y00:engineering/packed-bvh-leaves
R0Y00:engineering/bvh-build-and-update
R0Y00:engineering/intake-root-roundtrip
R0Y00:community/gpu-check-release
R0Y00:community/english-contributor-entry
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
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
R0Y00/Xbox2Windows!3342
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3342"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by romn4rch on 2026-11-28T11:21:34Z.
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).Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-28T21:22:16Z.
Review: APPROVED
LGTM — clean follow-up that wires output-window Close through both host modes.
The approach is consistent with existing session-close patterns in the codebase.
Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-28T21:57:51Z.
Review: APPROVED
LGTM — clean follow-up that wires output-window Close through both host modes.
The approach is consistent with existing session-close patterns in the codebase.
Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T07:08:18Z.
Review: COMMENTED
Reviewed head
a2cb59d5againstmain212d4b5fby reading the diff and git objects, plusgit merge-tree. Nothing was built or run.Verdict: comment. The close handling answers the changes request on #2344, and the
prpreset now lists the affected tests, but the branch conflicts withmain.Conflict in
tools/startup/run.ps1.git merge-tree --write-tree 212d4b5f a2cb59d5exits 1 withCONFLICT (content)there.main(539c3ad5) 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.mainasserts the old minimize-on-close behaviour (WM_CLOSE,SC_CLOSEandminimihave no match undertests/, apart from an unrelated shader check).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.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:
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.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 on5633a0d3.Imported from R0Y00/Xbox2Windows. Originally posted by JohnConnorNPC on 2026-11-29T13:24:36Z.
Review of head
a2cb59d5againstmainc04e0dd6. I read the diff and git objects only; nothing was built or run.This needs a rebase.
git merge-tree --write-tree origin/main a2cb59d5exits 1. Since the earlier review on212d4b5f,mainhas moved, and the branch now conflicts in three files instead of one:tools/startup/run.ps1: the same debugger line as before.mainappends@holdArgs, and this PR appends@windowArgs.tests/startup_run_ps1_check.py:75db835a("default to native shaders") changedrun_caseat the line where this PR adds the--managed-window 1expectation.mainnow hasnative_default = (native or "-Render" in switches) and not translate. Both lines are needed. Every rendered case (translate,native, or-Renderinswitches) passes-Render, so it still expects--managed-window 1.CMakePresets.json: theprtest filter.mainhas added entries to the samenameregex, so keep both sets.Checked, by reading, on the default path: without
-Render,run.ps1passes no--managed-window, anddebug_launch.pycreates no event, so a run without-Renderbehaves as before apart from the newCreateJobObject,SetInformationJobObjectandAssignProcessToJobObjectfailure exits. A direct shim host, with noX2W_SESSION_CLOSE_EVENT, now hides the output window on Close instead of minimizing it, andpresent_to_windowreturns false from then on. That change is documented indocs/startup-runtime.md.MUST
main, resolving the three conflicts above. Then re-runstartup_run_ps1, becausemain's native-default expectations and this PR's--managed-windowexpectation now meet inrun_case.SHOULD / NIT: none beyond the review of 29 November.
Held: not mergeable until rebased.
AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by pigalot on 2026-11-29T13:32:00Z.
Review: CHANGES_REQUESTED
Reviewed
a2cb59d5. It conflicts withmain17b662a2, so I built and tested the PR head on its own (it already containsmainup to7e5c378d), not an integrated tree.I merged
maininto this branch earlier as44f14769(pushed to #2344's branch, which this PR builds on); I checked that resolution again here withgit show --remerge-diff 44f14769. It touches only the four conflicted files:present_to_windowkeepsmain's plane-surface signature with theoutput_closedcheck added, the final window capture keepsnot window_close,run.ps1passes both@captureArgsand@windowArgs, andstartup_run_ps1_check.pyexpects--managed-window 1for-Render, translate and native cases. Nothing else is in it.Blocking: conflicts with
main.git merge-tree --write-tree 17b662a2 a2cb59d5reports 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(75db835a) 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. Builtstartup_present_producerandd3d12_xs_shimindevandrelease, thenctest --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 --checkagainstmainis clean.Mutants (dev build,
startup_output_window_closefor the shim and launcher,startup_run_ps1forrun.ps1): 20 run, 14 killed, 5 survive, 1 equivalent.Killed:
output_closednever set;present_to_windowignoringoutput_closed; reshow step at Close dropped; minimize instead of hide.--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, andif (!sent) return 0;. In both the managed window is also hidden before the job ends it; the test cannot tell.Equivalent:
KillTimerat 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.
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.44f14769. One of the two should be closed as superseded.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 Windowspassed ona2cb59d5.This reply was AI-assisted.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.