Scripts: show register spaces in BVH shader bindings #1749

Open
NemesisDawn wants to merge 1 commit from upstream-pr/1759 into main
NemesisDawn commented 2026-11-24 20:18:12 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by NemesisDawn on 2026-11-24T20:18:12Z.


Show nonzero register spaces in the BVHB shader binding report so bindings that share a register number can be distinguished.

What is in it

  • scripts/re/bvhb_shaders.py reports spaces for root constants, root descriptors, and descriptor table ranges. scripts/test_bvhb_shaders.py covers zero and nonzero spaces.

Tested

  • At 2eede34, python -B scripts/test_bvhb_shaders.py passed both tests on Windows with synthetic root-signature inputs.

Not tested

  • Retail BVHB shader data and the full Cargo workspace suite on a GPU.

AI use

  • OpenAI Codex (GPT-6, exact variant unavailable) wrote the patch and regression tests, ran the focused checks, and drafted this description.
<!-- greyfinch-sync:ivall/xcl:issue:5479646130 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1759). Originally posted by [NemesisDawn](https://github.com/NemesisDawn) on 2026-11-24T20:18:12Z. --- Show nonzero register spaces in the BVHB shader binding report so bindings that share a register number can be distinguished. **What is in it** - `scripts/re/bvhb_shaders.py` reports spaces for root constants, root descriptors, and descriptor table ranges. `scripts/test_bvhb_shaders.py` covers zero and nonzero spaces. **Tested** - At `2eede34`, `python -B scripts/test_bvhb_shaders.py` passed both tests on Windows with synthetic root-signature inputs. **Not tested** - Retail BVHB shader data and the full Cargo workspace suite on a GPU. **AI use** - OpenAI Codex (GPT-6, exact variant unavailable) wrote the patch and regression tests, ran the focused checks, and drafted this description.
futurepro62 commented 2026-11-24 21:29:56 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T21:14:38Z.


Tested exact head 2eede34, script tests only, since this PR has no test report yet.

Tested

  • Windows 11 Home 26300, Python 3.14.3 with pytest 9.0.3, Windows PowerShell 5.1.26100.9818 (no PowerShell 7 here).
  • python -m pytest scripts/test_bvhb_shaders.py at the head: 2 passed, 4 subtests passed.
  • The PR's test file against current main's script (266b845): 2 failed, 2 passed. So the new test catches the problem the PR fixes.

Not tested

  • PowerShell 7, the CI workflow itself, a game (no runtime code changed).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
<!-- greyfinch-sync:ivall/xcl:comment:7144669775 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1759#issuecomment-7144669775). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-24T21:14:38Z. --- Tested exact head `2eede34`, script tests only, since this PR has no test report yet. **Tested** - Windows 11 Home 26300, Python 3.14.3 with pytest 9.0.3, Windows PowerShell 5.1.26100.9818 (no PowerShell 7 here). - `python -m pytest scripts/test_bvhb_shaders.py` at the head: 2 passed, 4 subtests passed. - The PR's test file against current main's script (`266b845`): 2 failed, 2 passed. So the new test catches the problem the PR fixes. **Not tested** - PowerShell 7, the CI workflow itself, a game (no runtime code changed). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
DavidM1911 commented 2026-11-24 23:08:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T23:04:44Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified main.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7146987480 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1759#issuecomment-7146987480). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T23:04:44Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~23 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified `main`.) Thanks!
JJAutoCompare commented 2026-11-25 02:08:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T01:18:59Z.


Tested

  • Exact PR head 2eede34dbb94ad3c95f5aa5e128b21ef0bf798e1, with a clean detached worktree before and after both runs. Windows 11 Enterprise Evaluation x64 (26200.9974), AMD Ryzen 7 3800X, portable CPython 3.13.7 x64 (NuGet).
  • python -B scripts/test_bvhb_shaders.py -v — 2 passed, 0 failed, 0 ignored, 0 skipped.
  • python -B L:/XclTooling/pr1759-2eede34/check_mixed_spaces.py -v — 2 passed, 0 failed, 0 ignored, 0 skipped. This local harness ran scripts/re/bvhb_shaders.py on one synthetic fixture per root-signature version (1.0 and 1.1). It checked the complete stdout line, empty stderr, and byte-for-byte extraction of each embedded DXBC container. Both versions printed these bindings:
consts b17 space42 x6 | consts b17 x2 | CBV b17 space9 | SRV t17 | UAV u17 space31 | table[SRVx3@12,SRVx2@12 space18,UAVx4@6 space27]

Not tested

Retail DLLs or game assets, GPU execution, Cargo workspace tests, and GitHub Actions.

AI use

Codex (gpt-6.2-sol) created the temporary harness, ran both suites, and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7149422449 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1759#issuecomment-7149422449). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T01:18:59Z. --- **Tested** - Exact PR head `2eede34dbb94ad3c95f5aa5e128b21ef0bf798e1`, with a clean detached worktree before and after both runs. Windows 11 Enterprise Evaluation x64 (26200.9974), AMD Ryzen 7 3800X, portable CPython 3.13.7 x64 (NuGet). - `python -B scripts/test_bvhb_shaders.py -v` — 2 passed, 0 failed, 0 ignored, 0 skipped. - `python -B L:/XclTooling/pr1759-2eede34/check_mixed_spaces.py -v` — 2 passed, 0 failed, 0 ignored, 0 skipped. This local harness ran `scripts/re/bvhb_shaders.py` on one synthetic fixture per root-signature version (1.0 and 1.1). It checked the complete stdout line, empty stderr, and byte-for-byte extraction of each embedded DXBC container. Both versions printed these bindings: ```text consts b17 space42 x6 | consts b17 x2 | CBV b17 space9 | SRV t17 | UAV u17 space31 | table[SRVx3@12,SRVx2@12 space18,UAVx4@6 space27] ``` **Not tested** Retail DLLs or game assets, GPU execution, Cargo workspace tests, and GitHub Actions. **AI use** Codex (gpt-6.2-sol) created the temporary harness, ran both suites, and wrote this report.
RavenCurseBurg commented 2026-11-25 20:08:52 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by RavenCurseBurg on 2026-11-25T20:05:26Z.


Tested on 2eede34dbb94ad3c95f5aa5e128b21ef0bf798e1 and its parent c160d86ef2efe3a07e4dfb473e4fa72eafb413c0. Windows 11 build 26100.9711, Core i7-13700, Python 3.14.3.

I ran python -B scripts/re/bvhb_shaders.py synthetic.bin out with two generated DXBC containers, one root signature v1.0 and one v1.1. Each had two SRV ranges on register 8: count 2 in space 3, then an unbounded range in space 7. With redirected UTF-8 stdout, the PR head reported both spaces on both lines and the extracted containers matched the source bytes.

With PYTHONIOENCODING=cp1252:strict and redirected stdout, the head and parent both exited 1 with UnicodeEncodeError while printing the infinity symbol. Each wrote the first container intact, printed no summary and stopped before extracting the second. The encoding failure predates this PR.

The candidate follow-up with a regression test prints unbounded in place of the glyph. Under both encodings it produced both summaries and two byte-identical outputs. The ranges read table[SRVx2@8 space3,SRVxunbounded@8 space7]. The new regression failed for both versions on the PR head. On the candidate, python -B scripts/test_bvhb_shaders.py passed 3/3 and python -B -m unittest discover -s scripts passed 18/18.

Not tested — A retail DLL, shader execution, or the Rust workspace suite. OpenAI Codex (GPT-6) generated the inputs, wrote and tested the follow-up, and prepared this report.

<!-- greyfinch-sync:ivall/xcl:comment:7173176590 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1759#issuecomment-7173176590). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-25T20:05:26Z. --- **Tested** on `2eede34dbb94ad3c95f5aa5e128b21ef0bf798e1` and its parent `c160d86ef2efe3a07e4dfb473e4fa72eafb413c0`. Windows 11 build 26100.9711, Core i7-13700, Python 3.14.3. I ran `python -B scripts/re/bvhb_shaders.py synthetic.bin out` with two generated DXBC containers, one root signature v1.0 and one v1.1. Each had two SRV ranges on register 8: count 2 in space 3, then an unbounded range in space 7. With redirected UTF-8 stdout, the PR head reported both spaces on both lines and the extracted containers matched the source bytes. With `PYTHONIOENCODING=cp1252:strict` and redirected stdout, the head and parent both exited 1 with `UnicodeEncodeError` while printing the infinity symbol. Each wrote the first container intact, printed no summary and stopped before extracting the second. The encoding failure predates this PR. The [candidate follow-up with a regression test](https://github.com/RavenCurseBurg/xcl/commit/383e9695299018fb5be9fe5908f5a8f90ce17a5b) prints `unbounded` in place of the glyph. Under both encodings it produced both summaries and two byte-identical outputs. The ranges read `table[SRVx2@8 space3,SRVxunbounded@8 space7]`. The new regression failed for both versions on the PR head. On the candidate, `python -B scripts/test_bvhb_shaders.py` passed 3/3 and `python -B -m unittest discover -s scripts` passed 18/18. **Not tested** — A retail DLL, shader execution, or the Rust workspace suite. OpenAI Codex (GPT-6) generated the inputs, wrote and tested the follow-up, and prepared this report.
upipibi commented 2026-11-26 17:23:56 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by upipibi on 2026-11-26T17:23:56Z.


Tested head 2eede34dbb94ad3c95f5aa5e128b21ef0bf798e1, merge-base with main c160d86ef2efe3a07e4dfb473e4fa72eafb413c0. Windows 11 Pro 26100, CPython 3.13.0.

  • py -3.13 -B -m unittest -v scripts/test_bvhb_shaders.py: 2 passed at head (1 at merge-base).
  • py -3.13 -B -m unittest discover -s scripts -p "test_*.py": 17 passed, 0 failed at head; 16 passed, 0 failed at merge-base.
  • The PR's test file against the merge-base script: 2 failed, so it catches the fix.

Not tested: retail data, GPU, Cargo.

AI-assisted (Claude Code, Claude Sonnet 5.5).

<!-- greyfinch-sync:ivall/xcl:comment:7198948042 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1759#issuecomment-7198948042). Originally posted by [upipibi](https://github.com/upipibi) on 2026-11-26T17:23:56Z. --- **Tested** head `2eede34dbb94ad3c95f5aa5e128b21ef0bf798e1`, merge-base with main `c160d86ef2efe3a07e4dfb473e4fa72eafb413c0`. Windows 11 Pro 26100, CPython 3.13.0. - `py -3.13 -B -m unittest -v scripts/test_bvhb_shaders.py`: 2 passed at head (1 at merge-base). - `py -3.13 -B -m unittest discover -s scripts -p "test_*.py"`: 17 passed, 0 failed at head; 16 passed, 0 failed at merge-base. - The PR's test file against the merge-base script: 2 failed, so it catches the fix. **Not tested:** retail data, GPU, Cargo. AI-assisted (Claude Code, Claude Sonnet 5.5).
github-actions[bot] commented 2026-12-01 02:35:49 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-12-01T02:35:49Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7298787057 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1759#issuecomment-7298787057). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-12-01T02:35:49Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Foniass commented 2026-12-01 06:41:08 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:41:08Z.


Triage (#1607) – head 2eede34

#2966 changes the same descriptor-range line of rts0 in scripts/re/bvhb_shaders.py and adds the same summarize_root test helper, but it prints table offsets, not register spaces: different changes, and whichever lands second will need a rebase.
The space fields read are right for both RTS0 versions (range word 3, root-constant and root-descriptor payload word 1). 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:7303154204 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1759#issuecomment-7303154204). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T06:41:08Z. --- **Triage (#1607)** – head 2eede34 #2966 changes the same descriptor-range line of `rts0` in `scripts/re/bvhb_shaders.py` and adds the same `summarize_root` test helper, but it prints table offsets, not register spaces: different changes, and whichever lands second will need a rebase. The space fields read are right for both RTS0 versions (range word 3, root-constant and root-descriptor payload word 1). 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/1759:upstream-pr/1759'
git switch 'upstream-pr/1759'

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/1759'
git switch 'upstream-pr/1759'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1759'
git switch 'upstream-pr/1759'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1759'
git switch 'main'
git merge --squash 'upstream-pr/1759'
git switch 'main'
git merge --ff-only 'upstream-pr/1759'
git switch 'main'
git merge 'upstream-pr/1759'
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!1749
No description provided.