startup: committed upload and readback buffers (device slot 127) fail with E_INVALIDARG on Windows 10 #1893

Closed
opened 2026-11-24 20:41:00 +00:00 by lukaslw-lab · 0 comments
lukaslw-lab commented 2026-11-24 20:41:00 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by lukaslw-lab on 2026-11-24T20:41:00Z.


AI-assisted (Claude Code).

The D3D12 stand-in creates every slot 127 resource in D3D12_RESOURCE_STATE_COMMON. D3D12 requires upload-heap resources to start in GENERIC_READ and readback-heap resources in COPY_DEST (CreateCommittedResource2, D3D12_HEAP_TYPE). The Windows 10 runtime enforces this, so those creations fail there.

Commit or build: main at 4c5afa8e, dev and release presets.

Reproduction: call device slot 127 through D3D12XboxCreateDevice with a buffer on an upload or readback heap (initial layout 0xffffffff, no clear value), on WARP or hardware. Source-built fixture in the linked PR.

Heap Desktop answer for COMMON (Windows 10) Slot 127 on main
default (not affected) S_OK
upload 0x80070057 0x80070057
readback 0x80070057 0x80070057

Startup observation (sanitized, Windows 10 host above, run.ps1 -Render -FakeUser -GpuMirror -HostCpu, scripted input through the first-run pages): early in startup a title subsystem creates three upload buffers and its readback buffers through slot 127. All are refused and the title keeps null objects without checking them.

How this was traced (method only; addresses and executable details kept local): static analysis in IDA of the faulting function, its caller and the subsystem's constructor, which pairs each upload-buffer creation with the field the fault reads; then debugger memory watches and hit counters in startup runs. The constructor fills its other fields, while the field that receives the upload buffer stays null from construction until the post-confirm load reads it. The buffer sizes in the stand-in log (150, 128 and 320 entries of 768 bytes) match the constructor's capacities.

Slot 127 on main With initial states per heap type
Upload/readback creations 7 x E_INVALIDARG all S_OK
Last responsive page first-run acceptance page, confirmed same
After confirming the post-confirm load stops with a null read about 40 s later, in the first use of those objects (4 runs) the subsystem runs every frame and the load continues: about 2 min of loading (storage requests ~8.0k -> ~10.9k)
End of run that null read host memory limit: at -MemoryGiB 16 the commit cap (peak 15.7 GiB); at 20 GiB, peak 16.8 GiB, a later failure with system commit exhausted on this 16 GB RAM host

No scene or menu after the load was observed. This may be why Windows 11 reports in #870 / #1758 get past this point and Windows 10 ones do not.

Environment: Windows 10 22H2 (19045), RTX 3080 Ti driver 32.0.16.1047 and WARP (in-box), debug layer off.

  • I reproduced this on a source-built input.
  • I did not include game files, dumps, distribution links or credentials.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6590990007 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1900). Originally posted by [lukaslw-lab](https://github.com/lukaslw-lab) on 2026-11-24T20:41:00Z. --- _AI-assisted (Claude Code)._ The D3D12 stand-in creates every slot 127 resource in `D3D12_RESOURCE_STATE_COMMON`. D3D12 requires upload-heap resources to start in `GENERIC_READ` and readback-heap resources in `COPY_DEST` ([CreateCommittedResource2](https://learn.microsoft.com/windows/win32/api/d3d12/nf-d3d12-id3d12device8-createcommittedresource2#parameters), [D3D12_HEAP_TYPE](https://learn.microsoft.com/windows/win32/api/d3d12/ne-d3d12-d3d12_heap_type#constants)). The Windows 10 runtime enforces this, so those creations fail there. **Commit or build:** `main` at `4c5afa8e`, `dev` and `release` presets. **Reproduction:** call device slot 127 through `D3D12XboxCreateDevice` with a buffer on an upload or readback heap (initial layout `0xffffffff`, no clear value), on WARP or hardware. Source-built fixture in the linked PR. | Heap | Desktop answer for COMMON (Windows 10) | Slot 127 on `main` | |---|---|---| | default | (not affected) | `S_OK` | | upload | `0x80070057` | `0x80070057` | | readback | `0x80070057` | `0x80070057` | **Startup observation (sanitized, Windows 10 host above, `run.ps1 -Render -FakeUser -GpuMirror -HostCpu`, scripted input through the first-run pages):** early in startup a title subsystem creates three upload buffers and its readback buffers through slot 127. All are refused and the title keeps null objects without checking them. How this was traced (method only; addresses and executable details kept local): static analysis in IDA of the faulting function, its caller and the subsystem's constructor, which pairs each upload-buffer creation with the field the fault reads; then debugger memory watches and hit counters in startup runs. The constructor fills its other fields, while the field that receives the upload buffer stays null from construction until the post-confirm load reads it. The buffer sizes in the stand-in log (150, 128 and 320 entries of 768 bytes) match the constructor's capacities. | | Slot 127 on `main` | With initial states per heap type | |---|---|---| | Upload/readback creations | 7 x `E_INVALIDARG` | all `S_OK` | | Last responsive page | first-run acceptance page, confirmed | same | | After confirming | the post-confirm load stops with a null read about 40 s later, in the first use of those objects (4 runs) | the subsystem runs every frame and the load continues: about 2 min of loading (storage requests ~8.0k -> ~10.9k) | | End of run | that null read | host memory limit: at `-MemoryGiB 16` the commit cap (peak 15.7 GiB); at 20 GiB, peak 16.8 GiB, a later failure with system commit exhausted on this 16 GB RAM host | No scene or menu after the load was observed. This may be why Windows 11 reports in #870 / #1758 get past this point and Windows 10 ones do not. **Environment:** Windows 10 22H2 (19045), RTX 3080 Ti driver 32.0.16.1047 and WARP (in-box), debug layer off. - [x] I reproduced this on a source-built input. - [x] I did not include game files, dumps, distribution links or credentials.
Sign in to join this conversation.
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
R0Y00/Xbox2Windows#1893
No description provided.