startup_stubs: guard window presenter surface and close state #1484
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1491"
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 tedin7 on 2026-11-24T12:51:01Z.
Summary
x2w_startup::present_surface_supported(const D3D12_RESOURCE_DESC&)insrc/startup_stubs/present_view_format.hto reject non-2D, multisampled,D3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE, and unsupported/unknown-format surfaces before creating an SRV.present_to_windowinsrc/startup_stubs/d3d12_present.inlagainstqueue == nullptr,surface == nullptr, and unsupported surface descriptors.window_presenter.failed = truewhenp.list->Close()fails inpresent_to_window(and propagatep.list->Close()failure increate_window_presenter) so subsequent frames do not repeatedly callReset()on an unclosed command list.tests/startup_present_view_check.cppwith pure and WARP checks coveringD3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE, non-2D/MSAA/unknown-format refusal, and valid SRV-eligible surfaces, and document the guard indocs/startup-runtime.md.Verification
git diff --check origin/main..HEADpython3 tests/docs_links_check.pypython3 tests/bidi_controls_check.pypython3 /root/.local/state/xbox2windows/pipeline/x2w_pipe.py preflight /root/wt/x2w-h-w3-present/O2:startup_present_view_check(^startup_present_view)AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T12:59:31Z.
Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
b61a2359b980ecdc816ad4848dee9c4fa9eadc14:--preset dev):ctest --preset dev -R '^startup_present_view' --no-tests=error --output-on-failure: 4 passed;startup_present_view_hardwareskipped (capability, not a pass)./O2(--preset release): same command with--preset release: 4 passed;startup_present_view_hardwareskipped (capability, not a pass).Pre-promote review added a zero Width/Height refusal in
present_surface_supported()with two negative controls (13 surface checks).AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T12:59:40Z.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
b61a235ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.