Ray tracing: the builder's geometry buffers are made ready before it reads them (zero triangles) #3265
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!3265
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3265"
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?
@atk3001 on GitHub · 2026-11-29 21:09 UTC · original
atk3001:pr/rt-geometry-ready→main· +128 −4 · 2 files · 1 commits · openWhat
With
VICTORY_BVH_BUILDER=1, the title hasXboxBvhBuilderunpack its packed bottom-level structures(
RehydrateRaytracingAccelerationStructureBatched2X) and build others (BuildRaytracingAccelerationStructureBatched2X).The builder's leaf stage reads the index, vertex and transform buffers through the addresses in the
geometry descs. No root argument names those addresses, so
memory::readynever made their pages ready.Pages without a copy read zero, and the fault note only helps the next frame. A structure is unpacked
once, so its triangles stay zero.
In a capture of 200 unpacked structures, compared node by node:
A ray that should have hit one of those triangles missed it.
dxr.rs: the rehydrate and batched build calls are wrapped (only with the builder on), and each namesits triangle geometry's transform (48 bytes), index (
indices * 4+ 64 KiB) and vertex(
max(vertices, indices) * stride+ 64 KiB) ranges, each at most 16 MiB. The margins are there because the title's packedformats read past
VertexCount * stride, and index format 53 is a stream with its own header.memory.rs:name_geometryholds those ranges. The next builder dispatch'sready()maps them and bringstheir data up before it runs.
VICTORY_BVH_GEOMETRY_READY=0. WithoutVICTORY_BVH_BUILDER=1nothing changes (no wrapper is installed).Tests
the_geometry_of_plain_and_batched_descs_is_named: ranges from a plain desc array and from batchedelements (80-byte stride), and the 16 MiB cap.
victory-gpudxr tests: 8 passed. Clippy: no warnings indxr.rsormemory.rs(the other warnings are already on main). Release build ok.-RayTracing): the BVH comparison above. The ray-traced picture looks clearlybetter. About 23 pages per frame are still read before they are ready and fixed a frame later. Those
belong to other passes, not to the builder.
Overlap
(
VICTORY_BVH_LOG) are near it, but they do not conflict.🤖 Generated with Claude Code
github-bot referenced this pull request2026-11-30 00:28:41 +00:00
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.