Skip to content

d3d12_xs: log CheckFeatureSupport answers at the device proxy (boot.md Q11/Q22) - #4695

Open
kingzzim7-create wants to merge 1 commit into
ItsNotRexed:mainfrom
kingzzim7-create:log-feature-answers
Open

kingzzim7-create wants to merge 1 commit into
ItsNotRexed:mainfrom
kingzzim7-create:log-feature-answers

Conversation

@kingzzim7-create

Copy link
Copy Markdown

Claimed

Claimed on #4683 (RT-310 follow-up: log CheckFeatureSupport answers at the Xbox device proxy).

What and why

docs/boot.md questions 11 and 22 say the CheckFeatureSupport feature id is logged at first boot, but "the answer itself is not logged yet". This PR logs the answer:

Tested

Windows 11, RTX 4060 Ti (driver 621.01), VS 2026 / MSVC 14.52.

  • device_proxy_test checks that the D3D12_OPTIONS answer from the proxy matches the real device byte for byte (memcmp), that the slot 13 hit counter moves, and that device_slot_overridden(13) is true.
  • New CTest device_proxy_feature_log checks that the line is printed (CheckFeatureSupport feature 0 size 60 -> 0x00000000: 01 00 00 00 ...).
  • Negative control: with the old proxy restored, both tests fail. With this change, both pass.
  • Full suite: 155/155.

Note: runtime/CMakeLists.txt adds its test at the same spot as #4650, so whichever lands second needs a small rebase. I'll handle it.

Checklist

  • No game data, keys or decryption; nothing online
  • Tests added and passing
  • Docs updated (docs/boot.md)

AI-assisted: yes (Claude).

@justr4mzi

Copy link
Copy Markdown
Contributor

Verified commit 25b985cc locally on Windows 11 x64 (AMD Radeon RX 6700 XT):

  • Built device_proxy_test, xs_proxy_mock_test, and d3d12_draw_test cleanly ([26/26]).
  • ctest --test-dir build --output-on-failure -R "^(device_proxy|device_proxy_feature_log|xs_proxy_mock|d3d12_draw)$" -V:
    • Standard: 4/4 passed (0.85 sec real: device_proxy, device_proxy_feature_log, xs_proxy_mock, d3d12_draw).
    • LEONIDA_VK_VALIDATION=1: 4/4 passed (0.49 sec real on AMD Radeon RX 6700 XT, 0 validation errors).
    • Observed device_proxy_feature_log output lines:
      • [rt] d3d12_xs: device slot 13 (CheckFeatureSupport (answer logged)) first call
      • [rt] d3d12_xs: CheckFeatureSupport feature 0 size 60 -> 0x00000000: ...
      • [rt] d3d12_xs: CheckFeatureSupport feature 4 size 16 -> 0x00000000: ...
  • Direct device_proxy_test.exe with XS_TRACE=1 and LEONIDA_VK_VALIDATION=1: device_proxy_test: OK (0 failures).
  • Repo checks: tests/test_ctest_registration.py (4/4 in 0.427s), tests/test_docs_*.py (20/20 in 17.179s), scripts/check_no_game_data.py exit 0, git diff --check exit 0.

Reviewed the diff (docs/boot.md, runtime/CMakeLists.txt, runtime/shims/d3d12_xs_device.cpp, runtime/shims/d3d12_xs_device.h, runtime/test/device_proxy_test.cpp); looks clean and consistent.

AI-assisted (Gemini, Antigravity).

@Atomic258

Copy link
Copy Markdown

Tested 25b985cc on Windows 11, MSVC 2022 BuildTools + Ninja, NVIDIA GeForce RTX 5090 (driver 617.42): pass.

  • device_proxy_test: OK (0 failures). The new line shows up at slot 13 as designed: [rt] d3d12_xs: CheckFeatureSupport feature 0 size 60 -> 0x00000000: 01 00 00 00 ... and PASS slot 13 CheckFeatureSupport(OPTIONS) answers as the PC device confirms the proxy's answer matches the real device byte for byte.
  • Full fence/queue/allocator proxy traces remain normal elsewhere in the run.

No game files. AI-assisted (Devin).

@kingzzim7-create

Copy link
Copy Markdown
Author

Thanks for checking it on AMD, good to see the answer lines there too! @justr4mzi

@Kam471 Kam471 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Built and ran device_proxy_test at 25b985cc5 on Windows 11: exit 0, device_proxy_test: OK (0 failures) (heap release, PC device lifetime). git diff --check clean.

D3D12XboxCreateDevice's CheckFeatureSupport answers are now logged at the device proxy, which is what boot.md Q11/Q22 describe; the test covers the logged path. No blocking issue.

@memorypressure

memorypressure commented Nov 23, 2026 •

Copy link
Copy Markdown

Verified the Python side: test_ctest_registration, test_build_runtime_fallback and test_cmake_vulkan_missing all pass. Static review of the C++ is clean: the byte-dump buffer is exactly sized for 64 bytes, the log format matches the new CMake PASS_REGULAR_EXPRESSION including the S_OK spelling, first-call-per-feature dedup is thread-safe, and boot.md rows 11/22 now match what gets printed. The runtime side needs the WARP ctest leg and stands on your Windows run. Clean single commit — no rebase caveat here. AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only run).

Correction (2026-11-23): the rebase/integration-stack note above was wrong — our verifier tracked a stale main ref. Those base commits are current main; this head contains main and merge-trees cleanly against de67135. No rebase needed; the tests-pass verdict stands unchanged. See the correction note on #4421.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants