Function iter_buffers

Source
fn iter_buffers<'snatch_guard: 'buffers, 'buffers>(
    state: &mut EncodingState<'snatch_guard, '_>,
    buf_storage: &'buffers mut Vec<TriangleBufferStore>,
    input_barriers: &mut Vec<BufferBarrier<'buffers, dyn DynBuffer>>,
    scratch_buffer_blas_size: &mut u64,
    blas_storage: &mut Vec<BlasStore<'buffers>>,
) -> Result<(), BuildAccelerationStructureError>
Expand description

Iterates over the buffers generated in iter_blas, convert the barriers into hal barriers, and the triangles into hal::AccelerationStructureEntries (and also some validation).

'buffers is the lifetime of &dyn hal::DynBuffer in our working data, i.e., needs to span until build_acceleration_structures finishes encoding. 'snatch_guard is the lifetime of the snatch lock acquisition.