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

Panics on Nvidia + Wayland #145

Open
dag-h opened this issue Aug 2, 2023 · 3 comments
Open

Panics on Nvidia + Wayland #145

dag-h opened this issue Aug 2, 2023 · 3 comments

Comments

@dag-h
Copy link

dag-h commented Aug 2, 2023

When enabling the plugin on a system running Wayland with Nvidia graphics, the application panics:

thread '<unnamed>' panicked at 'wgpu error: Validation Error

Caused by:
    In a RenderPass
      note: encoder = `<CommandBuffer-(0, 2, Vulkan)>`
    In a set_pipeline command
      note: render pipeline = `egui render pipeline`
    Render pipeline targets are incompatible with render pass
    Incompatible color attachments at indices [0]: the RenderPass uses textures with formats [Some(Bgra8UnormSrgb)] but the RenderPipeline uses attachments with formats [Some(Bgra8Unorm)]

', /home/dag/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.16.3/src/backend/direct.rs:3019:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Encountered a panic in exclusive system `bevy_render::renderer::render_system`!
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', /home/dag/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_render-0.11.0/src/pipelined_rendering.rs:135:45

AdapterInfo { name: "NVIDIA GeForce GTX 970", vendor: 4318, device: 5058, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "535.54.03", backend: Vulkan }

I'm assuming it has to do with this particular system configuration. Related:

@rbrauer
Copy link

rbrauer commented Aug 22, 2023

I have the same issue and I had the issue with my own code as well. I fixed it by changing texture format:

            texture_descriptor: TextureDescriptor {
                label: None,
                size: ext,
                dimension: TextureDimension::D2,
                // 0.11.0
                // format: TextureFormat::Rgba8Unorm,
                format: TextureFormat::Rgba8UnormSrgb,
                mip_level_count: 1,
                sample_count: 1,
                usage:
                    TextureUsages::TEXTURE_BINDING |
                    TextureUsages::COPY_DST |
                    TextureUsages::RENDER_ATTACHMENT,
                view_formats: &[]
            },

@enaut
Copy link

enaut commented Sep 3, 2023

I fixed it by changing texture format

could you elaborate what you changed and where? Do I need to change the bevy-inspector-egui source? Or ist the texture_descriptor somewhere in my source code (in some default or something).

@rbrauer
Copy link

rbrauer commented Sep 3, 2023

This looks like the issue vladbat00/bevy_egui#192
I was able to fix it with that one line change in my own simple code, but not sure precisely what the fix would be with bevy_egui or if it is possible to make it work without changing the source code.

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

3 participants