Rename brickmap unpack element

This commit is contained in:
Jarrod Doyle 2024-03-29 09:15:19 +00:00
parent a6d89fb2e5
commit 4a5c142625
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
1 changed files with 3 additions and 4 deletions

View File

@ -16,8 +16,7 @@ pub struct BrickmapCacheEntry {
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone, bytemuck::Pod, bytemuck::Zeroable)] #[derive(Debug, Copy, Clone, bytemuck::Pod, bytemuck::Zeroable)]
// TODO: Rename struct struct BrickmapUploadElement {
struct BrickmapUnpackElement {
cache_idx: u32, // TODO: Change to usize? cache_idx: u32, // TODO: Change to usize?
brickmap: Brickmap, brickmap: Brickmap,
shading_element_count: u32, shading_element_count: u32,
@ -29,7 +28,7 @@ pub struct BrickmapCache {
cache: Vec<Option<BrickmapCacheEntry>>, cache: Vec<Option<BrickmapCacheEntry>>,
pub index: usize, pub index: usize,
pub num_loaded: u32, pub num_loaded: u32,
staged: Vec<BrickmapUnpackElement>, staged: Vec<BrickmapUploadElement>,
max_upload_count: usize, max_upload_count: usize,
buffer: wgpu::Buffer, buffer: wgpu::Buffer,
upload_buffer: wgpu::Buffer, upload_buffer: wgpu::Buffer,
@ -103,7 +102,7 @@ impl BrickmapCache {
let mut shading_elements = [0u32; 512]; let mut shading_elements = [0u32; 512];
shading_elements[..shading_element_count].copy_from_slice(&albedo_data); shading_elements[..shading_element_count].copy_from_slice(&albedo_data);
let staged_brickmap = BrickmapUnpackElement { let staged_brickmap = BrickmapUploadElement {
cache_idx: self.index as u32, cache_idx: self.index as u32,
brickmap, brickmap,
shading_element_count: shading_element_count as u32, shading_element_count: shading_element_count as u32,