D3D12.X: unmodelled console resource and counter-set creators fail visibly #3161
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3161"
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 ivall/xcl. Originally posted by KOLESNiii on 2026-11-28T14:35:10Z.
Status: a guess that needs evidence before it can be merged. Which methods device slots #45, #77 and #82 are, and where their out pointers are is reasoned from how titles call the API and from the PC's D3D12; it is not taken from any console documentation, and no title has confirmed it yet. Draft until then.
Evidence that would confirm it: on
mainthis slot is a logged stub, so a title that calls it showsID3D12Device::#45inxcl.logand inreport.json's stubs; anXCL_D3D12_TRACE=1run of such a title shows its arguments (and#77,#82). The retail game used for the regression run does not get there.If you run a title that gets there, please post those lines here (not the whole log, which names your paths).
Device #45 and #77 create a resource whose planes and metadata sit at separate GPU addresses: #45 takes the PC resource desc, #77 the console desc. Device #82 creates a performance-counter set. All three were logging stubs that returned S_OK without writing their out pointer, so a title carried on with whatever its out variable held. They now fail visibly with E_NOTIMPL.
What is in it
device_x.rscreate_resource_at_planes_x(#45) andcreate_resource_at_planes_console_desc_x(#77): E_NOTIMPL, with a null written through the out pointer (the last of their seven arguments).device_x.rscreate_counter_set_x(#82): E_NOTIMPL. Where its out pointer sits is not known, so nothing is written.Each logs one line per slot. They are wired in
real.rs's device console slots.Other unwired device slots (#46/#47 views with the console view desc, #59 default MSAA parameters, #68 GPU hardware configuration) are left as they are. Their argument layout could not be confirmed here, and no title on this PC calls them.
Tested
NVIDIA RTX 2070 SUPER (driver 32.0.16.2140), AMD Ryzen 5 3600XT, Windows 11 build 26300, Rust 1.100.0 MSVC; tests in debug
Rebased onto
main309c3ec5(main's MSAA test fix) on 2026-11-28.cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4onb7c894d5: 2143 passed, 0 failed, 48 ignored; 25 SKIPPED (21no wave64, 3 refused #1426 forms, 1no heap windows).New test
device_x::tests::unmodelled_object_creators_return_e_notimpl_and_a_null_object: ok. It tests the new functions.Regression run
RTX 2070 SUPER, the retail game, 60 s,
XCL_PRESS_AT=25:A,XCL_PREPARE=0(no startup shader preparation), release builds, one queue job (main, then #3161) with the same starting DXIL cache for every run.main:This PR's head:
Not tested
A title that calls #45, #77 or #82: none on this PC. The retail game calls none of them, so the smoke run does not reach this code.
The regression runs skip startup shader preparation (
XCL_PREPARE=0), onmainand on this PR alike.AMD GPUs.
AI use
Claude Code, Claude Opus 5.5 (earlier steps of this session ran on Claude Sonnet 5.5): wrote the code, the test and this description; ran the tests.
Claude Code (Claude Opus 5.5) rebased it onto
main309c3ec5, ran the suite and the regression runs and updated this description.🤖 Generated with Claude Code
Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-28T16:26:34Z.
Tested
Independently reran the pinned xcl library test executable for
b7c894d5e4e63b4229396c6a5da19ca599376781on Windows 11 x64 build 26200.9974 with a Ryzen 7 3800X. The executable was built with Rust 1.100.1 (x86_64 MSVC) from the exact-head source plus one private#[cfg(test)]fixture. I verified the source provenance and reran the existing binary.Both native processes exited 0. Total was 2 passed, 0 failed, 0 ignored, 0 skipped. Slots 45, 77, and 82 each occurred once in the production console device slot table and matched their typed handlers. Calls through those entries returned
E_NOTIMPL(0x80004001). Slots 45 and 77 cleared the output cell while preserving both guards and the marker. They also returnedE_NOTIMPLwhen given a null output parameter. The fixture called slot 82 with its declared receiver argument.Not tested
Live vtable adoption, COM devices, undocumented slot 82 output ABI, GPU, title smoke, and the workspace suite.
AI use
T3 Code through Codex (
gpt-6.2-sol, high) prepared the private fixture, verified the source and executable pins, independently reran both tests, and drafted this report.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T09:39:15Z.
Triage (#1607) – head
ca739fbNo open or merged PR maps device slots #45, #77 or #82. The author's related device-slot PRs (#3135 for #83-#126, #3136 for the *1 / *2 resource methods, #3144 for #124) cover other slots.
No problems found in the diff. The slot meanings and the argument layout of #45 / #77 are inferred, not confirmed by a title. A title that ignored the old S_OK stub's result will now see E_NOTIMPL, which is the intent.
Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T10:02:01Z.
Review (head
ca739fb, diff read, not a merge-check; draft,PR descriptionred: its smoke block namesb7c894d5):device_x.rs~590, ~598). That argument is on the stack, and no title has been seen calling these slots. If the real method takes fewer arguments,outis whatever the caller left there, andis_null()doesn't catch that. Main's stub writes nothing. Returning E_NOTIMPL without writing would keep the visible failure without that risk.real.rs,console_extensions~1532). A title that ignores the result, for example a profiling counter set at #82, now takes an error path (unverified that any does).real.rs~1588, ~1605, ~1612).uma_drivertest that couldn't restore the coherent window and ended the lib test binary; main at493dbd3dis green. A rerun should tell.Fine: logged once per slot, and the slot numbers don't collide with existing device slots.
AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-12-02T14:47:01Z.
@Foniass fixed: #45 and #77 no longer write through the seventh argument. All three stubs now return E_NOTIMPL and write nothing, because no title has been seen calling them, so where their out pointers sit is not known (
device_x.rs). The test calls them with the seven arguments they were thought to take and checks the seventh is left alone. It fails on the previous head. New head06b8ac0c(rebased ontomaindf0cfef6, which also takes care of the red CI run). How the slot / field meanings were obtained is a question for the PR author, who will answer it here; I have not changed them.— Claude Code (Claude Opus 5.5), on behalf of the PR author
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-02T14:49:10Z.
Follow-up review (head
06b8ac0c, sinceca739fb, diff read, not a merge-check; draft, checks red):thisand returnE_NOTIMPLwithout writing anything (device_x.rs), andunmodelled_object_creators_return_e_notimpl_and_write_nothingcalls #45 / #77 with seven arguments and checks the out value is left alone.real.rs.New: none.
AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.