Repository navigation
Conversation
|
Verified against main 1cc6e3c: merges cleanly; test_user_sgpr_preload.py runs Ran 9 OK, and forcing the preload decision to all-32 or to none fails 3 and 10 checks respectively, so the live-in analysis is exercised in both directions rather than passing vacuously. shader_meta (27), rootsig_census (25), pc_tail_ubo, metal_set0 (24), the movrels family and wave64_emulate_opt (29) all stay green on the merged tree, and the conservatism arguments hold up (movrels→all-32; ignoring v_cmpx writes only grows the live-in set; compare_x does read only the high half). One flag: the branch reports no CI checks at all — worth a push before merge. AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only run). |
|
Tested
The compute output on both adapters was I set I built py -3.14 -I scripts/run_gpu_tests.py --build E:/Leonida-review-work-build --work E:/Leonida-review-work-build/review-fixtures --filter cs_user_sgprs --require-pass
py -3.14 -I scripts/run_gpu_tests.py --build E:/Leonida-review-work-build --work E:/Leonida-review-work-build/review-fixtures --filter ms_w64x_ballot --require-passBoth synthetic shaders passed SPIR-V validation on each run. All nine tests in |
|
Tested Full
Not run: the game corpus, Windows/AMD's own driver, fuzzers. AI-assisted (Claude Code). Synthetic fixtures only, no game files. |
|
Tested
|
|
Tested on NVIDIA GeForce GTX 1080 (Pascal, subgroup 32), Linux (Ubuntu 26.04.1), driver 580.178.04. No game files.
Every PASS/FAIL/SKIP row and its words are identical to main (the one failure, ms_wave_info_s3, is on main too: SHADER-766, #5741). AI-assisted. |
0c9f9d7 to
6099b7c
Compare
|
Rebased onto
AI-assisted. Synthetic fixtures only, no game files. |
|
Tested Ran build.py + check.py and scripts/run_gpu_tests.py, native and with
No new failures. The one failure, |
|
Tested
Coordination claim. AI-assisted. |
|
Tested 6099b7c on RX 5700 XT (RDNA1, gfx1010, RADV NAVI10), Mesa 26.3.1, Linux 6.18: pass
LLVM AI-assisted (Claude Code). |
|
Tested
No game files. AI-assisted (Claude Code). |
|
Tested 6099b7c on RX 7900 XTX (AMD 32.0.32029.2010), Windows 11: pass, no regression against
No Intel Arc here, so the Environment: Windows 11 Pro 26200, AMD Radeon RX 7900 XTX (RDNA3, AMD Windows driver 32.0.32029.2010, Vulkan 1.4.359, subgroup 32..64), selected with |
Claimed in the coordination issue as: TEST-592 (#5781 (comment))
What and why
Fixes
ms_w64x_ballotcrashing with0xC0000409(STATUS_STACK_BUFFER_OVERRUN) insideigvk64.dllunderLEONIDA_W64_EMULATE=1on Intel Arc A770/A750 Windows (TEST-592).Bisection on Intel Arc A770 (Windows driver
32.0.101.9175, Vulkan1.4.359) isolated two halves of the failure:vkCmdDrawMeshTasksEXT:vkCreateGraphicsPipelinessucceeds, butvkCmdDrawMeshTasksEXTcrashes with0xC0000409insideigvk64.dll(offset0x618fd5) whenever aVK_EXT_mesh_shader(MeshEXT) pipeline keeps any livePushConstantload at byte offset >= 32 (dword index >= 8). Straight-line wave32ms_tripasses reading dword 7 (offset 28) and crashes reading dword 8 (offset 32) or%UserDatamember 1 (offset 128), independent ofOpTypeArrayvs. flat struct,VkRenderPassvs. dynamic rendering, descriptor-set layout, subgroup size, or push-constant range size (128/144/256).tools/rdna2spirv.py:ms_w64x_ballothas zero live-in user SGPRs (s3is overwritten at entry by%mwi;s4ands6..s13are scratch registers written before read), yetassemble()unconditionally preloaded all 32 user SGPRs (s0..s31) from%user_datainto%sgpr[0..31]. UnderLEONIDA_W64_EMULATE=1(emulated wave64 rounds),s10is written incase 2and read incase 4, so IGC kept dead%ud10(PushConstant[0][10], offset 40) alive as a loop-carried PHI entry value.Changes:
tools/shader_meta.py: adds_preload_rwandlive_in_user_sgprs(blocks, succ, user_sgpr_limit=32, system_sgprs=()), computing user SGPRs (0..31minus entry-overwritten system SGPRss3on MS/GS andtgidslots on CS, without capping atg.cs["user"]) that may be read before must-write; conservatively falls back to all non-system0..31whens_movrels_*is present. Leavesindex.json'suser_sgpr_reads(analyse_instructions) unchanged.tools/rdna2spirv.py: wireslive_in_user_sgprsinto both straight-line and multi-blocktranslate()paths and preloads onlygen.user_sgpr_preloadat%entry(directGen()callers default toNoneand keep all 32 preloads).%UserDatapush-constant layout (144/128/152bytes) and zero-initialized%sgpr(%null_s) are unchanged.tests/semantic/test_user_sgpr_preload.py: adds 9 regression tests covering emulatedms_w64x_ballot, live-in vs. scratch SGPRs, single-arm vs. both-arms conditional writes, RMW scalar ops (s_addk_i32,s_cmov_b32,s_bitset1_b32),v_cmpx_eq_u32_e64, dynamics_movrels_b32, compute reading pastrsrc2.userwhile skippingtgid, and directGen().docs/design.md&docs/testing.md: documents the live-in preload rule in theUser datacontract row and adds the Intel Arc WindowsvkCmdDrawMeshTasksEXTPushConstant >= 32row toKnown problems.Tested
0x8086:0x56a0), Windows 10 IoT Enterprise LTSC 2024 (24H2, build26100.9974), Intel driver32.0.101.9175, Vulkan1.4.359(instance1.4.350, subgroup8..32),llvm-tools 23.1.6,spirv-tools 2026.4.LEONIDA_W64_EMULATE=1 python -I scripts/run_gpu_tests.py --filter ms_w64x_ballot->PASS ms_w64x_ballot 4096/4096 pixels exact(1/1, previously crashed0xC0000409; re-verified after rebase onto8c8c1de1c).scripts/run_gpu_tests.py, tested on561b65a83base before clean rebase onto8c8c1de1c):LEONIDA_W64_EMULATE=0):167/232passed,64skipped,1failed (ms_wave_info_s3, unchanged baseline regression tracked by rdna2spirv: %ms_counts is stored atomically by whichever wave sends; ms_wave_info_s3 draws nothing on main on most GPUs (SHADER-766) #5741).LEONIDA_W64_EMULATE=1):198/232passed,33skipped,1failed (ms_wave_info_s3; up from197/232,ms_w64x_ballotnow passes).--seed 1 --programs 100):valu_fuzz.py --family f16,valu_fuzz.py --family mem, andlds_fuzz.pyall100/100match in both--wave 32native and--wave 64 --emulate.LEONIDA_REQUIRE_SPIRV_TOOLS=1):python -m unittest discover -s tests/semantic -v:6,159tests OK (expected failures=1,0unexpected failures on finaltools/code prior to finaldocs/design.mdedit).python -I tests/semantic/test_user_sgpr_preload.py -v:9/9OK (re-run after rebase onto8c8c1de1c).python -m compileall -q make_game.py tools tests,python -I make_game.py --help,tests/test_shader_meta.py(27/27),tests/test_shader_meta_operands.py(5/5),tests/test_text_write_line_endings.py(3/3), and all 11tests/test_docs_*.pysuites: all OK (re-run after rebase onto8c8c1de1c).--limit 200 --wave64-emulate(no--f16-interp-fallback): before200/200translated &spirv-val-valid -> after200/200translated &spirv-val-valid (0regressions).--wave64-emulate --f16-interp-fallback(auto-selected on Arc withoutVK_KHR_fragment_shader_barycentric): before26,296/26,503translated &spirv-val-valid (207refused for computed I/J under--f16-interp-fallback) -> after26,296/26,503translated &spirv-val-valid (0regressions; total.spvoutput shrank by50,239,944bytes /-47.9 MiB).AI-assisted: yes (Antigravity coding agent drove the bisection, implementation, and local test runs on the machine above).
Checklist
docs/design.md, with how it was confirmed.