test(shader): check that s_subvector_loop_begin tests an empty exec mask with one compare #8274

Merged
thuanquang merged 1 commit from upstream-pr/8274 into main 2026-10-20 12:04:00 +00:00
thuanquang commented 2026-10-20 08:15:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by thuanquang on 2026-10-20T08:15:37Z.


What

Follow-up to #7623, which made s_subvector_loop_begin test an empty exec mask as (exec_lo | exec_hi) == 0 instead of exec_lo == 0 && exec_hi == 0 but added no test that fails on the old form. agc_driver_subvector_loop can't catch a return to two compares: main's run 39387000981 skipped it in both the linux and the windows job, and, as #7623 measured, the two-compare form fails only with robustBufferAccess2 on, which main keeps off on AMD's Windows driver (#7351). #8267 turns it back on there, so with #8267 a return to two compares would break AMD again while CI still skips that test.

agc_spirv_subvector_loop_begin recompiles the exec-kept program of agc_driver_subvector_loop at wave64, with robustBufferAccess2 off and on, and requires exactly one OpBranchConditional on (exec_lo | exec_hi) == 0 and none on exec_lo == 0 && exec_hi == 0. It needs no GPU. The program moves to SubvectorLoopFixture.hpp so both tests use one copy, as NarrowConstantStoreFixture.hpp does for the constant store tests.

Tested

Windows 11 26200, AMD Radeon RX 6700 XT (gfx1031), driver 32.0.21045.5002, WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON, this branch on main 1edbe4b5e.

  • agc_spirv_subvector_loop_begin passes in the default build and in a second build with -DANYPS5_ENABLE_SPIRV_TOOLS=ON, as the linux job configures it, so that Recompile also validates and optimizes the module:
    SpirvSubvectorLoopBegin: s_subvector_loop_begin tests an empty exec mask as (exec_lo | exec_hi) == 0 in both robustBufferAccess2 modes
    
  • With #7623's change to ControlFlowInstructions.cpp reverted locally (not committed), it fails in both builds:
    SpirvSubvectorLoopBegin: robustBufferAccess2 off: branches that compare exec_lo and exec_hi with 0 separately: 1, expected 0
    SpirvSubvectorLoopBegin: robustBufferAccess2 off: branches that compare (exec_lo | exec_hi) with 0: 0, expected 1 (s_subvector_loop_begin)
    SpirvSubvectorLoopBegin: robustBufferAccess2 on: branches that compare exec_lo and exec_hi with 0 separately: 1, expected 0
    SpirvSubvectorLoopBegin: robustBufferAccess2 on: branches that compare (exec_lo | exec_hi) with 0: 0, expected 1 (s_subvector_loop_begin)
    
  • Validation layer: ctest -V with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1 and ANYPS5_REQUIRE_VULKAN=1. agc_driver_subvector_loop passes with main's SubvectorLoop.cpp and with this branch's. Neither log has a VUID- line or was not found but was requested by env var VK_INSTANCE_LAYERS. agc_spirv_subvector_loop_begin creates no Vulkan device.
  • With RobustBufferAccess2Usable changed locally to return true for every driver (not part of this PR), run from renamed copies of the test executable in the same validation-layer environment: agc_driver_subvector_loop passes on this branch. With #7623's change also reverted it fails with subvector loop exec kept by the body, initial exec high half: lane 0 exec hi after the loop is 0, expected 4294967295, the failure #7623 fixed. Neither log has a VUID- line.
  • python tools/check_conventions.py --base origin/main with this title and body passes.
  • Not tested: a Linux build (both builds here are Windows MinGW builds), and other GPUs.

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 under Silent stubs in their library's technical debt file
  • 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
  • Fixes: none
  • Unblocks: none
  • GPUs tested: AMD Radeon RX 6700 XT (gfx1031), driver 32.0.21045.5002, Windows 11 26200
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4932974163 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8274). Originally posted by [thuanquang](https://github.com/thuanquang) on 2026-10-20T08:15:37Z. --- ### What Follow-up to #7623, which made `s_subvector_loop_begin` test an empty exec mask as `(exec_lo | exec_hi) == 0` instead of `exec_lo == 0 && exec_hi == 0` but added no test that fails on the old form. `agc_driver_subvector_loop` can't catch a return to two compares: `main`'s run [39387000981](https://github.com/boykopovar/AnyPS5/actions/runs/39387000981) skipped it in both the linux and the windows job, and, as #7623 measured, the two-compare form fails only with `robustBufferAccess2` on, which `main` keeps off on AMD's Windows driver (#7351). #8267 turns it back on there, so with #8267 a return to two compares would break AMD again while CI still skips that test. `agc_spirv_subvector_loop_begin` recompiles the exec-kept program of `agc_driver_subvector_loop` at wave64, with `robustBufferAccess2` off and on, and requires exactly one `OpBranchConditional` on `(exec_lo | exec_hi) == 0` and none on `exec_lo == 0 && exec_hi == 0`. It needs no GPU. The program moves to `SubvectorLoopFixture.hpp` so both tests use one copy, as `NarrowConstantStoreFixture.hpp` does for the constant store tests. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> Windows 11 26200, AMD Radeon RX 6700 XT (gfx1031), driver 32.0.21045.5002, WinLibs GCC 15.2.0 r7, Release, `BUILD_TESTING=ON`, this branch on `main` `1edbe4b5e`. - `agc_spirv_subvector_loop_begin` passes in the default build and in a second build with `-DANYPS5_ENABLE_SPIRV_TOOLS=ON`, as the linux job configures it, so that `Recompile` also validates and optimizes the module: ``` SpirvSubvectorLoopBegin: s_subvector_loop_begin tests an empty exec mask as (exec_lo | exec_hi) == 0 in both robustBufferAccess2 modes ``` - With #7623's change to `ControlFlowInstructions.cpp` reverted locally (not committed), it fails in both builds: ``` SpirvSubvectorLoopBegin: robustBufferAccess2 off: branches that compare exec_lo and exec_hi with 0 separately: 1, expected 0 SpirvSubvectorLoopBegin: robustBufferAccess2 off: branches that compare (exec_lo | exec_hi) with 0: 0, expected 1 (s_subvector_loop_begin) SpirvSubvectorLoopBegin: robustBufferAccess2 on: branches that compare exec_lo and exec_hi with 0 separately: 1, expected 0 SpirvSubvectorLoopBegin: robustBufferAccess2 on: branches that compare (exec_lo | exec_hi) with 0: 0, expected 1 (s_subvector_loop_begin) ``` - Validation layer: `ctest -V` with `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `ANYPS5_NO_SHADER_CACHE=1` and `ANYPS5_REQUIRE_VULKAN=1`. `agc_driver_subvector_loop` passes with `main`'s `SubvectorLoop.cpp` and with this branch's. Neither log has a `VUID-` line or `was not found but was requested by env var VK_INSTANCE_LAYERS`. `agc_spirv_subvector_loop_begin` creates no Vulkan device. - With `RobustBufferAccess2Usable` changed locally to return `true` for every driver (not part of this PR), run from renamed copies of the test executable in the same validation-layer environment: `agc_driver_subvector_loop` passes on this branch. With #7623's change also reverted it fails with `subvector loop exec kept by the body, initial exec high half: lane 0 exec hi after the loop is 0, expected 4294967295`, the failure #7623 fixed. Neither log has a `VUID-` line. - `python tools/check_conventions.py --base origin/main` with this title and body passes. - Not tested: a Linux build (both builds here are Windows MinGW builds), and other GPUs. ### 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 under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [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] Fixes: none - [x] Unblocks: none - [x] GPUs tested: AMD Radeon RX 6700 XT (gfx1031), driver 32.0.21045.5002, Windows 11 26200 - [x] AI-assisted: yes (Claude Code) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-actions[bot] commented 2026-10-20 08:24:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-20T08:24:47Z.


Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 1368 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 1395 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 2434 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5021 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5371 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5426 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5431 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5499 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5925 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6044 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6146 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6185 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6186 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6187 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6188 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6192 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6209 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6280 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6300 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6412 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6481 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6501 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6611 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6682 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6683 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6747 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6788 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6808 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6868 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6937 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6946 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6947 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7002 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7048 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7085 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7201 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7223 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7332 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7395 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7446 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7457 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7464 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7505 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7514 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7604 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7642 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7644 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7647 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7800 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7948 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 8014 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 8160 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 8161 core/libs/prx/libSceAgcDriver/CMakeLists.txt
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6286736288 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8274#issuecomment-6286736288). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-20T08:24:47Z. --- <!-- pr-overlap --> Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap. | Pull request | Shared files not compared | |---|---| | [PR 1368](https://www.github.com/boykopovar/AnyPS5/pull/1368) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 1395](https://www.github.com/boykopovar/AnyPS5/pull/1395) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 2434](https://www.github.com/boykopovar/AnyPS5/pull/2434) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 5021](https://www.github.com/boykopovar/AnyPS5/pull/5021) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 5371](https://www.github.com/boykopovar/AnyPS5/pull/5371) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 5426](https://www.github.com/boykopovar/AnyPS5/pull/5426) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 5431](https://www.github.com/boykopovar/AnyPS5/pull/5431) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 5499](https://www.github.com/boykopovar/AnyPS5/pull/5499) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 5925](https://www.github.com/boykopovar/AnyPS5/pull/5925) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6146](https://www.github.com/boykopovar/AnyPS5/pull/6146) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6185](https://www.github.com/boykopovar/AnyPS5/pull/6185) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6186](https://www.github.com/boykopovar/AnyPS5/pull/6186) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6187](https://www.github.com/boykopovar/AnyPS5/pull/6187) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6188](https://www.github.com/boykopovar/AnyPS5/pull/6188) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6192](https://www.github.com/boykopovar/AnyPS5/pull/6192) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6209](https://www.github.com/boykopovar/AnyPS5/pull/6209) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6280](https://www.github.com/boykopovar/AnyPS5/pull/6280) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6300](https://www.github.com/boykopovar/AnyPS5/pull/6300) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6412](https://www.github.com/boykopovar/AnyPS5/pull/6412) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6481](https://www.github.com/boykopovar/AnyPS5/pull/6481) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6501](https://www.github.com/boykopovar/AnyPS5/pull/6501) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6611](https://www.github.com/boykopovar/AnyPS5/pull/6611) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6682](https://www.github.com/boykopovar/AnyPS5/pull/6682) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6683](https://www.github.com/boykopovar/AnyPS5/pull/6683) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6747](https://www.github.com/boykopovar/AnyPS5/pull/6747) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6788](https://www.github.com/boykopovar/AnyPS5/pull/6788) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6808](https://www.github.com/boykopovar/AnyPS5/pull/6808) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6868](https://www.github.com/boykopovar/AnyPS5/pull/6868) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6937](https://www.github.com/boykopovar/AnyPS5/pull/6937) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6946](https://www.github.com/boykopovar/AnyPS5/pull/6946) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6947](https://www.github.com/boykopovar/AnyPS5/pull/6947) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7002](https://www.github.com/boykopovar/AnyPS5/pull/7002) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7048](https://www.github.com/boykopovar/AnyPS5/pull/7048) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7085](https://www.github.com/boykopovar/AnyPS5/pull/7085) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7201](https://www.github.com/boykopovar/AnyPS5/pull/7201) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7223](https://www.github.com/boykopovar/AnyPS5/pull/7223) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7332](https://www.github.com/boykopovar/AnyPS5/pull/7332) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7395](https://www.github.com/boykopovar/AnyPS5/pull/7395) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7446](https://www.github.com/boykopovar/AnyPS5/pull/7446) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7457](https://www.github.com/boykopovar/AnyPS5/pull/7457) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7464](https://www.github.com/boykopovar/AnyPS5/pull/7464) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7505](https://www.github.com/boykopovar/AnyPS5/pull/7505) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7514](https://www.github.com/boykopovar/AnyPS5/pull/7514) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7604](https://www.github.com/boykopovar/AnyPS5/pull/7604) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7642](https://www.github.com/boykopovar/AnyPS5/pull/7642) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7644](https://www.github.com/boykopovar/AnyPS5/pull/7644) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7647](https://www.github.com/boykopovar/AnyPS5/pull/7647) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7800](https://www.github.com/boykopovar/AnyPS5/pull/7800) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7948](https://www.github.com/boykopovar/AnyPS5/pull/7948) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 8014](https://www.github.com/boykopovar/AnyPS5/pull/8014) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 8160](https://www.github.com/boykopovar/AnyPS5/pull/8160) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 8161](https://www.github.com/boykopovar/AnyPS5/pull/8161) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` |
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!8274
No description provided.