gpu, mesa: HW RT UAV barrier/memory_ready and NIR image_heap coherency #43
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/lobomfz--VIctory-xmem!43
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-43"
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?
@auz466 on GitHub · 2026-11-30 20:46 UTC · original
auz466:fix-hw-rt-sync-and-nir-coherency→main· +58 −10 · 2 files · 2 commits · closed without mergingSummary
Two targeted fixes that do not overlap existing open PRs (such as #38, #31, #28):
HW RT synchronization (
crates/victory-gpu/src/draw.rs):memory_ready()for shaders usingUSER_MEMORY_CARDeven when they do not bindSLOT_MEMORY.D3D12_RESOURCE_BARRIER_TYPE_UAV,pResource = None) before HW RT draws/dispatches that useUSER_MEMORY_CARD, ensuring preceding BVH builder writes are flushed from GPU caches beforeimage_bvh64_intersect_rayreads raw title addresses.VICTORY_BVH_HARDWARE=1.Mesa NIR descriptor-heap image coherency (
patches/mesa.patch,src/compiler/nir/nir_lower_memory_model.c):nir_intrinsic_image_heap_{load,sparse_load,store,atomic,atomic_swap}andnir_intrinsic_bindless_image_{load,sparse_load,store,atomic,atomic_swap}withnir_var_imageinget_intrinsic_info().VK_EXT_descriptor_heap,nir_lower_memory_modelpreviously strippedNIR_MEMORY_MAKE_VISIBLE/NIR_MEMORY_MAKE_AVAILABLEfrom image barriers without settingACCESS_COHERENTon descriptor-heap image accesses (also noted in #37).VICTORY_BVH_HARDWARE=0and1.Testing
VICTORY_BVH_HARDWARE=1and0../build.shandninja -C deps/mesa/build installsucceed cleanly.@Luxuride on GitHub · 2026-12-04 12:00 UTC · original · edited 2026-12-05 11:24 UTC
As I read it, this is already in
main: both commits are inmainverbatim —51ada78("gpu: ensure memory_ready and UAV barrier before hardware BVH64 reads") and00fbdd8("mesa: handle image_heap_* and bindless_image_* in nir_lower_memory_model").In the current tree:
crates/victory-gpu/src/draw.rs:2132(any(|u| u.root == RootType::Other(USER_MEMORY_CARD))) with the global UAV barrier at:2150, andpatches/mesa.patch:1956-1990for the NIR hunk.Note the trap this PR illustrates:
git merge-tree --write-tree main pr/43exits 0, so it still merges cleanly — that is only a sign of how little either side touched those exact lines since, not evidence there is work left. A clean merge would re-add hunksmainalready carries.Whether it still has work of its own is the maintainer's call, not mine.
Pull request closed