-
Notifications
You must be signed in to change notification settings - Fork 5
Description
connection: gfx-rs/wgpu#5926
I seem to run into this quite a bit recently. Some for loop is eventually dependant on some uniform (often iTime) and therefore might be an infinite loop. Infinite loops with hard coded values do get compiled away and are not an issue it seems.
since this behaviour isn't going to be changed in wgpu-core, and the uncaptured error isn't captured in wgpu-py this will panic with a "device is lost", after essentially some timeout.
If we want to mimic the behaviour on the website, this should somehow just work. Maybe by skipping the 0th frame or something, if it starts to hang.
I tried to help the compiler by wrapping the uniforms in max(), min() or maybe abs() (since negative numbers in that examples are a problem) - but nothing seems to help.
Using this issue to track changes to the behaviour in the upstream deps and maybe finding a solution someday.