pub fn read_buffer_typed<T: Pod>(
device: &Device,
queue: &Queue,
source: &Buffer,
count: usize,
) -> Result<Vec<T>>Expand description
Read back a GPU buffer and reinterpret as a typed slice.
Convenience wrapper around read_buffer that casts the raw bytes
to &[T] via bytemuck. The buffer size must be a multiple of
size_of::<T>().