fix(tools): stop listing opcodes counted through their variants as uncounted #13615
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/13615"
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?
Imported from boykopovar/AnyPS5. Originally posted by SandstromPL on 2026-10-30T19:42:24Z.
What
The shader section of the progress page ends with "Decoded opcodes not present in AMD's public list are not counted", followed by the opcodes
collect_shadersputs inextra. Onmainthat list has 24 entries. Four of them are counted:VAddI32V_ADD_CO_U32VSubI32V_SUB_CO_U32VSubrevI32V_SUBREV_CO_U32SCbranchCdbgS_CBRANCH_CDBGSYS,S_CBRANCH_CDBGUSER,S_CBRANCH_CDBGSYS_OR_USER,S_CBRANCH_CDBGSYS_AND_USERcollect_shadersadds an opcode'sOPCODE_VARIANTSto the counted set. It then adds the opcode itself toextrawhenever the opcode's own name isn't inrdna_isa.txt, even when its variants were just counted. Now an opcode goes inextraonly when neither its name nor any of its variants is in the list. Counting doesn't change.Tested
Linux (Ubuntu 24.04, Python 3.12),
main16345cad6a:tools/tests/test_progress.py: an enum withVAddI32andVMulLoI32and an ISA list with onlyV_ADD_CO_U32. It expects one counted instruction andextra == ["VMulLoI32"]. Onmainit fails (['VAddI32', 'VMulLoI32'] != ['VMulLoI32']); with this PR it passes.tools/tests/test_progress*.pypass, as dotest_import_audit.pyandtest_nid_names.py.python3 tools/progress.py --json: shaders stay at 1166/1166, andextragoes from 24 entries to 20. The four above leave the list; the rest (VMulLoI32, theDs*Src2*opcodes and theSDcache*opcodes) stay.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-30T20:21:53Z.
Review: APPROVED
Verified
e699d93a62on Linux x86-64 (GCC 16.2.1, CachyOS kernel 6.2.10, Release, BUILD_TESTING=ON). Python-only change to tools/progress.py.extranow only receives an opcode when neither its own name nor any of itsOPCODE_VARIANTSresolved into the ISA list — previously an opcode counted via its variants was still listed as uncounted. The counted set is unchanged (variants still added before the check).python3 -m unittest tools.tests.test_progress(pytest not installed; file is unittest-based): Ran 57 tests ... OK, including the newtest_opcodes_counted_through_variants_are_not_listed_as_uncounted(enumVAddI32/VMulLoI32, ISA with onlyV_ADD_CO_U32→ done=1, extra=[VMulLoI32]).python3 tools/progress.py --jsonat the PR head → shaders 1166/1166 unchanged,extra24 → 20 entries (VAddI32,VSubI32,VSubrevI32,SCbranchCdbgdropped; theDs*Src2*andSDcache*opcodes remain), matching the PR body exactly.No build needed (no C++ touched). Nothing left open.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-30T20:23:15Z.
Review: APPROVED
Reviewed — looks good
I approve head
e699d93a62a01583c12063b99d2cb87adbc66f1e: opcodes counted through a listed variant are no longer reported as uncounted, and the new regression test fails on the base behavior.What I ran
Reviewed exact head
e699d93a62a01583c12063b99d2cb87adbc66f1eagainst PR base1c793c03ade93d92a9a4b10c638a0228249b1ef6. The no-build merge preview was clean against currentmain73ffb45110da8a9960267124941316bc006998ea. Environment: Linux x86-64, Python 3.11.2. No project build or compile was run.Results
tools.tests.test_progressadd_testor workflow.Unedited test and negative-control output
python3 -m unittest tools.tests.test_progress:python3 tools/check_test_registration.py --scripts:The precheck's negative-control run against base
1c793c03ade93d92a9a4b10c638a0228249b1ef6:Negative control
extra, while an unrelated unsupported opcode remains1c793c03ade93d92a9a4b10c638a0228249b1ef6, which lacks this fixSources
extraclassification at the reviewed headNot verified
The two macOS relinker jobs were still pending at the final check snapshot. The no-build precheck's optional test-quality helper was absent from its isolated checkout; its warning did not affect the direct Python tests, registration check, or negative control.