Scripts: print unbounded BVH ranges in ASCII #2645

Open
luckyteagirl wants to merge 1 commit from upstream-pr/2655 into main
luckyteagirl commented 2026-11-26 05:10:35 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T05:10:35Z.


The BVH shader inspector prints an infinity symbol for an unbounded descriptor range. When stdout uses the common Windows CP1252 code page, printing that symbol raises UnicodeEncodeError and stops extraction even though the DXBC was valid. Spell the range as unbounded so the report remains readable on that console.

What is in it

  • Print unbounded for a UINT_MAX descriptor count; preserve the register class and starting register.
  • Add a synthetic DXBC/RTS0 CLI fixture with bounded and unbounded ranges under CP1252.

Tested

  • On current main b49be183, the new CLI fixture failed at the report print with UnicodeEncodeError. On this branch, full Python script discovery passed 26/26 on Windows Python 3.11.9 and Ubuntu under WSL Python 3.14.4.
  • git diff --check and independent source review passed. No in-tree consumer of the old infinity glyph was found. PRs #1759 and #1858 edit the same line for different behavior and may need a small rebase.

Regression run

  • Not applicable. Only the Python inspector and its synthetic fixture changed.

Not tested

  • Extraction from a retail binary, Rust workspace tests, GPU tests, or a title smoke run.

AI use

  • Codex (GPT-6.2 Sol) implemented and tested the change; another Codex Sol agent independently reproduced the main failure and reviewed the patch.
<!-- greyfinch-sync:ivall/xcl:issue:5504385279 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2655). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-26T05:10:35Z. --- The BVH shader inspector prints an infinity symbol for an unbounded descriptor range. When stdout uses the common Windows CP1252 code page, printing that symbol raises `UnicodeEncodeError` and stops extraction even though the DXBC was valid. Spell the range as `unbounded` so the report remains readable on that console. **What is in it** - Print `unbounded` for a UINT_MAX descriptor count; preserve the register class and starting register. - Add a synthetic DXBC/RTS0 CLI fixture with bounded and unbounded ranges under CP1252. **Tested** - On current main `b49be183`, the new CLI fixture failed at the report print with `UnicodeEncodeError`. On this branch, full Python script discovery passed 26/26 on Windows Python 3.11.9 and Ubuntu under WSL Python 3.14.4. - `git diff --check` and independent source review passed. No in-tree consumer of the old infinity glyph was found. PRs #1759 and #1858 edit the same line for different behavior and may need a small rebase. **Regression run** - Not applicable. Only the Python inspector and its synthetic fixture changed. **Not tested** - Extraction from a retail binary, Rust workspace tests, GPU tests, or a title smoke run. **AI use** - Codex (GPT-6.2 Sol) implemented and tested the change; another Codex Sol agent independently reproduced the main failure and reviewed the patch.
github-actions[bot] commented 2026-12-01 02:32:21 +00:00 (Migrated from github.com)

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


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:7298724639 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2655#issuecomment-7298724639). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-12-01T02:32:21Z. --- 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 08:35:26 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:35:26Z.


Triage (#1607) – head 9d4d960

No open or merged PR replaces the ∞ in rts0; #1759, #1858 and #2966 edit the same range line but keep ∞, so they will conflict textually with this one.
Printing unbounded avoids a UnicodeEncodeError on a cp1252 console, and the test runs the script with PYTHONIOENCODING=cp1252 on a synthetic RTS0 with an unbounded SRV range. 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:7305518764 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2655#issuecomment-7305518764). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T08:35:26Z. --- **Triage (#1607)** – head 9d4d960 No open or merged PR replaces the `∞` in `rts0`; #1759, #1858 and #2966 edit the same range line but keep `∞`, so they will conflict textually with this one. Printing `unbounded` avoids a UnicodeEncodeError on a cp1252 console, and the test runs the script with PYTHONIOENCODING=cp1252 on a synthetic RTS0 with an unbounded SRV range. 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.
Decodere commented 2026-12-02 09:01:16 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-12-02T09:01:16Z.


merge-check
base: 1c8b551475
head: 9d4d960e40
merge: clean (git merge --no-edit onto 1c8b5514, git diff --check clean; scripts/re/bvhb_shaders.py and scripts/test_bvhb_shaders.py, +24/-1)
build: not run (Tier 0 Python script diff; no Rust code changed)
tests: python -m unittest -v scripts/test_bvhb_shaders.py -> 2 passed, 0 failed (base 1c8b5514: 1 passed; new test_unbounded_descriptor_ranges_print_in_cp1252 passed); python -m unittest discover -s scripts -p "test_*.py" -> 66 passed, 1 error (test_discord_mirror.py on Windows, same failure on base 1c8b5514). Rust workspace tests not run (Tier 0).
review: Read the full diff (+24/-1). Replacing the non-ASCII infinity glyph with "unbounded" in scripts/re/bvhb_shaders.py:33 avoids UnicodeEncodeError on cp1252 Windows consoles. The new test builds a synthetic DXBC RTS0 table with 0xFFFFFFFF descriptor count and verifies exit 0 under PYTHONIOENCODING=cp1252. No problems found.
performance: none (offline analysis script in scripts/re/; zero runtime impact)
verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 4060 8 GB (driver 621.40), Intel Core i5-11400F, 32 GB RAM, Windows 11 Build 26200, Python 3.15.2, Rust 1.100.1 MSVC, DXC 1.9.2602.17 / Antigravity (Gemini 4 Neon)

<!-- greyfinch-sync:ivall/xcl:comment:7340253083 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2655#issuecomment-7340253083). Originally posted by [Decodere](https://github.com/Decodere) on 2026-12-02T09:01:16Z. --- merge-check base: 1c8b551475e1e7bfe48f94448492a4c3544a2e0f head: 9d4d960e409e127dc8f2ccda8ebfd69172b73311 merge: clean (`git merge --no-edit` onto `1c8b5514`, `git diff --check` clean; `scripts/re/bvhb_shaders.py` and `scripts/test_bvhb_shaders.py`, +24/-1) build: not run (Tier 0 Python script diff; no Rust code changed) tests: `python -m unittest -v scripts/test_bvhb_shaders.py` -> 2 passed, 0 failed (base `1c8b5514`: 1 passed; new `test_unbounded_descriptor_ranges_print_in_cp1252` passed); `python -m unittest discover -s scripts -p "test_*.py"` -> 66 passed, 1 error (`test_discord_mirror.py` on Windows, same failure on base `1c8b5514`). Rust workspace tests not run (Tier 0). review: Read the full diff (+24/-1). Replacing the non-ASCII infinity glyph with `"unbounded"` in `scripts/re/bvhb_shaders.py:33` avoids `UnicodeEncodeError` on `cp1252` Windows consoles. The new test builds a synthetic DXBC RTS0 table with `0xFFFFFFFF` descriptor count and verifies exit 0 under `PYTHONIOENCODING=cp1252`. No problems found. performance: none (offline analysis script in `scripts/re/`; zero runtime impact) verdict: safe to merge hardware / tool and model: NVIDIA GeForce RTX 4060 8 GB (driver 621.40), Intel Core i5-11400F, 32 GB RAM, Windows 11 Build 26200, Python 3.15.2, Rust 1.100.1 MSVC, DXC 1.9.2602.17 / Antigravity (Gemini 4 Neon)
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/2655:upstream-pr/2655'
git switch 'upstream-pr/2655'

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