diff --git a/src/gfx/buffer.rs b/src/gfx/buffer.rs index 984dc05..f09bf37 100644 --- a/src/gfx/buffer.rs +++ b/src/gfx/buffer.rs @@ -17,7 +17,7 @@ impl<'a> BulkBufferBuilder<'a> { } } - pub fn with_usage(mut self, usage: wgpu::BufferUsages) -> Self { + pub fn set_usage(mut self, usage: wgpu::BufferUsages) -> Self { self.current_usage = usage; self } diff --git a/src/voxel/brickmap.rs b/src/voxel/brickmap.rs index 1726677..98b0483 100644 --- a/src/voxel/brickmap.rs +++ b/src/voxel/brickmap.rs @@ -111,13 +111,13 @@ impl BrickmapManager { let mut buffers = gfx::BulkBufferBuilder::new() .with_bytemuck_buffer("Brick World State", &[state_uniform]) - .with_usage(wgpu::BufferUsages::STORAGE | wgpu::BufferUsages::COPY_DST) + .set_usage(wgpu::BufferUsages::STORAGE | wgpu::BufferUsages::COPY_DST) .with_bytemuck_buffer("Brickgrid", &brickgrid) .with_bytemuck_buffer("Brickmap Cache", &brickmap_cache) .with_bytemuck_buffer("Shading Table", &shading_table) .with_bytemuck_buffer("Brickgrid Unpack", &brickgrid_upload_data) .with_bytemuck_buffer("Brickmap Unpack", &brickmap_upload_data) - .with_usage( + .set_usage( wgpu::BufferUsages::STORAGE | wgpu::BufferUsages::COPY_DST | wgpu::BufferUsages::COPY_SRC,