1
0
Fork 0
forked from wry/wry

metal: wait for rendering to complete before committing buffers

This commit is contained in:
Julian Orth 2024-09-09 20:49:23 +02:00
parent 93bfb9c0b4
commit 0dc5d9adb8
5 changed files with 881 additions and 681 deletions

View file

@ -74,6 +74,22 @@ impl<T> NumCell<T> {
{
self.t.set(self.t.get() & n);
}
#[inline(always)]
pub fn is_zero(&self) -> bool
where
T: Eq + Copy + Default,
{
self.t.get() == T::default()
}
#[inline(always)]
pub fn is_not_zero(&self) -> bool
where
T: Eq + Copy + Default,
{
!self.is_zero()
}
}
impl<T: BitOr<Output = T> + Copy> BitOr<T> for &'_ NumCell<T> {