fix(shader): sum v_readfirstlane over the guest wave instead of shuffling it from the first lane #25609

Open
cryst4lpepsi wants to merge 3 commits from upstream-pr/25609 into main
cryst4lpepsi commented 2026-11-22 11:33:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by cryst4lpepsi on 2026-11-22T11:33:05Z.


What

v_readfirstlane_b32 reads the first active lane's value through OpGroupNonUniformShuffle at a lane index from OpGroupNonUniformBallotFindLSB (EmitReadFirstLane). On AMD's Windows driver 23.19 on GCN 5, that shuffle in a pixel shader faults inside vkCreateGraphicsPipelines, at the same driver address as #18480 (amdvlk64.dll+0x21d1c24). agc_driver_pixel_helper_lanes stops there. Its pixel program runs v_readfirstlane_b32 s9, v6 (0x7e120506), and it is one of the 35 tests in #3882.

This reuses EmitWaveSum from #24575, which is now in main. The value is kept on the selected lane and every other lane gives 0, so an OpGroupNonUniformIAdd reduction over the guest wave returns it with no lane index. The reduction reads only active invocations. ReadFirstLane values are 32-bit, so the sum is exact.

  • ReadFirstLane now requires SubgroupLocalInvocationId, except in tessellation control programs, as LaneId does. Without this, programs whose other instructions did not declare it failed with SubgroupLocalInvocationId was not declared before function emission (agc_driver_table_index_validation, agc_driver_village_draw_cost).
  • WaveSumUsable holds EmitWaveSum's device and layout checks. It also requires the guest wave to fit in one host subgroup, so a first lane in another host subgroup never selects nothing.
  • The shuffle stays for a program without SubgroupLocalInvocationId, spanned waves, single-lane hosts, waves of two lanes per invocation, waves wider than the host subgroup, and devices without the subgroup operations.

Tested

Windows 11 Home 22621, WinLibs GCC 15.2.0 r7, Release.

After the rebase. main 8b37b7be1f against this PR (dacb31af55, its three commits rebased onto that main). ctest -R "^agc_.*(read_?first_lane|shader_memory|helper_lanes|lds_read_modify|recorded_draw_staging|row_reduction|wave_reduction|table_index_validation|village_draw_cost|append_consume|flat_aperture_lds_bounds|readlane|subgroup|wave_sum|store_over_untracked)" -j 1 -V with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, APS5_NO_PIPELINE_JOURNAL=1, one GPU selected at a time with ANYPS5_GPU; 3 runs without and 3 with VK_LAYER_KHRONOS_validation (1.4.369) per side and GPU. This selects 18 tests on main and 20 with this PR, which adds agc_shader_readfirstlane_wave_sum and agc_driver_read_first_lane_shared_subgroup.

Vega main Vega this PR RTX 3050 Ti main RTX 3050 Ti this PR
agc_driver_pixel_helper_lanes SegFault, 6 of 6 pass, 6 of 6 pass pass
The new two tests not on main pass, 6 of 6 not on main pass, 6 of 6
The other 17 16 pass, agc_driver_ngg_vertex_wave_reduction skipped same 17 pass same

In the validation runs, every test that creates a Vulkan instance logs Insert instance layer "VK_LAYER_KHRONOS_validation". agc_shader_memory, agc_shader_memory_coherent_atomic_loads, agc_subgroup_barrier, agc_subgroup_clock and agc_shader_readfirstlane_wave_sum create no Vulkan instance. No run logged a VUID- or SYNC-HAZARD line.

Before the rebase, on main 42120ad25c with #24575 and this PR on top:

Focused tests, with validation. Each test ran on its own (ctest -R ^<name>$ -V) with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, APS5_NO_PIPELINE_JOURNAL=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation (1.4.369) and VK_LOADER_DEBUG=layer. Every log shows Insert instance layer "VK_LAYER_KHRONOS_validation", none shows was not found, and there are no VUID- or SYNC-HAZARD- lines on either arm.

Test Vega main Vega this PR RTX 3050 Ti main RTX 3050 Ti this PR
agc_driver_pixel_helper_lanes SegFault pass pass pass
agc_driver_pixel_lds_read_modify_write SegFault (#24575) pass pass pass
agc_driver_recorded_draw_staging SegFault (#24575) pass pass pass
agc_driver_pixel_row_reduction pass pass pass pass
agc_driver_pixel_wave_reduction pass pass pass pass
agc_driver_table_index_validation pass pass pass pass
agc_driver_village_draw_cost pass pass pass pass
agc_driver_ds_append_consume pass pass pass pass
agc_driver_gds_append_consume pass pass pass pass
agc_driver_ngg_vertex_wave_reduction skipped skipped pass pass

Whole AGC suite. All 2,037 ^agc_ tests ran on each GPU (-j 1, same settings without the layer) on main a1b89f35e2 with #24575 and this change before the wave-fits guard. Each failure was compared with main under the same settings:

  • Vega: no test fails with the change that passes on main.
  • RTX 3050 Ti: one, agc_driver_store_over_untracked. It then passed 10 of 10 on each GPU with the change (#22670).

The guard only sends more layouts back to the shuffle. After it, the focused tests above were run again.

The failures on both arms are pre-existing:

  • On the Vega: the f16 tests of #3882, msaa_dcc_srgb_clear_* (#14380), stencil_replay* and look_back_scan.
  • On NVIDIA: msaa_dcc_unwatch (#22931).

538 tests did not run on either arm: their executables fail at the objcopy step with Invalid argument, which BUILD.md attributes to Microsoft Defender.

python tools/check_conventions.py --base origin/main: all checks passed.

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 and the licence notice of code adapted from upstream (see AGENTS.md)
  • 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 (#24575 is merged)
  • Fixes: none
  • Unblocks: none
  • GPUs tested: AMD Radeon Graphics (Vega iGPU, 1002:1638), AMD proprietary driver 23.19.10.08, Windows 11 22621; NVIDIA GeForce RTX 3050 Ti Laptop GPU (10de:25a0), driver 596.36, Windows 11 22621
  • AI-assisted: yes

Summary by CodeRabbit

  • Bug Fixes
    • Improved shader handling of first-lane reads across different wave and subgroup sizes. The appropriate reduction or shuffle path is now selected based on device capabilities, with fallback behavior for unsupported configurations.
    • Improved correctness for neighbor reads involving masked helper lanes, including cases where demote behavior is required.
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5438565774 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/25609). Originally posted by [cryst4lpepsi](https://github.com/cryst4lpepsi) on 2026-11-22T11:33:05Z. --- ### What `v_readfirstlane_b32` reads the first active lane's value through `OpGroupNonUniformShuffle` at a lane index from `OpGroupNonUniformBallotFindLSB` (`EmitReadFirstLane`). On AMD's Windows driver 23.19 on GCN 5, that shuffle in a pixel shader faults inside `vkCreateGraphicsPipelines`, at the same driver address as #18480 (`amdvlk64.dll+0x21d1c24`). `agc_driver_pixel_helper_lanes` stops there. Its pixel program runs `v_readfirstlane_b32 s9, v6` (`0x7e120506`), and it is one of the 35 tests in #3882. This reuses `EmitWaveSum` from #24575, which is now in `main`. The value is kept on the selected lane and every other lane gives 0, so an `OpGroupNonUniformIAdd` reduction over the guest wave returns it with no lane index. The reduction reads only active invocations. `ReadFirstLane` values are 32-bit, so the sum is exact. - `ReadFirstLane` now requires `SubgroupLocalInvocationId`, except in tessellation control programs, as `LaneId` does. Without this, programs whose other instructions did not declare it failed with `SubgroupLocalInvocationId was not declared before function emission` (`agc_driver_table_index_validation`, `agc_driver_village_draw_cost`). - `WaveSumUsable` holds `EmitWaveSum`'s device and layout checks. It also requires the guest wave to fit in one host subgroup, so a first lane in another host subgroup never selects nothing. - The shuffle stays for a program without `SubgroupLocalInvocationId`, spanned waves, single-lane hosts, waves of two lanes per invocation, waves wider than the host subgroup, and devices without the subgroup operations. ### Tested Windows 11 Home 22621, WinLibs GCC 15.2.0 r7, Release. **After the rebase.** `main` `8b37b7be1f` against this PR (`dacb31af55`, its three commits rebased onto that `main`). `ctest -R "^agc_.*(read_?first_lane|shader_memory|helper_lanes|lds_read_modify|recorded_draw_staging|row_reduction|wave_reduction|table_index_validation|village_draw_cost|append_consume|flat_aperture_lds_bounds|readlane|subgroup|wave_sum|store_over_untracked)" -j 1 -V` with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`, `APS5_NO_PIPELINE_JOURNAL=1`, one GPU selected at a time with `ANYPS5_GPU`; 3 runs without and 3 with `VK_LAYER_KHRONOS_validation` (1.4.369) per side and GPU. This selects 18 tests on `main` and 20 with this PR, which adds `agc_shader_readfirstlane_wave_sum` and `agc_driver_read_first_lane_shared_subgroup`. | | Vega `main` | Vega this PR | RTX 3050 Ti `main` | RTX 3050 Ti this PR | |---|---|---|---|---| | `agc_driver_pixel_helper_lanes` | SegFault, 6 of 6 | pass, 6 of 6 | pass | pass | | The new two tests | not on `main` | pass, 6 of 6 | not on `main` | pass, 6 of 6 | | The other 17 | 16 pass, `agc_driver_ngg_vertex_wave_reduction` skipped | same | 17 pass | same | In the validation runs, every test that creates a Vulkan instance logs `Insert instance layer "VK_LAYER_KHRONOS_validation"`. `agc_shader_memory`, `agc_shader_memory_coherent_atomic_loads`, `agc_subgroup_barrier`, `agc_subgroup_clock` and `agc_shader_readfirstlane_wave_sum` create no Vulkan instance. No run logged a `VUID-` or `SYNC-HAZARD` line. **Before the rebase**, on `main` `42120ad25c` with #24575 and this PR on top: **Focused tests, with validation.** Each test ran on its own (`ctest -R ^<name>$ -V`) with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`, `APS5_NO_PIPELINE_JOURNAL=1`, `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` (1.4.369) and `VK_LOADER_DEBUG=layer`. Every log shows `Insert instance layer "VK_LAYER_KHRONOS_validation"`, none shows `was not found`, and there are no `VUID-` or `SYNC-HAZARD-` lines on either arm. | Test | Vega `main` | Vega this PR | RTX 3050 Ti `main` | RTX 3050 Ti this PR | |---|---|---|---|---| | `agc_driver_pixel_helper_lanes` | SegFault | pass | pass | pass | | `agc_driver_pixel_lds_read_modify_write` | SegFault (#24575) | pass | pass | pass | | `agc_driver_recorded_draw_staging` | SegFault (#24575) | pass | pass | pass | | `agc_driver_pixel_row_reduction` | pass | pass | pass | pass | | `agc_driver_pixel_wave_reduction` | pass | pass | pass | pass | | `agc_driver_table_index_validation` | pass | pass | pass | pass | | `agc_driver_village_draw_cost` | pass | pass | pass | pass | | `agc_driver_ds_append_consume` | pass | pass | pass | pass | | `agc_driver_gds_append_consume` | pass | pass | pass | pass | | `agc_driver_ngg_vertex_wave_reduction` | skipped | skipped | pass | pass | **Whole AGC suite.** All 2,037 `^agc_` tests ran on each GPU (`-j 1`, same settings without the layer) on `main` `a1b89f35e2` with #24575 and this change before the wave-fits guard. Each failure was compared with `main` under the same settings: - Vega: no test fails with the change that passes on `main`. - RTX 3050 Ti: one, `agc_driver_store_over_untracked`. It then passed 10 of 10 on each GPU with the change (#22670). The guard only sends more layouts back to the shuffle. After it, the focused tests above were run again. The failures on both arms are pre-existing: - On the Vega: the f16 tests of #3882, `msaa_dcc_srgb_clear_*` (#14380), `stencil_replay*` and `look_back_scan`. - On NVIDIA: `msaa_dcc_unwatch` (#22931). 538 tests did not run on either arm: their executables fail at the `objcopy` step with `Invalid argument`, which BUILD.md attributes to Microsoft Defender. `python tools/check_conventions.py --base origin/main`: all checks passed. ### 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) and the licence notice of code adapted from upstream (see AGENTS.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 (#24575 is merged) - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: AMD Radeon Graphics (Vega iGPU, `1002:1638`), AMD proprietary driver 23.19.10.08, Windows 11 22621; NVIDIA GeForce RTX 3050 Ti Laptop GPU (`10de:25a0`), driver 596.36, Windows 11 22621 - [x] AI-assisted: yes <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Bug Fixes** * Improved shader handling of first-lane reads across different wave and subgroup sizes. The appropriate reduction or shuffle path is now selected based on device capabilities, with fallback behavior for unsupported configurations. * Improved correctness for neighbor reads involving masked helper lanes, including cases where demote behavior is required. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
MarcZX10 commented 2026-11-22 12:01:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T12:01:08Z.

Review: COMMENTED


Reviewed — comments

The changed shader paths appear consistent with the stated wave reduction, but the reported checks were not rerun in this review.

What I ran

Reviewed head 2c146f63cb3a2a9a7c5a0ef86e4d022324a44b2d using repo_read.py; no tests or builds were run.

Results

Check Result Note
Changed code review passed Six changed files inspected
Tests and build not run Description reports author-run tests

Findings

Blocking

None.

Non-blocking

The reported focused and suite results are useful context, but were not independently verified in this review.

Not verified

The author-reported Windows GPU tests and convention check were not run here. files.json was not available from the review folder, so the excluded-file list could not be independently checked. The full text of VulkanDevice.cpp was excluded by the review-folder size rule; its changed section was read through repo_read.py.

To get this to a good state

Nothing is required. The reported test results remain author-supplied.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6012097536 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/25609#pullrequestreview-6012097536). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-22T12:01:08Z. **Review:** COMMENTED --- # Reviewed — comments The changed shader paths appear consistent with the stated wave reduction, but the reported checks were not rerun in this review. ## What I ran Reviewed head `2c146f63cb3a2a9a7c5a0ef86e4d022324a44b2d` using `repo_read.py`; no tests or builds were run. ## Results | Check | Result | Note | |---|---|---| | Changed code review | passed | Six changed files inspected | | Tests and build | not run | Description reports author-run tests | ## Findings ### Blocking None. ### Non-blocking The reported focused and suite results are useful context, but were not independently verified in this review. ## Not verified The author-reported Windows GPU tests and convention check were not run here. `files.json` was not available from the review folder, so the excluded-file list could not be independently checked. The full text of `VulkanDevice.cpp` was excluded by the review-folder size rule; its changed section was read through `repo_read.py`. ## To get this to a good state Nothing is required. The reported test results remain author-supplied.
MarcZX10 commented 2026-11-22 16:40:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T16:40:21Z.

Review: APPROVED


Reviewed — looks good

The reviewed changes at head a862e5fbb94c6f5399eeabcf79236e8019fc8d07 look consistent with the stated wave-sum and fallback behavior; the supplied test reports were not run by me.

What I ran

No commands or tests were run. I inspected the prepared diff and targeted source ranges using repo_read.py.

Results

Check Result Note
Diff and targeted source review passed Relevant logic inspected
Tests and conventions not run Results are author-reported

Findings

Blocking

None.

Non-blocking

None.

Not verified

I read description.md, commits.md, manifest.json, diff.patch, and targeted ranges in SpirvSubgroup.cpp, SpirvAluEmitterMath.cpp, SpirvMemoryInstructions.cpp, SpirvAnalysis.cpp, ShaderValidation.cpp, and VulkanDevice.cpp. Full text for VulkanDevice.cpp and ShaderMemory.cpp was excluded from the review folder; their relevant hunks were inspected in the diff, but their surrounding source was not verified. I did not run tests or verify the author-reported hardware results.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6013311852 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/25609#pullrequestreview-6013311852). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-22T16:40:21Z. **Review:** APPROVED --- # Reviewed — looks good The reviewed changes at head `a862e5fbb94c6f5399eeabcf79236e8019fc8d07` look consistent with the stated wave-sum and fallback behavior; the supplied test reports were not run by me. ## What I ran No commands or tests were run. I inspected the prepared diff and targeted source ranges using `repo_read.py`. ## Results | Check | Result | Note | |---|---|---| | Diff and targeted source review | passed | Relevant logic inspected | | Tests and conventions | not run | Results are author-reported | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified I read `description.md`, `commits.md`, `manifest.json`, `diff.patch`, and targeted ranges in `SpirvSubgroup.cpp`, `SpirvAluEmitterMath.cpp`, `SpirvMemoryInstructions.cpp`, `SpirvAnalysis.cpp`, `ShaderValidation.cpp`, and `VulkanDevice.cpp`. Full text for `VulkanDevice.cpp` and `ShaderMemory.cpp` was excluded from the review folder; their relevant hunks were inspected in the diff, but their surrounding source was not verified. I did not run tests or verify the author-reported hardware results. ## To get this to a good state Nothing is required.
MarcZX10 commented 2026-11-23 10:05:20 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-23T10:05:20Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this change based on the source reviewed; the author-reported focused and suite runs are consistent with the implementation.

What I ran

Reviewed head 83006373c836d032feed2a31e9fdbf80e44439b4 using repo_read.py access to the prepared diff and pinned repository sources. No tests or build commands were run.

Results

Check Result Note
Shader lowering and fallback paths passed Wave and subgroup guards are present
Added regression tests passed SPIR-V paths and shared subgroup behavior are checked
Build and runtime tests not run Results in the description are author-reported

Findings

Blocking

None.

Non-blocking

None.

Not verified

The full text of core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp and core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp was excluded from the review folder; their changed hunks were read in diff.patch. All other changed files marked included: true in manifest.json were read at relevant ranges. Build, test execution, and the author-reported hardware results were not independently verified.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6019663599 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/25609#pullrequestreview-6019663599). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-23T10:05:20Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this change based on the source reviewed; the author-reported focused and suite runs are consistent with the implementation. ## What I ran Reviewed head `83006373c836d032feed2a31e9fdbf80e44439b4` using `repo_read.py` access to the prepared diff and pinned repository sources. No tests or build commands were run. ## Results | Check | Result | Note | |---|---|---| | Shader lowering and fallback paths | passed | Wave and subgroup guards are present | | Added regression tests | passed | SPIR-V paths and shared subgroup behavior are checked | | Build and runtime tests | not run | Results in the description are author-reported | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified The full text of `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp` and `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` was excluded from the review folder; their changed hunks were read in `diff.patch`. All other changed files marked `included: true` in `manifest.json` were read at relevant ranges. Build, test execution, and the author-reported hardware results were not independently verified. ## To get this to a good state Nothing is required.
MarcZX10 commented 2026-11-28 10:40:22 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-28T10:40:22Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this change; the points below are optional.

What I ran

Read the prepared diff and targeted source at head dacb31af55fb8a3dd44798a93aa45b9b4d6e1f09 using repo_read.py. No build, tests, or precheck were run during this review.

Results

Check Result Note
Patch and targeted source review passed Shader path, requirements analysis, and test registration inspected
Build and tests not run The PR description reports author-run tests

Findings

Blocking

None.

Non-blocking

None.

Not verified

core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp was read only around its changed sections; its remaining contents were not read. The description's reported test runs were not independently reproduced. All other changed files listed as reviewed in the manifest were read, including ReadFirstLaneSharedSubgroup.cpp; its appearance in the execution test source listing confirms registration through the existing CMake source glob. Files excluded by the prepared review include ShaderMemory.cpp's full text because it was too large for the review folder; files.json was not available through the reader.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6097276610 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/25609#pullrequestreview-6097276610). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-28T10:40:22Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this change; the points below are optional. ## What I ran Read the prepared diff and targeted source at head `dacb31af55fb8a3dd44798a93aa45b9b4d6e1f09` using `repo_read.py`. No build, tests, or precheck were run during this review. ## Results | Check | Result | Note | |---|---|---| | Patch and targeted source review | passed | Shader path, requirements analysis, and test registration inspected | | Build and tests | not run | The PR description reports author-run tests | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` was read only around its changed sections; its remaining contents were not read. The description's reported test runs were not independently reproduced. All other changed files listed as reviewed in the manifest were read, including `ReadFirstLaneSharedSubgroup.cpp`; its appearance in the execution test source listing confirms registration through the existing CMake source glob. Files excluded by the prepared review include `ShaderMemory.cpp`'s full text because it was too large for the review folder; `files.json` was not available through the reader. ## To get this to a good state Nothing is required.
Plyxen commented 2026-12-03 14:02:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Plyxen on 2026-12-03T14:02:30Z.

Review: APPROVED


I read the diff at dacb31af55. Windows 11, GCC 15.2, merged into main at 6c6b29320fe together with other open PRs (so not an isolated build), with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 and VK_LAYER_KHRONOS_validation on an RTX 5080 (621.24) and a Radeon iGPU (26.11.2).

  • agc_driver_read_first_lane_shared_subgroup, agc_shader_readfirstlane_wave_sum and agc_shader_memory: pass on both GPUs. The loader log shows the layer inserted and no "was not found" line, and neither run has a VUID- or SYNC-HAZARD line.
  • Control (the same tree with only this PR's source change taken out): agc_shader_memory and agc_shader_readfirstlane_wave_sum fail, the first with "the neighbour-read test did not retain its cross-lane read".

Not checked: a title.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6171281860 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/25609#pullrequestreview-6171281860). Originally posted by [Plyxen](https://github.com/Plyxen) on 2026-12-03T14:02:30Z. **Review:** APPROVED --- I read the diff at `dacb31af55`. Windows 11, GCC 15.2, merged into `main` at `6c6b29320fe` together with other open PRs (so not an isolated build), with `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1` and `VK_LAYER_KHRONOS_validation` on an RTX 5080 (621.24) and a Radeon iGPU (26.11.2). - `agc_driver_read_first_lane_shared_subgroup`, `agc_shader_readfirstlane_wave_sum` and `agc_shader_memory`: pass on both GPUs. The loader log shows the layer inserted and no "was not found" line, and neither run has a `VUID-` or `SYNC-HAZARD` line. - Control (the same tree with only this PR's source change taken out): `agc_shader_memory` and `agc_shader_readfirstlane_wave_sum` fail, the first with "the neighbour-read test did not retain its cross-lane read". Not checked: a title. AI-assisted: yes (Claude Code)
ligmaSec commented 2026-12-03 21:31:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T21:31:37Z.

Review: COMMENTED


The reduction keeps only the elected lane's 32-bit contribution, and WaveSumUsable keeps it within a guest wave when two Wave32s share a host subgroup. The new shared-subgroup fixture is the right control for accidental cross-wave selection. Please include that fixture's execution status and selected host width in the test report, since hardware without a qualifying subgroup may skip it. The paired shader and pixel-helper tests and the new overlap fixture are queued on lavapipe.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6178956383 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/25609#pullrequestreview-6178956383). Originally posted by [ligmaSec](https://github.com/ligmaSec) on 2026-12-03T21:31:37Z. **Review:** COMMENTED --- The reduction keeps only the elected lane's 32-bit contribution, and `WaveSumUsable` keeps it within a guest wave when two Wave32s share a host subgroup. The new shared-subgroup fixture is the right control for accidental cross-wave selection. Please include that fixture's execution status and selected host width in the test report, since hardware without a qualifying subgroup may skip it. The paired shader and pixel-helper tests and the new overlap fixture are queued on lavapipe. AI-assisted: yes.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/25609:upstream-pr/25609'
git switch 'upstream-pr/25609'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/25609'
git switch 'upstream-pr/25609'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/25609'
git switch 'upstream-pr/25609'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/25609'
git switch 'main'
git merge --squash 'upstream-pr/25609'
git switch 'main'
git merge --ff-only 'upstream-pr/25609'
git switch 'main'
git merge 'upstream-pr/25609'
git push origin 'main'
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!25609
No description provided.