From 850b643dd313bd857dc210b42ba9439898a8624f Mon Sep 17 00:00:00 2001 From: james7132 Date: Wed, 19 Oct 2022 11:51:17 -0700 Subject: [PATCH 01/10] Shrink ComputedVisibility via manual bitflags --- crates/bevy_render/src/view/visibility/mod.rs | 58 +++++++++++++------ 1 file changed, 41 insertions(+), 17 deletions(-) diff --git a/crates/bevy_render/src/view/visibility/mod.rs b/crates/bevy_render/src/view/visibility/mod.rs index d6979ac5e0882..76b8a3ec930f6 100644 --- a/crates/bevy_render/src/view/visibility/mod.rs +++ b/crates/bevy_render/src/view/visibility/mod.rs @@ -58,8 +58,7 @@ impl Visibility { #[derive(Component, Clone, Reflect, Debug, Eq, PartialEq)] #[reflect(Component, Default)] pub struct ComputedVisibility { - is_visible_in_hierarchy: bool, - is_visible_in_view: bool, + mask: u8, } impl Default for ComputedVisibility { @@ -69,10 +68,14 @@ impl Default for ComputedVisibility { } impl ComputedVisibility { + const INVISIBLE_MASK: u8 = 0; + const VISIBLE_MASK: u8 = Self::VISIBLE_IN_HIERARCHY | Self::VISIBLE_IN_VIEW; + const VISIBLE_IN_VIEW: u8 = 1 << 1; + const VISIBLE_IN_HIERARCHY: u8 = 1 << 2; + /// A [`ComputedVisibility`], set as invisible. pub const INVISIBLE: Self = ComputedVisibility { - is_visible_in_hierarchy: false, - is_visible_in_view: false, + mask: Self::INVISIBLE_MASK, }; /// Whether this entity is visible to something this frame. This is true if and only if [`Self::is_visible_in_hierarchy`] and [`Self::is_visible_in_view`] @@ -81,7 +84,7 @@ impl ComputedVisibility { /// [`CoreStage::Update`] stage will yield the value from the previous frame. #[inline] pub fn is_visible(&self) -> bool { - self.is_visible_in_hierarchy && self.is_visible_in_view + (self.mask & Self::VISIBLE_MASK) != 0 } /// Whether this entity is visible in the entity hierarchy, which is determined by the [`Visibility`] component. @@ -90,7 +93,7 @@ impl ComputedVisibility { /// [`VisibilitySystems::VisibilityPropagate`] system label. #[inline] pub fn is_visible_in_hierarchy(&self) -> bool { - self.is_visible_in_hierarchy + (self.mask & Self::VISIBLE_IN_HIERARCHY) != 0 } /// Whether this entity is visible in _any_ view (Cameras, Lights, etc). Each entity type (and view type) should choose how to set this @@ -102,7 +105,7 @@ impl ComputedVisibility { /// Other entities might just set this to `true` every frame. #[inline] pub fn is_visible_in_view(&self) -> bool { - self.is_visible_in_view + (self.mask & Self::VISIBLE_IN_VIEW) != 0 } /// Sets `is_visible_in_view` to `true`. This is not reversible for a given frame, as it encodes whether or not this is visible in @@ -111,7 +114,16 @@ impl ComputedVisibility { /// label. Don't call this unless you are defining a custom visibility system. For normal user-defined entity visibility, see [`Visibility`]. #[inline] pub fn set_visible_in_view(&mut self) { - self.is_visible_in_view = true; + self.mask |= Self::VISIBLE_IN_VIEW; + } + + #[inline(always)] + fn set(&mut self, mask: u8, state: bool) { + if state { + self.mask |= mask; + } else { + self.mask &= !mask; + } } } @@ -271,13 +283,16 @@ fn visibility_propagate_system( children_query: Query<&Children, (With, With, With)>, ) { for (children, visibility, mut computed_visibility, entity) in root_query.iter_mut() { - computed_visibility.is_visible_in_hierarchy = visibility.is_visible; + computed_visibility.set( + ComputedVisibility::VISIBLE_IN_HIERARCHY, + visibility.is_visible, + ); // reset "view" visibility here ... if this entity should be drawn a future system should set this to true - computed_visibility.is_visible_in_view = false; + computed_visibility.mask &= !ComputedVisibility::VISIBLE_IN_VIEW; if let Some(children) = children { for child in children.iter() { let _ = propagate_recursive( - computed_visibility.is_visible_in_hierarchy, + computed_visibility.is_visible_in_hierarchy(), &mut visibility_query, &children_query, *child, @@ -304,10 +319,14 @@ fn propagate_recursive( child_parent.get(), expected_parent, "Malformed hierarchy. This probably means that your hierarchy has been improperly maintained, or contains a cycle" ); - computed_visibility.is_visible_in_hierarchy = visibility.is_visible && parent_visible; + let visible_in_hierarchy = visibility.is_visible && parent_visible; + computed_visibility.set( + ComputedVisibility::VISIBLE_IN_HIERARCHY, + visible_in_hierarchy, + ); // reset "view" visibility here ... if this entity should be drawn a future system should set this to true - computed_visibility.is_visible_in_view = false; - computed_visibility.is_visible_in_hierarchy + computed_visibility.mask &= !ComputedVisibility::VISIBLE_IN_VIEW; + visible_in_hierarchy }; for child in children_query.get(entity).map_err(drop)?.iter() { @@ -381,7 +400,7 @@ pub fn check_visibility( } } - computed_visibility.is_visible_in_view = true; + computed_visibility.mask |= ComputedVisibility::VISIBLE_IN_VIEW; let cell = thread_queues.get_or_default(); let mut queue = cell.take(); queue.push(entity); @@ -403,7 +422,7 @@ pub fn check_visibility( return; } - computed_visibility.is_visible_in_view = true; + computed_visibility.mask = ComputedVisibility::VISIBLE_IN_VIEW; let cell = thread_queues.get_or_default(); let mut queue = cell.take(); queue.push(entity); @@ -426,6 +445,11 @@ mod test { use bevy_hierarchy::BuildWorldChildren; + #[test] + fn computed_visibility_size() { + assert_eq!(std::mem::size_of::(), 1); + } + #[test] fn visibility_propagation() { let mut app = App::new(); @@ -509,7 +533,7 @@ mod test { .entity(e) .get::() .unwrap() - .is_visible_in_hierarchy + .is_visible_in_hierarchy() }; assert!( !is_visible(root1), From cfa2a29c4264eac6b01e9e876d44d7ab2db7d8e2 Mon Sep 17 00:00:00 2001 From: james7132 Date: Wed, 19 Oct 2022 14:53:31 -0700 Subject: [PATCH 02/10] Avoid assigning to the mask consecutively --- crates/bevy_render/src/view/visibility/mod.rs | 29 +++++++------------ 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/crates/bevy_render/src/view/visibility/mod.rs b/crates/bevy_render/src/view/visibility/mod.rs index 76b8a3ec930f6..e74fdfb055998 100644 --- a/crates/bevy_render/src/view/visibility/mod.rs +++ b/crates/bevy_render/src/view/visibility/mod.rs @@ -116,15 +116,6 @@ impl ComputedVisibility { pub fn set_visible_in_view(&mut self) { self.mask |= Self::VISIBLE_IN_VIEW; } - - #[inline(always)] - fn set(&mut self, mask: u8, state: bool) { - if state { - self.mask |= mask; - } else { - self.mask &= !mask; - } - } } /// A [`Bundle`] of the [`Visibility`] and [`ComputedVisibility`] @@ -283,12 +274,12 @@ fn visibility_propagate_system( children_query: Query<&Children, (With, With, With)>, ) { for (children, visibility, mut computed_visibility, entity) in root_query.iter_mut() { - computed_visibility.set( - ComputedVisibility::VISIBLE_IN_HIERARCHY, - visibility.is_visible, - ); // reset "view" visibility here ... if this entity should be drawn a future system should set this to true - computed_visibility.mask &= !ComputedVisibility::VISIBLE_IN_VIEW; + computed_visibility.mask = if visibility.is_visible { + ComputedVisibility::VISIBLE_IN_HIERARCHY + } else { + ComputedVisibility::INVISIBLE_MASK + }; if let Some(children) = children { for child in children.iter() { let _ = propagate_recursive( @@ -320,12 +311,12 @@ fn propagate_recursive( "Malformed hierarchy. This probably means that your hierarchy has been improperly maintained, or contains a cycle" ); let visible_in_hierarchy = visibility.is_visible && parent_visible; - computed_visibility.set( - ComputedVisibility::VISIBLE_IN_HIERARCHY, - visible_in_hierarchy, - ); // reset "view" visibility here ... if this entity should be drawn a future system should set this to true - computed_visibility.mask &= !ComputedVisibility::VISIBLE_IN_VIEW; + computed_visibility.mask = if visible_in_hierarchy { + ComputedVisibility::VISIBLE_IN_HIERARCHY + } else { + ComputedVisibility::INVISIBLE_MASK + }; visible_in_hierarchy }; From 8eaa55e9a488a9b9722b6c3bd6111e781397f367 Mon Sep 17 00:00:00 2001 From: james7132 Date: Wed, 19 Oct 2022 15:06:11 -0700 Subject: [PATCH 03/10] Switch to using bitflags --- crates/bevy_render/src/view/visibility/mod.rs | 41 ++++++++++--------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/crates/bevy_render/src/view/visibility/mod.rs b/crates/bevy_render/src/view/visibility/mod.rs index e74fdfb055998..e01c13c20e00e 100644 --- a/crates/bevy_render/src/view/visibility/mod.rs +++ b/crates/bevy_render/src/view/visibility/mod.rs @@ -54,11 +54,19 @@ impl Visibility { } } +bitflags::bitflags! { + #[derive(Reflect)] + struct ComputedVisibilityFlags: u8 { + const VISIBLE_IN_VIEW = 1 << 1; + const VISIBLE_IN_HIERARCHY = 1 << 1; + } +} + /// Algorithmically-computed indication of whether an entity is visible and should be extracted for rendering #[derive(Component, Clone, Reflect, Debug, Eq, PartialEq)] #[reflect(Component, Default)] pub struct ComputedVisibility { - mask: u8, + flags: ComputedVisibilityFlags } impl Default for ComputedVisibility { @@ -68,14 +76,9 @@ impl Default for ComputedVisibility { } impl ComputedVisibility { - const INVISIBLE_MASK: u8 = 0; - const VISIBLE_MASK: u8 = Self::VISIBLE_IN_HIERARCHY | Self::VISIBLE_IN_VIEW; - const VISIBLE_IN_VIEW: u8 = 1 << 1; - const VISIBLE_IN_HIERARCHY: u8 = 1 << 2; - /// A [`ComputedVisibility`], set as invisible. pub const INVISIBLE: Self = ComputedVisibility { - mask: Self::INVISIBLE_MASK, + flags: ComputedVisibilityFlags::empty(), }; /// Whether this entity is visible to something this frame. This is true if and only if [`Self::is_visible_in_hierarchy`] and [`Self::is_visible_in_view`] @@ -84,7 +87,7 @@ impl ComputedVisibility { /// [`CoreStage::Update`] stage will yield the value from the previous frame. #[inline] pub fn is_visible(&self) -> bool { - (self.mask & Self::VISIBLE_MASK) != 0 + self.flags.is_all() } /// Whether this entity is visible in the entity hierarchy, which is determined by the [`Visibility`] component. @@ -93,7 +96,7 @@ impl ComputedVisibility { /// [`VisibilitySystems::VisibilityPropagate`] system label. #[inline] pub fn is_visible_in_hierarchy(&self) -> bool { - (self.mask & Self::VISIBLE_IN_HIERARCHY) != 0 + self.flags.contains(ComputedVisibilityFlags::VISIBLE_IN_HIERARCHY) } /// Whether this entity is visible in _any_ view (Cameras, Lights, etc). Each entity type (and view type) should choose how to set this @@ -105,7 +108,7 @@ impl ComputedVisibility { /// Other entities might just set this to `true` every frame. #[inline] pub fn is_visible_in_view(&self) -> bool { - (self.mask & Self::VISIBLE_IN_VIEW) != 0 + self.flags.contains(ComputedVisibilityFlags::VISIBLE_IN_VIEW) } /// Sets `is_visible_in_view` to `true`. This is not reversible for a given frame, as it encodes whether or not this is visible in @@ -114,7 +117,7 @@ impl ComputedVisibility { /// label. Don't call this unless you are defining a custom visibility system. For normal user-defined entity visibility, see [`Visibility`]. #[inline] pub fn set_visible_in_view(&mut self) { - self.mask |= Self::VISIBLE_IN_VIEW; + self.flags.insert(ComputedVisibilityFlags::VISIBLE_IN_VIEW); } } @@ -275,10 +278,10 @@ fn visibility_propagate_system( ) { for (children, visibility, mut computed_visibility, entity) in root_query.iter_mut() { // reset "view" visibility here ... if this entity should be drawn a future system should set this to true - computed_visibility.mask = if visibility.is_visible { - ComputedVisibility::VISIBLE_IN_HIERARCHY + computed_visibility.flags = if visibility.is_visible { + ComputedVisibilityFlags::VISIBLE_IN_HIERARCHY } else { - ComputedVisibility::INVISIBLE_MASK + ComputedVisibilityFlags::empty() }; if let Some(children) = children { for child in children.iter() { @@ -312,10 +315,10 @@ fn propagate_recursive( ); let visible_in_hierarchy = visibility.is_visible && parent_visible; // reset "view" visibility here ... if this entity should be drawn a future system should set this to true - computed_visibility.mask = if visible_in_hierarchy { - ComputedVisibility::VISIBLE_IN_HIERARCHY + computed_visibility.flags = if visible_in_hierarchy { + ComputedVisibilityFlags::VISIBLE_IN_HIERARCHY } else { - ComputedVisibility::INVISIBLE_MASK + ComputedVisibilityFlags::empty() }; visible_in_hierarchy }; @@ -391,7 +394,7 @@ pub fn check_visibility( } } - computed_visibility.mask |= ComputedVisibility::VISIBLE_IN_VIEW; + computed_visibility.flags.insert(ComputedVisibilityFlags::VISIBLE_IN_VIEW); let cell = thread_queues.get_or_default(); let mut queue = cell.take(); queue.push(entity); @@ -413,7 +416,7 @@ pub fn check_visibility( return; } - computed_visibility.mask = ComputedVisibility::VISIBLE_IN_VIEW; + computed_visibility.flags.insert(ComputedVisibilityFlags::VISIBLE_IN_VIEW); let cell = thread_queues.get_or_default(); let mut queue = cell.take(); queue.push(entity); From e4961d820f39128c3116e32c055d6a9664ca973a Mon Sep 17 00:00:00 2001 From: james7132 Date: Wed, 19 Oct 2022 15:07:58 -0700 Subject: [PATCH 04/10] Factor out a reset for propagation --- crates/bevy_render/src/view/visibility/mod.rs | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/crates/bevy_render/src/view/visibility/mod.rs b/crates/bevy_render/src/view/visibility/mod.rs index e01c13c20e00e..04b88adb9da85 100644 --- a/crates/bevy_render/src/view/visibility/mod.rs +++ b/crates/bevy_render/src/view/visibility/mod.rs @@ -119,6 +119,15 @@ impl ComputedVisibility { pub fn set_visible_in_view(&mut self) { self.flags.insert(ComputedVisibilityFlags::VISIBLE_IN_VIEW); } + + #[inline] + fn reset(&mut self, visible_in_hierarchy: bool) { + self.flags = if visible_in_hierarchy { + ComputedVisibilityFlags::VISIBLE_IN_HIERARCHY + } else { + ComputedVisibilityFlags::empty() + }; + } } /// A [`Bundle`] of the [`Visibility`] and [`ComputedVisibility`] @@ -278,11 +287,7 @@ fn visibility_propagate_system( ) { for (children, visibility, mut computed_visibility, entity) in root_query.iter_mut() { // reset "view" visibility here ... if this entity should be drawn a future system should set this to true - computed_visibility.flags = if visibility.is_visible { - ComputedVisibilityFlags::VISIBLE_IN_HIERARCHY - } else { - ComputedVisibilityFlags::empty() - }; + computed_visibility.reset(visibility.is_visible); if let Some(children) = children { for child in children.iter() { let _ = propagate_recursive( @@ -315,11 +320,7 @@ fn propagate_recursive( ); let visible_in_hierarchy = visibility.is_visible && parent_visible; // reset "view" visibility here ... if this entity should be drawn a future system should set this to true - computed_visibility.flags = if visible_in_hierarchy { - ComputedVisibilityFlags::VISIBLE_IN_HIERARCHY - } else { - ComputedVisibilityFlags::empty() - }; + computed_visibility.reset(visible_in_hierarchy); visible_in_hierarchy }; From b9e6bad8a66acefb0795d2d84209a6f630e52dbe Mon Sep 17 00:00:00 2001 From: james7132 Date: Wed, 19 Oct 2022 15:08:29 -0700 Subject: [PATCH 05/10] Formatting --- crates/bevy_render/src/view/visibility/mod.rs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/crates/bevy_render/src/view/visibility/mod.rs b/crates/bevy_render/src/view/visibility/mod.rs index 04b88adb9da85..9e2f7c84fae58 100644 --- a/crates/bevy_render/src/view/visibility/mod.rs +++ b/crates/bevy_render/src/view/visibility/mod.rs @@ -66,7 +66,7 @@ bitflags::bitflags! { #[derive(Component, Clone, Reflect, Debug, Eq, PartialEq)] #[reflect(Component, Default)] pub struct ComputedVisibility { - flags: ComputedVisibilityFlags + flags: ComputedVisibilityFlags, } impl Default for ComputedVisibility { @@ -96,7 +96,8 @@ impl ComputedVisibility { /// [`VisibilitySystems::VisibilityPropagate`] system label. #[inline] pub fn is_visible_in_hierarchy(&self) -> bool { - self.flags.contains(ComputedVisibilityFlags::VISIBLE_IN_HIERARCHY) + self.flags + .contains(ComputedVisibilityFlags::VISIBLE_IN_HIERARCHY) } /// Whether this entity is visible in _any_ view (Cameras, Lights, etc). Each entity type (and view type) should choose how to set this @@ -108,7 +109,8 @@ impl ComputedVisibility { /// Other entities might just set this to `true` every frame. #[inline] pub fn is_visible_in_view(&self) -> bool { - self.flags.contains(ComputedVisibilityFlags::VISIBLE_IN_VIEW) + self.flags + .contains(ComputedVisibilityFlags::VISIBLE_IN_VIEW) } /// Sets `is_visible_in_view` to `true`. This is not reversible for a given frame, as it encodes whether or not this is visible in @@ -395,7 +397,9 @@ pub fn check_visibility( } } - computed_visibility.flags.insert(ComputedVisibilityFlags::VISIBLE_IN_VIEW); + computed_visibility + .flags + .insert(ComputedVisibilityFlags::VISIBLE_IN_VIEW); let cell = thread_queues.get_or_default(); let mut queue = cell.take(); queue.push(entity); @@ -417,7 +421,9 @@ pub fn check_visibility( return; } - computed_visibility.flags.insert(ComputedVisibilityFlags::VISIBLE_IN_VIEW); + computed_visibility + .flags + .insert(ComputedVisibilityFlags::VISIBLE_IN_VIEW); let cell = thread_queues.get_or_default(); let mut queue = cell.take(); queue.push(entity); From b5f240ad3bc5ea8451d229a19c2b722387cab1de Mon Sep 17 00:00:00 2001 From: james7132 Date: Wed, 19 Oct 2022 15:12:58 -0700 Subject: [PATCH 06/10] Use set_visible_in_view --- crates/bevy_render/src/view/visibility/mod.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/crates/bevy_render/src/view/visibility/mod.rs b/crates/bevy_render/src/view/visibility/mod.rs index 9e2f7c84fae58..df97705efd6de 100644 --- a/crates/bevy_render/src/view/visibility/mod.rs +++ b/crates/bevy_render/src/view/visibility/mod.rs @@ -58,7 +58,7 @@ bitflags::bitflags! { #[derive(Reflect)] struct ComputedVisibilityFlags: u8 { const VISIBLE_IN_VIEW = 1 << 1; - const VISIBLE_IN_HIERARCHY = 1 << 1; + const VISIBLE_IN_HIERARCHY = 1 << 2; } } @@ -397,9 +397,7 @@ pub fn check_visibility( } } - computed_visibility - .flags - .insert(ComputedVisibilityFlags::VISIBLE_IN_VIEW); + computed_visibility.set_visible_in_view(); let cell = thread_queues.get_or_default(); let mut queue = cell.take(); queue.push(entity); @@ -421,9 +419,7 @@ pub fn check_visibility( return; } - computed_visibility - .flags - .insert(ComputedVisibilityFlags::VISIBLE_IN_VIEW); + computed_visibility.set_visible_in_view(); let cell = thread_queues.get_or_default(); let mut queue = cell.take(); queue.push(entity); From 784130e135a1c667e32407e57643b4f44fe81adc Mon Sep 17 00:00:00 2001 From: James Liu Date: Wed, 2 Nov 2022 14:35:09 -0700 Subject: [PATCH 07/10] Update crates/bevy_render/src/view/visibility/mod.rs Co-authored-by: Robert Swain --- crates/bevy_render/src/view/visibility/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/bevy_render/src/view/visibility/mod.rs b/crates/bevy_render/src/view/visibility/mod.rs index df97705efd6de..6b387e010a82b 100644 --- a/crates/bevy_render/src/view/visibility/mod.rs +++ b/crates/bevy_render/src/view/visibility/mod.rs @@ -57,8 +57,8 @@ impl Visibility { bitflags::bitflags! { #[derive(Reflect)] struct ComputedVisibilityFlags: u8 { - const VISIBLE_IN_VIEW = 1 << 1; - const VISIBLE_IN_HIERARCHY = 1 << 2; + const VISIBLE_IN_VIEW = 1 << 0; + const VISIBLE_IN_HIERARCHY = 1 << 1; } } From 49d8bca75b9cf57bf1ab34f57667e2e6b1b39e8a Mon Sep 17 00:00:00 2001 From: James Liu Date: Wed, 2 Nov 2022 14:36:44 -0700 Subject: [PATCH 08/10] Use direct equality instead of is_all() Co-authored-by: Robert Swain --- crates/bevy_render/src/view/visibility/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_render/src/view/visibility/mod.rs b/crates/bevy_render/src/view/visibility/mod.rs index 6b387e010a82b..bc6c976f2b913 100644 --- a/crates/bevy_render/src/view/visibility/mod.rs +++ b/crates/bevy_render/src/view/visibility/mod.rs @@ -87,7 +87,7 @@ impl ComputedVisibility { /// [`CoreStage::Update`] stage will yield the value from the previous frame. #[inline] pub fn is_visible(&self) -> bool { - self.flags.is_all() + self.flags.bits == ComputedVisibilityFlags::all().bits } /// Whether this entity is visible in the entity hierarchy, which is determined by the [`Visibility`] component. From 8c01b00ce5fbaeefdca24bf53a48d5ad10972026 Mon Sep 17 00:00:00 2001 From: james7132 Date: Wed, 2 Nov 2022 14:46:06 -0700 Subject: [PATCH 09/10] Fix CI --- crates/bevy_render/src/view/visibility/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_render/src/view/visibility/mod.rs b/crates/bevy_render/src/view/visibility/mod.rs index 589298130d1b5..849dededdbb0a 100644 --- a/crates/bevy_render/src/view/visibility/mod.rs +++ b/crates/bevy_render/src/view/visibility/mod.rs @@ -87,7 +87,7 @@ impl ComputedVisibility { /// [`CoreStage::Update`] stage will yield the value from the previous frame. #[inline] pub fn is_visible(&self) -> bool { - self.flags.bits == ComputedVisibilityFlags::all().bits + self.flags.bits == ComputedVisibilityFlags::all().bits } /// Whether this entity is visible in the entity hierarchy, which is determined by the [`Visibility`] component. From 7cdb4c33bf726b145a1e6fb18f3b0d5040e2a305 Mon Sep 17 00:00:00 2001 From: james7132 Date: Wed, 2 Nov 2022 15:21:50 -0700 Subject: [PATCH 10/10] Remove size test --- crates/bevy_render/src/view/visibility/mod.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/crates/bevy_render/src/view/visibility/mod.rs b/crates/bevy_render/src/view/visibility/mod.rs index 849dededdbb0a..c08df608985d1 100644 --- a/crates/bevy_render/src/view/visibility/mod.rs +++ b/crates/bevy_render/src/view/visibility/mod.rs @@ -451,11 +451,6 @@ mod test { use bevy_hierarchy::BuildWorldChildren; - #[test] - fn computed_visibility_size() { - assert_eq!(std::mem::size_of::(), 1); - } - #[test] fn visibility_propagation() { let mut app = App::new();