fix(rdna2spirv): order image_sample, image_gather4, image_bvh and ignore ds_nop in --wave64-emulate #282
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/282"
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?
Imported from ubiquitarianism/leonida. Originally posted by Andretuta on 2026-11-24T02:58:48Z.
Original description (mentions and
#Nreferences are disabled; the numbers refer to the old repository):Summary
Fixes two memory-ordering gaps in
--wave64-emulate(tools/rdna2spirv.pyand its mirrortools/wave64_emulate_opt.py):image_sample*,image_gather4*, andimage_bvh*as"mem"reads: BothGen.x_memory_order()(tools/rdna2spirv.py:5717) and_x_memory_order_access()(tools/wave64_emulate_opt.py:777) trackedimage_load,image_store, andimage_atomic, but omittedimage_sample,image_gather4, andimage_bvh. Under--wave64-emulate, animage_store/buffer_storefollowed byimage_sample*/image_gather4*/image_bvh*(or vice versa) stayed in the same round without a barrier between the two 32-lane halves.ds_nopparity: Adds"ds_nop"toGen.x_memory_order()'s ignore tuple (tools/rdna2spirv.py:5713), matching_x_memory_order_access()(tools/wave64_emulate_opt.py:773) sods_nopno longer marks LDS read+write dirty.Testing
image_store -> image_sample_lz), WAR (image_sample_lz -> image_store), and mirror-parity (image_sample*,image_gather4*,image_bvh*,ds_nop) tests intests/semantic/test_w64x_scalar_load_order.py. Before the fix, bothimage_storeandimage_sample_lzlanded in the same round (%blk0) with no separating barrier and_x_memory_order_access("image_sample")returnedNone.-W default -W error::ResourceWarning):python -I -W default -W error::ResourceWarning tests/semantic/test_w64x_scalar_load_order.py: 8/8 OKpython -I -W default -W error::ResourceWarning tests/semantic/test_wave64_emulate_opt.py: 30/30 OKspirv-as --target-env vulkan1.2+spirv-val --target-env vulkan1.2(0 errors).Imported from ubiquitarianism/leonida. Originally posted by GeorgiyDemo on 2026-11-24T07:32:32Z.
Checked
1826e888on Apple M5 Pro (16-core GPU), macOS 26.7.3 (25G342), againstmaind42773d07:tests/semantic/test_w64x_scalar_load_order.pyhas 8 tests at this head and all pass; the same file applied tomain's translator fails 3 of 8 withAssertionError: None != ('mem', True, False) : image_sample.LEONIDA_W64_EMULATE=1, MoltenVK 1.4.2:ps_sample*6/6, gather 4/4,cs_bvh/cs_bvh322/2, identical tomainon the same filters — no regression. To be explicit, these fixtures pass before and after here, so on this driver they do not by themselves distinguish the revisions; the semantic tests are what show the fix.Note: the PR currently shows CONFLICTING against
main; this check is on the head as-is. Binaries frommain. llvm-mc 23.1.6. Synthetic fixtures only, no game data. AI-assisted.Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-29T17:01:26Z.
@totonicpu this carried-over PR (your old PR 10011) now conflicts with
main(tools/rdna2spirv.py). Could you mergemaininto it, by pushing to its branch or in your own PR from it (no force-push needed)? It was verified before the conflict: https://github.com/ProjectLeonida/mandy/pull/282#issuecomment-7125104160. If there's no update within 24 h, OreoFR may carry it in a new PR that keeps you as co-author (per the maintainers' plan). — OreoFR's agent (AI-assisted)Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-30T13:25:00Z.
Carried as #2724 because of the conflict with main after #2566; @totonicpu, if you come back, say so and the carry is dropped.