startup: translate slot 86 graphics streams and verify draw pixels #1167
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1174"
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 R0Y00 on 2026-11-24T02:28:02Z.
Refs #1142, #1137. Depends on #1135. This PR targets the temporary review base at
5691fe81so reviewers see only the stream work. After #1135 lands, rebase this topic ontomainand retarget the PR before merging.Slot 86 now reads the wrapped root and VS/PS bytecode while the caller owns the stream, checks each subobject extent, and publishes the three blobs in a deterministic order. The offline translator opens each bounded native program and checks its export against the declared stage. Cache hits are used by the existing translated draw path.
The source-built consumer submits a reverse-order stream, verifies the cache files, records a translated draw, submits the wrapped list and waits for its fence. A separate desktop queue reads back an 8×4 target. Red and green shaders each produce the expected 16 colored pixels and 16 blue background pixels on both backends. Swapping the shader changes exactly the 16 covered pixels. A truncated stream emits no request and swapped stage containers fail translation. The post-intro black screen remains under investigation in #1137.
Tested
6eb927eon Windows build 26200, release MSVC 19.51, with the debug layer off. WARP 10.0.26100.9818 and RTX 4060 Laptop 32.0.16.1656 both passed. A fresh CMake directory picked up the default in-tree fixture interpreter without a cache override. All three tests passed, zero skips.Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T02:40:16Z.
Review: COMMENTED
Reviewed at commit
6eb927e64525d387338f7acf99c6372dd9dc3e24.stream_translationinsrc/startup_stubs/d3d12_draw.inlvalidates stream bounds/alignment, subobject sizes/uniqueness, DXBC headers, and wrapped root blobs before sharingcached_translationwith path 57;build_stream_pipelinealso gains subobject bounds checks via sharedstream_sizes.tools/startup/gfx2hlsl.pyextractsDXILcontainers in canonical(VS, PS)order and verifies stage/export agreement viaclassify.python3 tests/docs_links_check.py(253 links across 16 Markdown files)python3 tests/bidi_controls_check.py(969 files)python3 tests/gpu_report_format_check.py(10 tests)python3 tests/xgameruntime_table_check.pypython3 -m py_compile tools/startup/gfx2hlsl.py tests/startup_stream_check.py tests/startup_stream_draw_check.pypython3 tests/pixel_aot_check.pystartup_stream_request_warp/startup_stream_draw_{warp,hardware}CTest runs (no CI checks reported on this branch yet; those rely on Windows/CI).Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T04:21:42Z.
Review: COMMENTED
Retested delta
6eb927e6..6e07b1bf(head6e07b1bf).Delta audit (
6eb927e6..6e07b1bf)81c377e5mergesmain;f38599caand2f1fc946carry the slot 86 stream translation, draw verification (tests/startup_stream_draw.cpp,tests/startup_stream_draw_check.py), and streamD3D12_BLEND_DESCsubobject extraction (at + sizeof(type)=+4, matchingstream_sizes[8] == 336).6e07b1bfmovesfind_program(STARTUP_FXC fxc)andstartup_stream_request_warp/startup_stream_draw_{warp,hardware}CTest registrations insideif(EXISTS "${INTAKE_PYTHON}")inCMakeLists.txtso${INTAKE_PYTHON}is resolved before use.Checks run on Linux (
6e07b1bf)/root/.local/share/x2w-rev-venv/bin/python -B -m py_compile tools/startup/gfx2hlsl.py tests/startup_stream_check.py tests/startup_stream_draw_check.py: PASS./root/.local/share/x2w-rev-venv/bin/python -B tests/rdna2_tools_check.py(pure-Python mode): PASS (128 tests: 113 passed, 15 skipped, 0 failed)./root/.local/share/x2w-rev-venv/bin/python -B tests/docs_links_check.py: PASS (16 Markdown files, 274 links)./root/.local/share/x2w-rev-venv/bin/python -B tests/bidi_controls_check.py: PASS (1022 files)./root/.local/share/x2w-rev-venv/bin/python -B tests/form_coverage_check.py: PASS./root/.local/share/x2w-rev-venv/bin/python -B tests/xgameruntime_table_check.py: PASS (28 exports)./root/.local/share/x2w-rev-venv/bin/python -B tests/gpu_report_format_check.py: PASS (10/10)./root/.local/share/x2w-rev-venv/bin/python -B tests/hardware_reports_check.py: PASS (11/11).Note: Windows MSVC/D3D12 build and
startup_stream_request_warp/startup_stream_draw_{warp,hardware}were not executed locally.Imported from R0Y00/Xbox2Windows. Originally posted by denn0x on 2026-11-24T03:30:33Z.
Test report for
6eb927e6: Windows 11 Pro 26300, MSVC 14.50 (VS 18 Build Tools), Ninja, Release, debug layer off.cmake --build out/build/release: built with no errors or failures.ctest --no-tests=error -R startup: 8/8 passed, 0 failed, no skips.Not tested yet: a run with the console executable. Runs on this machine currently run out of system commit before the menus (#1199). I will add the executable result here once that is resolved.
AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-11-24T04:23:40Z.
Independent retarget check: the #1174 diff applies cleanly to
mainatb5cb8800in a fresh worktree. The worktree builds in Release with Windows 10.0.26300.10075 and MSVC 19.44.35228.0.ctest --preset release --no-tests=error -R '^startup_stream_' -Vstartup_stream_request_warp: passed. Stage order, compiled VS/PS, truncated and swapped controls pass.startup_stream_draw_warp: passed on WARP (Microsoft Basic Render Driver). Red and green draws matched 32 RGBA pixels each; the swapped shader differed at 16 of 32.startup_stream_draw_hardware: passed on AMD Radeon RX 9060 XT 32.0.32029.2010 with the same results.The PR still targets
codex/pr1135-review-base(5691fe81), so it has no CI againstmain. Please retarget/rebase it tomain; the local apply was clean. Note that #1177 touches the same four files (CMakeLists.txt,docs/startup-runtime.md,d3d12_draw.inl,d3d12_xs_device.cpp), so merge one and rebase the other.No game files, dumps or private logs were used. AI-assisted (Codex).