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:
teoxoy
2025-04-02 16:34:32 +02:00
committed by Teodor Tanasoaia
parent c13fc3d141
commit 7b482622d3

View File

@@ -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),