BuildProcedural: accept a device buffer as AABB build input (no host round-trip) #37
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Catcrafts/Crafter.Graphics#37
Loading…
Add table
Add a link
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?
BuildProcedural: accept a device buffer as AABB build input (no host round-trip)Mesh::BuildProceduralcurrentlymemcpys the AABBs from a hoststd::span(
implementations/Crafter.Graphics-Mesh.cpp:212-226). A fully-GPU producer hasits AABBs in a device buffer already — copying them down to the CPU and back
up each frame defeats the purpose.
Needed by the downstream 3DForts GPU-resident particle system: point particles
(sparks/debris/rain) are rendered as procedural intersection volumes whose AABBs
are written by a GPU compute pass and change every frame. There is no CPU copy of
them, by design.
Ask: an overload of
BuildProcedural(and the refit entry from #36) thatconsumes an existing device buffer (buffer handle / device address + count)
as the AABB build input, skipping the host memcpy. Both backends (Vulkan +
WebGPU).
Relationship to #36
#36 ("Acceleration structure build options") covers BLAS refit (UPDATE) and
fast-build/fast-trace mode selection — the per-frame cost side. This issue is the
orthogonal input-source side: where the AABBs come from. Together they let a
GPU compute pass feed a moving procedural BLAS that refits each frame with zero
host involvement.
Verify
Extend
examples/RTVolumeso the per-frame AABBs live in a device buffer the GPUwrites, fed straight into
BuildProcedural/refit with no host copy — on bothVulkan and WebGPU.
Procedural BLAS: device-buffer build input + refit (UPDATE) for dynamic geometryto BuildProcedural: accept a device buffer as AABB build input (no host round-trip)jorijnvdgraaf referenced this issue2026-06-18 21:07:09 +02:00