pub fn buffer_from_slice(device: &wgpu::Device, usage: wgpu::BufferUsage, data: &[u8]) -> wgpu::Buffer {
    device.create_buffer_init(&BufferInitDescriptor {
        label: None,
        usage,
        contents: &data
    })
}
/// Helper to create a buffer from an existing slice.
Helper to create a buffer from an existing slice.
Helper to create a buffer from an existing slice .
pub fn buffer_from_slice(device: &wgpu::Device, usage: wgpu::BufferUsage, data: &[u8]) -> wgpu::Buffer {
    device.create_buffer_init(&BufferInitDescriptor {
        label: None,
        usage,
        contents: &data
    })
}
pub fn buffer_from_slice ( device : & wgpu :: Device , usage : wgpu :: BufferUsage , data : & [ u8 ] ) -> wgpu :: Buffer { device . create_buffer_init ( & BufferInitDescriptor { label : None , usage , contents : & data } ) }
Helper to create a buffer from an existing slice.
Helper to create a buffer from an existing slice .
device
&wgpu::Device
usage
wgpu::BufferUsage
data
&[u8]
device
&wgpu::Device
usage
wgpu::BufferUsage
data
&[u8]