fix(shader): keep a v_writelane lane known across computed-index window stores #8881

Merged
thuanquang merged 1 commit from upstream-pr/8881 into main 2026-10-23 21:17:12 +00:00
thuanquang commented 2026-10-21 04:16:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by thuanquang on 2026-10-21T04:16:25Z.


What

Two titles stop when a shader reloads a spilled resource descriptor with v_readlane_b32 from a window register that the program also uses as an ordinary VGPR:

  • RESIDENT EVIL 4 (PPSA07411), mesh program 0xffde46b100 (@fdfawef324 on #6277):
    GetImageResource dword 0 is not a valid runtime value; chain: Phi(ReadConst(GetSrtResource, Immediate), Phi(ReadConst(GetSrtResource, Immediate), ReadLane(LoadVectorWindow(Immediate), Immediate)))
    
  • LEGO Horizon Adventures (PPSA14632, #6952), while loading its opening level (@THEMANnt):
    GetSamplerResource dword 0 is not a valid runtime value; chain: ReadLane(LoadVectorWindow(Immediate), Immediate)
    

#6277 lets ReadLaneEliminator follow a lane written with v_writelane_b32 across computed-index window stores, but only for a window slot that is never used as an ordinary register. @fdfawef324 notes that LLVM can allocate the VGPRs it spills SGPRs into like any other register (LLVM 18 and 19 do; LLVM 17 and earlier, and 20 and later, reserve them, see the review reply), so one register can be an ordinary register early in a program and hold spill lanes later. In RE4's program, v16 (window slot 11) is written and read by vector ALU instructions first and holds the spill later. The slot is rejected, the M0-indexed stores between the spill and the reload make the lane unknown, and the descriptor stays a run-time value.

This change is @fdfawef324's first suggestion on #6277. In laneFlow, a computed-index store no longer resets the lane. A known lane can only come from a v_writelane_b32 chain with no constant-index store of the slot since, so keeping it is wrong only when a relative write reaches the register between that v_writelane_b32 and a later v_readlane_b32 of the lane. An unknown lane stays unknown, and a constant-index store of the slot still ends the spill, because storedLane returns unknown for an ordinary value. The program-wide spill-slot rule (collectLaneSpillSlots) goes away.

The assumption is the one #6277 already makes, now for every slot: a relative write never reaches a register between a v_writelane_b32 of one of its lanes and a later v_readlane_b32 of that lane. That holds if the compiler keeps spill registers out of its relatively indexed arrays, which is not verified. It can't be proven per store for these programs either: in RE4's program the index comes from per-lane data and the window runs past v16 (@fdfawef324 above).

So the assumption is now checked at run time (after @MarcZX10's review). After the reads are replaced, ReadLaneEliminator runs a backward liveness over each window slot and lane whose known value a replaced read used. It inserts a WindowLaneGuard before every computed-index StoreVectorWindow where that lane is still live, meaning a replaced read can reach it without a constant-index store of the slot in between. The guard loads the slot's current value. In SPIR-V it records a new fault reason, WindowLaneSpill, in the fault buffer, as UnlinkedCall does, when the store's index is the slot, the invocation is the spill's lane, and the stored value differs from the current one. The driver then fails the dispatch or draw with a relative write stored <value> in lane <lane> of vector window slot <slot>, which holds a scalar spilled with v_writelane_b32 that a later v_readlane_b32 was replaced with. The driver reads the fault buffer back for every program with a guard (a windowLaneGuards count on the compiled shader, also when the fault buffer otherwise only serves image tables; shader cache format 45). A program that breaks the assumption is then reported with that message instead of silently using a stale descriptor. The dispatch itself still runs with the replaced value: the check makes the problem visible, it doesn't correct it. That includes the pure spill slots main already folds, where @THEMANnt's m0 = 1 program silently gets the stale value today.

The guard tests the store's own index, value and lane, so a lane that is inactive or out of range (which stores its old value back) doesn't trip it. Neither does a relative write to the register after the spill's last replaced read, because the lane is no longer live there. The debt entry states the assumption gap first and says how a violation surfaces.

One trade-off remains from dropping the per-slot rule. A v_readlane_b32 of a lane in a register that also has ordinary uses is now replaced even if a relative write changes that lane on purpose before the read. main read such a lane at run time; now the guard reports it. Compilers emit v_writelane_b32/v_readlane_b32 pairs for SGPR spills, and I know of no program that relies on this. Limiting the relaxed rule to reads that feed a resource descriptor would remove the case, and can follow if wanted. The guard also can't identify the lane where the host's lane id doesn't cover it (wave64 graphics stages on 32-wide hosts, single-lane stages), so it detects nothing there.

@fdfawef324's replay of RE4's request prepares (1,558,931 SPIR-V words) with the rejected slots kept as candidates, which behaves like this change. With a per-live-spill variant and the later fixes, the title reached the brightness calibration and play-data consent screens. @THEMANnt's four captured LEGO requests compile with every constant slot kept as a spill candidate. Those were their local variants, not this patch. I asked @fdfawef324 on #6277 whether they wanted to open it themselves, and have credited them as co-author.

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.

This branch is now one commit (1a74a6cdd9) on main 2f161d4f33, rebased on 2026-10-21; the only conflict was the shader cache format, now 45. On 1a74a6cdd9 the six focused tests below pass 3 of 3. The validation-layer run (A: main 2f161d4f33, B: 1a74a6cdd9, the same six tests) has 0 VUID- lines and no was not found but was requested on either side (side A also carried #9115's libSceNpTrophy2-only commit, which none of these tests load); B's only fault lines are the two expected m0 = 1 reports. The rest of this section was measured on the previous head c6c9a87e3 (on main c58c2af63).

  • New cases:
    • agc_vector_window: a sampler dword spilled into a window register that has ordinary writes keeps its definition past a relative write, straight-line and around a loop entered at its condition. The same loop without the ordinary write is a baseline, and it also passes on main. A spill overwritten by an ordinary write before its v_readlane_b32 stays a run-time value.
    • agc_driver_window_lane_spill (GPU): a window slot written as an ordinary register before the v_writelane_b32 spill, with a v_movreld_b32 between the spill and the reload, dispatches and stores each lane's value. The overwritten-spill program is still refused.
    • agc_driver_window_lane_spill (GPU), the runtime check, with @THEMANnt's aliasing program from #6277 (v_movreld_b32 v2, v0 between v_writelane_b32 v3, s13, 0 and v_readlane_b32 s8, v3, 0, here with v_mov_b32 v2, 7 before that write so that it always changes the register it writes):
      • m0 = 0: the write changes v2, not the spill register, so every lane stores 0x1234 and nothing is reported.
      • m0 = 1: the write reaches v3 in lane 0, and the dispatch reports a relative write stored 0 in lane 0 of vector window slot 1, which holds a scalar spilled with v_writelane_b32 that a later v_readlane_b32 was replaced with.
      • The same write after the v_readlane_b32, with m0 = 1: every lane stores 0x1234 and nothing is reported.
      • Wave64, with the spill in lane 40: m0 = 0 stores 0x1234 in all 64 lanes, and m0 = 1 reports stored 40 in lane 40 of vector window slot 1. This runs where the device's subgroup size is at least 64.
      • The test captures stderr, as agc_driver_compute_table_calls does, and requires the message in the m0 = 1 cases and its absence in the others.
    • With APS5_DUMP_IR=all, each of the three agc_vector_window programs that keep a spill past a relative write has one WindowLaneGuard right before that store.
  • Red on main c58c2af63 with only the test changes (the first head of this PR, before the runtime check):
    • agc_vector_window fails its two ordinary-write cases with GetSamplerResource dword 0 is not a valid runtime value; chain: ReadLane(LoadVectorWindow(Immediate), Immediate), LEGO Horizon Adventures' message.
    • agc_driver_window_lane_spill fails with window lane spill into a register with ordinary writes past an indexed store: lane 0 stored 3735928559 through the V# read back from a window register, after [gpu] deferred write-back failed: BDA access failed.
  • Controls on dc507e55f (this guard before the read-back fix, the shared window load and the wave64 case), each reverted after its run:
    • No guards at all (guardSpilledLanes given no replaced reads): agc_driver_window_lane_spill fails with window lane spill overwritten by an indexed store with m0 = 1 was not reported.
    • A guard before every computed-index store, whether or not the lane is live there: it fails with window lane spill overwritten by an indexed store with m0 = 1 after its v_readlane: reported an overwritten spill: [gpu] deferred write-back failed: shader stage 4: a relative write stored 0 in lane 0 of vector window slot 1, ..., so the liveness is what keeps a dead spill register from tripping the check.
  • Green at this head (c6c9a87e3): agc_driver_window_lane_spill, agc_vector_window, agc_driver_relative_indexing, agc_driver_write_lane, agc_driver_read_lane and agc_shader_memory pass 3 of 3.
  • Khronos validation layer (vulkan-sdk-1.4.363.0), VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1, ANYPS5_REQUIRE_VULKAN=1, ctest -V, same RX 6700 XT, on main c58c2af63 and on this change on it (first ecf53eaa1, now c6c9a87e3): the six pass on all three (6 of 6). No log reports was not found but was requested or any VUID- error. With VK_LOADER_DEBUG=layer, the run of agc_driver_window_lane_spill at this change shows Insert instance layer "VK_LAYER_KHRONOS_validation" and the device layer. At c6c9a87e3 its only fault lines are the two expected m0 = 1 reports (wave32 lane 0, wave64 lane 40).
  • Full ctest --parallel 4 --timeout 120 at this head (all test executables rebuilt, since IrOpcode.hpp and BdaAbi.hpp change): 1826 tests, 4 fail. None involves the recompiler's lane or window code:
    • agc_driver_tessellation, #8861 on main on this card;
    • agc_driver_image_array_window_past_layer_limit, not run, because ImageArrayWindowPastLayerLimit.cpp's alignas(65536) doesn't build with MinGW (requested alignment '65536' exceeds object file maximum 8192), the same on main;
    • log_macros and log_macros_timestamps, which fail only in this local build because ccache's base directory turns __FILE__ into a relative path with backslashes.
  • Linux, by @simonbbby on c6c9a87e3 (Ubuntu 24.04.3, GCC 13.3): the six pass in three rounds on an RTX 3090 (595.99.02; the wave64 cases skip at subgroup size 32) and on gfx1036 with RADV (Mesa 25.2.8), with both expected reports in every round. On lavapipe the lane tests skip (subgroup size 8). With guardSpilledLanes given no replaced reads, the spill test fails 3/3 on both GPUs.
  • NVIDIA on Windows, by @THEMANnt on c6c9a87e3 cherry-picked onto main f894ba69d3 (RTX 5070 Ti, 616.92): these six plus agc_driver_scalar_relative_indexing and agc_driver_vector_window_direct_access pass on main and with the PR under the validation layer, with no VUID- or missing-layer line; the wave64 cases skip at subgroup size 32. A fresh install of LEGO Horizon Adventures now stops earlier on both builds, so the original stop could not be rechecked.
  • python tools/check_conventions.py --base origin/main with this title and body passes.
  • Not tested: the titles (I don't have them), and the console.

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: PPSA14632 #6952
  • 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:4946309270 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8881). Originally posted by [thuanquang](https://github.com/thuanquang) on 2026-10-21T04:16:25Z. --- ### What Two titles stop when a shader reloads a spilled resource descriptor with `v_readlane_b32` from a window register that the program also uses as an ordinary VGPR: - RESIDENT EVIL 4 (PPSA07411), mesh program `0xffde46b100` ([@fdfawef324 on #6277](https://github.com/boykopovar/AnyPS5/pull/6277#issuecomment-6192785859)): ``` GetImageResource dword 0 is not a valid runtime value; chain: Phi(ReadConst(GetSrtResource, Immediate), Phi(ReadConst(GetSrtResource, Immediate), ReadLane(LoadVectorWindow(Immediate), Immediate))) ``` - LEGO Horizon Adventures (PPSA14632, #6952), while loading its opening level ([@THEMANnt](https://github.com/boykopovar/AnyPS5/pull/6277#issuecomment-6215244790)): ``` GetSamplerResource dword 0 is not a valid runtime value; chain: ReadLane(LoadVectorWindow(Immediate), Immediate) ``` #6277 lets `ReadLaneEliminator` follow a lane written with `v_writelane_b32` across computed-index window stores, but only for a window slot that is never used as an ordinary register. @fdfawef324 notes that LLVM can allocate the VGPRs it spills SGPRs into like any other register (LLVM 18 and 19 do; LLVM 17 and earlier, and 20 and later, reserve them, see the review reply), so one register can be an ordinary register early in a program and hold spill lanes later. In RE4's program, `v16` (window slot 11) is written and read by vector ALU instructions first and holds the spill later. The slot is rejected, the M0-indexed stores between the spill and the reload make the lane unknown, and the descriptor stays a run-time value. This change is @fdfawef324's first suggestion on #6277. In `laneFlow`, a computed-index store no longer resets the lane. A known lane can only come from a `v_writelane_b32` chain with no constant-index store of the slot since, so keeping it is wrong only when a relative write reaches the register between that `v_writelane_b32` and a later `v_readlane_b32` of the lane. An unknown lane stays unknown, and a constant-index store of the slot still ends the spill, because `storedLane` returns unknown for an ordinary value. The program-wide spill-slot rule (`collectLaneSpillSlots`) goes away. The assumption is the one #6277 already makes, now for every slot: a relative write never reaches a register between a `v_writelane_b32` of one of its lanes and a later `v_readlane_b32` of that lane. That holds if the compiler keeps spill registers out of its relatively indexed arrays, which is not verified. It can't be proven per store for these programs either: in RE4's program the index comes from per-lane data and the window runs past `v16` (@fdfawef324 above). So the assumption is now checked at run time (after @MarcZX10's review). After the reads are replaced, `ReadLaneEliminator` runs a backward liveness over each window slot and lane whose known value a replaced read used. It inserts a `WindowLaneGuard` before every computed-index `StoreVectorWindow` where that lane is still live, meaning a replaced read can reach it without a constant-index store of the slot in between. The guard loads the slot's current value. In SPIR-V it records a new fault reason, `WindowLaneSpill`, in the fault buffer, as `UnlinkedCall` does, when the store's index is the slot, the invocation is the spill's lane, and the stored value differs from the current one. The driver then fails the dispatch or draw with `a relative write stored <value> in lane <lane> of vector window slot <slot>, which holds a scalar spilled with v_writelane_b32 that a later v_readlane_b32 was replaced with`. The driver reads the fault buffer back for every program with a guard (a `windowLaneGuards` count on the compiled shader, also when the fault buffer otherwise only serves image tables; shader cache format 45). A program that breaks the assumption is then reported with that message instead of silently using a stale descriptor. The dispatch itself still runs with the replaced value: the check makes the problem visible, it doesn't correct it. That includes the pure spill slots `main` already folds, where @THEMANnt's m0 = 1 program silently gets the stale value today. The guard tests the store's own index, value and lane, so a lane that is inactive or out of range (which stores its old value back) doesn't trip it. Neither does a relative write to the register after the spill's last replaced read, because the lane is no longer live there. The debt entry states the assumption gap first and says how a violation surfaces. One trade-off remains from dropping the per-slot rule. A `v_readlane_b32` of a lane in a register that also has ordinary uses is now replaced even if a relative write changes that lane on purpose before the read. `main` read such a lane at run time; now the guard reports it. Compilers emit `v_writelane_b32`/`v_readlane_b32` pairs for SGPR spills, and I know of no program that relies on this. Limiting the relaxed rule to reads that feed a resource descriptor would remove the case, and can follow if wanted. The guard also can't identify the lane where the host's lane id doesn't cover it (wave64 graphics stages on 32-wide hosts, single-lane stages), so it detects nothing there. @fdfawef324's replay of RE4's request prepares (1,558,931 SPIR-V words) with the rejected slots kept as candidates, which behaves like this change. With a per-live-spill variant and the later fixes, the title reached the brightness calibration and play-data consent screens. @THEMANnt's four captured LEGO requests compile with every constant slot kept as a spill candidate. Those were their local variants, not this patch. I asked @fdfawef324 on #6277 whether they wanted to open it themselves, and have credited them as co-author. ### 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`. This branch is now one commit (1a74a6cdd9) on `main` 2f161d4f33, rebased on 2026-10-21; the only conflict was the shader cache format, now 45. On 1a74a6cdd9 the six focused tests below pass 3 of 3. The validation-layer run (A: `main` 2f161d4f33, B: 1a74a6cdd9, the same six tests) has 0 `VUID-` lines and no `was not found but was requested` on either side (side A also carried #9115's libSceNpTrophy2-only commit, which none of these tests load); B's only fault lines are the two expected m0 = 1 reports. The rest of this section was measured on the previous head c6c9a87e3 (on `main` c58c2af63). - New cases: - `agc_vector_window`: a sampler dword spilled into a window register that has ordinary writes keeps its definition past a relative write, straight-line and around a loop entered at its condition. The same loop without the ordinary write is a baseline, and it also passes on `main`. A spill overwritten by an ordinary write before its `v_readlane_b32` stays a run-time value. - `agc_driver_window_lane_spill` (GPU): a window slot written as an ordinary register before the `v_writelane_b32` spill, with a `v_movreld_b32` between the spill and the reload, dispatches and stores each lane's value. The overwritten-spill program is still refused. - `agc_driver_window_lane_spill` (GPU), the runtime check, with @THEMANnt's aliasing program from #6277 (`v_movreld_b32 v2, v0` between `v_writelane_b32 v3, s13, 0` and `v_readlane_b32 s8, v3, 0`, here with `v_mov_b32 v2, 7` before that write so that it always changes the register it writes): - m0 = 0: the write changes `v2`, not the spill register, so every lane stores 0x1234 and nothing is reported. - m0 = 1: the write reaches `v3` in lane 0, and the dispatch reports `a relative write stored 0 in lane 0 of vector window slot 1, which holds a scalar spilled with v_writelane_b32 that a later v_readlane_b32 was replaced with`. - The same write after the `v_readlane_b32`, with m0 = 1: every lane stores 0x1234 and nothing is reported. - Wave64, with the spill in lane 40: m0 = 0 stores 0x1234 in all 64 lanes, and m0 = 1 reports `stored 40 in lane 40 of vector window slot 1`. This runs where the device's subgroup size is at least 64. - The test captures stderr, as `agc_driver_compute_table_calls` does, and requires the message in the m0 = 1 cases and its absence in the others. - With `APS5_DUMP_IR=all`, each of the three `agc_vector_window` programs that keep a spill past a relative write has one `WindowLaneGuard` right before that store. - Red on `main` `c58c2af63` with only the test changes (the first head of this PR, before the runtime check): - `agc_vector_window` fails its two ordinary-write cases with `GetSamplerResource dword 0 is not a valid runtime value; chain: ReadLane(LoadVectorWindow(Immediate), Immediate)`, LEGO Horizon Adventures' message. - `agc_driver_window_lane_spill` fails with `window lane spill into a register with ordinary writes past an indexed store: lane 0 stored 3735928559 through the V# read back from a window register`, after `[gpu] deferred write-back failed: BDA access failed`. - Controls on dc507e55f (this guard before the read-back fix, the shared window load and the wave64 case), each reverted after its run: - No guards at all (`guardSpilledLanes` given no replaced reads): `agc_driver_window_lane_spill` fails with `window lane spill overwritten by an indexed store with m0 = 1 was not reported`. - A guard before every computed-index store, whether or not the lane is live there: it fails with `window lane spill overwritten by an indexed store with m0 = 1 after its v_readlane: reported an overwritten spill: [gpu] deferred write-back failed: shader stage 4: a relative write stored 0 in lane 0 of vector window slot 1, ...`, so the liveness is what keeps a dead spill register from tripping the check. - Green at this head (c6c9a87e3): `agc_driver_window_lane_spill`, `agc_vector_window`, `agc_driver_relative_indexing`, `agc_driver_write_lane`, `agc_driver_read_lane` and `agc_shader_memory` pass 3 of 3. - Khronos validation layer (vulkan-sdk-1.4.363.0), `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `ANYPS5_NO_SHADER_CACHE=1`, `ANYPS5_REQUIRE_VULKAN=1`, `ctest -V`, same RX 6700 XT, on `main` `c58c2af63` and on this change on it (first ecf53eaa1, now c6c9a87e3): the six pass on all three (6 of 6). No log reports `was not found but was requested` or any `VUID-` error. With `VK_LOADER_DEBUG=layer`, the run of `agc_driver_window_lane_spill` at this change shows `Insert instance layer "VK_LAYER_KHRONOS_validation"` and the device layer. At c6c9a87e3 its only fault lines are the two expected m0 = 1 reports (wave32 lane 0, wave64 lane 40). - Full `ctest --parallel 4 --timeout 120` at this head (all test executables rebuilt, since `IrOpcode.hpp` and `BdaAbi.hpp` change): 1826 tests, 4 fail. None involves the recompiler's lane or window code: - `agc_driver_tessellation`, #8861 on `main` on this card; - `agc_driver_image_array_window_past_layer_limit`, not run, because `ImageArrayWindowPastLayerLimit.cpp`'s `alignas(65536)` doesn't build with MinGW (`requested alignment '65536' exceeds object file maximum 8192`), the same on `main`; - `log_macros` and `log_macros_timestamps`, which fail only in this local build because ccache's base directory turns `__FILE__` into a relative path with backslashes. - Linux, by [@simonbbby](https://github.com/boykopovar/AnyPS5/pull/8881#issuecomment-6311519582) on c6c9a87e3 (Ubuntu 24.04.3, GCC 13.3): the six pass in three rounds on an RTX 3090 (595.99.02; the wave64 cases skip at subgroup size 32) and on gfx1036 with RADV (Mesa 25.2.8), with both expected reports in every round. On lavapipe the lane tests skip (subgroup size 8). With `guardSpilledLanes` given no replaced reads, the spill test fails 3/3 on both GPUs. - NVIDIA on Windows, by [@THEMANnt](https://github.com/boykopovar/AnyPS5/pull/8881#issuecomment-6316742183) on c6c9a87e3 cherry-picked onto `main` f894ba69d300 (RTX 5070 Ti, 616.92): these six plus `agc_driver_scalar_relative_indexing` and `agc_driver_vector_window_direct_access` pass on `main` and with the PR under the validation layer, with no `VUID-` or missing-layer line; the wave64 cases skip at subgroup size 32. A fresh install of LEGO Horizon Adventures now stops earlier on both builds, so the original stop could not be rechecked. - `python tools/check_conventions.py --base origin/main` with this title and body passes. - Not tested: the titles (I don't have them), and the console. ### 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: PPSA14632 #6952 - [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)
MarcZX10 commented 2026-10-21 04:42:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T04:42:19Z.

Code review location: core/shader/recompiler/Optimization/src/ReadLaneEliminator.cpp; line 114

@@ -144,11 +111,7 @@ const LaneFlow* laneFlow(std::uint32_t slot, std::uint32_t lane, std::uint32_t w
                     }
                 } else if (inst->Opcode() == IrOpcode::StoreVectorWindow) {
                     const IrValue* index = inst->Argument(0)->Resolve();
-                    if (!isImmediateU32(*index)) {
-                        if (!spill) running = {LaneState::Kind::Unknown, nullptr};
-                        continue;
-                    }
-                    if (index->ImmediateU32() != slot) continue;
+                    if (!isImmediateU32(*index) || index->ImmediateU32() != slot) continue;

This now ignores every computed-index StoreVectorWindow for every slot, so a v_movreld_b32 that actually targets this slot leaves the pre-store lane marked known. That can fold v_readlane to the stale v_writelane value and embed a wrong image/sampler descriptor; the “compiler keeps spill slots out of relative arrays” condition is explicitly unverified in the PR. Could the analysis conservatively invalidate lanes for computed stores unless it proves their target range excludes this slot, or add evidence that the compiler guarantees the non-aliasing invariant for all supported wave sizes? The new tests set M0 so the relative write misses the spill slot, so they do not exercise the aliasing case.

<!-- greyfinch-sync:boykopovar/AnyPS5:review-comment:4333107008 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8881#discussion_r4333107008). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-21T04:42:19Z. **Code review location:** `core/shader/recompiler/Optimization/src/ReadLaneEliminator.cpp`; line 114 ~~~~diff @@ -144,11 +111,7 @@ const LaneFlow* laneFlow(std::uint32_t slot, std::uint32_t lane, std::uint32_t w } } else if (inst->Opcode() == IrOpcode::StoreVectorWindow) { const IrValue* index = inst->Argument(0)->Resolve(); - if (!isImmediateU32(*index)) { - if (!spill) running = {LaneState::Kind::Unknown, nullptr}; - continue; - } - if (index->ImmediateU32() != slot) continue; + if (!isImmediateU32(*index) || index->ImmediateU32() != slot) continue; ~~~~ --- This now ignores every computed-index `StoreVectorWindow` for every slot, so a `v_movreld_b32` that actually targets this slot leaves the pre-store lane marked known. That can fold `v_readlane` to the stale `v_writelane` value and embed a wrong image/sampler descriptor; the “compiler keeps spill slots out of relative arrays” condition is explicitly unverified in the PR. Could the analysis conservatively invalidate lanes for computed stores unless it proves their target range excludes this slot, or add evidence that the compiler guarantees the non-aliasing invariant for all supported wave sizes? The new tests set M0 so the relative write misses the spill slot, so they do not exercise the aliasing case.
thuanquang commented 2026-10-21 07:15:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by thuanquang on 2026-10-21T07:15:51Z.

Code review location: core/shader/recompiler/Optimization/src/ReadLaneEliminator.cpp; line 114

@@ -144,11 +111,7 @@ const LaneFlow* laneFlow(std::uint32_t slot, std::uint32_t lane, std::uint32_t w
                     }
                 } else if (inst->Opcode() == IrOpcode::StoreVectorWindow) {
                     const IrValue* index = inst->Argument(0)->Resolve();
-                    if (!isImmediateU32(*index)) {
-                        if (!spill) running = {LaneState::Kind::Unknown, nullptr};
-                        continue;
-                    }
-                    if (index->ImmediateU32() != slot) continue;
+                    if (!isImmediateU32(*index) || index->ImmediateU32() != slot) continue;

You're right that this was unchecked, and the PR depended on it entirely. Neither option fully fits these programs, though. In RE4's mesh program the index comes from per-lane data and the window runs past the spill register (v16, slot 11), as @fdfawef324 found, so a per-store proof isn't available. Invalidating unless the range excludes the slot would leave both titles stopped. c6c9a87e3 keeps the fold and checks the assumption at run time:

  • After the reads are replaced, ReadLaneEliminator runs a backward liveness over each window slot and lane whose known value a replaced read used. Where a replaced read can still be reached without a constant-index store of the slot, it puts a WindowLaneGuard before the computed-index StoreVectorWindow.
  • The guard loads the slot's current value. In SPIR-V it records a new fault reason, WindowLaneSpill, through the fault buffer (as UnlinkedCall does) when the store's index is the slot, the invocation is the spill's lane, and the stored value differs from what the slot holds. The driver then fails the dispatch or draw with a relative write stored <value> in lane <lane> of vector window slot <slot>, which holds a scalar spilled with v_writelane_b32 that a later v_readlane_b32 was replaced with.
  • So a v_movreld_b32 that actually targets the slot is now reported with that message instead of passing silently with a stale descriptor. The dispatch still runs with the replaced value; the check makes the problem visible, it doesn't correct it. This also covers the pure spill slots main already folds today with no check (@THEMANnt's m0 = 1 program gets the stale value on main). An inactive or out-of-range lane stores the old value back, so it doesn't trip the guard. The liveness is a may-liveness, the same a register allocator uses, so a compiler that never overwrites a spill register while the spill may still be read never trips it.
  • Tests: @THEMANnt's aliasing program is in agc_driver_window_lane_spill, in wave32 (lane 0) and in wave64 (lane 40). With m0 = 1 the write reaches the spill register in that lane, and the fault is required. With m0 = 0, and with the same m0 = 1 write placed after the v_readlane_b32, the output must be the spilled value with no fault. As controls, without the guards the m0 = 1 case goes unreported, and with a guard at every computed-index store regardless of liveness, the after-read case reports a false fault. The six focused tests pass 3/3 and under the validation layer (0 VUID-). The full suite has 4 failures out of 1826, none in lane or window code: #8861's tessellation test, a test that doesn't build with MinGW on main either, and two log tests that fail only in my local build. Details are in the body.

The body also states the trade-off this leaves. A data v_readlane_b32 whose lane a relative write changes on purpose is now reported instead of being read at run time. The body also lists the stages where the guard can't see the lane.

On the compiler side, upstream LLVM's AMDGPU backend guarantees the invariant only for in-range indices:

  • Upstream codegen emits a relative VGPR write in one way only: a dynamic insertelement lowered to v_movreld_b32 (gfx10, gfx1013 included). Its pseudo carries the whole vector tuple as a tied implicit def and use, and the machine verifier enforces that (SIInstructions.td, SIInstrInfo.cpp). An in-range write therefore stays inside the tuple's registers, which the allocator can't give to anything live at that point, a spill lane included. Wave32 and wave64 differ only in the exec-mask opcodes and the lanes per spill VGPR (AMDGPULaneMaskUtils.h). Upstream never emits v_movrelsd_b32, v_movrelsd_2_b32 or v_swaprel_b32 (VOP1Instructions.td).
  • The index is neither clamped nor masked, so an out-of-range index writes v[base + M0] wherever that lands (SIISelLowering.cpp). LangRef only makes such an insertelement poison (LangRef). LLVM's own -O0 test has this PR's exact shape: spill lanes in v31 around a waterfall v_movreld_b32 into v[0:15] (indirect-addressing-si.ll).
  • Spill VGPRs were reserved for the whole function up to LLVM 17. LLVM 18 and 19 allocated them together with the per-lane VGPRs (D124196). From LLVM 20 they are allocated separately and reserved again (#93526). LLVM 20 to 22 also had a real miscompile where a spill VGPR wasn't live across a loop back edge and was clobbered (#186348).
  • RE4's program doesn't look like upstream LLVM of its time. The v16 dual use fits only LLVM 18 and 19, which came out after the game. And since LLVM 11 a divergent index is lowered to compare/select, not to a relative write (SIISelLowering.cpp).

Whether the PS5's compiler is LLVM, and which version, isn't known, so none of this covers the titles' binaries. That's why the check runs at run time rather than being argued from the compiler. On the console, a write that hits the live lane is read back by the program's own v_readlane_b32. So the check fires exactly where the console would read the written value and the emulator would otherwise use the stale one.

<!-- greyfinch-sync:boykopovar/AnyPS5:review-comment:4334032491 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8881#discussion_r4334032491). Originally posted by [thuanquang](https://github.com/thuanquang) on 2026-10-21T07:15:51Z. **Code review location:** `core/shader/recompiler/Optimization/src/ReadLaneEliminator.cpp`; line 114 ~~~~diff @@ -144,11 +111,7 @@ const LaneFlow* laneFlow(std::uint32_t slot, std::uint32_t lane, std::uint32_t w } } else if (inst->Opcode() == IrOpcode::StoreVectorWindow) { const IrValue* index = inst->Argument(0)->Resolve(); - if (!isImmediateU32(*index)) { - if (!spill) running = {LaneState::Kind::Unknown, nullptr}; - continue; - } - if (index->ImmediateU32() != slot) continue; + if (!isImmediateU32(*index) || index->ImmediateU32() != slot) continue; ~~~~ --- You're right that this was unchecked, and the PR depended on it entirely. Neither option fully fits these programs, though. In RE4's mesh program the index comes from per-lane data and the window runs past the spill register (`v16`, slot 11), as @fdfawef324 found, so a per-store proof isn't available. Invalidating unless the range excludes the slot would leave both titles stopped. c6c9a87e3 keeps the fold and checks the assumption at run time: - After the reads are replaced, `ReadLaneEliminator` runs a backward liveness over each window slot and lane whose known value a replaced read used. Where a replaced read can still be reached without a constant-index store of the slot, it puts a `WindowLaneGuard` before the computed-index `StoreVectorWindow`. - The guard loads the slot's current value. In SPIR-V it records a new fault reason, `WindowLaneSpill`, through the fault buffer (as `UnlinkedCall` does) when the store's index is the slot, the invocation is the spill's lane, and the stored value differs from what the slot holds. The driver then fails the dispatch or draw with `a relative write stored <value> in lane <lane> of vector window slot <slot>, which holds a scalar spilled with v_writelane_b32 that a later v_readlane_b32 was replaced with`. - So a `v_movreld_b32` that actually targets the slot is now reported with that message instead of passing silently with a stale descriptor. The dispatch still runs with the replaced value; the check makes the problem visible, it doesn't correct it. This also covers the pure spill slots `main` already folds today with no check (@THEMANnt's m0 = 1 program gets the stale value on `main`). An inactive or out-of-range lane stores the old value back, so it doesn't trip the guard. The liveness is a may-liveness, the same a register allocator uses, so a compiler that never overwrites a spill register while the spill may still be read never trips it. - Tests: @THEMANnt's aliasing program is in `agc_driver_window_lane_spill`, in wave32 (lane 0) and in wave64 (lane 40). With m0 = 1 the write reaches the spill register in that lane, and the fault is required. With m0 = 0, and with the same m0 = 1 write placed after the `v_readlane_b32`, the output must be the spilled value with no fault. As controls, without the guards the m0 = 1 case goes unreported, and with a guard at every computed-index store regardless of liveness, the after-read case reports a false fault. The six focused tests pass 3/3 and under the validation layer (0 `VUID-`). The full suite has 4 failures out of 1826, none in lane or window code: #8861's tessellation test, a test that doesn't build with MinGW on `main` either, and two log tests that fail only in my local build. Details are in the body. The body also states the trade-off this leaves. A data `v_readlane_b32` whose lane a relative write changes on purpose is now reported instead of being read at run time. The body also lists the stages where the guard can't see the lane. On the compiler side, upstream LLVM's AMDGPU backend guarantees the invariant only for in-range indices: - Upstream codegen emits a relative VGPR write in one way only: a dynamic `insertelement` lowered to `v_movreld_b32` (gfx10, gfx1013 included). Its pseudo carries the whole vector tuple as a tied implicit def and use, and the machine verifier enforces that ([SIInstructions.td](https://github.com/llvm/llvm-project/blob/c0afba08e389d5b6ea4c904725c31c4ae6cd28a5/llvm/lib/Target/AMDGPU/SIInstructions.td#L1062-L1105), [SIInstrInfo.cpp](https://github.com/llvm/llvm-project/blob/c0afba08e389d5b6ea4c904725c31c4ae6cd28a5/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp#L5945-L5988)). An in-range write therefore stays inside the tuple's registers, which the allocator can't give to anything live at that point, a spill lane included. Wave32 and wave64 differ only in the exec-mask opcodes and the lanes per spill VGPR ([AMDGPULaneMaskUtils.h](https://github.com/llvm/llvm-project/blob/c0afba08e389d5b6ea4c904725c31c4ae6cd28a5/llvm/lib/Target/AMDGPU/AMDGPULaneMaskUtils.h#L47-L90)). Upstream never emits `v_movrelsd_b32`, `v_movrelsd_2_b32` or `v_swaprel_b32` ([VOP1Instructions.td](https://github.com/llvm/llvm-project/blob/c0afba08e389d5b6ea4c904725c31c4ae6cd28a5/llvm/lib/Target/AMDGPU/VOP1Instructions.td#L476-L486)). - The index is neither clamped nor masked, so an out-of-range index writes `v[base + M0]` wherever that lands ([SIISelLowering.cpp](https://github.com/llvm/llvm-project/blob/c0afba08e389d5b6ea4c904725c31c4ae6cd28a5/llvm/lib/Target/AMDGPU/SIISelLowering.cpp#L5448-L5485)). LangRef only makes such an `insertelement` poison ([LangRef](https://github.com/llvm/llvm-project/blob/c0afba08e389d5b6ea4c904725c31c4ae6cd28a5/llvm/docs/LangRef.md#L11985-L11999)). LLVM's own -O0 test has this PR's exact shape: spill lanes in `v31` around a waterfall `v_movreld_b32` into `v[0:15]` ([indirect-addressing-si.ll](https://github.com/llvm/llvm-project/blob/c0afba08e389d5b6ea4c904725c31c4ae6cd28a5/llvm/test/CodeGen/AMDGPU/indirect-addressing-si.ll#L3770-L3990)). - Spill VGPRs were reserved for the whole function up to LLVM 17. LLVM 18 and 19 allocated them together with the per-lane VGPRs ([D124196](https://reviews.llvm.org/D124196)). From LLVM 20 they are allocated separately and reserved again ([#93526](https://github.com/llvm/llvm-project/pull/93526)). LLVM 20 to 22 also had a real miscompile where a spill VGPR wasn't live across a loop back edge and was clobbered ([#186348](https://github.com/llvm/llvm-project/pull/186348)). - RE4's program doesn't look like upstream LLVM of its time. The `v16` dual use fits only LLVM 18 and 19, which came out after the game. And since LLVM 11 a divergent index is lowered to compare/select, not to a relative write ([SIISelLowering.cpp](https://github.com/llvm/llvm-project/blob/c0afba08e389d5b6ea4c904725c31c4ae6cd28a5/llvm/lib/Target/AMDGPU/SIISelLowering.cpp#L17341-L17368)). Whether the PS5's compiler is LLVM, and which version, isn't known, so none of this covers the titles' binaries. That's why the check runs at run time rather than being argued from the compiler. On the console, a write that hits the live lane is read back by the program's own `v_readlane_b32`. So the check fires exactly where the console would read the written value and the emulator would otherwise use the stale one.
MarcZX10 commented 2026-10-21 07:52:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T07:52:49Z.

Code review location: core/shader/recompiler/Optimization/src/ReadLaneEliminator.cpp; line 114

@@ -144,11 +111,7 @@ const LaneFlow* laneFlow(std::uint32_t slot, std::uint32_t lane, std::uint32_t w
                     }
                 } else if (inst->Opcode() == IrOpcode::StoreVectorWindow) {
                     const IrValue* index = inst->Argument(0)->Resolve();
-                    if (!isImmediateU32(*index)) {
-                        if (!spill) running = {LaneState::Kind::Unknown, nullptr};
-                        continue;
-                    }
-                    if (index->ImmediateU32() != slot) continue;
+                    if (!isImmediateU32(*index) || index->ImmediateU32() != slot) continue;

Thanks for the detailed response and the added aliasing cases. The wave32/lane 0 and wave64/lane 40 tests exercise an actual write into the spill slot, and the before/after-read controls show the guard is limited to a live spill value rather than every computed-index store. This changes the failure mode to an explicit runtime fault when the alias occurs; it does not emulate programs that intentionally read back that overwritten value. Since the PR documents that limitation and the observed path needs a reliable diagnostic, this addresses my concern about silently folding an unchecked alias. The unknown console compiler behavior remains a real boundary, as you note.

<!-- greyfinch-sync:boykopovar/AnyPS5:review-comment:4334322348 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8881#discussion_r4334322348). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-21T07:52:49Z. **Code review location:** `core/shader/recompiler/Optimization/src/ReadLaneEliminator.cpp`; line 114 ~~~~diff @@ -144,11 +111,7 @@ const LaneFlow* laneFlow(std::uint32_t slot, std::uint32_t lane, std::uint32_t w } } else if (inst->Opcode() == IrOpcode::StoreVectorWindow) { const IrValue* index = inst->Argument(0)->Resolve(); - if (!isImmediateU32(*index)) { - if (!spill) running = {LaneState::Kind::Unknown, nullptr}; - continue; - } - if (index->ImmediateU32() != slot) continue; + if (!isImmediateU32(*index) || index->ImmediateU32() != slot) continue; ~~~~ --- Thanks for the detailed response and the added aliasing cases. The wave32/lane 0 and wave64/lane 40 tests exercise an actual write into the spill slot, and the before/after-read controls show the guard is limited to a live spill value rather than every computed-index store. This changes the failure mode to an explicit runtime fault when the alias occurs; it does not emulate programs that intentionally read back that overwritten value. Since the PR documents that limitation and the observed path needs a reliable diagnostic, this addresses my concern about silently folding an unchecked alias. The unknown console compiler behavior remains a real boundary, as you note.
simonbbby commented 2026-10-21 08:25:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by simonbbby on 2026-10-21T08:25:50Z.


Native Linux execution check at exact head c6c9a87e3a5946a75ddff8c2acb4024e297a1c9d:

  • RTX 3090 / NVIDIA 595.99.02: all six focused tests pass in three serial rounds. The window-spill test reports the expected stored 0 in lane 0 of vector window slot 1 fault. Its wave64 cases are explicitly skipped because this device's subgroup size is 32.
  • gfx1036 (1002:13c0) / RADV Mesa 25.2.8: all six pass in three serial rounds. The expected wave32/lane-0 and wave64/stored 40 in lane 40 of vector window slot 1 diagnostics both appear in every round. The non-aliasing and after-read controls pass their output/no-spill-fault assertions.
  • Lavapipe (Mesa 25.2.8, LLVM 20.1.2): agc_vector_window, agc_shader_memory and agc_driver_relative_indexing pass each round. Read-lane, write-lane and window-spill execution skip because subgroup size 8 cannot hold wave32. This supplies no lavapipe guard-execution coverage.

Negative control: changing only the guardSpilledLanes call to receive an empty folded-read list, rebuilding and running agc_driver_window_lane_spill_tests, fails 3/3 on each physical GPU with window lane spill overwritten by an indexed store with m0 = 1 was not reported. Restoring the exact source and rebuilding all six executables makes the full focused set pass again on both. Checkout is clean.

Ubuntu 24.04.3, GCC 13.3, Release; ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, ctest -V. The six entries were agc_vector_window, agc_driver_window_lane_spill, agc_driver_relative_indexing, agc_driver_write_lane, agc_driver_read_lane, and agc_shader_memory.

No title execution or Khronos validation-layer A/B here (the layer is unavailable). This verifies the documented runtime diagnostic and its controls; it does not establish console compiler invariants or correct execution after a live spill is overwritten.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6311519582 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8881#issuecomment-6311519582). Originally posted by [simonbbby](https://github.com/simonbbby) on 2026-10-21T08:25:50Z. --- Native Linux execution check at exact head `c6c9a87e3a5946a75ddff8c2acb4024e297a1c9d`: - RTX 3090 / NVIDIA 595.99.02: all six focused tests pass in three serial rounds. The window-spill test reports the expected `stored 0 in lane 0 of vector window slot 1` fault. Its wave64 cases are explicitly skipped because this device's subgroup size is 32. - gfx1036 (`1002:13c0`) / RADV Mesa 25.2.8: all six pass in three serial rounds. The expected wave32/lane-0 and wave64/`stored 40 in lane 40 of vector window slot 1` diagnostics both appear in every round. The non-aliasing and after-read controls pass their output/no-spill-fault assertions. - Lavapipe (Mesa 25.2.8, LLVM 20.1.2): `agc_vector_window`, `agc_shader_memory` and `agc_driver_relative_indexing` pass each round. Read-lane, write-lane and window-spill execution skip because subgroup size 8 cannot hold wave32. This supplies no lavapipe guard-execution coverage. Negative control: changing only the `guardSpilledLanes` call to receive an empty folded-read list, rebuilding and running `agc_driver_window_lane_spill_tests`, fails 3/3 on each physical GPU with `window lane spill overwritten by an indexed store with m0 = 1 was not reported`. Restoring the exact source and rebuilding all six executables makes the full focused set pass again on both. Checkout is clean. Ubuntu 24.04.3, GCC 13.3, Release; `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`, `ctest -V`. The six entries were `agc_vector_window`, `agc_driver_window_lane_spill`, `agc_driver_relative_indexing`, `agc_driver_write_lane`, `agc_driver_read_lane`, and `agc_shader_memory`. No title execution or Khronos validation-layer A/B here (the layer is unavailable). This verifies the documented runtime diagnostic and its controls; it does not establish console compiler invariants or correct execution after a live spill is overwritten.
THEMANnt commented 2026-10-21 13:03:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by THEMANnt on 2026-10-21T13:03:23Z.


Tested #8881 head c6c9a87e3, cherry-picked onto main f894ba69d300 (local 571063307d85), on Windows 11 / RTX 5070 Ti 16 GB, NVIDIA 616.92, GCC 15.2 Release.

The same eight focused tests pass on main and the PR build: shader memory, vector window, read lane, write lane, relative indexing, scalar relative indexing, vector-window direct access and window-lane spill. Both runs used ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation with ctest -V; neither log contains a missing-layer message or a VUID- error. The PR's wave64 spill cases skip on subgroup size 32.

I could not complete the requested original four-request replay: those captures were removed during my earlier LEGO cleanup. After redownloading PPSA14632 01.004.000, fresh runs stop earlier. Main and the PR build both log a guest null write at lego-horizon.exe+0x37dd2b. One PR run reached the Performance/Fidelity selection but was stopped by the memory watchdog before the opening level; a retry after closing unused apps hit the same guest exception with about 11 GiB RAM still free.

I retained three fresh request sets (193, 255 and 145). Every request prepares and recompiles on both builds, so none reproduces the original ReadLane(LoadVectorWindow...) rejection. I therefore cannot yet confirm this clears LEGO's original stop or claim gameplay success.

AI-assisted: yes (Codex); builds, tests and captures were run locally.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6316742183 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8881#issuecomment-6316742183). Originally posted by [THEMANnt](https://github.com/THEMANnt) on 2026-10-21T13:03:23Z. --- Tested #8881 head `c6c9a87e3`, cherry-picked onto main `f894ba69d300` (local `571063307d85`), on Windows 11 / RTX 5070 Ti 16 GB, NVIDIA 616.92, GCC 15.2 Release. The same eight focused tests pass on main and the PR build: shader memory, vector window, read lane, write lane, relative indexing, scalar relative indexing, vector-window direct access and window-lane spill. Both runs used `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` with `ctest -V`; neither log contains a missing-layer message or a `VUID-` error. The PR's wave64 spill cases skip on subgroup size 32. I could not complete the requested original four-request replay: those captures were removed during my earlier LEGO cleanup. After redownloading PPSA14632 01.004.000, fresh runs stop earlier. Main and the PR build both log a guest null write at `lego-horizon.exe+0x37dd2b`. One PR run reached the Performance/Fidelity selection but was stopped by the memory watchdog before the opening level; a retry after closing unused apps hit the same guest exception with about 11 GiB RAM still free. I retained three fresh request sets (193, 255 and 145). Every request prepares and recompiles on both builds, so none reproduces the original `ReadLane(LoadVectorWindow...)` rejection. I therefore cannot yet confirm this clears LEGO's original stop or claim gameplay success. AI-assisted: yes (Codex); builds, tests and captures were run locally.
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!8881
No description provided.