Added notes
This commit is contained in:
@@ -108,7 +108,8 @@ impl Nodes {
|
|||||||
if self.dirty {
|
if self.dirty {
|
||||||
self.dirty = false;
|
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
|
// Convert u32 node buffer to u8
|
||||||
let node_origin = wgpu::Origin3d{ x:0, y: 0, z: 0 };
|
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::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
|
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());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user