diff options
Diffstat (limited to 'ext/webgpu/src/buffer.rs')
-rw-r--r-- | ext/webgpu/src/buffer.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/webgpu/src/buffer.rs b/ext/webgpu/src/buffer.rs index 3f2c07883..ce3a78d01 100644 --- a/ext/webgpu/src/buffer.rs +++ b/ext/webgpu/src/buffer.rs @@ -3,6 +3,8 @@ use deno_core::error::type_error; use deno_core::error::AnyError; use deno_core::futures::channel::oneshot; +use deno_core::op; + use deno_core::OpState; use deno_core::Resource; use deno_core::ResourceId; @@ -40,6 +42,7 @@ pub struct CreateBufferArgs { mapped_at_creation: bool, } +#[op] pub fn op_webgpu_create_buffer( state: &mut OpState, args: CreateBufferArgs, @@ -76,6 +79,7 @@ pub struct BufferGetMapAsyncArgs { size: u64, } +#[op] pub async fn op_webgpu_buffer_get_map_async( state: Rc<RefCell<OpState>>, args: BufferGetMapAsyncArgs, @@ -167,6 +171,7 @@ pub struct BufferGetMappedRangeArgs { size: Option<u64>, } +#[op] pub fn op_webgpu_buffer_get_mapped_range( state: &mut OpState, args: BufferGetMappedRangeArgs, @@ -204,6 +209,7 @@ pub struct BufferUnmapArgs { mapped_rid: ResourceId, } +#[op] pub fn op_webgpu_buffer_unmap( state: &mut OpState, args: BufferUnmapArgs, |