wgpu icon indicating copy to clipboard operation
wgpu copied to clipboard

[metal] panic in set_push_contants with incompatible shader stages

Open Imberflur opened this issue 1 year ago • 0 comments

Description The unwrap in this line panics when passing ShaderStages::all() when a render pass is being used (I assume if a compute pass was in use it would probably panic in one of the other unwraps below): https://github.com/gfx-rs/wgpu/blob/59e79c0664e109e569eb9dfb10d8f43df2513fca/wgpu-hal/src/metal/command.rs#L814

This is on 0.18, I can't easily test the latest version since I don't have access to a device with metal. However, I didn't see any issues, PRs, or notes in the changelog about this.

It seems like this should either be a validation error or shader stages not compatible with the current pass type should be ignored (I guess this is the current behavior on the other backends?).

Repro steps Call set_push_constants on a render pass with ShaderStages::all().

Expected vs observed behavior Validation error or gracefully handling this case vs unwrap panic.

Platform 0.18 wgpu on metal

Imberflur avatar Feb 11 '24 17:02 Imberflur