Skip to content

Commit c56c67d

Browse files
committed
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 gpuweb/gpuweb#5142 to figure out what we should do.
1 parent a5c92ea commit c56c67d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wgpu-core/src/device/resource.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1627,7 +1627,7 @@ impl Device {
16271627
};
16281628

16291629
let raw = unsafe { self.raw().create_sampler(&hal_desc) }
1630-
.map_err(|e| self.handle_hal_error(e))?;
1630+
.map_err(|e| self.handle_hal_error_with_nonfatal_oom(e))?;
16311631

16321632
let sampler = Sampler {
16331633
raw: ManuallyDrop::new(raw),

0 commit comments

Comments
 (0)