Skip to main content

Module buffer

Module buffer 

Source
Expand description

GPU buffer helpers — upload and download f32 arrays.

These helpers abstract the common pattern of:

  1. Uploading a &[f32] to a wgpu storage buffer (for shader reads/writes).
  2. Downloading f32 data from the GPU back to a Vec<f32> via a staging buffer + map_async.

All functions are gated behind #[cfg(feature = "gpu")]. The module itself is always compiled so that call-sites remain syntactically valid.