gfx-rs / gfx

[maintenance mode] A low-overhead Vulkan-like GPU API for Rust.
http://gfx-rs.github.io/
Apache License 2.0
5.36k stars 547 forks source link

Failed to run mesh-shading example #3512

Closed voxelias closed 3 years ago

voxelias commented 3 years ago

Short info header:

RUST_BACKTRACE=1 cargo run --release --bin mesh-shading --features metal
    Finished release [optimized] target(s) in 0.11s
     Running `/Users/elias/Projects/gfx/target/release/mesh-shading`
AdapterInfo { name: "Intel(R) Iris(TM) Plus Graphics", vendor: 0, device: 0, device_type: IntegratedGpu }
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: MissingFeature', examples/mesh-shading/main.rs:219:18
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::option::expect_none_failed
   3: mesh_shading::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
cwfitzgerald commented 3 years ago

As far as I'm aware, metal has no support for mesh shaders, neither does the underlying intel hardware, so it makes sence that it cannot run mesh shaders.

kvark commented 3 years ago

RIght, mesh shaders are currently only supported by Vulkan backend on limited platforms. The error reported by the example is appropriate.

voxelias commented 3 years ago

If it is known and fails in the right place, maybe some explained panic! instead of the Result::unwrap() on an Err would make more sense.

kvark commented 3 years ago

Sure, a better error message would be nice there!