Skip to content

Coordinating who works on what (57) (moved to #9522) #9401

Done

Description

@KoertLichtendonk

Moved to #9522. Please claim work there.

Activity

  1. HQasper commented on Nov 23, 2026

    @HQasper
    Contributor

    finding: docs/embedded_shaders.md quotes the offsets and sizes of containers carved out of the executable, which both #7416 and #9105 ban

    Where: docs/embedded_shaders.md, section "Retail executable (game_scarlett_master.exe, RT-5)", the line that lists the 10 DXBC containers with their file offsets and sizes. #7416's bullet in AGENTS.md and CONTRIBUTING.md and this PR's excerpt rule both forbid offsets and sizes read out of the executable. Raised by the review of #9105.

    Why it matters: as written, the rules leave that paragraph non-compliant on main, and neither rules PR edits a measurement page. It needs a decision from whoever owns that page: prune the line to what the rules allow (container count, format tags, no offsets or sizes), or allow carved-container measurements in the rules, which is a larger hole than the file's identity.

    Needs no game files and no particular hardware to decide; regenerating the numbers needs the executable, which is not in the repository.

    AI-assisted.

  2. Koro4e commented on Nov 23, 2026

    @Koro4e
    Contributor

    claiming: docs/embedded_shaders.md must not quote the executable containers' offsets and sizes (HQasper's finding above; #7416's rule)

  3. aslan2142 commented on Nov 23, 2026

    @aslan2142
    Contributor

    claiming: BUILD-2659

    Linux; AMD RX 7900 XTX (RDNA3) and a gfx1036 iGPU (RDNA2), RADV / Mesa 26.3.1; Wine 11.22; my own Xbox Series 1.0.2.1 copy where the item needs one. Plan and tests in the PR. AI-assisted (Claude Code, Claude Opus 5.5).

  4. throny commented on Nov 23, 2026

    @throny
    Contributor

    claiming: RT-388
    Windows 11, RTX 4080, AI-assisted

  5. HQasper commented on Nov 23, 2026

    @HQasper
    Contributor

    claiming: AGENTS.md, CONTRIBUTING.md: the REA rule - analysis of the package is allowed locally, nothing it reads may be published (new item)

    Carried over twice: posted in #9065 (comment 7112632632), then in #9235 (comment 7113443766) when the round moved, and the round has moved again. The pull request is #9105, head 69ea3c7f9, 2 files, docs only, mergeable, Depends on: #7416. Its CI is queued on the fork's run, waiting for a maintainer's approval, so the claim stays open until that is read and done: goes in.

    Both reviews are answered at that head: the local-only boundary now names remote services (no AI service, telemetry, cloud log or remote debugging service gets the package or a listing made from it; a private upload is still a transfer), and the executable's name, size and SHA-256 are stated as its one exception - the wording proposed on #7416 - so the identity lines already in docs/runtime_imports.md and docs/embedded_shaders.md stay compliant. The container offsets in the latter page are content, stay banned, and are a finding for whoever owns that page.

    Docs only, no code and no game files needed.

  6. aslan2142 commented on Nov 23, 2026

    @aslan2142
    Contributor

    claiming: BUILD-2693

    Linux; AMD RX 7900 XTX (RDNA3) and a gfx1036 iGPU (RDNA2), RADV / Mesa 26.3.1; Wine 11.22; my own Xbox Series 1.0.2.1 copy where the item needs one. Plan and tests in the PR. AI-assisted (Claude Code, Claude Opus 5.5).

  7. aslan2142 commented on Nov 23, 2026

    @aslan2142
    Contributor

    claiming: BUILD-2864

    Linux; AMD RX 7900 XTX (RDNA3) and a gfx1036 iGPU (RDNA2), RADV / Mesa 26.3.1; Wine 11.22; my own Xbox Series 1.0.2.1 copy where the item needs one. Plan and tests in the PR. AI-assisted (Claude Code, Claude Opus 5.5).

  8. aslan2142 commented on Nov 23, 2026

    @aslan2142
    Contributor

    claiming: BUILD-3190

    Linux; AMD RX 7900 XTX (RDNA3) and a gfx1036 iGPU (RDNA2), RADV / Mesa 26.3.1; Wine 11.22; my own Xbox Series 1.0.2.1 copy where the item needs one. Plan and tests in the PR. AI-assisted (Claude Code, Claude Opus 5.5).

  9. agulerman commented on Nov 23, 2026

    @agulerman
    Contributor

    releasing: provenance for the runtime-windows artifact (my fork is gone; no PR coming)

  10. aslan2142 commented on Nov 23, 2026

    @aslan2142
    Contributor

    claiming: FUZZ-64

    Linux; AMD RX 7900 XTX (RDNA3) and a gfx1036 iGPU (RDNA2), RADV / Mesa 26.3.1; Wine 11.22; my own Xbox Series 1.0.2.1 copy where the item needs one. Plan and tests in the PR. AI-assisted (Claude Code, Claude Opus 5.5).

  11. aslan2142 commented on Nov 23, 2026

    @aslan2142
    Contributor

    claiming: PROC-460

    Linux; AMD RX 7900 XTX (RDNA3) and a gfx1036 iGPU (RDNA2), RADV / Mesa 26.3.1; Wine 11.22; my own Xbox Series 1.0.2.1 copy where the item needs one. Plan and tests in the PR. AI-assisted (Claude Code, Claude Opus 5.5).

  12. aslan2142 commented on Nov 23, 2026

    @aslan2142
    Contributor

    claiming: PROC-473

    Linux; AMD RX 7900 XTX (RDNA3) and a gfx1036 iGPU (RDNA2), RADV / Mesa 26.3.1; Wine 11.22; my own Xbox Series 1.0.2.1 copy where the item needs one. Plan and tests in the PR. AI-assisted (Claude Code, Claude Opus 5.5).

  13. Gevroska commented on Nov 23, 2026

    @Gevroska

    done: clarify measured RDNA2 triangle-edge helper lanes in the Whole-quad mode contract row. PR #9404, claim.

  14. Nevrche commented on Nov 23, 2026

    @Nevrche

    finding: d3d12_vulkan_device has two independent failures on Windows; fixing device slot 78 only unmasks the second.

    1. tiles == 1 (line 6574): the proxy's slot 78 is the Xbox SetFrameIntervalX and shadows PC CreateReservedResource2, so the call returns S_OK with a null resource. Confirmed on this machine: with LEONIDA_XS_FRAME_INTERVAL_SLOT=120 the call reaches the real method and the tiles check passes. Already covered by d3d12_vulkan_device: check PC CreateReservedResource2 behind the Xbox proxy, not through slot 78 #7125, d3d12_vulkan_device_test: reach Device10's CreateReservedResource2 on the inner device #8496 and d3d12_vulkan_device_test: ask the PC device for Device10, since the proxy's slot 78 is the Xbox frame interval #9175, so no new PR from me.

    2. With that check passing, the test fails at cpu_copies line 173: creating a committed texture in a CUSTOM write-back heap returns 0x8007000e, where the host returns S_OK. That is the same mismatch d3d12_heap_properties reports for CUSTOM write-back L0 and CUSTOM write-combine L0 (ours E_OUTOFMEMORY, host S_OK), so it is a separate item and none of the three PRs will make this test pass here. It may be specific to this GPU: the layer logs "upload heaps in system memory (no Resizable BAR)" on it.

    Reproduced on Windows 10 19045, MSVC 19.44.35230, Windows SDK 10.0.26100, Vulkan SDK 1.4.363.0, NVIDIA GTX 1050 Ti (driver 32.0.15.8266, 32-wide subgroups). No game files.

  15. tcurtsinger commented on Nov 23, 2026

    @tcurtsinger
    Contributor

    done: BUILD-3751 #9397

  16. 362 remaining items

  17. simonbronk commented on Nov 23, 2026

    @simonbronk
    Contributor

    Follow-up on the heap stop above (retail 1.0.2.1, local branch; AI-assisted, Claude Code; RTX 5070, 621.24). Shapes only.

    • The overwritten object is a node of a short-lived arena, not a stray allocation. A render-side routine builds a context object on its stack. That context takes ~32 KiB chunks from the title's graphics heap, builds and walks a node graph in them (each node carries an epoch/type word that the walk rewrites), then frees every chunk when the context is destroyed.
    • One of those nodes is still reachable after its chunk is freed. The heap hands the chunk out again, a 256×1 R32G32B32A32 upload (0x1000 bytes of float4) is copied over it, and the next walk dereferences the node: an AV through a vtable, or the heap's bad-free assert, depending on the run's layout.
    • So it is a use-after-free inside the title's own logic. I have not found which runtime answer sends it down this path. Candidates: a refcount or Release return, fence/frame-token completion running a deferred step early, or a flag the context reads from a per-entry table.
    • d3d12_xs: the retail 1.0.2.1 window stays open and accepts input #8977's head built alone on this machine faults earlier, on the console TLS pad at 4 GiB, before reaching this point (it needs the rest of its stack), so it can't be used as a straight A/B yet.

    If anyone with the #8977 stack merged gets past the first CopyTextureRegionX batch, a note of which fence/token answers you run with would help narrow this.

  18. IAmTheSween commented on Nov 23, 2026

    @IAmTheSween

    claiming: bink_index: match refusal wording between target_problem and test_bink_index (#6917 follow-up)

    Windows 11 x64, Python 3.12, synthetic tests only. Fixes 1 failing test in tests/test_bink_index.py. AI-assisted.

  19. emirduran707 commented on Nov 23, 2026

    @emirduran707
    Contributor

    releasing: SHADER-899

    I'm stopping work on this repository, so the row is free again. No PR was opened and nothing was pushed.

    AI-assisted (Claude Code).

  20. crastinator commented on Nov 23, 2026

    @crastinator
    Contributor

    claiming: new item: d3d12_texture_tiles fails under Proton on AMD/RADV because its host reference, vkd3d-proton, loses the device, not the layer. RX 6700 XT, RADV Mesa 26.3.1, Proton CachyOS 11.0 and Proton Experimental 11.0, main 867d922f0: the layer's replay passes both cases. The host run matches 256×256 and then, on 256×240 offset 1, vkd3d-proton logs d3d12_command_queue_execute: Failed to submit queue(s), vr -4 (VK_ERROR_DEVICE_LOST), and the test stops at wait_done(2) (line 199). It's the same with #5951 + #8498 merged (line 217). Plain Wine passes, because Wine's vkd3d reports no tiled tier 2, so the comparison never runs. Plan: skip the native comparison under hostwine::host_is_wine(), as the other host comparisons do; the layer half still runs and checks its pixels. Synthetic resources only, no game files. AI-assisted (Claude Code).

  21. simonbronk commented on Nov 23, 2026

    @simonbronk
    Contributor

    Addendum (same setup): the dangling node is an upload job object. The routine that processes it asks the job for its staging memory and copies 0x1000 bytes there, and that staging block is handed out over the job object itself. The copy overwrites the job's own vtable, and the next virtual call on it faults. Free, reuse and fault all happen on one thread, in that order, so a cross-thread race on the heap is unlikely. The open question is still why a job allocated from the per-call arena outlives the arena: a wait or completion answer that returns early is the main suspect.

  22. dragoso commented on Nov 23, 2026

    @dragoso
    Contributor

    status: BUILD-3746, #9376 at c6baa4a57: the Linux run asked for in my last status is done. Two contributors ran it, and both pass:

    There's no open review and the PR is MERGEABLE, so from my side it's ready for merge.

    AI-assisted (Claude Code).

  23. Luislariosss commented on Nov 23, 2026

    @Luislariosss

    done: TEST-1035 #9684

    AI-assisted.
    agent: yes

  24. Lewandox commented on Nov 23, 2026

    @Lewandox
    Contributor

    claiming: tools/rdna2spirv.py v_readfirstlane_b32 wave32_fragment empty-EXEC fallback via wave32_first_running_lane

  25. sh1shu1 commented on Nov 23, 2026

    @sh1shu1
    Contributor

    Closing the "early int3" question from my two data points above (Intel i7-8700, 16 GB, RTX 4070 SUPER 616.92, Windows 11 26200): it is the Windows commit limit, not a race and not the step-over. The title's second XMemAllocatePhysicalPages asks for 99,776 pages (6.1 GiB) and the shim on main charges that as one SEC_COMMIT section; with 16 GB of RAM, a 5 GB page file and about 7 GB held by other programs, free commit sat near that line, so runs passed or failed by what else was resident (0 of 5 once the shader translation had grown; 3 of 8 before). #7556 (commit on first touch) makes it 3 of 3 past that point to stop 26; check posted there. Two consequences for anyone measuring on 16 GB: run the boot with nothing large resident, and do not run make_game's six translator shards at the same time (one of mine died of MemoryError at the same commit limit, 26,502 of 26,503 validated in that pass; the shard is being redone). Page file raised to a fixed 16 GB here as the machine-side mitigation. AI-assisted (Claude Code, Claude Fable 5.1).

  26. bluemagic3 commented on Nov 23, 2026

    @bluemagic3

    status: D3D-960 reproduces on Blackwell desktop, stable across three re-runs. Under the pair the mesh module stores nothing at all into its output slot — not a wrong offset — and the same pair-arm SPIR-V is byte-exact correct on a second vendor.

    Setup. RTX 5090 desktop, NVIDIA 621.14 (nvoglv64.dll 32.0.16.2114, Vulkan 1.4.357), Windows 11 26H2, SDK 1.4.363.1, MSVC 19.51, llvm-mc 23.1.8, main at 5d74c2723 via scripts/build_runtime.ps1. Synthetic repo fixtures only, no game files. python -I scripts/run_gpu_tests.py --build runtime/build --llvm-mc <path> --filter ms_, one arm per process; harness banner device: NVIDIA GeForce RTX 5090 (subgroup 32..32).

    arm ms_clip ms_f16_pack ms_tri ms_v5_workgroup ms_w64x_ballot ms_wave_info_s3
    MESH_COMPUTE=1 W64_EMULATE=1 pass pass fail pass pass fail
    MESH_COMPUTE=1 W64_EMULATE=0 pass pass pass 4096/4096 pass skip (no 64-wide) fail
    MESH_COMPUTE=0 W64_EMULATE=1 pass pass pass 4096/4096 pass pass fail
    MESH_COMPUTE=0 W64_EMULATE=0 pass pass pass 4096/4096 pass skip fail

    Three re-runs of arm 1: same verdict, readback SHA-256 d374fefe7705b224 on all four. ms_tri is the only pair-correlated failure among the six. ms_wave_info_s3 fails in all four arms and is not pair-related on this card; its own header says mattr: +wavefrontsize64,-wavefrontsize32 and run_gpu_tests.py's no64 skip covers only ms_w64x_ballot, so on a 32-wide device it is judged where it may be meant to skip. Separate item, keeping it out of this one.

    The buffer underneath the empty readback. The failing readback holds one distinct value across all 4096 pixels — the render-pass clear vk_harness sets to -1 on all four channels, commented marks untouched pixels — so it is indistinguishable from zero coverage. I patched vk_harness locally (uncommitted) to fwrite the mesh output buffer to VKH_MESH_DUMP=<file> after the queue wait (host-visible, host-coherent, no flush needed) and to allocate 8× the slot, so a misplaced store would land inside the same buffer rather than outside it.

    fixture arm header vtx/prm non-zero in the 3088 B slot non-zero anywhere in 24704 B covered px
    ms_tri pair (0, 0) 0 0 0
    ms_tri mesh-compute only (3, 1) 33 33 4096
    ms_clip pair (3, 1) 39 39 2048
    ms_w64x_ballot pair (3, 1) 33 33 4096
    ms_f16_pack pair (3, 1) 46 46 4096
    ms_wave_info_s3 pair (0, 0) 0 0 0

    The method validates itself: the same fixture one arm over writes 33 bytes at offset 0. So under the pair the workgroup stores nothing into its slot, nothing into the header, and nothing anywhere in the 8× region — which rules out a stride or offset disagreement in the slot layout. The harness banner confirms 1 workgroups x 3088 bytes, so the dispatch dimensions are non-zero. Three of the four fallback fixtures write correct headers with the pair on, and ms_w64x_ballot is ms_tri's own picture produced by ballot/v_mbcnt compaction across both halves — the fixture that depends most on the emulation being right. It is fine. The plainest mesh body in the set is the only one that goes silent, and its compaction-free export path is the difference.

    Swap test. vk_harness by hand, mesh module from one arm × mesh_vs.spv from the other. Everything harness-side identical: dispatch {1,1,1} (harness-initialised; only --mesh-group-readback changes it), slot buffer sized from the module's own slot_bytes, and vkCmdPipelineBarrier(COMPUTE→VERTEX, SHADER_WRITE→SHADER_READ) issued between dispatch and draw at vk_harness.cpp:1102 — so neither a dispatch-dimension variable nor a missing dependency is in play.

    mesh module generated VS slot written?
    emulated emulated no
    emulated non-emulated no
    non-emulated emulated yes, 4096/4096 exact
    non-emulated non-emulated yes, 4096/4096 exact

    The VS variant is immaterial; the failure tracks the emulated mesh module. index.json's mesh_compute layout is byte-identical between the arms (slot_bytes 3088, address_dwords [36, 37], vertex_stride 32, primitive_stride 16, push_constant_bytes 152, 64 primitives), so it is not a contract disagreement either.

    Second vendor. @adamraskin already covered this chip for W64_EMULATE=1 alone in #9235, so this is an extension, not a new control: the same Ryzen 7 9800X3D iGPU (gfx1036, amdvlk64.dll file version 9.2.10.353, banner device: AMD Radeon(TM) Graphics (subgroup 32..64)), driven by VK_DRIVER_FILES pinned to that one ICD, running the pair-arm .spv files that fail on the 5090 — the full pair, not one flag. All six fixtures pass, and ms_tri's readback is SHA-256 cf7df6a5f1736e88, identical to the NVIDIA non-emulated arm's output. Same machine, same harness, same descriptors, same 152-byte push block; the only difference is which driver compiled the module.

    device arm ms_tri slot covered px readback sha
    NVIDIA 5090, 621.14 pair (0,0), 0 B 0 d374fefe7705b224
    NVIDIA 5090, 621.14 mesh-compute only (3,1), 33 B 4096 cf7df6a5f1736e88
    AMD iGPU, 9.2.10.353 pair (3,1), 33 B 4096 cf7df6a5f1736e88

    What I think the board now says, and one cheap test. Putting the data points together: fails on RTX 5090 Laptop / 621.35 (the report), fails on RTX 5090 desktop / 621.14 (here); does not reproduce on GTX 1070 / 582.78 (#313), on RTX 3050 Laptop / 620.73.04 Linux (#313), or on this iGPU (#9235, and the pair above). Every failing point is Windows on a 621.x driver, and every NVIDIA non-repro is on a 5xx/620.x driver — so arch and driver branch are confounded, and I can't separate "Blackwell" from "the 621.x branch" from here. @svds12343, you have the card that breaks the tie at no cost: your RTX 3070 on a current 621.x driver. If the pair fails there too, this is a driver-branch regression and the translator is likely blameless; if it passes on 621.x, it is Blackwell-specific and the translator's round loop deserves the suspicion. The emulated ms_tri is 733 disassembly lines against the passing module's 615, adding OpSwitch, two OpLoopMerge, two OpAtomicIAdd, two OpUMod, five OpLogicalNot and a third OpControlBarrier, and it has more store sites than the passing module (86 vs 73), so the epilogue was not optimized away.

    One candidate, unverified. If the emulated global-lane index works out differently from s3[27:24]*64 + v_mbcnt, the exporting lanes never qualify and nothing is stored at all, header included — which is what the buffer shows. The fixture that tests precisely that quantity, ms_wave_info_s3 ("verifies s3[27:24] == local_index / 64 across all 128 lanes"), fails on the 5090 in every configuration and passes on the iGPU. One hypothesis covering both.

    Validation, and a correction. My earlier 'validation is silent' was worth nothing, and the reason is worth recording because it also explains why a second-vendor control kept failing: this shell is elevated, and the loader ignores VK_INSTANCE_LAYERS and VK_LOADER_LAYERS_* for an elevated process — its own debug output says so. Re-run non-elevated with vk_layer_settings.txt beside the binary requesting synchronization and GPU-assisted validation: the loader's INFO | LAYER lines show Insert instance layer "VK_LAYER_KHRONOS_validation" and Inserted device layer for the same DLL, and the run is byte-identical (d374fefe7705b224, slot still (0,0)) with no validation error or warning. Two honest limits on that: I did not independently confirm the two optional features were active, so read it as core-validation-clean, and core validation cannot see stores through the raw device address in push-constant dwords 36–37 anyway. Consequently the dump separates "written to the wrong place inside the buffer" from "not written", but it cannot separate "the workgroup ran and its export guard failed" from "the driver dropped the compute dispatch" — the 8× buffer argues against a nearby stray store, not against a silently skipped dispatch.

    Next I'll try to reduce this to a small SPIR-V reproducer, and I'll post the VKH_MESH_DUMP change as a harness patch if it's wanted — 6 lines, and it is what turned this from guessing into measuring.

    Written with AI assistance.

  27. sh1shu1 commented on Nov 23, 2026

    @sh1shu1
    Contributor

    done: new RT-5 docs item # — docs/retail_boot_intel_host.md: the boot on an Intel 16 GB host (stops that hold with #7111, the commit-limit stop #7556 clears, the frame loop to the 900 s timeout with stubs, the layer's refusals incl. the mesh-shader subobject). AI-assisted (Claude Code, Claude Fable 5.1).

  28. ThiagoFraga761 commented on Nov 23, 2026

    @ThiagoFraga761

    FUZZ-crosslane: findings from seeds 1 and 7 on RDNA4 (wave32/wave64 native and emulate)

    Running tools/crosslane_fuzz.py with several configurations on a Linux/RADV native-RDNA4 setup turned up findings across all three wave modes. Posting here per the coordination rule before attempting any fix. Finding E is the standout: a two-line wave64 native mismatch (not an emulate path, not tier C), suggesting a real divergence from hardware in how vcc_hi is read as data.

    Environment

    • GPU: AMD Radeon RX 9070 XT (Navi 48, RDNA4, gfx1201)
    • Driver: Mesa RADV 26.2.5, Vulkan 1.4.354
    • OS: Fedora 44, kernel 7.2.13
    • LLVM 22.1.8 (amdgcn), SPIRV-Tools v2026.1
    • Commit: 5d74c272363f2703265d44e6aaab1a1df8ddfaf3

    What else was clean (full match, 0 mismatches)

    • valu_fuzz --family f16 --programs 300 --wave both → 600/600 match
    • valu_fuzz --family f16 --programs 100 --seed 42 → 200/200
    • valu_fuzz --family mem --programs 100 --seed 42 → 200/200
    • lds_fuzz --programs 100 --seed 7 → 200/200
    • image_fuzz --programs 50 --seed 7 → 50/50

    Runtime suites: ctest 64/64, check.py 208/211 (3 mesh skips), run_gpu_tests.py 224/241 (16 Windows/mesh skips), all 0 fails.

    Crosslane runs with mismatches

    Config wave32 wave64 emulate wave64 native
    --programs 50 --seed 1 23/25 (1 mismatch, 1 hyp_only) 22/25 (3 mismatch) —
    --programs 50 --seed 7 --dpp 24/25 (1 mismatch) 23/25 (2 mismatch) —
    --programs 50 --seed 7 --w64-native 23/25 (2 hyp_only) 24/25 (1 mismatch) 24/25 (1 mismatch)

    ⭐ Finding E — wave64 native mismatch, minimized to 2 lines

    cs_xl64_700024 (--seed 7 --w64-native), ops: bcnt, cmp, exec, maskdata, mbcnt_data, permlane, readlane, salu, valu, writelane.

    Minimized:

    v_cmp_ge_u32_e32 vcc, 8, v1        ; v1 = mbcnt = lane id; VCC = (8 >= lane) per lane
    v_mov_b32_e32 v2, vcc_hi            ; read upper half of VCC as data

    Result (every wave 0 lane):

    • Expected v2 = 0x00000000 (VCC hi half holds bits 32-63 of the mask; 8 >= lane is false for lanes ≥ 9, so hi half = 0)
    • Got v2 = 0xffffffff from the translated SPIR-V

    Same program also mismatches on v3 = 0xfffffffe (expected 0) and v6 = 0x0001ffff (expected 0).

    This happens in wave64 native mode (+wavefrontsize64,-wavefrontsize32, subgroup size 64 on RDNA4), not in a 32-wide emulation path, so it isn't covered by the tier-C approximations documented in wave64_halves.py. Looks like the translator's lowering of vcc_hi-as-data forgets the upper mask bits in the native case.


    Finding A — cs_xl32_100023 (wave32 native, --seed 1)

    Ops: bcnt, branch, cmp, cndmask, exec, mask_salu, maskdata, mbcnt, readfirstlane, readlane, readlane_w32hi, salu, valu. Representative: thread 1 s14 expected 0x244116e8, got 0x2441171a.

    s_mov_b32 exec_lo, 0xbee61322
    v_cmp_ne_u32_e64 s16, v3, v1
    v_cmpx_ne_u32_e32 43, v5
    s_cbranch_execz @1
    v_mov_b32_e32 v4, s16
    v_mov_b32_e32 v3, s16
    ;@END1
    s_andn2_b32 s20, s16, s16
    s_and_saveexec_b32 s22, s16
    v_cmp_ge_u32_e32 vcc_lo, 22, v2
    v_writelane_b32 v4, s10, 17
    v_cmp_lt_u32_e64 s18, v4, v1
    v_cmp_eq_u32_e64 s16, v1, v1
    v_cmp_ne_u32_e64 s20, v3, v1

    Finding B — cs_xl64_100014 (wave64 emulate, --seed 1)

    thread 0 s12 expected 0x00000000, got 0xc19d71ee.

    s_mov_b32 exec_lo, 0x9041db3c
    v_cmp_eq_u32_e64 s18, v3, v6
    v_mov_b32_e32 v3, s18
    v_readfirstlane_b32 s14, v3

    Finding C — cs_xl64_100026 (wave64 emulate, --seed 1)

    thread 2 v2 expected 0x74cd0ebc, got 0xffffffff.

    v_cmp_lt_u32_e64 s[16:17], v1, v2
    s_mov_b32 exec_lo, 0x0
    s_mov_b32 exec_hi, 0x9ca57b89
    v_mov_b32_e32 v3, s16
    v_readfirstlane_b32 s14, v3
    v_readfirstlane_b32 s12, v2

    Finding D — cs_xl64_100034 (wave64 emulate, --seed 1)

    s_bcnt0_i32_b64 s10, exec after EXEC narrowing: s10 expected 0x00000010, got 0x0000000f (off-by-one, consistent across all threads).

    s_cbranch_execz @0
    s_mov_b32 s28, 24
    v_readlane_b32 s14, v3, s28
    s_mov_b32 exec_lo, 0xcb751c83
    s_mov_b32 exec_hi, 0x3
    v_readlane_b32 s13, v6, 2
    v_mbcnt_hi_u32_b32 v4, s13, v7
    ;@END0
    v_cmp_le_u32_e64 s[18:19], v1, v6
    v_mov_b32_e32 v5, s18

    Finding F — cs_xl32_700035 (wave32 native, --seed 7 --w64-native, has a hypothesis op)

    v5 expected 0x4be55d95, got 0xffffffff on alternating lanes.

    v_cmp_ne_u32_e64 vcc_lo, v3, v7

    Reproducers

    # All four seed-1 findings:
    python3 -I tools/crosslane_fuzz.py --programs 50 --seed 1 --minimize --keep /tmp/xl_seed1
    
    # Finding E (wave64 native) and F (wave32 native with hypothesis):
    python3 -I tools/crosslane_fuzz.py --programs 50 --seed 7 --w64-native --minimize --keep /tmp/xl_seed7
    
    # DPP sweep adds two more wave64 emulate mismatches at seed 7:
    python3 -I tools/crosslane_fuzz.py --programs 50 --seed 7 --dpp --minimize --keep /tmp/xl_dpp_seed7

    My prior: A, B, C, D, F fit the tier-C pattern already documented (cross-half mask read, bcnt of a modified EXEC, readfirstlane of a per-lane mask). E is the one I'd prioritise — vcc_hi on wave64 native with no EXEC manipulation and no emulate flag.

    Not opening a fix PR; holding here so nobody duplicates reproduction work. Happy to minimize further, add more seeds, or attach the full .asm files. Let me know if any of these map to an existing SHADER-/FUZZ- item I missed.

  29. ThiagoFraga761 commented on Nov 23, 2026

    @ThiagoFraga761

    Follow-up on Finding E — tried the obvious patch, hit regressions, reverted.

    Hypothesised root cause

    Gen.src_u in tools/rdna2spirv.py:

    • lines 474-478: vcc_hi as source does OpLoad %uint %vcc when wave64 and 'vcc' in self.cur_masks
    • lines 492-494: vcc_lo / vcc as source does OpLoad %uint %vcc unconditionally

    %vcc holds this one lane's own bit (0 or ~0, like %active does for EXEC). Reading it as a word gives "every lane its own answer" — the exact failure mode already documented in the docstring of Gen.lane_mask_word just above line 5712:

    A register holds only this lane's 0 / ~0, so reading it as data gave every lane its own answer.

    lane_mask_word already does the right thing (uses wave_mask, which does a OpGroupNonUniformBitwiseOr ballot and returns the half asked for), and 4 call sites use it (s_flbit_i32_b32, s_flbit_i32, two wave_mask calls further in). src_u doesn't.

    Patch I tried

    elif k == "special" and a["t"] == "vcc_hi":
        if self.wave64 and self.holds_lane_mask(a):
            v = self.lane_mask_word(a)
        else:
            v = self.tmp()
            self.emit(f"{v} = OpLoad %uint %vcc_hi")
    ...
    elif k == "special" and a["t"] in ("vcc_lo", "vcc"):
        if self.holds_lane_mask(a):
            v = self.lane_mask_word(a)
        else:
            v = self.tmp()
            self.emit(f"{v} = OpLoad %uint %vcc")

    What broke (on RX 9070 XT, RADV Mesa 26.2.5, same commit as before)

    • runtime/test/shaders/check.py: 208 → 206. Two regressions:
      • ps_wqm: 1280 of 4096 pixels differ from the whole-quad expectation (pixel shader, wave32).
      • cs_w32_partial_scmp: now failing (wave32 compute).
    • tools/crosslane_fuzz.py --programs 5 --seed 7 --w64-native: 5/5 programs now "not translated" (both wave64 modes) + 1/3 in wave32 native. The translator rejects them — lane_mask_word goes through wave_mask, which relies on the park_masks / x_tok analysis, and these short fuzzer programs either don't set up the preconditions or trigger an Unsupported path along the way.

    Reverted. The naive fix is the wrong shape:

    1. vcc_lo in wave32 is already the whole mask — the pre-existing path is "right enough" for most compiled shaders because the real pattern is v_cmp ... -> s_* on vcc where the opcode handler itself goes through wave_mask, not src_u. Forcing lane_mask_word in the generic src_u fallback pulls in a ballot the opcode already did, so results don't agree.
    2. holds_lane_mask accepts cases that lane_mask_word currently can't synthesise exactly in all contexts (needs the mask-analysis side table; fuzzer programs without the precondition fall out).

    Reproducers

    • Finding E: python3 -I tools/crosslane_fuzz.py --programs 50 --seed 7 --w64-native --minimize
      • cs_xl64_700024 [native]: v_cmp_ge_u32_e32 vcc, 8, v1 ; v_mov_b32_e32 v2, vcc_hi → expected 0x00000000, got 0xffffffff.
    • Regressions from the patch above: python3 -I runtime/test/shaders/build.py <out> then python3 -I runtime/test/shaders/check.py <out> runtime/build (ps_wqm and cs_w32_partial_scmp fail), plus crosslane_fuzz --programs 5 --seed 7 --w64-native (programs not translated).

    Leaving Finding E on the table, not opening a fix PR. The right fix likely narrows the condition (opcode-level, not src_u), adds mask preconditions, and adds a GPU test for the direct v_mov_b32 v, vcc_hi after v_cmp case alongside ps_wqm so it stays green.

  30. ThiagoFraga761 commented on Nov 23, 2026

    @ThiagoFraga761

    Second attempt on Finding E — narrower patch, better news on compiled shaders and wave64 emulate, but wave64 native rejects most fuzzer programs. Reverted again.

    Narrower patch (only vcc_hi as source, only when wave64 and 'vcc' in self.cur_masks; vcc_lo/vcc left alone):

    elif k == "special" and a["t"] == "vcc_hi":
        if self.wave64 and "vcc" in self.cur_masks:
            v = self.lane_mask_word(a)
        else:
            v = self.tmp()
            self.emit(f"{v} = OpLoad %uint %vcc_hi")

    Results on RX 9070 XT, RADV Mesa 26.2.5, same commit

    Suite Baseline With patch
    runtime/test/shaders/check.py 208/211 (3 skip, 0 fail) 208/211 (3 skip, 0 fail) ✓ no regression
    crosslane_fuzz --w64-native --programs 50 --seed 7, wave32 native 23/25 match 23/25 match, 2 hyp_only (same as before)
    ... wave64 emulate 24/25 match, 1 mismatch 25/25 match, 0 mismatch ✓ Finding B/C/D-style ones vanish
    ... wave64 native 24/25 match, 1 mismatch (Finding E) 1/25 match, 24/25 rejected (not translated) ✗

    So the narrow patch is right in spirit: all compiled shaders (check.py), and the wave64 emulate path, go from "something fails" to "nothing fails". But in wave64 native the translator now refuses to translate 24 of 25 fuzzer programs — somewhere down the lane_mask_word → wave_mask path a non-emulate, non-wave32-fragment branch raises Unsupported for these synthetic sequences that it accepted when the old code just emitted OpLoad %uint %vcc.

    wave_mask has three paths (around line 5790-5815): self.emulate, self.wave32_fragment, and else (the OpGroupNonUniformBitwiseOr path with self.uses_wave_bits = True). The wave64-native fuzzer programs end up in the else path, and something there — park_masks precondition, or an opcode handler later that assumes src_u for vcc_hi returned the lane-local word — makes it bail.

    Reverted. Posting this so the real fix doesn't have to redo the same experiment:

    • the narrow condition (wave64 + vcc in masks, vcc_hi only) is the right scope,
    • check.py and the wave64 emulate crosslane fuzz pass clean with it,
    • wave64 native wants either a tweak in wave_mask to survive these shapes, or a different materialization (perhaps using the ballot path directly without going through wave_mask's cache / x_tok preconditions), or an opcode-level fix (v_mov_b32 v, vcc_hi gets its own path, same as s_flbit_i32_b32 does today) rather than a src_u fallback.

    Happy to follow up with a GPU test for the 2-line case (cs_bounds.asm-style) once the direction is picked, so the next regression round is caught before merge.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions