runtime: bind indexed_raw_srv table buffers in native Mesh86 (Part of #3703) #3809

Manually merged
github merged 1 commit from github-bot/gh-3807 into main 2026-12-02 01:54:19 +00:00 AGit
Owner

@⁠timbot103 on GitHub · 2026-12-02 00:56 UTC · original
timbot103:runtime/mesh86-indexed-raw-srv → main · +243 −13 · 6 files · 1 commits · merged 2026-12-02 01:51 UTC

Summary

Implements #3703 item 3b: runtime binding of ComputeViewKind::indexed_raw_srv for native slot 86 (Mesh86) pipelines in src/startup_stubs/native_mesh86.inl, unblocking the runtime side of #3707's idxen offen table buffer loads now that #3720 / #3641's committed root SRV support is merged on main (158ef794). Keeps completely clear of #3772 (typed_buffer_srv).

  • make_native_mesh86_root: accepts ComputeViewKind::indexed_raw_srv as a descriptor-table scalar buffer SRV in both mesh and pixel stages (refusing root SRV/CBV sources), requiring array_count == 1 and a dword-aligned reflected stride required_bytes in [4, 2048] (matching the VS/PS validation in d3d12_draw.inl).
  • bind_native_mesh86: checks that the resolved table buffer's stride equals source.required_bytes, that view.bytes is a complete record-stride multiple within UINT_MAX and at least required_bytes, and binds the range through the existing raw SRV and argument-alias guards.

Verification

Added source-built end-to-end fixture startup_mesh86_indexed_raw_{warp,hardware} (tests/startup_mesh86_indexed_raw_check.py) with gfx1013 mesh and pixel stages both executing buffer_load_dword ... idxen offen (16-byte record stride). Tested on Windows 11 (26200.9974), MSVC 19.44, Ninja, Windows SDK 10.0.26100.0, WARP (10.0.26100.9818), and NVIDIA GeForce RTX 5080 (driver 32.0.16.2140; D3D12 debug layer unavailable on this host):

  • Debug (dev): 55/55 Mesh86 tests passed (26 WARP, 25 RTX 5080, 4 host checks; 0 failed, 0 skipped).
  • Release (release): 55/55 Mesh86 tests passed (26 WARP, 25 RTX 5080, 4 host checks; 0 failed, 0 skipped).
  • In all four adapter × build combinations:
    • Native V# descriptors and structured view tokens each painted 8/8 green pixels.
    • Wrong stride (24 vs 16) in either stage, zero-stride raw view (0 vs 16), and unbacked descriptor each painted 0/8 pixels with the expected binding refusal.
  • git diff --check origin/main..HEAD: clean; zero new MSVC /W4 warnings in changed lines.

Part of #3705.

AI-assisted.

**@⁠timbot103** on GitHub · 2026-12-02 00:56 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3807) `timbot103:runtime/mesh86-indexed-raw-srv` → `main` · +243 −13 · 6 files · 1 commits · merged 2026-12-02 01:51 UTC ## Summary Implements **#3703 item 3b**: runtime binding of `ComputeViewKind::indexed_raw_srv` for native slot 86 (Mesh86) pipelines in `src/startup_stubs/native_mesh86.inl`, unblocking the runtime side of #3707's `idxen offen` table buffer loads now that #3720 / #3641's committed root SRV support is merged on `main` (`158ef794`). Keeps completely clear of #3772 (`typed_buffer_srv`). - **`make_native_mesh86_root`:** accepts `ComputeViewKind::indexed_raw_srv` as a descriptor-table scalar buffer SRV in both mesh and pixel stages (refusing root SRV/CBV sources), requiring `array_count == 1` and a dword-aligned reflected stride `required_bytes` in `[4, 2048]` (matching the VS/PS validation in `d3d12_draw.inl`). - **`bind_native_mesh86`:** checks that the resolved table buffer's stride equals `source.required_bytes`, that `view.bytes` is a complete record-stride multiple within `UINT_MAX` and at least `required_bytes`, and binds the range through the existing raw SRV and argument-alias guards. ## Verification Added source-built end-to-end fixture `startup_mesh86_indexed_raw_{warp,hardware}` (`tests/startup_mesh86_indexed_raw_check.py`) with gfx1013 mesh and pixel stages both executing `buffer_load_dword ... idxen offen` (16-byte record stride). Tested on Windows 11 (`26200.9974`), MSVC `19.44`, Ninja, Windows SDK `10.0.26100.0`, WARP (`10.0.26100.9818`), and NVIDIA GeForce RTX 5080 (driver `32.0.16.2140`; D3D12 debug layer unavailable on this host): - **Debug (`dev`):** 55/55 Mesh86 tests passed (26 WARP, 25 RTX 5080, 4 host checks; 0 failed, 0 skipped). - **Release (`release`):** 55/55 Mesh86 tests passed (26 WARP, 25 RTX 5080, 4 host checks; 0 failed, 0 skipped). - In all four adapter × build combinations: - Native V# descriptors and structured view tokens each painted **8/8 green pixels**. - Wrong stride (`24` vs `16`) in either stage, zero-stride raw view (`0` vs `16`), and unbacked descriptor each painted **0/8 pixels** with the expected binding refusal. - `git diff --check origin/main..HEAD`: clean; zero new MSVC `/W4` warnings in changed lines. Part of #3705. AI-assisted.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 00:59:48 +00:00
github manually merged commit b89a22a1c1 into main 2026-12-02 01:54:19 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.