summaryrefslogtreecommitdiff
path: root/ext/webgpu/bundle.rs
diff options
context:
space:
mode:
authorLeo K <crowlkats@toaxl.com>2021-08-24 13:29:42 +0200
committerGitHub <noreply@github.com>2021-08-24 13:29:42 +0200
commitf4a9db350fbf00a6cb13a2c030b925cfd5218ed2 (patch)
tree3ab5cc4f4db7e4855df04fc792ee1e66e05a5d13 /ext/webgpu/bundle.rs
parent50f69a6996ae4dcdfe53f15fc49949d3756c9787 (diff)
chore(ext/webgpu): update wgpu to 0.10.0 (#11781)
Co-authored-by: Luca Casonato <hello@lcas.dev>
Diffstat (limited to 'ext/webgpu/bundle.rs')
-rw-r--r--ext/webgpu/bundle.rs16
1 files changed, 12 insertions, 4 deletions
diff --git a/ext/webgpu/bundle.rs b/ext/webgpu/bundle.rs
index 9ea80b171..3a228ba62 100644
--- a/ext/webgpu/bundle.rs
+++ b/ext/webgpu/bundle.rs
@@ -37,6 +37,8 @@ pub struct CreateRenderBundleEncoderArgs {
color_formats: Vec<String>,
depth_stencil_format: Option<String>,
sample_count: Option<u32>,
+ depth_read_only: bool,
+ stencil_read_only: bool,
}
pub fn op_webgpu_create_render_bundle_encoder(
@@ -58,11 +60,17 @@ pub fn op_webgpu_create_render_bundle_encoder(
let descriptor = wgpu_core::command::RenderBundleEncoderDescriptor {
label: args.label.map(Cow::from),
color_formats: Cow::from(color_formats),
- depth_stencil_format: args
- .depth_stencil_format
- .map(|s| serialize_texture_format(&s))
- .transpose()?,
sample_count: args.sample_count.unwrap_or(1),
+ depth_stencil: if let Some(depth_stencil_format) = args.depth_stencil_format
+ {
+ Some(wgpu_types::RenderBundleDepthStencil {
+ format: serialize_texture_format(&depth_stencil_format)?,
+ depth_read_only: args.depth_read_only,
+ stencil_read_only: args.stencil_read_only,
+ })
+ } else {
+ None
+ },
};
let res =