bevy/crates
noxmore 73d68d60bb
Change GpuImage::size from UVec2 to Extent3d (#16815)
# Objective

When preparing `GpuImage`s, we currently discard the
`depth_or_array_layers` of the `Image`'s size by converting it into a
`UVec2`.

Fixes #16715.

## Solution

Change `GpuImage::size` to `Extent3d`, and just pass that through when
creating `GpuImage`s.
Also copy the `aspect_ratio`, and `size` (now `size_2d` for
disambiguation from the field) functions from `Image` to `GpuImage` for
ease of use with 2D textures.
I originally copied all size-related functions (like `width`, and
`height`), but i think they are unnecessary considering how visible the
`size` field on `GpuImage` is compared to `Image`.

## Testing

Tested via `cargo r -p ci` for everything except docs, when generating
docs it keeps spitting out a ton of
```
error[E0554]: `#![feature]` may not be used on the stable release channel
 --> crates/bevy_dylib/src/lib.rs:1:21
  |
1 | #![cfg_attr(docsrs, feature(doc_auto_cfg))]
  | 
```
Not sure why this is happening, but it also happens without my changes,
so it's almost certainly some strange issue specific to my machine.

## Migration Guide

- `GpuImage::size` is now an `Extent3d`. To easily get 2D size, use
`size_2d()`.
2024-12-17 19:08:09 +00:00
..
bevy_a11y Remove accesskit re-export from bevy_a11y (#16257) 2024-11-08 21:01:16 +00:00
bevy_animation Support tuple structs in AnimatedField (#16747) 2024-12-11 17:06:08 +00:00
bevy_app Rust 1.83, allow -> expect (missing_docs) (#16561) 2024-12-16 23:27:57 +00:00
bevy_asset Add AssetChanged query filter (#16810) 2024-12-17 18:57:08 +00:00
bevy_audio Move Volume and GlobalVolume to own file (#16838) 2024-12-16 19:28:30 +00:00
bevy_color Deny derive_more error feature and replace it with thiserror (#16684) 2024-12-06 17:03:55 +00:00
bevy_core Update hashbrown to 0.15 (#15801) 2024-12-10 19:45:50 +00:00
bevy_core_pipeline Implement bindless lightmaps. (#16653) 2024-12-16 23:37:06 +00:00
bevy_derive Rust 1.83, allow -> expect (missing_docs) (#16561) 2024-12-16 23:27:57 +00:00
bevy_dev_tools Draw the UI debug overlay using the UI renderer (#16693) 2024-12-11 00:49:47 +00:00
bevy_diagnostic Update sysinfo requirement from 0.32.0 to 0.33.0 (#16851) 2024-12-17 05:06:50 +00:00
bevy_dylib Generate links to definition in source code pages on docs.rs and dev-docs.bevyengine.org (#12965) 2024-07-29 23:10:16 +00:00
bevy_ecs Fix typo in B0001 message (#16860) 2024-12-17 19:06:31 +00:00
bevy_encase_derive Rust 1.83, allow -> expect (missing_docs) (#16561) 2024-12-16 23:27:57 +00:00
bevy_gilrs Deny derive_more error feature and replace it with thiserror (#16684) 2024-12-06 17:03:55 +00:00
bevy_gizmos Fix registering all reflection types that are components as reflection components (#16800) 2024-12-16 19:16:43 +00:00
bevy_gltf Remove the meta field from LoadedAsset and ErasedLoadedAsset. (#15487) 2024-12-13 20:40:02 +00:00
bevy_hierarchy rename enqueue_command to queue_command for consistency (#16753) 2024-12-11 00:53:54 +00:00
bevy_image Rust 1.83, allow -> expect (missing_docs) (#16561) 2024-12-16 23:27:57 +00:00
bevy_input Fix registering all reflection types that are components as reflection components (#16800) 2024-12-16 19:16:43 +00:00
bevy_input_focus Tab navigation framework for bevy_input_focus. (#16795) 2024-12-16 23:54:53 +00:00
bevy_internal Draw the UI debug overlay using the UI renderer (#16693) 2024-12-11 00:49:47 +00:00
bevy_log Use en-us locale for typos (#16037) 2024-10-20 18:55:17 +00:00
bevy_macro_utils Use one BevyManifest instance in proc macros (#16766) 2024-12-15 15:00:05 +00:00
bevy_math f32 -> Rot2 in bounding volume docs (#16848) 2024-12-17 00:12:49 +00:00
bevy_mesh Rust 1.83, allow -> expect (missing_docs) (#16561) 2024-12-16 23:27:57 +00:00
bevy_mikktspace Rust 1.83, allow -> expect (missing_docs) (#16561) 2024-12-16 23:27:57 +00:00
bevy_pbr Change GpuImage::size from UVec2 to Extent3d (#16815) 2024-12-17 19:08:09 +00:00
bevy_picking Rust 1.83, allow -> expect (missing_docs) (#16561) 2024-12-16 23:27:57 +00:00
bevy_ptr Fix MSRVs for standalone crates (#16333) 2024-11-17 09:38:13 +00:00
bevy_reflect bevy_reflect: Remove PartialReflect::serializable (#16576) 2024-12-16 23:29:46 +00:00
bevy_remote BRP strict field in query (#16725) 2024-12-14 05:22:19 +00:00
bevy_render Change GpuImage::size from UVec2 to Extent3d (#16815) 2024-12-17 19:08:09 +00:00
bevy_scene Add missing #[reflect(Component, Default)] to SceneRoot and DynamicSceneRoot. (#16816) 2024-12-15 19:18:22 +00:00
bevy_sprite Change GpuImage::size from UVec2 to Extent3d (#16815) 2024-12-17 19:08:09 +00:00
bevy_state Rust 1.83, allow -> expect (missing_docs) (#16561) 2024-12-16 23:27:57 +00:00
bevy_tasks Add no_std support to bevy_tasks (#15464) 2024-12-06 02:14:54 +00:00
bevy_text fix tiny copy-paste mistake in bevy_text::font_atlas_set (#16667) 2024-12-10 03:17:09 +00:00
bevy_time Use en-us locale for typos (#16037) 2024-10-20 18:55:17 +00:00
bevy_transform track_change_detection: Also track spawns/despawns (#16047) 2024-12-17 04:46:31 +00:00
bevy_ui Change GpuImage::size from UVec2 to Extent3d (#16815) 2024-12-17 19:08:09 +00:00
bevy_utils Update hashbrown to 0.15 (#15801) 2024-12-10 19:45:50 +00:00
bevy_window Rust 1.83, allow -> expect (missing_docs) (#16561) 2024-12-16 23:27:57 +00:00
bevy_winit Rename trigger.entity() to trigger.target() (#16716) 2024-12-08 21:55:09 +00:00