mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
allow sampler creation to return OOMs
This is to preserve the current behavior as tested by the `SAMPLER_CREATION_FAILURE` test. This is not spec compliant but it's unclear what we should do instead. I opened https://github.com/gpuweb/gpuweb/issues/5142 to figure out what we should do.
This commit is contained in:
@@ -1633,7 +1633,7 @@ impl Device {
|
||||
};
|
||||
|
||||
let raw = unsafe { self.raw().create_sampler(&hal_desc) }
|
||||
.map_err(|e| self.handle_hal_error(e))?;
|
||||
.map_err(|e| self.handle_hal_error_with_nonfatal_oom(e))?;
|
||||
|
||||
let sampler = Sampler {
|
||||
raw: ManuallyDrop::new(raw),
|
||||
|
||||
Reference in New Issue
Block a user