RX 7900 XTX: in-process copies recover ~30% frame time; ray-tracing builder runs then the title crashes #985

Open
opened 2026-11-26 03:55:09 +00:00 by github-bot · 0 comments
Owner

@⁠Cogential on GitHub · 2026-11-25 15:10 UTC · original

Mapped copies. On an RX 7900 XTX + Ryzen 5 3600, main at 0b0074e (with shader PRs #150 #112 #203 #25 #134) ran at 289 ms/frame in a steady prison scene (plain release build, VICTORY_LATE_WAIT=3 VICTORY_COPY_COMPARE=1 VICTORY_HEAP_SYNC=0). VICTORY_PROFILE=1 put ~29 ms/frame in NtWriteVirtualMemory (write_mapped from Shadow::copy_back_with) and ~16 ms in ReadProcessMemory on the submitting thread. Cherry-picking BitWuehler's ee75d76d (VEH-guarded in-process copy for copy_mapped and write_mapped) brought it to 204 ms/frame. VICTORY_COPY_PLAIN covers reads only, so writes still go through the kernel. Would ee75d76d (or the same for writes) fit main?

Builder on AMD. With VICTORY_RT_OFF=0 VICTORY_BVH_BUILDER=1, all 53 builder pipelines are made (64-lane waves are native here). About 10 s later the title crashes reading garbage pointers (0x8, 0x28, 0xffff…). It still crashes with late wait and copy compare off. With VICTORY_BVH_QUARANTINE=1 there's no title crash, but the device is lost after ~7 min in an indirect compute (b48d48f8304e5bd3). Builder program 162216b9cfd91aaf and three others give exactly the expected results on WARP against hand-written references, so the translation looks right. Selective quarantine can't isolate a writer, because raw-address dispatches declare every numbered copy as written, so one program's copy-back carries the others' bytes. That suggests the copy-back path, not the shaders. Happy to run tests. Related: #543 (the builder also runs on RDNA4; that report used quarantine from the start).

**@⁠Cogential** on GitHub · 2026-11-25 15:10 UTC · [original](https://github.com/fxceless/victory-fork/issues/985) **Mapped copies.** On an RX 7900 XTX + Ryzen 5 3600, main at 0b0074e (with shader PRs #150 #112 #203 #25 #134) ran at 289 ms/frame in a steady prison scene (plain release build, `VICTORY_LATE_WAIT=3 VICTORY_COPY_COMPARE=1 VICTORY_HEAP_SYNC=0`). `VICTORY_PROFILE=1` put ~29 ms/frame in `NtWriteVirtualMemory` (write_mapped from `Shadow::copy_back_with`) and ~16 ms in `ReadProcessMemory` on the submitting thread. Cherry-picking BitWuehler's ee75d76d (VEH-guarded in-process copy for copy_mapped and write_mapped) brought it to 204 ms/frame. `VICTORY_COPY_PLAIN` covers reads only, so writes still go through the kernel. Would ee75d76d (or the same for writes) fit main? **Builder on AMD.** With `VICTORY_RT_OFF=0 VICTORY_BVH_BUILDER=1`, all 53 builder pipelines are made (64-lane waves are native here). About 10 s later the title crashes reading garbage pointers (0x8, 0x28, 0xffff…). It still crashes with late wait and copy compare off. With `VICTORY_BVH_QUARANTINE=1` there's no title crash, but the device is lost after ~7 min in an indirect compute (b48d48f8304e5bd3). Builder program 162216b9cfd91aaf and three others give exactly the expected results on WARP against hand-written references, so the translation looks right. Selective quarantine can't isolate a writer, because raw-address dispatches declare every numbered copy as written, so one program's copy-back carries the others' bytes. That suggests the copy-back path, not the shaders. Happy to run tests. Related: #543 (the builder also runs on RDNA4; that report used quarantine from the start).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:55:09 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.