This issue originates from a missing BVH packing for visibility data
when it is modified.
To fix this, this adds update flags to the managers to carry the
modified visibility information from the Objects' modified flag to the
GeometryManager.
Another set of flags is added to determine which data need to be packed:
geometry, vertices, or visibility. Those flags are then used when
packing the primivites.
Since device arrays are not initialized if their packing is not required
(to avoid unnecessary work), in order to only update the visibility
flags array, we have to use a separate loop to pack its data. This is
because we access arrays using an offset pointer into the device arrays,
but when they are not initialized, the offset is invalid and triggers an
assertion or a crash.