Skip to content

Fix VDB recommit issues, BVH node flag, improved non-clobber install - #38

Merged
johguenther merged 5 commits into
develfrom
guj/fixes
Oct 5, 2026
Merged

johguenther merged 5 commits into
develfrom
guj/fixes

Conversation

@johguenther

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Newly allocated observer-size arrays are incorrectly released with scalar delete, and key regression paths lack coverage.

Review effort: Balanced
Findings: 1 High severity · 2 Medium severity

Open (3)
What changed in this PR

Fixes VDB recommit stability, signed-zero BVH leaf detection, observer bounds safety, and shared-prefix dependency installation.

Changes:

  • Embeds VDB grid state to preserve sampler references across recommits.
  • Uses the BVH sign bit for reliable leaf detection.
  • Improves observer bounds handling and superbuild installation ordering.
File Description
superbuild/​dependencies/​package_install.cmake Preserves existing symlinks during package installation.
superbuild/​dependencies/​dep_rkcommon.cmake Adds conditional TBB configure dependency.
superbuild/​dependencies/​dep_embree.cmake Separates package manifests and adjusts install ordering.
superbuild/​CMakeLists.txt Enables modern ExternalProject step behavior and download targets.
openvkl/​devices/​gpu/​compute/​vklIterateUnstructured.h Uses centralized BVH leaf detection.
openvkl/​devices/​gpu/​compute/​vklComputeUnstructured.h Uses centralized unstructured-node classification.
openvkl/​devices/​gpu/​compute/​vklComputeParticle.h Uses centralized particle BVH classification.
openvkl/​devices/​cpu/​volume/​vdb/​VdbVolumeShared.h Embeds stable grid and dense dispatch state.
openvkl/​devices/​cpu/​volume/​vdb/​VdbVolume.ispc Removes obsolete grid-pointer initialization.
openvkl/​devices/​cpu/​volume/​vdb/​VdbVolume.h Documents the embedded-grid relationship.
openvkl/​devices/​cpu/​volume/​vdb/​VdbVolume.cpp Reuses embedded grid storage across recommits.
openvkl/​devices/​cpu/​volume/​vdb/​VdbSamplerShared.h Removes sampler-owned dense dispatch state.
openvkl/​devices/​cpu/​volume/​vdb/​VdbSampler.ispc Moves dense dispatch lifetime to the volume.
openvkl/​devices/​cpu/​volume/​vdb/​VdbSampler_traverseAndSample.ih Reads dense dispatch from the volume.
openvkl/​devices/​cpu/​volume/​vdb/​VdbLeafAccessObserver.ih Bounds-checks observer writes.
openvkl/​devices/​cpu/​volume/​vdb/​VdbLeafAccessObserver.cpp Registers observer buffer sizes.
openvkl/​devices/​cpu/​volume/​UnstructuredVolume.ispc Adopts sign-bit leaf detection.
openvkl/​devices/​cpu/​volume/​UnstructuredVolume.ih Includes the shared BVH helper.
openvkl/​devices/​cpu/​volume/​UnstructuredVolume.cpp Updates native BVH classification.
openvkl/​devices/​cpu/​volume/​UnstructuredBVH.ih Introduces interoperable sign-bit detection.
openvkl/​devices/​cpu/​volume/​UnstructuredBVH.h Handles negative-zero leaf markers in C++.
openvkl/​devices/​cpu/​volume/​particle/​ParticleVolume.cpp Updates particle root classification.
openvkl/​devices/​cpu/​observer/​ObserverRegistry.ispc Tracks per-observer buffer lengths.
openvkl/​devices/​cpu/​observer/​ObserverRegistry.ih Extends registry storage with lengths.
openvkl/​devices/​cpu/​observer/​ObserverRegistry.h Extends the registry add API.
openvkl/​devices/​cpu/​observer/​ObserverRegistry.cpp Forwards observer lengths to ISPC.
openvkl/​devices/​cpu/​iterator/​UnstructuredIterator.ispc Uses centralized leaf detection.
doc/​api.md Documents observer invalidation on recommit.
CHANGELOG.md Records VDB recommit and observer fixes.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread openvkl/devices/cpu/observer/ObserverRegistry.ispc Outdated
Comment thread openvkl/devices/cpu/volume/UnstructuredBVH.ih
Comment thread openvkl/devices/cpu/volume/vdb/VdbVolume.cpp
- recommiting VDB reallocated VDBGrid, which is referenced by samplers;
  VDBGrid is now embedded
- fix crash when recommitting VDB increased the number of leaf nodes
  when an old VDB leaf node access observer was reused and not
  recreated; observers still become stale and need to be recreated when
  the VDB volumes changes, to get correct access counts
- fix of-by-one error when an older observer was removed while a recent
  observer still stays registered
Move denseLeafSample_* from sampler to VDBVolume, thus samplers do not
use stale handlers when the volume got recommited. This also prevents
samplers to leak the handler arrays on their recommit.
Leftovers from SharedStruct refactor 5eeefe8

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

It changes shared C++/ISPC layouts and ownership across CPU/GPU sampling while also altering superbuild dependency ordering.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
Resolved since last review (2)

@johguenther
johguenther merged commit 8f82dbe into devel Oct 5, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants