Repository navigation
Conversation
|
Tested 3ca7c3c on Arch Linux, Python 3.14.10, CPU only: pass — tests/semantic/test_atomic_ds_liveins.py 11/11 OK. Negative control: same file against the merge-base's tools/rdna2spirv.py fails 37 subtests, so it discriminates the live-in preservation change. Semantic-only (no GPU fixture in the PR). No game files. AI-assisted. |
|
Checked 3ca7c3c on Windows 10 22H2 (Python 3.15). Results:
I read the classification against the RDNA2 ISA:
CPU only; no GPU run, since the change is analysis-only and no corpus shader was translated. AI-assisted (Claude Code). |
Summary
Unifies VGPR read/write classification across all four analysis sites in
tools/rdna2spirv.py(read_before_write_vgprs,interp_ij_analysis,reg_reads_writes,interp_copy_sources) and fixes destination register range calculation invgpr_dest_registers:vgpr_reads_all):global_atomic_*,flat_atomic_*,buffer_atomic_*, andimage_atomic_*withoutglcwrite no VGPR; every VGPR operand (includinga[0]) is read-only. Previously onlyglobal_atomic_withoutglcinread_before_write_vgprshad this check.vdataatomics withglc(vgpr_reads,vgpr_dest_registers):buffer_atomic_*andimage_atomic_*withglcstill read all VGPRs ofa[0](vdata, including multi-VGPR compare/64-bit forms) before writing the return value;*cmpswap*/*fcmpswap*overwrite only the lower data half (n // 2, preservingcmp).ds_*ops (vgpr_reads_all):ds_*ops without_rtnand outsideDS_RETURNING_PREFIXES(ds_read,ds_bpermute,ds_permute,ds_swizzle,ds_consume,ds_append,ds_ordered_count) — such asds_add_*,ds_min_*,ds_cmpst_*,ds_mskor_*, andds_gws_*— are treated as read-only instead of writinga[0].interp_copy_sourcesparity: Sharesvgpr_reads_all(ins)instead of an incomplete prefix tuple that missedflat_store*, VGPR-firstv_cmpx*, non-glcatomics, and non-returningds_*.Claimed in #7333 (
https://github.com/ItsNotRexed/Leonida/issues/7333#issuecomment-7107592506). Leftv_writelane_b32(#4297),buffer_atomicvdata width validation (#6164), and_d16_hi_x(#1885) untouched.AI-assisted. Hand-written synthetic shaders only, no game data, CPU-only (
spirv_mini_interp+spirv-val, no GPU run).Tests
Added tests/semantic/test_atomic_ds_liveins.py (11 test methods covering classification units and end-to-end PS SPIR-V +
spirv_mini_interpexecution; fails with 37 failures onmaine0816d6afand passes cleanly here).python -m unittest -v test_atomic_ds_liveins(fromtests/semantic): 11 tests OKpython -I scripts/run_semantic_tests.py tests/semantic: 444 files, 5900 tests, 3 files failed (test_image_atomics_guard[47 failures],test_image_cube_store_glc[1 error],test_image_store_d16[1 failure] — verified identical onmaine0816d6af, 0 regressions)spirv-as+spirv-val --target-env vulkan1.3on 5 translated PS shaders (ps_buf_no_glc,ps_buf_glc,ps_buf_cmpswap_glc,ps_buf_before_interp,ps_img_before_interp): all OKpython -I tests/test_vs_input_survey_rbw.py: 12 tests OKpython -I tests/test_image_bvh_census.py: 15 tests OKpython -I tests/test_mem_diff.py: 19 tests OKpython -I tests/test_semantic_translator_use.py: 3 tests OKpython -I tests/test_runner_calls_all_tests.py: 3 tests OKpython -m compileall -q make_game.py tools tests: exit 0python -I scripts/check_no_game_data.py tools/rdna2spirv.py tests/semantic/test_atomic_ds_liveins.py: exit 0