startup: publish acceleration-structure views on device slot 70 #1800

Closed
github-bot wants to merge 2 commits from gh-pr/1800/head into gh-pr/1800/base
Owner

@⁠tedin7 on GitHub · 2026-11-24 18:51 UTC · original
tedin7:x2w-frontier-slot70-as → main · +314 −17 · 11 files · 2 commits · closed without merging

Related to #870 and #1758 (no Fixes).

What changes

Device slot 70 now publishes a D3D12_SRV_DIMENSION_RAYTRACING_ACCELERATION_STRUCTURE view instead of refusing it as unsupported_description.

  • New pure header src/startup_stubs/memory_srv_as.h. The address is the view's Location, or the call's address when Location is zero. The resource description is not read for these views.
  • The view is published through slot 18 with no resource and the desktop GPU address of the same byte when:
    • the address is 256-byte aligned (as_unaligned);
    • it starts inside one live placed (slot 133) buffer (as_not_placed), found with placed_buffer_range unchanged;
    • that buffer was created in D3D12_RESOURCE_STATE_RAYTRACING_ACCELERATION_STRUCTURE (as_wrong_state).
  • Any refusal leaves the destination descriptor unchanged and logs the reason (first eight per process, as before).
  • The report note on a dimension-11 view now reads (acceleration structure view). startup_address_buffer_srv_check.py expects as_wrong_state for its placed COMMON buffer.
  • placed_build.h and resolve_placed_build are untouched.

Checks run locally (Linux)

g++ -std=c++17 -Wall -Wextra -Isrc -I/usr/include/directx -I/usr/include/wsl/stubs -include wsl/winadapter.h tests/startup_memory_srv_as_check.cpp
./a.out   # ok; --mutate alignment, state, offset each fail
g++ ... tests/startup_memory_srv_report_check.cpp && ./a.out   # ok
x86_64-w64-mingw32-g++ -std=c++17 -Isrc -fsyntax-only tests/startup_memory_srv_as_check.cpp
git diff --check
python3 -B tests/docs_links_check.py
python3 -B tests/bidi_controls_check.py
git merge-tree --write-tree HEAD origin/main   # and #1766, #1787, #1788, #1789: no conflicts

Not run

The slot 70 hook in d3d12_memory_srv.inl and the updated startup_address_srv / startup_address_buffer_srv expectations need a Windows build and WARP run. They have not been compiled or executed. No device publishes a real AS view yet: the pure resolver is tested, the device path is not.

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-24 18:51 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1800) `tedin7:x2w-frontier-slot70-as` → `main` · +314 −17 · 11 files · 2 commits · closed without merging Related to #870 and #1758 (no `Fixes`). ## What changes Device slot 70 now publishes a `D3D12_SRV_DIMENSION_RAYTRACING_ACCELERATION_STRUCTURE` view instead of refusing it as `unsupported_description`. - New pure header `src/startup_stubs/memory_srv_as.h`. The address is the view's `Location`, or the call's address when `Location` is zero. The resource description is not read for these views. - The view is published through slot 18 with no resource and the desktop GPU address of the same byte when: - the address is 256-byte aligned (`as_unaligned`); - it starts inside one live placed (slot 133) buffer (`as_not_placed`), found with `placed_buffer_range` unchanged; - that buffer was created in `D3D12_RESOURCE_STATE_RAYTRACING_ACCELERATION_STRUCTURE` (`as_wrong_state`). - Any refusal leaves the destination descriptor unchanged and logs the reason (first eight per process, as before). - The report note on a dimension-11 view now reads `(acceleration structure view)`. `startup_address_buffer_srv_check.py` expects `as_wrong_state` for its placed COMMON buffer. - `placed_build.h` and `resolve_placed_build` are untouched. ## Checks run locally (Linux) ``` g++ -std=c++17 -Wall -Wextra -Isrc -I/usr/include/directx -I/usr/include/wsl/stubs -include wsl/winadapter.h tests/startup_memory_srv_as_check.cpp ./a.out # ok; --mutate alignment, state, offset each fail g++ ... tests/startup_memory_srv_report_check.cpp && ./a.out # ok x86_64-w64-mingw32-g++ -std=c++17 -Isrc -fsyntax-only tests/startup_memory_srv_as_check.cpp git diff --check python3 -B tests/docs_links_check.py python3 -B tests/bidi_controls_check.py git merge-tree --write-tree HEAD origin/main # and #1766, #1787, #1788, #1789: no conflicts ``` ## Not run The slot 70 hook in `d3d12_memory_srv.inl` and the updated `startup_address_srv` / `startup_address_buffer_srv` expectations need a Windows build and WARP run. They have not been compiled or executed. No device publishes a real AS view yet: the pure resolver is tested, the device path is not. AI-assisted; commands listed were executed locally.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 23:34:10 +00:00
github-bot closed this pull request 2026-11-26 23:34:10 +00:00
Author
Owner

@⁠tedin7 on GitHub · 2026-11-24 19:14 UTC · original

Closing this draft for now to help keep the open PR queue manageable; the branch stays preserved on the fork so it can be reopened once the queue clears.

**@⁠tedin7** on GitHub · 2026-11-24 19:14 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1800#issuecomment-7141811521) Closing this draft for now to help keep the open PR queue manageable; the branch stays preserved on the fork so it can be reopened once the queue clears.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.