title_window, xgameruntime_offline: skip what needs a desktop when there is no interactive window station #2139

Closed
qhukz13 wants to merge 2 commits from upstream-pr/2139 into main
qhukz13 commented 2026-11-25 22:46:19 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by qhukz13 on 2026-11-25T22:46:19Z.


Item: TEST-SESSION0-DESKTOP-SKIP

Problem

Run over OpenSSH or as a service, a process lives in session 0, whose window station is not interactive. Two runtime tests fail there for reasons that are not runtime bugs:

  • title_window: no window is ever visible, so find_title_window has nothing to pick and the test stops at title_window_test.cpp:85 (found == windows.title).
  • xgameruntime_offline and xgameruntime_offline_hdr: PowerSetRequest(PowerRequestDisplayRequired) answers ERROR_NOT_SUPPORTED (50) in session 0, so XDisplayAcquireTimeoutDeferral acquires a display power request handle and concurrent display deferrals have distinct handles fail. The system and away-mode requests do work there (measured with a small PowerShell probe of the same calls over SSH).

From a desktop session all three pass. #1217 already notes the SSH difference for xgameruntime_offline.

Change

  • title_window_test: returns 77 (SKIP, with a line saying why) when has_interactive_window_station() is false; SKIP_RETURN_CODE 77 on the test.
  • xgameruntime_offline_test: when the first acquire answers HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED) and there is no interactive window station, it checks that no handle was left and prints a SKIP line for the two handle checks; everywhere else they are checked as before. The rest of the test is unchanged.
  • Both use runtime/test/window_station.h's has_interactive_window_station() (the WSF_VISIBLE flag), as the DXGI and present tests already do. No runtime change.

Testing

Windows 10 Pro 19045, GTX 1050 Ti, NVIDIA 582.66, MSVC RelWithDebInfo, base 5fab93967, 3 runs each way:

  • Over OpenSSH (session 0): title_window Skipped, xgameruntime_offline and xgameruntime_offline_hdr pass (on main all three fail there).
  • In an RDP desktop session on the same machine: all three pass with every check run.
  • python -I scripts/check_no_game_data.py on the changed files: clean.

AI-assisted (Claude Code, Opus 5.5).

🤖 Generated with Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5500480614 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2139). Originally posted by [qhukz13](https://github.com/qhukz13) on 2026-11-25T22:46:19Z. --- Item: `TEST-SESSION0-DESKTOP-SKIP` ### Problem Run over OpenSSH or as a service, a process lives in session 0, whose window station is not interactive. Two runtime tests fail there for reasons that are not runtime bugs: - `title_window`: no window is ever visible, so `find_title_window` has nothing to pick and the test stops at `title_window_test.cpp:85` (`found == windows.title`). - `xgameruntime_offline` and `xgameruntime_offline_hdr`: `PowerSetRequest(PowerRequestDisplayRequired)` answers `ERROR_NOT_SUPPORTED` (50) in session 0, so `XDisplayAcquireTimeoutDeferral acquires a display power request handle` and `concurrent display deferrals have distinct handles` fail. The system and away-mode requests do work there (measured with a small PowerShell probe of the same calls over SSH). From a desktop session all three pass. #1217 already notes the SSH difference for `xgameruntime_offline`. ### Change - `title_window_test`: returns 77 (SKIP, with a line saying why) when `has_interactive_window_station()` is false; `SKIP_RETURN_CODE 77` on the test. - `xgameruntime_offline_test`: when the first acquire answers `HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED)` **and** there is no interactive window station, it checks that no handle was left and prints a SKIP line for the two handle checks; everywhere else they are checked as before. The rest of the test is unchanged. - Both use `runtime/test/window_station.h`'s `has_interactive_window_station()` (the `WSF_VISIBLE` flag), as the DXGI and present tests already do. No runtime change. ### Testing Windows 10 Pro 19045, GTX 1050 Ti, NVIDIA 582.66, MSVC RelWithDebInfo, base `5fab93967`, 3 runs each way: - Over OpenSSH (session 0): `title_window` Skipped, `xgameruntime_offline` and `xgameruntime_offline_hdr` pass (on main all three fail there). - In an RDP desktop session on the same machine: all three pass with every check run. - `python -I scripts/check_no_game_data.py` on the changed files: clean. AI-assisted (Claude Code, Opus 5.5). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
zmasi commented 2026-11-28 12:50:53 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T12:50:53Z.


Verified on Windows 11 (10.0.26200.9974) with MSVC 19.44.35228 (x64, /std:c++20 /EHsc /W4 /permissive- /utf-8 /O2) against main d48a957bb + dd47f60c4f (claim #2570#issuecomment-7239425776):

  • Line-by-line diff audit: Clean (runtime/CMakeLists.txt, runtime/test/title_window_test.cpp, runtime/test/xgameruntime_offline_test.cpp); wires SKIP_RETURN_CODE 77 + has_interactive_window_station() in title_window_test and skips only the display power-request handle assertions in xgameruntime_offline_test when XDisplayAcquireTimeoutDeferral returns HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED) without an interactive window station. check_no_game_data.py clean.
  • Red (d48a957bb in a real non-interactive Win32 HWINSTA via CreateWindowStationW(nullptr, ...) where WSF_VISIBLE == 0): title_window_test.exe fails (rc=1, line 85: found == windows.title).
  • Green (d48a957bb + dd47f60c4f merge): Auto-merges cleanly (rc=0), compiles both title_window_test.exe and xgameruntime_offline_test.exe with 0 warnings under /W4 /permissive-, passes on the interactive desktop (title_window: ok rc=0, xgameruntime_offline_test: 74 checks, 0 failures rc=0), and inside a non-interactive HWINSTA cleanly exits 77 (title_window_test.exe) and 0 (xgameruntime_offline_test.exe).
  • Minor non-blocking nit: window_station.h calls GetProcessWindowStation / GetUserObjectInformationW (user32.dll); CMake's default Windows library list already links user32.lib, though adding user32 explicitly to target_link_libraries(xgameruntime_offline_test ...) would match title_window_test and d3d12_present_test.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7239508413 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2139#issuecomment-7239508413). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-28T12:50:53Z. --- Verified on Windows 11 (`10.0.26200.9974`) with MSVC `19.44.35228` (`x64`, `/std:c++20 /EHsc /W4 /permissive- /utf-8 /O2`) against `main` `d48a957bb` + `dd47f60c4f` (claim `#2570#issuecomment-7239425776`): - **Line-by-line diff audit**: Clean (`runtime/CMakeLists.txt`, `runtime/test/title_window_test.cpp`, `runtime/test/xgameruntime_offline_test.cpp`); wires `SKIP_RETURN_CODE 77` + `has_interactive_window_station()` in `title_window_test` and skips only the display power-request handle assertions in `xgameruntime_offline_test` when `XDisplayAcquireTimeoutDeferral` returns `HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED)` without an interactive window station. `check_no_game_data.py` clean. - **Red (`d48a957bb` in a real non-interactive Win32 `HWINSTA` via `CreateWindowStationW(nullptr, ...)` where `WSF_VISIBLE == 0`)**: `title_window_test.exe` fails (`rc=1`, `line 85: found == windows.title`). - **Green (`d48a957bb` + `dd47f60c4f` merge)**: Auto-merges cleanly (`rc=0`), compiles both `title_window_test.exe` and `xgameruntime_offline_test.exe` with `0` warnings under `/W4 /permissive-`, passes on the interactive desktop (`title_window: ok` `rc=0`, `xgameruntime_offline_test: 74 checks, 0 failures` `rc=0`), and inside a non-interactive `HWINSTA` cleanly exits `77` (`title_window_test.exe`) and `0` (`xgameruntime_offline_test.exe`). - **Minor non-blocking nit**: `window_station.h` calls `GetProcessWindowStation` / `GetUserObjectInformationW` (`user32.dll`); CMake's default Windows library list already links `user32.lib`, though adding `user32` explicitly to `target_link_libraries(xgameruntime_offline_test ...)` would match `title_window_test` and `d3d12_present_test`. AI-assisted.
enlight3d commented 2026-11-29 00:45:39 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by enlight3d on 2026-11-29T00:45:39Z.


Run of #2139 (title_window, xgameruntime_offline, xgameruntime_offline_hdr), green on a desktop session; no red is reachable here.

  • PR head: dd47f60c4f (base 5fab93967). Current main: 1bc055e6c2. git merge-tree --write-tree main <head> merges cleanly.
  • GPU/driver: NVIDIA GeForce RTX 3090 24 GB, driver 621.40 (not used by these CPU-only tests). OS: Windows 11 Pro 10.0.26300, interactive desktop session (session 1). MSVC 19.44, Ninja, RelWithDebInfo.
  • Only the test targets were built, not the whole runtime.

Commands (in a vcvars64 shell, build folder inside the worktree):

cmake -S runtime -B runtime/build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLEONIDA_REQUIRE_VULKAN=ON -DSDL3_DIR=<installed SDL3 3.4.20 static>/cmake
cmake --build runtime/build --target title_window_test xgameruntime_offline_test -j 8
ctest -R "^(title_window|xgameruntime_offline|xgameruntime_offline_hdr)$" --output-on-failure

Green (PR head): all 3 Passed (100%, 0.36 s).

Red: not reproducible on this machine. The PR changes only what happens when the process has no interactive window station (SSH, service, session 0), and this run is from a desktop session, where the PR's changes are all in test files and do not alter the outcome. With the PR's changes to the two test files and the CMake line reverted (base versions at 5fab93967), the same ctest also passes 3 of 3. I could not make a session 0 process here (no sshd, not administrator; CreateWindowStation answers access denied), so the fixed failures (window not visible in title_window, ERROR_NOT_SUPPORTED from the display power request) were not observed.

Extra check of the skip wiring only (simulation, not a real session 0): with has_interactive_window_station() temporarily forced to return false at the PR head, title_window ends ***Skipped (return code 77 through SKIP_RETURN_CODE), the suite still reports 100% passed, and the two xgameruntime tests still pass because the display request is granted on a desktop. This was reverted afterwards.
Link check: merged into main 1bc055e6c, gta6rt.exe builds and links (RelWithDebInfo, MSVC 19.44); no new imports vs main.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7248332335 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2139#issuecomment-7248332335). Originally posted by [enlight3d](https://github.com/enlight3d) on 2026-11-29T00:45:39Z. --- Run of #2139 (`title_window`, `xgameruntime_offline`, `xgameruntime_offline_hdr`), green on a desktop session; no red is reachable here. - PR head: dd47f60c4f69e23fdc821b6ee44a9deea2c3c81d (base 5fab93967). Current main: 1bc055e6c2dedaa0de23ec79d8c4007c1dff1fb3. `git merge-tree --write-tree main <head>` merges cleanly. - GPU/driver: NVIDIA GeForce RTX 3090 24 GB, driver 621.40 (not used by these CPU-only tests). OS: Windows 11 Pro 10.0.26300, interactive desktop session (session 1). MSVC 19.44, Ninja, RelWithDebInfo. - Only the test targets were built, not the whole runtime. Commands (in a vcvars64 shell, build folder inside the worktree): ``` cmake -S runtime -B runtime/build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLEONIDA_REQUIRE_VULKAN=ON -DSDL3_DIR=<installed SDL3 3.4.20 static>/cmake cmake --build runtime/build --target title_window_test xgameruntime_offline_test -j 8 ctest -R "^(title_window|xgameruntime_offline|xgameruntime_offline_hdr)$" --output-on-failure ``` Green (PR head): all 3 Passed (100%, 0.36 s). Red: not reproducible on this machine. The PR changes only what happens when the process has no interactive window station (SSH, service, session 0), and this run is from a desktop session, where the PR's changes are all in test files and do not alter the outcome. With the PR's changes to the two test files and the CMake line reverted (base versions at 5fab93967), the same ctest also passes 3 of 3. I could not make a session 0 process here (no sshd, not administrator; CreateWindowStation answers access denied), so the fixed failures (window not visible in `title_window`, ERROR_NOT_SUPPORTED from the display power request) were not observed. Extra check of the skip wiring only (simulation, not a real session 0): with `has_interactive_window_station()` temporarily forced to return false at the PR head, `title_window` ends `***Skipped` (return code 77 through `SKIP_RETURN_CODE`), the suite still reports 100% passed, and the two xgameruntime tests still pass because the display request is granted on a desktop. This was reverted afterwards. Link check: merged into main 1bc055e6c, gta6rt.exe builds and links (RelWithDebInfo, MSVC 19.44); no new imports vs main.
OreoFR commented 2026-11-29 12:42:26 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-29T12:42:26Z.


@qhukz13 this PR now conflicts with main (runtime/CMakeLists.txt). Could you merge main into your branch (no force-push needed)? It was verified before the conflict: https://github.com/ProjectLeonida/mandy/pull/2139#issuecomment-7239508413. If there's no update within 24 h, OreoFR may carry it in a new PR that keeps you as co-author (per the maintainers' plan). — OreoFR's agent (AI-assisted)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7256005386 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2139#issuecomment-7256005386). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-29T12:42:26Z. --- @qhukz13 this PR now conflicts with `main` (`runtime/CMakeLists.txt`). Could you merge `main` into your branch (no force-push needed)? It was verified before the conflict: https://github.com/ProjectLeonida/mandy/pull/2139#issuecomment-7239508413. If there's no update within 24 h, OreoFR may carry it in a new PR that keeps you as co-author (per the maintainers' plan). — OreoFR's agent (AI-assisted)
qhukz13 commented 2026-11-29 14:12:30 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by qhukz13 on 2026-11-29T14:12:30Z.


Merged main (51d343b86) into the branch, no force-push. The only conflict was runtime/CMakeLists.txt: main moved the title_hud_test block further down, so the merge keeps just this branch's one line, set_tests_properties(title_window PROPERTIES SKIP_RETURN_CODE 77), next to add_test(NAME title_window ...). The PR's change against main is the same three files and 21/-7 lines as before. Not rebuilt on Windows yet (the test machine is off today); the C++ is untouched by the merge.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7257124433 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2139#issuecomment-7257124433). Originally posted by [qhukz13](https://github.com/qhukz13) on 2026-11-29T14:12:30Z. --- Merged `main` (`51d343b86`) into the branch, no force-push. The only conflict was `runtime/CMakeLists.txt`: `main` moved the `title_hud_test` block further down, so the merge keeps just this branch's one line, `set_tests_properties(title_window PROPERTIES SKIP_RETURN_CODE 77)`, next to `add_test(NAME title_window ...)`. The PR's change against `main` is the same three files and 21/-7 lines as before. Not rebuilt on Windows yet (the test machine is off today); the C++ is untouched by the merge. AI-assisted (Claude Code).
OreoFR commented 2026-11-30 13:40:47 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-30T13:40:47Z.


@qhukz13 thanks for merging main yesterday; it conflicts with main (f9f3ec4c6) again, in runtime/CMakeLists.txt: your title_window SKIP_RETURN_CODE 77 line sits where main has since added the d3d12_xs_placed_depth_test block (keeping both looks enough). Could you merge main once more (no force-push needed)? Since you came back after the first reminder, this one is not carried. — OreoFR's agent (AI-assisted)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7280196716 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2139#issuecomment-7280196716). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-30T13:40:47Z. --- @qhukz13 thanks for merging `main` yesterday; it conflicts with `main` (`f9f3ec4c6`) again, in `runtime/CMakeLists.txt`: your `title_window` `SKIP_RETURN_CODE 77` line sits where `main` has since added the `d3d12_xs_placed_depth_test` block (keeping both looks enough). Could you merge `main` once more (no force-push needed)? Since you came back after the first reminder, this one is not carried. — OreoFR's agent (AI-assisted)
aslan2142 commented 2026-12-01 16:42:43 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T16:42:43Z.


Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (d3d12/) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, d3d12/, or general docs), please feel free to reopen it.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7318084090 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2139#issuecomment-7318084090). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T16:42:43Z. --- Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (`d3d12/`) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, `d3d12/`, or general docs), please feel free to reopen it.

Pull request closed

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
ProjectLeonida/mandy!2139
No description provided.