Repository navigation
dxgi_device, dxgi_swapchain: skip what needs a desktop when the process has no interactive window station - #6301
Conversation
…ss has no interactive window station From an SSH session or a service the host DXGI answers DXGI_ERROR_NOT_CURRENTLY_AVAILABLE (0x887a0022) to EnumOutputs and to every CreateSwapChainForHwnd, so dxgi_device failed its EnumOutputs check on the host pass and dxgi_swapchain reported 40 of 45 descriptions as differing from the host. Both pass from a desktop session. dxgi_swapchain now skips (exit 77) without an interactive window station, as d3d12_present_test does since TEST-200; dxgi_device accepts DXGI_ERROR_NOT_CURRENTLY_AVAILABLE from EnumOutputs only there and keeps its other checks. The check moves from d3d12_present_test.cpp to window_station.h, shared by the three tests.
|
Tested head Interactive desktop session results:
All 3/3 tests pass with full strictness in interactive desktop mode. Code review confirms |
shayderrr
left a comment
There was a problem hiding this comment.
Review
Reviewed change in PR #6301: dxgi_device, dxgi_swapchain: skip what needs a desktop when the process has no interactive window station.
Scope: runtime/test/d3d12_present_test.cpp, runtime/test/dxgi_device_test.cpp, runtime/test/dxgi_swapchain_test.cpp, +1 more
Diff: +27 / -10 across 4 file(s).
The change stays inside the stated scope and the touched files line up with the description. No unrelated production paths are pulled in, and the stated behavior is directly exercised by the diff. I'm approving this one.
Reviewed by shayderrr via automated batch review.
Kam471
left a comment
There was a problem hiding this comment.
Head 42d9f698e, based on main 561b65a83 (0 behind); git diff --check clean.
Built dxgi_device_test dxgi_swapchain_test d3d12_present_test with VS 2022 BuildTools + Ninja, RelWithDebInfo, Vulkan 1.4.363, BUILD_TESTING=ON, LEONIDA_BUILD_WINDOWS_RUNTIME=ON.
dxgi_device_test.exe:3 backend(s) passed, exit 0dxgi_swapchain_test.exe:45 descriptions compared ... 0 mismatches, PASS, exit 0d3d12_present_test.exe:70 frames ..., exit 0- Temporarily forced the new helper false:
dxgi_swapchain_testprintsSKIP: the process has no interactive window station, exit 77;dxgi_device_teststill passes.
Test-only (no runtime change); the header refactor is shared by the three tests. First-frame impact: none. LGTM.
|
Thanks @kour0 - I went through this change and the diff around runtime/test/d3d12_present_test.cpp. The change is tight, the rationale matches the code, and nothing here needs another pass from my side. Approved and squash-merging it into main now. Nice work. |
Claimed in the coordination issue as: new finding, #6089 (comment)
What and why
Run from a process without an interactive window station (an SSH session, a service),
dxgi_deviceanddxgi_swapchainfail instead of skipping. There the host DXGI answersDXGI_ERROR_NOT_CURRENTLY_AVAILABLE(0x887a0022):dxgi_device: the host WARP pass stops at(output_hr == S_OK && output.p) || (output_hr == DXGI_ERROR_NOT_FOUND && !output.p), becauseEnumOutputs(0)returns0x887a0022.dxgi_swapchain: every hostCreateSwapChainForHwndreturns0x887a0022, so 40 of 45 descriptions "differ from the host runtime".Both pass from a desktop session on the same machine, and both already declare
SKIP_RETURN_CODE 77.Changes (tests only, no runtime change):
dxgi_swapchainskips without an interactive window station, asd3d12_present_testdoes since TEST-200 ([TEST-200] Make M1 CTest skips accurate #1391).dxgi_deviceacceptsDXGI_ERROR_NOT_CURRENTLY_AVAILABLEfromEnumOutputsonly there, with no output, and keeps its other checks. From a desktop the check is as strict as before.has_interactive_window_station()moves fromd3d12_present_test.cpptoruntime/test/window_station.h, shared by the three tests. Its body is unchanged.Merges cleanly with #6078, which also touches
d3d12_present_test.cpp.Tested
Windows 11 (build 26300), MSVC RelWithDebInfo (
scripts/build_runtime.ps1), NVIDIA GeForce RTX 4070 Ti SUPER, driver 621.01, at42d9f698eon main561b65a83:dxgi_devicefails,dxgi_swapchainfails,d3d12_presentskippeddxgi_devicepasses,dxgi_swapchainskipped,d3d12_presentskipped/it)EnumOutputs' result on the host pass gavehr=0x887a0022,output=nullptrover SSH.-j 8): 245/247; the two failures ared3d12_indirect_rt(d3d12: an ARRAY_OF_POINTERS entry below the arena is not an overflow (d3d12_indirect_rt on NVIDIA) #6010) andd3d12_indirect_dispatch_count(d3d12_indirect_dispatch_count_test: its compute fixture reads the root UAV at s4:s5 (D3D-448 layout) #5792), as on main.AI-assisted: yes
Checklist
docs/design.md, with how it was confirmed. (Not applicable: no translator change.)🤖 Generated with Claude Code