gpu: submit and wait for each shadow frame from the EXE #829

Manually merged
github merged 1 commit from gh-pr/829/head into gh-pr/829/base 2026-11-26 22:21:50 +00:00
Owner

@⁠R0Y00 on GitHub · 2026-11-23 09:26 UTC · original
R0Y00:codex/exe-shadow-frame-submissions → main · +504 −195 · 10 files · 1 commits · merged 2026-11-23 09:38 UTC

Change

Refs #730 and builds on #826. Reuse the source-built shadow renderer and independent case from #773/#797. The EXE now selects the descriptor slot per frame and owns the order of the fixture imports for recording, submitting, waiting and cleanup. The runtime shares a device, command allocator, direct queue, fence and surfaces across both frames. The standalone shadow check uses the same renderer.

For each adapter, native Windows, pe_map and AOT match the ordered calls with fence values 1 and 2 and all 65,536 published color and light-depth bytes. The stale index changes exactly 170 second-frame color pixels. An unsupported device IID leaves no frame output and exits 20. An invalid second submit index returns E_INVALIDARG before reaching the queue, preserves the 32,768 first-frame bytes, releases four owned surfaces and the device, and exits 24.

Verification

Tested ea96661 on Windows 11 26200.9974, RTX 4060 Laptop GPU (NVIDIA 616.56) and WARP 10.0.26100.9818. The EXE provider ran without requesting the D3D12 debug layer. The standalone check retained its existing setup.

  • cmake --build --preset release --target cpu_shim_startup_lifted pe_map offscreen_check --parallel 7 passed.
  • ctest --preset release --no-tests=error --output-on-failure -R '^(cpu_native_shim_startup|cpu_shim_(compute|draw|texture_reuse|upload_texture|chain|shadow)_(warp|hardware)|mesh_shadow_draw_(warp|hardware))$' passed 15/15 with zero skips.
  • python -B tests/docs_links_check.py and git diff --check passed.

AI-assisted.

**@⁠R0Y00** on GitHub · 2026-11-23 09:26 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/829) `R0Y00:codex/exe-shadow-frame-submissions` → `main` · +504 −195 · 10 files · 1 commits · merged 2026-11-23 09:38 UTC ## Change Refs #730 and builds on #826. Reuse the source-built shadow renderer and independent case from #773/#797. The EXE now selects the descriptor slot per frame and owns the order of the fixture imports for recording, submitting, waiting and cleanup. The runtime shares a device, command allocator, direct queue, fence and surfaces across both frames. The standalone shadow check uses the same renderer. For each adapter, native Windows, pe_map and AOT match the ordered calls with fence values 1 and 2 and all 65,536 published color and light-depth bytes. The stale index changes exactly 170 second-frame color pixels. An unsupported device IID leaves no frame output and exits 20. An invalid second submit index returns `E_INVALIDARG` before reaching the queue, preserves the 32,768 first-frame bytes, releases four owned surfaces and the device, and exits 24. ## Verification Tested `ea96661` on Windows 11 26200.9974, RTX 4060 Laptop GPU (NVIDIA 616.56) and WARP 10.0.26100.9818. The EXE provider ran without requesting the D3D12 debug layer. The standalone check retained its existing setup. - `cmake --build --preset release --target cpu_shim_startup_lifted pe_map offscreen_check --parallel 7` passed. - `ctest --preset release --no-tests=error --output-on-failure -R '^(cpu_native_shim_startup|cpu_shim_(compute|draw|texture_reuse|upload_texture|chain|shadow)_(warp|hardware)|mesh_shadow_draw_(warp|hardware))$'` passed 15/15 with zero skips. - `python -B tests/docs_links_check.py` and `git diff --check` passed. AI-assisted.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 22:21:48 +00:00
github manually merged commit ea96661927 into gh-pr/829/base 2026-11-26 22:21:50 +00:00
Author
Owner

@⁠R0Y00 on GitHub · 2026-11-23 09:29 UTC · original

CPU/PE and GPU review on ea96661. I reran the Release startup script and the shadow script for WARP and the RTX 4060 Laptop using the built candidate. All 24 shadow child runs passed across native Windows, pe_map and AOT. The EXE sets the frame and map arguments and preserves the submit index across the record call. The mapper binds the same imports, and the AOT bindings use 32-bit frame/map values and HRESULTs. I checked that each successful frame closes and executes its own list and signals and waits for fence 1 or 2 before readback and allocator reuse. The invalid second index is rejected before ExecuteCommandLists, preserves exactly 32,768 first-frame bytes and closes four surfaces and the device before exit 24. The stale slot differed at 170 second-frame color pixels on both adapters while light depth matched. This passes review for the tested path. One separate failure path remains unexercised: if queue Signal fails after execution, submitted has not advanced, so the normal fence accounting cannot establish that the resources are idle.

**@⁠R0Y00** on GitHub · 2026-11-23 09:29 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/829#issuecomment-7096725818) CPU/PE and GPU review on `ea96661`. I reran the Release startup script and the shadow script for WARP and the RTX 4060 Laptop using the built candidate. All 24 shadow child runs passed across native Windows, `pe_map` and AOT. The EXE sets the frame and map arguments and preserves the submit index across the record call. The mapper binds the same imports, and the AOT bindings use 32-bit frame/map values and HRESULTs. I checked that each successful frame closes and executes its own list and signals and waits for fence 1 or 2 before readback and allocator reuse. The invalid second index is rejected before `ExecuteCommandLists`, preserves exactly 32,768 first-frame bytes and closes four surfaces and the device before exit 24. The stale slot differed at 170 second-frame color pixels on both adapters while light depth matched. This passes review for the tested path. One separate failure path remains unexercised: if queue `Signal` fails after execution, `submitted` has not advanced, so the normal fence accounting cannot establish that the resources are idle.
This discussion has been locked. Commenting is limited to contributors.
No description provided.