wave64_halves: recognize UVOTE under non-zero EXEC and boolean UVOTE combinations (SHADER-10) #805
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!805
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/shader10-uvote-nonzero-combine"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Pull request successfully merged and closed
What and why
In
tools/wave64_halves.py, several wave-uniform compare/branch idioms in the retail 1.0.2.1 graphics corpus were conservatively marked Tier C (tainted-branch):s_cbranch_execz/s_cbranch_execnz(st["nz"]): when a block narrowsEXECand immediately skips empty halves withs_cbranch_execz(or enters the non-empty edge vias_cbranch_execnz), every 32-lane half reaching the non-zero edge hasEXEC != 0. A subsequent uniformv_cmp_*(all scalar/immediate non-tainted operands) ANDed withEXECproduces the exact same branch decision in each reaching half as in the full 64-lane wave.n=1: disassemblies often printv_cmp_*_e64 sN, ...with a single-register operand (n=1), whereas wave64v_cmpwrites the 64-bit pairs[N:N+1]. PropagateUVOTEand taint tos[N+1]as well sos_and_b64 vcc, exec, s[N:N+1]seesUVOTEon both halves of the pair.UVOTEcombinations:s_cselect_b64 dst, exec, 0(or0, exec) from an untaintedSCCunder launch/non-zeroEXEC, ands_and_b64/s_or_b64combiningUVOTEmasks (e.g., two uniform compares combined befores_and_b64 vcc, exec, ...), preserveUVOTE.Testing
tests/semantic/test_wave64_halves.py:test_a_uvote_under_nonzero_exectest_c_uvote_under_narrowed_exec_without_execz_guard(negative control: withouts_cbranch_execz, stays Tier C)test_a_uvote_and_or_combinetest_a_uvote_cselect_from_uniform_sccpython3 -m unittest tests/semantic/test_wave64_halves*.py tests/test_w64_graphics*.py: 190/190 passed.wave64_graphics_reasons == ['tainted-branch']: 276 shaders moved out of Tier C (11 Tier A, 265 Tier B).AI-assisted: yes
Tested
3986b73aon Apple M5 Pro, macOS 26.7.3 (25G342), Python 3.15.2, againstmaind42773d07:tests/semantic/test_wave64_halves.py: 130 tests OK at this head.main'stools/wave64_halves.pyfails 2 of 130, so the two new UVOTE classifications are covered.No GPU leg: no
w64_graphicstier fixture exercises UVOTE, and I did not run the tier harness on this head. AI-assisted; synthetic fixtures only, no game data.Follow-up on the latest PR head
3f7e9f2d3a7eb3d2ec1c80f3ef480bf7362f6699(including the WQM/EXEC restore change): I reran the full semantic suite in an isolated Fedora 45 tool container with Python 3.15.2, LLVM and SPIRV-Tools. Result: 465 files, 6,113 tests, 0 files failed in 105 seconds with 16 jobs. This is CPU/interpreter validation only; no Vulkan/GPU execution or game data.Tested 3f7e9f2d on NVIDIA GeForce RTX 3080 Ti Laptop (Ampere, subgroup 32..32), NVIDIA 621.24, Vulkan 1.4.357, Windows 11 Pro (build 26300): pass, GPU regression check
Runtime built at this head with
scripts\build_runtime.ps1(MSVC 19.51); shaders fromruntime/test/shaders/build.pyat this head (llvm-mc23.1.6, SPIRV-Tools 2026.4); thenpython -I runtime/test/shaders/w64_graphics.py <spirv dir> runtime\build, exit 0. No game files.ok, running as two 32-lane halves on this device.SKIP (tier C needs a device that can require both 64 and 32, or W64G_REF).This is the GPU leg the CPU checks above did not cover, but as noted there no
w64_graphicsfixture uses the new UVOTE patterns, so it shows the tier harness still passes on a 32-wide device at this head rather than exercising the new classifications themselves.Rebased onto current
main(871e4b8b9, head62e547220), resolving thetools/wave64_halves.pyconflict withSHADER-W64-WQM-UVOTE(#1091):st["q"]/st["qr"]anduniform_cmp's VGPR refusal outside launchEXEC.st["q"] = quadson thes_wqm_b64 exec, execpath alongsidewqm_basetracking so restoring launchEXECvias_and_b64 exec, exec, s[saved]still restoresst["f"]while clearingst["q"].Verified after rebase (Python 3.14, Arch Linux):
python3 -I scripts/check_no_game_data.py tools/wave64_halves.py tests/semantic/test_wave64_halves.py: passpython3 -m unittest tests/semantic/test_wave64_halves*.py tests/test_w64_graphics*.py: 210/210 passed (including alltest_wave64_halves_wqm_uvote.pycases and NearMisses)python3 -I scripts/run_semantic_tests.py tests/semantic: 484 files, 6,267 tests, 0 failuresAI-assisted: yes
Tested the rebased head
62e547220merged ontomain57ba40bd6(clean merge) on Windows 11 Pro 26300, Python 3.14:tests/semantic/test_wave64_halves.py132 passed. On the same machine (RTX 4060, 621.14)w64_graphics.pyon today'smaingives 18 ok / 12 tier C SKIP / 0 failed; this change touches no GPU fixture, so I didn't rerun it per head.No game files. AI-assisted (Claude Code), run for a non-developer tester.
Red/green: the PR's tests fail on main and pass with this PR (Linux, Python 3.13.18).
Targeted batch of 23 PRs (their tests, the tests importing the changed modules, the docs tests) on main 3ca0707: no new failure, Linux / Python 3.13.
AI-assisted (Claude Code, Claude Opus 5.5)