diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2022-03-14 23:14:15 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-14 18:44:15 +0100 |
commit | b4e42953e1d243f2eda20e5be6b845d60b7bf688 (patch) | |
tree | 10b3bfff165f9c04f9174c7c399d44b9b724c3b3 /ext/webgpu/src/command_encoder.rs | |
parent | 4e3ed37037a2aa1edeac260dc3463a81d9cf9b88 (diff) |
feat(core): codegen ops (#13861)
Co-authored-by: Aaron O'Mullan <aaron.omullan@gmail.com>
Diffstat (limited to 'ext/webgpu/src/command_encoder.rs')
-rw-r--r-- | ext/webgpu/src/command_encoder.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/webgpu/src/command_encoder.rs b/ext/webgpu/src/command_encoder.rs index 894b08f27..c81b2abf6 100644 --- a/ext/webgpu/src/command_encoder.rs +++ b/ext/webgpu/src/command_encoder.rs @@ -1,6 +1,7 @@ // Copyright 2018-2022 the Deno authors. All rights reserved. MIT license. use deno_core::error::AnyError; +use deno_core::op; use deno_core::ResourceId; use deno_core::{OpState, Resource}; use serde::Deserialize; @@ -36,6 +37,7 @@ pub struct CreateCommandEncoderArgs { _measure_execution_time: Option<bool>, // not yet implemented } +#[op] pub fn op_webgpu_create_command_encoder( state: &mut OpState, args: CreateCommandEncoderArgs, @@ -96,6 +98,7 @@ pub struct CommandEncoderBeginRenderPassArgs { _occlusion_query_set: Option<u32>, // not yet implemented } +#[op] pub fn op_webgpu_command_encoder_begin_render_pass( state: &mut OpState, args: CommandEncoderBeginRenderPassArgs, @@ -214,6 +217,7 @@ pub struct CommandEncoderBeginComputePassArgs { label: Option<String>, } +#[op] pub fn op_webgpu_command_encoder_begin_compute_pass( state: &mut OpState, args: CommandEncoderBeginComputePassArgs, @@ -252,6 +256,7 @@ pub struct CommandEncoderCopyBufferToBufferArgs { size: u64, } +#[op] pub fn op_webgpu_command_encoder_copy_buffer_to_buffer( state: &mut OpState, args: CommandEncoderCopyBufferToBufferArgs, @@ -310,6 +315,7 @@ pub struct CommandEncoderCopyBufferToTextureArgs { copy_size: wgpu_types::Extent3d, } +#[op] pub fn op_webgpu_command_encoder_copy_buffer_to_texture( state: &mut OpState, args: CommandEncoderCopyBufferToTextureArgs, @@ -360,6 +366,7 @@ pub struct CommandEncoderCopyTextureToBufferArgs { copy_size: wgpu_types::Extent3d, } +#[op] pub fn op_webgpu_command_encoder_copy_texture_to_buffer( state: &mut OpState, args: CommandEncoderCopyTextureToBufferArgs, @@ -414,6 +421,7 @@ pub struct CommandEncoderCopyTextureToTextureArgs { copy_size: wgpu_types::Extent3d, } +#[op] pub fn op_webgpu_command_encoder_copy_texture_to_texture( state: &mut OpState, args: CommandEncoderCopyTextureToTextureArgs, @@ -462,6 +470,7 @@ pub struct CommandEncoderClearBufferArgs { size: u64, } +#[op] pub fn op_webgpu_command_encoder_clear_buffer( state: &mut OpState, args: CommandEncoderClearBufferArgs, @@ -491,6 +500,7 @@ pub struct CommandEncoderPushDebugGroupArgs { group_label: String, } +#[op] pub fn op_webgpu_command_encoder_push_debug_group( state: &mut OpState, args: CommandEncoderPushDebugGroupArgs, @@ -512,6 +522,7 @@ pub struct CommandEncoderPopDebugGroupArgs { command_encoder_rid: ResourceId, } +#[op] pub fn op_webgpu_command_encoder_pop_debug_group( state: &mut OpState, args: CommandEncoderPopDebugGroupArgs, @@ -533,6 +544,7 @@ pub struct CommandEncoderInsertDebugMarkerArgs { marker_label: String, } +#[op] pub fn op_webgpu_command_encoder_insert_debug_marker( state: &mut OpState, args: CommandEncoderInsertDebugMarkerArgs, @@ -558,6 +570,7 @@ pub struct CommandEncoderWriteTimestampArgs { query_index: u32, } +#[op] pub fn op_webgpu_command_encoder_write_timestamp( state: &mut OpState, args: CommandEncoderWriteTimestampArgs, @@ -590,6 +603,7 @@ pub struct CommandEncoderResolveQuerySetArgs { destination_offset: u64, } +#[op] pub fn op_webgpu_command_encoder_resolve_query_set( state: &mut OpState, args: CommandEncoderResolveQuerySetArgs, @@ -624,6 +638,7 @@ pub struct CommandEncoderFinishArgs { label: Option<String>, } +#[op] pub fn op_webgpu_command_encoder_finish( state: &mut OpState, args: CommandEncoderFinishArgs, |