test(agc): read lane 63 of the vertex index in the registered workgroup fixture #4177

Merged
oneandonlydean merged 1 commit from upstream-pr/4177 into main 2026-10-12 01:22:31 +00:00
oneandonlydean commented 2026-10-12 00:46:10 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-12T00:46:10Z.


What

agc_driver_prepared_shaders_registered_workgroup_sync fails on main with expected preparation failure, on every host whose subgroup is narrower than 64 lanes: the Linux CI job on llvmpipe (2 of 923 in run 38182978082) and an RTX 4090.

The test came with #2261. Its fixture reads lane 63 of v0 in a wave64 vertex program, and the last registration in the test expects v_readlane_b32 of lane 63 is outside when preparation is synchronous. The program never writes v0. #3546, merged ten minutes later, builds a v_readlane_b32 of a lane the host subgroup does not hold as 0 when the value is 0 in lanes 32-63, so that registration now succeeds. The test passes at 9d5c6afc (the parent of the #3546 merge) and fails at e44b7cf7 (the merge).

The fixture now reads lane 63 of v5, the vertex index the vertex entry writes, which is not 0 in the upper lanes, so the read still throws on a narrower subgroup. One operand word changes (0x00017f00 to 0x00017f05); no code outside the test changes.

Tested

Linux (CachyOS, GCC 16.2.1), Release, BUILD_TESTING=ON, ANYPS5_ENABLE_SPIRV_TOOLS=ON, NVIDIA RTX 4090 (610.57.04, 32-lane subgroup), on main 7a84b222:

  • agc_driver_prepared_shaders_registered_workgroup_sync fails on main with expected preparation failure and passes on the branch.
  • ctest -R agc_driver_prepared_shaders: 9 of 9 pass on the branch. The mesh path of the same fixture still passes (registered NGG wave64 preparation passed; subgroup=32).
  • tools/check_conventions.py --base 7a84b222 passes.

Not run on llvmpipe here; the CI job covers it.

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 (Claude Code)
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4823613056 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4177). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-12T00:46:10Z. --- ### What `agc_driver_prepared_shaders_registered_workgroup_sync` fails on `main` with `expected preparation failure`, on every host whose subgroup is narrower than 64 lanes: the Linux CI job on llvmpipe (2 of 923 in run 38182978082) and an RTX 4090. The test came with #2261. Its fixture reads lane 63 of `v0` in a wave64 vertex program, and the last registration in the test expects `v_readlane_b32 of lane 63 is outside` when preparation is synchronous. The program never writes `v0`. #3546, merged ten minutes later, builds a `v_readlane_b32` of a lane the host subgroup does not hold as 0 when the value is 0 in lanes 32-63, so that registration now succeeds. The test passes at 9d5c6afc (the parent of the #3546 merge) and fails at e44b7cf7 (the merge). The fixture now reads lane 63 of `v5`, the vertex index the vertex entry writes, which is not 0 in the upper lanes, so the read still throws on a narrower subgroup. One operand word changes (`0x00017f00` to `0x00017f05`); no code outside the test changes. ### Tested Linux (CachyOS, GCC 16.2.1), Release, `BUILD_TESTING=ON`, `ANYPS5_ENABLE_SPIRV_TOOLS=ON`, NVIDIA RTX 4090 (610.57.04, 32-lane subgroup), on `main` 7a84b222: - `agc_driver_prepared_shaders_registered_workgroup_sync` fails on `main` with `expected preparation failure` and passes on the branch. - `ctest -R agc_driver_prepared_shaders`: 9 of 9 pass on the branch. The mesh path of the same fixture still passes (`registered NGG wave64 preparation passed; subgroup=32`). - `tools/check_conventions.py --base 7a84b222` passes. Not run on llvmpipe here; the CI job covers it. ### 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 - [x] AI-assisted: yes (Claude Code)
AlxcBTW commented 2026-10-12 00:46:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by AlxcBTW on 2026-10-12T00:46:44Z.


Thanks for catching this, it's a side effect of #3546. That change deliberately builds a v_readlane_b32 of a lane the host subgroup doesn't hold as 0 when the value is provably 0 in lanes 32-63. The fixture's v0 is never written, so the read became legitimate and the expected refusal disappeared. Reading v5 (the vertex index, non-zero in the upper lanes) restores what the test meant to check, and the one-word change matches the encoding (VSRC0 0 → 5). LGTM.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6115767003 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4177#issuecomment-6115767003). Originally posted by [AlxcBTW](https://github.com/AlxcBTW) on 2026-10-12T00:46:44Z. --- Thanks for catching this, it's a side effect of #3546. That change deliberately builds a `v_readlane_b32` of a lane the host subgroup doesn't hold as 0 when the value is provably 0 in lanes 32-63. The fixture's `v0` is never written, so the read became legitimate and the expected refusal disappeared. Reading `v5` (the vertex index, non-zero in the upper lanes) restores what the test meant to check, and the one-word change matches the encoding (`VSRC0` 0 → 5). LGTM. AI-assisted: yes (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!4177
No description provided.