Repository navigation
Conversation
…e vcc)
Pipeline-library programs read a table in their own code with
s_getpc_b64 vcc, s_add_u32 vcc_lo / s_addc_u32 vcc_hi and an SMEM load
whose base is vcc. Both operands were refused ("s_getpc_b64 destination",
"s_load_dwordx2 operands sgpr vcc"). s_getpc_b64 now writes the PC into
%vcc / %vcc_hi as data, as a 64-bit VCC data write does, and the SMEM
base reads the vcc_lo / vcc_hi slots load_slot already has.
Xiiano
left a comment
There was a problem hiding this comment.
Copilot:
Verdict: Approve, pending CI. The diff is narrowly scoped and I found no blocking correctness issues. s_getpc_b64 vcc writes the 64-bit address into VCC's low/high data slots, SMEM accepts vcc as a two-dword base, and tests cover both ordinary addressing and carry into the high word. All five PR checks remained queued at review time.
|
Independent Windows 11 / CPython 3.12.14 test at I reused the synthetic listing and interpreter with six aligned code bases: Negative control: replacing only rdna2spirv.py with the parent revision makes both checked-in tests fail with CPU interpreter verification only; no LLVM/SPIR-V validator or hardware execution here. AI-assisted testing. |
|
Tested 7737970 on Arch Linux, Python 3.14.10, CPU only: pass — new tests/semantic/test_vcc_scalar_address.py 2/2 OK (end-to-end translate + interpreter run). Negative control: same file against the merge-base's tools/rdna2spirv.py errors 2/2 (the old s_getpc_b64/s_load refusals), so it discriminates. Full semantic suite: 444 files, 5891 tests, 2 files fail (test_image_atomics_guard 47, test_image_store_d16 1) — both reproduce identically on clean main, pre-existing and unrelated (image path, this PR touches SMEM/VCC). No game files, no GPU. AI-assisted. |
|
Tested 7737970 on Steam Deck LCD (Jupiter), AMD Custom GPU 0405 "Van Gogh", RADV Mesa 26.2.0-devel (git-5c65d4fc31), Vulkan 1.4.350, SteamOS 3.9.5 (holo), kernel 7.2.7-valve2-2-neptune-72-g31504582a073: pass
AI-assisted (OpenCode). |
|
Tested 7737970 (merged onto main 976b3ec) on NVIDIA GeForce RTX 2060 (Turing), NVIDIA 621.24, Vulkan 1.4.357, Windows 11 (10.0.26300), subgroup size 32: pass (no regression) What I ran:
No GPU test changed status against main. This PR adds no GPU fixture of its own, so the run checks that the change breaks none of the existing GPU tests; it does not exercise the new rule directly. Unit tests changed by the PR: The one failure on both sides is AI-assisted run (Claude Code); the numbers are from my machine. |
|
Tested on NVIDIA GeForce GTX 1080 (Pascal, subgroup 32..32, no mesh shaders or fragment barycentrics), Linux (Ubuntu 26.04.1), driver 580.178.04, llvm-mc 21. No game files.
Every PASS/FAIL/SKIP row and its words are identical to main: no regression on this GPU. This run does not by itself check the new rule (I did not look for a fixture that reaches it); the PR's own semantic tests were not run. AI-assisted. |
Item: SHADER-1165
Claimed in #7049 (comment): VCC as a 64-bit scalar address.
Pipeline-library programs read a constant table placed in their own code this way:
The translator refused both VCC operands, with "s_getpc_b64 destination" and "s_load_dwordx2 operands sgpr vcc".
s_getpc_b64 vccnow stores the PC (code base + offset of the next instruction, as for an SGPR pair) into%vcc/%vcc_hias data. This is the same layout a 64-bit data write to VCC uses.lane_masks.pyalready treats VCC as data after this instruction.vccreads it from thevcc_lo/vcc_hislots thatload_slotalready handles for[...,vcc_lo,vcc_hi]lists.docs/design.md, "Code-embedded data" row: one sentence on the new operands.LLVM 23 prints the same operands, so this doesn't depend on the llvm-mc version. Under llvm-mc 21/22 these programs only reach the translator with #7104. In a sample of 357 of the 3,566 pipeline-library programs that hold scalar tuples into vcc, 7 stopped on one of these two refusals after #7104. Full counts follow as a comment.
Tests
tests/semantic/test_vcc_scalar_address.py: the sequence above, as a wave32 compute program with llvm-mc's encodings, is translated and run inspirv_mini_interp.vcc_hi, so the read is above 4 GiB.main("s_getpc_b64 destination").spirv-val.python -I scripts/run_semantic_tests.py tests/semantic: 444 files, 5,891 tests. 3 files fail, the same way onmainwithout this change:test_image_atomics_guard,test_image_cube_store_glc(it can't importsupport) andtest_image_store_d16.tests/test_docs_design_rows.py,test_docs_repo_paths.pyandtest_semantic_translator_use.pypass.test_docs_links.pyhas the same failure onmain(docs/dev-tools.md). Windows 11, Python 3.12, CPU only (no GPU run).AI-assisted.