diff options
author | crowlKats <13135287+crowlKats@users.noreply.github.com> | 2021-05-03 16:42:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-03 16:42:59 +0200 |
commit | 7bc03523d075ae4a5a508f9bdf59a1686f7bcdce (patch) | |
tree | 478b04458b054e62e02a7edb2a6f56a77f952439 /extensions/webgpu/shader.rs | |
parent | 3a37444cb547b8a0336060f0ef7c96bfd661d202 (diff) |
refactor(op_crates/webgpu): simplify gfx_select macro & add gfx_put and gfx_ok macros (#10044)
Diffstat (limited to 'extensions/webgpu/shader.rs')
-rw-r--r-- | extensions/webgpu/shader.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/extensions/webgpu/shader.rs b/extensions/webgpu/shader.rs index 0e653b470..9697c43d3 100644 --- a/extensions/webgpu/shader.rs +++ b/extensions/webgpu/shader.rs @@ -66,14 +66,10 @@ pub fn op_webgpu_create_shader_module( flags, }; - let (shader_module, maybe_err) = gfx_select!(device => instance.device_create_shader_module( + gfx_put!(device => instance.device_create_shader_module( device, &descriptor, source, std::marker::PhantomData - )); - - let rid = state.resource_table.add(WebGpuShaderModule(shader_module)); - - Ok(WebGpuResult::rid_err(rid, maybe_err)) + ) => state, WebGpuShaderModule) } |