Scripts: show descriptor table offsets in BVH summaries #2966

Open
luckyteagirl wants to merge 1 commit from upstream-pr/2966 into main
luckyteagirl commented 2026-11-27 05:37:21 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-27T05:37:21Z.


The BVH root-signature summary printed each descriptor range's kind, count, and register but omitted its offset within the descriptor table. Explicit gaps and APPEND therefore looked identical in this diagnostic. The serialized root-signature 1.0 and 1.1 layouts both carry an offset field (DirectXShaderCompiler header).

What is in it

  • scripts/re/bvhb_shaders.py: print offset=<number> or offset=append for each RTS0 descriptor range.
  • scripts/test_bvhb_shaders.py: synthetic 1.0 and 1.1 tables with an explicit gap and an append range.

Tested

  • The new descriptor-table fixture failed against unmodified c2ee10e4 for both root-signature versions.
  • python -B -m unittest discover -s scripts -v: 26 passed, 0 failed, 0 skipped on the committed head.
  • git diff --check HEAD^ HEAD: passed.
  • cargo +stable build --workspace --locked -j 2: passed.
  • cargo +stable test --workspace --locked -j 2 --no-fail-fast -- --test-threads=4 with XCL_ADAPTER=AMD Radeon RX 6800M and XCL_REQUIRE_GPU=1: exit 101. The library process aborted 0xc0000005 after 83 logged passes and 1 ignored, with no harness summary. Across 37 completed target summaries: 126 passed, 2 failed, 20 ignored, with 4 explicit SKIPPED notices. The e2e failure was missing xcl_testtitle.exe/testgame_mw.dll before the workspace build; the split-pipeline e2e fixture also failed in this run. After the build, each failed integration fixture passed in a separate exact test rerun (1 passed, 0 failed, 0 ignored each).

Not tested

  • A real BVH DLL or retail title. The full GPU suite did not finish cleanly on this laptop. This script-only change does not alter the XCL runtime.

AI use

  • OpenAI Codex (GPT-6.2 Sol) traced the serialized layout, wrote the script change and regression fixture, and ran the Python suite. OpenAI Codex (GPT-6.2 Astra) reviewed the diff and prepared this PR.
<!-- greyfinch-sync:ivall/xcl:issue:5521790127 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2966). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-27T05:37:21Z. --- The BVH root-signature summary printed each descriptor range's kind, count, and register but omitted its offset within the descriptor table. Explicit gaps and `APPEND` therefore looked identical in this diagnostic. The serialized root-signature 1.0 and 1.1 layouts both carry an offset field ([DirectXShaderCompiler header](https://github.com/microsoft/DirectXShaderCompiler/blob/main/include/dxc/DxilRootSignature/DxilRootSignature.h#L192-L206)). **What is in it** - `scripts/re/bvhb_shaders.py`: print `offset=<number>` or `offset=append` for each RTS0 descriptor range. - `scripts/test_bvhb_shaders.py`: synthetic 1.0 and 1.1 tables with an explicit gap and an append range. **Tested** - The new descriptor-table fixture failed against unmodified `c2ee10e4` for both root-signature versions. - `python -B -m unittest discover -s scripts -v`: 26 passed, 0 failed, 0 skipped on the committed head. - `git diff --check HEAD^ HEAD`: passed. - `cargo +stable build --workspace --locked -j 2`: passed. - `cargo +stable test --workspace --locked -j 2 --no-fail-fast -- --test-threads=4` with `XCL_ADAPTER=AMD Radeon RX 6800M` and `XCL_REQUIRE_GPU=1`: exit 101. The library process aborted `0xc0000005` after 83 logged passes and 1 ignored, with no harness summary. Across 37 completed target summaries: 126 passed, 2 failed, 20 ignored, with 4 explicit `SKIPPED` notices. The e2e failure was missing `xcl_testtitle.exe`/`testgame_mw.dll` before the workspace build; the split-pipeline e2e fixture also failed in this run. After the build, each failed integration fixture passed in a separate exact test rerun (1 passed, 0 failed, 0 ignored each). **Not tested** - A real BVH DLL or retail title. The full GPU suite did not finish cleanly on this laptop. This script-only change does not alter the XCL runtime. **AI use** - OpenAI Codex (GPT-6.2 Sol) traced the serialized layout, wrote the script change and regression fixture, and ran the Python suite. OpenAI Codex (GPT-6.2 Astra) reviewed the diff and prepared this PR.
Foniass commented 2026-12-01 09:14:01 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T09:14:01Z.


Triage (#1607) – head a7c77a6

#1759 changes the same descriptor-range line in scripts/re/bvhb_shaders.py rts0 (it adds register spaces; this PR adds table offsets) and adds the same summarize_root test helper. Different output, so they are not duplicates, but the second to merge needs a rebase.
The v1 (5-dword) and v2 (6-dword) range layouts both put the offset last, and the unpacking handles both. No problems found in the diff.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7306403457 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2966#issuecomment-7306403457). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T09:14:01Z. --- **Triage (#1607)** – head a7c77a6 #1759 changes the same descriptor-range line in `scripts/re/bvhb_shaders.py` `rts0` (it adds register spaces; this PR adds table offsets) and adds the same `summarize_root` test helper. Different output, so they are not duplicates, but the second to merge needs a rebase. The v1 (5-dword) and v2 (6-dword) range layouts both put the offset last, and the unpacking handles both. No problems found in the diff. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2966:upstream-pr/2966'
git switch 'upstream-pr/2966'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2966'
git switch 'upstream-pr/2966'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2966'
git switch 'upstream-pr/2966'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2966'
git switch 'main'
git merge --squash 'upstream-pr/2966'
git switch 'main'
git merge --ff-only 'upstream-pr/2966'
git switch 'main'
git merge 'upstream-pr/2966'
git push origin 'main'
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
xcl-dev/xcl!2966
No description provided.