cpu: submit a placed vertex draw from a lifted PE entry #1313

Merged
R0Y00 merged 2 commits from upstream-pr/1320 into main 2026-11-24 08:40:30 +00:00
R0Y00 commented 2026-11-24 07:57:29 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T07:57:29Z.


Refs #874. The production placed-view registration from #1316 is now in main. This branch includes main through bec0c399. Both the CPU-driven test and the existing stream consumer share the multi-target render setup and readback path, including typed render target views. The texture cache helper preserves the array-view and explicit vertex-binding options.

The source-built guest calculates two addresses 1 TiB apart, specifies the view extent and stride, records a draw, writes both final vertex words after recording, and then submits and releases. The CPU translator lifts the linked PE entry, its internal call, branches and IAT accesses. The pixel shader is a fixture that loads one DWORD. Each runner compares the AOT executable's exported source hash to the native/mapped executable. The fixture compares the actual draw-side adapter, driver, LUID and software flag across the three paths.

At 5bbfbc01 on Windows build 26200.9974, RTX 4060 Laptop 32.0.16.1656 and WARP 10.0.26100.9818 passed all five cases through Windows native loading, pe_map and AOT. The three draw cases matched all 32 RGBA pixels each, returned 42 and released both placements. Extending the last-DWORD view by four bytes produced red 0, compared with 41 and 135 for the two valid ranges. Rejecting the second placement or the submission published no pixels and returned 20, with one or two releases respectively. Render debug layer disabled.

cmake --build --preset release --target cpu_placed_draw_lifted cpu_shim_startup_lifted pe_map startup_stream_consumer
ctest --preset release --no-tests=error -R '^(cpu_(placed_draw|shim_compute)_|startup_(mrt_|placed_vertex_|stream_draw_|logical_view_|address_(srv|bc_view)_|xg_bc_(chain|array)_))' -j 2 --output-on-failure

21 passed, 0 failed and 1 capability skip (startup_logical_view_warp), including all four FXC/DXC multi-render-target tests, both placed-vertex tests, and the block-compressed texture arrays and mip chains. All inputs are source-built or generated.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6577251820 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1320). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T07:57:29Z. --- Refs #874. The production placed-view registration from #1316 is now in main. This branch includes main through `bec0c399`. Both the CPU-driven test and the existing stream consumer share the multi-target render setup and readback path, including typed render target views. The texture cache helper preserves the array-view and explicit vertex-binding options. The source-built guest calculates two addresses 1 TiB apart, specifies the view extent and stride, records a draw, writes both final vertex words after recording, and then submits and releases. The CPU translator lifts the linked PE entry, its internal call, branches and IAT accesses. The pixel shader is a fixture that loads one DWORD. Each runner compares the AOT executable's exported source hash to the native/mapped executable. The fixture compares the actual draw-side adapter, driver, LUID and software flag across the three paths. At `5bbfbc01` on Windows build 26200.9974, RTX 4060 Laptop 32.0.16.1656 and WARP 10.0.26100.9818 passed all five cases through Windows native loading, `pe_map` and AOT. The three draw cases matched all 32 RGBA pixels each, returned 42 and released both placements. Extending the last-DWORD view by four bytes produced red 0, compared with 41 and 135 for the two valid ranges. Rejecting the second placement or the submission published no pixels and returned 20, with one or two releases respectively. Render debug layer disabled. ```powershell cmake --build --preset release --target cpu_placed_draw_lifted cpu_shim_startup_lifted pe_map startup_stream_consumer ctest --preset release --no-tests=error -R '^(cpu_(placed_draw|shim_compute)_|startup_(mrt_|placed_vertex_|stream_draw_|logical_view_|address_(srv|bc_view)_|xg_bc_(chain|array)_))' -j 2 --output-on-failure ``` 21 passed, 0 failed and 1 capability skip (`startup_logical_view_warp`), including all four FXC/DXC multi-render-target tests, both placed-vertex tests, and the block-compressed texture arrays and mip chains. All inputs are source-built or generated.
upstream-sync closed this pull request 2026-11-24 09:04:29 +00:00
R0Y00 commented 2026-11-24 09:04:44 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T08:18:30Z.


#1316 is on main at a166e42f. You can now refresh this draft against main. Please keep the lifted-entry draw and its range failure check while using the merged slot-133 registration and bounds test. The DXR build work in #1326 is separate from this vertex capture.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7125975883 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1320#issuecomment-7125975883). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T08:18:30Z. --- #1316 is on main at a166e42f. You can now refresh this draft against main. Please keep the lifted-entry draw and its range failure check while using the merged slot-133 registration and bounds test. The DXR build work in #1326 is separate from this vertex capture.
Sign in to join this conversation.
No reviewers
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!1313
No description provided.