Remove unnecessary reupload of entire brickmap buffers

This commit is contained in:
Jarrod Doyle 2023-05-06 12:29:36 +01:00
parent 4eaf55a61c
commit ed46752c92
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
2 changed files with 0 additions and 15 deletions

View File

@ -108,20 +108,6 @@ impl BrickmapManager {
}
}
pub fn update_buffer(&self, context: &render::Context) {
let queue = &context.queue;
queue.write_buffer(
&self.brickmap_buffer,
0,
bytemuck::cast_slice(&self.brickmap_cache),
);
queue.write_buffer(
&self.brickgrid_buffer,
0,
bytemuck::cast_slice(&self.brickgrid),
)
}
pub fn get_brickgrid_buffer(&self) -> &wgpu::Buffer {
&self.brickgrid_buffer
}

View File

@ -61,7 +61,6 @@ impl VoxelRenderer {
log::info!("Creating brickmap manager...");
let brickmap_manager = super::brickmap::BrickmapManager::new(context);
brickmap_manager.update_buffer(context);
log::info!("Creating compute pipeline...");
let cs_descriptor = wgpu::include_wgsl!("../../assets/shaders/voxel_volume.wgsl");