summaryrefslogtreecommitdiff
path: root/op_crates/webgpu/binding.rs
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2021-03-19 22:55:37 +0530
committerGitHub <noreply@github.com>2021-03-19 13:25:37 -0400
commit91ca58fb2639a791237570e4f1fadda9eeb8c0bc (patch)
treeaa6faa41b9486a828952070f4ee337ad699e57ac /op_crates/webgpu/binding.rs
parent197305908b721340041be03e5a11fe60a1711fb2 (diff)
chores: enforce type ResourceId across codebase (#9837)
Diffstat (limited to 'op_crates/webgpu/binding.rs')
-rw-r--r--op_crates/webgpu/binding.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/op_crates/webgpu/binding.rs b/op_crates/webgpu/binding.rs
index b93b223cf..a004d1f45 100644
--- a/op_crates/webgpu/binding.rs
+++ b/op_crates/webgpu/binding.rs
@@ -4,6 +4,7 @@ use deno_core::error::bad_resource_id;
use deno_core::error::AnyError;
use deno_core::serde_json::json;
use deno_core::serde_json::Value;
+use deno_core::ResourceId;
use deno_core::ZeroCopyBuf;
use deno_core::{OpState, Resource};
use serde::Deserialize;
@@ -73,7 +74,7 @@ struct GPUBindGroupLayoutEntry {
#[derive(Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CreateBindGroupLayoutArgs {
- device_rid: u32,
+ device_rid: ResourceId,
label: Option<String>,
entries: Vec<GPUBindGroupLayoutEntry>,
}
@@ -215,7 +216,7 @@ pub fn op_webgpu_create_bind_group_layout(
#[derive(Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CreatePipelineLayoutArgs {
- device_rid: u32,
+ device_rid: ResourceId,
label: Option<String>,
bind_group_layouts: Vec<u32>,
}
@@ -277,7 +278,7 @@ struct GPUBindGroupEntry {
#[derive(Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CreateBindGroupArgs {
- device_rid: u32,
+ device_rid: ResourceId,
label: Option<String>,
layout: u32,
entries: Vec<GPUBindGroupEntry>,