Skip to content

Commit

Permalink
Remove parallelism to make miri work
Browse files Browse the repository at this point in the history
  • Loading branch information
Zac8668 committed Jan 27, 2024
1 parent c9f05f2 commit e76d4a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
8 changes: 3 additions & 5 deletions src/chunk_group.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ pub fn update_chunk_groups<'a>(
&'a Sender<DeferredDirtyRectUpdate>,
),
update: (u8, &'a Materials),
scope: &Scope<'a, '_, ()>,
) {
puffin::profile_function!();

Expand Down Expand Up @@ -433,7 +432,6 @@ fn update_test() {
let dt = 0;

//Update
let compute_pool = ComputeTaskPool::get();
// Create channel for sending dirty update rects
let (dirty_update_rects_send, _) = async_channel::unbounded::<DeferredDirtyRectUpdate>();
let dirty_update_rect_send = &dirty_update_rects_send;
Expand All @@ -442,15 +440,15 @@ fn update_test() {
let (dirty_render_rects_send, _) = async_channel::unbounded::<DeferredDirtyRectUpdate>();
let dirty_render_rect_send = &dirty_render_rects_send;

compute_pool.scope(|scope| {

update_chunk_groups(
&mut chunk_manager.chunks,
(0, 0),
&dirty_rects,
manager_pos,
(dirty_update_rect_send, dirty_render_rect_send),
(dt, materials),
scope,

);
});

}
12 changes: 1 addition & 11 deletions src/chunk_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,17 +361,7 @@ pub fn chunk_manager_update(
{
puffin::profile_scope!("Update step scope.");

compute_pool.scope(|scope| {
update_chunk_groups(
&mut chunk_manager.chunks,
(x_toff, y_toff),
dirty_rects,
manager_pos,
(dirty_update_rect_send, dirty_render_rect_send),
(dt, materials),
scope,
);
});

}

// Close the deferred updates channel so that our deferred update task will complete.
Expand Down

0 comments on commit e76d4a2

Please sign in to comment.