Ray tracing: the builder's geometry buffers are made ready before it reads them (zero triangles) #3265
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by atk3001 on 2026-11-29T21:09:21Z.
What
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
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.