bevy/crates
Nicola Papale ffa489a846 Ignore Timeout errors on Linux AMD & Intel (#5957)
# 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: <94ce76391b/wgpu/examples/framework.rs (L362-L370)>

Veloren [handles the Timeout error the way this PR proposes to handle it](https://github.com/gfx-rs/wgpu/issues/1218#issuecomment-1092056971).

The reason I went with this PR's solution is that `configure_surface` seems to be quite an expensive operation, and it would run every frame with the wgpu framework solution, despite the fact it works perfectly fine without `configure_surface`.

I know this looks super hacky with the linux-specific line and the AMD check, but my understanding is that the `Timeout` occurrence is specific to a quirk of some AMD drivers on linux, and if otherwise met should be considered a bug.


Co-authored-by: Carter Anderson <mcanders1@gmail.com>
2022-11-12 08:06:56 +00:00
..
bevy_animation Revert "Show prelude re-exports in docs (#6448)" (#6449) 2022-11-02 20:40:45 +00:00
bevy_app Revert "Show prelude re-exports in docs (#6448)" (#6449) 2022-11-02 20:40:45 +00:00
bevy_asset Macro for Loading Internal Binary Assets (#6478) 2022-11-07 19:44:15 +00:00
bevy_audio Revert "Show prelude re-exports in docs (#6448)" (#6449) 2022-11-02 20:40:45 +00:00
bevy_core make register on TypeRegistry idempotent (#6487) 2022-11-05 16:43:15 +00:00
bevy_core_pipeline Better bloom default settings (#6546) 2022-11-11 23:46:45 +00:00
bevy_derive Bump Version after Release (#5576) 2022-08-05 02:03:05 +00:00
bevy_diagnostic Add Exponential Moving Average into diagnostics (#4992) 2022-10-24 13:46:37 +00:00
bevy_dylib Bump Version after Release (#5576) 2022-08-05 02:03:05 +00:00
bevy_dynamic_plugin bevy_dynamic_plugin: make it possible to handle loading errors (#6437) 2022-11-01 11:35:44 +00:00
bevy_ecs Add send_event and friends to WorldCell (#6515) 2022-11-07 21:25:31 +00:00
bevy_ecs_compile_fail_tests Fix trybuild tests broken by rust 1.65 (#6457) 2022-11-03 15:09:27 +00:00
bevy_encase_derive Update glam 0.22, hexasphere 8.0, encase 0.4 (#6427) 2022-11-07 19:44:13 +00:00
bevy_gilrs feat: add GamepadInfo, expose gamepad names (#6342) 2022-10-24 14:33:50 +00:00
bevy_gltf fix nightly clippy warnings (#6395) 2022-10-28 21:03:01 +00:00
bevy_hierarchy Fix unsound EntityMut::remove_children. Add EntityMut::world_scope (#6464) 2022-11-04 17:30:40 +00:00
bevy_input Revert "Show prelude re-exports in docs (#6448)" (#6449) 2022-11-02 20:40:45 +00:00
bevy_internal Revert "Show prelude re-exports in docs (#6448)" (#6449) 2022-11-02 20:40:45 +00:00
bevy_log Revert "Show prelude re-exports in docs (#6448)" (#6449) 2022-11-02 20:40:45 +00:00
bevy_macro_utils fix nightly clippy warnings (#6395) 2022-10-28 21:03:01 +00:00
bevy_math Update glam 0.22, hexasphere 8.0, encase 0.4 (#6427) 2022-11-07 19:44:13 +00:00
bevy_mikktspace Update glam 0.22, hexasphere 8.0, encase 0.4 (#6427) 2022-11-07 19:44:13 +00:00
bevy_pbr Fix color banding by dithering image before quantization (#5264) 2022-11-11 19:43:45 +00:00
bevy_ptr Bump Version after Release (#5576) 2022-08-05 02:03:05 +00:00
bevy_reflect Update glam 0.22, hexasphere 8.0, encase 0.4 (#6427) 2022-11-07 19:44:13 +00:00
bevy_render Ignore Timeout errors on Linux AMD & Intel (#5957) 2022-11-12 08:06:56 +00:00
bevy_scene bevy_reflect: Binary formats (#6140) 2022-11-04 02:22:54 +00:00
bevy_sprite Fix color banding by dithering image before quantization (#5264) 2022-11-11 19:43:45 +00:00
bevy_tasks fix: explicitly specify required version of async-task (#6509) 2022-11-07 21:43:07 +00:00
bevy_text UI scaling fix (#6479) 2022-11-05 13:51:12 +00:00
bevy_time TaskPool Panic Handling (#6443) 2022-11-02 23:40:08 +00:00
bevy_transform TaskPool Panic Handling (#6443) 2022-11-02 23:40:08 +00:00
bevy_ui Fix panic when the primary window is closed (#6545) 2022-11-12 01:28:31 +00:00
bevy_utils Remove Sync bound from Local (#5483) 2022-09-12 04:15:55 +00:00
bevy_window Add send_event and friends to WorldCell (#6515) 2022-11-07 21:25:31 +00:00
bevy_winit Move the cursor's origin back to the bottom-left (#6533) 2022-11-10 20:10:51 +00:00