perf(shader): let spanned waves run at any host subgroup size where it can be narrower than 32 #8004

Merged
ThatsLeo merged 7 commits from upstream-pr/8004 into main 2026-11-16 05:35:47 +00:00
ThatsLeo commented 2026-10-19 17:19:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ThatsLeo on 2026-10-19T17:19:41Z.


What

#7922 spans a single-wave wave64 compute program over full 32-lane host subgroups, pinned with a required subgroup size of 32. On Intel that pin forces SIMD32, where every 32-bit value takes twice the registers of SIMD16.

Stray's (PPSA02101) dominant compute program 0x2011300000 is about 80% of the GPU time of a frame once it spans. ANV reports it as 81,332 instructions with 1,095 spills, 6,959 fills and 420 live registers at the peak.

On a device whose compute subgroups can be narrower than 32 lanes (minSubgroupSize < 32), a spanned wave now leaves the width to the driver:

  • Lane numbering. The lane is LocalInvocationIndex, which is the guest lane because a spanned module declares a 64×1×1 workgroup. It was SubgroupId * 32 + SubgroupLocalInvocationId.
  • Shuffles. A shuffle within a 32-lane half (EmitSubgroupShuffleInHalf) goes through the wave_exchange slots that full-wave shuffles already use. The barriers it adds are covered by #7922's uniformity check. Ballots, full-wave shuffles and the LDS lock loop were already independent of the host subgroup width.
  • Pipeline. SpirvEmitInfo::anySubgroupSize gives the artifact a host subgroup size of 0, so computeSubgroupSize requests no size and the pipeline is created with REQUIRE_FULL_SUBGROUPS | ALLOW_VARYING_SUBGROUP_SIZE. A 64-lane workgroup is a multiple of every maxSubgroupSize. Compute pipeline captures accept that pair of flags without a required size, and replay checks computeFullSubgroups for it.
  • Target. VulkanDevice sets the new SpirvTarget::spannedAnySubgroup only where spanning is on and minSubgroupSize < 32. NVIDIA (32 only) and AMD (32 or 64) keep the pinned 32-lane layout, where the in-half shuffle stays a subgroup shuffle. The flag is part of the cache key and of the serialized request, as version 45, after main's version 43 point fields and version 44 fusedExactArithmetic.

Tested

Intel Arc (Meteor Lake), Mesa 26.2.4 ANV, Fedora 44, Linux 7.2.10, GCC 16.2.1, Release.

  • Shader statistics. APS5_PIPELINE_STATS=1 on Stray: the largest compute executables now compile at SIMD8 or SIMD16 with no spills:

    • 38,481 instructions, SIMD8, 108 live registers;
    • 23,919 instructions, SIMD8;
    • 17,166 instructions, SIMD16.

    0x2011300000 takes about 29 ms per dispatch in APS5_PROFILE_GPU, against about 100 ms with #7922 alone.

  • ctest on main 04078b107 + #7922 + this PR:

    • Arc: 1628 of 1634 pass;
    • lavapipe: 1631 of 1634 pass;
    • the failures are the same ones #7922 lists, which also fail with spanning off.

    request_serializer and agc_shader_memory cover version 38, a version 37 request read without the flag, and the cache key. agc_compute_pipeline_capture covers the new flag pair and rejects it with a required size. agc_driver_lds_mask_waterfall passes.

    • After rebasing onto main 57fdffd91:
      • Arc: 1743 of 1749 pass. The six failures also fail on main: application_heap_scripting, application_heap_lazy, agc_driver_f64_rounding_denormal_modes, agc_driver_guest_memory_lifetime, agc_driver_mesh_barycentric_emulation and agc_driver_multisample_retirement.
      • lavapipe: 1747 of 1749 pass; only the two application_heap tests fail.
      • Validation layer: the 54 tests matching spanned|request_serializer|agc_shader_memory|compute_pipeline_capture|lds|ballot|wave|subgroup|readlane|dpp|permlane|denormal_flush|shader_disk_cache|guarded pass with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, as the ones that exist on main do there. Neither log has a VUID- error or a missing-layer line.
      • agc_shader_memory and request_serializer also read requests of earlier versions from main, up to version 44, which have no spannedAnySubgroup byte.
  • Stray, frames 20 to 50 of the boot (APS5_TRACE_FRAMES=20:30, 3840x2160). The builds are #7922 + #7811, against #7922 + this PR + #7811; Stray needs #7811 to start (#7693). Three interleaved rounds after one warm run each, every capture started below 55 °C:

GPU busy per present (ms) frame p50 (ms)
#7922 + #7811 179.0 / 176.8 / 175.7 (mean 177.2) 344.4 / 347.1 / 346.7 (mean 346.1)
#7922 + this PR + #7811 99.8 / 103.9 / 107.5 (mean 103.8) 284.7 / 275.8 / 282.7 (mean 281.1)

That is −41% GPU time and −19% frame time. Against main + #7811 in #7922's runs (303.4 ms GPU, 449.3 ms p50), the two PRs together are −66% and −37%.

trace_digest.py, first capture of each:

#7922:   frames 20:30 from present 20: 30 presents, frame p50 344.4 / p90 362.8 / p99 365.6 / max 365.6 ms, GPU busy 179.0 ms per present
this PR: frames 20:30 from present 20: 30 presents, frame p50 284.7 / p90 293.6 / p99 301.3 / max 301.3 ms, GPU busy 99.8 ms per present

aps5-summary.jsonl lines, #7922 + #7811:

{"commit":"128b8c1f83c0","dirty":false,"env":{"APS5_PLAYGO_UNLISTED_CHUNKS":"absent","APS5_TRACE_FRAMES":"20:30"},"gpu":"Intel(R) Arc(tm) Graphics (MTL)","driver":"Intel open-source Mesa driver Mesa 26.2.4","os":"Linux 7.2.10-200.fc44.x86_64","resolution":"3840x2160","window":{"spec":"frames 20:30","first_present":20,"ms":10402.197},"presents":30,"frame_ms":{"p50":344.354,"p90":362.838,"p99":365.594,"max":365.594},"gpu_busy_ms_per_present":178.992,"worker_busy_pct":{"queue worker 0x0":95.230,"queue worker 0x20":96.701},"top_phases_ms_per_frame":{"Driver.Packet":662.800,"Driver.Packet.memory_wait":311.063,"Driver.Packet.device_lock":196.200,"Graphics.Draw":118.353,"Graphics.Draw.draw_and_resource_release":117.932,"Recorder.Submit":110.774,"Driver.Packet.dispatch":72.540,"Driver.Dispatch":66.705},"trace_dropped":false,"trace":"aps5-trace-128b8c1f83c0-1108566.json.gz"}
{"commit":"128b8c1f83c0","dirty":false,"env":{"APS5_PLAYGO_UNLISTED_CHUNKS":"absent","APS5_TRACE_FRAMES":"20:30"},"gpu":"Intel(R) Arc(tm) Graphics (MTL)","driver":"Intel open-source Mesa driver Mesa 26.2.4","os":"Linux 7.2.10-200.fc44.x86_64","resolution":"3840x2160","window":{"spec":"frames 20:30","first_present":20,"ms":10438.627},"presents":30,"frame_ms":{"p50":347.138,"p90":357.715,"p99":395.051,"max":395.051},"gpu_busy_ms_per_present":176.764,"worker_busy_pct":{"queue worker 0x0":95.368,"queue worker 0x20":97.001},"top_phases_ms_per_frame":{"Driver.Packet":665.606,"Driver.Packet.memory_wait":310.399,"Driver.Packet.device_lock":200.406,"Graphics.Draw":120.733,"Graphics.Draw.draw_and_resource_release":120.266,"Recorder.Submit":110.327,"Driver.Packet.dispatch":74.144,"Driver.Dispatch":69.392},"trace_dropped":false,"trace":"aps5-trace-128b8c1f83c0-1111466.json.gz"}
{"commit":"128b8c1f83c0","dirty":false,"env":{"APS5_PLAYGO_UNLISTED_CHUNKS":"absent","APS5_TRACE_FRAMES":"20:30"},"gpu":"Intel(R) Arc(tm) Graphics (MTL)","driver":"Intel open-source Mesa driver Mesa 26.2.4","os":"Linux 7.2.10-200.fc44.x86_64","resolution":"3840x2160","window":{"spec":"frames 20:30","first_present":20,"ms":10396.704},"presents":30,"frame_ms":{"p50":346.716,"p90":358.377,"p99":366.846,"max":366.846},"gpu_busy_ms_per_present":175.747,"worker_busy_pct":{"queue worker 0x0":95.259,"queue worker 0x20":96.709},"top_phases_ms_per_frame":{"Driver.Packet":662.152,"Driver.Packet.memory_wait":304.406,"Driver.Packet.device_lock":200.733,"Graphics.Draw":117.667,"Graphics.Draw.draw_and_resource_release":117.215,"Recorder.Submit":112.674,"Driver.Packet.dispatch":78.631,"Driver.Dispatch":74.962},"trace_dropped":false,"trace":"aps5-trace-128b8c1f83c0-1113851.json.gz"}

#7922 + this PR + #7811:

{"commit":"3c286f2aaa91","dirty":false,"env":{"APS5_PLAYGO_UNLISTED_CHUNKS":"absent","APS5_TRACE_FRAMES":"20:30"},"gpu":"Intel(R) Arc(tm) Graphics (MTL)","driver":"Intel open-source Mesa driver Mesa 26.2.4","os":"Linux 7.2.10-200.fc44.x86_64","resolution":"3840x2160","window":{"spec":"frames 20:30","first_present":20,"ms":8502.341},"presents":30,"frame_ms":{"p50":284.666,"p90":293.569,"p99":301.329,"max":301.329},"gpu_busy_ms_per_present":99.842,"worker_busy_pct":{"queue worker 0x0":95.453,"queue worker 0x20":96.606},"top_phases_ms_per_frame":{"Driver.Packet":541.345,"Driver.Packet.memory_wait":242.369,"Driver.Packet.device_lock":172.983,"Graphics.Draw":109.737,"Graphics.Draw.draw_and_resource_release":109.328,"Recorder.Submit":86.761,"Driver.Packet.dispatch":77.395,"Driver.Dispatch":59.959},"trace_dropped":false,"trace":"aps5-trace-3c286f2aaa91-1110129.json.gz"}
{"commit":"3c286f2aaa91","dirty":false,"env":{"APS5_PLAYGO_UNLISTED_CHUNKS":"absent","APS5_TRACE_FRAMES":"20:30"},"gpu":"Intel(R) Arc(tm) Graphics (MTL)","driver":"Intel open-source Mesa driver Mesa 26.2.4","os":"Linux 7.2.10-200.fc44.x86_64","resolution":"3840x2160","window":{"spec":"frames 20:30","first_present":20,"ms":8295.347},"presents":30,"frame_ms":{"p50":275.827,"p90":287.420,"p99":298.300,"max":298.300},"gpu_busy_ms_per_present":103.936,"worker_busy_pct":{"queue worker 0x0":95.021,"queue worker 0x20":96.792},"top_phases_ms_per_frame":{"Driver.Packet":526.752,"Driver.Packet.memory_wait":230.941,"Driver.Packet.device_lock":175.752,"Graphics.Draw":109.682,"Graphics.Draw.draw_and_resource_release":109.304,"Recorder.Submit":84.958,"Driver.Packet.dispatch":77.214,"Driver.Dispatch":56.640},"trace_dropped":false,"trace":"aps5-trace-3c286f2aaa91-1112745.json.gz"}
{"commit":"3c286f2aaa91","dirty":false,"env":{"APS5_PLAYGO_UNLISTED_CHUNKS":"absent","APS5_TRACE_FRAMES":"20:30"},"gpu":"Intel(R) Arc(tm) Graphics (MTL)","driver":"Intel open-source Mesa driver Mesa 26.2.4","os":"Linux 7.2.10-200.fc44.x86_64","resolution":"3840x2160","window":{"spec":"frames 20:30","first_present":20,"ms":8485.135},"presents":30,"frame_ms":{"p50":282.685,"p90":298.537,"p99":299.527,"max":299.527},"gpu_busy_ms_per_present":107.481,"worker_busy_pct":{"queue worker 0x0":94.914,"queue worker 0x20":97.470},"top_phases_ms_per_frame":{"Driver.Packet":540.337,"Driver.Packet.memory_wait":237.203,"Driver.Packet.device_lock":173.253,"Graphics.Draw":109.525,"Graphics.Draw.draw_and_resource_release":109.133,"Recorder.Submit":88.988,"Driver.Packet.dispatch":82.072,"Driver.Dispatch":62.017},"trace_dropped":false,"trace":"aps5-trace-3c286f2aaa91-1115056.json.gz"}

Traces, digests and summaries: ThatsLeo:evidence/spanned-any-subgroup.

Runs by others, on earlier heads:

  • @wachi35676 ran the GPU tests on an RTX 5070 Ti and a Radeon iGPU (Windows), also forcing the any-subgroup path, with no new failures.
  • @CPritch measured GTA V on an RTX 5060 (Linux): frame p50 from 81.4 / 81.3 ms on main to 76.5 / 75.8 ms with #7922 and this PR.

Not tested: other Intel GPUs, and other titles on the Arc.

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: #7922
  • Fixes: none
  • Unblocks: none
  • GPUs tested: Intel Arc (Meteor Lake), Mesa 26.2.4 ANV, Linux; lavapipe (Mesa 26.2.4), Linux
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4924698856 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8004). Originally posted by [ThatsLeo](https://github.com/ThatsLeo) on 2026-10-19T17:19:41Z. --- ### What #7922 spans a single-wave wave64 compute program over full 32-lane host subgroups, pinned with a required subgroup size of 32. On Intel that pin forces SIMD32, where every 32-bit value takes twice the registers of SIMD16. Stray's (PPSA02101) dominant compute program `0x2011300000` is about 80% of the GPU time of a frame once it spans. ANV reports it as 81,332 instructions with 1,095 spills, 6,959 fills and 420 live registers at the peak. On a device whose compute subgroups can be narrower than 32 lanes (`minSubgroupSize < 32`), a spanned wave now leaves the width to the driver: - **Lane numbering.** The lane is `LocalInvocationIndex`, which is the guest lane because a spanned module declares a 64×1×1 workgroup. It was `SubgroupId * 32 + SubgroupLocalInvocationId`. - **Shuffles.** A shuffle within a 32-lane half (`EmitSubgroupShuffleInHalf`) goes through the `wave_exchange` slots that full-wave shuffles already use. The barriers it adds are covered by #7922's uniformity check. Ballots, full-wave shuffles and the LDS lock loop were already independent of the host subgroup width. - **Pipeline.** `SpirvEmitInfo::anySubgroupSize` gives the artifact a host subgroup size of 0, so `computeSubgroupSize` requests no size and the pipeline is created with `REQUIRE_FULL_SUBGROUPS | ALLOW_VARYING_SUBGROUP_SIZE`. A 64-lane workgroup is a multiple of every `maxSubgroupSize`. Compute pipeline captures accept that pair of flags without a required size, and replay checks `computeFullSubgroups` for it. - **Target.** `VulkanDevice` sets the new `SpirvTarget::spannedAnySubgroup` only where spanning is on and `minSubgroupSize < 32`. NVIDIA (32 only) and AMD (32 or 64) keep the pinned 32-lane layout, where the in-half shuffle stays a subgroup shuffle. The flag is part of the cache key and of the serialized request, as version 45, after `main`'s version 43 point fields and version 44 `fusedExactArithmetic`. ### Tested Intel Arc (Meteor Lake), Mesa 26.2.4 ANV, Fedora 44, Linux 7.2.10, GCC 16.2.1, Release. - **Shader statistics.** `APS5_PIPELINE_STATS=1` on Stray: the largest compute executables now compile at SIMD8 or SIMD16 with no spills: - 38,481 instructions, SIMD8, 108 live registers; - 23,919 instructions, SIMD8; - 17,166 instructions, SIMD16. `0x2011300000` takes about 29 ms per dispatch in `APS5_PROFILE_GPU`, against about 100 ms with #7922 alone. - **`ctest`** on `main` `04078b107` + #7922 + this PR: - **Arc:** 1628 of 1634 pass; - **lavapipe:** 1631 of 1634 pass; - the failures are the same ones #7922 lists, which also fail with spanning off. `request_serializer` and `agc_shader_memory` cover version 38, a version 37 request read without the flag, and the cache key. `agc_compute_pipeline_capture` covers the new flag pair and rejects it with a required size. `agc_driver_lds_mask_waterfall` passes. - **After rebasing onto `main` `57fdffd91`:** - **Arc:** 1743 of 1749 pass. The six failures also fail on `main`: `application_heap_scripting`, `application_heap_lazy`, `agc_driver_f64_rounding_denormal_modes`, `agc_driver_guest_memory_lifetime`, `agc_driver_mesh_barycentric_emulation` and `agc_driver_multisample_retirement`. - **lavapipe:** 1747 of 1749 pass; only the two `application_heap` tests fail. - **Validation layer:** the 54 tests matching `spanned|request_serializer|agc_shader_memory|compute_pipeline_capture|lds|ballot|wave|subgroup|readlane|dpp|permlane|denormal_flush|shader_disk_cache|guarded` pass with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1` and `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, as the ones that exist on `main` do there. Neither log has a `VUID-` error or a missing-layer line. - `agc_shader_memory` and `request_serializer` also read requests of earlier versions from `main`, up to version 44, which have no `spannedAnySubgroup` byte. - **Stray, frames 20 to 50 of the boot** (`APS5_TRACE_FRAMES=20:30`, 3840x2160). The builds are #7922 + #7811, against #7922 + this PR + #7811; Stray needs #7811 to start (#7693). Three interleaved rounds after one warm run each, every capture started below 55 °C: | | GPU busy per present (ms) | frame p50 (ms) | |---|---|---| | #7922 + #7811 | 179.0 / 176.8 / 175.7 (mean 177.2) | 344.4 / 347.1 / 346.7 (mean 346.1) | | #7922 + this PR + #7811 | 99.8 / 103.9 / 107.5 (mean 103.8) | 284.7 / 275.8 / 282.7 (mean 281.1) | That is −41% GPU time and −19% frame time. Against `main` + #7811 in #7922's runs (303.4 ms GPU, 449.3 ms p50), the two PRs together are −66% and −37%. `trace_digest.py`, first capture of each: ``` #7922: frames 20:30 from present 20: 30 presents, frame p50 344.4 / p90 362.8 / p99 365.6 / max 365.6 ms, GPU busy 179.0 ms per present this PR: frames 20:30 from present 20: 30 presents, frame p50 284.7 / p90 293.6 / p99 301.3 / max 301.3 ms, GPU busy 99.8 ms per present ``` `aps5-summary.jsonl` lines, #7922 + #7811: ```json {"commit":"128b8c1f83c0","dirty":false,"env":{"APS5_PLAYGO_UNLISTED_CHUNKS":"absent","APS5_TRACE_FRAMES":"20:30"},"gpu":"Intel(R) Arc(tm) Graphics (MTL)","driver":"Intel open-source Mesa driver Mesa 26.2.4","os":"Linux 7.2.10-200.fc44.x86_64","resolution":"3840x2160","window":{"spec":"frames 20:30","first_present":20,"ms":10402.197},"presents":30,"frame_ms":{"p50":344.354,"p90":362.838,"p99":365.594,"max":365.594},"gpu_busy_ms_per_present":178.992,"worker_busy_pct":{"queue worker 0x0":95.230,"queue worker 0x20":96.701},"top_phases_ms_per_frame":{"Driver.Packet":662.800,"Driver.Packet.memory_wait":311.063,"Driver.Packet.device_lock":196.200,"Graphics.Draw":118.353,"Graphics.Draw.draw_and_resource_release":117.932,"Recorder.Submit":110.774,"Driver.Packet.dispatch":72.540,"Driver.Dispatch":66.705},"trace_dropped":false,"trace":"aps5-trace-128b8c1f83c0-1108566.json.gz"} {"commit":"128b8c1f83c0","dirty":false,"env":{"APS5_PLAYGO_UNLISTED_CHUNKS":"absent","APS5_TRACE_FRAMES":"20:30"},"gpu":"Intel(R) Arc(tm) Graphics (MTL)","driver":"Intel open-source Mesa driver Mesa 26.2.4","os":"Linux 7.2.10-200.fc44.x86_64","resolution":"3840x2160","window":{"spec":"frames 20:30","first_present":20,"ms":10438.627},"presents":30,"frame_ms":{"p50":347.138,"p90":357.715,"p99":395.051,"max":395.051},"gpu_busy_ms_per_present":176.764,"worker_busy_pct":{"queue worker 0x0":95.368,"queue worker 0x20":97.001},"top_phases_ms_per_frame":{"Driver.Packet":665.606,"Driver.Packet.memory_wait":310.399,"Driver.Packet.device_lock":200.406,"Graphics.Draw":120.733,"Graphics.Draw.draw_and_resource_release":120.266,"Recorder.Submit":110.327,"Driver.Packet.dispatch":74.144,"Driver.Dispatch":69.392},"trace_dropped":false,"trace":"aps5-trace-128b8c1f83c0-1111466.json.gz"} {"commit":"128b8c1f83c0","dirty":false,"env":{"APS5_PLAYGO_UNLISTED_CHUNKS":"absent","APS5_TRACE_FRAMES":"20:30"},"gpu":"Intel(R) Arc(tm) Graphics (MTL)","driver":"Intel open-source Mesa driver Mesa 26.2.4","os":"Linux 7.2.10-200.fc44.x86_64","resolution":"3840x2160","window":{"spec":"frames 20:30","first_present":20,"ms":10396.704},"presents":30,"frame_ms":{"p50":346.716,"p90":358.377,"p99":366.846,"max":366.846},"gpu_busy_ms_per_present":175.747,"worker_busy_pct":{"queue worker 0x0":95.259,"queue worker 0x20":96.709},"top_phases_ms_per_frame":{"Driver.Packet":662.152,"Driver.Packet.memory_wait":304.406,"Driver.Packet.device_lock":200.733,"Graphics.Draw":117.667,"Graphics.Draw.draw_and_resource_release":117.215,"Recorder.Submit":112.674,"Driver.Packet.dispatch":78.631,"Driver.Dispatch":74.962},"trace_dropped":false,"trace":"aps5-trace-128b8c1f83c0-1113851.json.gz"} ``` #7922 + this PR + #7811: ```json {"commit":"3c286f2aaa91","dirty":false,"env":{"APS5_PLAYGO_UNLISTED_CHUNKS":"absent","APS5_TRACE_FRAMES":"20:30"},"gpu":"Intel(R) Arc(tm) Graphics (MTL)","driver":"Intel open-source Mesa driver Mesa 26.2.4","os":"Linux 7.2.10-200.fc44.x86_64","resolution":"3840x2160","window":{"spec":"frames 20:30","first_present":20,"ms":8502.341},"presents":30,"frame_ms":{"p50":284.666,"p90":293.569,"p99":301.329,"max":301.329},"gpu_busy_ms_per_present":99.842,"worker_busy_pct":{"queue worker 0x0":95.453,"queue worker 0x20":96.606},"top_phases_ms_per_frame":{"Driver.Packet":541.345,"Driver.Packet.memory_wait":242.369,"Driver.Packet.device_lock":172.983,"Graphics.Draw":109.737,"Graphics.Draw.draw_and_resource_release":109.328,"Recorder.Submit":86.761,"Driver.Packet.dispatch":77.395,"Driver.Dispatch":59.959},"trace_dropped":false,"trace":"aps5-trace-3c286f2aaa91-1110129.json.gz"} {"commit":"3c286f2aaa91","dirty":false,"env":{"APS5_PLAYGO_UNLISTED_CHUNKS":"absent","APS5_TRACE_FRAMES":"20:30"},"gpu":"Intel(R) Arc(tm) Graphics (MTL)","driver":"Intel open-source Mesa driver Mesa 26.2.4","os":"Linux 7.2.10-200.fc44.x86_64","resolution":"3840x2160","window":{"spec":"frames 20:30","first_present":20,"ms":8295.347},"presents":30,"frame_ms":{"p50":275.827,"p90":287.420,"p99":298.300,"max":298.300},"gpu_busy_ms_per_present":103.936,"worker_busy_pct":{"queue worker 0x0":95.021,"queue worker 0x20":96.792},"top_phases_ms_per_frame":{"Driver.Packet":526.752,"Driver.Packet.memory_wait":230.941,"Driver.Packet.device_lock":175.752,"Graphics.Draw":109.682,"Graphics.Draw.draw_and_resource_release":109.304,"Recorder.Submit":84.958,"Driver.Packet.dispatch":77.214,"Driver.Dispatch":56.640},"trace_dropped":false,"trace":"aps5-trace-3c286f2aaa91-1112745.json.gz"} {"commit":"3c286f2aaa91","dirty":false,"env":{"APS5_PLAYGO_UNLISTED_CHUNKS":"absent","APS5_TRACE_FRAMES":"20:30"},"gpu":"Intel(R) Arc(tm) Graphics (MTL)","driver":"Intel open-source Mesa driver Mesa 26.2.4","os":"Linux 7.2.10-200.fc44.x86_64","resolution":"3840x2160","window":{"spec":"frames 20:30","first_present":20,"ms":8485.135},"presents":30,"frame_ms":{"p50":282.685,"p90":298.537,"p99":299.527,"max":299.527},"gpu_busy_ms_per_present":107.481,"worker_busy_pct":{"queue worker 0x0":94.914,"queue worker 0x20":97.470},"top_phases_ms_per_frame":{"Driver.Packet":540.337,"Driver.Packet.memory_wait":237.203,"Driver.Packet.device_lock":173.253,"Graphics.Draw":109.525,"Graphics.Draw.draw_and_resource_release":109.133,"Recorder.Submit":88.988,"Driver.Packet.dispatch":82.072,"Driver.Dispatch":62.017},"trace_dropped":false,"trace":"aps5-trace-3c286f2aaa91-1115056.json.gz"} ``` Traces, digests and summaries: [`ThatsLeo:evidence/spanned-any-subgroup`](https://github.com/ThatsLeo/AnyPS5/tree/evidence/spanned-any-subgroup). **Runs by others, on earlier heads:** - @wachi35676 ran the GPU tests on an RTX 5070 Ti and a Radeon iGPU (Windows), also forcing the any-subgroup path, with no new failures. - @CPritch measured GTA V on an RTX 5060 (Linux): frame p50 from 81.4 / 81.3 ms on `main` to 76.5 / 75.8 ms with #7922 and this PR. **Not tested:** other Intel GPUs, and other titles on the Arc. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: #7922 - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: Intel Arc (Meteor Lake), Mesa 26.2.4 ANV, Linux; lavapipe (Mesa 26.2.4), Linux - [x] AI-assisted: yes
wachi35676 commented 2026-10-20 01:56:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by wachi35676 on 2026-10-20T01:56:26Z.


Runs on NVIDIA and AMD (the "Not tested" list), plus two problems that block a merge onto current main.

1. Serialization version 38 is already taken on main. dd41527ce (feat(shader): emulate smooth barycentrics on the mesh path, merged after this PR's base 7a015c094) moved RequestSerializer to version 38 and reads a mesh barycentric flag under version >= 38u. This PR also bumps 37 to 38. git merge-tree origin/main 2276a44aa merges RequestSerializer.cpp without a conflict, and the result reads both fields under version 38:

803:    if (version >= 38u && reader.ReadBool()) {                                    // main, mesh barycentrics
868:    if (version < 1u || version > 38u) throw ...
913:    if (version >= 38u) result.request.target.spannedAnySubgroup = reader.ReadBool();  // this PR

A version-38 request that current main writes has no trailing spannedAnySubgroup byte, so this reader would read past its end. I read this from the merged code and didn't run it. The next free version avoids it. (Disclosure: my own open #7410 currently takes 39 for its wave-shared VGPR fields, so whichever lands second moves up one.) RequestSerializerTests.cpp conflicts in the same places, around InsertMeshBarycentricFlag. SpirvSpecialization.cpp from #7922 conflicts with main's WordArena change.

2. spanned_uniformity_tests doesn't link with MinGW. This comes from #7922 and is carried here. At #7922's head 753bb56e3, a Windows MinGW GCC 15.2 Release build stops at:

ld.exe: ...SpannedUniformityTests.cpp.obj:(.data+0x0): undefined reference to `__gxx_personality_v0'
ld.exe: ...SpirvSpannedUniformity.cpp.obj:(.data+0x0): undefined reference to `__gxx_personality_v0'

The neighbouring spirv_validator_exit_tests in the same function adds if(MINGW) target_link_libraries(... PRIVATE libc) and the PATH prepend. With those 5 lines added locally for spanned_uniformity_tests, everything links. The runs below use that local fix.

3. Runs. Windows 11 26300, MinGW GCC 15.2 Release, on the PR's own base: #7922 head 753bb56e3 against this PR head 2276a44aa (#7922 + this PR). GPUs: RTX 5070 Ti (NVIDIA 617.42) and Ryzen 5 9600X Radeon iGPU (ANYPS5_GPU=AMD, 32.0.21042.62), both with ANYPS5_REQUIRE_VULKAN=1. Test set: ctest -R "agc|shader|spirv|recomp|spanned|request_serializer", 814 tests.

build NVIDIA failures AMD failures
#7922 address_passes, pass_input_hazard layered_volume_vertex_no_gpl, draw_cache_reuse_off, stencil_replay_no_gpl
#7922 + this PR pass_input_hazard the same 3
#7922 + this PR, any-subgroup path forced (below) pass_input_hazard the same 3 + agc_trimmed_import

All of these also fail on current main on this machine. spanned_uniformity, request_serializer, agc_compute_pipeline_capture, agc_shader_memory and agc_driver_lds_mask_waterfall pass on both GPUs. Both devices log single-wave wave64 compute spans full subgroups: 1, of any size: 0, so as the PR says, NVIDIA (32 only) and this AMD driver (minSubgroupSize 32) keep the pinned layout.

Forced path. Neither GPU reaches the new code by itself, and lavapipe doesn't either: its computeWave32 is false, so spanning is off there. To run the LocalInvocationIndex lane numbering, the wave_exchange in-half shuffle and the REQUIRE_FULL_SUBGROUPS | ALLOW_VARYING_SUBGROUP_SIZE pipelines on these GPUs, I made a local probe build (not for merge) that also sets spannedAnySubgroup when RVM_FORCE_ANY_SUBGROUP is set. The logs show of any size: 1 on both GPUs. Run with ANYPS5_NO_SHADER_CACHE=1, the same 814 tests have no new failures on either GPU. agc_trimmed_import fails on AMD on main as well. I didn't record which width the AMD driver picked under ALLOW_VARYING_SUBGROUP_SIZE.

Not measured: frame time or GPU time. The perf claim is Intel-only, and NVIDIA and AMD modules don't change by the rule above.

AI-assisted: yes (Claude Code); results above were run on this machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6281518543 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8004#issuecomment-6281518543). Originally posted by [wachi35676](https://github.com/wachi35676) on 2026-10-20T01:56:26Z. --- Runs on NVIDIA and AMD (the "Not tested" list), plus two problems that block a merge onto current main. **1. Serialization version 38 is already taken on main.** `dd41527ce` (feat(shader): emulate smooth barycentrics on the mesh path, merged after this PR's base `7a015c094`) moved `RequestSerializer` to version 38 and reads a mesh barycentric flag under `version >= 38u`. This PR also bumps 37 to 38. `git merge-tree origin/main 2276a44aa` merges `RequestSerializer.cpp` without a conflict, and the result reads both fields under version 38: ``` 803: if (version >= 38u && reader.ReadBool()) { // main, mesh barycentrics 868: if (version < 1u || version > 38u) throw ... 913: if (version >= 38u) result.request.target.spannedAnySubgroup = reader.ReadBool(); // this PR ``` A version-38 request that current main writes has no trailing `spannedAnySubgroup` byte, so this reader would read past its end. I read this from the merged code and didn't run it. The next free version avoids it. (Disclosure: my own open #7410 currently takes 39 for its wave-shared VGPR fields, so whichever lands second moves up one.) `RequestSerializerTests.cpp` conflicts in the same places, around `InsertMeshBarycentricFlag`. `SpirvSpecialization.cpp` from #7922 conflicts with main's `WordArena` change. **2. `spanned_uniformity_tests` doesn't link with MinGW.** This comes from #7922 and is carried here. At #7922's head `753bb56e3`, a Windows MinGW GCC 15.2 Release build stops at: ``` ld.exe: ...SpannedUniformityTests.cpp.obj:(.data+0x0): undefined reference to `__gxx_personality_v0' ld.exe: ...SpirvSpannedUniformity.cpp.obj:(.data+0x0): undefined reference to `__gxx_personality_v0' ``` The neighbouring `spirv_validator_exit_tests` in the same function adds `if(MINGW) target_link_libraries(... PRIVATE libc)` and the `PATH` prepend. With those 5 lines added locally for `spanned_uniformity_tests`, everything links. The runs below use that local fix. **3. Runs.** Windows 11 26300, MinGW GCC 15.2 Release, on the PR's own base: #7922 head `753bb56e3` against this PR head `2276a44aa` (#7922 + this PR). GPUs: RTX 5070 Ti (NVIDIA 617.42) and Ryzen 5 9600X Radeon iGPU (`ANYPS5_GPU=AMD`, 32.0.21042.62), both with `ANYPS5_REQUIRE_VULKAN=1`. Test set: `ctest -R "agc|shader|spirv|recomp|spanned|request_serializer"`, 814 tests. | build | NVIDIA failures | AMD failures | |---|---|---| | #7922 | `address_passes`, `pass_input_hazard` | `layered_volume_vertex_no_gpl`, `draw_cache_reuse_off`, `stencil_replay_no_gpl` | | #7922 + this PR | `pass_input_hazard` | the same 3 | | #7922 + this PR, any-subgroup path forced (below) | `pass_input_hazard` | the same 3 + `agc_trimmed_import` | All of these also fail on current main on this machine. `spanned_uniformity`, `request_serializer`, `agc_compute_pipeline_capture`, `agc_shader_memory` and `agc_driver_lds_mask_waterfall` pass on both GPUs. Both devices log `single-wave wave64 compute spans full subgroups: 1, of any size: 0`, so as the PR says, NVIDIA (32 only) and this AMD driver (`minSubgroupSize` 32) keep the pinned layout. **Forced path.** Neither GPU reaches the new code by itself, and lavapipe doesn't either: its `computeWave32` is false, so spanning is off there. To run the `LocalInvocationIndex` lane numbering, the `wave_exchange` in-half shuffle and the `REQUIRE_FULL_SUBGROUPS | ALLOW_VARYING_SUBGROUP_SIZE` pipelines on these GPUs, I made a local probe build (not for merge) that also sets `spannedAnySubgroup` when `RVM_FORCE_ANY_SUBGROUP` is set. The logs show `of any size: 1` on both GPUs. Run with `ANYPS5_NO_SHADER_CACHE=1`, the same 814 tests have no new failures on either GPU. `agc_trimmed_import` fails on AMD on main as well. I didn't record which width the AMD driver picked under `ALLOW_VARYING_SUBGROUP_SIZE`. Not measured: frame time or GPU time. The perf claim is Intel-only, and NVIDIA and AMD modules don't change by the rule above. AI-assisted: yes (Claude Code); results above were run on this machine.
CPritch commented 2026-10-20 07:23:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by CPritch on 2026-10-20T07:23:39Z.


Ran this on GTA V (PPSA04263 01.010.002), Linux 7.2.8-zen1-2-zen, NVIDIA GeForce RTX 5060 Laptop GPU, NVIDIA 615.71.09, Graphics Mode Performance, the Story prologue after Resume Story, with no input.
main eaa5c9238 against main eaa5c9238 + #8004 at 2276a44aa, same machine and session, two runs each in the order A B A B, window frames 4400:700, caches warm, APS5_TRACE_EVENTS=4194304 (BUILD.md's remedy for full trace buffers), no other APS5_TRACE_* or APS5_PROFILE_* switch, log not redirected. The harness navigates the menus from frame dumps in boot and load to present 4200 (APS5_DUMP_FRAMES=140, every 30 presents), which stop before the window.

Frame p50: main 81.4, 81.3 ms, with #8004 76.5, 75.8 ms (-5.2 ms, -6.4 %). GPU busy per present: 64.7 and 60.2 ms.
This head carries #7922's commit 753bb56e3, so the numbers are #7922 and #8004 together.
Not tested: other scenes, Fidelity mode, other GPUs.
Written with AI assistance (Claude Code); measured on the machine above.

Summary lines (main, then the PR):
{"commit":"eaa5c9238687","dirty":false,"env":{"APS5_DUMP_FRAMES":"140","APS5_DUMP_FRAMES_EVERY":"30","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"","APS5_TRACE_EVENTS":"4194304","APS5_TRACE_FRAMES":"4400:700"},"gpu":"NVIDIA GeForce RTX 5060 Laptop GPU","driver":"NVIDIA 615.71.09","os":"Linux 7.2.8-zen1-2-zen","resolution":"3840x2160","window":{"spec":"frames 4400:700","first_present":4400,"ms":58118.742},"presents":700,"frame_ms":{"p50":81.36,"p90":91.573,"p99":114.238,"max":122.09},"gpu_busy_ms_per_present":64.665,"worker_busy_pct":{"queue worker 0x0":3679.04},"top_phases_ms_per_frame":{"Driver.EndSubmission":2987.559,"Driver.Packet":64.701,"Graphics.Draw":60.931,"Graphics.Draw.draw_and_resource_release":57.172,"Driver.Packet.draw":51.574,"Driver.Draw":51.353,"VideoOut.Flip":25.814,"Driver.Present":25.801},"trace_dropped":false,"trace":"aps5-trace-eaa5c9238687-1093456.json.gz"}
{"commit":"fb3b7487e2be","dirty":false,"env":{"APS5_DUMP_FRAMES":"140","APS5_DUMP_FRAMES_EVERY":"30","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"","APS5_TRACE_EVENTS":"4194304","APS5_TRACE_FRAMES":"4400:700"},"gpu":"NVIDIA GeForce RTX 5060 Laptop GPU","driver":"NVIDIA 615.71.09","os":"Linux 7.2.8-zen1-2-zen","resolution":"3840x2160","window":{"spec":"frames 4400:700","first_present":4400,"ms":54938.319},"presents":700,"frame_ms":{"p50":76.457,"p90":85.706,"p99":107.809,"max":148.413},"gpu_busy_ms_per_present":60.704,"worker_busy_pct":{"queue worker 0x0":3786.492},"top_phases_ms_per_frame":{"Driver.EndSubmission":2905.761,"Driver.Packet":63.588,"Graphics.Draw":55.513,"Graphics.Draw.draw_and_resource_release":51.733,"Driver.Packet.draw":50.213,"Driver.Draw":50.0,"Driver.Draw.shader_compile_and_link":24.464,"Driver.Draw.draw_enqueued":20.516},"trace_dropped":false,"trace":"aps5-trace-fb3b7487e2be-1103783.json.gz"}

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6285667882 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8004#issuecomment-6285667882). Originally posted by [CPritch](https://github.com/CPritch) on 2026-10-20T07:23:39Z. --- Ran this on GTA V (PPSA04263 01.010.002), Linux 7.2.8-zen1-2-zen, NVIDIA GeForce RTX 5060 Laptop GPU, NVIDIA 615.71.09, Graphics Mode Performance, the Story prologue after Resume Story, with no input. main eaa5c9238 against main eaa5c9238 + #8004 at 2276a44aa, same machine and session, two runs each in the order A B A B, window frames 4400:700, caches warm, APS5_TRACE_EVENTS=4194304 (BUILD.md's remedy for full trace buffers), no other APS5_TRACE_* or APS5_PROFILE_* switch, log not redirected. The harness navigates the menus from frame dumps in boot and load to present 4200 (APS5_DUMP_FRAMES=140, every 30 presents), which stop before the window. Frame p50: main 81.4, 81.3 ms, with #8004 76.5, 75.8 ms (-5.2 ms, -6.4 %). GPU busy per present: 64.7 and 60.2 ms. This head carries #7922's commit 753bb56e3, so the numbers are #7922 and #8004 together. Not tested: other scenes, Fidelity mode, other GPUs. Written with AI assistance (Claude Code); measured on the machine above. Summary lines (main, then the PR): {"commit":"eaa5c9238687","dirty":false,"env":{"APS5_DUMP_FRAMES":"140","APS5_DUMP_FRAMES_EVERY":"30","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_EVENTS":"4194304","APS5_TRACE_FRAMES":"4400:700"},"gpu":"NVIDIA GeForce RTX 5060 Laptop GPU","driver":"NVIDIA 615.71.09","os":"Linux 7.2.8-zen1-2-zen","resolution":"3840x2160","window":{"spec":"frames 4400:700","first_present":4400,"ms":58118.742},"presents":700,"frame_ms":{"p50":81.36,"p90":91.573,"p99":114.238,"max":122.09},"gpu_busy_ms_per_present":64.665,"worker_busy_pct":{"queue worker 0x0":3679.04},"top_phases_ms_per_frame":{"Driver.EndSubmission":2987.559,"Driver.Packet":64.701,"Graphics.Draw":60.931,"Graphics.Draw.draw_and_resource_release":57.172,"Driver.Packet.draw":51.574,"Driver.Draw":51.353,"VideoOut.Flip":25.814,"Driver.Present":25.801},"trace_dropped":false,"trace":"aps5-trace-eaa5c9238687-1093456.json.gz"} {"commit":"fb3b7487e2be","dirty":false,"env":{"APS5_DUMP_FRAMES":"140","APS5_DUMP_FRAMES_EVERY":"30","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_EVENTS":"4194304","APS5_TRACE_FRAMES":"4400:700"},"gpu":"NVIDIA GeForce RTX 5060 Laptop GPU","driver":"NVIDIA 615.71.09","os":"Linux 7.2.8-zen1-2-zen","resolution":"3840x2160","window":{"spec":"frames 4400:700","first_present":4400,"ms":54938.319},"presents":700,"frame_ms":{"p50":76.457,"p90":85.706,"p99":107.809,"max":148.413},"gpu_busy_ms_per_present":60.704,"worker_busy_pct":{"queue worker 0x0":3786.492},"top_phases_ms_per_frame":{"Driver.EndSubmission":2905.761,"Driver.Packet":63.588,"Graphics.Draw":55.513,"Graphics.Draw.draw_and_resource_release":51.733,"Driver.Packet.draw":50.213,"Driver.Draw":50.0,"Driver.Draw.shader_compile_and_link":24.464,"Driver.Draw.draw_enqueued":20.516},"trace_dropped":false,"trace":"aps5-trace-fb3b7487e2be-1103783.json.gz"}
blawesom commented 2026-10-20 08:09:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-20T08:09:29Z.


Rebase handoff — rebased onto current main (3fd1cc393, both commits, authorship unchanged). Two-part resolution:

  • SpirvSpecialization.cpp: main grew the WordArena/ArenaAllocator infrastructure since your branch — kept it (your using aliases for Opcode/Result are superseded by main's local functions, but your code's VisitIdOperands use needed its alias restored beside main's Instruction).
  • RequestSerializerTests.cpp: main added InsertMeshBarycentricFlag insertions at five sites your version-bump rewrites touch — all five kept across your edits.
  • Debt: your rewrite of the spanned-wave64 entry taken (main hadn't changed that entry since your base).

Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, BUILD_TESTING=ON, AMD RX 9070 XT / RADV): builds; request_serializer passes; 1673/1676 — green apart from the three known main failures (#7584 BDA, #7784 guest-memory, tessellation), none from this PR; conventions pass (one pre-existing [debt-length] finding). Functional verification only — no performance measured on my side.

To pick it up:

git fetch https://github.com/blawesom/AnyPS5 rebase/8004
git checkout <your branch>
git merge --ff-only FETCH_HEAD

Head is 7aae6840d.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6286479105 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8004#issuecomment-6286479105). Originally posted by [blawesom](https://github.com/blawesom) on 2026-10-20T08:09:29Z. --- **Rebase handoff** — rebased onto current `main` (`3fd1cc393`, both commits, authorship unchanged). Two-part resolution: - **SpirvSpecialization.cpp:** `main` grew the `WordArena`/`ArenaAllocator` infrastructure since your branch — kept it (your `using` aliases for `Opcode`/`Result` are superseded by `main`'s local functions, but your code's `VisitIdOperands` use needed its alias restored beside `main`'s `Instruction`). - **RequestSerializerTests.cpp:** `main` added `InsertMeshBarycentricFlag` insertions at five sites your version-bump rewrites touch — all five kept across your edits. - **Debt:** your rewrite of the spanned-wave64 entry taken (`main` hadn't changed that entry since your base). Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, `BUILD_TESTING=ON`, AMD RX 9070 XT / RADV): builds; `request_serializer` passes; **1673/1676 — green apart from the three known `main` failures** (#7584 BDA, #7784 guest-memory, tessellation), none from this PR; conventions pass (one pre-existing `[debt-length]` finding). Functional verification only — no performance measured on my side. **To pick it up:** ``` git fetch https://github.com/blawesom/AnyPS5 rebase/8004 git checkout <your branch> git merge --ff-only FETCH_HEAD ``` Head is `7aae6840d`.
oneandonlydean commented 2026-10-20 23:45:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-20T23:45:43Z.


@ThatsLeo Thanks for this, and thanks to @blawesom for the rebase and to @wachi35676 / @CPritch for the runs. Before a full review, three things need to land on the branch:

  1. Serialization version: main has used both 38 (mesh barycentrics) and 39 since this branch's base, so it now reads version > 39u. This PR's 38 merges without a text conflict but would make current main's v38 requests read a trailing spannedAnySubgroup byte they don't have. Please move it to the next free version (40 today, but check main when you rebase) and update the serializer tests to match. blawesom's rebase/8004 still writes 38.
  2. MinGW link: spanned_uniformity_tests fails to link with MinGW GCC 15.2 (undefined reference to __gxx_personality_v0, from #7922's commit). The neighbouring spirv_validator_exit_tests calls configure_windows_unwind(spirv_validator_exit_tests) (recompiler CMakeLists.txt), which is probably what this target is missing.
  3. Rebase onto current main (blawesom's resolution is a good starting point; it's a few hundred commits behind again).

#7922's single commit is this PR's first commit, so one review will cover both once these are in.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6304351281 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8004#issuecomment-6304351281). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-20T23:45:43Z. --- @ThatsLeo Thanks for this, and thanks to @blawesom for the rebase and to @wachi35676 / @CPritch for the runs. Before a full review, three things need to land on the branch: 1. **Serialization version:** main has used both 38 (mesh barycentrics) and 39 since this branch's base, so it now reads `version > 39u`. This PR's 38 merges without a text conflict but would make current main's v38 requests read a trailing `spannedAnySubgroup` byte they don't have. Please move it to the next free version (40 today, but check main when you rebase) and update the serializer tests to match. blawesom's `rebase/8004` still writes 38. 2. **MinGW link:** `spanned_uniformity_tests` fails to link with MinGW GCC 15.2 (`undefined reference to __gxx_personality_v0`, from #7922's commit). The neighbouring `spirv_validator_exit_tests` calls `configure_windows_unwind(spirv_validator_exit_tests)` (recompiler CMakeLists.txt), which is probably what this target is missing. 3. **Rebase** onto current main (blawesom's resolution is a good starting point; it's a few hundred commits behind again). #7922's single commit is this PR's first commit, so one review will cover both once these are in.
ThatsLeo commented 2026-10-20 23:46:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ThatsLeo on 2026-10-20T23:46:24Z.


@oneandonlydean @wachi35676 All three are in. #8004 is rebased onto main 559f35d68 on top of the updated #7922.

  • Serialization version: spannedAnySubgroup is now read from version 40 (main is at 39). agc_shader_memory also checks that a version 39 request from main, without the byte, reads back unchanged.
  • MinGW link: spanned_uniformity_tests now gets configure_windows_unwind, CXX_EXTENSIONS OFF and the MinGW libc link and PATH prepend, as spirv_validator_exit_tests has. I couldn't build with MinGW here, so a confirmation would help.
  • Tests on the Arc: 1742 of 1748 pass. The six failures also fail on main. lavapipe passes 1746 of 1748. The validation-layer run of the focused tests shows no VUID- error. Details are in the description.

@blawesom, thanks for the handoff. I redid the rebase myself because it also needed the version move. @CPritch, thanks for the GTA V numbers; they're quoted in both descriptions.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6304360559 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8004#issuecomment-6304360559). Originally posted by [ThatsLeo](https://github.com/ThatsLeo) on 2026-10-20T23:46:24Z. --- @oneandonlydean @wachi35676 All three are in. #8004 is rebased onto `main` `559f35d68` on top of the updated #7922. - **Serialization version:** `spannedAnySubgroup` is now read from version 40 (`main` is at 39). `agc_shader_memory` also checks that a version 39 request from `main`, without the byte, reads back unchanged. - **MinGW link:** `spanned_uniformity_tests` now gets `configure_windows_unwind`, `CXX_EXTENSIONS OFF` and the MinGW `libc` link and `PATH` prepend, as `spirv_validator_exit_tests` has. I couldn't build with MinGW here, so a confirmation would help. - **Tests on the Arc:** 1742 of 1748 pass. The six failures also fail on `main`. lavapipe passes 1746 of 1748. The validation-layer run of the focused tests shows no `VUID-` error. Details are in the description. @blawesom, thanks for the handoff. I redid the rebase myself because it also needed the version move. @CPritch, thanks for the GTA V numbers; they're quoted in both descriptions. AI-assisted: yes
oneandonlydean commented 2026-10-21 00:31:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-21T00:31:44Z.


@ThatsLeo One more move on the version, sorry: #8697 just merged and took request version 41 (float32DenormPreserve, read at >= 41u). So 40 now sits below what main writes. Could you write 42 and read spannedAnySubgroup at >= 42u, after main's 41 field, and update the serializer tests to match? The rebase onto current main also conflicts in RequestSerializer.cpp, tests/RequestSerializerTests.cpp and tests/ShaderMemory.cpp. #7922 merges cleanly as it is, so its CI is going ahead now.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6304968926 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8004#issuecomment-6304968926). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-21T00:31:44Z. --- @ThatsLeo One more move on the version, sorry: #8697 just merged and took request version 41 (`float32DenormPreserve`, read at `>= 41u`). So 40 now sits below what `main` writes. Could you write 42 and read `spannedAnySubgroup` at `>= 42u`, after main's 41 field, and update the serializer tests to match? The rebase onto current `main` also conflicts in `RequestSerializer.cpp`, `tests/RequestSerializerTests.cpp` and `tests/ShaderMemory.cpp`. #7922 merges cleanly as it is, so its CI is going ahead now.
ThatsLeo commented 2026-10-21 00:46:20 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ThatsLeo on 2026-10-21T00:46:20Z.


@oneandonlydean Done. The request is now version 42, and spannedAnySubgroup is written after main's float32DenormPreserve and read at >= 42u. #8004 is rebased onto main 57fdffd91. The #7922 commits on this branch are the same as on #7922, only rebased.

  • Serializer tests: the conflicts in RequestSerializerTests.cpp and ShaderMemory.cpp came from both branches adding a trailing byte, so every legacy-version case now drops two. request_serializer and agc_shader_memory also read a version 41 request from main: it keeps its denormal-preserve flag and gets no spannedAnySubgroup. A version 39 request still reads as before, and version 43 is rejected.
  • Arc: 1743 of 1749 pass. The six failures also fail on main.
  • lavapipe: 1747 of 1749 pass. Only the two application_heap tests fail.
  • Validation layer: the 54 focused tests show no VUID- error.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6305161932 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8004#issuecomment-6305161932). Originally posted by [ThatsLeo](https://github.com/ThatsLeo) on 2026-10-21T00:46:20Z. --- @oneandonlydean Done. The request is now version 42, and `spannedAnySubgroup` is written after `main`'s `float32DenormPreserve` and read at `>= 42u`. #8004 is rebased onto `main` `57fdffd91`. The #7922 commits on this branch are the same as on #7922, only rebased. - **Serializer tests:** the conflicts in `RequestSerializerTests.cpp` and `ShaderMemory.cpp` came from both branches adding a trailing byte, so every legacy-version case now drops two. `request_serializer` and `agc_shader_memory` also read a version 41 request from `main`: it keeps its denormal-preserve flag and gets no `spannedAnySubgroup`. A version 39 request still reads as before, and version 43 is rejected. - **Arc:** 1743 of 1749 pass. The six failures also fail on `main`. - **lavapipe:** 1747 of 1749 pass. Only the two `application_heap` tests fail. - **Validation layer:** the 54 focused tests show no `VUID-` error. AI-assisted: yes
ThatsLeo commented 2026-10-21 12:55:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ThatsLeo on 2026-10-21T12:55:06Z.


@oneandonlydean Rebased onto main 7280a17ec. main now writes version 42 for the pixel sampleOrder field, so spannedAnySubgroup moved to version 43. It is written last and read at >= 43u. main's new version 41, 34, 32 and 30 sampleOrder cases now drop the extra trailing byte too. request_serializer and agc_shader_memory also read version 42 requests from main without the flag. Both pass, as do spanned_uniformity and agc_compute_pipeline_capture, and only test files changed in the conflict resolution.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6316539137 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8004#issuecomment-6316539137). Originally posted by [ThatsLeo](https://github.com/ThatsLeo) on 2026-10-21T12:55:06Z. --- @oneandonlydean Rebased onto `main` `7280a17ec`. `main` now writes version 42 for the pixel `sampleOrder` field, so `spannedAnySubgroup` moved to version 43. It is written last and read at `>= 43u`. `main`'s new version 41, 34, 32 and 30 `sampleOrder` cases now drop the extra trailing byte too. `request_serializer` and `agc_shader_memory` also read version 42 requests from `main` without the flag. Both pass, as do `spanned_uniformity` and `agc_compute_pipeline_capture`, and only test files changed in the conflict resolution. AI-assisted: yes
oneandonlydean commented 2026-10-22 03:52:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-22T03:52:23Z.


@ThatsLeo thanks for the rebase, and sorry for the slow reply. I've checked 0017bbe73c: spannedAnySubgroup is written last at version 43 and read at >= 43u, and the fixtures match. That looks right to me.

It conflicts with main again, though: main moved on, and docs/dev/debt/shader.md now conflicts (the code files merge cleanly). Could you rebase once more? Then I'll run the full CI on the new head.

On the version: 43 is free on main today (main is at 42), but several open PRs also claim 43. Whichever merges first keeps it, and the others bump to main + 1, so you may need to re-bump if one of them lands before this one.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6332253787 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8004#issuecomment-6332253787). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-22T03:52:23Z. --- @ThatsLeo thanks for the rebase, and sorry for the slow reply. I've checked 0017bbe73c: `spannedAnySubgroup` is written last at version 43 and read at `>= 43u`, and the fixtures match. That looks right to me. It conflicts with `main` again, though: `main` moved on, and `docs/dev/debt/shader.md` now conflicts (the code files merge cleanly). Could you rebase once more? Then I'll run the full CI on the new head. On the version: 43 is free on `main` today (`main` is at 42), but several open PRs also claim 43. Whichever merges first keeps it, and the others bump to `main` + 1, so you may need to re-bump if one of them lands before this one.
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!8004
No description provided.