fix(shader): run DS src2 lanes one at a time in lane order #5498

Closed
billythemenace2 wants to merge 3 commits from upstream-pr/5498 into main
billythemenace2 commented 2026-10-13 21:21:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by billythemenace2 on 2026-10-13T21:21:19Z.


What

Before: ds_*_src2_* was translated as an LDS load of DS[B] followed by an atomic update of DS[A]. Every active lane loaded its B before any lane updated its A. When a lane's B is the A of a lower active lane (a chain such as DS[A] += DS[A - 4] across lanes), the result differed from the hardware.

After: each src2 instruction is a single IR operation, SharedSrc2U32 or SharedSrc2U64. It carries the update as a constant and has no data operand. The SPIR-V backend runs the active lanes of each host subgroup one at a time: OpGroupNonUniformElect picks the lowest pending lane, which reads B and updates A, and a workgroup memory barrier follows each lane. This is the loop shape of the existing locked 64-bit LDS update. A wave64 program run as two lane halves emits each half in turn, so lanes 0-31 run before 32-63.

The updates themselves are unchanged: the same replacement for each 32-bit and 64-bit op, and the same f32/f64 flush, 64-bit alignment and bounds rules as in #5474.

Hardware semantics, measured on RDNA1 (gfx1010, AMD Radeon RX 5700 XT), which has the src2 opcodes. The tools/hw-oracle template was assembled with the Windows driver's amd_comgr_2.dll and launched with its HIP runtime. The kernel of the new test was run unchanged on the RX 5700 XT in wave32 and wave64:

  • eight lanes in a chain with ds_add_src2_u32 at offset -1 dword
  • the same chain with ds_add_src2_u64 at offset -2 dwords
  • ds_write_src2_b32 with the lanes in reverse address order
  • ds_add_src2_u32 at offset +1, where B is the next lane's A
  • four lanes with the same A
  • in wave64, the chain spans lanes 28-35, across lanes 31 and 32

All 512 (wave32) and 1024 (wave64) LDS words equal a model where the active lanes run in lane order and each lane sees the writes of lower lanes. The old reads-first model gets 7 of the chain words wrong in each wave size.

measurement-results-ds-src2-lane-order-gfx1010.md

Tested

  • Windows 11, AMD Radeon RX 5700 XT, Adrenalin 32.0.21045.5002, MinGW GCC 15.2.0. The full build is clean.
  • New test agc_driver_lds_src2_lane_order runs the kernel above in wave32 and in wave64. The wave64 variant only swaps the exec save and restore opcodes. It compares every LDS word with the lane-ordered model, which matches the hardware run. It passes, and without the change it fails at the first chain word.
  • agc_driver_lds_src2 and agc_driver_lds_src2_wide pass on the new path.
  • ctest -R "lds_|shader_memory|decoder|recompil|agc_shader": everything passes except agc_driver_lds_mixed_width_atomics, which also fails on unchanged main (dacd78525) on this machine.
  • python3 tools/check_conventions.py --base origin/main passes.
  • Not tested: pixel-stage src2. There, LDS is per-invocation Function storage and lane order cannot matter. The update uses the same AtomicUpdate helper as the existing LDS atomics, which #5160 addresses for that storage class.

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: #5474 (this branch contains its commit; it merges cleanly with #5492, #5456 and #5160)
  • Unblocks: none
  • GPUs tested: AMD Radeon RX 5700 XT (gfx1010), Adrenalin 32.0.21045.5002, Windows 11
  • AI-assisted: yes. Claude wrote the change, the test and the measurement kernels; I reviewed it and ran the measurements and tests on my machine.
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4849637226 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5498). Originally posted by [billythemenace2](https://github.com/billythemenace2) on 2026-10-13T21:21:19Z. --- ### What Before: `ds_*_src2_*` was translated as an LDS load of `DS[B]` followed by an atomic update of `DS[A]`. Every active lane loaded its `B` before any lane updated its `A`. When a lane's `B` is the `A` of a lower active lane (a chain such as `DS[A] += DS[A - 4]` across lanes), the result differed from the hardware. After: each src2 instruction is a single IR operation, `SharedSrc2U32` or `SharedSrc2U64`. It carries the update as a constant and has no data operand. The SPIR-V backend runs the active lanes of each host subgroup one at a time: `OpGroupNonUniformElect` picks the lowest pending lane, which reads `B` and updates `A`, and a workgroup memory barrier follows each lane. This is the loop shape of the existing locked 64-bit LDS update. A wave64 program run as two lane halves emits each half in turn, so lanes 0-31 run before 32-63. The updates themselves are unchanged: the same replacement for each 32-bit and 64-bit op, and the same f32/f64 flush, 64-bit alignment and bounds rules as in #5474. Hardware semantics, measured on RDNA1 (gfx1010, AMD Radeon RX 5700 XT), which has the src2 opcodes. The `tools/hw-oracle` template was assembled with the Windows driver's `amd_comgr_2.dll` and launched with its HIP runtime. The kernel of the new test was run unchanged on the RX 5700 XT in wave32 and wave64: - eight lanes in a chain with `ds_add_src2_u32` at offset -1 dword - the same chain with `ds_add_src2_u64` at offset -2 dwords - `ds_write_src2_b32` with the lanes in reverse address order - `ds_add_src2_u32` at offset +1, where `B` is the next lane's `A` - four lanes with the same `A` - in wave64, the chain spans lanes 28-35, across lanes 31 and 32 All 512 (wave32) and 1024 (wave64) LDS words equal a model where the active lanes run in lane order and each lane sees the writes of lower lanes. The old reads-first model gets 7 of the chain words wrong in each wave size. [measurement-results-ds-src2-lane-order-gfx1010.md](https://github.com/user-attachments/files/33406926/measurement-results-ds-src2-lane-order-gfx1010.md) ### Tested - Windows 11, AMD Radeon RX 5700 XT, Adrenalin 32.0.21045.5002, MinGW GCC 15.2.0. The full build is clean. - New test `agc_driver_lds_src2_lane_order` runs the kernel above in wave32 and in wave64. The wave64 variant only swaps the exec save and restore opcodes. It compares every LDS word with the lane-ordered model, which matches the hardware run. It passes, and without the change it fails at the first chain word. - `agc_driver_lds_src2` and `agc_driver_lds_src2_wide` pass on the new path. - `ctest -R "lds_|shader_memory|decoder|recompil|agc_shader"`: everything passes except `agc_driver_lds_mixed_width_atomics`, which also fails on unchanged `main` (dacd78525) on this machine. - `python3 tools/check_conventions.py --base origin/main` passes. - Not tested: pixel-stage src2. There, LDS is per-invocation `Function` storage and lane order cannot matter. The update uses the same `AtomicUpdate` helper as the existing LDS atomics, which #5160 addresses for that storage class. ### 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: #5474 (this branch contains its commit; it merges cleanly with #5492, #5456 and #5160) - [x] Unblocks: none - [x] GPUs tested: AMD Radeon RX 5700 XT (gfx1010), Adrenalin 32.0.21045.5002, Windows 11 - [x] AI-assisted: yes. Claude wrote the change, the test and the measurement kernels; I reviewed it and ran the measurements and tests on my machine.
MarcZX10 commented 2026-10-13 21:25:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-13T21:25:24Z.


The conventions check is failing only because the PR title is not Conventional Commits: Fix/shader ds src2 lane order. The body already gives a suitable title: fix(shader): run DS src2 lanes one at a time in lane order. Please update the PR title to that (or another valid type(scope): description) to clear the check; the source checks shown here pass.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6155527701 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5498#issuecomment-6155527701). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-13T21:25:24Z. --- The conventions check is failing only because the PR title is not Conventional Commits: `Fix/shader ds src2 lane order`. The body already gives a suitable title: `fix(shader): run DS src2 lanes one at a time in lane order`. Please update the PR title to that (or another valid `type(scope): description`) to clear the check; the source checks shown here pass.
MarcZX10 commented 2026-10-13 21:28:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-13T21:28:37Z.

Review: COMMENTED


state.laneCount == 2 maps one guest wave64 to two host 32-lane subgroups (SpirvEmitter.cpp), but this loop elects and ballots with ScopeSubgroup only. The two host subgroups therefore advance independently: subgroup 1 can execute guest lanes 32–63 before subgroup 0 has completed lanes 0–31. The generated instruction order in EmitStructuredBlock does not impose execution order between those subgroups. Could you add a split-wave64 regression where a dependency chain crosses lanes 31/32 and make the scheduler serialize both halves (or otherwise demonstrate the required ordering)? The described RX 5700 test runs natively as a single wave64 and does not cover this host-subgroup32 path.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5510206500 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5498#pullrequestreview-5510206500). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-13T21:28:37Z. **Review:** COMMENTED --- `state.laneCount == 2` maps one guest wave64 to two host 32-lane subgroups (`SpirvEmitter.cpp`), but this loop elects and ballots with `ScopeSubgroup` only. The two host subgroups therefore advance independently: subgroup 1 can execute guest lanes 32–63 before subgroup 0 has completed lanes 0–31. The generated instruction order in `EmitStructuredBlock` does not impose execution order between those subgroups. Could you add a split-wave64 regression where a dependency chain crosses lanes 31/32 and make the scheduler serialize both halves (or otherwise demonstrate the required ordering)? The described RX 5700 test runs natively as a single wave64 and does not cover this host-subgroup32 path.
MarcZX10 commented 2026-10-13 21:30:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-13T21:30:52Z.

Code review location: core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvMemoryInstructions.cpp; line 1351

@@ -1323,6 +1323,122 @@ std::uint32_t ScalarU64Constant(SpirvEmitterState& state, std::uint32_t value) {
     return state.module.Constant(spv::OpConstant, TypeScalarU64(state), value, 0u);
 }
 
+template<typename TBody>
+void LaneOrderedUpdate(SpirvEmitterState& state, std::uint32_t active, TBody&& body) {
+    const auto boolean = TypeBool(state);
+    const auto entry = state.currentLabel;
+    const auto header = state.module.AllocateId();
+    const auto loopBody = state.module.AllocateId();
+    const auto pending = state.module.AllocateId();
+    const auto elected = state.module.AllocateId();
+    const auto electedMerge = state.module.AllocateId();
+    const auto pendingMerge = state.module.AllocateId();
+    const auto cont = state.module.AllocateId();
+    const auto merge = state.module.AllocateId();
+    const auto done = state.module.AllocateId();
+    const auto doneNext = state.module.AllocateId();
+    const auto waiting = [&](std::uint32_t finished) { return Binary(state, spv::OpLogicalAnd, boolean, active, Unary(state, spv::OpLogicalNot, boolean, finished)); };
+    state.module.AddFunction(spv::OpBranch, header);
+    EmitLabel(state, header);
+    state.module.AddFunction(spv::OpPhi, boolean, done, ConstantBool(state, false), entry, doneNext, cont);
+    state.module.AddFunction(spv::OpLoopMerge, merge, cont, spv::LoopControlMaskNone);
+    state.module.AddFunction(spv::OpBranch, loopBody);
+    EmitLabel(state, loopBody);
+    state.module.AddFunction(spv::OpSelectionMerge, pendingMerge, spv::SelectionControlMaskNone);
+    state.module.AddFunction(spv::OpBranchConditional, waiting(done), pending, pendingMerge);
+    EmitLabel(state, pending);
+    const auto first = state.module.AllocateId();
+    EmitSubgroupElect(state, first);

On the split wave64 path, each half is a distinct host subgroup. This loop’s OpGroupNonUniformElect and ballot therefore only order lanes within that subgroup; emitted block order does not order the two subgroups at runtime. A dependency from lane 32 to a write by lane 31 can still read the old value. Please add a regression that exercises wave64 on a subgroup32 host and serialize across the halves (or show another mechanism that does so). The RX 5700 native wave64 test does not cover this path.

<!-- greyfinch-sync:boykopovar/AnyPS5:review-comment:4264241465 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5498#discussion_r4264241465). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-13T21:30:52Z. **Code review location:** `core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvMemoryInstructions.cpp`; line 1351 ~~~~diff @@ -1323,6 +1323,122 @@ std::uint32_t ScalarU64Constant(SpirvEmitterState& state, std::uint32_t value) { return state.module.Constant(spv::OpConstant, TypeScalarU64(state), value, 0u); } +template<typename TBody> +void LaneOrderedUpdate(SpirvEmitterState& state, std::uint32_t active, TBody&& body) { + const auto boolean = TypeBool(state); + const auto entry = state.currentLabel; + const auto header = state.module.AllocateId(); + const auto loopBody = state.module.AllocateId(); + const auto pending = state.module.AllocateId(); + const auto elected = state.module.AllocateId(); + const auto electedMerge = state.module.AllocateId(); + const auto pendingMerge = state.module.AllocateId(); + const auto cont = state.module.AllocateId(); + const auto merge = state.module.AllocateId(); + const auto done = state.module.AllocateId(); + const auto doneNext = state.module.AllocateId(); + const auto waiting = [&](std::uint32_t finished) { return Binary(state, spv::OpLogicalAnd, boolean, active, Unary(state, spv::OpLogicalNot, boolean, finished)); }; + state.module.AddFunction(spv::OpBranch, header); + EmitLabel(state, header); + state.module.AddFunction(spv::OpPhi, boolean, done, ConstantBool(state, false), entry, doneNext, cont); + state.module.AddFunction(spv::OpLoopMerge, merge, cont, spv::LoopControlMaskNone); + state.module.AddFunction(spv::OpBranch, loopBody); + EmitLabel(state, loopBody); + state.module.AddFunction(spv::OpSelectionMerge, pendingMerge, spv::SelectionControlMaskNone); + state.module.AddFunction(spv::OpBranchConditional, waiting(done), pending, pendingMerge); + EmitLabel(state, pending); + const auto first = state.module.AllocateId(); + EmitSubgroupElect(state, first); ~~~~ --- On the split wave64 path, each half is a distinct host subgroup. This loop’s `OpGroupNonUniformElect` and ballot therefore only order lanes within that subgroup; emitted block order does not order the two subgroups at runtime. A dependency from lane 32 to a write by lane 31 can still read the old value. Please add a regression that exercises wave64 on a subgroup32 host and serialize across the halves (or show another mechanism that does so). The RX 5700 native wave64 test does not cover this path.
github-actions[bot] commented 2026-10-13 21:39:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-13T21:39:05Z.


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
#4706 docs/dev/debt/shader.md L106-107
#5176 docs/dev/debt/shader.md L106
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6155753274 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5498#issuecomment-6155753274). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-13T21:39:05Z. --- <!-- 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 | |---|---|---|---| | #4706 | `docs/dev/debt/shader.md` [L106-107](https://github.com/boykopovar/AnyPS5/blob/71c71f50b7a42ad1a62b78d9cd24f5a356965557/docs/dev/debt/shader.md#L106-L107) | | | | #5176 | `docs/dev/debt/shader.md` [L106](https://github.com/boykopovar/AnyPS5/blob/71c71f50b7a42ad1a62b78d9cd24f5a356965557/docs/dev/debt/shader.md#L106) | | |
billythemenace2 commented 2026-10-13 21:44:40 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by billythemenace2 on 2026-10-13T21:44:40Z.

Code review location: core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvMemoryInstructions.cpp; line 1351

@@ -1323,6 +1323,122 @@ std::uint32_t ScalarU64Constant(SpirvEmitterState& state, std::uint32_t value) {
     return state.module.Constant(spv::OpConstant, TypeScalarU64(state), value, 0u);
 }
 
+template<typename TBody>
+void LaneOrderedUpdate(SpirvEmitterState& state, std::uint32_t active, TBody&& body) {
+    const auto boolean = TypeBool(state);
+    const auto entry = state.currentLabel;
+    const auto header = state.module.AllocateId();
+    const auto loopBody = state.module.AllocateId();
+    const auto pending = state.module.AllocateId();
+    const auto elected = state.module.AllocateId();
+    const auto electedMerge = state.module.AllocateId();
+    const auto pendingMerge = state.module.AllocateId();
+    const auto cont = state.module.AllocateId();
+    const auto merge = state.module.AllocateId();
+    const auto done = state.module.AllocateId();
+    const auto doneNext = state.module.AllocateId();
+    const auto waiting = [&](std::uint32_t finished) { return Binary(state, spv::OpLogicalAnd, boolean, active, Unary(state, spv::OpLogicalNot, boolean, finished)); };
+    state.module.AddFunction(spv::OpBranch, header);
+    EmitLabel(state, header);
+    state.module.AddFunction(spv::OpPhi, boolean, done, ConstantBool(state, false), entry, doneNext, cont);
+    state.module.AddFunction(spv::OpLoopMerge, merge, cont, spv::LoopControlMaskNone);
+    state.module.AddFunction(spv::OpBranch, loopBody);
+    EmitLabel(state, loopBody);
+    state.module.AddFunction(spv::OpSelectionMerge, pendingMerge, spv::SelectionControlMaskNone);
+    state.module.AddFunction(spv::OpBranchConditional, waiting(done), pending, pendingMerge);
+    EmitLabel(state, pending);
+    const auto first = state.module.AllocateId();
+    EmitSubgroupElect(state, first);

Thanks, good catch that the test did not cover this layout. There are three wave64 layouts, and only one of them splits a wave across host subgroups:

  • 32-lane host (laneCount == 2): each invocation holds lanes n and n + 32, and EmitStructuredBlock (SpirvFlowEmitter.cpp, the for (half ...) loop) emits every instruction for half 0 and then half 1 in the same invocation. The SharedSrc2 loop for lanes 0-31 therefore finishes in each invocation before the loop for lanes 32-63 starts. The halves are not different subgroups here, so lane 32 reads after lane 31's write.
  • 64-lane host subgroup: one elect loop covers all 64 lanes.
  • APS5_SINGLE_LANE on a host whose real subgroups are narrower than 64: the wave spans two real subgroups, and ordering holds only within each one. That is the debug layout WaveLdsScope already describes, where ballots, readlane, DPP and ds_append are also only subgroup-wide. I documented it in the technical-debt entry instead of adding a cross-subgroup turnstile, which would need every invocation of the wave to reach the instruction.

I added a regression for the 32-lane layout (9ced724de). agc_driver_lds_src2_lane_order now also runs the wave64 kernel with target.subgroupSize = 32. It checks that the program is laid out for a 32-lane host subgroup and that the pipeline requires 32-lane subgroups. It passes on the RX 5700 XT, which supports both sizes. The chain crosses lanes 31 and 32 and is compared word for word with the lane-ordered result the hardware gives. If you meant a different split path, tell me which and I'll cover it.

<!-- greyfinch-sync:boykopovar/AnyPS5:review-comment:4264358284 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5498#discussion_r4264358284). Originally posted by [billythemenace2](https://github.com/billythemenace2) on 2026-10-13T21:44:40Z. **Code review location:** `core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvMemoryInstructions.cpp`; line 1351 ~~~~diff @@ -1323,6 +1323,122 @@ std::uint32_t ScalarU64Constant(SpirvEmitterState& state, std::uint32_t value) { return state.module.Constant(spv::OpConstant, TypeScalarU64(state), value, 0u); } +template<typename TBody> +void LaneOrderedUpdate(SpirvEmitterState& state, std::uint32_t active, TBody&& body) { + const auto boolean = TypeBool(state); + const auto entry = state.currentLabel; + const auto header = state.module.AllocateId(); + const auto loopBody = state.module.AllocateId(); + const auto pending = state.module.AllocateId(); + const auto elected = state.module.AllocateId(); + const auto electedMerge = state.module.AllocateId(); + const auto pendingMerge = state.module.AllocateId(); + const auto cont = state.module.AllocateId(); + const auto merge = state.module.AllocateId(); + const auto done = state.module.AllocateId(); + const auto doneNext = state.module.AllocateId(); + const auto waiting = [&](std::uint32_t finished) { return Binary(state, spv::OpLogicalAnd, boolean, active, Unary(state, spv::OpLogicalNot, boolean, finished)); }; + state.module.AddFunction(spv::OpBranch, header); + EmitLabel(state, header); + state.module.AddFunction(spv::OpPhi, boolean, done, ConstantBool(state, false), entry, doneNext, cont); + state.module.AddFunction(spv::OpLoopMerge, merge, cont, spv::LoopControlMaskNone); + state.module.AddFunction(spv::OpBranch, loopBody); + EmitLabel(state, loopBody); + state.module.AddFunction(spv::OpSelectionMerge, pendingMerge, spv::SelectionControlMaskNone); + state.module.AddFunction(spv::OpBranchConditional, waiting(done), pending, pendingMerge); + EmitLabel(state, pending); + const auto first = state.module.AllocateId(); + EmitSubgroupElect(state, first); ~~~~ --- Thanks, good catch that the test did not cover this layout. There are three wave64 layouts, and only one of them splits a wave across host subgroups: - **32-lane host (`laneCount == 2`):** each invocation holds lanes n and n + 32, and `EmitStructuredBlock` (`SpirvFlowEmitter.cpp`, the `for (half ...)` loop) emits every instruction for half 0 and then half 1 in the same invocation. The `SharedSrc2` loop for lanes 0-31 therefore finishes in each invocation before the loop for lanes 32-63 starts. The halves are not different subgroups here, so lane 32 reads after lane 31's write. - **64-lane host subgroup:** one elect loop covers all 64 lanes. - **`APS5_SINGLE_LANE` on a host whose real subgroups are narrower than 64:** the wave spans two real subgroups, and ordering holds only within each one. That is the debug layout `WaveLdsScope` already describes, where ballots, `readlane`, DPP and `ds_append` are also only subgroup-wide. I documented it in the technical-debt entry instead of adding a cross-subgroup turnstile, which would need every invocation of the wave to reach the instruction. I added a regression for the 32-lane layout (9ced724de). `agc_driver_lds_src2_lane_order` now also runs the wave64 kernel with `target.subgroupSize = 32`. It checks that the program is laid out for a 32-lane host subgroup and that the pipeline requires 32-lane subgroups. It passes on the RX 5700 XT, which supports both sizes. The chain crosses lanes 31 and 32 and is compared word for word with the lane-ordered result the hardware gives. If you meant a different split path, tell me which and I'll cover it.
MarcZX10 commented 2026-10-13 21:45:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-13T21:45:23Z.

Code review location: core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvMemoryInstructions.cpp; line 1351

@@ -1323,6 +1323,122 @@ std::uint32_t ScalarU64Constant(SpirvEmitterState& state, std::uint32_t value) {
     return state.module.Constant(spv::OpConstant, TypeScalarU64(state), value, 0u);
 }
 
+template<typename TBody>
+void LaneOrderedUpdate(SpirvEmitterState& state, std::uint32_t active, TBody&& body) {
+    const auto boolean = TypeBool(state);
+    const auto entry = state.currentLabel;
+    const auto header = state.module.AllocateId();
+    const auto loopBody = state.module.AllocateId();
+    const auto pending = state.module.AllocateId();
+    const auto elected = state.module.AllocateId();
+    const auto electedMerge = state.module.AllocateId();
+    const auto pendingMerge = state.module.AllocateId();
+    const auto cont = state.module.AllocateId();
+    const auto merge = state.module.AllocateId();
+    const auto done = state.module.AllocateId();
+    const auto doneNext = state.module.AllocateId();
+    const auto waiting = [&](std::uint32_t finished) { return Binary(state, spv::OpLogicalAnd, boolean, active, Unary(state, spv::OpLogicalNot, boolean, finished)); };
+    state.module.AddFunction(spv::OpBranch, header);
+    EmitLabel(state, header);
+    state.module.AddFunction(spv::OpPhi, boolean, done, ConstantBool(state, false), entry, doneNext, cont);
+    state.module.AddFunction(spv::OpLoopMerge, merge, cont, spv::LoopControlMaskNone);
+    state.module.AddFunction(spv::OpBranch, loopBody);
+    EmitLabel(state, loopBody);
+    state.module.AddFunction(spv::OpSelectionMerge, pendingMerge, spv::SelectionControlMaskNone);
+    state.module.AddFunction(spv::OpBranchConditional, waiting(done), pending, pendingMerge);
+    EmitLabel(state, pending);
+    const auto first = state.module.AllocateId();
+    EmitSubgroupElect(state, first);

Thanks, this covers the layout I meant. The new 32-lane test exercises the laneCount == 2 mapping where both halves run in one invocation, and the 64-lane host keeps the wave in one subgroup. The APS5_SINGLE_LANE limitation is now clearly scoped as the existing debug-layout limitation. I consider the ordering concern addressed for this PR.

<!-- greyfinch-sync:boykopovar/AnyPS5:review-comment:4264363958 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5498#discussion_r4264363958). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-13T21:45:23Z. **Code review location:** `core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvMemoryInstructions.cpp`; line 1351 ~~~~diff @@ -1323,6 +1323,122 @@ std::uint32_t ScalarU64Constant(SpirvEmitterState& state, std::uint32_t value) { return state.module.Constant(spv::OpConstant, TypeScalarU64(state), value, 0u); } +template<typename TBody> +void LaneOrderedUpdate(SpirvEmitterState& state, std::uint32_t active, TBody&& body) { + const auto boolean = TypeBool(state); + const auto entry = state.currentLabel; + const auto header = state.module.AllocateId(); + const auto loopBody = state.module.AllocateId(); + const auto pending = state.module.AllocateId(); + const auto elected = state.module.AllocateId(); + const auto electedMerge = state.module.AllocateId(); + const auto pendingMerge = state.module.AllocateId(); + const auto cont = state.module.AllocateId(); + const auto merge = state.module.AllocateId(); + const auto done = state.module.AllocateId(); + const auto doneNext = state.module.AllocateId(); + const auto waiting = [&](std::uint32_t finished) { return Binary(state, spv::OpLogicalAnd, boolean, active, Unary(state, spv::OpLogicalNot, boolean, finished)); }; + state.module.AddFunction(spv::OpBranch, header); + EmitLabel(state, header); + state.module.AddFunction(spv::OpPhi, boolean, done, ConstantBool(state, false), entry, doneNext, cont); + state.module.AddFunction(spv::OpLoopMerge, merge, cont, spv::LoopControlMaskNone); + state.module.AddFunction(spv::OpBranch, loopBody); + EmitLabel(state, loopBody); + state.module.AddFunction(spv::OpSelectionMerge, pendingMerge, spv::SelectionControlMaskNone); + state.module.AddFunction(spv::OpBranchConditional, waiting(done), pending, pendingMerge); + EmitLabel(state, pending); + const auto first = state.module.AllocateId(); + EmitSubgroupElect(state, first); ~~~~ --- Thanks, this covers the layout I meant. The new 32-lane test exercises the laneCount == 2 mapping where both halves run in one invocation, and the 64-lane host keeps the wave in one subgroup. The APS5_SINGLE_LANE limitation is now clearly scoped as the existing debug-layout limitation. I consider the ordering concern addressed for this PR.
simonbbby commented 2026-10-13 22:23:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by simonbbby on 2026-10-13T22:23:46Z.


Found a reproducible SPIR-V validation failure on exact head 9ced724de704410db8114dbb0a64d6cdf3ffc3b4 (including the carried #5474 dependency), with ANYPS5_ENABLE_SPIRV_TOOLS=ON.

Linux Release build, RTX 3090 / NVIDIA 595.99.02 and RDNA2 gfx1036 (1002:13c0) / RADV Mesa 25.2.8. On the unmodified head, all three tests fail before GPU dispatch:

agc_driver_lds_src2
agc_driver_lds_src2_lane_order
agc_driver_lds_src2_wide

OpSelectionMerge must immediately precede either an OpBranchConditional
or OpSwitch instruction. OpSelectionMerge must be the second-to-last
instruction in its block.

LaneOrderedUpdate emits OpSelectionMerge, then evaluates waiting(done) inside the following AddFunction argument. That lambda emits the logical-not/and instructions between the merge and branch. Computing the predicate first fixes the validation error:

     EmitLabel(state, loopBody);
+    const auto isWaiting = waiting(done);
     state.module.AddFunction(spv::OpSelectionMerge, pendingMerge, spv::SelectionControlMaskNone);
-    state.module.AddFunction(spv::OpBranchConditional, waiting(done), pending, pendingMerge);
+    state.module.AddFunction(spv::OpBranchConditional, isWaiting, pending, pendingMerge);

With only that local correction, all three tests pass three consecutive runs on each GPU (18 passes total), with SPIR-V validation still ON, shader caching disabled, GPU execution required, pinned ICDs, serial CTest and unchanged 30-second timeouts. No internal subgroup skips were printed: the lane-order test executed its wave32, wave64 and explicitly required subgroup32 wave64 checks, including the chain across lanes 31/32. Totals: NVIDIA 3.53 s; RADV 1.36 s.

Restoring the original file and rebuilding makes agc_driver_lds_src2_lane_order fail with the same validation error again on NVIDIA. The isolated checkout is restored clean. This is focused synthetic compute coverage; I did not run a full suite, pixel-stage src2, APS5_SINGLE_LANE, or a title.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6156496781 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5498#issuecomment-6156496781). Originally posted by [simonbbby](https://github.com/simonbbby) on 2026-10-13T22:23:46Z. --- Found a reproducible SPIR-V validation failure on exact head `9ced724de704410db8114dbb0a64d6cdf3ffc3b4` (including the carried #5474 dependency), with `ANYPS5_ENABLE_SPIRV_TOOLS=ON`. Linux Release build, RTX 3090 / NVIDIA 595.99.02 and RDNA2 gfx1036 (`1002:13c0`) / RADV Mesa 25.2.8. On the unmodified head, all three tests fail before GPU dispatch: ``` agc_driver_lds_src2 agc_driver_lds_src2_lane_order agc_driver_lds_src2_wide OpSelectionMerge must immediately precede either an OpBranchConditional or OpSwitch instruction. OpSelectionMerge must be the second-to-last instruction in its block. ``` `LaneOrderedUpdate` emits `OpSelectionMerge`, then evaluates `waiting(done)` inside the following `AddFunction` argument. That lambda emits the logical-not/and instructions between the merge and branch. Computing the predicate first fixes the validation error: ```diff EmitLabel(state, loopBody); + const auto isWaiting = waiting(done); state.module.AddFunction(spv::OpSelectionMerge, pendingMerge, spv::SelectionControlMaskNone); - state.module.AddFunction(spv::OpBranchConditional, waiting(done), pending, pendingMerge); + state.module.AddFunction(spv::OpBranchConditional, isWaiting, pending, pendingMerge); ``` With only that local correction, all three tests pass **three consecutive runs on each GPU** (18 passes total), with SPIR-V validation still ON, shader caching disabled, GPU execution required, pinned ICDs, serial CTest and unchanged 30-second timeouts. No internal subgroup skips were printed: the lane-order test executed its wave32, wave64 and explicitly required subgroup32 wave64 checks, including the chain across lanes 31/32. Totals: NVIDIA 3.53 s; RADV 1.36 s. Restoring the original file and rebuilding makes `agc_driver_lds_src2_lane_order` fail with the same validation error again on NVIDIA. The isolated checkout is restored clean. This is focused synthetic compute coverage; I did not run a full suite, pixel-stage src2, `APS5_SINGLE_LANE`, or a title.
MarcZX10 commented 2026-10-13 22:26:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-13T22:26:02Z.

Review: COMMENTED


Thanks for the targeted validation. I agree this is a merge blocker: the exact head fails SPIR-V validation before dispatch, and the one-line predicate-hoist fix passes the affected tests on both reported GPUs. Please push that fix and retain the validation-enabled regression run. The existing CI does not run ANYPS5_ENABLE_SPIRV_TOOLS=ON, so the passing workflow checks did not catch this.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5510792814 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5498#pullrequestreview-5510792814). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-13T22:26:02Z. **Review:** COMMENTED --- Thanks for the targeted validation. I agree this is a merge blocker: the exact head fails SPIR-V validation before dispatch, and the one-line predicate-hoist fix passes the affected tests on both reported GPUs. Please push that fix and retain the validation-enabled regression run. The existing CI does not run `ANYPS5_ENABLE_SPIRV_TOOLS=ON`, so the passing workflow checks did not catch this.
MarcZX10 commented 2026-10-13 23:45:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-13T23:45:03Z.


Thanks for the follow-up validation: the explicit subgroup32 wave64 test and dependency chain across lanes 31/32 address my earlier scheduling concern. The other reported blocker is still outstanding on the published head 9ced724de704410db8114dbb0a64d6cdf3ffc3b4: with SPIR-V validation enabled, the three src2 tests fail before dispatch because instructions are emitted between OpSelectionMerge and OpBranchConditional. The local predicate-hoist change passed the reporter's targeted GPU runs, but it is not in this PR head yet. Please push that fix and keep the validation-enabled regression coverage in the branch.

AI-assisted: yes; reviewed by MarcZX100.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6157578093 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5498#issuecomment-6157578093). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-13T23:45:03Z. --- Thanks for the follow-up validation: the explicit subgroup32 wave64 test and dependency chain across lanes 31/32 address my earlier scheduling concern. The other reported blocker is still outstanding on the published head `9ced724de704410db8114dbb0a64d6cdf3ffc3b4`: with SPIR-V validation enabled, the three src2 tests fail before dispatch because instructions are emitted between `OpSelectionMerge` and `OpBranchConditional`. The local predicate-hoist change passed the reporter's targeted GPU runs, but it is not in this PR head yet. Please push that fix and keep the validation-enabled regression coverage in the branch. AI-assisted: yes; reviewed by MarcZX100.
xXPBSXx commented 2026-10-14 00:24:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-14T00:24:25Z.


Windows test of #5498: Windows 10 (19045), MinGW-w64 GCC 15.2, Release, ninja -j 4, ctest called directly, GPU selected by the tests: NVIDIA GeForce RTX 4080 SUPER (the log line Selected GPU name=NVIDIA GeForce RTX 4080 SUPER; an AMD Radeon RX 6400 is also present and was not selected). Tree: main d1670009f + merge of PR head 9ced724de704410db8114dbb0a64d6cdf3ffc3b4 (local merge b4f6d0a95). Logs: rtx5498_agc_driver_lds_src2*_N.log.

Result: agc_driver_lds_src2, agc_driver_lds_src2_lane_order and agc_driver_lds_src2_wide all end with Exception: SegFault (FATAL: unhandled exception 0xc0000005, read of address 0x10 inside nvoglv64.dll+0x12178aa, the NVIDIA driver) in every run: 0 of 9 pass (3 tests x 3 runs). The crash comes right after the Vulkan device is ready.
Baseline, same machine and build directory: agc_driver_lds_src2 (a test that already exists on main) passes on main feddf7f4c in 3 of 3 runs (exit code 0), so the crash does not come from the environment alone. lane_order and wide do not exist on main, so there is no baseline for them.

Not tested: which shader of the PR triggers the driver crash (not narrowed down), another NVIDIA driver version (driver here: 610.74, Windows 32.0.16.1074), the AMD GPU, Linux, a title run. I do not claim that the PR code is wrong: the fault is inside the driver, the trigger is unknown.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6158065739 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5498#issuecomment-6158065739). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-14T00:24:25Z. --- Windows test of #5498: Windows 10 (19045), MinGW-w64 GCC 15.2, Release, `ninja -j 4`, ctest called directly, GPU selected by the tests: NVIDIA GeForce RTX 4080 SUPER (the log line `Selected GPU name=NVIDIA GeForce RTX 4080 SUPER`; an AMD Radeon RX 6400 is also present and was not selected). Tree: `main` `d1670009f` + merge of PR head `9ced724de704410db8114dbb0a64d6cdf3ffc3b4` (local merge `b4f6d0a95`). Logs: `rtx5498_agc_driver_lds_src2*_N.log`. Result: `agc_driver_lds_src2`, `agc_driver_lds_src2_lane_order` and `agc_driver_lds_src2_wide` all end with `Exception: SegFault` (`FATAL: unhandled exception 0xc0000005`, read of address 0x10 inside `nvoglv64.dll+0x12178aa`, the NVIDIA driver) in every run: 0 of 9 pass (3 tests x 3 runs). The crash comes right after the Vulkan device is ready. Baseline, same machine and build directory: `agc_driver_lds_src2` (a test that already exists on `main`) passes on `main` `feddf7f4c` in 3 of 3 runs (exit code 0), so the crash does not come from the environment alone. `lane_order` and `wide` do not exist on `main`, so there is no baseline for them. Not tested: which shader of the PR triggers the driver crash (not narrowed down), another NVIDIA driver version (driver here: 610.74, Windows 32.0.16.1074), the AMD GPU, Linux, a title run. I do not claim that the PR code is wrong: the fault is inside the driver, the trigger is unknown. AI-assisted (Claude Code).
MarcZX10 commented 2026-10-14 00:25:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-14T00:25:54Z.


Thanks for the controlled Windows baseline and the 0/9 result. That shows the NVIDIA crash is triggered by the PR head on this setup, while the current report does not isolate which generated shader triggers it; I agree it does not yet identify whether the driver or emitted code is at fault. It is also separate from the SPIR-V Tools failure previously reproduced on the exact head (OpSelectionMerge followed by emitted predicate instructions), which remains unresolved. I would keep both findings visible and avoid treating passing non-validation CI as covering either case.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6158083673 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5498#issuecomment-6158083673). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-14T00:25:54Z. --- Thanks for the controlled Windows baseline and the 0/9 result. That shows the NVIDIA crash is triggered by the PR head on this setup, while the current report does not isolate which generated shader triggers it; I agree it does not yet identify whether the driver or emitted code is at fault. It is also separate from the SPIR-V Tools failure previously reproduced on the exact head (`OpSelectionMerge` followed by emitted predicate instructions), which remains unresolved. I would keep both findings visible and avoid treating passing non-validation CI as covering either case.
MarcZX10 commented 2026-10-14 00:42:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-14T00:42:55Z.


@KauaSantos702: since you offered Windows AGC GPU runs in #5503, would you be able to run agc_driver_lds_src2, agc_driver_lds_src2_lane_order, and agc_driver_lds_src2_wide at this PR head (9ced724de704410db8114dbb0a64d6cdf3ffc3b4) on the RTX 5070, if convenient? The current RTX 4080 report is 0/9 with the crash in nvoglv64.dll; a second GPU/driver result would help scope it. Separately, the SPIR-V validator failure already reported on this head remains unresolved, so the GPU run would not clear that blocker.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6158288390 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5498#issuecomment-6158288390). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-14T00:42:55Z. --- @KauaSantos702: since you offered Windows AGC GPU runs in #5503, would you be able to run `agc_driver_lds_src2`, `agc_driver_lds_src2_lane_order`, and `agc_driver_lds_src2_wide` at this PR head (`9ced724de704410db8114dbb0a64d6cdf3ffc3b4`) on the RTX 5070, if convenient? The current RTX 4080 report is 0/9 with the crash in `nvoglv64.dll`; a second GPU/driver result would help scope it. Separately, the SPIR-V validator failure already reported on this head remains unresolved, so the GPU run would not clear that blocker.
KauaSantos702 commented 2026-10-14 01:07:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by KauaSantos702 on 2026-10-14T01:07:30Z.


Ran the three tests at this head (9ced724de704410db8114dbb0a64d6cdf3ffc3b4) on a second NVIDIA card and driver. It crashes the same way as the RTX 4080: 0/9, an access violation inside nvoglv64.dll in every run.

Setup

  • NVIDIA GeForce RTX 5070 (Blackwell, device 0x2f04), driver 32.0.16.1714, Vulkan 1.4.351
  • Windows 11, Intel Core i3-10100
  • WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON
  • Each test run 3 times with ctest -j1
Test At this head
agc_driver_lds_src2 0/3, SegFault (~0.6 s)
agc_driver_lds_src2_lane_order 0/3, SegFault (~0.6 s)
agc_driver_lds_src2_wide 0/3, SegFault (~0.6 s)

All runs fail at the same point. The device comes up (Wave32 programs run on subgroups of 32: compute 1, mesh 1, Vulkan device ready) and the first dispatch faults in the driver:

FATAL: unhandled exception 0xc0000005 on thread 30840 ''
  rip 0x00007ffcb14ab4ba nvoglv64.dll+0x11fb4ba
  read of 0x0000000000000010

gdb shows the fault under AgcDriver::VulkanDevice::dispatch, 14 frames deep inside nvoglv64.dll. The driver has no symbols, so gdb names those frames after the nearest exports, which tells nothing about the real functions:

#0  0x00007ffcb14ab4ba in vk_icdNegotiateLoaderICDInterfaceVersion () from ...\nvoglv64.dll
...
#13 0x00007ffcb10c5b9f in vkEnumerateInstanceLayerProperties () from ...\nvoglv64.dll
#14 0x00007ffcb90370ec in AgcDriver::VulkanDevice::dispatch(ShaderRecompiler::RecompileResult const&, unsigned int, unsigned int, unsigned int, unsigned long long, std::span<AgcDriver::Graphics::GuestMemorySnapshot const, ...>, unsigned long long, std::shared_ptr<AgcDriver::PreparedDispatch>, std::shared_ptr<AgcDriver::Recipe const>*) () from libSceAgcDriver.prx

Scope: agc_driver_lds_src2 already exists on main. On the same machine at main d1670009f it passes 3/3 (~0.4 s), and it passed in a full-suite run there too: 1103 tests, 1094 passed, 9 skipped, 0 failed. This PR is based on dacd78525. So on two NVIDIA cards and drivers (Ada and Blackwell), the change makes the driver crash, most likely while compiling the dispatch's pipeline. That would fit the SPIR-V validator failure already reported here, though I did not run the validator myself.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6158583213 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5498#issuecomment-6158583213). Originally posted by [KauaSantos702](https://github.com/KauaSantos702) on 2026-10-14T01:07:30Z. --- Ran the three tests at this head (`9ced724de704410db8114dbb0a64d6cdf3ffc3b4`) on a second NVIDIA card and driver. It crashes the same way as the RTX 4080: **0/9**, an access violation inside `nvoglv64.dll` in every run. **Setup** - NVIDIA GeForce RTX 5070 (Blackwell, device `0x2f04`), driver 32.0.16.1714, Vulkan 1.4.351 - Windows 11, Intel Core i3-10100 - WinLibs GCC 15.2.0 r7, Release, `BUILD_TESTING=ON` - Each test run 3 times with `ctest -j1` | Test | At this head | |---|---| | `agc_driver_lds_src2` | 0/3, SegFault (~0.6 s) | | `agc_driver_lds_src2_lane_order` | 0/3, SegFault (~0.6 s) | | `agc_driver_lds_src2_wide` | 0/3, SegFault (~0.6 s) | All runs fail at the same point. The device comes up (`Wave32 programs run on subgroups of 32: compute 1, mesh 1`, `Vulkan device ready`) and the first dispatch faults in the driver: ``` FATAL: unhandled exception 0xc0000005 on thread 30840 '' rip 0x00007ffcb14ab4ba nvoglv64.dll+0x11fb4ba read of 0x0000000000000010 ``` gdb shows the fault under `AgcDriver::VulkanDevice::dispatch`, 14 frames deep inside `nvoglv64.dll`. The driver has no symbols, so gdb names those frames after the nearest exports, which tells nothing about the real functions: ``` #0 0x00007ffcb14ab4ba in vk_icdNegotiateLoaderICDInterfaceVersion () from ...\nvoglv64.dll ... #13 0x00007ffcb10c5b9f in vkEnumerateInstanceLayerProperties () from ...\nvoglv64.dll #14 0x00007ffcb90370ec in AgcDriver::VulkanDevice::dispatch(ShaderRecompiler::RecompileResult const&, unsigned int, unsigned int, unsigned int, unsigned long long, std::span<AgcDriver::Graphics::GuestMemorySnapshot const, ...>, unsigned long long, std::shared_ptr<AgcDriver::PreparedDispatch>, std::shared_ptr<AgcDriver::Recipe const>*) () from libSceAgcDriver.prx ``` **Scope:** `agc_driver_lds_src2` already exists on `main`. On the same machine at `main` d1670009f it passes 3/3 (~0.4 s), and it passed in a full-suite run there too: 1103 tests, 1094 passed, 9 skipped, 0 failed. This PR is based on dacd78525. So on two NVIDIA cards and drivers (Ada and Blackwell), the change makes the driver crash, most likely while compiling the dispatch's pipeline. That would fit the SPIR-V validator failure already reported here, though I did not run the validator myself.
oneandonlydean commented 2026-10-14 02:25:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-14T02:25:51Z.


Closing: no title is known to reach this. With the queue at 700+ open PRs, please hold off on new PRs that don't name a title needing the change until it's down. If a title stops on this on current main, reopen with the title ID and the log line.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6159506386 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5498#issuecomment-6159506386). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-14T02:25:51Z. --- Closing: no title is known to reach this. With the queue at 700+ open PRs, please hold off on new PRs that don't name a title needing the change until it's down. If a title stops on this on current main, reopen with the title ID and the log line.

Pull request closed

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!5498
No description provided.