learn-wgpu icon indicating copy to clipboard operation
learn-wgpu copied to clipboard

Timeout errors on every frame when rendering blue screen

Open eulertour opened this issue 4 years ago • 4 comments

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?

eulertour avatar Jun 26 '21 22:06 eulertour

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.

eulertour avatar Jun 27 '21 05:06 eulertour

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?

eulertour avatar Jun 27 '21 07:06 eulertour

I'll need to do some research on this.

sotrh avatar Jun 27 '21 16:06 sotrh

Are you still running into issues on the latest version of wgpu?

sotrh avatar Nov 14 '21 18:11 sotrh