Commit Graph

61 Commits

Author SHA1 Message Date
Daniele Giovane 59fd202257 fix(ci): remove stale formatting test exception 2026-10-08 16:07:07 +02:00
abderahmane-ai 9e6a6004a5 feat(tools): add an import audit for converted games
A converted game fails at launch on the first system function that no
built library exports, one function per run. tools/import_audit.py reads
the registry written by relinker --registry and classifies every imported
NID in one pass:

- implemented: a built library exports it
- stub: exported, but the whole function calls NotImplemented_nid_no_patch
- absent: no built library exports it, so the loader fails
- module: the import names a file the title ships itself

Exports are read from the built .prx files (ELF dynsym and PE export
table), the same view the loader has. Stubs come from the source tree
through tools/progress.py, and NIDs through tools/nid_names.py. The report
also lists needed libraries without a file and imports found only in a
different library than the one they name. --names adds names from an
aerolib.csv file and never downloads one; --json writes the full result
stamped with the repository commit.

The test builds ELF and PE libraries byte by byte, checks that every
reference lands in exactly one class, and pins the NID of
sceMsgDialogProgressBarSetValue (wTpfglkmv34) as an external anchor.
Registered in CTest as import_audit.
2026-10-08 15:47:46 +02:00
Adrià Franch 464f673170 ci: keep the not-run list per platform
guest_formatting_tests runs only on Windows and windows_exception_tests only
exists there, so the stale-entry check failed the Windows job.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-08 12:02:39 +02:00
Adrià Franch 0208dea491 ci: fail when a KNOWN_UNRUN test is run by ctest
agc_driver_bda_device_tests is registered on main, so its entry hid any
future loss of that registration.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-08 11:40:34 +02:00
Dextroid17 5d6ec8ee1f fix(ci): read only linked executables out of the build graph
The Windows job failed the check with two names that are not test
executables. `libhost_thread_local_test_library` is a support library
whose RUNTIME_OUTPUT_DIRECTORY puts it in the test directory; on Linux
its output is a library artifact and never lands there, which is why the
Linux job stayed green. `windows_exception_tests` is a MINGW-only test
executable that no `add_test` registers.

Ninja prints the rule beside each target, and CMake links an executable
with `CXX_EXECUTABLE_LINKER__<target>_<config>` and a shared library with
`CXX_SHARED_LIBRARY_LINKER__...`, on every platform. Requiring EXECUTABLE
in the rule leaves the library out and keeps the Linux count at 362.

`windows_exception_tests` is a real instance of the class this check
looks for, so record it beside the other five rather than fail the job
that found it.
2026-10-08 11:40:34 +02:00
Dextroid17 28d9b1a49b fix(ci): read the test executable list on Windows as well
The Windows job failed on the new step with
"no test executables found under build". Ninja prints the target names
with the platform separator, so the Windows build graph lists
tests\name_tests.exe where Linux lists tests/name_tests, and the reader
matched neither the backslash nor the .exe suffix.

Accept both separators and a .exe suffix. Verified by driving the
function with recorded Ninja output for both platforms, which now
return the same names, and by re-running the check against the Linux
tree, which still reports 362 test executables and the same five.
2026-10-08 11:40:34 +02:00
Dextroid17 dd5c052dc5 ci: fail when a test executable is built that no test runs
A test executable can be declared with add_test_executable and never
registered with add_test. It is then built and never run, and ctest
reports a full pass over what it knows, so nothing in CI says so.

Measured on main, five test executables are in this state: the driver's
mesh and recorder tests, the guest formatting tests, the video out flip
tests and the BDA device tests.

tools/check_test_registration.py compares the test executables CMake
builds, read from the build graph, against the add_test calls in the
generated CTestTestfile.cmake files, which are written at configure time
and so do not depend on the build having finished. It fails on a test
executable that nothing runs, and records those five by name so the job
stays green until they are dealt with.

Both jobs run it right after configure, before anything is built.
2026-10-08 11:40:34 +02:00
Dean bbead6f34b
Merge pull request #1420 from Amirtheshwaran/fix/check-conventions-windows-encoding
fix(tools): read and write UTF-8 in check_conventions regardless of the Windows code page
2026-10-08 19:35:36 +13:00
Adrià e98466797f
Merge pull request #1082 from MuhammadUmair1019/fix/oracle-explicit-float-modes
fix(oracle)!: require explicit float modes
2026-10-08 07:56:13 +02:00
Dean 78cac62f30
Merge pull request #1137 from Sanjaysrinivas/fix/progress-shared-sources
fix(progress): report shared-source libraries
2026-10-08 18:29:17 +13:00
Dean baf2ee3399
Merge pull request #1254 from popcoder565/fix/conventions-windows-paths
fix(tools): resolve documentation links as repository paths on Windows
2026-10-08 18:28:48 +13:00
Dean d548449654
Merge pull request #1229 from hashaam1217/fix/pr-overlap-older-git
fix(tools): run pr_overlap on git older than 2.45
2026-10-08 18:28:28 +13:00
Dean 2342bd3f76
Merge pull request #1214 from polysius/fix/progress-pck-variants
fix(tools): stop counting IMAGE_*_PCK2/PCK4 as decoded instructions
2026-10-08 18:21:07 +13:00
Amirtheshwaran Navaneethakrishnan 2de16aeba8 fix(tools): read and write UTF-8 in check_conventions regardless of the Windows code page 2026-10-07 23:40:48 -04:00
Hashaam Zafar 81798c8df6 fix(tools): keep the pr_overlap tree key for the merge commit
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 18:10:12 -07:00
Adrià c5e10184a2
Merge pull request #819 from ebosido444-ai/fix/overlap-multiline-depends
fix(tools): read multi-line Depends on lists in pr_overlap
2026-10-07 22:03:32 +02:00
popcoder565 fb7be867c5 fix(tools): resolve documentation links as repository paths on Windows
check_conventions.py normalized link targets with os.path.normpath, which gives backslash paths on Windows, so every link added in docs failed the doc-link check and a silent stub listed in TechnicalDebt was not found. Links are repository-relative POSIX paths, so they are normalized with posixpath.
2026-10-07 15:49:03 -04:00
Sanjaysrinivas efdbbf1a70 fix(progress): report shared-source libraries 2026-10-07 21:40:38 +02:00
Hashaam Zafar 1a413b0b56 fix(tools): run pr_overlap on git older than 2.45
git merge-tree takes trees with --merge-base only from git 2.45. On
older git, such as 2.43 on Ubuntu 24.04, the pairwise merge failed and
merge() read the first line of empty output, so --branch stopped with
an IndexError. The merged trees are now wrapped in commits on top of
the base, which git merge-tree accepts with --merge-base from 2.40, and
a failing git merge-tree raises with git's message.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 11:29:13 -07:00
ebosido444-ai 5a4d8b6f42 fix(tools): keep the pr_overlap DEPENDS pattern a raw string 2026-10-07 20:45:41 +03:00
Adrià Franch bdf7cc4ef0 ci(conventions): accept silent stubs listed by file or by name with a path in TechnicalDebt
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-07 17:24:27 +02:00
Adrià Franch 5cb47befe3 ci(conventions): allow comments with a TechnicalDebt change, reject non-text files 2026-10-07 17:04:06 +02:00
Adrià Franch d3501453fd ci(conventions): keep only the rules written in CONTRIBUTING 2026-10-07 17:03:37 +02:00
Adrià Franch 34026e88f9 ci: check pull requests against the contributing rules
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-07 17:03:37 +02:00
ploysius f2bee7d270 fix(tools): stop counting IMAGE_*_PCK2/PCK4 as decoded instructions
IMAGE_LOAD_PCK2/PCK4, IMAGE_LOAD_MIP_PCK2/PCK4, IMAGE_STORE_PCK2/PCK4 and
IMAGE_STORE_MIP_PCK2/PCK4 are separate MIMG opcodes (112/113, 115/116,
118/119, 121/122 on RDNA1 and RDNA2 in AMD's generated tables), not dmask
forms of IMAGE_LOAD_PCK (2), IMAGE_LOAD_MIP_PCK (4), IMAGE_STORE_PCK (10)
and IMAGE_STORE_MIP_PCK (11). The decoder has no entries for them and
throws "unsupported MIMG opcode", so they are no longer credited.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 10:27:59 -04:00
Muhammad Umair f2b6b5a1a9 fix(oracle)!: require explicit float modes
BREAKING CHANGE: CLI and Python callers must supply all seven float
controls. Add clamp, rounding and FP16 overflow settings so hardware
measurements cannot silently use an unintended mode.

Refs #981
2026-10-07 14:58:28 +05:00
Kikoarl c8e4a17f89 feat(shader): decode s_setkill as s_endpgm 2026-10-07 08:39:41 +02:00
Dean 6254e055e1
Merge pull request #942 from Kikoarl/feat/mimg-packed-variants
fix(tools): count packed MIMG variants as decoded shader instructions
2026-10-07 10:21:30 +13:00
Dean 36f92f7a76
Merge pull request #811 from ebosido444-ai/fix/nid-names-function-try-block
fix(tools): count function-try-block definitions in nid_names.py
2026-10-07 09:59:33 +13:00
Kikoarl d155f4555c fix(tools): count packed MIMG variants as decoded shader instructions
ImageLoadPck, ImageLoadMipPck, ImageStorePck and ImageStoreMipPck are
decoded and implemented for 2- and 4-dword transfers, but the disassembler
and rdna_isa.txt list them under separate _PCK2 and _PCK4 mnemonics.
Existing tests in ImageLoadPacked and ImageStorePacked already cover
these dword counts.
2026-10-06 20:59:47 +02:00
Adrià Franch f617b40a45 feat(tools): add a hardware oracle for RDNA instruction semantics
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 13:54:28 +02:00
ebosido444-ai 999da59a7c fix(tools): read multi-line Depends on lists in pr_overlap 2026-10-06 12:45:44 +03:00
ebosido444-ai 96499c8560 fix(tools): count function-try-block definitions in nid_names.py 2026-10-06 09:00:09 +03:00
Adrià Franch 79057e9160 refactor(libs): drop replacements of modules that titles ship themselves
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 07:11:33 +02:00
Adrià Franch 3299d56707 fix(tools): count function-try-block exports in progress.py
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-05 19:09:52 +02:00
Adrià Franch 4d05623a42 fix(tools): count s_endpgm_saved and s_endpgm_ordered_ps_done as decoded shader instructions
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-05 11:11:04 +02:00
Nahuel Genchi 331d16d44a fix(tools): count v_fmac_legacy_f32 and v_fma_legacy_f32 as decoded shader instructions
VOP2 0x06 and VOP3 0x140 were only matched by their RDNA 1 names.
2026-10-04 21:47:22 -03:00
Dean b57f722ca4
Merge pull request #542 from Pouare514/tools/nid-names
feat(tools): suggest real names for Unknown NID stubs from hash-verified DB
2026-10-05 12:46:56 +13:00
Pouare514 66f0e7b0eb fix(tools): always verify NIDs, collect all definitions, pin DB commit 2026-10-05 00:58:10 +02:00
Dean a6c363a51b
Merge pull request #383 from DotDebian/test/sopk-waitcnt-counters
test(shader): cover the SOPK s_waitcnt counters and count them as decoded
2026-10-05 11:42:41 +13:00
Dean 4befff984e
Merge pull request #548 from adriadam10/tools/progress-aliases
fix(tools): count v_fma_mix_f32 as a decoded shader instruction
2026-10-05 10:24:20 +13:00
Dean 55e915abdb
Merge pull request #527 from DotDebian/test/vop3-carry-out-add-sub
test(shader): cover the VOP3 carry-out add and subtracts and count v_sub_co_u32 as decoded
2026-10-05 10:15:36 +13:00
Adrià Franch 4939e5d105 fix(tools): count v_fma_mix_f32 as a decoded shader instruction
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-04 22:35:39 +02:00
Pouare514 88320f1297 feat(tools): suggest real names for Unknown NID stubs from hash-verified DB 2026-10-04 18:23:08 +02:00
DotDebian e2dd34f360 test(shader): cover the SOPK s_waitcnt counters and count them as decoded
The decoder maps SOPK opcodes 0x17 to 0x1a to SWaitcnt, but no test encoded them and tools/progress.py only counted S_WAITCNT_VSCNT. The test runs the four waits with a null and a live register field and checks that SCC and the register are left unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 17:13:18 +02:00
DotDebian a590841f19 test(shader): cover the VOP3 carry-out add and subtracts and count v_sub_co_u32 as decoded
v_add_co_u32, v_sub_co_u32 and v_subrev_co_u32 (VOP3 0x30f, 0x310, 0x319)
decode to VAddI32, VSubI32 and VSubrevI32 and had no execution test.
tools/progress.py listed the first and the last as variants of those
opcodes but not v_sub_co_u32, which it reported as missing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 17:01:01 +02:00
DotDebian 624eeac4c5 test(shader): cover v_fmac_f32, v_fmamk_f32 and v_fmaak_f32 and count them as decoded
VOP2 0x2b, 0x2c and 0x2d decode to the opcodes of v_mac_f32, v_madmk_f32
and v_madak_f32 and differ only by the encoding, which keeps them fused.
The progress map derives names from the opcode enum, so it listed the three
fused forms as missing.

The new test decodes the six encodings and checks that the translation
rounds the product separately for 0x1f-0x21, keeps 0x2b-0x2d fused, and
reads the accumulator and the literal from the right operand.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 16:36:17 +02:00
Dean fafec33471
Merge pull request #380 from DotDebian/fix/progress-count-sopp-shared-opcodes
fix(tools): count the debug branches and s_ttracedata_imm as decoded shader instructions
2026-10-04 14:13:51 +13:00
Dean deb7e0dfff
Merge pull request #363 from DotDebian/test/sopk-cmpk-compares
test(shader): cover the s_cmpk compares and count them as tested variants
2026-10-04 14:05:04 +13:00
DotDebian b4506a359c feat(shader): decode image_sample_d_cl_o
MIMG opcode 0x33 samples with explicit derivatives, an LOD clamp and a
texel offset. The three address flags already exist; only the opcode was
missing from the decoder table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 19:07:30 +02:00