fix(shader): test an empty exec mask in s_subvector_loop_begin with one compare #7623

Merged
thuanquang merged 1 commit from upstream-pr/7623 into main 2026-10-19 23:41:41 +00:00
thuanquang commented 2026-10-18 17:43:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by thuanquang on 2026-10-18T17:43:25Z.


What

s_subvector_loop_begin skips the loop when the whole wave64 exec mask is zero. The recompiler tested that as two 32-bit compares joined by a logical and: exec_lo == 0 && exec_hi == 0. It now tests it as one compare: (exec_lo | exec_hi) == 0. It is the same condition, and entered and the new exec_hi still use exec_lo == 0 as before.

AMD's Windows driver compiles the two-compare form wrongly once the guest's exec mask comes from a loaded value. This is the agc_driver_subvector_loop failure in #7376 (lane 0 exec hi after the loop is 0, expected 4294967295). #7351 hides it by keeping robustBufferAccess2 off on that driver. With the single compare, the test passes on that driver with robustBufferAccess2 on. The exclusion stays: the two layered-volume failures in #7351 are a separate question (#7376), so this PR does not change which devices get the feature. The debt entry for the guest memory load guards now records that subvector_loop is no longer one of the failures.

The pipeline's ISA, read back with VK_KHR_pipeline_executable_properties, shows where it goes wrong. Case "initial exec high half": the guest v_cmpx leaves exec_lo 0 and exec_hi set.

  • target.robustBufferAccess2 = false (test passes): the low and high halves are tested separately.
    v_cmp_ne_i32_e64 s8, v2, 0
    s_cmp_eq_i32 s8, 0
    s_cselect_b64 s[10:11], exec, 0
    s_cmp_eq_i32 s9, 0
    s_cselect_b64 s[12:13], exec, 0
    
  • target.robustBufferAccess2 = true (test fails): the load's lane guard is now an s_and_b64 in the same block. Both exec_lo == 0 and exec_hi == 0 are taken from that instruction's SCC, which says whether all 64 bits are zero. So exec_lo == 0 comes out false, and exec_hi after the begin instruction is selected to 0 (s_cselect_b32 s22, 0, s5).
    v_cmp_ne_i32_e64 s4, v2, 0
    s_and_b64 vcc, s[4:5], vcc
    s_and_b64 s[4:5], vcc, exec
    s_cselect_b64 s[8:9], 0, exec
    s_cselect_b64 vcc, 0, exec
    
  • With this change and robustBufferAccess2 on (test passes): exec_lo == 0 is a 32-bit compare again, and the empty-mask test is s_or_b32 plus a compare.
    s_and_b64 s[4:5], vcc, exec
    s_or_b32 s2, s4, s5
    s_cmp_eq_i32 s4, 0
    s_cselect_b64 vcc, exec, 0
    s_cmp_eq_i32 s2, 0
    

The two SPIR-V modules differ only around the guest load: a selection in one, an OpSelect over a guarded index in the other, as @Mouad-Scriptz-0 found on #7376. The begin instruction's ops are the same, and both modules pass spirv-val --target-env vulkan1.3.

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, ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, APS5_NO_PIPELINE_JOURNAL=1. Each subvector_loop run used a renamed copy of the test executable, so AMD's per-executable pipeline cache started empty:

  • agc_driver_subvector_loop on main 218aa8f00, with RobustBufferAccess2Usable changed locally to return true (that change is not part of this PR):

    • without this change: fails 2 of 2, lane 0 exec hi after the loop is 0, expected 4294967295;
    • with it: passes 2 of 2.
  • agc_driver_subvector_loop with this change and the exclusion kept, as merged: passes.

  • The three ISA listings above come from main 3e3e8b905, read back through a local capture hook that is not part of this PR.

  • Full ctest --parallel 4 --timeout 120 on main 3e3e8b905, with an earlier form of this change that also kept the now unused exec_hi == 0 compare, and robustBufferAccess2 forced on: 1479 tests. These fail:

    • agc_driver_lds_mixed_width_atomics (#6976), agc_driver_lds_lock_budget (#7344), and hardware_oracle_compare, which times out on this machine's Python startup;
    • agc_driver_layered_volume_draw and agc_driver_layered_volume_vertex, the cache-order failures described on #7376;
    • agc_robust_buffer_access, whose table expects AMD to be excluded.

    agc_driver_subvector_loop and agc_driver_layered_volume_vertex_no_gpl pass.

  • AMD Radeon 860M (RDNA 3.5, driver 32.0.13058.8001, Windows 11 26300), run by @LeandroLP23 on main c3591adf9 with this PR and six others merged (comment):

    • as merged, with the exclusion kept: agc_driver_subvector_loop, agc_driver_layered_volume_draw, agc_driver_layered_volume_vertex, agc_driver_lds_lock_budget, agc_driver_lds_mixed_width_atomics and agc_robust_buffer_access pass 3 of 3;
    • with RobustBufferAccess2Usable forced to true, from renamed copies of the test executables: agc_driver_subvector_loop, agc_driver_layered_volume_draw (with and without --vertex-only) and agc_driver_lds_mixed_width_atomics --lock-budget pass 2 of 2;
    • agc_driver_layered_volume_vertex_no_gpl fails there the same way on main (#5271), so it is not from this PR. That driver did not show the subvector_loop failure before this change either (#7376), so this run shows no regression on a second AMD driver, not the fix itself.
  • Not run: the full suite on 218aa8f00.

  • python tools/check_conventions.py --base origin/main with this title and body passes.

  • NVIDIA RTX 3070 (595.99.02, Ubuntu 26.04), run by @jotitadev on f65b4bbe9 merged onto main 84c1a4d9a: agc_driver_subvector_loop passes 3 runs, and passes with main's two-compare form too, so the miscompile is specific to AMD's Windows driver.

  • Not tested: AMD drivers other than these two, and Intel hardware runs of subvector_loop with this change. CI's lavapipe skips that test because its subgroup is too small.

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; AMD Radeon 860M (RDNA 3.5), driver 32.0.13058.8001, Windows 11 26300 (by @LeandroLP23); NVIDIA RTX 3070, 595.99.02, Ubuntu 26.04 (by @jotitadev)
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4911325007 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7623). Originally posted by [thuanquang](https://github.com/thuanquang) on 2026-10-18T17:43:25Z. --- ### What `s_subvector_loop_begin` skips the loop when the whole wave64 exec mask is zero. The recompiler tested that as two 32-bit compares joined by a logical and: `exec_lo == 0 && exec_hi == 0`. It now tests it as one compare: `(exec_lo | exec_hi) == 0`. It is the same condition, and `entered` and the new `exec_hi` still use `exec_lo == 0` as before. AMD's Windows driver compiles the two-compare form wrongly once the guest's exec mask comes from a loaded value. This is the `agc_driver_subvector_loop` failure in #7376 (`lane 0 exec hi after the loop is 0, expected 4294967295`). #7351 hides it by keeping `robustBufferAccess2` off on that driver. With the single compare, the test passes on that driver with `robustBufferAccess2` on. The exclusion stays: the two layered-volume failures in #7351 are a separate question (#7376), so this PR does not change which devices get the feature. The debt entry for the guest memory load guards now records that `subvector_loop` is no longer one of the failures. The pipeline's ISA, read back with `VK_KHR_pipeline_executable_properties`, shows where it goes wrong. Case "initial exec high half": the guest `v_cmpx` leaves `exec_lo` 0 and `exec_hi` set. - `target.robustBufferAccess2 = false` (test passes): the low and high halves are tested separately. ``` v_cmp_ne_i32_e64 s8, v2, 0 s_cmp_eq_i32 s8, 0 s_cselect_b64 s[10:11], exec, 0 s_cmp_eq_i32 s9, 0 s_cselect_b64 s[12:13], exec, 0 ``` - `target.robustBufferAccess2 = true` (test fails): the load's lane guard is now an `s_and_b64` in the same block. Both `exec_lo == 0` and `exec_hi == 0` are taken from that instruction's SCC, which says whether all 64 bits are zero. So `exec_lo == 0` comes out false, and `exec_hi` after the begin instruction is selected to 0 (`s_cselect_b32 s22, 0, s5`). ``` v_cmp_ne_i32_e64 s4, v2, 0 s_and_b64 vcc, s[4:5], vcc s_and_b64 s[4:5], vcc, exec s_cselect_b64 s[8:9], 0, exec s_cselect_b64 vcc, 0, exec ``` - With this change and `robustBufferAccess2` on (test passes): `exec_lo == 0` is a 32-bit compare again, and the empty-mask test is `s_or_b32` plus a compare. ``` s_and_b64 s[4:5], vcc, exec s_or_b32 s2, s4, s5 s_cmp_eq_i32 s4, 0 s_cselect_b64 vcc, exec, 0 s_cmp_eq_i32 s2, 0 ``` The two SPIR-V modules differ only around the guest load: a selection in one, an `OpSelect` over a guarded index in the other, as @Mouad-Scriptz-0 found on #7376. The begin instruction's ops are the same, and both modules pass `spirv-val --target-env vulkan1.3`. ### 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`, `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`, `APS5_NO_PIPELINE_JOURNAL=1`. Each `subvector_loop` run used a renamed copy of the test executable, so AMD's per-executable pipeline cache started empty: - `agc_driver_subvector_loop` on `main` `218aa8f00`, with `RobustBufferAccess2Usable` changed locally to return `true` (that change is not part of this PR): - without this change: fails 2 of 2, `lane 0 exec hi after the loop is 0, expected 4294967295`; - with it: passes 2 of 2. - `agc_driver_subvector_loop` with this change and the exclusion kept, as merged: passes. - The three ISA listings above come from `main` `3e3e8b905`, read back through a local capture hook that is not part of this PR. - Full `ctest --parallel 4 --timeout 120` on `main` `3e3e8b905`, with an earlier form of this change that also kept the now unused `exec_hi == 0` compare, and `robustBufferAccess2` forced on: 1479 tests. These fail: - `agc_driver_lds_mixed_width_atomics` (#6976), `agc_driver_lds_lock_budget` (#7344), and `hardware_oracle_compare`, which times out on this machine's Python startup; - `agc_driver_layered_volume_draw` and `agc_driver_layered_volume_vertex`, the cache-order failures described on #7376; - `agc_robust_buffer_access`, whose table expects AMD to be excluded. `agc_driver_subvector_loop` and `agc_driver_layered_volume_vertex_no_gpl` pass. - **AMD Radeon 860M** (RDNA 3.5, driver 32.0.13058.8001, Windows 11 26300), run by @LeandroLP23 on `main` `c3591adf9` with this PR and six others merged ([comment](https://github.com/boykopovar/AnyPS5/pull/7623#issuecomment-6253307164)): - as merged, with the exclusion kept: `agc_driver_subvector_loop`, `agc_driver_layered_volume_draw`, `agc_driver_layered_volume_vertex`, `agc_driver_lds_lock_budget`, `agc_driver_lds_mixed_width_atomics` and `agc_robust_buffer_access` pass 3 of 3; - with `RobustBufferAccess2Usable` forced to `true`, from renamed copies of the test executables: `agc_driver_subvector_loop`, `agc_driver_layered_volume_draw` (with and without `--vertex-only`) and `agc_driver_lds_mixed_width_atomics --lock-budget` pass 2 of 2; - `agc_driver_layered_volume_vertex_no_gpl` fails there the same way on `main` (#5271), so it is not from this PR. That driver did not show the `subvector_loop` failure before this change either (#7376), so this run shows no regression on a second AMD driver, not the fix itself. - Not run: the full suite on `218aa8f00`. - `python tools/check_conventions.py --base origin/main` with this title and body passes. - **NVIDIA RTX 3070** (595.99.02, Ubuntu 26.04), run by @jotitadev on f65b4bbe9 merged onto `main` `84c1a4d9a`: `agc_driver_subvector_loop` passes 3 runs, and passes with `main`'s two-compare form too, so the miscompile is specific to AMD's Windows driver. - Not tested: AMD drivers other than these two, and Intel hardware runs of `subvector_loop` with this change. CI's lavapipe skips that test because its subgroup is too small. ### 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 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; AMD Radeon 860M (RDNA 3.5), driver 32.0.13058.8001, Windows 11 26300 (by @LeandroLP23); NVIDIA RTX 3070, 595.99.02, Ubuntu 26.04 (by @jotitadev) - [x] AI-assisted: yes (Claude Code) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-actions[bot] commented 2026-10-18 17:52:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-18T17:52:57Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 6612 docs/dev/debt/shader.md L171
PR 6679 docs/dev/debt/shader.md L171
PR 6959 docs/dev/debt/shader.md L171
PR 8077 docs/dev/debt/shader.md L171
PR 8134 docs/dev/debt/shader.md L171

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 5021 docs/dev/debt/shader.md
PR 5371 docs/dev/debt/shader.md
PR 5426 docs/dev/debt/shader.md
PR 5500 docs/dev/debt/shader.md
PR 5941 docs/dev/debt/shader.md
PR 6009 docs/dev/debt/shader.md
PR 6235 docs/dev/debt/shader.md
PR 6280 docs/dev/debt/shader.md
PR 6412 docs/dev/debt/shader.md
PR 6488 docs/dev/debt/shader.md
PR 6604 docs/dev/debt/shader.md
PR 6924 docs/dev/debt/shader.md
PR 6977 docs/dev/debt/shader.md
PR 7085 docs/dev/debt/shader.md
PR 7223 docs/dev/debt/shader.md
PR 7332 docs/dev/debt/shader.md
PR 7392 docs/dev/debt/shader.md
PR 7395 docs/dev/debt/shader.md
PR 7484 docs/dev/debt/shader.md
PR 7684 docs/dev/debt/shader.md
PR 7888 docs/dev/debt/shader.md
PR 7922 docs/dev/debt/shader.md
PR 8004 docs/dev/debt/shader.md
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6253168446 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7623#issuecomment-6253168446). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-18T17:52:57Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | [PR 6612](https://www.github.com/boykopovar/AnyPS5/pull/6612) | `docs/dev/debt/shader.md` [L171](https://github.com/boykopovar/AnyPS5/blob/ea40a70edbb37b8ca7c54c6f5e761c4fb93e96b7/docs/dev/debt/shader.md#L171) | | | | [PR 6679](https://www.github.com/boykopovar/AnyPS5/pull/6679) | `docs/dev/debt/shader.md` [L171](https://github.com/boykopovar/AnyPS5/blob/ea40a70edbb37b8ca7c54c6f5e761c4fb93e96b7/docs/dev/debt/shader.md#L171) | | | | [PR 6959](https://www.github.com/boykopovar/AnyPS5/pull/6959) | `docs/dev/debt/shader.md` [L171](https://github.com/boykopovar/AnyPS5/blob/ea40a70edbb37b8ca7c54c6f5e761c4fb93e96b7/docs/dev/debt/shader.md#L171) | | | | [PR 8077](https://www.github.com/boykopovar/AnyPS5/pull/8077) | `docs/dev/debt/shader.md` [L171](https://github.com/boykopovar/AnyPS5/blob/ea40a70edbb37b8ca7c54c6f5e761c4fb93e96b7/docs/dev/debt/shader.md#L171) | | | | [PR 8134](https://www.github.com/boykopovar/AnyPS5/pull/8134) | `docs/dev/debt/shader.md` [L171](https://github.com/boykopovar/AnyPS5/blob/ea40a70edbb37b8ca7c54c6f5e761c4fb93e96b7/docs/dev/debt/shader.md#L171) | | | 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 5021](https://www.github.com/boykopovar/AnyPS5/pull/5021) | `docs/dev/debt/shader.md` | | [PR 5371](https://www.github.com/boykopovar/AnyPS5/pull/5371) | `docs/dev/debt/shader.md` | | [PR 5426](https://www.github.com/boykopovar/AnyPS5/pull/5426) | `docs/dev/debt/shader.md` | | [PR 5500](https://www.github.com/boykopovar/AnyPS5/pull/5500) | `docs/dev/debt/shader.md` | | [PR 5941](https://www.github.com/boykopovar/AnyPS5/pull/5941) | `docs/dev/debt/shader.md` | | [PR 6009](https://www.github.com/boykopovar/AnyPS5/pull/6009) | `docs/dev/debt/shader.md` | | [PR 6235](https://www.github.com/boykopovar/AnyPS5/pull/6235) | `docs/dev/debt/shader.md` | | [PR 6280](https://www.github.com/boykopovar/AnyPS5/pull/6280) | `docs/dev/debt/shader.md` | | [PR 6412](https://www.github.com/boykopovar/AnyPS5/pull/6412) | `docs/dev/debt/shader.md` | | [PR 6488](https://www.github.com/boykopovar/AnyPS5/pull/6488) | `docs/dev/debt/shader.md` | | [PR 6604](https://www.github.com/boykopovar/AnyPS5/pull/6604) | `docs/dev/debt/shader.md` | | [PR 6924](https://www.github.com/boykopovar/AnyPS5/pull/6924) | `docs/dev/debt/shader.md` | | [PR 6977](https://www.github.com/boykopovar/AnyPS5/pull/6977) | `docs/dev/debt/shader.md` | | [PR 7085](https://www.github.com/boykopovar/AnyPS5/pull/7085) | `docs/dev/debt/shader.md` | | [PR 7223](https://www.github.com/boykopovar/AnyPS5/pull/7223) | `docs/dev/debt/shader.md` | | [PR 7332](https://www.github.com/boykopovar/AnyPS5/pull/7332) | `docs/dev/debt/shader.md` | | [PR 7392](https://www.github.com/boykopovar/AnyPS5/pull/7392) | `docs/dev/debt/shader.md` | | [PR 7395](https://www.github.com/boykopovar/AnyPS5/pull/7395) | `docs/dev/debt/shader.md` | | [PR 7484](https://www.github.com/boykopovar/AnyPS5/pull/7484) | `docs/dev/debt/shader.md` | | [PR 7684](https://www.github.com/boykopovar/AnyPS5/pull/7684) | `docs/dev/debt/shader.md` | | [PR 7888](https://www.github.com/boykopovar/AnyPS5/pull/7888) | `docs/dev/debt/shader.md` | | [PR 7922](https://www.github.com/boykopovar/AnyPS5/pull/7922) | `docs/dev/debt/shader.md` | | [PR 8004](https://www.github.com/boykopovar/AnyPS5/pull/8004) | `docs/dev/debt/shader.md` |
LeandroLP23 commented 2026-10-18 18:06:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-18T18:06:14Z.


Another AMD driver, since the description lists other AMD drivers as not tested. Radeon 860M (RDNA 3.5, driver 32.0.13058.8001), Windows 11 26300, WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON. Build: main c3591adf9 with #7623, #7612, #7611, #7603, #7579, #7563 and #7541 merged together (each merge clean, built once).

  • As merged (robustBufferAccess2 still off on AMD's proprietary driver): agc_driver_subvector_loop, agc_driver_layered_volume_draw, agc_driver_layered_volume_vertex, agc_driver_lds_lock_budget, agc_driver_lds_mixed_width_atomics and agc_robust_buffer_access pass 3 runs of 3. The one failure in the list, agc_driver_layered_volume_vertex_no_gpl, which fails the same way on main here (#5271), is not from this PR.
  • With RobustBufferAccess2Usable forced to true, from renamed copies of the test executables so the driver cache starts empty: agc_driver_subvector_loop, agc_driver_layered_volume_draw (with and without --vertex-only) and agc_driver_lds_mixed_width_atomics --lock-budget (robustBufferAccess2=1) pass, 2 runs of 2.

This driver didn't show the subvector_loop failure before either (#7376), so this shows no regression on a second AMD driver, not the fix itself.

AI-assisted

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6253307164 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7623#issuecomment-6253307164). Originally posted by [LeandroLP23](https://github.com/LeandroLP23) on 2026-10-18T18:06:14Z. --- Another AMD driver, since the description lists other AMD drivers as not tested. Radeon 860M (RDNA 3.5, driver 32.0.13058.8001), Windows 11 26300, WinLibs GCC 15.2.0 r7, Release, `BUILD_TESTING=ON`. Build: `main` `c3591adf9` with #7623, #7612, #7611, #7603, #7579, #7563 and #7541 merged together (each merge clean, built once). - As merged (`robustBufferAccess2` still off on AMD's proprietary driver): `agc_driver_subvector_loop`, `agc_driver_layered_volume_draw`, `agc_driver_layered_volume_vertex`, `agc_driver_lds_lock_budget`, `agc_driver_lds_mixed_width_atomics` and `agc_robust_buffer_access` pass 3 runs of 3. The one failure in the list, `agc_driver_layered_volume_vertex_no_gpl`, which fails the same way on `main` here (#5271), is not from this PR. - With `RobustBufferAccess2Usable` forced to `true`, from renamed copies of the test executables so the driver cache starts empty: `agc_driver_subvector_loop`, `agc_driver_layered_volume_draw` (with and without `--vertex-only`) and `agc_driver_lds_mixed_width_atomics --lock-budget` (`robustBufferAccess2=1`) pass, 2 runs of 2. This driver didn't show the `subvector_loop` failure before either (#7376), so this shows no regression on a second AMD driver, not the fix itself. AI-assisted
MarcZX10 commented 2026-10-18 19:00:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T19:00:19Z.


The Radeon 860M follow-up is useful additional coverage: it passes the six listed tests 3/3 with the AMD exclusion in place, and the forced-true subvector/volume/lock-budget cases pass 2/2 from renamed executables. Could you add this GPU and OS/driver to the GPUs tested checklist and note that agc_driver_layered_volume_vertex_no_gpl is a #5271 main failure? The current checklist lists only the RX 6700 XT.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6253857764 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7623#issuecomment-6253857764). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-18T19:00:19Z. --- The Radeon 860M follow-up is useful additional coverage: it passes the six listed tests 3/3 with the AMD exclusion in place, and the forced-`true` subvector/volume/lock-budget cases pass 2/2 from renamed executables. Could you add this GPU and OS/driver to the `GPUs tested` checklist and note that `agc_driver_layered_volume_vertex_no_gpl` is a #5271 main failure? The current checklist lists only the RX 6700 XT.
thuanquang commented 2026-10-18 19:38:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by thuanquang on 2026-10-18T19:38:48Z.


@MarcZX10 Added: @LeandroLP23's Radeon 860M run is under Tested and on the GPUs tested line, with agc_driver_layered_volume_vertex_no_gpl noted as the #5271 failure main has on that machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6254264840 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7623#issuecomment-6254264840). Originally posted by [thuanquang](https://github.com/thuanquang) on 2026-10-18T19:38:48Z. --- @MarcZX10 Added: @LeandroLP23's Radeon 860M run is under Tested and on the `GPUs tested` line, with `agc_driver_layered_volume_vertex_no_gpl` noted as the #5271 failure `main` has on that machine.
jotitadev commented 2026-10-19 00:27:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-19T00:27:52Z.

Review: COMMENTED


An NVIDIA run of agc_driver_subvector_loop, since NVIDIA is listed under "Not tested" and CI's lavapipe skips the test.

Machine: Ubuntu 26.04, i7-8700, GCC 15.2, Release, BUILD_TESTING=ON. NVIDIA GeForce RTX 3070 (driver 595.99.02; it reports robustBufferAccess2, and only the AMD Windows driver is excluded from it) and lavapipe (Mesa 26.0.3, LLVM 21.1.8) on the same host. PR merged onto main 84c1a4d9a (clean). ANYPS5_NO_SHADER_CACHE=1, -j1 --timeout 30.

agc_driver_subvector_loop RTX 3070 lavapipe
head f65b4bbe9 Passed, 3 runs Skipped
ControlFlowInstructions.cpp from main (two compares) Passed Skipped

So the single compare gives the same result on NVIDIA, and NVIDIA's compiler handles the two-compare form correctly too. The exec_lo/exec_hi miscompile looks specific to AMD's Windows driver, as described.

Not run: Windows, AMD, Intel, the layered-volume tests from #7351.

GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02) and lavapipe (Mesa 26.0.3), Ubuntu 26.04

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5565832533 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7623#pullrequestreview-5565832533). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-19T00:27:52Z. **Review:** COMMENTED --- An NVIDIA run of `agc_driver_subvector_loop`, since NVIDIA is listed under "Not tested" and CI's lavapipe skips the test. **Machine:** Ubuntu 26.04, i7-8700, GCC 15.2, Release, `BUILD_TESTING=ON`. NVIDIA GeForce RTX 3070 (driver 595.99.02; it reports `robustBufferAccess2`, and only the AMD Windows driver is excluded from it) and lavapipe (Mesa 26.0.3, LLVM 21.1.8) on the same host. PR merged onto `main` `84c1a4d9a` (clean). `ANYPS5_NO_SHADER_CACHE=1`, `-j1 --timeout 30`. | `agc_driver_subvector_loop` | RTX 3070 | lavapipe | |---|---|---| | head `f65b4bbe9` | Passed, 3 runs | Skipped | | `ControlFlowInstructions.cpp` from `main` (two compares) | Passed | Skipped | So the single compare gives the same result on NVIDIA, and NVIDIA's compiler handles the two-compare form correctly too. The `exec_lo`/`exec_hi` miscompile looks specific to AMD's Windows driver, as described. Not run: Windows, AMD, Intel, the layered-volume tests from #7351. GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02) and lavapipe (Mesa 26.0.3), Ubuntu 26.04 Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
adriadam10 commented 2026-10-19 23:43:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-19T23:43:44Z.


Checked the diff: (exec_lo | exec_hi) == 0 is the same condition as the two compares, entered and exec_hi are unchanged, and the debt entry now matches. Covered by the existing agc_driver_subvector_loop, with the AMD 6700 XT / 860M and NVIDIA 3070 runs in the thread; merged.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6279819976 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7623#issuecomment-6279819976). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-19T23:43:44Z. --- Checked the diff: `(exec_lo | exec_hi) == 0` is the same condition as the two compares, `entered` and `exec_hi` are unchanged, and the debt entry now matches. Covered by the existing `agc_driver_subvector_loop`, with the AMD 6700 XT / 860M and NVIDIA 3070 runs in the thread; merged.
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!7623
No description provided.