Bevy 0.8.1 3d_shapes example crashes on startup - macOS
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## Bevy
0.8.1
## Relevant system information
- Rust version: `1.67.0-nightly (7e484fc1a 2022-10-27)`
- macOS Mojave 10.14.6
If your bug is rendering-related, copy the adapter info that appears when you run Bevy.
```ignore
`AdapterInfo { name: "Intel(R) Iris(TM) Plus Graphics 645", vendor: 0, device: 0, device_type: IntegratedGpu, backend: Metal }`
```
You should also consider testing the examples of our upstream dependencies to help isolate any setup-specific issue:
- Tested wgpu cube example and it works as expected.
## What you did
`cargo run --example 3d_shapes`
## What went wrong
The app starts up then instantly crashes
## Additional information
3D works with Bevy 0.7, but not 0.8 and after.
# Logs
```
2022-11-06T13:10:00.760272Z WARN metal::device: Shader warnings: Compilation succeeded with:
program_source:197:25: warning: unused variable 'in'
const FragmentInput in = { is_front, varyings_1.world_position, varyings_1.world_normal, varyings_1.uv };
^
program_source:19:29: warning: unused variable 'POINT_LIGHT_FLAGS_SHADOWS_ENABLED_BIT'
constexpr constant unsigned POINT_LIGHT_FLAGS_SHADOWS_ENABLED_BIT = 1u;
^
program_source:20:29: warning: unused variable 'POINT_LIGHT_FLAGS_SPOT_LIGHT_Y_NEGATIVE'
constexpr constant unsigned POINT_LIGHT_FLAGS_SPOT_LIGHT_Y_NEGATIVE = 2u;
^
program_source:21:29: warning: unused variable 'DIRECTIONAL_LIGHT_FLAGS_SHADOWS_ENABLED_BIT'
constexpr constant unsigned DIRECTIONAL_LIGHT_FLAGS_SHADOWS_ENABLED_BIT = 1u;
^
program_source:22:29: warning: unused variable 'MESH_FLAGS_SHADOW_RECEIVER_BIT'
constexpr constant unsigned MESH_FLAGS_SHADOW_RECEIVER_BIT = 1u;
^
2022-11-06T13:10:00.842787Z ERROR wgpu::backend::direct: Shader translation error for stage FRAGMENT: Metal: Compilation failed:
program_source:687:32: error: no matching function for call to 'dot'
float NdotV_3 = metal::max(metal::dot(in_1.N, in_1.V), 0.00009999999747378752);
^~~~~~~~~~
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/3902/Libraries/lib/clang/902.3/include/metal/metal_geometric:171:30: note: candidate template ignored: requirement '_geometric_binary_func_enable::value' was not satisfied [with T = float __attribute__((ext_vector_type(3))), U = float __attribute__((packed_vector_type(3)))]
METAL_FUNC make_scalar_t<_O> dot(T x, U y)
^
program_source:693:25: error: no matching function for call to 'reflect'
metal::float3 R_3 = metal::reflect(-in_1.V, in_1.N);
^~~~~~~~~~~~~~
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/3902/Libraries/lib/clang/902.3/include/metal/metal_geometric:354:15: note: candidate template ignored: requirement '_geometric_binary_func_enable::value' was not satisfied [with T = float __attribute__((packed_vector_type(3))), U = float __attribute__((ext_vector_type(3)))]
METAL_FUNC _O reflect(T i, U n)
^
2022-11-06T13:10:00.842862Z ERROR wgpu::backend::direct: Please report it to https://github.com/gfx-rs/naga
2022-11-06T13:10:00.842931Z ERROR wgpu::backend::direct: Handling wgpu errors as fatal by default
thread 'main' panicked at 'wgpu error: Validation Error
Caused by:
In Device::create_render_pipeline
note: label = `pbr_opaque_mesh_pipeline`
Internal error in FRAGMENT shader: Metal: Compilation failed:
program_source:687:32: error: no matching function for call to 'dot'
float NdotV_3 = metal::max(metal::dot(in_1.N, in_1.V), 0.00009999999747378752);
^~~~~~~~~~
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/3902/Libraries/lib/clang/902.3/include/metal/metal_geometric:171:30: note: candidate template ignored: requirement '_geometric_binary_func_enable::value' was not satisfied [with T = float __attribute__((ext_vector_type(3))), U = float __attribute__((packed_vector_type(3)))]
METAL_FUNC make_scalar_t<_O> dot(T x, U y)
^
program_source:693:25: error: no matching function for call to 'reflect'
metal::float3 R_3 = metal::reflect(-in_1.V, in_1.N);
^~~~~~~~~~~~~~
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/3902/Libraries/lib/clang/902.3/include/metal/metal_geometric:354:15: note: candidate template ignored: requirement '_geometric_binary_func_enable::value' was not satisfied [with T = float __attribute__((packed_vector_type(3))), U = float __attribute__((ext_vector_type(3)))]
METAL_FUNC _O reflect(T i, U n)
```
Contributor guide
Assessment
This issue has not been assessed yet.