D3D12.X: console device slots for the *1 / *2 resource methods use the console's descriptions #3136

Open
KOLESNiii wants to merge 1 commit from upstream-pr/3136 into main
KOLESNiii commented 2026-11-28 13:01:28 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-28T13:01:28Z.


Status: a guess that needs evidence before it can be merged. Which resource / heap methods device slots #92-#95, #109, #110, #112, #128 and #129 are, and that they take the console's resource description 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 main this slot is a logged stub, so a title that calls it shows ID3D12Device::#92 in xcl.log and in report.json's stubs; an XCL_D3D12_TRACE=1 run of such a title shows its arguments (and the other slots); a desc whose bytes read as the console's resource desc, not the PC's, confirms it. 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).

The console device has the PC's newer device methods at fixed distances from their PC slots

(#86, #108 and #127 are handled there already). Its resource and heap variants fell into the

console-extension stub, which answers S_OK with the out pointer untouched, so a title got a NULL

resource or heap, or no size, back:

#92 CreateCommittedResource1 #93 CreateHeap1 #94 CreateReservedResource1

#95 GetResourceAllocationInfo1 #109 CreateCommittedResource2 #110 CreatePlacedResource1

#112 GetCopyableFootprints1 #128 CreatePlacedResource2 #129 CreateReservedResource2

Each now hands its console description to the console method of its base form (#27, #28, #30,

#25, #29, #38): a DESC1's first 0x38 bytes are the console resource desc, a barrier layout

becomes the state it starts in (as #127 / #133), and a protected session or castable formats are

dropped. #95 shares #108's per-description loop, with its own stride (0x38 rather than 0x48).

The identities are from a console API audit; no log yet shows a title calling these.

What is in it

  • crates/xcl/src/hle/d3d12x/device_x.rs: +84 / -1

  • crates/xcl/src/hle/d3d12x/real.rs: +60 / -0

  • new tests: newer_allocation_info_reads_each_description_at_its_stride

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

  • cargo test --workspace --no-fail-fast -- --test-threads=4 on 172b0bd6 (built on main 336fddda; it merges into the current main e429936c without conflict): 2123 passed, 9 failed, 48 ignored, 25 SKIPPED lines (21 no wave64, 3 #1426, 1 no heap windows).

  • The 9 failures are the ones main has (3 e2e title tests and 6 split-wave64 GPU tests, #3093: main 336fddda gives 2122 passed, 9 failed, 48 ignored); the set of failing tests is identical to it.

  • newer_allocation_info_reads_each_description_at_its_stride: ok in that run; fails without the change

Regression run

Both 60-second runs used the same warm DXIL cache directory.


xcl-smoke v1

commit: 336fdddafbcb3c3db753629f5f79a9f44b6c4b9d

gpu: NVIDIA GeForce RTX 2070 SUPER

title: retail game

seconds: 60

exit: 0x0

frames shown: 1228 (PresentX 1228)

presents per 2 s (last 3): 61 60 60

device removals: 0

crashes: 0

peak commit: 15234 MB


xcl-smoke v1

commit: 172b0bd6202b8ec184b81f2c34ea6ffc8715b9d0

gpu: NVIDIA GeForce RTX 2070 SUPER

title: retail game

seconds: 60

exit: 0x0

frames shown: 1396 (PresentX 1396)

presents per 2 s (last 3): 62 60 60

device removals: 0

crashes: 0

peak commit: 15906 MB

Not tested

  • Full preparation. The smoke runs used XCL_PREPARE=0.

  • A title creating resources through #92-#95, #109, #110, #112, #128, #129: none is in the retail game's log.

  • CreateCommandList1 (#90) and CreateSampler2 (#130) are not here (they need console list / heap handling); #124 is its own PR.

  • AMD and Intel GPUs; wave64 hardware (the RTX 2070 SUPER is wave32).

AI use

  • Codex (exact model name unavailable) verified the queued smoke results and drafted this description update.

  • Claude Code, Claude Opus 5.5: the code and tests. The description and the test / suite runs: Claude Code, Claude Sonnet 5.5 and Claude Opus 5.5.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:5540376414 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3136). Originally posted by [KOLESNiii](https://github.com/KOLESNiii) on 2026-11-28T13:01:28Z. --- **Status: a guess that needs evidence before it can be merged.** Which resource / heap methods device slots #92-#95, #109, #110, #112, #128 and #129 are, and that they take the console's resource description 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 `main` this slot is a logged stub, so a title that calls it shows `ID3D12Device::#92` in `xcl.log` and in `report.json`'s stubs; an `XCL_D3D12_TRACE=1` run of such a title shows its arguments (and the other slots); a desc whose bytes read as the console's resource desc, not the PC's, confirms it. 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). The console device has the PC's newer device methods at fixed distances from their PC slots (#86, #108 and #127 are handled there already). Its resource and heap variants fell into the console-extension stub, which answers S_OK with the out pointer untouched, so a title got a NULL resource or heap, or no size, back: #92 CreateCommittedResource1 #93 CreateHeap1 #94 CreateReservedResource1 #95 GetResourceAllocationInfo1 #109 CreateCommittedResource2 #110 CreatePlacedResource1 #112 GetCopyableFootprints1 #128 CreatePlacedResource2 #129 CreateReservedResource2 Each now hands its console description to the console method of its base form (#27, #28, #30, #25, #29, #38): a DESC1's first 0x38 bytes are the console resource desc, a barrier layout becomes the state it starts in (as #127 / #133), and a protected session or castable formats are dropped. #95 shares #108's per-description loop, with its own stride (0x38 rather than 0x48). The identities are from a console API audit; no log yet shows a title calling these. **What is in it** - `crates/xcl/src/hle/d3d12x/device_x.rs`: +84 / -1 - `crates/xcl/src/hle/d3d12x/real.rs`: +60 / -0 - new tests: `newer_allocation_info_reads_each_description_at_its_stride` **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 - `cargo test --workspace --no-fail-fast -- --test-threads=4` on `172b0bd6` (built on `main` `336fddda`; it merges into the current `main` `e429936c` without conflict): 2123 passed, 9 failed, 48 ignored, 25 `SKIPPED` lines (21 no wave64, 3 #1426, 1 no heap windows). - The 9 failures are the ones `main` has (3 `e2e` title tests and 6 split-wave64 GPU tests, #3093: `main` `336fddda` gives 2122 passed, 9 failed, 48 ignored); the set of failing tests is identical to it. - `newer_allocation_info_reads_each_description_at_its_stride`: ok in that run; fails without the change **Regression run** Both 60-second runs used the same warm DXIL cache directory. ``` xcl-smoke v1 commit: 336fdddafbcb3c3db753629f5f79a9f44b6c4b9d gpu: NVIDIA GeForce RTX 2070 SUPER title: retail game seconds: 60 exit: 0x0 frames shown: 1228 (PresentX 1228) presents per 2 s (last 3): 61 60 60 device removals: 0 crashes: 0 peak commit: 15234 MB ``` ``` xcl-smoke v1 commit: 172b0bd6202b8ec184b81f2c34ea6ffc8715b9d0 gpu: NVIDIA GeForce RTX 2070 SUPER title: retail game seconds: 60 exit: 0x0 frames shown: 1396 (PresentX 1396) presents per 2 s (last 3): 62 60 60 device removals: 0 crashes: 0 peak commit: 15906 MB ``` **Not tested** - Full preparation. The smoke runs used `XCL_PREPARE=0`. - A title creating resources through #92-#95, #109, #110, #112, #128, #129: none is in the retail game's log. - CreateCommandList1 (#90) and CreateSampler2 (#130) are not here (they need console list / heap handling); #124 is its own PR. - AMD and Intel GPUs; wave64 hardware (the RTX 2070 SUPER is wave32). **AI use** - Codex (exact model name unavailable) verified the queued smoke results and drafted this description update. - Claude Code, Claude Opus 5.5: the code and tests. The description and the test / suite runs: Claude Code, Claude Sonnet 5.5 and Claude Opus 5.5. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Foniass commented 2026-12-01 09:34:09 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T09:34:09Z.


Triage (#1607) – head 172b0bd

No open or merged PR handles device #92-#95, #109, #110, #112, #128 or #129. #3135 (same author) remaps the non-resource slots of the same runs and does not overlap. #3161 covers #45/#77/#82 only.
No problems found in the diff. The argument lists match the PC's CreateCommittedResource1/2, CreateHeap1, CreateReservedResource1/2 and CreatePlacedResource1/2, and #108 keeps its 0x48 stride through allocation_info_each.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7306889385 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3136#issuecomment-7306889385). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T09:34:09Z. --- **Triage (#1607)** – head 172b0bd No open or merged PR handles device #92-#95, #109, #110, #112, #128 or #129. #3135 (same author) remaps the non-resource slots of the same runs and does not overlap. #3161 covers #45/#77/#82 only. No problems found in the diff. The argument lists match the PC's CreateCommittedResource1/2, CreateHeap1, CreateReservedResource1/2 and CreatePlacedResource1/2, and #108 keeps its 0x48 stride through `allocation_info_each`. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Foniass commented 2026-12-01 10:22:28 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T10:22:28Z.


Review (head 172b0bd6, diff read, not a merge-check; draft; CI hasn't run on this head (action_required)):

  • The slots aren't observed. #92-#95 rest on the same unproven slot-#104 placement as #3135. #109 / #110 / #112 sit right after the known #108, and #128 / #129 right after the known #127. Those are closer to evidence, but no title call is cited.
  • One wrong slot reroutes the whole title. Each new slot calls note_newer_device_method (real.rs ~3274 and the others). That switches the global layout flag and every queue and command-list slot with it. If an older-layout runtime has a different method at one of these slots and calls it before its first Signal, the whole title is misrouted. Main's stub doesn't switch the flag (unverified whether older runtimes reach these slots).
  • Castable formats. #128 / #129 drop them, while #3340 makes #127 use them under XCL_CAST_LIST. There's no textual conflict, but whichever merges second needs a follow-up for #128 / #129.
  • #94 / #129 go through dev_create_reserved_resource, which passes the console desc to the PC unchanged, as #30 does on main. No regression, but "use the console's descriptions" overstates the translation there.
  • The test covers only the stride of allocation_info_each, and the #108 half only re-checks main's existing 0x48 stride. None of the eight create wrappers is tested.

Fine: the argument lists match the PC signatures, and reading the first 0x38 bytes of a DESC1 fits the 0x48 stride observed at #108.

AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7308091751 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3136#issuecomment-7308091751). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T10:22:28Z. --- Review (head 172b0bd6, diff read, not a merge-check; draft; CI hasn't run on this head (`action_required`)): - **The slots aren't observed.** #92-#95 rest on the same unproven slot-#104 placement as #3135. #109 / #110 / #112 sit right after the known #108, and #128 / #129 right after the known #127. Those are closer to evidence, but no title call is cited. - **One wrong slot reroutes the whole title.** Each new slot calls `note_newer_device_method` (`real.rs` ~3274 and the others). That switches the global layout flag and every queue and command-list slot with it. If an older-layout runtime has a different method at one of these slots and calls it before its first Signal, the whole title is misrouted. Main's stub doesn't switch the flag (unverified whether older runtimes reach these slots). - **Castable formats.** #128 / #129 drop them, while #3340 makes #127 use them under `XCL_CAST_LIST`. There's no textual conflict, but whichever merges second needs a follow-up for #128 / #129. - #94 / #129 go through `dev_create_reserved_resource`, which passes the console desc to the PC unchanged, as #30 does on main. No regression, but "use the console's descriptions" overstates the translation there. - The test covers only the stride of `allocation_info_each`, and the #108 half only re-checks main's existing 0x48 stride. None of the eight create wrappers is tested. Fine: the argument lists match the PC signatures, and reading the first 0x38 bytes of a DESC1 fits the 0x48 stride observed at #108. AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
KOLESNiii commented 2026-12-02 14:54:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-12-02T14:54:40Z.


Thanks for the review. Rebased onto main df0cfef6 with no conflicts; new head 00754f88. Noted the follow-up for #128 / #129 if #3340's castable formats land first. The layout flag switching on these slots and the wording about the console descriptions depend on the slot identities, so I left them for the PR author. How the slot / field meanings were obtained is a question for the PR author, who will answer it here; I have not changed them. Suite and smoke are queued again.

— Claude Code (Claude Opus 5.5), on behalf of the PR author

<!-- greyfinch-sync:ivall/xcl:comment:7349349447 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3136#issuecomment-7349349447). Originally posted by [KOLESNiii](https://github.com/KOLESNiii) on 2026-12-02T14:54:40Z. --- Thanks for the review. Rebased onto `main` df0cfef6 with no conflicts; new head `00754f88`. Noted the follow-up for #128 / #129 if #3340's castable formats land first. The layout flag switching on these slots and the wording about the console descriptions depend on the slot identities, so I left them for the PR author. How the slot / field meanings were obtained is a question for the PR author, who will answer it here; I have not changed them. Suite and smoke are queued again. — Claude Code (Claude Opus 5.5), on behalf of the PR author
Foniass commented 2026-12-02 14:56:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-02T14:56:44Z.


Follow-up review (head 00754f88, since 172b0bd, diff read, not a merge-check; draft, checks red):

  • Earlier points: unchanged; git range-diff shows the commit identical to the previous head, so this push only rebases onto the current main.

New: none.

AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7349413695 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3136#issuecomment-7349413695). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-02T14:56:44Z. --- Follow-up review (head 00754f88, since 172b0bd, diff read, not a merge-check; draft, checks red): - **Earlier points:** unchanged; `git range-diff` shows the commit identical to the previous head, so this push only rebases onto the current `main`. New: none. AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/3136:upstream-pr/3136'
git switch 'upstream-pr/3136'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/3136'
git switch 'upstream-pr/3136'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3136'
git switch 'upstream-pr/3136'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3136'
git switch 'main'
git merge --squash 'upstream-pr/3136'
git switch 'main'
git merge --ff-only 'upstream-pr/3136'
git switch 'main'
git merge 'upstream-pr/3136'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!3136
No description provided.