mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-21 22:33:49 +00:00
Print requested and supported usages on UnsupportedUsage error (#6007)
* Print requested and supported usages on UnsupportedUsage error * fmt * changelog
This commit is contained in:
parent
c0e7c1ef94
commit
5a0e2187f0
@ -46,6 +46,7 @@ Bottom level categories:
|
||||
- Fix profiling with `tracy`. By @waywardmonkeys in [#5988](https://github.com/gfx-rs/wgpu/pull/5988)
|
||||
- As a workaround for [issue #4905](https://github.com/gfx-rs/wgpu/issues/4905), `wgpu-core` is undocumented unless `--cfg wgpu_core_doc` feature is enabled. By @kpreid in [#5987](https://github.com/gfx-rs/wgpu/pull/5987)
|
||||
- Bump MSRV for `d3d12`/`naga`/`wgpu-core`/`wgpu-hal`/`wgpu-types`' to 1.76. By @wumpf in [#6003](https://github.com/gfx-rs/wgpu/pull/6003)
|
||||
- Print requested and supported usages on `UnsupportedUsage` error. By @VladasZ in [#6007](https://github.com/gfx-rs/wgpu/pull/6007)
|
||||
|
||||
## 22.0.0 (2024-07-17)
|
||||
|
||||
|
@ -2009,7 +2009,10 @@ impl Global {
|
||||
config.composite_alpha_mode = new_alpha_mode;
|
||||
}
|
||||
if !caps.usage.contains(config.usage) {
|
||||
return Err(E::UnsupportedUsage);
|
||||
return Err(E::UnsupportedUsage {
|
||||
requested: config.usage,
|
||||
available: caps.usage,
|
||||
});
|
||||
}
|
||||
if width == 0 || height == 0 {
|
||||
return Err(E::ZeroArea);
|
||||
|
@ -89,8 +89,11 @@ pub enum ConfigureSurfaceError {
|
||||
requested: wgt::CompositeAlphaMode,
|
||||
available: Vec<wgt::CompositeAlphaMode>,
|
||||
},
|
||||
#[error("Requested usage is not supported")]
|
||||
UnsupportedUsage,
|
||||
#[error("Requested usage {requested:?} is not in the list of supported usages: {available:?}")]
|
||||
UnsupportedUsage {
|
||||
requested: hal::TextureUses,
|
||||
available: hal::TextureUses,
|
||||
},
|
||||
#[error("Gpu got stuck :(")]
|
||||
StuckGpu,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user