Open marcianx opened 2 years ago
Actually, changing the loop body to
let next_frame_time = get_frame_time();
print!(".");
if next_frame_time > 1.5 / 60. {
println!("\nframe time {}", next_frame_time);
}
if next_frame_time > 5. / 60. {
break;
}
next_frame().await;
shows a lot more output of various numbers of frames being dropped in the middle. I used the intermediate dots to determine sequential multi-frame drops, and cleaning up the dots, I easily see this output:
frame time 0.033828974
frame time 0.033765078
frame time 0.049669266
frame time 0.033704042
frame time 0.033545017
frame time 0.0333755
frame time 0.033708572
frame time 0.033925056
frame time 0.04947877
frame time 0.033824205
frame time 0.033686876
frame time 0.049539566
frame time 0.033770084
frame time 0.06733322
frame time 0.033753395
frame time 0.033765793
frame time 0.04961443
Going back to my little demo for moving a ball, the string of sequential frame drops are significantly noticeable. So I was wondering whether there's a configuration that might help me eliminate those.
I was experimenting with macroquad moving a simple ball around the screen, and I noticed sudden pauses that appear periodically while keeping the key pressed to move the ball. As a simple test, I ran:
which outputs:
suggesting a frame drop followed by 3 frame drops. (It also sometimes drops a single frame and recovers right after.) I can easily reproduce this in both debug and
--release
. This is on Pop!_OS 21.04 on an 8-core AMD with Radeon RX 580 -- ample specs to run an noop without frame drops.Any insights?