Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Main branch panic & COPY_SRC error #141

Closed
turboMaCk opened this issue Jan 3, 2022 · 3 comments
Closed

Main branch panic & COPY_SRC error #141

turboMaCk opened this issue Jan 3, 2022 · 3 comments

Comments

@turboMaCk
Copy link
Contributor

turboMaCk commented Jan 3, 2022

Running examples panic for me. I'm on Linux (NixOS) using amd-gpu (open source driver).

relevant parts:

https://github.com/StarArawn/bevy_ecs_tilemap/blob/main/src/render/pipeline.rs#L77-L84

thread 'main' panicked at 'Failed to acquire next swap chain texture!: Timeout', /home/marek/.cargo/git/checkouts/bevy-f7ffde730c324c74/1d0d8a3/crates/bevy_render/src/view/window.rs:159:24

There are 2 things I believe:

a) how is it possible that I see the error even when I run examples which do use the helper
b) the panic might be related to some issue of development version of bevy

$ cargo run --example layers
warning: use of deprecated associated function `std::array::IntoIter::<T, N>::new`: use `IntoIterator::into_iter` instead
  --> src/mesher.rs:49:48
   |
49 |                     positions.extend(IntoIter::new([
   |                                                ^^^
   |
   = note: `#[warn(deprecated)]` on by default

warning: use of deprecated associated function `std::array::IntoIter::<T, N>::new`: use `IntoIterator::into_iter` instead
  --> src/mesher.rs:63:45
   |
63 |                     colors.extend(IntoIter::new([
   |                                             ^^^

warning: use of deprecated associated function `std::array::IntoIter::<T, N>::new`: use `IntoIterator::into_iter` instead
  --> src/mesher.rs:98:47
   |
98 |                     textures.extend(IntoIter::new([
   |                                               ^^^

warning: `bevy_ecs_tilemap` (lib) generated 3 warnings
    Finished dev [unoptimized + debuginfo] target(s) in 0.13s
     Running `target/debug/examples/layers`
2022-01-03T11:51:32.607631Z  INFO winit::platform_impl::platform::x11::window: Guessed window scale factor: 1.6666666666666667    
2022-01-03T11:51:32.675060Z  INFO bevy_render::renderer: AdapterInfo { name: "AMD Radeon RX 5700 XT", vendor: 4098, device: 29471, device_type: DiscreteGpu, backend: Vulkan }
2022-01-03T11:51:32.848836Z  INFO bevy_ecs_tilemap::layer: Updating tile cache.    
2022-01-03T11:51:32.864576Z ERROR bevy_ecs_tilemap::render::pipeline: Texture atlas MUST have COPY_SRC texture usages defined! Please see: https://github.com/StarArawn/bevy_ecs_tilemap/blob/main/examples/helpers/texture.rs    
2022-01-03T11:51:32.864632Z ERROR bevy_ecs_tilemap::render::pipeline: Texture atlas MUST have COPY_SRC texture usages defined! Please see: https://github.com/StarArawn/bevy_ecs_tilemap/blob/main/examples/helpers/texture.rs    
2022-01-03T11:51:32.864663Z ERROR bevy_ecs_tilemap::render::pipeline: Texture atlas MUST have COPY_SRC texture usages defined! Please see: https://github.com/StarArawn/bevy_ecs_tilemap/blob/main/examples/helpers/texture.rs    
2022-01-03T11:51:32.864694Z ERROR bevy_ecs_tilemap::render::pipeline: Texture atlas MUST have COPY_SRC texture usages defined! Please see: https://github.com/StarArawn/bevy_ecs_tilemap/blob/main/examples/helpers/texture.rs    
2022-01-03T11:51:32.864723Z ERROR bevy_ecs_tilemap::render::pipeline: Texture atlas MUST have COPY_SRC texture usages defined! Please see: https://github.com/StarArawn/bevy_ecs_tilemap/blob/main/examples/helpers/texture.rs    
2022-01-03T11:51:32.864753Z ERROR bevy_ecs_tilemap::render::pipeline: Texture atlas MUST have COPY_SRC texture usages defined! Please see: https://github.com/StarArawn/bevy_ecs_tilemap/blob/main/examples/helpers/texture.rs    
2022-01-03T11:51:32.864782Z ERROR bevy_ecs_tilemap::render::pipeline: Texture atlas MUST have COPY_SRC texture usages defined! Please see: https://github.com/StarArawn/bevy_ecs_tilemap/blob/main/examples/helpers/texture.rs    
2022-01-03T11:51:32.864810Z ERROR bevy_ecs_tilemap::render::pipeline: Texture atlas MUST have COPY_SRC texture usages defined! Please see: https://github.com/StarArawn/bevy_ecs_tilemap/blob/main/examples/helpers/texture.rs    
2022-01-03T11:51:32.864845Z ERROR bevy_ecs_tilemap::render::pipeline: Texture atlas MUST have COPY_SRC texture usages defined! Please see: https://github.com/StarArawn/bevy_ecs_tilemap/blob/main/examples/helpers/texture.rs    
2022-01-03T11:51:32.864876Z ERROR bevy_ecs_tilemap::render::pipeline: Texture atlas MUST have COPY_SRC texture usages defined! Please see: https://github.com/StarArawn/bevy_ecs_tilemap/blob/main/examples/helpers/texture.rs    
2022-01-03T11:51:32.864907Z ERROR bevy_ecs_tilemap::render::pipeline: Texture atlas MUST have COPY_SRC texture usages defined! Please see: https://github.com/StarArawn/bevy_ecs_tilemap/blob/main/examples/helpers/texture.rs    
2022-01-03T11:51:32.864934Z ERROR bevy_ecs_tilemap::render::pipeline: Texture atlas MUST have COPY_SRC texture usages defined! Please see: https://github.com/StarArawn/bevy_ecs_tilemap/blob/main/examples/helpers/texture.rs    
2022-01-03T11:51:32.947540Z  INFO naga::back::spv::writer: Skip function Some("get_mesh")    
thread 'main' panicked at 'Failed to acquire next swap chain texture!: Timeout', /home/marek/.cargo/git/checkouts/bevy-f7ffde730c324c74/1d0d8a3/crates/bevy_render/src/view/window.rs:159:24
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
@turboMaCk
Copy link
Contributor Author

upstream issue bevyengine/bevy#3288

@StarArawn
Copy link
Owner

Yeah the COPY_SRC isn't the issue here, although it doesn't help its being spammed to the console though..

@turboMaCk
Copy link
Contributor Author

I was able to pin down the reason for panic - it's upstream issue in bevy specific to opensource amd-gpu drivers on linux.

I think that's all we can do here. I'm not sure if you want to do something about that error log as well but I think it would make sense to have separate issue for it anyway. For the panic we just need to wait for fix upstream. Current workaround is to switch to proprietary driver. A bit painful but it's the only option at the moment.

@turboMaCk turboMaCk changed the title Main branch panic due to COPY_SRC error Main branch panic & COPY_SRC error Jan 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants