bevy/crates
Aevyrie a1545dd3a6
Fix compile failure in WASM without wgpu backend (#14081)
# Objective

- When no wgpu backend is selected, there should be a clear explanation.
- Fix a regression in 0.14 when not using default features. I hit this
compile failure when trying to build bevy_framepace for 0.14.0-rc.4
```
error[E0432]: unresolved import `crate::core_3d::DEPTH_TEXTURE_SAMPLING_SUPPORTED`
  --> /Users/aevyrie/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_core_pipeline-0.14.0-rc.4/src/dof/mod.rs:59:19
   |
59 |         Camera3d, DEPTH_TEXTURE_SAMPLING_SUPPORTED,
   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `DEPTH_TEXTURE_SAMPLING_SUPPORTED` in `core_3d`
   |
note: found an item that was configured out
  --> /Users/aevyrie/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_core_pipeline-0.14.0-rc.4/src/core_3d/mod.rs:53:11
   |
53 | pub const DEPTH_TEXTURE_SAMPLING_SUPPORTED: bool = false;
   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: found an item that was configured out
  --> /Users/aevyrie/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_core_pipeline-0.14.0-rc.4/src/core_3d/mod.rs:63:11
   |
63 | pub const DEPTH_TEXTURE_SAMPLING_SUPPORTED: bool = true;
   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```

## Solution

- Ensure that `DEPTH_TEXTURE_SAMPLING_SUPPORTED` is either `true` or
`false`, it shouldn't be completely missing.

## Testing

- Building on WASM without default features, which now seemingly no
longer includes webgl, will panic on startup with a message saying that
no wgpu backend was selected. This is much more helpful than the compile
time failure:
```
No wgpu backend feature that is implemented for the target platform was enabled
```
- I can see an argument for making this a compile time failure, however
the current failure mode is very confusing for novice users, and
provides no clues for how to fix it. If we want this to fail at compile
time, we should do it in a way that fails with a helpful message,
similar to what this PR acheives.
2024-06-30 22:58:43 +00:00
..
bevy_a11y Update accesskit and accesskit_winit (#13841) 2024-06-17 15:08:53 +00:00
bevy_animation Remove unnecessary compute for rotation interpolation (#14019) 2024-06-25 21:14:37 +00:00
bevy_app feat(bevy_app): expose an API to perform updates for a specific sub-app. (#14009) 2024-06-25 14:04:31 +00:00
bevy_asset Allow phase items not associated with meshes to be binned. (#14029) 2024-06-27 16:13:03 +00:00
bevy_audio Fix a few "repeated word" typos (#13955) 2024-06-20 21:35:20 +00:00
bevy_color Allow bevy_color use without bevy_reflect support (#13870) 2024-06-16 15:47:30 +00:00
bevy_core Don't show .to_bits in Display impl for Entity (#14011) 2024-06-25 17:08:24 +00:00
bevy_core_pipeline Fix compile failure in WASM without wgpu backend (#14081) 2024-06-30 22:58:43 +00:00
bevy_derive Deprecate dynamic plugins (#13080) 2024-05-20 20:01:28 +00:00
bevy_dev_tools Fix lints introduced in Rust beta 1.80 (#13899) 2024-06-17 17:22:01 +00:00
bevy_diagnostic Poll system information in separate tasks (#13693) 2024-06-10 19:06:22 +00:00
bevy_dylib Add README.md to all crates (#13184) 2024-05-02 18:56:00 +00:00
bevy_dynamic_plugin Deprecate dynamic plugins (#13080) 2024-05-20 20:01:28 +00:00
bevy_ecs Fix error in AnyOf (#14027) 2024-06-27 20:20:50 +00:00
bevy_encase_derive Add README.md to all crates (#13184) 2024-05-02 18:56:00 +00:00
bevy_gilrs Add README.md to all crates (#13184) 2024-05-02 18:56:00 +00:00
bevy_gizmos Use u32 for all resolution/subdivision fields in bevy_gizmos (#13927) 2024-06-19 17:28:10 +00:00
bevy_gltf Add labels to Gltf Node and Mesh assets (#13558) 2024-06-05 23:10:33 +00:00
bevy_hierarchy Fix EntityCommands::despawn docs (#13774) 2024-06-09 17:59:19 +00:00
bevy_input Fix a few "repeated word" typos (#13955) 2024-06-20 21:35:20 +00:00
bevy_internal don't crash without features bevy_pbr, ktx2, zstd (#14020) 2024-06-26 03:08:23 +00:00
bevy_log Document use of NO_COLOR in LogPlugin (#13984) 2024-06-24 21:04:55 +00:00
bevy_macro_utils Add README.md to all crates (#13184) 2024-05-02 18:56:00 +00:00
bevy_math Fix a few "repeated word" typos (#13955) 2024-06-20 21:35:20 +00:00
bevy_mikktspace Fixed a link to Blender's mikktspace docs (#13924) 2024-06-19 12:37:10 +00:00
bevy_pbr don't put previous skin/morph in the morphed_skinned_mesh_layout (#14065) 2024-06-29 01:03:51 +00:00
bevy_picking Upstream CorePlugin from bevy_mod_picking (#13677) 2024-06-15 11:59:57 +00:00
bevy_ptr add Debug for ptr types (#13498) 2024-05-24 21:25:11 +00:00
bevy_reflect bevy_reflect: Improve reflection serialization error messages (#13867) 2024-06-17 18:13:46 +00:00
bevy_render Allow phase items not associated with meshes to be binned. (#14029) 2024-06-27 16:13:03 +00:00
bevy_scene Fix lints introduced in Rust beta 1.80 (#13899) 2024-06-17 17:22:01 +00:00
bevy_sprite Made Material2dBindGroupId instantiable (#14053) 2024-06-29 00:41:15 +00:00
bevy_state Move StateTransitionSteps registration to states plugin (#13939) 2024-06-20 00:57:40 +00:00
bevy_tasks fix: upgrade to winit v0.30 (#13366) 2024-06-03 13:06:48 +00:00
bevy_text Fix lints introduced in Rust beta 1.80 (#13899) 2024-06-17 17:22:01 +00:00
bevy_time Make time_system public (#13879) 2024-06-16 18:07:41 +00:00
bevy_transform impl BuildChildrenTransformExt for EntityWorldMut (#14022) 2024-06-26 14:59:20 +00:00
bevy_ui add PartialEq to Outline (#14055) 2024-06-27 20:03:07 +00:00
bevy_utils Fix parameter name of all_tuples's document (#13896) 2024-06-17 15:17:24 +00:00
bevy_window apply window scale to window size when creating it (#13967) 2024-06-21 18:04:57 +00:00
bevy_winit only run one update per frame drawn (#14023) 2024-06-26 20:23:17 +00:00