xcrdapi: accept the newer IDStorageQueueX IID and CreateQueue at factory slot 10 #337
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
library
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/omonkeyz--xbox-emulator!337
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/337/head"
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?
@GDAgent on GitHub · 2026-11-23 20:30 UTC · original
GDAgent:fix/xcrdapi-queue-x1-slot10→main· +60 −11 · 3 files · 1 commits · closed without mergingLibrary / area:
xcrdapi(abi.rs,objects.rs,tests.rs)Exports changed (exports.txt rows): none
Source of the behaviour: call sites of a very popular AAA title (Xbox Series X build), native Windows 11 on an RDNA2 GPU; not run under Proton.
What
IID_QUEUE_X1(3c02cb0c-c050-4195-99a1-a1ce94ba33c5) is answered by the queue object'sQueryInterfacewith the same object, next toIID_QUEUE_XandIUnknown.IDStorageFactoryXslot 10 was a trap. It now creates a queue: the title passes a 0x20-byte desc, which is the 0x18-byte desc that slot 3 (CreateQueue) already takes plus 8 bytes at+0x18. Slots 3 and 10 share one implementation (create_queue_from); the extra 8 bytes are read, logged as "not modelled" and otherwise ignored.Why / evidence
Static evidence from the title's code (no run reached slot 10 yet):
IDStorageFactoryX.(desc, riid, ppv)likeCreateQueue. The desc is 0x20 bytes: the existing 0x18-byte console queue desc (source type, capacity at 8, priority at 0xa, name at 0x10) plus a u64 at 0x18 that the title sets to 1.3c02cb0c-c050-4195-99a1-a1ce94ba33c5. In.rdatait sits next to the factory IID and the known status-array IID, so it is taken to be the queue interface of the same SDK version.Slots 9 and 11-15 stay traps, so any newer method the title calls stops the run with a named slot instead of running on a guessed ABI.
This is independent of #296, which accepts the newer factory IID (
62959d11-...) infactory_qi. This PR does not touchfactory_qior add that IID, so the two do not conflict; the title needs both to reach slot 10 (with #296 it gets the factory; with this PR slot 10 then creates a queue).Tests
newer_queue_iid_reaches_the_same_queue_and_factory_slot_10_creates_queues: slot 10 with a memory-queue desc (name pointer, capacity, realtime priority, 8 extra bytes) returns S_OK and a queue that answersIID_QUEUE_X,IID_QUEUE_X1andIUnknownwith the same pointer;QueryInfoechoes the first 0x18 desc bytes; an invalid memory-queue priority returnsE_DSTORAGE_INVALID_MEMORY_QUEUE_PRIORITYwith a null out pointer; a null desc returnsE_INVALIDARG; a null out pointer returnsE_POINTER; a file-queue desc works and releases cleanly.cargo test -p xcrdapi: 164 passed, 1 failed. The failure isfixed_result_exports_match_every_console_xcrdapi, which needs consolexcrdapi.dlldumps this machine does not have (it fails the same way onmain). The new test passes.Not verified
+0x18and the behavioural difference between slot 3 and slot 10 queues are not known; this PR only makes slot 10 create the same queue slot 3 does.@omonkeyz on GitHub · 2026-11-25 13:50 UTC · original
Applied on main in
5129361(cherry-picked onto the current history with your authorship kept; comment lines stripped per CONTRIBUTING). Thank you.Pull request closed