diff options
author | Leo Kettmeir <crowlkats@toaxl.com> | 2022-08-04 01:00:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-04 01:00:51 +0200 |
commit | 864af52a1bf242bdf59790ba28a08042aab8c66b (patch) | |
tree | 65c1cf28aae00a775085c6d83f10622d1c40c328 /ext/webgpu/src/command_encoder.rs | |
parent | bc4ee5924682fee9e22922c1b8c07fad32728a83 (diff) |
fix(ext/webgpu): use correct IDL key name (#15278)
Diffstat (limited to 'ext/webgpu/src/command_encoder.rs')
-rw-r--r-- | ext/webgpu/src/command_encoder.rs | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/ext/webgpu/src/command_encoder.rs b/ext/webgpu/src/command_encoder.rs index d09199bbf..a583466d0 100644 --- a/ext/webgpu/src/command_encoder.rs +++ b/ext/webgpu/src/command_encoder.rs @@ -68,12 +68,12 @@ pub struct GpuRenderPassColorAttachment { pub struct GpuRenderPassDepthStencilAttachment { view: ResourceId, depth_clear_value: f32, - depth_load_op: wgpu_core::command::LoadOp, - depth_store_op: wgpu_core::command::StoreOp, + depth_load_op: Option<wgpu_core::command::LoadOp>, + depth_store_op: Option<wgpu_core::command::StoreOp>, depth_read_only: bool, stencil_clear_value: u32, - stencil_load_op: wgpu_core::command::LoadOp, - stencil_store_op: wgpu_core::command::StoreOp, + stencil_load_op: Option<wgpu_core::command::LoadOp>, + stencil_store_op: Option<wgpu_core::command::StoreOp>, stencil_read_only: bool, } @@ -138,14 +138,22 @@ pub fn op_webgpu_command_encoder_begin_render_pass( Some(wgpu_core::command::RenderPassDepthStencilAttachment { view: texture_view_resource.0, depth: wgpu_core::command::PassChannel { - load_op: attachment.depth_load_op, - store_op: attachment.depth_store_op, + load_op: attachment + .depth_load_op + .unwrap_or(wgpu_core::command::LoadOp::Load), + store_op: attachment + .depth_store_op + .unwrap_or(wgpu_core::command::StoreOp::Store), clear_value: attachment.depth_clear_value, read_only: attachment.depth_read_only, }, stencil: wgpu_core::command::PassChannel { - load_op: attachment.stencil_load_op, - store_op: attachment.stencil_store_op, + load_op: attachment + .stencil_load_op + .unwrap_or(wgpu_core::command::LoadOp::Load), + store_op: attachment + .stencil_store_op + .unwrap_or(wgpu_core::command::StoreOp::Store), clear_value: attachment.stencil_clear_value, read_only: attachment.stencil_read_only, }, |