bevy/crates/bevy_render/src
dataphract b47291264b diagnostics: meaningful error when graph node has wrong number of inputs (#4924)
# Objective

Currently, providing the wrong number of inputs to a render graph node triggers this assertion:

```
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `1`,
 right: `2`', /[redacted]/bevy/crates/bevy_render/src/renderer/graph_runner.rs:164:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```

This does not provide the user any context.

## Solution

Add a new `RenderGraphRunnerError` variant to handle this case. The new message looks like this:

```
ERROR bevy_render::renderer: Error running render graph:
ERROR bevy_render::renderer: > node (name: 'Some("outline_pass")') has 2 input slots, but was provided 1 values
```

---

## Changelog

### Changed

`RenderGraphRunnerError` now has a new variant, `MismatchedInputCount`.

## Migration Guide

Exhaustive matches on `RenderGraphRunnerError` will need to add a branch to handle the new `MismatchedInputCount` variant.
2022-06-06 15:47:52 +00:00
..
camera Camera Driven Viewports (#4898) 2022-06-05 00:27:49 +00:00
color Clippy improvements (#4665) 2022-05-31 01:38:07 +00:00
mesh Generate vertex tangents using mikktspace (#3872) 2022-05-31 22:53:54 +00:00
primitives Faster assign lights to clusters (#4345) 2022-04-15 02:53:20 +00:00
render_graph Camera Driven Rendering (#4745) 2022-06-02 00:12:17 +00:00
render_phase Camera Driven Viewports (#4898) 2022-06-05 00:27:49 +00:00
render_resource Set naga capabilities corresponding to wgpu features (#4824) 2022-06-03 20:50:50 +00:00
renderer diagnostics: meaningful error when graph node has wrong number of inputs (#4924) 2022-06-06 15:47:52 +00:00
texture Clippy improvements (#4665) 2022-05-31 01:38:07 +00:00
view Camera Driven Viewports (#4898) 2022-06-05 00:27:49 +00:00
extract_component.rs ExtractResourcePlugin (#3745) 2022-05-30 18:36:03 +00:00
extract_resource.rs ExtractResourcePlugin (#3745) 2022-05-30 18:36:03 +00:00
lib.rs Camera Driven Rendering (#4745) 2022-06-02 00:12:17 +00:00
render_asset.rs Clippy improvements (#4665) 2022-05-31 01:38:07 +00:00
settings.rs bevy_render: Use RenderDevice to get limits/features and expose AdapterInfo (#3931) 2022-02-16 21:17:37 +00:00