fix(tools): count the debug branches and s_ttracedata_imm as decoded shader instructions #380

Merged
DotDebian merged 1 commit from upstream-pr/380 into main 2026-10-04 01:13:51 +00:00
DotDebian commented 2026-10-02 16:27:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by DotDebian on 2026-10-02T16:27:24Z.


What

tools/progress.py matches RdnaOpcode enum names against the ISA list, so an instruction decoded through a shared opcode is counted as missing. Two SOPP cases are already decoded and covered by tests on main:

  • SCbranchCdbg decodes SOPP 0x17-0x1a: S_CBRANCH_CDBGSYS, S_CBRANCH_CDBGUSER, S_CBRANCH_CDBGSYS_OR_USER, S_CBRANCH_CDBGSYS_AND_USER. debugBranchTests in tests/Graphics.cpp recompiles all four.
  • STtracedata decodes SOPP 0x16 and 0x28 (S_TTRACEDATA_IMM). tests/execution/CacheControl.cpp runs 0xbfa80001.

This adds both to OPCODE_VARIANTS, as 7bcde3ba did for the other shared opcodes. Shaders go from 695/1166 to 700/1166. No emulator code changes.

SCbranchCdbg still appears in the page's list of opcode names absent from AMD's list, like VAddI32 and VSubrevI32 already do.

Tested

Windows 11, MinGW-w64 GCC 15.2.0.

  • python tools/progress.py before and after, then --compare: +5 implemented (the five names above), nothing else moves.
  • ctest: 100% tests passed out of 108. agc_driver_graphics and agc_driver_cache_control, the two tests that exercise these encodings, pass and are not skipped. With the 0x17-0x1a and 0x28 cases removed from decodeSoppOpcode locally, both fail (unsupported SOPP opcode), so they do cover the decoding. No test added: the change is in the reporting script only.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none. #363 edits other lines of the same table; a trial merge of the two is clean.
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4718851011 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/380). Originally posted by [DotDebian](https://github.com/DotDebian) on 2026-10-02T16:27:24Z. --- ### What `tools/progress.py` matches `RdnaOpcode` enum names against the ISA list, so an instruction decoded through a shared opcode is counted as missing. Two SOPP cases are already decoded and covered by tests on `main`: - `SCbranchCdbg` decodes SOPP `0x17`-`0x1a`: `S_CBRANCH_CDBGSYS`, `S_CBRANCH_CDBGUSER`, `S_CBRANCH_CDBGSYS_OR_USER`, `S_CBRANCH_CDBGSYS_AND_USER`. `debugBranchTests` in `tests/Graphics.cpp` recompiles all four. - `STtracedata` decodes SOPP `0x16` and `0x28` (`S_TTRACEDATA_IMM`). `tests/execution/CacheControl.cpp` runs `0xbfa80001`. This adds both to `OPCODE_VARIANTS`, as 7bcde3ba did for the other shared opcodes. Shaders go from 695/1166 to 700/1166. No emulator code changes. `SCbranchCdbg` still appears in the page's list of opcode names absent from AMD's list, like `VAddI32` and `VSubrevI32` already do. ### Tested Windows 11, MinGW-w64 GCC 15.2.0. - `python tools/progress.py` before and after, then `--compare`: +5 implemented (the five names above), nothing else moves. - `ctest`: 100% tests passed out of 108. `agc_driver_graphics` and `agc_driver_cache_control`, the two tests that exercise these encodings, pass and are not skipped. With the `0x17`-`0x1a` and `0x28` cases removed from `decodeSoppOpcode` locally, both fail (`unsupported SOPP opcode`), so they do cover the decoding. No test added: the change is in the reporting script only. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none. #363 edits other lines of the same table; a trial merge of the two is clean. - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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
boykopovar/AnyPS5!380
No description provided.