Panics without explanation when creating render pipeline with >4 fragment color targets #2108
Labels
area: validation
Issues related to validation, diagnostics, and error handling
help required
We need community help to make this happen.
type: enhancement
New feature or request
Milestone
Description
When creating a render pipeline, it is limited to 4 color attachments. This limit is set by
MAX_COLOR_TARGETS
. WGPU does not provide an error message explaining this, instead it proceeds and another crate (arrayvec
) ends up panicking with a very unhelpful error message.Repro steps
WGPU version 0.11
In
wgpu-hal-0.11.4/src/vulkan/device.rs:1456
, the following code tries to callArrayVec::push()
which panics if the array is full (and the array capacity is set toMAX_COLOR_TARGETS
):Expected vs observed behavior
A size check against
MAX_COLOR_TARGETS
should occur and a helpful error message should be provided explaining the maximum of 4, and perhaps offering suggested workarounds.Platform
Windows
The text was updated successfully, but these errors were encountered: