Commit Graph

180 Commits

Author SHA1 Message Date
PrintOrb cf744a3740 fix(tools): preserve UTF-8 in progress comparisons 2026-10-09 08:10:27 -05:00
Jan Šlégl db7666b22c fix(tools): count only definitions as exports in the overlap report
pr_overlap.py took every added line with APS5_VABI before a name and a
parenthesis as an export, so a declaration such as
extern "C" int* APS5_VABI __error_nid_postfix(); made each pull request
that adds it "implement the same function" as all the others. A line
that ends in a semicolon is a declaration and is skipped; every
definition's first line in the tree ends in a brace, a parenthesis or
a comma.

Registers pr_overlap_exports.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-09 14:43:32 +02:00
Pedro 3e01e740e4 test(videoout): drop video_out_flip_tests from KNOWN_UNRUN now that ctest runs it 2026-10-09 06:53:27 -05:00
darhebkf 357d4d3e8b
fix(tools): check overlap against every open pull request 2026-10-09 13:49:20 +02:00
darhebkf a00559a222
fix(tools): preserve function bodies after line comments 2026-10-09 13:42:24 +02:00
Dextroid17 ad1c3924da ci: accept the device limitations the CI jobs actually report 2026-10-09 07:00:35 -04:00
Dextroid17 1924e18f6f ci: fail when a test skips that the job's device is not expected to skip
The Linux job reports "100% tests passed out of 371" with 20 agc_driver execution tests skipped
(llvmpipe reports subgroup size 8, so the tests that need a wider wave exit 77), and the Windows
job reports "100% tests passed, 0 tests failed out of 368" with 143 skipped - the runner has no
Vulkan driver and ANYPS5_REQUIRE_VULKAN is not set there, so 143 of the 147 GPU execution tests
silently do not run. ctest counts a skip as a pass, so neither job notices when the set grows.

Add tools/check_skips.py. It reads the file ctest writes with --output-junit and fails when a test
skips for a reason that is not expected:

- linux: a skip is expected only when the test's own output reports that the device's subgroups
  are too narrow for it, so adding a wave32 test does not need the rule edited;
- windows: any agc_driver test, since the runner has no driver for them, while a skip of anything
  else fails.

Both jobs now pass --output-junit and run the check after ctest. The JUnit file needs no
redirection, so the console output stays visible and no pipe can hide a failing ctest.

Verified here with the CI command and the CI device (lavapipe, subgroup 8): the real run reports
20 skipped, all expected; a 21st wave32 test skipping for the same reason passes; a skip whose
reason is something else exits 1; a file with 143 agc_driver skips passes with --job windows and
one non-agc skip in it exits 1.
2026-10-09 07:00:35 -04:00
Dean Galvin e0a8297a7b fix(hw-oracle): skip the wave64 assembly test when clang has no AMDGPU target 2026-10-09 23:05:41 +13:00
Dean 3bd74c155d
Merge pull request #1989 from yeahboi233/fix/pr-overlap-utf8
fix(tools): decode overlap command output as UTF-8
2026-10-09 22:43:19 +13:00
Dean b7218b3cec
Merge pull request #1962 from CouchRiv/fix-hw-oracle-wave64
fix(hw-oracle): assemble wave64 bodies in wave64 mode
2026-10-09 22:43:05 +13:00
Dean 34b881e326
Merge pull request #1542 from ska2704/fix/oracle-cache-publication
fix(oracle): publish cached executable only after successful build
2026-10-09 22:42:51 +13:00
Dean 6a2b99b82d
Merge pull request #1811 from gerardlesan/test/agc-mesh-ctest
test(agc): run agc_driver_mesh_tests under ctest
2026-10-09 22:41:54 +13:00
Dean 6cc0503dac
Merge pull request #1550 from ska2704/fix/progress-exclude-test-sources
fix(progress): exclude library test fixtures from function counts
2026-10-09 21:04:18 +13:00
David d658f73e00 fix(tools): decode overlap command output as UTF-8 2026-10-08 20:40:46 -07:00
Alex dc902b2eae fix(hw-oracle): assemble wave64 bodies in wave64 mode
clang assembled every body as wave32, so a --wave64 body that used vcc
or an SGPR pair as a condition failed with "operands are not valid for
this GPU or mode". Pass -mwavefrontsize64 on wave64 runs.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 23:03:22 -04:00
SK Arin 567b1f923f chore(oracle): resolve upstream test registration conflict 2026-10-09 07:55:35 +05:30
Gerard L. 1d6968225f test(agc): run agc_driver_mesh_tests under ctest
The mesh test was built only on request and never registered, so the
translation of NGG geometry programs to mesh shaders ran in no test
run. On an RTX 4060 it passes. Register it with the other AGC driver
tests.

Three cases would fail or mislead under ctest. Without a Vulkan device
the test failed, and the Windows job has none. A device without
VK_EXT_mesh_shader exited 0, so ctest reported a pass for a test that
drew nothing. On llvmpipe, with the Linux job's Mesa 25.2.8 and Ubuntu
24.04's LLVM 20.1.2, every draw that builds a mesh pipeline stops the
process with "LLVM ERROR: Cannot emit physreg copy instruction"; Mesa
26.2.4 with LLVM 23.1 segfaults in LLVM's code generation instead. The
SPIR-V of all 18 modules the test builds passes spirv-val. Mesa #14376
reports the same error for lavapipe mesh shaders that index shared
memory per invocation; that the cause is the same is not established.

The test now opens its device with OpenVulkanTestDevice and exits 77
without a device, without VK_EXT_mesh_shader and on llvmpipe, saying
why. ANYPS5_REQUIRE_VULKAN still turns a missing device into a
failure. The Linux job therefore skips the test; it runs on hosts with
a GPU.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 23:44:46 +02:00
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
SK Arin 6e951bd0ed fix(progress): exclude library test fixtures from function counts 2026-10-08 17:30:43 +05:30
SK Arin 466ebde23c fix(oracle): publish cached executable only after successful build 2026-10-08 17:16:36 +05:30
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
DotDebian 92a378afc4 fix(tools): count the debug branches and s_ttracedata_imm as decoded shader instructions
SCbranchCdbg decodes SOPP 0x17-0x1a and STtracedata decodes 0x16 and 0x28,
so S_CBRANCH_CDBGSYS, S_CBRANCH_CDBGUSER, S_CBRANCH_CDBGSYS_OR_USER,
S_CBRANCH_CDBGSYS_AND_USER and S_TTRACEDATA_IMM were reported as missing
although the decoder handles them and existing tests cover them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 18:27:13 +02:00
DotDebian 5046aebc29 fix(tools): count the tested s_cmpk variants
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 17:06:50 +02:00
Adrià Franch ff532073f3 fix(tools): count exports that call a local stub wrapper as unimplemented
libSceAjm.native routes 13 exports through a static AjmStub helper that
calls NotImplemented_nid_no_patch, so the progress map counted them as
implemented. Calls to such helpers in the same file now count as stubs.
The compare report also lists functions that went back to stubs in its
header.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-01 19:23:55 +02:00
SamG-Coder 7bcde3ba95 fix(tools): count tested shared shader instruction variants 2026-10-01 20:23:58 +10:00
Adrià Franch 8d02448525 ci: comment on pull requests that overlap other open pull requests
Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-29 16:24:47 +02:00
boykopovar c8beb90a5e build(release): package libraries under libs subfolder 2026-09-29 02:13:22 +03:00
boykopovar 1bc7f01511 feat(ci): add version to release file names 2026-09-29 00:22:44 +03:00
boykopovar 1071c9e09c feat(ci): add release workflow + update readme 2026-09-29 00:15:21 +03:00
boykopovar 87633fc4e8
chore(tools): move progress.py description from repo to pr 2026-09-28 18:42:44 +03:00
adriadam10 e73cd7dec3 feat(tools): report progress changes on pull requests
progress.py stores the names of implemented and pending items, can
measure another source tree with --root and prints a Markdown diff of
two runs with --compare. The Progress report workflow compares every
pull request with its base, and Progress comment posts the result as a
single comment, updated on every push and removed when progress no
longer changes. Commenting runs as a separate workflow_run so pull
requests from forks never run with write permissions.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-27 18:47:32 +02:00
adriadam10 3c6b0af6f7 feat(tools): add progress map for system libraries and shader instructions
tools/progress.py counts implemented prx functions and RDNA instructions
recognized by the shader recompiler, and renders treemaps, badges and an
index page. The Progress workflow deploys them to GitHub Pages on every
push to main, so nothing generated is committed to the repository.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-27 18:21:34 +02:00