Ray tracing: reading title memory in place (no copies) took my fork from ~14 to ~31 fps #8
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#8
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@luisaugustz on GitHub · 2026-11-29 15:26 UTC · original
Sharing a result from my fork, in case it is useful. It is experimental and the code is not pushed yet.
Setup: Ryzen 7 5800X, 32 GB, RX 9070 XT, Arch, patched Mesa with unified memory, 3440x1440 output with FSR balanced, software ray tracing (
VICTORY_BVH_BUILDER=1). My fork isca97da241merged with my own changes.Idea: with unified memory, don't copy title memory for the shaders that read it by address. Point the directory entry of a page at the unified-memory mirror, so the traversal and builder shaders use title memory itself.
CPU time spent keeping those copies up to date went from at least 38 ms per frame to 0. These are separate runs at about the same spots, not a controlled benchmark.
How (
memory.rs)map_in_place(page), tried first when a page needs a place, behindVICTORY_BVH_IN_PLACE=1.=vrammode (only pages that lie in video memory). I built it but never ran it.Caveats
I can share the patch or open a PR if you want it.
@lobomfz on GitHub · 2026-11-29 15:41 UTC · original
nice result, thanks for writing it up. yes please, open a PR against main. keeping it behind
VICTORY_BVH_IN_PLACE=1like you have it is fine, and don't worry about the untested=vrammode or the doorway lighting, that one happens here too and is a separate bug.