gfx-rs / wgpu

A cross-platform, safe, pure-Rust graphics API.
https://wgpu.rs
Apache License 2.0
12.27k stars 901 forks source link

Invalidate CommandEncoder on invalid commands #5854

Open sagudev opened 3 months ago

sagudev commented 3 months ago

Is your feature request related to a problem? Please describe. Spec says that we should invalidate GPUCommandEncoder on invalid usage (see copybuffertobuffer for example). Currently error is just returned without invalidating command encoder.

Describe the solution you'd like command_encoder_copy_buffer_to_buffer and others should also invalidate command encoder to match the spec.

Describe alternatives you've considered Do nothing (this might be feature not a bug).

cwfitzgerald commented 3 months ago

We should ideally make this process automatic when an error is returned so this action isn't forgotton.