Repository navigation
Conversation
|
Tested All 10 tests pass with I also tested two consecutive swaps. With a stride of 32 in v4 and a constant 48 in v6, I ran AI-assisted. |
|
Tested 1aa4ebc on Linux (Ubuntu 24.04, Python 3.12.3), CPU only, no game files: pass.
The new test file does not invoke spirv-val, so the 51-module spirv-val claim, the failing-before-fix control and the line-ending and CLI help checks were not reproduced here. AI-assisted. |
|
Independent CPU + SPIRV-Tools verification on Linux (Python 3.13.5,
Looks good to merge. |
Kam471
left a comment
There was a problem hiding this comment.
Ran this at 1aa4ebc84 on Windows 11: tests/semantic/test_shader_meta_vgpr_writes.py -> 10 tests, OK; tests/test_shader_meta.py -> 19 tests, OK; git diff --check clean.
A write to a VGPR that held a descriptor-stride value now invalidates that metadata (rather than leaving the old stride attached to the new value), and the docs row states it; the added cases cover the clobbering write, the untouched value and the re-derived stride. No blocking issue.
|
Tested
Code read: the AI-assisted (Claude). |
|
Checked the metadata impact of All 1,684 returned identical metadata across every field, including |
|
I checked the flat_atomic family separately. The decoder and some analysis passes recognize it, but the current translator has no flat-atomic lowering and rejects those instructions. This fix therefore covers the global, buffer, and image atomic operations that can currently write translated VGPR values. Adding a prefix alone would not provide a translator-backed regression for flat atomics. I am keeping that extension with eventual flat-atomic lowering, where its return-value writes can be tested directly. |
kacper-serewis
left a comment
There was a problem hiding this comment.
Windows CPU comparison at 1aa4ebc: parent and head translated and validated 200/200; all modules and complete index entries matched, including every descriptor_strides field. This cache was selected for scalar u64 comparisons. Ten synthetic tests passed on head and recorded 19 failing assertions on parent, covering overwritten registers, swaps, preserved SGPR copies and atomic returns. AI-assisted.
|
Tested
|
|
Independent Windows CPU verification on
|
1aa4ebc to
1268923
Compare
|
Rebased onto All 72 focused metadata/VGPR/sampler tests pass. Combined with rebased #5031 and unchanged #5352 ( All inputs are synthetic. No game files accessed. AI-assisted: yes. |
|
Tested 1268923 merged with main 561b65a on Linux (WSL2), Python 3.12.16 -I: pass tests/semantic/test_shader_meta_vgpr_writes.py: 10 run, 10 passed; tests/test_shader_meta.py: 27 run, 27 passed; tests/test_shader_meta_operands.py: 5 run, 5 passed; tests/test_docs_*.py: 11 files, 11 passed; 0 failed. Negative control: with tools/shader_meta.py taken from main the new test file fails (19 failures reported across its 10 tests; file restored afterwards). Not run on Windows. |
What and why
BUILD-1553, original claim and returning-atomic scope extension.
Descriptor-stride metadata can retain a VGPR's old scaling after instructions overwrite that register. A synthetic shader computes index * 32, overwrites the register with 48, and copies it through v_readfirstlane into a descriptor offset. The translated shader uses 48 while the metadata still advertises stride 32, which can misdirect descriptor registration.
Track both destinations of v_swap_b32 by exchanging their existing facts. Invalidate VGPR stride facts for M0-dependent relative writes because their targets are not tracked. Invalidate only the words written by returning global, buffer, and image atomics: one word for 32-bit operations, two for supported x2 operations. Preserve no-return atomic inputs, comparison-only words, source-only relative reads, and stride facts already copied into SGPRs. Update the design contract with the evidence and limits. Translation arithmetic is unchanged.
Current upstream validation
Rebased onto
561b65a832218fbb9e6d2effd392a8eef093a3f8at12689237d696641c20aa4e2394bf18ecd1439552. The production patch is unchanged. The design-table conflict preserves every upstream row. Image-atomic test assertions now allow upstream's hoisted register pointer definitions while still requiring destination stores after the atomic.All 72 focused metadata/VGPR/sampler tests pass. Combined with rebased #5031 and unchanged #5352 (
da093a8a), all 83 focused integration methods pass with SDK SPIR-V validation active. Independent source/range review and the affected atomic-method rerun are clear. compileall, isolated make_game.py --help, and diff checks pass.Original validation
Windows 11, Python 3.14.6, SPIR-V Tools from Vulkan SDK 1.4.363.0, upstream
3faac557b1584d39004357918e60325b4d4ff0fe:CPU-only validation; no GPU/driver or game-corpus measurement. All inputs are synthetic. No game files accessed or included. AI-assisted: yes.