summaryrefslogtreecommitdiff
path: root/op_crates/webgpu/queue.rs
diff options
context:
space:
mode:
authorYusuke Tanaka <yusuktan@maguro.dev>2021-03-26 03:17:37 +0900
committerGitHub <noreply@github.com>2021-03-25 19:17:37 +0100
commite7954413e16d5814db5da6389f8d6e0c328812aa (patch)
tree2840a275019df3e193c7c2f84442740ce7b7e48e /op_crates/webgpu/queue.rs
parent881e1e8164f1661158bac24f7ec03b969a0a8a02 (diff)
upgrade: Rust 1.51.0 (#9895)
Diffstat (limited to 'op_crates/webgpu/queue.rs')
-rw-r--r--op_crates/webgpu/queue.rs30
1 files changed, 15 insertions, 15 deletions
diff --git a/op_crates/webgpu/queue.rs b/op_crates/webgpu/queue.rs
index d878d5fcb..bbfb782de 100644
--- a/op_crates/webgpu/queue.rs
+++ b/op_crates/webgpu/queue.rs
@@ -9,9 +9,9 @@ use deno_core::ResourceId;
use deno_core::ZeroCopyBuf;
use serde::Deserialize;
-use super::error::WebGPUError;
+use super::error::WebGpuError;
-type WebGPUQueue = super::WebGPUDevice;
+type WebGpuQueue = super::WebGpuDevice;
#[derive(Deserialize)]
#[serde(rename_all = "camelCase")]
@@ -28,7 +28,7 @@ pub fn op_webgpu_queue_submit(
let instance = state.borrow::<super::Instance>();
let queue_resource = state
.resource_table
- .get::<WebGPUQueue>(args.queue_rid)
+ .get::<WebGpuQueue>(args.queue_rid)
.ok_or_else(bad_resource_id)?;
let queue = queue_resource.0;
@@ -37,7 +37,7 @@ pub fn op_webgpu_queue_submit(
for rid in args.command_buffers {
let buffer_resource = state
.resource_table
- .get::<super::command_encoder::WebGPUCommandBuffer>(rid)
+ .get::<super::command_encoder::WebGpuCommandBuffer>(rid)
.ok_or_else(bad_resource_id)?;
ids.push(buffer_resource.0);
}
@@ -45,12 +45,12 @@ pub fn op_webgpu_queue_submit(
let maybe_err =
gfx_select!(queue => instance.queue_submit(queue, &ids)).err();
- Ok(json!({ "err": maybe_err.map(WebGPUError::from) }))
+ Ok(json!({ "err": maybe_err.map(WebGpuError::from) }))
}
#[derive(Deserialize)]
#[serde(rename_all = "camelCase")]
-struct GPUImageDataLayout {
+struct GpuImageDataLayout {
offset: Option<u64>,
bytes_per_row: Option<u32>,
rows_per_image: Option<u32>,
@@ -74,12 +74,12 @@ pub fn op_webgpu_write_buffer(
let instance = state.borrow::<super::Instance>();
let buffer_resource = state
.resource_table
- .get::<super::buffer::WebGPUBuffer>(args.buffer)
+ .get::<super::buffer::WebGpuBuffer>(args.buffer)
.ok_or_else(bad_resource_id)?;
let buffer = buffer_resource.0;
let queue_resource = state
.resource_table
- .get::<WebGPUQueue>(args.queue_rid)
+ .get::<WebGpuQueue>(args.queue_rid)
.ok_or_else(bad_resource_id)?;
let queue = queue_resource.0;
@@ -95,16 +95,16 @@ pub fn op_webgpu_write_buffer(
))
.err();
- Ok(json!({ "err": maybe_err.map(WebGPUError::from) }))
+ Ok(json!({ "err": maybe_err.map(WebGpuError::from) }))
}
#[derive(Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct QueueWriteTextureArgs {
queue_rid: ResourceId,
- destination: super::command_encoder::GPUImageCopyTexture,
- data_layout: GPUImageDataLayout,
- size: super::texture::GPUExtent3D,
+ destination: super::command_encoder::GpuImageCopyTexture,
+ data_layout: GpuImageDataLayout,
+ size: super::texture::GpuExtent3D,
}
pub fn op_webgpu_write_texture(
@@ -115,11 +115,11 @@ pub fn op_webgpu_write_texture(
let instance = state.borrow::<super::Instance>();
let texture_resource = state
.resource_table
- .get::<super::texture::WebGPUTexture>(args.destination.texture)
+ .get::<super::texture::WebGpuTexture>(args.destination.texture)
.ok_or_else(bad_resource_id)?;
let queue_resource = state
.resource_table
- .get::<WebGPUQueue>(args.queue_rid)
+ .get::<WebGpuQueue>(args.queue_rid)
.ok_or_else(bad_resource_id)?;
let queue = queue_resource.0;
@@ -154,5 +154,5 @@ pub fn op_webgpu_write_texture(
))
.err();
- Ok(json!({ "err": maybe_err.map(WebGPUError::from) }))
+ Ok(json!({ "err": maybe_err.map(WebGpuError::from) }))
}