Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Zac8668 committed Jan 27, 2024
1 parent cfc1f99 commit c9f05f2
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions src/chunk_group.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ pub fn update_chunk_groups<'a>(
chunks = chunks_ptr.as_mut().unwrap();
}

scope.spawn(async move {

//If not a center chunk in our current update step, or we don't have the chunk, continue
let same_x = (chunk_pos.x + x_toff + manager_pos.x.abs() % 2) % 2 == 0;
let same_y = (chunk_pos.y + y_toff + manager_pos.y.abs() % 2) % 2 == 0;
Expand Down Expand Up @@ -391,7 +391,7 @@ pub fn update_chunk_groups<'a>(
dt,
rect,
)
});

}
}

Expand Down Expand Up @@ -442,19 +442,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(|deferred_scope: &Scope<'_, '_, ()>| {


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,
);
});
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,
);
});
}

0 comments on commit c9f05f2

Please sign in to comment.