Skip to content

perf(shader): span single-wave wave64 compute by default after a uniformity check - #7922

Open
ThatsLeo wants to merge 1 commit into
boykopovar:mainfrom
ThatsLeo:feat/shader-spanned-uniformity
Open

ThatsLeo wants to merge 1 commit into
boykopovar:mainfrom
ThatsLeo:feat/shader-spanned-uniformity

Conversation

@ThatsLeo

@ThatsLeo ThatsLeo commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

What

#5405 runs a single-wave wave64 compute program at one guest lane per invocation, across two full 32-lane host subgroups. It is off unless APS5_SPANNED_WAVE is set, because its cross-lane exchanges use workgroup barriers, and the emitter could not tell whether every invocation reaches them: its debt entry lists a manual spirv-dis scan as the only check. This PR adds that check and turns the layout on by default.

  • SpannedBarrierInDivergentFlow (SpirvSpannedUniformity.cpp) runs on every spanned module after emission. It marks the values that can differ between the invocations of a wave, iterating until nothing changes:

    • lane and subgroup IDs (LocalInvocationId/Index, GlobalInvocationId, SubgroupId, SubgroupLocalInvocationId, the subgroup masks);
    • atomic and subgroup-operation results, and function parameters;
    • loads of private or function variables stored in per-invocation control flow;
    • phis inside, or at the merge of, a construct such a value decides;
    • anything computed from these.

    A selection is divergent when its condition is marked. A loop is divergent when its header condition is marked, or when it can be left from per-invocation control flow. The construct's blocks are read off the dominator tree: the header's subtree minus the merge's.

  • If an OpControlBarrier, or a call that reaches one, sits in a divergent construct, Emit throws SpannedWaveUnsupported. Recompile already catches that and emits the program at two lanes per invocation, so a rejected program runs as on main. The check runs before SpirvEmitInfo::fullSubgroups is set, so the fallback is not created with REQUIRE_FULL_SUBGROUPS.

  • VulkanDevice turns spanning on wherever it was available under the switch (computeFullSubgroups with 32-lane compute subgroups). APS5_NO_SPANNED_WAVE turns it off; APS5_SPANNED_WAVE is gone.

  • Opcode, Result and VisitIdOperands move unchanged from SpirvSpecialization.cpp to SpirvInstructionOperands.hpp, templated on the instruction container, so both passes share the operand table. SpirvSpecialization.cpp keeps its own Instruction alias, which is the line perf(shader): keep a specialized module's instructions in one arena #7538 changes.

  • The check treats a load of workgroup, storage or uniform memory at a uniform address as uniform. That is what the exchange slots rely on, but it is not proven for memory another invocation writes without a barrier in between. The debt entry is rewritten around that gap and the unexplained one-barrier ballot loss, and is now under the length limit.

Tested

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

  • spanned_uniformity (new) builds eleven modules by hand:

    • rejected: a barrier under a lane comparison; a barrier in a loop a lane value leaves; a call reaching a barrier under a lane comparison; a barrier under a phi joining a per-lane selection; a barrier under a variable stored on one side of a per-lane selection; a barrier under an atomic result; a barrier under a workgroup word read at a lane index;
    • kept: the same barriers under a constant comparison, in a uniform loop after a per-lane selection, and under a workgroup word read at a uniform index.

    With LocalInvocationIndex removed from the per-invocation built-ins, the six lane-dependent cases fail.

  • Stray's compute requests: all 1,751 (PPSA02101) replayed through agc_shader_replay with a 32-lane target and spanning on, using a local switch that is not part of this PR. 1,130 programs span, and the check rejects none of them. A Python prototype of the same analysis agrees.

  • ctest on main 3bb15be09 + this PR:

    • Arc: 1617 of 1623 pass. The six failures fail the same way with APS5_NO_SPANNED_WAVE=1: application_heap_scripting, application_heap_lazy, agc_driver_image_table_vouched_lookups, agc_driver_guest_memory_lifetime, agc_driver_multisample_retirement, plus guest_kernel_fcntl, which passes alone.
    • lavapipe: 1621 of 1623 pass. Only the two application_heap tests fail.
    • agc_driver_lds_mask_waterfall still runs both modes and still spans.
    • After rebasing onto main 7a015c094: spanned_uniformity, agc_shader_memory, agc_shader_disk_cache, agc_driver_lds_mask_waterfall, request_serializer and agc_driver_f32_denormal_flush pass on the Arc.
  • Stray, frames 20 to 50 of the boot (APS5_TRACE_FRAMES=20:30, 3840x2160).

GPU busy per present (ms) frame p50 (ms)
main + #7811 308.9 / 313.0 / 288.3 (mean 303.4) 451.2 / 464.2 / 432.6 (mean 449.3)
this PR + #7811 180.7 / 165.1 / 173.5 (mean 173.1) 334.9 / 324.6 / 335.0 (mean 331.5)

trace_digest.py, first capture of each:

main: frames 20:30 from present 20: 30 presents, frame p50 451.2 / p90 472.1 / p99 586.3 / max 586.3 ms, GPU busy 308.9 ms per present
PR:   frames 20:30 from present 20: 30 presents, frame p50 334.9 / p90 347.4 / p99 418.7 / max 418.7 ms, GPU busy 180.7 ms per present

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

{"commit":"4b4d52f7d953","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":13716.468},"presents":30,"frame_ms":{"p50":451.183,"p90":472.083,"p99":586.282,"max":586.282},"gpu_busy_ms_per_present":308.934,"worker_busy_pct":{"queue worker 0x0":96.582,"queue worker 0x20":97.047},"top_phases_ms_per_frame":{"Driver.Packet":882.201,"Driver.Packet.memory_wait":418.127,"Driver.Packet.device_lock":208.359,"Driver.Packet.prepare_memory":138.870,"Graphics.Draw":127.060,"Graphics.Draw.draw_and_resource_release":126.577,"Recorder.Submit":114.858,"Driver.Packet.dispatch":68.164},"trace_dropped":false,"trace":"aps5-trace-4b4d52f7d953-938192.json.gz"}
{"commit":"4b4d52f7d953","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":13995.080},"presents":30,"frame_ms":{"p50":464.151,"p90":479.730,"p99":509.222,"max":509.222},"gpu_busy_ms_per_present":312.990,"worker_busy_pct":{"queue worker 0x0":96.781,"queue worker 0x20":96.913},"top_phases_ms_per_frame":{"Driver.Packet":900.975,"Driver.Packet.memory_wait":428.313,"Driver.Packet.device_lock":205.633,"Driver.Packet.prepare_memory":148.125,"Graphics.Draw":128.606,"Graphics.Draw.draw_and_resource_release":128.151,"Recorder.Submit":107.255,"Driver.Packet.dispatch":72.186},"trace_dropped":false,"trace":"aps5-trace-4b4d52f7d953-940261.json.gz"}
{"commit":"4b4d52f7d953","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":13088.121},"presents":30,"frame_ms":{"p50":432.628,"p90":450.240,"p99":530.799,"max":530.799},"gpu_busy_ms_per_present":288.316,"worker_busy_pct":{"queue worker 0x0":96.056,"queue worker 0x20":96.773},"top_phases_ms_per_frame":{"Driver.Packet":837.222,"Driver.Packet.memory_wait":395.185,"Driver.Packet.device_lock":213.902,"Graphics.Draw":129.895,"Graphics.Draw.draw_and_resource_release":129.422,"Recorder.Submit":114.352,"Driver.Packet.prepare_memory":110.092,"Driver.Packet.dispatch":71.040},"trace_dropped":false,"trace":"aps5-trace-4b4d52f7d953-942091.json.gz"}

This PR + #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":10177.000},"presents":30,"frame_ms":{"p50":334.856,"p90":347.438,"p99":418.694,"max":418.694},"gpu_busy_ms_per_present":180.675,"worker_busy_pct":{"queue worker 0x0":95.362,"queue worker 0x20":96.360},"top_phases_ms_per_frame":{"Driver.Packet":646.122,"Driver.Packet.memory_wait":298.561,"Driver.Packet.device_lock":193.196,"Graphics.Draw":116.729,"Graphics.Draw.draw_and_resource_release":116.290,"Recorder.Submit":108.061,"Driver.Packet.dispatch":69.570,"Driver.Dispatch":64.534},"trace_dropped":false,"trace":"aps5-trace-128b8c1f83c0-939198.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":9748.101},"presents":30,"frame_ms":{"p50":324.600,"p90":332.281,"p99":340.520,"max":340.520},"gpu_busy_ms_per_present":165.056,"worker_busy_pct":{"queue worker 0x0":95.368,"queue worker 0x20":97.098},"top_phases_ms_per_frame":{"Driver.Packet":622.706,"Driver.Packet.memory_wait":285.025,"Driver.Packet.device_lock":182.915,"Graphics.Draw":113.762,"Graphics.Draw.draw_and_resource_release":113.340,"Recorder.Submit":97.834,"Driver.Packet.dispatch":72.730,"Driver.Dispatch":68.024},"trace_dropped":false,"trace":"aps5-trace-128b8c1f83c0-941263.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":10014.061},"presents":30,"frame_ms":{"p50":334.968,"p90":340.775,"p99":354.031,"max":354.031},"gpu_busy_ms_per_present":173.489,"worker_busy_pct":{"queue worker 0x0":95.324,"queue worker 0x20":96.938},"top_phases_ms_per_frame":{"Driver.Packet":639.070,"Driver.Packet.memory_wait":298.617,"Driver.Packet.device_lock":189.827,"Graphics.Draw":115.684,"Graphics.Draw.draw_and_resource_release":115.257,"Recorder.Submit":104.396,"Driver.Packet.dispatch":72.309,"Driver.Dispatch":68.740},"trace_dropped":false,"trace":"aps5-trace-128b8c1f83c0-943100.json.gz"}

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

Not tested:

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: Intel Arc (Meteor Lake), Mesa 26.2.4 ANV, Linux; lavapipe (Mesa 26.2.4), Linux
  • AI-assisted: yes

@github-actions github-actions Bot added perf Performance change perf numbers missing perf pull request without a before and after summary line labels Oct 19, 2026
@github-actions

Copy link
Copy Markdown

This pull request is labeled perf, so it needs the summary line of a capture on main and one with the change, from the same title, scene and machine, as the Performance report form asks. Please paste both aps5-summary.jsonl lines, attach the two traces and add the output of tools/trace_digest.py.

@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 1395 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 2434 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 4040 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 4072 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 4472 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 4847 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 4891 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 5021 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
docs/dev/debt/shader.md
PR 5315 core/shader/recompiler/SpirvBackend/src/SpirvSpecialization.cpp
PR 5371 docs/dev/debt/shader.md
PR 5426 docs/dev/debt/shader.md
PR 5431 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 5441 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 5499 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 5500 docs/dev/debt/shader.md
PR 5799 docs/dev/debt/shader.md
PR 5925 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/CMakeLists.txt
PR 5941 docs/dev/debt/shader.md
PR 6009 docs/dev/debt/shader.md
PR 6010 docs/dev/debt/shader.md
PR 6011 docs/dev/debt/shader.md
PR 6146 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6177 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
PR 6188 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6202 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6235 docs/dev/debt/shader.md
PR 6249 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6262 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6280 docs/dev/debt/shader.md
PR 6290 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6292 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6412 docs/dev/debt/shader.md
PR 6416 core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
PR 6436 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6488 core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
docs/dev/debt/shader.md
PR 6604 docs/dev/debt/shader.md
PR 6612 core/shader/recompiler/CMakeLists.txt
docs/dev/debt/shader.md
PR 6615 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6636 docs/dev/ENVIRONMENT.md
PR 6639 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6655 docs/dev/ENVIRONMENT.md
PR 6658 docs/dev/ENVIRONMENT.md
PR 6679 docs/dev/debt/shader.md
PR 6683 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6718 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6751 core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
PR 6782 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6788 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6801 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6804 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6820 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6879 core/shader/recompiler/CMakeLists.txt
PR 6887 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6924 docs/dev/ENVIRONMENT.md
docs/dev/debt/shader.md
PR 6946 core/shader/recompiler/CMakeLists.txt
docs/dev/ENVIRONMENT.md
PR 6947 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/CMakeLists.txt
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
docs/dev/ENVIRONMENT.md
PR 6948 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 6951 docs/dev/ENVIRONMENT.md
PR 6959 docs/dev/debt/shader.md
PR 6960 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6965 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6973 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6977 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/CMakeLists.txt
docs/dev/debt/shader.md
PR 6987 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6989 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6995 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7002 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7080 docs/dev/ENVIRONMENT.md
PR 7085 docs/dev/debt/shader.md
PR 7154 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7201 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/CMakeLists.txt
PR 7223 docs/dev/debt/shader.md
PR 7233 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7275 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7292 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7307 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 7332 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/CMakeLists.txt
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/shader.md
PR 7340 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 7369 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7371 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7392 core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
docs/dev/debt/shader.md
PR 7395 docs/dev/debt/shader.md
PR 7410 docs/dev/debt/shader.md
PR 7411 docs/dev/ENVIRONMENT.md
PR 7417 docs/dev/ENVIRONMENT.md
PR 7426 docs/dev/debt/shader.md
PR 7427 docs/dev/ENVIRONMENT.md
PR 7449 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7457 docs/dev/ENVIRONMENT.md
PR 7464 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 7474 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7480 docs/dev/ENVIRONMENT.md
PR 7484 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/shader.md
PR 7560 core/shader/recompiler/CMakeLists.txt
PR 7603 core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
PR 7604 docs/dev/ENVIRONMENT.md
PR 7610 core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
PR 7618 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7622 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/CMakeLists.txt
PR 7642 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/CMakeLists.txt
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
docs/dev/ENVIRONMENT.md
PR 7643 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 7647 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7683 docs/dev/ENVIRONMENT.md
PR 7684 docs/dev/debt/shader.md
PR 7705 docs/dev/ENVIRONMENT.md
PR 7803 docs/dev/debt/shader.md
PR 7827 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7829 docs/dev/debt/shader.md
PR 7869 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7870 docs/dev/ENVIRONMENT.md
PR 7888 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
docs/dev/debt/shader.md
PR 7920 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 7930 docs/dev/ENVIRONMENT.md
PR 7933 core/shader/recompiler/CMakeLists.txt
PR 7942 docs/dev/debt/shader.md
PR 7945 docs/dev/debt/shader.md
PR 7954 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7965 docs/dev/debt/shader.md
PR 8014 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 8047 docs/dev/ENVIRONMENT.md
PR 8055 docs/dev/debt/shader.md
PR 8066 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 8075 docs/dev/ENVIRONMENT.md
PR 8077 docs/dev/ENVIRONMENT.md
docs/dev/debt/shader.md
PR 8083 docs/dev/debt/shader.md
PR 8104 docs/dev/ENVIRONMENT.md
PR 8105 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 8115 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 8134 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
docs/dev/debt/shader.md
PR 8144 docs/dev/debt/shader.md
PR 8160 docs/dev/ENVIRONMENT.md
PR 8161 docs/dev/ENVIRONMENT.md
PR 8180 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 8206 docs/dev/ENVIRONMENT.md
PR 8212 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp

@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed build shader core/shader docs agc libSceAgc* and removed perf numbers missing perf pull request without a before and after summary line labels Oct 19, 2026
@ThatsLeo
ThatsLeo force-pushed the feat/shader-spanned-uniformity branch from 7ae9e88 to 2e78528 Compare October 19, 2026 17:11
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 19, 2026
@ThatsLeo
ThatsLeo force-pushed the feat/shader-spanned-uniformity branch from 2e78528 to 753bb56 Compare October 19, 2026 17:30

@CnRJay CnRJay left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Stray numbers are strong (GPU busy per present 303.4 to 173.1 ms, frame p50 449.3 to 331.5 ms, three interleaved rounds, spread small next to the gain), and the fallback to two lanes per invocation when the check rejects is the right shape. Turning this on by default for every device with 32-lane compute subgroups is where I don't agree yet.

  • Everything measured is one Intel Arc (Meteor Lake) on ANV. "Wherever it was available under the switch" means NVIDIA and RDNA wave32 parts get a different compute layout for 1,130 of Stray's 1,751 programs without a run on either. Barrier-in-divergent-flow on a vendor that implements OpControlBarrier differently is a hang or VK_ERROR_DEVICE_LOST, not a wrong picture. Please post spanned_uniformity plus the Stray (or any wave64-compute title) pair on an NVIDIA card and a Radeon, or keep the default off for vendors that haven't been run.
  • The description says the check treats a load from workgroup, storage or uniform memory at a uniform address as uniform, "not proven for memory another invocation writes without a barrier in between", and that a one-barrier ballot loss is unexplained. That is a known hole in the analysis that decides whether the program can hang, and it is being made the default path. Either close it (treat such a load as divergent unless a barrier dominates it, and see what fraction of the 1,130 still spans), or state the programs it affects and keep the switch default-off until the ballot loss is explained.
  • The replay of 1,751 requests ran with a local switch that isn't in the PR, and found 0 rejections. A check that never rejects on its real corpus only shows the false-positive rate; the rejected cases are the hand-built eleven modules. It would help to have at least one real program from the corpus where the barrier sits under a divergent construct, to show the check reaches it on real SPIR-V.
  • APS5_SPANNED_WAVE is removed and APS5_NO_SPANNED_WAVE added. Is the spanning decision part of the shader disk cache key and the pipeline journal key? A cache written under the old switch must not serve a two-lane module to a spanned layout (or the other way round) after this default flips.
  • 858 added lines moving Opcode, Result and VisitIdOperands between files alongside the new pass. Splitting the move out of the behavior change would make the pass reviewable.

…ormity check

A spanned module is checked for barriers inside control flow that a per-invocation
value decides, and falls back to two lanes per invocation when it has one, so the
spanned layout no longer needs APS5_SPANNED_WAVE; APS5_NO_SPANNED_WAVE turns it off.
@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 19, 2026
@oneandonlydean oneandonlydean self-assigned this Oct 20, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* build docs needs rebase Conflicts with main, rebase needed perf Performance change shader core/shader

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants