tools: a short carry form's SGPR source is not its carry destination (CENSUS-SHORT-CARRY-SRC) #2837
Closed
github-bot
wants to merge 2 commits from
github-bot/gh-2837 into main
AGit
pull from: github-bot/gh-2837
merge into: github:main
github:main
github:perf/darner-title-priority-ceiling
github:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
github:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
github:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
github:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
github:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
github:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
github:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
github:fix/runtime-test-conservative-fixtures
github:ci/shard-semantic-linux
github:docs/fg-limit-fps-switch
github:fix/runtime-test-fixture-paths
github:fix/runtime-test-fixture-readers
github:fix/read-file-hard-link
github:fix/book-slot-heap-never-read
github:fix/depth-resolve-spv-path
github:fix/indirect-unused-batched
github:gh-pr/3358/base
github:fix/xmem-refusal-diagnostics
github:gh-pr/3357/base
github:ci/shorten-ci-time
github:fix/alias-later-queued-submissions
github:claude/gallant-sagan-aamatr
github:gh-pr/3342/base
github:gh-pr/3341/base
github:d3d12/agility-sdk-621
github:gh-pr/3293/base
github:gh-pr/3319/base
github:gh-pr/3318/base
github:gh-pr/3315/base
github:gh-pr/3313/base
github:gh-pr/3314/base
github:claude/fervent-curie-m19lnr
github:gh-pr/3216/base
github:gh-pr/3272/base
github:gh-pr/3276/base
github:gh-pr/3279/base
github:gh-pr/3257/base
github:gh-pr/3258/base
github:gh-pr/3271/base
github:codex/skip-no-hit-ray-passes
github:gh-pr/3230/base
github:gh-pr/3266/base
github:gh-pr/3247/base
github:gh-pr/3246/base
github:gh-pr/3244/base
github:claude/sharp-sagan-1jqnp3
github:t3/preserve-fsr-sdk-restart-path
github:t3/propagate-host-failure-hresult
github:t3/launcher-custom-parameters
github:t3/series-x-2160-startup
github:codex/d3d12-uncapped-simulation
github:ci/less-to-run
github:perf/native-compute-shader-forms
github:claude/blissful-franklin-ukp7ag
github:codex/full-precompile-default
github:gh-pr/3166/base
github:gh-pr/3148/base
github:gh-pr/3138/base
github:gh-pr/3106/base
github:gh-pr/3057/base
github:gh-pr/2756/base
github:gh-pr/2812/base
github:gh-pr/3032/base
github:gh-pr/2992/base
github:notes/card-time-and-plant-flicker
github:gh-pr/2986/base
github:gh-pr/3000/base
github:gh-pr/2966/base
github:gh-pr/2924/base
github:gh-pr/726/base
github:gh-pr/2761/base
github:gh-pr/2663/base
github:gh-pr/2861/base
github:gh-pr/2862/base
github:gh-pr/2820/base
github:gh-pr/2811/base
github:gh-pr/2803/base
github:rt-call-trace
github:gh-pr/2802/base
github:gh-pr/2766/base
github:perf/ahead-split
github:gh-pr/2589/base
github:gh-pr/2699/base
github:gh-pr/2696/base
github:docs/readme-runtime-proposal
github:gh-pr/1346/base
github:codex/coord-claim-check-20261124-7e48
No reviewers
Labels
Clear labels
accessibility
Barrier affecting people with disabilities
area: ci
.github/ workflows and settings
area: d3d12
The D3D12 runtime in d3d12/ (Rust: leonida.exe and its crates)
area: docs
Documentation
area: launcher
The launcher (launcher/)
area: runtime (legacy)
The earlier Vulkan runtime in runtime/
area: shader translator
The shader translator (leonida-shader, tools/rdna2spirv) and its tests
area: tools
tools/ and scripts/
area: viewer
The map viewer (viewer/)
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
duplicate
This issue or pull request already exists
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
invalid
This doesn't seem right
missing claim
Needs a claim in #14
needs in-game run
Changes the code a frame runs through: needs the 300 s in-game gate (docs/game_gate.md)
needs rebase
Conflicts with the base branch: rebase it on main
needs-triage
Needs maintainer evaluation before the next triage state
question
Further information is requested
ready-for-agent
Fully specified and ready for an AFK agent
submodules
Pull requests that update submodules code
wontfix
This will not be worked on
No labels
accessibility
area: ci
area: d3d12
area: docs
area: launcher
area: runtime (legacy)
area: shader translator
area: tools
area: viewer
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs in-game run
needs rebase
needs-triage
question
ready-for-agent
submodules
wontfix
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
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.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!2837
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2837"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Neutron-0 on GitHub · 2026-12-01 05:32 UTC · original
Neutron-0:fix/tools-bvh-census-short-carry-source→main· +21 −3 · 2 files · 2 commits · closed without mergingClaimed in the coordination issue as: CENSUS-SHORT-CARRY-SRC (#2570)
What and why
tools/image_bvh_census.pybuilds the SGPR literal map (sgpr_step) and the per-instruction write set (mask_writes). Both took operanda[1]of every_co_op (andv_div_scale) as the carry/scale destination. The three-operand carry forms -v_add_co_ci_u32 v1, s8, v2- printdst, src0, src1with VCC implicit, soa[1]is a source:s8's literal was dropped and a ray-intersection site reading descriptors[8:11]reported word 0 as unknown. The explicit-VCC spelling of the same bytes (v_add_co_ci_u32_e32 v1, vcc, s8, v2, vcc) kept it, which is how the bug showed up (item 2 of the pre-existing finding in the coordination issue).a[1]is now taken as a written SGPR only for the forms that print it: VOP3b, and the e32 form with explicit VCC, both of which have four or more operands. Nothing else changes.Tested
python -I tests/test_image_bvh_census.py- fails onmain60f7dcd90(the new test: the three short forms and themask_writespair) and 22 tests OK with the change.python -m compileall -q tools tests- OK.python -I scripts/check_no_game_data.py tools/image_bvh_census.py tests/test_image_bvh_census.py- OK.GPUs tested: n/a (offline census tool and its unit test, CPU only)
AI-assisted: yes - OpenCode (DeepSeek V4.1 Flash Free)
Checklist
mainand merges cleanly (branch based on60f7dcd90).docs/design.md, with how it was confirmed.Not applicable: offline census tool, no translator rule.
@fiestorra on GitHub · 2026-12-01 05:38 UTC · original
Verified on Windows, and the control bites: the suite fails four cases with
main's copy of the tool.main640b0d0df, cherry-picked (one commit,merge-base1fc92830b), Python 3.13.14:So the four cases this adds are tied to the tool's change and not to fixtures the file already had. That is the control I want on a fix to a parser - the new cases read the old tool and fail.
What the change is, from the diff:
tools/image_bvh_census.pydecides which SGPR a short carry form's source is, and the test file gains the four cases that name it. The tool's other 21 tests pass in both trees, so nothing else moved.What I could not test: a real title's BVH census - that needs the game. The parser and its tests are what I ran.
AI-assisted: yes - DeepSeek v4.1 (flash), both arms on the machine above.
Written with an AI assistant.
@KelboLive on GitHub · 2026-12-01 06:02 UTC · original · reviewed
The rule matches the printed forms, and the probe confirms it rather than just the test:
a[1]is the carry/scale SGPR only for the four-plus-operand spellings (_e64or explicit VCC), while the short three-operand_co_ciforms printdst, src0, src1with VCC implicit — so keepings8as a source is right. My six-form probe behaves as intended:v_add_co_ci_u32 v1, s8, v2(short), the immediate form, and thes[8:9]pair now decode descriptor word 0 as literal 5, while_e64,v_div_scale_f32and the explicit-VCC e32 still drop it, and a synthetic census summary moves exactly those three sites from "not a literal" to "literal 5". Reverting the fix fails 4 of 22 tests, so it is pinned.Two caveats worth recording, both about the heuristic rather than this diff:
len(a) > 3is an operand-count proxy, not an encoding check. A future four-operand_co_spelling with a source ata[1]would be misclassified the same way the short form was; keying on_e64/explicit VCC would be direct and does not depend on how many operands the formatter prints.v_mad_u64_u32/v_mad_i64_i32also write an SGPR ata[1](seetests/test_audit_shader4_regs.py:73) and match neither condition, before or after — a pre-existing gap in the SGPR map, out of this PR's scope, but the same class of bug and worth afinding:in the coordination issue if nobody has it.Test coverage: the three short forms, the explicit e32 and the e64
mask_writescase are covered; the immediate ands[8:9]pair forms are not, though the code handles them (verified). Two sub-tests would close that.@Neutron-0 on GitHub · 2026-12-01 10:43 UTC · original · edited 2026-12-01 11:51 UTC
Temporarily closed: GitHub will not let this account open a second pull request in this repository while one of its pull requests is open (the same
CreatePullRequestpermission error other contributors report, e.g. aznohonza's note in this issue). The branch, the review and the verification stay as they are; this pull request is reopened as soon as the slot is free.@Neutron-0 on GitHub · 2026-12-01 10:43 UTC · original · edited 2026-12-01 11:51 UTC
The reopen was refused, and the answer says why:
You've reached this repository's open pull request limit (reopenPullRequest). The slot is taken by #2864 (thePSV0name table), so this pull request waits for it to be merged; it is reopened then, and the three other fixes of this account follow one at a time.@Neutron-0 on GitHub · 2026-12-01 11:20 UTC · original
The whole standard-library suite passes on this branch's head, with the CI's own selection.
.github/workflows/ci.ymlruns the standard-library tests throughscripts/run_standalone_tests.py, with the files that do not need pytest and have a__main__block. That selection, on this branch (Windows 11, Python 3.13.5):For the record, the suite without the CI's selection predicate (every
tests/test_*.pyoutsidetests/semantic, including the ones that need pytest) ends with 20 failures, and all 20 are files the CI runs underpython -m pytestinstead -test_cube_sample.py,test_f16_*.py,test_gs_*.py,test_mesh_*.py,test_translate.py,test_values.pyand the rest. That is the predicate's doing, not this pull request's.The change here is one file (
tools/image_bvh_census.py) and one test file (tests/test_image_bvh_census.py); neither is in the 630 files' dependency path of the others' results.@Neutron-0 on GitHub · 2026-12-01 19:10 UTC · original
Reopened: the slot this account may hold in this repository is free again.
@Neutron-0 on GitHub · 2026-12-02 05:39 UTC · original
Reopened: the slot this account may hold in this repository is free again.
@Neutron-0 on GitHub · 2026-12-02 05:42 UTC · original
Reopened: the slot this account may hold in this repository is free again.
Pull request closed