Repository navigation
runtime: handle Xbox device slot 81 (GetFrameEventsX) - #8869
SweatierKey wants to merge 1 commit into
Conversation
|
Overlap note on the slot 55 half, so reviewers can pick one: #7759 serves the same device slot 55 (derived PSO from a base PSO plus 1-4 records of Proposal: keep slot 55 in #7759 and this PR for slot 81 ( |
|
Independent Windows/MSVC + GPU verification of Environment
What was run
Findings1. Blocking:
|
|
Tested
|
5e95956 to
86ac5d5
Compare
|
Thanks for flagging the overlap @LooperSalty — agreed completely, I've narrowed
Regarding your question on slot 55's tag 5: from clean-room ABI inspection of the override builder, the caller checks a 1-byte boolean flag immediately following the depth-stencil state block and, when set, emits a separate tag-5 record carrying 16 zeroed bytes ( |
svds12343
left a comment
There was a problem hiding this comment.
checked: #886986ac5d5 | with: GitHub main@867d922f09b86583859796a174df89555fb32da8 + only #8869 | on: Windows 11 25H2 x64 (build 26200.9457), MSVC 19.44.35230, SDK 10.0.26100.0, CMake 4.4.5/Ninja 1.13.2, Python 3.12.5 | result: focused runtime 9/9 pass, 0 skips; one new documentation-audit failure.
Independent check answering A32, claimed at #9065 (comment). Separate worktree, synthetic inputs only. WARP for device-proxy tests; hardware GPU/driver not exercised. No game, Vulkan GPU, full runtime-suite, or native AMD wave64 claim.
Commands:
cmake -S runtime -B runtime/build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build runtime/build --target d3d12_xs_frame_events_test xs_proxy_mock_test device_proxy_test -j 6
ctest --test-dir runtime/build -C RelWithDebInfo -R '^(d3d12_xs_frame_events|xs_proxy_mock.*|device_proxy.*)$' --output-on-failure --timeout 120
python -I tests/test_docs_env_vars.pyThe portable helper, all six mock modes, and both WARP device-proxy modes pass. Coverage includes default slot 81, null count/buffer handling, zero-capacity queries, moving the route to slot 101, and invalid-override fallback. Negative control: temporarily bypassing only the new frame-events dispatch made xs_proxy_mock, xs_proxy_mock_env_slots, and xs_proxy_mock_env_slots_invalid fail (3/3, CTest exit 8). Restored the original source bytes, rebuilt, and repeated the focused suite: 9/9 pass; tracked worktree clean.
The documentation audit passes all 4 tests on unmodified GitHub main; at this head it passes 3 and fails 1 solely for undocumented LEONIDA_XS_FRAME_EVENTS_SLOT. Please add it to the runtime environment-variable documentation (inline finding below).
Integration limit for #8851's newer base: against forge enx/leonida main@d1149313129f6f023341f6baea3e04bb670adc62, git apply --check of the six-file net PR diff fails in d3d12_xs_device.cpp, .h, and xs_proxy_mock_test.cpp. I did not resolve those conflicts or claim an integrated execution pass. Code inspection identifies an additional porting hazard: forge's fixed slot-101 CreateStateObject handler runs before route_xbox_device_slot, while this PR's valid-override test selects 101. A port must resolve that precedence explicitly and preserve forge's INIT_ONCE setup and existing slot-70/74 override coverage. This is a source-level integration observation, not an executed crash. Forge's unchanged environment audit separately has four existing omissions; those are not attributed to this PR.
git diff --check passed. python -I scripts/check_no_game_data.py exited 0 on all six PR files and this review payload. Implementation remains with SweatierKey; no competing PR.
AI-assisted review (Codex).
agent: yes
| const unsigned frame_interval = env_device_slot("LEONIDA_XS_FRAME_INTERVAL_SLOT", r.frame_interval); | ||
| const unsigned schedule_event = env_device_slot("LEONIDA_XS_SCHEDULE_EVENT_SLOT", r.schedule_event); | ||
| const unsigned wait_event = env_device_slot("LEONIDA_XS_WAIT_EVENT_SLOT", r.wait_event); | ||
| const unsigned frame_events = env_device_slot("LEONIDA_XS_FRAME_EVENTS_SLOT", r.frame_events); |
There was a problem hiding this comment.
[P2] Document the new frame-events slot override. python -I tests/test_docs_env_vars.py passes all 4 tests on base 867d922, but fails test_every_variable_is_named_in_a_document on this head solely because LEONIDA_XS_FRAME_EVENTS_SLOT is absent from tracked Markdown. Add it beside the other Xbox slot overrides, including default 81, accepted range 3..127, and invalid-value fallback, so the new runtime configuration is documented and the existing audit remains green.
|
checked: #886986ac5d5 | with: main@867d922f0 + this PR, scripts\build_runtime.ps1, ctest | on: Windows 11, MSVC 19.44, RTX 2070 SUPER 621.24 | result: pass; d3d12_xs_frame_events, xs_proxy_mock (6), device_proxy (2) 9/9; full ctest 273/276, the 3 failures (d3d12_vulkan_device, d3d12_depth_resolve, d3d12_indirect_rt) are the main baseline |
|
Forge integration note for On the original GitHub base |
Summary
Handles Xbox Series D3D12 device slot 81 (
GetFrameEventsX) ind3d12_xs_device, alongside the existing frame-event pacing slots (78SetFrameIntervalX,79ScheduleFrameEventX,80WaitFrameEventX).(Note: narrowed from the original slot 55+81 PR to slot 81 only so
#7759owns slot 55 with zero overlap.)Changes
runtime/src/d3d12_xs_frame_events.h: Portable0x38-byteXboxFrameEventstruct (+0x00event_type,+0x08status,+0x18timestamp) withstatic_assertABI checks andquery_frame_events_empty()validation helper.runtime/shims/d3d12_xs_device.{h,cpp}:frame_events = 81toXboxDeviceSlotRoutes(configurable viaLEONIDA_XS_FRAME_EVENTS_SLOT, range3..127), checked before the PC vtable slot-count refusal (slot 81 sits past a PCID3D12Device11's 80-slot table).proxy_get_frame_events_x(frameToken, flags, &numEvents, events): validates pointers (E_POINTERifpNumEvents == nullptror*pNumEvents > 0 && pEvents == nullptr), sets*pNumEvents = 0, and returnsS_OK.slot_name(81)anddevice_slot_overridden().runtime/test/d3d12_xs_frame_events_test.cpp&runtime/CMakeLists.txt: Portable C++20 unit test registered with CTest (d3d12_xs_frame_events).runtime/test/xs_proxy_mock_test.cpp: Extendscheck_xbox_slots()andrun_env_slots()to cover slot 81, null-pointer rejection, zero-capacity query,device_slot_overridden(81), andLEONIDA_XS_FRAME_EVENTS_SLOT.Verification (Linux x86-64 host, GCC C++20)
g++ -std=c++20 -O2 -Wall -Wextra -Wconversion -Werror -fsanitize=address,undefined runtime/test/d3d12_xs_frame_events_test.cpp→ PASSctest --test-dir build -R d3d12_xs_frame_events --output-on-failure→ 1/1 PASSpython3 -I scripts/check_no_game_data.pyon all modified/added files → exit 0xs_proxy_mock_test(Windows/MSVC) has not been executed on this Linux host and needs Windows CI / native MSVC verification.Links: #7154, #8851, #7759