Fix ci xvfb (#11143)

# Objective

Fix ci hang, so we can merge pr's again.

## Solution

- switch ppa action to use mesa stable versions
https://launchpad.net/~kisak/+archive/ubuntu/turtle
- use commit from #11123

---------

Co-authored-by: Stepan Koltsov <stepan.koltsov@gmail.com>
This commit is contained in:
Mike 2023-12-30 01:07:31 -08:00 committed by GitHub
parent 8067e46049
commit 786abbf3f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 24 additions and 27 deletions

View File

@ -74,7 +74,7 @@ jobs:
- name: install xvfb, llvmpipe and lavapipe - name: install xvfb, llvmpipe and lavapipe
run: | run: |
sudo apt-get update -y -qq sudo apt-get update -y -qq
sudo add-apt-repository ppa:kisak/kisak-mesa -y sudo add-apt-repository ppa:kisak/turtle -y
sudo apt-get update sudo apt-get update
sudo apt install -y xvfb libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers sudo apt install -y xvfb libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@ -148,7 +148,7 @@ jobs:
- name: install xvfb, llvmpipe and lavapipe - name: install xvfb, llvmpipe and lavapipe
run: | run: |
sudo apt-get update -y -qq sudo apt-get update -y -qq
sudo add-apt-repository ppa:kisak/kisak-mesa -y sudo add-apt-repository ppa:kisak/turtle -y
sudo apt-get update sudo apt-get update
sudo apt install -y xvfb libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers sudo apt install -y xvfb libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers

View File

@ -436,6 +436,7 @@ impl Entities {
/// Reserve entity IDs concurrently. /// Reserve entity IDs concurrently.
/// ///
/// Storage for entity generation and location is lazily allocated by calling [`flush`](Entities::flush). /// Storage for entity generation and location is lazily allocated by calling [`flush`](Entities::flush).
#[allow(clippy::unnecessary_fallible_conversions)] // Because `IdCursor::try_from` may fail on 32-bit platforms.
pub fn reserve_entities(&self, count: u32) -> ReserveEntitiesIterator { pub fn reserve_entities(&self, count: u32) -> ReserveEntitiesIterator {
// Use one atomic subtract to grab a range of new IDs. The range might be // Use one atomic subtract to grab a range of new IDs. The range might be
// entirely nonnegative, meaning all IDs come from the freelist, or entirely // entirely nonnegative, meaning all IDs come from the freelist, or entirely
@ -627,6 +628,7 @@ impl Entities {
} }
/// Ensure at least `n` allocations can succeed without reallocating. /// Ensure at least `n` allocations can succeed without reallocating.
#[allow(clippy::unnecessary_fallible_conversions)] // Because `IdCursor::try_from` may fail on 32-bit platforms.
pub fn reserve(&mut self, additional: u32) { pub fn reserve(&mut self, additional: u32) {
self.verify_flushed(); self.verify_flushed();

View File

@ -996,7 +996,7 @@ impl<D: QueryData, F: QueryFilter> QueryState<D, F> {
} }
/// Runs `func` on each query result for the given [`World`]. This is faster than the equivalent /// Runs `func` on each query result for the given [`World`]. This is faster than the equivalent
/// iter() method, but cannot be chained like a normal [`Iterator`]. /// `iter()` method, but cannot be chained like a normal [`Iterator`].
/// ///
/// This can only be called for read-only queries, see [`Self::for_each_mut`] for write-queries. /// This can only be called for read-only queries, see [`Self::for_each_mut`] for write-queries.
/// ///
@ -1024,7 +1024,7 @@ impl<D: QueryData, F: QueryFilter> QueryState<D, F> {
} }
/// Runs `func` on each query result for the given [`World`]. This is faster than the equivalent /// Runs `func` on each query result for the given [`World`]. This is faster than the equivalent
/// iter() method, but cannot be chained like a normal [`Iterator`]. /// `iter()` method, but cannot be chained like a normal [`Iterator`].
/// ///
/// # Safety /// # Safety
/// ///
@ -1086,7 +1086,7 @@ impl<D: QueryData, F: QueryFilter> QueryState<D, F> {
/// Runs `func` on each query result in parallel for the given [`World`], where the last change and /// Runs `func` on each query result in parallel for the given [`World`], where the last change and
/// the current change tick are given. This is faster than the equivalent /// the current change tick are given. This is faster than the equivalent
/// iter() method, but cannot be chained like a normal [`Iterator`]. /// `iter()` method, but cannot be chained like a normal [`Iterator`].
/// ///
/// # Panics /// # Panics
/// The [`ComputeTaskPool`] is not initialized. If using this from a query that is being /// The [`ComputeTaskPool`] is not initialized. If using this from a query that is being

View File

@ -306,7 +306,7 @@ impl BlobVec {
/// The removed element is replaced by the last element of the `BlobVec`. /// The removed element is replaced by the last element of the `BlobVec`.
/// ///
/// # Safety /// # Safety
/// It is the caller's responsibility to ensure that `index` is < self.len() /// It is the caller's responsibility to ensure that `index` is `< self.len()`.
#[inline] #[inline]
pub unsafe fn swap_remove_and_drop_unchecked(&mut self, index: usize) { pub unsafe fn swap_remove_and_drop_unchecked(&mut self, index: usize) {
debug_assert!(index < self.len()); debug_assert!(index < self.len());

View File

@ -893,7 +893,7 @@ fn load_material(
} }
/// Loads a glTF node. /// Loads a glTF node.
#[allow(clippy::too_many_arguments)] #[allow(clippy::too_many_arguments, clippy::result_large_err)]
fn load_node( fn load_node(
gltf_node: &Node, gltf_node: &Node,
world_builder: &mut WorldChildBuilder, world_builder: &mut WorldChildBuilder,
@ -1291,6 +1291,7 @@ fn texture_address_mode(gltf_address_mode: &WrappingMode) -> ImageAddressMode {
} }
/// Maps the `primitive_topology` form glTF to `wgpu`. /// Maps the `primitive_topology` form glTF to `wgpu`.
#[allow(clippy::result_large_err)]
fn get_primitive_topology(mode: Mode) -> Result<PrimitiveTopology, GltfError> { fn get_primitive_topology(mode: Mode) -> Result<PrimitiveTopology, GltfError> {
match mode { match mode {
Mode::Points => Ok(PrimitiveTopology::PointList), Mode::Points => Ok(PrimitiveTopology::PointList),

View File

@ -1295,7 +1295,7 @@ impl<T: FromReflect + Clone + TypePath> FromReflect for Cow<'static, [T]> {
for field in ref_list.iter() { for field in ref_list.iter() {
temp_vec.push(T::from_reflect(field)?); temp_vec.push(T::from_reflect(field)?);
} }
temp_vec.try_into().ok() Some(temp_vec.into())
} else { } else {
None None
} }

View File

@ -1035,7 +1035,7 @@ impl GridTrack {
.into() .into()
} }
/// Create a fit-content() grid track with fixed pixel limit /// Create a `fit-content()` grid track with fixed pixel limit.
/// ///
/// <https://developer.mozilla.org/en-US/docs/Web/CSS/fit-content_function> /// <https://developer.mozilla.org/en-US/docs/Web/CSS/fit-content_function>
pub fn fit_content_px<T: From<Self>>(limit: f32) -> T { pub fn fit_content_px<T: From<Self>>(limit: f32) -> T {
@ -1046,7 +1046,7 @@ impl GridTrack {
.into() .into()
} }
/// Create a fit-content() grid track with percentage limit /// Create a `fit-content()` grid track with percentage limit.
/// ///
/// <https://developer.mozilla.org/en-US/docs/Web/CSS/fit-content_function> /// <https://developer.mozilla.org/en-US/docs/Web/CSS/fit-content_function>
pub fn fit_content_percent<T: From<Self>>(limit: f32) -> T { pub fn fit_content_percent<T: From<Self>>(limit: f32) -> T {
@ -1057,7 +1057,7 @@ impl GridTrack {
.into() .into()
} }
/// Create a minmax() grid track /// Create a `minmax()` grid track.
/// ///
/// <https://developer.mozilla.org/en-US/docs/Web/CSS/minmax> /// <https://developer.mozilla.org/en-US/docs/Web/CSS/minmax>
pub fn minmax<T: From<Self>>(min: MinTrackSizingFunction, max: MaxTrackSizingFunction) -> T { pub fn minmax<T: From<Self>>(min: MinTrackSizingFunction, max: MaxTrackSizingFunction) -> T {
@ -1198,7 +1198,7 @@ impl RepeatedGridTrack {
.into() .into()
} }
/// Create a repeating set of fit-content() grid tracks with fixed pixel limit /// Create a repeating set of `fit-content()` grid tracks with fixed pixel limit
pub fn fit_content_px<T: From<Self>>(repetition: u16, limit: f32) -> T { pub fn fit_content_px<T: From<Self>>(repetition: u16, limit: f32) -> T {
Self { Self {
repetition: GridTrackRepetition::Count(repetition), repetition: GridTrackRepetition::Count(repetition),
@ -1207,7 +1207,7 @@ impl RepeatedGridTrack {
.into() .into()
} }
/// Create a repeating set of fit-content() grid tracks with percentage limit /// Create a repeating set of `fit-content()` grid tracks with percentage limit
pub fn fit_content_percent<T: From<Self>>(repetition: u16, limit: f32) -> T { pub fn fit_content_percent<T: From<Self>>(repetition: u16, limit: f32) -> T {
Self { Self {
repetition: GridTrackRepetition::Count(repetition), repetition: GridTrackRepetition::Count(repetition),
@ -1216,7 +1216,7 @@ impl RepeatedGridTrack {
.into() .into()
} }
/// Create a repeating set of minmax() grid track /// Create a repeating set of `minmax()` grid track
pub fn minmax<T: From<Self>>( pub fn minmax<T: From<Self>>(
repetition: impl Into<GridTrackRepetition>, repetition: impl Into<GridTrackRepetition>,
min: MinTrackSizingFunction, min: MinTrackSizingFunction,

View File

@ -127,11 +127,8 @@ pub struct Hashed<V, H = FixedState> {
impl<V: Hash, H: BuildHasher + Default> Hashed<V, H> { impl<V: Hash, H: BuildHasher + Default> Hashed<V, H> {
/// Pre-hashes the given value using the [`BuildHasher`] configured in the [`Hashed`] type. /// Pre-hashes the given value using the [`BuildHasher`] configured in the [`Hashed`] type.
pub fn new(value: V) -> Self { pub fn new(value: V) -> Self {
let builder = H::default();
let mut hasher = builder.build_hasher();
value.hash(&mut hasher);
Self { Self {
hash: hasher.finish(), hash: H::default().hash_one(&value),
value, value,
marker: PhantomData, marker: PhantomData,
} }

View File

@ -80,15 +80,12 @@ fn setup(
let plane_mesh = meshes.add(shape::Plane::from_size(2.0).into()); let plane_mesh = meshes.add(shape::Plane::from_size(2.0).into());
let cylinder_mesh = meshes.add( let cylinder_mesh = meshes.add(Mesh::from(shape::Cylinder {
Mesh::try_from(shape::Cylinder { radius: 0.5,
radius: 0.5, height: 2.0,
height: 2.0, resolution: 50,
resolution: 50, segments: 1,
segments: 1, }));
})
.unwrap(),
);
// Cube #1 // Cube #1
commands.spawn(( commands.spawn((