runtime: create committed resources through device slot 76 #2640
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2648"
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 R0Y00/Xbox2Windows. Originally posted by pigalot on 2026-11-26T00:26:28Z.
Change
Slice 2 of 4 from #2591.
Device slot 76 (Xbox order, +0x260) takes the seven arguments of desktop
CreateCommittedResource:heap properties, heap flags, desc, initial state, clear value, riid and ppv. On
mainthe wrapper hasno entry for it, so a call traps (
x2w-trap d3d12_xs.dll!Device::slot76). A console package module (anupscaler, reached on the Series S profile) creates its resources through this slot.
Slot 76 now shares the committed-resource path of slot 127. The body of
device_create_committed_xbecomes
create_committed(slot, ...). Slot 127 calls it as before, with protected session and castableformats. Slot 76 calls it with no session and no castable formats. The only change slot 127 sees is
that its log line names the slot. Slot 76 gets the same per-heap initial-state choice, clear-value
retry and title memory as slot 127.
Refs #2591. Independent of the other three slices.
Verification
Build: this branch, one commit
01d03af5onmainat02368737. From the worktree in PowerShell:. .\tools\dev.ps1,cmake --preset release,cmake --build --preset release(Python envout/pe-envfromrequirements-dev.txt).Environment: NVIDIA GeForce RTX 5090, driver 32.0.16.1088, Windows 10.0.26200.9974, with the debug
layer off.
ctest --preset release --no-tests=error -R '^startup_committed_(slot76_(warp|hardware|control)|heap_state_(warp|upload_texture_control))$' -V:5/5 passed. These are
startup_committed_slot76_warp,_hardware(RTX 5090) and_control, plusthe existing slot-127
startup_committed_heap_state_warpandstartup_committed_heap_state_upload_texture_control.ctest --preset release -j 6 --no-tests=error -R '^startup_' -E '_hardware$|^startup_audio_': 640 tests, 634 passed, 6 skipped (capability, exit 77), 0 failed.python -B tests/docs_links_check.py: pass (19 Markdown files, 507 links).python -B tests/bidi_controls_check.py: pass.git diff --check origin/main...HEAD: clean.Evidence
New fixture
tests/startup_committed_slot76_check.cpp, written in source (MIT). It calls thewrapper's slot 76 as a title does, with initial state 0xffffffff, for four resources: a 128x64 RGBA8
render target with a clear value, a default-heap buffer, an upload-heap buffer and a 768-byte readback
buffer. Each must be created, and the device must not be removed.
--controlasks for a 2D texture on an upload heap, which no runtime creates. That row printsFAIL: upload heap 2D texture: hr 0x80070057 ..., and the test is registered withPASS_REGULAR_EXPRESSION "FAIL: ".Before/after check: I ran the same fixture binary against a
d3d12_xs.dllbuilt frommainwithoutthis change (WARP). It stopped at the first call with
x2w-trap d3d12_xs.dll!Device::slot76 ...(exit 127).The argument order comes from the calls the module makes and from the desktop signature. Slot 76 never
passes a protected session or castable formats.
Checklist
This change was AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T00:32:11Z.
Review: COMMENTED
Comment review of head
01d03af5(code and fixture tests only).What I checked:
d3d12_xs_device.cpp: the old slot-127 body becomescreate_committed(slot, ...). Slot 127 passes127and its original session/castable arguments, so its behaviour is unchanged except the log line now names the slot. Slot 76device_create_committedtakes the seven desktop arguments (props, heap flags, desc, state, clear, riid, ppv) and forwardssession=nullptr,castable=0/nullptr. The argument order matches the desktopCreateCommittedResourcesignature in the PR body.tables[device_kind][76]is the only new registration; slot 76 had no entry before, so no existing behaviour is replaced.Commands run (Linux, in a worktree of this head):
git diff --check origin/main...HEAD: clean.python3 tests/docs_links_check.py: passed (19 files, 507 links).python3 tests/bidi_controls_check.py: passed.tests/startup_committed_slot76_check.cppand the WARP/hardware slot-76 tests need the Windows D3D12 build; I did not run them here, so I have no mutation result for them.Findings: no bugs found in the code. The branch is 20 commits behind main.
Why this is not merged by me: the PR exists because a console package module trapped on slot 76 while running the executable ("x2w-trap ... Device::slot76"). That is a blocker seen while running the game. We have no access to it, so only code and fixture review is possible from our side. Whether the module now gets past this slot must be confirmed by the merger on the executable. The merge stays with MasterDomino or @R0Y00.
AI-assisted; commands listed were executed locally.