From 4a5c142625ecd061774398f7fd9c35f8576e584c Mon Sep 17 00:00:00 2001 From: Jarrod Doyle Date: Fri, 29 Mar 2024 09:15:19 +0000 Subject: [PATCH] Rename brickmap unpack element --- src/voxel/brickworld/brickmap_cache.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/voxel/brickworld/brickmap_cache.rs b/src/voxel/brickworld/brickmap_cache.rs index ecda1e4..1549bd3 100644 --- a/src/voxel/brickworld/brickmap_cache.rs +++ b/src/voxel/brickworld/brickmap_cache.rs @@ -16,8 +16,7 @@ pub struct BrickmapCacheEntry { #[repr(C)] #[derive(Debug, Copy, Clone, bytemuck::Pod, bytemuck::Zeroable)] -// TODO: Rename struct -struct BrickmapUnpackElement { +struct BrickmapUploadElement { cache_idx: u32, // TODO: Change to usize? brickmap: Brickmap, shading_element_count: u32, @@ -29,7 +28,7 @@ pub struct BrickmapCache { cache: Vec>, pub index: usize, pub num_loaded: u32, - staged: Vec, + staged: Vec, max_upload_count: usize, buffer: wgpu::Buffer, upload_buffer: wgpu::Buffer, @@ -103,7 +102,7 @@ impl BrickmapCache { let mut shading_elements = [0u32; 512]; shading_elements[..shading_element_count].copy_from_slice(&albedo_data); - let staged_brickmap = BrickmapUnpackElement { + let staged_brickmap = BrickmapUploadElement { cache_idx: self.index as u32, brickmap, shading_element_count: shading_element_count as u32,