gpu: verify raw vertex-buffer reads through copied descriptors #2720

Manually merged
github merged 2 commits from gh-pr/2720/head into gh-pr/2720/base 2026-11-27 01:18:01 +00:00
Owner

@⁠R0Y00 on GitHub · 2026-11-26 03:30 UTC · original
R0Y00:codex/copied-vertex-buffer-srv → main · +126 −3 · 6 files · 2 commits · merged 2026-11-26 03:38 UTC

Refs #2695.

This source-built fixture publishes full and short views of the same raw buffer, copies each into the active table slot through slot 24, and compares the destination's guest-visible descriptor bytes with the source. The vertex shader reads different words on opposite sides of byte 256. The 32-pixel readback distinguishes the full view, the stale 256-byte view, and restoration of the full view in successive bands. The short view leaves the in-range word intact and returns zero for the word at byte 288. It does not establish the original executable's descriptor writer.

On Windows Release, WARP and RTX 4060 Laptop (32.0.16.1656) passed the new draw and both adjacent fixture groups, 6/6 without skips. The desktop descriptor increments in this run were 64 and 32 bytes respectively. The existing stream harness disables the debug layer.

cmake --build --preset release --target startup_stream_consumer
ctest --preset release --no-tests=error -R '^startup_(copied_vertex_srv|address_buffer_srv|frame_copy)_(warp|hardware)$' -V
**@⁠R0Y00** on GitHub · 2026-11-26 03:30 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2720) `R0Y00:codex/copied-vertex-buffer-srv` → `main` · +126 −3 · 6 files · 2 commits · merged 2026-11-26 03:38 UTC Refs #2695. This source-built fixture publishes full and short views of the same raw buffer, copies each into the active table slot through slot 24, and compares the destination's guest-visible descriptor bytes with the source. The vertex shader reads different words on opposite sides of byte 256. The 32-pixel readback distinguishes the full view, the stale 256-byte view, and restoration of the full view in successive bands. The short view leaves the in-range word intact and returns zero for the word at byte 288. It does not establish the original executable's descriptor writer. On Windows Release, WARP and RTX 4060 Laptop (32.0.16.1656) passed the new draw and both adjacent fixture groups, 6/6 without skips. The desktop descriptor increments in this run were 64 and 32 bytes respectively. The existing stream harness disables the debug layer. ```powershell cmake --build --preset release --target startup_stream_consumer ctest --preset release --no-tests=error -R '^startup_(copied_vertex_srv|address_buffer_srv|frame_copy)_(warp|hardware)$' -V ```
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 01:17:59 +00:00
github manually merged commit ee19cb84ad into gh-pr/2720/base 2026-11-27 01:18:01 +00:00
Author
Owner

@⁠tedin7 on GitHub · 2026-11-26 03:31 UTC · original · reviewed

Review of head 3bffb4cb (code + fixture test only, no executable claims).

Checked:

  • draw_copied_vertex_buffer_srv: full and short raw views of one buffer, copied (op 24) into slot 0 from slots 1 and 2, destination bytes compared with source via memcmp. Return codes 54/55 give distinct failures.
  • Vertex shader reads words at byte 224 and 288 (either side of 256); expected bands full/short/full (57,181 / 57,0 / 57,181) distinguish a stale 256-byte view from the full one.
  • New env switch in startup_stream_draw.cpp and add_test in CMakeLists.txt follow the sibling startup_address_buffer_srv_* pattern (WARP + hardware, SKIP 77, TIMEOUT 90). draw_texture gained an optional vertex_hlsl without changing existing callers.
  • No other open or merged PR covers this slice (searched open+merged).

Commands run (Linux): git diff --check origin/main...HEAD, python3 tests/docs_links_check.py, python3 tests/bidi_controls_check.py (all clean). The new check needs the Windows consumer binary, so the draw itself is covered by the Win2025 run that follows.

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-26 03:31 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2720#pullrequestreview-6068185749) · **reviewed** Review of head 3bffb4cb (code + fixture test only, no executable claims). Checked: - `draw_copied_vertex_buffer_srv`: full and short raw views of one buffer, copied (op 24) into slot 0 from slots 1 and 2, destination bytes compared with source via memcmp. Return codes 54/55 give distinct failures. - Vertex shader reads words at byte 224 and 288 (either side of 256); expected bands full/short/full (57,181 / 57,0 / 57,181) distinguish a stale 256-byte view from the full one. - New env switch in `startup_stream_draw.cpp` and `add_test` in `CMakeLists.txt` follow the sibling `startup_address_buffer_srv_*` pattern (WARP + hardware, SKIP 77, TIMEOUT 90). `draw_texture` gained an optional `vertex_hlsl` without changing existing callers. - No other open or merged PR covers this slice (searched open+merged). Commands run (Linux): `git diff --check origin/main...HEAD`, `python3 tests/docs_links_check.py`, `python3 tests/bidi_controls_check.py` (all clean). The new check needs the Windows consumer binary, so the draw itself is covered by the Win2025 run that follows. AI-assisted; commands listed were executed locally.
Author
Owner

@⁠tedin7 on GitHub · 2026-11-26 03:38 UTC · original

Win2025 WARP receipt for head ee19cb84 after updating with main.
Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit ee19cb84ad6def5f74eb91daedffb10fd8bb0712:

  • Debug (--preset dev):
    • Build (cmake --build --preset dev --target startup_stream_consumer -- -j 2): 133.72s (configure 3.92s)
    • Test (ctest --preset dev -R '^startup_(copied_vertex_srv|address_buffer_srv|frame_copy)_warp$' --parallel 2 --no-tests=error --output-on-failure): 3/3 passed (2.39s: startup_address_buffer_srv_warp 1.03s, startup_frame_copy_warp 1.88s, startup_copied_vertex_srv_warp 1.09s)
  • Release /O2 (--preset release):
    • Build (cmake --build --preset release --target startup_stream_consumer -- -j 2): 239.38s (configure 4.31s)
    • Test (ctest --preset release -R '^startup_(copied_vertex_srv|address_buffer_srv|frame_copy)_warp$' --parallel 2 --no-tests=error --output-on-failure): 3/3 passed (2.36s: startup_address_buffer_srv_warp 1.00s, startup_frame_copy_warp 2.04s, startup_copied_vertex_srv_warp 1.10s)
  • sccache: 22/49 hits; wall 391.6s

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-26 03:38 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2720#issuecomment-7181900536) Win2025 WARP receipt for head ee19cb84 after updating with main. Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit `ee19cb84ad6def5f74eb91daedffb10fd8bb0712`: - **Debug (`--preset dev`)**: - Build (`cmake --build --preset dev --target startup_stream_consumer -- -j 2`): `133.72s` (configure `3.92s`) - Test (`ctest --preset dev -R '^startup_(copied_vertex_srv|address_buffer_srv|frame_copy)_warp$' --parallel 2 --no-tests=error --output-on-failure`): **3/3 passed** (`2.39s`: `startup_address_buffer_srv_warp` `1.03s`, `startup_frame_copy_warp` `1.88s`, `startup_copied_vertex_srv_warp` `1.09s`) - **Release `/O2` (`--preset release`)**: - Build (`cmake --build --preset release --target startup_stream_consumer -- -j 2`): `239.38s` (configure `4.31s`) - Test (`ctest --preset release -R '^startup_(copied_vertex_srv|address_buffer_srv|frame_copy)_warp$' --parallel 2 --no-tests=error --output-on-failure`): **3/3 passed** (`2.36s`: `startup_address_buffer_srv_warp` `1.00s`, `startup_frame_copy_warp` `2.04s`, `startup_copied_vertex_srv_warp` `1.10s`) - `sccache`: 22/49 hits; wall `391.6s` AI-assisted; commands listed were executed locally.
This discussion has been locked. Commenting is limited to contributors.
No description provided.