Repository navigation
runtime: add initial bring-up shims for xcrdapi, xg_xs, chad, xapu, a… - #9168
canalmaloqueru-design wants to merge 2 commits into
Conversation
Ysergic
left a comment
There was a problem hiding this comment.
AI-assisted independent review at f43e554. Cross-compiled the existing xg_xs test with Clang 23.1.6/MSVC SDK 14.44.17.14 and ran it under Proton Wine 11.0 on Linux x86_64, using the real registry and shim source files. No game files or GPU used. The control passes 16/16 checks; appending this PR's new translation unit produces three assertion failures before the test stops. Also please coordinate the chad.dll entries with the already implemented and independently retested #8848; registering another table for those names would create the same ownership conflict when combined.
| HRESULT WINAPI XGCreateTextureComputer_stub(const void* /*desc*/, void** out) { | ||
| static std::atomic<bool> logged{false}; | ||
| log_once(logged, "xg_xs", "XGCreateTextureComputer -> E_NOTIMPL"); | ||
| if (out) *out = nullptr; |
There was a problem hiding this comment.
[P1] Keep the existing xg_xs handlers instead of replacing them. runtime/shims/xg_xs.cpp already registers both exports, and Table::Table in registry.cpp overwrites an existing key with the last registration. With this translation unit appended as in the new CMake source list, the existing registered-API test changes from 16/16 passing to failures for Suggest's HRESULT, Create(desc, nullptr), and the returned computer. In particular this line clears the computer that the existing implementation deliberately supplies because two documented callers dereference it without checking the failed HRESULT. The replacement therefore reintroduces a null dereference on that path. Remove these duplicate registrations or extend the existing implementation while preserving its measured call contract; the stock xg_xs test should also run with the full installed table set. Reproducer: link runtime/test/xg_xs_test.cpp + shims/registry.cpp + shims/xg_xs.cpp, then append shims/xbox_console_stubs.cpp and rerun the same binary test.
LaugeM
left a comment
There was a problem hiding this comment.
Read at a0238e33 (only a merge of main on top of f43e5540) against main 5d74c2723. This would move the boot backwards, and I'd close it.
- It replaces main's
xg_xs.dllshim.SHIM_TABLE(xbox_console_stubs, …)registersXGCreateTextureComputerandXGSuggestSwizzleModeagain (runtime/shims/xbox_console_stubs.cpp:180-181). The file is added aftershims/process.cpp(runtime/CMakeLists.txt:121), so it links aftershims/xg_xs.cpp(:111), andTable::Table(runtime/shims/registry.cpp:478-480) keeps the last one registered. The stub sets*out = nullptr(xbox_console_stubs.cpp:37-41). Two of the four measured callers ignore the HRESULT and call through*out(main'sruntime/shims/xg_xs.cpp:8-10), which is why main stores an object there. Ysergic's run above showsxg_xs_testfailing once this file is linked in. Confirmed (code read, and Ysergic's test). - The audio init can't pass.
AcpHalCreatereturnsE_NOTIMPL(:116-120), and per #7864 that goes straight to the title'sint3.AcpHalAllocateShapeContexts(:123) takes no argument and returnsS_OKwithout filling the fifth context pointer, which #7864 says the title clears count x 64 bytes through.ApuMapApuAddressalways returns null (:170), and the title tests that result (docs/audio_hal_exe_calls.md).XDspActivate(:52) writes no outputs, the same problem as #7009. Confirmed againstdocs/audio_hal_exe_calls.mdand #7864. XGSuggestSwizzleModehas the wrong shape (:44). The title passes(desc, 0, mode*)(main'sxg_xs.cpp:4), but this stub takes one argument and returns a mode ineax. The 0 reads asS_OKand the mode isn't written, so it happens to do what main does, but the signature is wrong.
#6885 (AcpHal), #6981 (xapu, chad) and #4348 (DStorage) cover the same names with measured shapes, and xg_xs.dll is already on main.
AI-assisted review (Opus 5.5). Read the diff against main; not built.
…nd acphal
Claimed in the coordination issue as:
Depends on:
What and why
Tested
AI-assisted:
Checklist
docs/design.md, with how it was confirmed.