Skip to content

Conversation

@raysplaceinspace
Copy link

@raysplaceinspace raysplaceinspace commented Jan 19, 2026

Closes #402

There is a non-determinism issue in Bvh::optimize_incremental when you are restoring your Bvh from a serialized snapshot. It occurs because Bvh::optimize_incremental relies on significant state in BvhWorkspace which is ephemeral and cannot be serialized. This change moves the significant fields into Bvh so that they do get serialized, enabling deterministic execution once again.

I've written a lot more background on these two tickets:

I have verified that all tests pass, and I have verified that this fixes the non-determinism issue in my application.

I am happy to rework this in other ways if you would prefer.

…rom a serialized snapshot, due to significant state being stored in BvhWorkspace which cannot be serialized (dimforge#402)
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.

Non-determinism in Bvh::optimize_incremental when restoring from serialized snapshot

1 participant