test(shader): keep the flat cache bits test within CI's time limit #677

Merged
adriadam10 merged 1 commit from upstream-pr/677 into main 2026-10-05 16:58:55 +00:00
adriadam10 commented 2026-10-05 14:55:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-05T14:55:18Z.


What

agc_driver_flat_cache_bits (from #495) takes 113 s on main's Linux CI and goes past the 120 s ctest timeout on PR runs: #545, #593, #668 and #672 fail on it with (Timeout) and nothing else. CI's lavapipe (LLVM 20) spends about 3 s compiling each BDA access per shader and wave size. The old kernel had 19 of them and ran twice (wave32 and wave64).

The test now runs one wave32 kernel with 5 BDA accesses, each with glc slc dlc:

  • global_load_dwordx2 and flat_load_dword (loads, global and flat segment)
  • global_store_dword and flat_store_dword (stores)
  • returning global_atomic_add (glc keeps the pre-op return, with slc set)

It checks the 4 results per lane and the final 16 bytes per lane against values measured on HW, and that nothing else in the 64 KiB guest block changes. The cache bits don't depend on the lane, so one wave size is enough. The decoder condition and the translation paths that #495 changed are the same for every data size, so dropping the sub-dword and per-bit rows doesn't lose a case those paths can tell apart.

Only the test changes.

Tested

  • HW (Radeon 660M, gfx1035, same VMEM encoding as gfx1013): the new kernel over 32 rows (edge values plus random) matches the model 32/32, on fine-grained and on coarse-grained memory. The test's expected values are these HW rows.
  • CI's lavapipe (Ubuntu Mesa 25.2.8, LLVM 20.1.2), cold with no shader cache: 9 s, was 120 s. RADV: passes.
  • Negative checks still fail the test: cache bits still rejected by the decoder, slc dropping the atomic return, a dlc store skipped.
  • Linux (CachyOS, GCC, Release, BUILD_TESTING=ON): full build, ctest 285/288. agc_driver_pixel_helper_lanes, agc_driver_pixel_lds and agc_driver_pixel_lds_lane_slots also fail on main on this machine's RADV.

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
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4746801640 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/677). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-05T14:55:18Z. --- ### What `agc_driver_flat_cache_bits` (from #495) takes 113 s on main's Linux CI and goes past the 120 s ctest timeout on PR runs: #545, #593, #668 and #672 fail on it with `(Timeout)` and nothing else. CI's lavapipe (LLVM 20) spends about 3 s compiling each BDA access per shader and wave size. The old kernel had 19 of them and ran twice (wave32 and wave64). The test now runs one wave32 kernel with 5 BDA accesses, each with `glc slc dlc`: - `global_load_dwordx2` and `flat_load_dword` (loads, global and flat segment) - `global_store_dword` and `flat_store_dword` (stores) - returning `global_atomic_add` (`glc` keeps the pre-op return, with `slc` set) It checks the 4 results per lane and the final 16 bytes per lane against values measured on HW, and that nothing else in the 64 KiB guest block changes. The cache bits don't depend on the lane, so one wave size is enough. The decoder condition and the translation paths that #495 changed are the same for every data size, so dropping the sub-dword and per-bit rows doesn't lose a case those paths can tell apart. Only the test changes. ### Tested - HW (Radeon 660M, gfx1035, same VMEM encoding as gfx1013): the new kernel over 32 rows (edge values plus random) matches the model 32/32, on fine-grained and on coarse-grained memory. The test's expected values are these HW rows. - CI's lavapipe (Ubuntu Mesa 25.2.8, LLVM 20.1.2), cold with no shader cache: 9 s, was 120 s. RADV: passes. - Negative checks still fail the test: cache bits still rejected by the decoder, `slc` dropping the atomic return, a `dlc` store skipped. - Linux (CachyOS, GCC, Release, `BUILD_TESTING=ON`): full build, `ctest` 285/288. `agc_driver_pixel_helper_lanes`, `agc_driver_pixel_lds` and `agc_driver_pixel_lds_lane_slots` also fail on `main` on this machine's RADV. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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 - [x] AI-assisted: yes
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!677
No description provided.