summaryrefslogtreecommitdiff
path: root/op_crates/webgpu/bundle.rs
diff options
context:
space:
mode:
Diffstat (limited to 'op_crates/webgpu/bundle.rs')
-rw-r--r--op_crates/webgpu/bundle.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/op_crates/webgpu/bundle.rs b/op_crates/webgpu/bundle.rs
index 72abb18e6..d33563118 100644
--- a/op_crates/webgpu/bundle.rs
+++ b/op_crates/webgpu/bundle.rs
@@ -138,8 +138,6 @@ pub fn op_webgpu_render_bundle_encoder_set_bind_group(
args: RenderBundleEncoderSetBindGroupArgs,
zero_copy: Option<ZeroCopyBuf>,
) -> Result<WebGpuResult, AnyError> {
- let zero_copy = zero_copy.ok_or_else(null_opbuf)?;
-
let bind_group_resource = state
.resource_table
.get::<super::binding::WebGpuBindGroup>(args.bind_group)
@@ -165,6 +163,7 @@ pub fn op_webgpu_render_bundle_encoder_set_bind_group(
);
},
None => {
+ let zero_copy = zero_copy.ok_or_else(null_opbuf)?;
let (prefix, data, suffix) = unsafe { zero_copy.align_to::<u32>() };
assert!(prefix.is_empty());
assert!(suffix.is_empty());