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

Open
opened 2026-11-25 15:10:02 +00:00 by Cogential · 0 comments
Cogential commented 2026-11-25 15:10:02 +00:00 (Migrated from github.com)
Contributor

Imported from fxceless/victory-fork. Originally posted by Cogential on 2026-11-25T15:10:02Z.


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).

<!-- greyfinch-sync:fxceless/victory-fork:issue:6607598453 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/issues/985). Originally posted by [Cogential](https://github.com/Cogential) on 2026-11-25T15:10:02Z. --- **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).
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
fxceless/victory-fork#983
No description provided.