bevy/crates
Robert Swain b9c623e4f3 Configurable wgpu features/limits priority (#3452)
# Objective

- Allow the user to specify the priority when configuring wgpu features/limits and by default use the maximum capabilities of the chosen adapter.

## Solution

- Add a `WgpuOptionsPriority` enum with `Compatibility`, `Functionality` and `WebGL2` options.
- Add a `priority: WgpuOptionsPriority` member to `WgpuOptions`.
- When initialising the renderer, if `WgpuOptions::priority == WgpuOptionsPriority::Functionality`, query the adapter for the available features and limits, use them when creating a device, and update `WgpuOptions` with those values. If `Compatibility` use the behaviour as before this PR. If `WebGL2` then use the WebGL2 downlevel limits as used when when building for wasm, for convenience of testing WebGL2 limits without having to build for wasm.
- Add an environment variable `WGPU_OPTIONS_PRIO` that takes `compatibility`, `functionality`, `webgl2`.
- Default to `WgpuOptionsPriority::Functionality`.
- Insert updated `WgpuOptions` into render app world as well. This is useful for applying the limits when rendering, such as limiting the directional light shadow map texture to 2048x2048 when using WebGL2 downlevel limits but not on wasm.
- Reduced `draw_state` logs from `debug` to `trace` and added `debug` level logs for the wgpu features and limits. Use `RUST_LOG=bevy_render=debug` to see the output.
2022-01-04 20:08:12 +00:00
..
bevy_app Fix doc_markdown lints in bevy_app (#3467) 2021-12-30 09:08:19 +00:00
bevy_asset Fix doc_markdown lints in bevy_asset (#3468) 2021-12-29 17:52:39 +00:00
bevy_audio Fix doc_markdown lints in bevy_audio (#3469) 2021-12-29 17:52:42 +00:00
bevy_core Remove Bytes, FromBytes, Labels, EntityLabels. Document rest of bevy_core and enable warning on missing docs. (#3521) 2022-01-02 20:36:40 +00:00
bevy_core_pipeline make sub_app return an &App and add sub_app_mut() -> &mut App (#3309) 2021-12-24 06:57:30 +00:00
bevy_crevice Update nalgebra requirement from 0.29.0 to 0.30.0 (#3540) 2022-01-03 08:33:15 +00:00
bevy_derive Remove Bytes, FromBytes, Labels, EntityLabels. Document rest of bevy_core and enable warning on missing docs. (#3521) 2022-01-02 20:36:40 +00:00
bevy_diagnostic Fix doc_markdown lints in bevy_diagnostic (#3472) 2021-12-29 17:38:08 +00:00
bevy_dylib Updated bevy_dylib documentation and added missing_doc warning. (#3515) 2022-01-02 10:51:08 +00:00
bevy_dynamic_plugin Update to edition 2021 on master (#3028) 2021-10-27 00:12:14 +00:00
bevy_ecs Fix error message for the Component macro's component storage attribute. (#3534) 2022-01-02 23:28:18 +00:00
bevy_ecs_compile_fail_tests Fix clippy lints for 1.57 (#3238) 2021-12-02 23:40:37 +00:00
bevy_gilrs enable wasm-bindgen feature on gilrs (#3420) 2021-12-23 19:19:14 +00:00
bevy_gltf bevy_gltf: Add support for loading lights (#3506) 2022-01-03 07:59:25 +00:00
bevy_input Fix doc_markdown lints in bevy_input (#3475) 2021-12-29 17:38:10 +00:00
bevy_internal Added missing docs to bevy_internal and added warn on missing docs (#3514) 2022-01-01 21:22:04 +00:00
bevy_log Fix doc_markdown lints in bevy_log (#3476) 2021-12-29 17:38:11 +00:00
bevy_macro_utils Use fully-qualified type names in proc macro. (#3544) 2022-01-04 19:49:37 +00:00
bevy_math Replace old renderer with new renderer (#3312) 2021-12-14 03:58:23 +00:00
bevy_pbr Configurable wgpu features/limits priority (#3452) 2022-01-04 20:08:12 +00:00
bevy_reflect Implement ReflectValue serialization for Duration (#3318) 2021-12-29 21:04:26 +00:00
bevy_render Configurable wgpu features/limits priority (#3452) 2022-01-04 20:08:12 +00:00
bevy_scene Renamed Entity::new to Entity::from_raw (#3465) 2021-12-29 20:49:00 +00:00
bevy_sprite Fix doc_markdown lints in bevy_sprite (#3480) 2021-12-29 18:49:43 +00:00
bevy_tasks Fix doc_markdown lints in bevy_tasks (#3481) 2021-12-29 17:38:13 +00:00
bevy_text Add FromReflect trait to convert dynamic types to concrete types (#1395) 2021-12-26 18:49:01 +00:00
bevy_transform Fix doc_markdown lints in bevy_transform (#3483) 2021-12-30 09:23:17 +00:00
bevy_ui bevy_ui: Check clip when handling interactions (#3461) 2021-12-28 20:47:45 +00:00
bevy_utils Fix doc_markdown lints in bevy_utils (#3485) 2021-12-30 09:23:18 +00:00
bevy_window Added set_cursor_icon(...) to Window (#3395) 2021-12-20 22:04:45 +00:00
bevy_winit Added set_cursor_icon(...) to Window (#3395) 2021-12-20 22:04:45 +00:00