mirror of
https://github.com/denoland/deno.git
synced 2025-08-31 15:57:53 +00:00
chore: various op cleanup (#12329)
This commit is contained in:
parent
d67e858506
commit
77a00ce1fb
26 changed files with 131 additions and 185 deletions
|
@ -1,6 +1,5 @@
|
|||
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
|
||||
|
||||
use deno_core::error::null_opbuf;
|
||||
use deno_core::error::type_error;
|
||||
use deno_core::error::AnyError;
|
||||
use deno_core::futures::channel::oneshot;
|
||||
|
@ -171,9 +170,8 @@ pub struct BufferGetMappedRangeArgs {
|
|||
pub fn op_webgpu_buffer_get_mapped_range(
|
||||
state: &mut OpState,
|
||||
args: BufferGetMappedRangeArgs,
|
||||
zero_copy: Option<ZeroCopyBuf>,
|
||||
mut zero_copy: ZeroCopyBuf,
|
||||
) -> Result<WebGpuResult, AnyError> {
|
||||
let mut zero_copy = zero_copy.ok_or_else(null_opbuf)?;
|
||||
let instance = state.borrow::<super::Instance>();
|
||||
let buffer_resource =
|
||||
state.resource_table.get::<WebGpuBuffer>(args.buffer_rid)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue