mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 20:53:53 +00:00
ffa489a846
# Objective
- Fix #3606
- Fix #4579
- Fix #3380
## Solution
When running on a Linux machine with some AMD or Intel device, when calling
`surface.get_current_texture()`, ignore `wgpu::SurfaceError::Timeout` errors.
## Alternative
An alternative solution found in the `wgpu` examples is:
```rust
let frame = surface
.get_current_texture()
.or_else(|_| {
render_device.configure_surface(surface, &swap_chain_descriptor);
surface.get_current_texture()
})
.expect("Error reconfiguring surface");
window.swap_chain_texture = Some(TextureView::from(frame));
```
See: <
|
||
---|---|---|
.. | ||
macros | ||
src | ||
Cargo.toml |