summaryrefslogtreecommitdiff
path: root/ext/webgpu/buffer.rs
diff options
context:
space:
mode:
authorLuca Casonato <hello@lcas.dev>2021-08-24 20:32:25 +0200
committerGitHub <noreply@github.com>2021-08-24 20:32:25 +0200
commit4853be20f2d649842ebc97124d8479c7aad7cc9b (patch)
tree1be4dcc96c72166b3e1e4f19ee70eb791e1304aa /ext/webgpu/buffer.rs
parente10d30c8eaf41ad68b48f21c8d563d192b82afe8 (diff)
refactor(webgpu): use op interface idiomatically (#11835)
Diffstat (limited to 'ext/webgpu/buffer.rs')
-rw-r--r--ext/webgpu/buffer.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/webgpu/buffer.rs b/ext/webgpu/buffer.rs
index b87982aec..92afd2ef9 100644
--- a/ext/webgpu/buffer.rs
+++ b/ext/webgpu/buffer.rs
@@ -38,7 +38,7 @@ pub struct CreateBufferArgs {
label: Option<String>,
size: u64,
usage: u32,
- mapped_at_creation: Option<bool>,
+ mapped_at_creation: bool,
}
pub fn op_webgpu_create_buffer(
@@ -57,7 +57,7 @@ pub fn op_webgpu_create_buffer(
size: args.size,
usage: wgpu_types::BufferUsages::from_bits(args.usage)
.ok_or_else(|| type_error("usage is not valid"))?,
- mapped_at_creation: args.mapped_at_creation.unwrap_or(false),
+ mapped_at_creation: args.mapped_at_creation,
};
gfx_put!(device => instance.device_create_buffer(