learn-wgpu
learn-wgpu copied to clipboard
Timeout errors on every frame when rendering blue screen
At the point in https://sotrh.github.io/learn-wgpu/beginner/tutorial2-swapchain/#render where the code renders a blue screen the code runs and displays the screen successfully but each frame also emits a Timeout error. I verified the same result when running the code at https://github.com/sotrh/learn-wgpu/blob/master/code/beginner/tutorial2-swapchain/src/main.rs to to draw a triangle. Is this expected or is there some way to fix it?
In case it's related I also found that the example animation at https://github.com/sotrh/learn-wgpu/tree/master/code/intermediate/tutorial12-camera runs at a very high frame rate and the example with controls at https://github.com/sotrh/learn-wgpu/tree/master/code/beginner/tutorial7-instancing reads inputs so quickly that it's hard to move around the scene.
After doing some more digging I've found that timeout errors aren't emitted on every frame, just that there's 1 call to state.render() that executes successfully for every ~350 calls that result in a timeout error. So my questions are
Is this expected behavior?
Is there a recommended way to handle this (my first thought is to just silence timeout errors, which doesn't seem right)?
Is the high frame rate related?
Is there a way to ensure a fixed frame rate regardless of hardware?
I'll need to do some research on this.
Are you still running into issues on the latest version of wgpu?