Added notes

This commit is contained in:
Piotrek
2021-05-19 14:26:35 +02:00
parent c4daecae6f
commit e9632a20d2
+2 -4
View File
@@ -108,7 +108,8 @@ impl Nodes {
if self.dirty {
self.dirty = false;
let timer = Instant::now();
// Note: this takes usually 2ms, up to 9ms
// TODO: Maybe instead of converting u32 to u8, just store u8 and convert them when writing/reading
// Convert u32 node buffer to u8
let node_origin = wgpu::Origin3d{ x:0, y: 0, z: 0 };
@@ -121,9 +122,6 @@ impl Nodes {
wgpu::TextureCopyView { texture: texture, mip_level: 0, origin: node_origin }, &node_bytes[..],
wgpu::TextureDataLayout { offset: 0, bytes_per_row: 4*node_size.width, rows_per_image: node_size.height }, node_size
);
println!("Write nodes: {} ms", timer.elapsed().as_millis());
}
}
}