Skip to content

mesh2d example panics on macOS #10849

Open
@ekalosak

Description

Summary

cargo run --example mesh2d compiles bevy successfully but panics upon run.

Environment

  • Bevy 0.12.0
  • cargo 1.74.0 (ecb9851af 2023-10-18)
  • macOS 12.7

Adapter

AdapterInfo { name: "Intel Iris Pro Graphics", vendor: 0, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Metal }

Other examples tested

bevy

  • cargo run --example 2d_gizmos works out-of-the-box.
  • cargo run --example mesh2d_manual fails with the same "bevy_render/src/pipelined_rendering.rs" panic.
  • 3d_gizmos, 3d_shapes, 3d_viewport_to_world also panic.

wgpu

  • cargo run --bin wgpu-examples water works out-of-the-box.

Other things tried

Panic

Here's the full console output from cargo run --example mesh2d:

    Finished dev [unoptimized + debuginfo] target(s) in 0.58s
     Running `target/debug/examples/mesh2d`
2023-12-02T21:43:50.122253Z  INFO bevy_render::renderer: AdapterInfo { name: "Intel Iris Pro Graphics", vendor: 0, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Metal }
2023-12-02T21:43:50.800731Z  INFO bevy_winit::system: Creating new window "App" (0v0)
2023-12-02T21:43:50.937406Z  INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "MacOS 12.7 ", kernel: "21.6.0", cpu: "Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz", core_count: "4", memory: "16.0 GiB" }
2023-12-02T21:43:51.627927Z ERROR log: Shader translation error for stage ShaderStages(VERTEX | FRAGMENT): new_render_pipeline_state: "Compiler encountered an internal error"    
2023-12-02T21:43:51.627987Z ERROR log: Please report it to https://github.com/gfx-rs/naga    
2023-12-02T21:43:51.628043Z ERROR log: Handling wgpu errors as fatal by default    
thread 'Compute Task Pool (0)' panicked at /Users/eric/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.17.2/src/backend/direct.rs:3056:5:
wgpu error: Validation Error

Caused by:
    In Device::create_render_pipeline
      note: label = `transparent_mesh2d_pipeline`
    Internal error in ShaderStages(VERTEX | FRAGMENT) shader: new_render_pipeline_state: "Compiler encountered an internal error"


note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Encountered a panic in system `bevy_render::render_resource::pipeline_cache::PipelineCache::process_pipeline_queue_system`!
thread 'main' panicked at crates/bevy_render/src/pipelined_rendering.rs:145:45:
called `Result::unwrap()` on an `Err` value: RecvError

Notice that the ERROR log asks for a report in gfx-rs. Please let me know if this is truly a gfx-rs issue and I'll move it there. I'm posting this here because the use of direct.rs leads me to believe that Bevy tried to load DirectX support rather than, what I assume is more appropriate for my macOS workstation, the Metal graphics lib. However, notice that the AdapterInfo indicates Bevy is targeting Metal.

So, with that working theory, I'm posting here. Please let me know if I can provide other diagnostic info. The full traceback is backtrace.log.

Related issues

In Device::create_render_pipeline
      note: label = `transparent_mesh2d_pipeline`

Metadata

Assignees

No one assigned

    Labels

    A-RenderingDrawing game state to the screenC-BugAn unexpected or incorrect behaviorC-ExamplesAn addition or correction to our examplesO-MacOSSpecific to the MacOS (Apple) desktop operating systemO-MetalSpecific to the Metal render API

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions