Skip to content

startup: create committed upload and readback resources in their required initial states - #1901

Merged
R0Y00 merged 1 commit into
R0Y00:mainfrom
lukaslw-lab:startup/committed-heap-initial-state
Nov 24, 2026
Merged

R0Y00 merged 1 commit into
R0Y00:mainfrom
lukaslw-lab:startup/committed-heap-initial-state

Conversation

@lukaslw-lab

Copy link
Copy Markdown
Contributor

AI-assisted (Claude Code).

Change

Device slot 127 (device_create_committed_x) now passes GENERIC_READ for an upload heap and COPY_DEST for a readback heap; other heaps keep COMMON. The Windows 10 runtime refuses COMMON there with E_INVALIDARG. Fixes #1900. Refs #870.

Verification

main at 4c5afa8e + this branch, Windows 10 22H2 (19045), RTX 3080 Ti driver 32.0.16.1047, WARP in-box, debug layer off.

ctest --preset dev --no-tests=error -R '^startup_committed_heap_state_' -V
Test Without the fix With the fix
startup_committed_heap_state_warp fail: upload x2, readback 0x80070057 pass
startup_committed_heap_state_hardware fail: same pass
startup_committed_heap_state_upload_texture_control (WILL_FAIL) (not run) fails as expected: upload-heap 2D texture refused

Affected areas, dev and release (full build of each preset):

ctest --preset dev --no-tests=error -R '^(startup_committed_heap_state_|startup_plane_size_device_|d3d12_xs_shim_|startup_stubs$|startup_null_views|startup_root_heap)'

15/15 passed in each preset, 0 failed. Of those, 2 are capability skips (77): startup_root_heap_warp and _hardware, because the Windows 10 runtime rejects the heap-indexing root flags (#1277); not related to this change.

Evidence and follow-up

  • New fixture tests/startup_committed_heap_state_check.cpp, source-built: default, upload (150 x 768 and 320 x 768 bytes, sizes seen in a startup run) and readback buffers through slot 127, as a title passes them. It prints what the runtime does with COMMON on an upload buffer: refused on Windows 10; a newer runtime that accepts it still passes.
  • "Without the fix" is the same fixture built against main's d3d12_xs_device.cpp (the change reverted locally): it fails on Windows 10 only, because newer runtimes accept COMMON.
  • The registered control therefore does not depend on the runtime: it asks for a 2D texture on an upload heap, which no runtime creates, so the check is shown to fail on a refusal everywhere, including CI.
  • Startup observation (sanitized) in startup: committed upload and readback buffers (device slot 127) fail with E_INVALIDARG on Windows 10 #1900: with this change the Windows 10 post-confirm load no longer stops on the refused buffers.

Checklist

  • This pull request covers one reviewable behavior.
  • I included the exact command and result for every check I ran.
  • I considered a negative control or failure case for a new fixture.
  • I updated README/docs when a capability or build requirement changed. (No capability change.)
  • I did not include game files, dumps, distribution links or secrets.

🤖 Generated with Claude Code

…ired initial states

Device slot 127 created every resource in COMMON. D3D12 requires upload-heap
resources to start in GENERIC_READ and readback-heap resources in COPY_DEST;
the Windows 10 runtime refuses COMMON there with E_INVALIDARG. Other heaps keep
COMMON.

startup_committed_heap_state_{warp,hardware} create default, upload and
readback buffers through slot 127; the upload-texture control asks for a 2D
texture on an upload heap, which no runtime creates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@R0Y00
R0Y00 merged commit 73d34ce into R0Y00:main Nov 24, 2026
5 checks passed
@lukaslw-lab
lukaslw-lab deleted the startup/committed-heap-initial-state branch November 24, 2026 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants