fix(agc): span table-reading wave64 programs by default on Intel drivers that share handles across fused threads #10846

Closed
EagleBearerYS wants to merge 388 commits from upstream-pr/10846 into main
EagleBearerYS commented 2026-10-25 04:38:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-25T04:38:44Z.


What

On Intel Gfx12, two EU threads run fused and share one texture and sampler handle. A single-wave wave64 compute program on a 32-lane host subgroup runs at two guest lanes per invocation, so a workgroup is one SIMD32 thread and a fused pair can be two workgroups. Where a program reads an image or sampler table through a per-workgroup index, the emitter marks that index uniform (tableIndexNonUniform false), and workgroup 1 then reads workgroup 0's sampler.

  • On ANV this was Mesa issue 16622, fixed in Mesa 25.3 by !37394 ("Fix texture/sampler accesses with EU fusion on Gfx12.X HW"). Capmare traced it there (7395 c6254952671).
  • On Intel's Windows driver 101.9150, @BKlaasWerkman's Arc runs fail #7395's agc_driver_nested_sampler_table and agc_driver_pointer_phi_sampler_table 3 of 3 by default and pass 3 of 3 with APS5_SPANNED_WAVE=1 (7395 c6369252849).

A spanned wave makes the workgroup two full 32-lane subgroups, so a fused pair stays inside one workgroup. This PR turns that on by default only where it's needed:

  1. Detection (Execution/include/SpannedWaves.hpp): a pure rule from driverID, the Mesa version in driverInfo, the minimum compute subgroup size and computeFullSubgroups.
    • Intel's Windows driver at any version.
    • ANV below Mesa 25.3 with a minimum subgroup of 8. Xe2 and later report 16 and have no fusion (Mesa's anv_physical_device.c at mesa-25.3.0, get_properties_1_3).
    • An unparsable ANV version counts as affected and is logged.
    • Nothing without full compute subgroups. The decision is logged once at device creation.
  2. The switch: APS5_SPANNED_WAVE takes a value.
    • unset: the narrow default, only where detection says yes;
    • 1: every single-wave wave64 compute program, as before;
    • 0: never;
    • tables: the narrow set on any device with full subgroups.
    • Anything else is refused at device creation.
  3. The narrow default (SpirvTarget::spanTableWaves): a program that already qualifies for a spanned wave spans when it reads a sampler table, or an image table whose column isn't selected. That's the same metadata the emitter uses to decorate table indices. The option is part of the cache key and the serialized request (request version 52).
  4. The guard: a spanned wave chosen by the narrow default refuses a cross-lane exchange inside a construct opened on a per-invocation condition. These are the per-invocation selections, the compare-exchange retry loop, the LDS lock loop, the elected BDA range search, and an image table's mode switch. It throws SpannedWaveUnsupported with the construct named, and the recompiler re-emits at two lanes per invocation, logging that the fused-thread hazard remains for that program. 1 keeps today's behaviour.

docs/dev/ENVIRONMENT.md and the shader debt entry describe the values and the guard.

Disk cache: the new target option is in the cache key and the serialized request, so the format moves. The disk-cache format ladder: main is at 50, and #7223 is at 51 since yabanana's 7f36e41c45. Ours take one number each: #10000 52, #8939 53, #10489 54, #9457 55, #9633 56, #9749 57, #9790 59, #9969 60, #7642 62, #7395 63 and #10846 64. 58 is held by #10193 (Celegans12). So this PR takes 64, which no other open PR uses (cf19a3c38a; it had 61 before #7395 moved to 63). Whichever lands second on a number takes the next free one.

Tested

  • GitHub's runners, on #7395's head:
    • run 40160345757, at this head (format 59): request_serializer, shader_cache_file_read, the agc_shader_disk_cache* tests, agc_spanned_wave_policy, agc_spanned_wave_guard and agc_driver_span_table_choice pass 10 of 10 on Linux (21 tests, 0 skipped) and on Windows (23 tests; agc_driver_span_table_choice skips there, since the runner has no Vulkan device).
    • The two runs below are on the previous head, whose tree differed only in the format number (51):
    • run 40157639409: agc_spanned_wave_policy (16 driver cases, the switch's values and refusals), agc_spanned_wave_guard (8 exchanges with and without the guard), agc_spanned_wave_refusal, agc_driver_span_table_choice, agc_shader_disk_cache and the other agc_shader_* tests pass 10 of 10 on Linux (20 tests, 0 skipped) and on Windows (22 tests). The one skip on Windows is agc_driver_span_table_choice, since the runner has no Vulkan device.
    • run 40154606647: the validation comparison on Linux (lavapipe). #7395's agc_driver_nested_sampler_table and agc_driver_pointer_phi_sampler_table and the two new GPU variants pass 10 of 10, and the fix adds no VUID-.
    • The new tests don't build against #7395's own code.
  • Red/green (Linux, Ubuntu 24.04, gcc 13.3, CI flags):
    • with the option's effect reverted (span condition back to target.spannedWaves only), agc_driver_span_table_choice fails at its first case ("a sampler table read: the program kept two lanes per invocation");
    • with the guard check disabled, agc_spanned_wave_guard fails ("a ballot inside a selection: the guard let a spanned exchange inside a per-lane construct through");
    • both pass with the change. Every spanned module the choice test emits passes spirv-val.
  • Full ctest on Linux: 2,124 tests, 2,029 passed, 90 skipped and 5 failed; the 5 are IPv6 tests that host cannot run.
  • Cost of spanning: on Resident Evil Village (PPSA01556), with APS5_SPANNED_WAVE=1 forcing every qualifying program to span, there was no measured cost on one CPU-bound title (NVIDIA GeForce RTX 3070 Laptop GPU, clocks not locked). Over menu + 5 to + 15 min the spanned runs ran at 0.325-0.398 fps and the default runs at 0.350-0.437 fps, inside the spread between runs of the same arm, with no fallback, device fault or hang. A GPU-bound title could still show a cost this one can't.
  • Intel Iris Xe Graphics (TGL GT2, 8086:9a49), Mesa 25.2.8 (ANV), Ubuntu 24.04.5, by @TechLevelZero (comment): 5d04f76ea4, Release, GCC 14. The device-creation line reads Fused EU threads share texture and sampler handles: 1 (driver 6, minimum compute subgroup 8, full compute subgroups 1), so programs that read an image or sampler table span by default. Each result held in 4 of 4 runs:
    • agc_driver_nested_sampler_table and agc_driver_pointer_phi_sampler_table pass by default and fail with APS5_SPANNED_WAVE=0 (lane 0 is 0x3e800000, expected 0x427d0000 and lane 0 is 0x427d0000, expected 0x3e800000);
    • agc_driver_span_table_choice and agc_driver_table_image_per_workgroup pass both ways, so per-workgroup images under one sampler aren't hit;
    • agc_driver_wave32_sampler_per_workgroup fails both ways (workgroup 1 (wrapping S#): lane 0 is 0x427d0000, expected 0x3e800000): wave32 workgroups are hit too. This PR doesn't change wave32, so that case stays open.
  • Not tested: a title on Intel. lavapipe can't run the spanned path (its subgroup is 8).
  • 5d04f76ea4, a merge of main a5a780eaaa (run). main's #10046 includes TessellationPipelineCache.hpp where this PR includes SpannedWaves.hpp; the merge keeps both, and nothing else conflicted. The spanned-wave, span-table, nested-table, pointer-phi, per-workgroup and request_serializer tests pass 10 runs in a row. Linux: 30 run, 30 pass, 0 skip, 0 fail. Windows: 32 run, 22 pass, 10 skip (the execution tests, no Vulkan device), 0 fail. Suites: libc and libkernel pass on Linux (144 and 207) and on Windows (171 and 223). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • e7d6efe006, after oneandonlydean's review (run): agc_spanned_wave_refusal passed on either the APS5_SPANNED_WAVE is "yes" refusal or the generic no-device text, since OpenVulkanTestDevice reports every device failure, the refusal included, as a missing device. It now runs its own --spanned-wave-refusal mode: it checks that ParseSpannedWaveMode refuses the value before any device opens, then opens the device itself and passes only when the error carries the refusal. Any other failure reports a missing device and skips (SKIP_RETURN_CODE 77), or fails under ANYPS5_REQUIRE_VULKAN. agc_spanned_wave_refusal and agc_driver_span_table_choice pass 10 runs in a row on Linux, the refusal test on the refusal text each time: 2 run, 2 pass, 0 skip, 0 fail. Windows, with no Vulkan device: 2 run, 0 pass, 2 skip, 0 fail. On Linux the Khronos validation layer is loaded on both arms and reports only VUID-VkDeviceCreateInfo-pNext-pNext, on both. The disk-cache format is unchanged. Suites: libc and libkernel pass on Linux (144 and 207) and on Windows (171 and 223). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • Intel Iris Xe and NVIDIA on Windows, by @Sumaiter (comment), on e7d6efe006 (base main a5a780eaaa): Windows 11 Home 26200, WinLibs GCC 15.2.0 r7, Release, ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1, one GPU at a time, with the Khronos validation layer (loader-confirmed).
    • Intel Iris Xe (8086:a7a0, driver 101.7092), detected as Fused EU threads share texture and sampler handles: 1 (driver 5, minimum compute subgroup 8, full compute subgroups 1): by default agc_driver_nested_sampler_table and agc_driver_pointer_phi_sampler_table pass (and an extra 3 of 3 runs); with APS5_SPANNED_WAVE=0 they fail with the swapped lane values (0x3e800000 against 0x427d0000). agc_driver_span_table_choice and agc_driver_table_image_per_workgroup pass in both modes. agc_driver_wave32_sampler_per_workgroup fails in both modes, the wave32 Gen12 failure this PR leaves out of scope.
    • RTX 4060 Laptop (621.01), detected as handles: 0: all six tests pass, the wave32 one included. agc_driver_image_table passes on the base on both GPUs.
    • No VUID- and no missing-layer warning in either tree's logs. No title run.
  • 00bdd353c1: 2d0f6d9d27 and 00bdd353c1, merges of main 16954551ed and 0cd07dc4ab, and bf29270362, a merge of #7395's 9343a179b3 (run).
    • The request serialization version moves to 50. main took 47 (#10515's dithered alpha-to-coverage), 48 (#9193's barycentric built-ins) and 49 (oneandonlydean's #10348, the exported-depth clamp), so this PR's spanTableWaves byte, written after the barycentric flag at the end of the request, is version 50, which no other open PR uses. A version 49 request reads with spanTableWaves off. The tests that pin the current version move with it, main's new depth-export request test included: its legacy decodes drop this PR's trailing byte before relabelling the bytes as version 48.
    • 2d0f6d9d27 also keeps main's Scalar buffer descriptors and Guest memory load guards debt entries beside this PR's Spanned wave64 compute one.
    • bf29270362 takes #7395's merge of #7223's 153400ba2b and #7395's test-only commit. Clean; FormatVersion stays 59.
    • The request serializer, shader-memory, disk-cache, spanned-wave, span-table, nested-sampler, pointer-Phi sampler, per-workgroup and depth-export clamp tests ran 10 times with no failure. Linux: 31 run, 31 pass, 0 skip, 0 fail. Windows: 33 run, 27 pass, 6 skip (the Vulkan device tests), 0 fail.
    • Suites: libc and libkernel pass on Linux (166 and 264). On Windows libc passes (194), and libkernel passes 283 of 286: exec_arguments, guest_timed_join_import_libkernel_sys and guest_timed_join_import_libkernel_web fail at their setup in the verify's Windows build (FileNotFoundError starting the title, or copying the libraries they load), and pass in main's own Windows job at 1829def9bf (job). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • 965e987d0b, a merge of #7395's ca14648806 (run): #7395's test-only commit, which drops the nested-sampler test's check that an S# with another consumer is refused. Clean, and this PR's changed lines are the same. The request serializer, shader-memory, disk-cache, spanned-wave, span-table, nested-sampler, pointer-Phi sampler, per-workgroup and depth-export clamp tests ran 10 times with no failure. Linux: 31 run, 31 pass, 0 skip, 0 fail. Windows: 33 run, 27 pass, 6 skip (the Vulkan device tests), 0 fail. Suites: libc and libkernel pass on Linux (166 and 264). On Windows libc passes (194), and libkernel passes 283 of 286: exec_arguments, guest_timed_join_import_libkernel_sys and guest_timed_join_import_libkernel_web fail at their setup in the verify's Windows build (FileNotFoundError starting the title, or copying the libraries they load), and pass in main's own Windows job at 1829def9bf (job). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • 4d184c7a7a: 7ba155ee19, a merge of #7395's ca5ba6296f (which carries main 38ccd50f83 and with it #11507's FormatVersion 49), then a merge of main 3a40945e62 (run). The first is clean: FormatVersion stays 59 (see What). In the second, the one conflict was CacheKey.hpp, where Gonic0's #12188 (the LDS lock's fences on MoltenVK) appends its ldsLockFences target option to the cache key on the line where this PR appends spanTableWaves; the merge keeps both. #12188 doesn't add its option to the serialized request, so the request version stays at this PR's 50, above main's 49. This PR's diff over #7395 is the same apart from the FormatVersion line's old value. The request serializer, shader-memory, disk-cache, spanned-wave, span-table, nested-sampler, pointer-Phi sampler, per-workgroup and depth-export clamp tests, with #11507's agc_driver_image_sample_short_cube and #12188's agc_spirv_lds_atomic_lock, ran 10 times with no failure. Linux: 34 run, 34 pass, 0 skip, 0 fail. Windows: 36 run, 29 pass, 7 skip (the Vulkan device tests), 0 fail. Suites: libc and libkernel pass on Linux (171 and 289). On Windows libc passes (199), and libkernel passes 309 of 312: exec_arguments, guest_timed_join_import_libkernel_sys and guest_timed_join_import_libkernel_web fail at their setup in the verify's Windows build (FileNotFoundError starting the title, or copying the libraries they load), with main's code too, and pass in main's own Windows job at 1829def9bf (job). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • d21510c5d2, a merge of main f3eb573e6f (run). The one conflict was docs/dev/ENVIRONMENT.md, where MarcZX10's #12091 corrects APS5_SPIRV_OPT's source path on the row after this PR's APS5_SPANNED_WAVE row; the merge keeps this PR's row (a string, with its values) and #12091's path. This PR's other changed lines are the same. The request serializer, shader-memory, disk-cache, spanned-wave, span-table, nested-sampler, pointer-Phi sampler, per-workgroup and depth-export clamp tests, with agc_driver_image_sample_short_cube and agc_spirv_lds_atomic_lock, ran 10 times with no failure. Linux: 34 run, 34 pass, 0 skip, 0 fail. Windows: 36 run, 29 pass, 7 skip (the Vulkan device tests), 0 fail. Suites: libc and libkernel pass on Linux (171 and 289). On Windows libc passes (199), and libkernel passes 309 of 312: exec_arguments, guest_timed_join_import_libkernel_sys and guest_timed_join_import_libkernel_web fail at their setup in the verify's Windows build (FileNotFoundError starting the title, or copying the libraries they load), with main's code too, and pass in main's own Windows job at 1829def9bf (job). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • c21a1ee10c: 7c543151ed, a merge of #7395's e04a705765, and c21a1ee10c, the format commit (run).
    • 7c543151ed takes #7395's test-only commit d908758281, which drops agc_driver_nested_image_table's two checks that a valid shader is refused (a V# with another buffer consumer and a T# with another consumer), and #7395's merge of #7223's 0dbf5478b2 (yabanana's merge of main f7e84c4cf1). The one conflict was FormatVersion, which stays this PR's until the next commit.
    • c21a1ee10c gives this PR its own disk-cache format, 61, above #9969's 60 at the top of the #9457 stack. The request version stays 50. Apart from the format line, this PR's diff over #7395 is unchanged.
    • The pointer, nested, image-table and disk-cache tests with agc_shader_bindless, agc_shader_memory and 17 other agc_shader_ tests (table snapshots, selected records, memo budgets and pair layouts), agc_driver_span_table_choice, agc_driver_wave32_sampler_per_workgroup and the ^agc_spanned_wave_ tests ran 10 times with no failure. Linux: 41 run, 41 pass, 0 skip, 0 fail. Windows: 43 run, 27 pass, 16 skip (the Vulkan device tests; the Windows runner has no Vulkan device), 0 fail. The libc and libkernel suites run 191 and 291 tests on Linux and 220 and 314 on Windows, with 0 failed. They ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • 3e250e2538, a merge of #7395's 4769d5a745, which drops "and refusals" from two nested-table test summary lines (run). It's clean and brings only that change. The image-table, nested, pointer, disk-cache, bindless, shader-memory and spanned-wave tests ran 10 times with no failure. Linux: 41 run, 41 pass, 0 skip, 0 fail. Windows: 43 run, 27 pass, 16 skip, 0 fail; the 16 skip because the runner has no Vulkan device. The libc and libkernel suites run 191 and 291 tests on Linux and 220 and 314 on Windows, with 0 failed. The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • 0a2cf64028, a merge of main 6d56eb813c, which brings beardsciences's #12233.
    • The conflict: CompiledShaderArtifact in Recompiler.hpp, where #12233 adds meshWindowBuffer and this PR adds spanTableWaves at the same place. The merge keeps both.
    • This PR's added and removed lines are unchanged.
    • main's request serialization version is still 49, so this PR's 50 stays one above it.
    • ×10 (run): request_serializer, the shader memory, disk-cache, bindless and spanned-wave tests, agc_driver_span_table_choice, the per-workgroup and nested table tests, shader_cache_file_read and agc_driver_depth_export_clamp.
      • Linux: 33 run, 33 pass, 0 skip, 0 fail.
      • Windows: 35 run, 29 pass, 6 skip (no Vulkan device), 0 fail.
      • The libc and libkernel suites run 194 and 294 tests on Linux and 224 and 318 on Windows, with 0 failed. The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
    • Validation (VERIFY_VALIDATION=1 on GitHub's Linux runner, llvmpipe (LLVM 20.1.2), Mesa 25.2.8), main 6d56eb813c against this head (run):
      • 33 passed.
      • VUID-VkDeviceCreateInfo-pNext-pNext appears in both arms, and the merge adds none.
  • 8a30e93470: 9975523ec0, cf19a3c38a and 8a30e93470, merges of #7395's new heads.
    • 9975523ec0 takes #7395's merge of main a5939f10a8. It's clean: FormatVersion stays 61.
    • cf19a3c38a takes #7395's merge of #7223's 7f36e41c45 and its move to 63. The one conflict is FormatVersion, which goes to 64, above #7395's 63.
    • 8a30e93470 takes #7395's lone nested sampler table epoch fix (967f0dbebb) and its test. It's clean.
    • This PR's own lines are unchanged apart from the format line.
    • ×10 at this head (run): the tests above, plus #7395's agc_shader_nested_snapshot_retry and agc_shader_nested_sampler_snapshot_retry.
      • Linux: 33 run, 33 pass, 0 skip, 0 fail.
      • Windows: 35 run, 29 pass, 5 skip (no Vulkan device), 1 fail. The failure is #7223's agc_shader_nested_snapshot_retry, which exits with 0xc0000135 before it starts, because its registration doesn't put libc's directory on PATH on Windows. 93c5dae715, below, fixes it.
      • The libc and libkernel suites run 198 and 306 tests on Linux and 225 and 326 on Windows, with 0 failed. The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • a9458c6c2f, a merge of #7395's merge of main 0836dfdf4f (run, on 58b9927329, which has the same tree). #12862 moved libSceAgcDriver's test registrations into tests/cmake/; the conflict in CMakeLists.txt is resolved with tools/agc_test_split.py resolve, which moves this PR's registrations into tests/cmake/agc_driver_image_table_tests.cmake (+12 −2 against #7395's merge) and a new tests/cmake/agc_spanned_wave_tests.cmake (+15). Nothing else conflicted. Its disk cache format stays 64, above #7395's 63, and its request serialization version, 50, is still past main's 49. Apart from the move, this PR's diff is unchanged. With -DBUILD_TESTING=ON, ctest -N gives 3090 tests: main's 3075 plus this PR's and #7395's 15 tests, each listed once. The 12 tests of this PR's verify set ran 10 times in a row. Linux: 12 run, 12 pass, 0 skip, 0 fail. Windows: 12 run, 6 pass, 5 skip (no Vulkan device), 1 fail: agc_shader_nested_snapshot_retry, #7223's test, which exits with 0xc0000135 before it starts, because its registration doesn't put libc's directory on PATH on Windows. It failed the same way before this merge (run at 8a30e93470), and resolve moved its lines byte for byte. Suites: libc and libkernel pass on Linux (199 and 308) and on Windows (226 and 330). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • 751ed9728a, a merge of main 0a148be963, which brings frankea's #13807.
    • The request serialization version moves to 52. #13807 took 51 for its tessellation evaluation subgroup flag, and rejects version 50. This PR's spanTableWaves byte is now written after #13807's flag, as version 52, and read only from 52 (if (version >= 52u)), so a version 51 request reads with spanTableWaves off. Version 50 stays rejected: version < 1u || version > 52u || version == 50u.
    • The conflicts were RequestSerializer.cpp, RequestSerializerTests.cpp and ShaderMemory.cpp. Each keeps both flags, main's first. Against main, this PR's diff of RequestSerializer.cpp is the version number, the write and the read. The tests that pin the current version move to 52, each legacy decode drops both trailing bytes, and the first future version is 53. At 12 places in the tests where both sides made the same one-byte edit for their own trailing byte, which git applied once, the merge now accounts for both bytes. Nothing else conflicted.
    • ×10 (run): the 12 tests of this PR's verify set.
      • Linux: 12 run, 12 pass, 0 skip, 0 fail.
      • Windows: 12 run, 6 pass, 5 skip (no Vulkan device), 1 fail: #7223's agc_shader_nested_snapshot_retry, which exits with 0xc0000135 before it starts, as at a9458c6c2f. 93c5dae715, below, fixes it.
      • Suites: libc and libkernel pass on Linux (199 and 308) and on Windows (226 and 330). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
    • Validation (VERIFY_VALIDATION=1 on GitHub's Linux runner, llvmpipe) (run): 11 of the 12 pass. agc_driver_image_table fails in that mode in both arms, because the mode treats main's VUID-VkDeviceCreateInfo-pNext-pNext as a failure. The merge adds no VUID-.
    • Linux, Ubuntu 24.04, gcc 13.3, CI flags, lavapipe: the full build passes. The 25 request_serializer and agc_shader_memory_tests tests pass 10 runs in a row. The 1,188 ^(agc|shader) tests: 1,113 pass, 75 skip (lavapipe's subgroup size, sample counts and extensions), 0 fail.
    • No test decodes a version 51 request yet. This PR's span table test checks that a version 52 request with the flag set reads it back, and #13807's test checks its own byte with this PR's at its default.
  • NVIDIA RTX 2000 Ada Generation at 751ed9728a, from TechLevelZero's NVIDIA bot (report): driver 595.99.02, Ubuntu 26.04.1, this head merged onto main 3741ca9, 2,540 of 3,121 tests selected.
    • 2,492 passed, 4 failed and 44 skipped. None of the failures is new: 3 also fail on main, and 1 is unstable on main.
    • With VK_LAYER_KHRONOS_validation, over 946 tests on the GPU, there are no new validation IDs against main. 15 of the nested and pointer table tests ran with the layer but aren't in main's baseline, so they weren't compared.
  • 93c5dae715, a merge of #7395's 5fdf20fc3d, which gives #7223's agc_shader_nested_snapshot_retry libc's directory on PATH on Windows, beside #7395's sampler retry, as oneandonlydean asked (comment). It brings in only that line, so the Windows failure noted above is gone.
    • ×10 (run): this PR's 12 tests. Linux: 12 run, 12 pass, 0 skip, 0 fail. Windows: 12 run, 7 pass, 5 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 199 and 308 tests on Linux and 226 and 330 on Windows, with 0 failed. The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
    • Upstream CI's Windows job at this head (job), merged onto main d262000: 2,600 tests, 1,685 passed, 915 skipped, 0 failed. Both retry tests passed.
  • NVIDIA RTX 2000 Ada Generation at 93c5dae715, from TechLevelZero's NVIDIA bot (report): driver 595.99.02, Ubuntu 26.04.1, this head merged onto main e6f5730, 2,551 of 3,148 tests selected.
    • 2,499 passed, 7 failed and 45 skipped. None of the failures is new: 3 also fail on main, and 4 are unstable on main.
    • With VK_LAYER_KHRONOS_validation, over 948 tests on the GPU, one new validation ID: VUID-vkCmdCopyBuffer-commonparent in agc_driver_depth_clear_hle, which is main's #10791 (#10940 is its open fix). That test is unstable on main, and the only change since 751ed9728a's clean run is a Windows-only line. 15 tests ran with the layer but aren't in main's baseline, so they weren't compared. Both nested snapshot retry tests passed on the GPU.

Checklist

  • Based on current main; no other open PR implements the same functions (stacked on #7395)
  • 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: #7395; #10359 (valenciana-nc) and #12662 (Gonic0) go before this PR (merge order only: each raises the request serialization version; main is at 51 after frankea's #13807, #12662 is at 52 and #10359 at 50, and this PR, at 52, takes the next number after theirs in its main merge once they land); merge order with Michael-KD's #11254 (adjacent entries in docs/dev/debt/shader.md): whichever merges second keeps both
  • Fixes: none
  • Unblocks: none
  • GPUs tested: lavapipe (Linux, GitHub), NVIDIA GeForce RTX 3070 Laptop GPU (Windows, the Resident Evil Village (PPSA01556) cost runs with APS5_SPANNED_WAVE=1); NVIDIA RTX 2000 Ada Generation (driver 595.99.02, Ubuntu 26.04.1; TechLevelZero's NVIDIA bot); Intel Iris Xe Graphics (TGL GT2), Mesa 25.2.8 (ANV), Ubuntu 24.04, in TechLevelZero's run; Intel's Windows driver not yet
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5001841335 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10846). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-25T04:38:44Z. --- ### What On Intel Gfx12, two EU threads run fused and share one texture and sampler handle. A single-wave wave64 compute program on a 32-lane host subgroup runs at two guest lanes per invocation, so a workgroup is one SIMD32 thread and a fused pair can be two workgroups. Where a program reads an image or sampler table through a per-workgroup index, the emitter marks that index uniform (`tableIndexNonUniform` false), and workgroup 1 then reads workgroup 0's sampler. - On ANV this was Mesa issue 16622, fixed in Mesa 25.3 by !37394 ("Fix texture/sampler accesses with EU fusion on Gfx12.X HW"). Capmare traced it there ([7395 c6254952671](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6254952671)). - On Intel's Windows driver 101.9150, @BKlaasWerkman's Arc runs fail #7395's `agc_driver_nested_sampler_table` and `agc_driver_pointer_phi_sampler_table` 3 of 3 by default and pass 3 of 3 with `APS5_SPANNED_WAVE=1` ([7395 c6369252849](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6369252849)). A spanned wave makes the workgroup two full 32-lane subgroups, so a fused pair stays inside one workgroup. This PR turns that on by default only where it's needed: 1. **Detection** (`Execution/include/SpannedWaves.hpp`): a pure rule from `driverID`, the Mesa version in `driverInfo`, the minimum compute subgroup size and `computeFullSubgroups`. - Intel's Windows driver at any version. - ANV below Mesa 25.3 with a minimum subgroup of 8. Xe2 and later report 16 and have no fusion (Mesa's `anv_physical_device.c` at `mesa-25.3.0`, `get_properties_1_3`). - An unparsable ANV version counts as affected and is logged. - Nothing without full compute subgroups. The decision is logged once at device creation. 2. **The switch:** `APS5_SPANNED_WAVE` takes a value. - unset: the narrow default, only where detection says yes; - `1`: every single-wave wave64 compute program, as before; - `0`: never; - `tables`: the narrow set on any device with full subgroups. - Anything else is refused at device creation. 3. **The narrow default** (`SpirvTarget::spanTableWaves`): a program that already qualifies for a spanned wave spans when it reads a sampler table, or an image table whose column isn't `selected`. That's the same metadata the emitter uses to decorate table indices. The option is part of the cache key and the serialized request (request version 52). 4. **The guard:** a spanned wave chosen by the narrow default refuses a cross-lane exchange inside a construct opened on a per-invocation condition. These are the per-invocation selections, the compare-exchange retry loop, the LDS lock loop, the elected BDA range search, and an image table's mode switch. It throws `SpannedWaveUnsupported` with the construct named, and the recompiler re-emits at two lanes per invocation, logging that the fused-thread hazard remains for that program. `1` keeps today's behaviour. `docs/dev/ENVIRONMENT.md` and the shader debt entry describe the values and the guard. **Disk cache:** the new target option is in the cache key and the serialized request, so the format moves. The disk-cache format ladder: `main` is at 50, and #7223 is at 51 since yabanana's 7f36e41c45. Ours take one number each: #10000 52, #8939 53, #10489 54, #9457 55, #9633 56, #9749 57, #9790 59, #9969 60, #7642 62, #7395 63 and #10846 64. 58 is held by #10193 (Celegans12). So this PR takes 64, which no other open PR uses (cf19a3c38a; it had 61 before #7395 moved to 63). Whichever lands second on a number takes the next free one. ### Tested - **GitHub's runners**, on #7395's head: - [run 40160345757](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40160345757), at this head (format 59): `request_serializer`, `shader_cache_file_read`, the `agc_shader_disk_cache*` tests, `agc_spanned_wave_policy`, `agc_spanned_wave_guard` and `agc_driver_span_table_choice` pass 10 of 10 on Linux (21 tests, 0 skipped) and on Windows (23 tests; `agc_driver_span_table_choice` skips there, since the runner has no Vulkan device). - The two runs below are on the previous head, whose tree differed only in the format number (51): - [run 40157639409](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40157639409): `agc_spanned_wave_policy` (16 driver cases, the switch's values and refusals), `agc_spanned_wave_guard` (8 exchanges with and without the guard), `agc_spanned_wave_refusal`, `agc_driver_span_table_choice`, `agc_shader_disk_cache` and the other `agc_shader_*` tests pass 10 of 10 on Linux (20 tests, 0 skipped) and on Windows (22 tests). The one skip on Windows is `agc_driver_span_table_choice`, since the runner has no Vulkan device. - [run 40154606647](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40154606647): the validation comparison on Linux (lavapipe). #7395's `agc_driver_nested_sampler_table` and `agc_driver_pointer_phi_sampler_table` and the two new GPU variants pass 10 of 10, and the fix adds no `VUID-`. - The new tests don't build against #7395's own code. - **Red/green** (Linux, Ubuntu 24.04, gcc 13.3, CI flags): - with the option's effect reverted (span condition back to `target.spannedWaves` only), `agc_driver_span_table_choice` fails at its first case ("a sampler table read: the program kept two lanes per invocation"); - with the guard check disabled, `agc_spanned_wave_guard` fails ("a ballot inside a selection: the guard let a spanned exchange inside a per-lane construct through"); - both pass with the change. Every spanned module the choice test emits passes `spirv-val`. - Full ctest on Linux: 2,124 tests, 2,029 passed, 90 skipped and 5 failed; the 5 are IPv6 tests that host cannot run. - **Cost of spanning:** on Resident Evil Village (PPSA01556), with `APS5_SPANNED_WAVE=1` forcing every qualifying program to span, there was no measured cost on one CPU-bound title (NVIDIA GeForce RTX 3070 Laptop GPU, clocks not locked). Over menu + 5 to + 15 min the spanned runs ran at 0.325-0.398 fps and the default runs at 0.350-0.437 fps, inside the spread between runs of the same arm, with no fallback, device fault or hang. A GPU-bound title could still show a cost this one can't. - **Intel Iris Xe Graphics (TGL GT2, `8086:9a49`), Mesa 25.2.8 (ANV), Ubuntu 24.04.5, by @TechLevelZero** ([comment](https://github.com/boykopovar/AnyPS5/pull/10846#issuecomment-6404984573)): 5d04f76ea4, Release, GCC 14. The device-creation line reads `Fused EU threads share texture and sampler handles: 1 (driver 6, minimum compute subgroup 8, full compute subgroups 1)`, so programs that read an image or sampler table span by default. Each result held in 4 of 4 runs: - `agc_driver_nested_sampler_table` and `agc_driver_pointer_phi_sampler_table` pass by default and fail with `APS5_SPANNED_WAVE=0` (`lane 0 is 0x3e800000, expected 0x427d0000` and `lane 0 is 0x427d0000, expected 0x3e800000`); - `agc_driver_span_table_choice` and `agc_driver_table_image_per_workgroup` pass both ways, so per-workgroup images under one sampler aren't hit; - `agc_driver_wave32_sampler_per_workgroup` fails both ways (`workgroup 1 (wrapping S#): lane 0 is 0x427d0000, expected 0x3e800000`): wave32 workgroups are hit too. This PR doesn't change wave32, so that case stays open. - **Not tested:** a title on Intel. lavapipe can't run the spanned path (its subgroup is 8). - **5d04f76ea4, a merge of `main` a5a780eaaa** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40190487798)). `main`'s #10046 includes `TessellationPipelineCache.hpp` where this PR includes `SpannedWaves.hpp`; the merge keeps both, and nothing else conflicted. The spanned-wave, span-table, nested-table, pointer-phi, per-workgroup and `request_serializer` tests pass 10 runs in a row. Linux: 30 run, 30 pass, 0 skip, 0 fail. Windows: 32 run, 22 pass, 10 skip (the execution tests, no Vulkan device), 0 fail. Suites: libc and libkernel pass on Linux (144 and 207) and on Windows (171 and 223). The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **e7d6efe006, after oneandonlydean's review** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40281109779)): `agc_spanned_wave_refusal` passed on either the `APS5_SPANNED_WAVE is "yes"` refusal or the generic no-device text, since `OpenVulkanTestDevice` reports every device failure, the refusal included, as a missing device. It now runs its own `--spanned-wave-refusal` mode: it checks that `ParseSpannedWaveMode` refuses the value before any device opens, then opens the device itself and passes only when the error carries the refusal. Any other failure reports a missing device and skips (`SKIP_RETURN_CODE 77`), or fails under `ANYPS5_REQUIRE_VULKAN`. `agc_spanned_wave_refusal` and `agc_driver_span_table_choice` pass 10 runs in a row on Linux, the refusal test on the refusal text each time: 2 run, 2 pass, 0 skip, 0 fail. Windows, with no Vulkan device: 2 run, 0 pass, 2 skip, 0 fail. On Linux the Khronos validation layer is loaded on both arms and reports only `VUID-VkDeviceCreateInfo-pNext-pNext`, on both. The disk-cache format is unchanged. Suites: libc and libkernel pass on Linux (144 and 207) and on Windows (171 and 223). The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **Intel Iris Xe and NVIDIA on Windows, by @Sumaiter** ([comment](https://github.com/boykopovar/AnyPS5/pull/10846#issuecomment-6441862109)), on e7d6efe006 (base `main` a5a780eaaa): Windows 11 Home 26200, WinLibs GCC 15.2.0 r7, Release, `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1`, one GPU at a time, with the Khronos validation layer (loader-confirmed). - **Intel Iris Xe** (`8086:a7a0`, driver 101.7092), detected as `Fused EU threads share texture and sampler handles: 1 (driver 5, minimum compute subgroup 8, full compute subgroups 1)`: by default `agc_driver_nested_sampler_table` and `agc_driver_pointer_phi_sampler_table` pass (and an extra 3 of 3 runs); with `APS5_SPANNED_WAVE=0` they fail with the swapped lane values (`0x3e800000` against `0x427d0000`). `agc_driver_span_table_choice` and `agc_driver_table_image_per_workgroup` pass in both modes. `agc_driver_wave32_sampler_per_workgroup` fails in both modes, the wave32 Gen12 failure this PR leaves out of scope. - **RTX 4060 Laptop** (621.01), detected as `handles: 0`: all six tests pass, the wave32 one included. `agc_driver_image_table` passes on the base on both GPUs. - No `VUID-` and no missing-layer warning in either tree's logs. No title run. - **00bdd353c1: 2d0f6d9d27 and 00bdd353c1, merges of `main` 16954551ed and 0cd07dc4ab, and bf29270362, a merge of #7395's 9343a179b3** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40643298810)). - **The request serialization version moves to 50.** `main` took 47 (#10515's dithered alpha-to-coverage), 48 (#9193's barycentric built-ins) and 49 (oneandonlydean's #10348, the exported-depth clamp), so this PR's `spanTableWaves` byte, written after the barycentric flag at the end of the request, is version 50, which no other open PR uses. A version 49 request reads with `spanTableWaves` off. The tests that pin the current version move with it, `main`'s new depth-export request test included: its legacy decodes drop this PR's trailing byte before relabelling the bytes as version 48. - **2d0f6d9d27** also keeps `main`'s Scalar buffer descriptors and Guest memory load guards debt entries beside this PR's Spanned wave64 compute one. - **bf29270362** takes #7395's merge of #7223's 153400ba2b and #7395's test-only commit. Clean; `FormatVersion` stays 59. - The request serializer, shader-memory, disk-cache, spanned-wave, span-table, nested-sampler, pointer-Phi sampler, per-workgroup and depth-export clamp tests ran 10 times with no failure. Linux: 31 run, 31 pass, 0 skip, 0 fail. Windows: 33 run, 27 pass, 6 skip (the Vulkan device tests), 0 fail. - Suites: libc and libkernel pass on Linux (166 and 264). On Windows libc passes (194), and libkernel passes 283 of 286: `exec_arguments`, `guest_timed_join_import_libkernel_sys` and `guest_timed_join_import_libkernel_web` fail at their setup in the verify's Windows build (`FileNotFoundError` starting the title, or copying the libraries they load), and pass in `main`'s own Windows job at 1829def9bf ([job](https://github.com/boykopovar/AnyPS5/actions/runs/40627345977/job/122615375186)). The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **965e987d0b, a merge of #7395's ca14648806** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40656589167)): #7395's test-only commit, which drops the nested-sampler test's check that an S# with another consumer is refused. Clean, and this PR's changed lines are the same. The request serializer, shader-memory, disk-cache, spanned-wave, span-table, nested-sampler, pointer-Phi sampler, per-workgroup and depth-export clamp tests ran 10 times with no failure. Linux: 31 run, 31 pass, 0 skip, 0 fail. Windows: 33 run, 27 pass, 6 skip (the Vulkan device tests), 0 fail. Suites: libc and libkernel pass on Linux (166 and 264). On Windows libc passes (194), and libkernel passes 283 of 286: `exec_arguments`, `guest_timed_join_import_libkernel_sys` and `guest_timed_join_import_libkernel_web` fail at their setup in the verify's Windows build (`FileNotFoundError` starting the title, or copying the libraries they load), and pass in `main`'s own Windows job at 1829def9bf ([job](https://github.com/boykopovar/AnyPS5/actions/runs/40627345977/job/122615375186)). The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **4d184c7a7a: 7ba155ee19, a merge of #7395's ca5ba6296f (which carries `main` 38ccd50f83 and with it #11507's `FormatVersion` 49), then a merge of `main` 3a40945e62** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40674488965)). The first is clean: `FormatVersion` stays 59 (see What). In the second, the one conflict was `CacheKey.hpp`, where Gonic0's #12188 (the LDS lock's fences on MoltenVK) appends its `ldsLockFences` target option to the cache key on the line where this PR appends `spanTableWaves`; the merge keeps both. #12188 doesn't add its option to the serialized request, so the request version stays at this PR's 50, above `main`'s 49. This PR's diff over #7395 is the same apart from the `FormatVersion` line's old value. The request serializer, shader-memory, disk-cache, spanned-wave, span-table, nested-sampler, pointer-Phi sampler, per-workgroup and depth-export clamp tests, with #11507's `agc_driver_image_sample_short_cube` and #12188's `agc_spirv_lds_atomic_lock`, ran 10 times with no failure. Linux: 34 run, 34 pass, 0 skip, 0 fail. Windows: 36 run, 29 pass, 7 skip (the Vulkan device tests), 0 fail. Suites: libc and libkernel pass on Linux (171 and 289). On Windows libc passes (199), and libkernel passes 309 of 312: `exec_arguments`, `guest_timed_join_import_libkernel_sys` and `guest_timed_join_import_libkernel_web` fail at their setup in the verify's Windows build (`FileNotFoundError` starting the title, or copying the libraries they load), with `main`'s code too, and pass in `main`'s own Windows job at 1829def9bf ([job](https://github.com/boykopovar/AnyPS5/actions/runs/40627345977/job/122615375186)). The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **d21510c5d2, a merge of `main` f3eb573e6f** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40701711445)). The one conflict was `docs/dev/ENVIRONMENT.md`, where MarcZX10's #12091 corrects `APS5_SPIRV_OPT`'s source path on the row after this PR's `APS5_SPANNED_WAVE` row; the merge keeps this PR's row (a `string`, with its values) and #12091's path. This PR's other changed lines are the same. The request serializer, shader-memory, disk-cache, spanned-wave, span-table, nested-sampler, pointer-Phi sampler, per-workgroup and depth-export clamp tests, with `agc_driver_image_sample_short_cube` and `agc_spirv_lds_atomic_lock`, ran 10 times with no failure. Linux: 34 run, 34 pass, 0 skip, 0 fail. Windows: 36 run, 29 pass, 7 skip (the Vulkan device tests), 0 fail. Suites: libc and libkernel pass on Linux (171 and 289). On Windows libc passes (199), and libkernel passes 309 of 312: `exec_arguments`, `guest_timed_join_import_libkernel_sys` and `guest_timed_join_import_libkernel_web` fail at their setup in the verify's Windows build (`FileNotFoundError` starting the title, or copying the libraries they load), with `main`'s code too, and pass in `main`'s own Windows job at 1829def9bf ([job](https://github.com/boykopovar/AnyPS5/actions/runs/40627345977/job/122615375186)). The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **c21a1ee10c: 7c543151ed, a merge of #7395's e04a705765, and c21a1ee10c, the format commit** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40861569267)). - **7c543151ed** takes #7395's test-only commit d908758281, which drops `agc_driver_nested_image_table`'s two checks that a valid shader is refused (a V# with another buffer consumer and a T# with another consumer), and #7395's merge of #7223's 0dbf5478b2 (yabanana's merge of `main` f7e84c4cf1). The one conflict was `FormatVersion`, which stays this PR's until the next commit. - **c21a1ee10c** gives this PR its own disk-cache format, 61, above #9969's 60 at the top of the #9457 stack. The request version stays 50. Apart from the format line, this PR's diff over #7395 is unchanged. - The pointer, nested, image-table and disk-cache tests with `agc_shader_bindless`, `agc_shader_memory` and 17 other `agc_shader_` tests (table snapshots, selected records, memo budgets and pair layouts), `agc_driver_span_table_choice`, `agc_driver_wave32_sampler_per_workgroup` and the `^agc_spanned_wave_` tests ran 10 times with no failure. Linux: 41 run, 41 pass, 0 skip, 0 fail. Windows: 43 run, 27 pass, 16 skip (the Vulkan device tests; the Windows runner has no Vulkan device), 0 fail. The libc and libkernel suites run 191 and 291 tests on Linux and 220 and 314 on Windows, with 0 failed. They ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **3e250e2538, a merge of #7395's 4769d5a745, which drops "and refusals" from two nested-table test summary lines** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40948802354)). It's clean and brings only that change. The image-table, nested, pointer, disk-cache, bindless, shader-memory and spanned-wave tests ran 10 times with no failure. Linux: 41 run, 41 pass, 0 skip, 0 fail. Windows: 43 run, 27 pass, 16 skip, 0 fail; the 16 skip because the runner has no Vulkan device. The libc and libkernel suites run 191 and 291 tests on Linux and 220 and 314 on Windows, with 0 failed. The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **0a2cf64028, a merge of `main` 6d56eb813c**, which brings beardsciences's #12233. - **The conflict:** `CompiledShaderArtifact` in `Recompiler.hpp`, where #12233 adds `meshWindowBuffer` and this PR adds `spanTableWaves` at the same place. The merge keeps both. - This PR's added and removed lines are unchanged. - `main`'s request serialization version is still 49, so this PR's 50 stays one above it. - **×10** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40987785883)): `request_serializer`, the shader memory, disk-cache, bindless and spanned-wave tests, `agc_driver_span_table_choice`, the per-workgroup and nested table tests, `shader_cache_file_read` and `agc_driver_depth_export_clamp`. - Linux: 33 run, 33 pass, 0 skip, 0 fail. - Windows: 35 run, 29 pass, 6 skip (no Vulkan device), 0 fail. - The libc and libkernel suites run 194 and 294 tests on Linux and 224 and 318 on Windows, with 0 failed. The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **Validation** (`VERIFY_VALIDATION=1` on GitHub's Linux runner, llvmpipe (LLVM 20.1.2), Mesa 25.2.8), `main` 6d56eb813c against this head ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40987973591)): - 33 passed. - `VUID-VkDeviceCreateInfo-pNext-pNext` appears in both arms, and the merge adds none. - **8a30e93470: 9975523ec0, cf19a3c38a and 8a30e93470, merges of #7395's new heads.** - **9975523ec0** takes #7395's merge of `main` a5939f10a8. It's clean: `FormatVersion` stays 61. - **cf19a3c38a** takes #7395's merge of #7223's 7f36e41c45 and its move to 63. The one conflict is `FormatVersion`, which goes to 64, above #7395's 63. - **8a30e93470** takes #7395's lone nested sampler table epoch fix (967f0dbebb) and its test. It's clean. - **This PR's own lines are unchanged** apart from the format line. - **×10 at this head** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41121864917)): the tests above, plus #7395's `agc_shader_nested_snapshot_retry` and `agc_shader_nested_sampler_snapshot_retry`. - Linux: 33 run, 33 pass, 0 skip, 0 fail. - Windows: 35 run, 29 pass, 5 skip (no Vulkan device), 1 fail. The failure is #7223's `agc_shader_nested_snapshot_retry`, which exits with 0xc0000135 before it starts, because its registration doesn't put libc's directory on PATH on Windows. 93c5dae715, below, fixes it. - The libc and libkernel suites run 198 and 306 tests on Linux and 225 and 326 on Windows, with 0 failed. The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **a9458c6c2f, a merge of #7395's merge of `main` 0836dfdf4f** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41240253281), on 58b9927329, which has the same tree). #12862 moved `libSceAgcDriver`'s test registrations into `tests/cmake/`; the conflict in `CMakeLists.txt` is resolved with `tools/agc_test_split.py resolve`, which moves this PR's registrations into `tests/cmake/agc_driver_image_table_tests.cmake` (+12 −2 against #7395's merge) and a new `tests/cmake/agc_spanned_wave_tests.cmake` (+15). Nothing else conflicted. Its disk cache format stays 64, above #7395's 63, and its request serialization version, 50, is still past `main`'s 49. Apart from the move, this PR's diff is unchanged. With `-DBUILD_TESTING=ON`, `ctest -N` gives 3090 tests: `main`'s 3075 plus this PR's and #7395's 15 tests, each listed once. The 12 tests of this PR's verify set ran 10 times in a row. Linux: 12 run, 12 pass, 0 skip, 0 fail. Windows: 12 run, 6 pass, 5 skip (no Vulkan device), 1 fail: `agc_shader_nested_snapshot_retry`, #7223's test, which exits with 0xc0000135 before it starts, because its registration doesn't put libc's directory on PATH on Windows. It failed the same way before this merge ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41121864917) at 8a30e93470), and `resolve` moved its lines byte for byte. Suites: libc and libkernel pass on Linux (199 and 308) and on Windows (226 and 330). The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **751ed9728a, a merge of `main` 0a148be963**, which brings frankea's #13807. - **The request serialization version moves to 52.** #13807 took 51 for its tessellation evaluation subgroup flag, and rejects version 50. This PR's `spanTableWaves` byte is now written after #13807's flag, as version 52, and read only from 52 (`if (version >= 52u)`), so a version 51 request reads with `spanTableWaves` off. Version 50 stays rejected: `version < 1u || version > 52u || version == 50u`. - **The conflicts** were `RequestSerializer.cpp`, `RequestSerializerTests.cpp` and `ShaderMemory.cpp`. Each keeps both flags, `main`'s first. Against `main`, this PR's diff of `RequestSerializer.cpp` is the version number, the write and the read. The tests that pin the current version move to 52, each legacy decode drops both trailing bytes, and the first future version is 53. At 12 places in the tests where both sides made the same one-byte edit for their own trailing byte, which git applied once, the merge now accounts for both bytes. Nothing else conflicted. - **×10** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41266752835)): the 12 tests of this PR's verify set. - Linux: 12 run, 12 pass, 0 skip, 0 fail. - Windows: 12 run, 6 pass, 5 skip (no Vulkan device), 1 fail: #7223's `agc_shader_nested_snapshot_retry`, which exits with 0xc0000135 before it starts, as at a9458c6c2f. 93c5dae715, below, fixes it. - Suites: libc and libkernel pass on Linux (199 and 308) and on Windows (226 and 330). The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **Validation** (`VERIFY_VALIDATION=1` on GitHub's Linux runner, llvmpipe) ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41266758411)): 11 of the 12 pass. `agc_driver_image_table` fails in that mode in both arms, because the mode treats `main`'s `VUID-VkDeviceCreateInfo-pNext-pNext` as a failure. The merge adds no `VUID-`. - **Linux, Ubuntu 24.04, gcc 13.3, CI flags, lavapipe:** the full build passes. The 25 `request_serializer` and `agc_shader_memory_tests` tests pass 10 runs in a row. The 1,188 `^(agc|shader)` tests: 1,113 pass, 75 skip (lavapipe's subgroup size, sample counts and extensions), 0 fail. - No test decodes a version 51 request yet. This PR's span table test checks that a version 52 request with the flag set reads it back, and #13807's test checks its own byte with this PR's at its default. - **NVIDIA RTX 2000 Ada Generation** at 751ed9728a, from TechLevelZero's NVIDIA bot ([report](https://github.com/boykopovar/AnyPS5/pull/10846#issuecomment-6553710352)): driver 595.99.02, Ubuntu 26.04.1, this head merged onto `main` 3741ca9, 2,540 of 3,121 tests selected. - 2,492 passed, 4 failed and 44 skipped. None of the failures is new: 3 also fail on `main`, and 1 is unstable on `main`. - With `VK_LAYER_KHRONOS_validation`, over 946 tests on the GPU, there are no new validation IDs against `main`. 15 of the nested and pointer table tests ran with the layer but aren't in `main`'s baseline, so they weren't compared. - **93c5dae715, a merge of #7395's 5fdf20fc3d,** which gives #7223's `agc_shader_nested_snapshot_retry` libc's directory on PATH on Windows, beside #7395's sampler retry, as oneandonlydean asked ([comment](https://github.com/boykopovar/AnyPS5/pull/10846#issuecomment-6556303603)). It brings in only that line, so the Windows failure noted above is gone. - **×10** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41295300785)): this PR's 12 tests. Linux: 12 run, 12 pass, 0 skip, 0 fail. Windows: 12 run, 7 pass, 5 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 199 and 308 tests on Linux and 226 and 330 on Windows, with 0 failed. The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **Upstream CI's Windows job at this head** ([job](https://github.com/boykopovar/AnyPS5/actions/runs/41301432673/job/124834553455)), merged onto `main` d262000: 2,600 tests, 1,685 passed, 915 skipped, 0 failed. Both retry tests passed. - **NVIDIA RTX 2000 Ada Generation** at 93c5dae715, from TechLevelZero's NVIDIA bot ([report](https://github.com/boykopovar/AnyPS5/pull/10846#issuecomment-6558428072)): driver 595.99.02, Ubuntu 26.04.1, this head merged onto `main` e6f5730, 2,551 of 3,148 tests selected. - 2,499 passed, 7 failed and 45 skipped. None of the failures is new: 3 also fail on `main`, and 4 are unstable on `main`. - With `VK_LAYER_KHRONOS_validation`, over 948 tests on the GPU, one new validation ID: `VUID-vkCmdCopyBuffer-commonparent` in `agc_driver_depth_clear_hle`, which is `main`'s #10791 (#10940 is its open fix). That test is unstable on `main`, and the only change since 751ed9728a's clean run is a Windows-only line. 15 tests ran with the layer but aren't in `main`'s baseline, so they weren't compared. Both nested snapshot retry tests passed on the GPU. ### 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 (stacked on #7395) - [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: #7395; #10359 (valenciana-nc) and #12662 (Gonic0) go before this PR (merge order only: each raises the request serialization version; `main` is at 51 after frankea's #13807, #12662 is at 52 and #10359 at 50, and this PR, at 52, takes the next number after theirs in its `main` merge once they land); merge order with Michael-KD's #11254 (adjacent entries in `docs/dev/debt/shader.md`): whichever merges second keeps both - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: lavapipe (Linux, GitHub), NVIDIA GeForce RTX 3070 Laptop GPU (Windows, the Resident Evil Village (PPSA01556) cost runs with `APS5_SPANNED_WAVE=1`); NVIDIA RTX 2000 Ada Generation (driver 595.99.02, Ubuntu 26.04.1; TechLevelZero's NVIDIA bot); Intel Iris Xe Graphics (TGL GT2), Mesa 25.2.8 (ANV), Ubuntu 24.04, in TechLevelZero's run; Intel's Windows driver not yet - [x] AI-assisted: yes
MarcZX10 commented 2026-10-25 04:42:37 +00:00 (Migrated from github.com)

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

Review: COMMENTED


I reviewed the exact PR head f8018da7a8c56323fab2b9c51ba4182a06453081 against current main, including the table snapshot/materialization changes, SPIR-V emission and guard, serializer/cache versioning, and the new regression cases.

Local checks: python3 tools/check_conventions.py --base upstream/main --head upstream/pr-10846 exits successfully with one debt-length warning at docs/dev/debt/shader.md:198 (3,362 characters); git diff --check upstream/main...upstream/pr-10846 passes. I compiled and ran an isolated C++20 harness against the exact SpannedWaves.hpp that exercises Mesa version parsing, ANV version/minimum-subgroup cutoffs, the Windows-driver policy, and switch parsing; it passed. This was not the repository test target. I could not build the project or run Vulkan tests on this host. I verified run 40160345757 is a successful Linux/Windows verification commit whose parent is this exact PR head; the verification script tests its parent. The other linked runs are earlier heads. The PR itself reports no Intel GPU run yet.

One scope question blocks a confident review of the default policy: FusedThreadHandleSharing treats every VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS device with full compute subgroups as affected, without using a device ID/generation or another signal for Gfx12 fusion. The evidence described here is one Arc run on driver 101.9150, while the reported defect is specifically tied to fused Gfx12 EUs. Could you explain why the default should include all eligible Intel Windows devices, or narrow the detection to the affected hardware? Evidence from a non-Gfx12 Intel device would help establish that the broader rule is needed. The current unit matrix repeats this same policy and therefore does not independently establish which hardware has the fusion behavior.

I found no other substantiated blocker in the code I inspected, but I am not approving this draft without the Intel hardware result and justification for the detection scope.

AI-assisted review: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5641559047 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10846#pullrequestreview-5641559047). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-25T04:42:37Z. **Review:** COMMENTED --- I reviewed the exact PR head `f8018da7a8c56323fab2b9c51ba4182a06453081` against current `main`, including the table snapshot/materialization changes, SPIR-V emission and guard, serializer/cache versioning, and the new regression cases. Local checks: `python3 tools/check_conventions.py --base upstream/main --head upstream/pr-10846` exits successfully with one `debt-length` warning at `docs/dev/debt/shader.md:198` (3,362 characters); `git diff --check upstream/main...upstream/pr-10846` passes. I compiled and ran an isolated C++20 harness against the exact `SpannedWaves.hpp` that exercises Mesa version parsing, ANV version/minimum-subgroup cutoffs, the Windows-driver policy, and switch parsing; it passed. This was not the repository test target. I could not build the project or run Vulkan tests on this host. I verified run 40160345757 is a successful Linux/Windows verification commit whose parent is this exact PR head; the verification script tests its parent. The other linked runs are earlier heads. The PR itself reports no Intel GPU run yet. One scope question blocks a confident review of the default policy: `FusedThreadHandleSharing` treats every `VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS` device with full compute subgroups as affected, without using a device ID/generation or another signal for Gfx12 fusion. The evidence described here is one Arc run on driver 101.9150, while the reported defect is specifically tied to fused Gfx12 EUs. Could you explain why the default should include all eligible Intel Windows devices, or narrow the detection to the affected hardware? Evidence from a non-Gfx12 Intel device would help establish that the broader rule is needed. The current unit matrix repeats this same policy and therefore does not independently establish which hardware has the fusion behavior. I found no other substantiated blocker in the code I inspected, but I am not approving this draft without the Intel hardware result and justification for the detection scope. AI-assisted review: yes.
MarcZX10 commented 2026-10-29 09:11:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T09:11:29Z.

Review: CHANGES_REQUESTED


Re-check — changes requested\n\nThe newer Windows run is useful: it reports Intel Iris Xe passing the two wave64 sampler-table tests by default and failing them with APS5_SPANNED_WAVE=0, while the RTX 4060 passes all six. That supports the affected behavior on this Intel system. It still does not establish why the default predicate should cover every Intel proprietary Windows device with full compute subgroups, including generations without measured fused EU-thread handle sharing. Please either justify that predicate from a reliable device/driver signal or narrow it to the hardware the evidence supports; the unit policy matrix alone repeats the assumption.\n\nThe branch is also stale: head d21510c5d2 is 526 commits behind current main aaccd0ba39, with shared AGC/recompiler paths changed on both sides. Refresh the stack, preserve the cache-version ladder, and rerun the focused Intel/NVIDIA validation-layer tests on the exact integrated head. The maintainer's latest request also identifies valid-but-unimplemented throw pins in the nested-table parent tests; coordinate and carry that single test-policy correction through this child stack.\n\nI did not run GPU tests locally. The earlier report and NVIDIA CI result do not validate this current-main integration.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5695279770 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10846#pullrequestreview-5695279770). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T09:11:29Z. **Review:** CHANGES_REQUESTED --- ## Re-check — changes requested\n\nThe newer Windows run is useful: it reports Intel Iris Xe passing the two wave64 sampler-table tests by default and failing them with APS5_SPANNED_WAVE=0, while the RTX 4060 passes all six. That supports the affected behavior on this Intel system. It still does not establish why the default predicate should cover every Intel proprietary Windows device with full compute subgroups, including generations without measured fused EU-thread handle sharing. Please either justify that predicate from a reliable device/driver signal or narrow it to the hardware the evidence supports; the unit policy matrix alone repeats the assumption.\n\nThe branch is also stale: head d21510c5d279 is 526 commits behind current main aaccd0ba39, with shared AGC/recompiler paths changed on both sides. Refresh the stack, preserve the cache-version ladder, and rerun the focused Intel/NVIDIA validation-layer tests on the exact integrated head. The maintainer's latest request also identifies valid-but-unimplemented throw pins in the nested-table parent tests; coordinate and carry that single test-policy correction through this child stack.\n\nI did not run GPU tests locally. The earlier report and NVIDIA CI result do not validate this current-main integration.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!10846
No description provided.