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

Can not run bevy project #2428

Closed
devlaq opened this issue Jan 28, 2022 · 13 comments
Closed

Can not run bevy project #2428

devlaq opened this issue Jan 28, 2022 · 13 comments
Labels
help required We need community help to make this happen. type: bug Something isn't working

Comments

@devlaq
Copy link

devlaq commented Jan 28, 2022

Description
When I run a bevy program, window opened and program crashed wgpu errors.

Repro steps
Run any bevy example projects with bevy 0.6.0 and program crashed with error

Expected vs observed behavior
Expected: run project and show a window.
Observed: run project and show a window and program crashed with wgpu errors.

Extra materials
image
Code:
`use bevy::prelude::*;

fn main(){
App::new().add_plugins(DefaultPlugins).run();
}(bevy 0.6.0) Error: devlaq@devlaq-15U560-RN70L:~/IdeaProjects/Bevy/bevy_chess$ cargo run Finished dev [unoptimized + debuginfo] target(s) in 0.13s Runningtarget/debug/bevy_chess`
2022-01-28T16:43:42.134246Z INFO winit::platform_impl::platform::x11::window: Guessed window scale factor: 1
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

2022-01-28T16:43:42.224825Z ERROR wgpu_hal::vulkan::adapter: get_physical_device_surface_present_modes: Initialization of a object has failed
2022-01-28T16:43:42.224905Z ERROR wgpu_hal::vulkan::adapter: get_physical_device_surface_formats: Initialization of a object has failed
2022-01-28T16:43:42.235137Z INFO bevy_render::renderer: AdapterInfo { name: "GeForce 940M", vendor: 4318, device: 4935, device_type: DiscreteGpu, backend: Vulkan }
2022-01-28T16:43:42.524355Z ERROR wgpu_hal::vulkan::adapter: get_physical_device_surface_present_modes: Initialization of a object has failed
2022-01-28T16:43:42.524917Z ERROR wgpu_hal::vulkan::adapter: get_physical_device_surface_formats: Initialization of a object has failed
thread 'main' panicked at 'Error in Surface::configure: requested format Bgra8UnormSrgb is not in list of supported formats: []', /home/devlaq/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/wgpu-0.12.0/src/backend/direct.rs:214:9
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

Platform
Ubuntu 21.10, wgpu 0.12.0, GeForce 940M, Vulkan.

@kvark
Copy link
Member

kvark commented Jan 28, 2022

Could you please run wgpu's examples with RUST_LOG=wgpu_hal=debug environment?

@kvark kvark added type: bug Something isn't working help required We need community help to make this happen. labels Jan 28, 2022
@devlaq
Copy link
Author

devlaq commented Jan 28, 2022

Could you please run wgpu's examples with RUST_LOG=wgpu_hal=debug environment?
wgpu_log.txt

@kvark
Copy link
Member

kvark commented Feb 2, 2022

Could you please install Vulkan Validation Layers and try again, providing the log? It should tell us more.
For example, on NixOS the package is vulkan-validation-layers

@nia-e
Copy link

nia-e commented Feb 3, 2022

Having the exact same issue, also in Bevy. Here's my log with the aforementioned env:
log.txt

@kvark
Copy link
Member

kvark commented Feb 4, 2022

@a-b-c-1-2-3 what exactly are you seeing? I'm not seeing any errors in your log.

@nia-e
Copy link

nia-e commented Feb 6, 2022

The error given was thread 'main' panicked at 'Error in Surface::configure: requested format Bgra8UnormSrgb is not in list of supported formats: [Bgra8Unorm]'. Seems similar to the OP, odd that it didn't show up in logs.

@kvark
Copy link
Member

kvark commented Feb 7, 2022

This is a totally separate issue.

@nia-e
Copy link

nia-e commented Feb 8, 2022

Hm. Okay, I'll open a separate issue. Sorry for the inconvenience.

@BitRanger
Copy link

I am also having the same issue with the Bevy examples, and although the same error shows up in the wgpu examples, it does not crash.
output.txt

@stillonearth

This comment was marked as outdated.

@cwfitzgerald
Copy link
Member

@stillonearth that looks like a bevy bug, they are just mixing formats up

@stillonearth
Copy link

stillonearth commented Nov 1, 2022

Confirming an issue with bevy, though PR fixing this is merged. Correct way of initializing a TextureDescriptor format is

TextureDescriptor {
    label: None,
    size,
    dimension: TextureDimension::D2,
    format: TextureFormat::bevy_default(),
    mip_level_count: 1,
    sample_count: 1,
    usage: TextureUsages::TEXTURE_BINDING
        | TextureUsages::COPY_DST
        | TextureUsages::RENDER_ATTACHMENT,
}

@cwfitzgerald
Copy link
Member

I'm actually going to close this issue as this looks like a driver problem, if the original issue is still a problem, please re-file on the latest version.

@cwfitzgerald cwfitzgerald closed this as not planned Won't fix, can't repro, duplicate, stale Nov 1, 2022
cwfitzgerald pushed a commit that referenced this issue Oct 25, 2023
* [wgsl-in] Fail on repeated attributes

Fixes #2425.

* [wgsl-in] Use ParsedAttribute to keep track of parsed attributes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help required We need community help to make this happen. type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants