From 2a7f09aebc2b379116f1f42ebac57a40b770ea6f Mon Sep 17 00:00:00 2001 From: teoxoy <28601907+teoxoy@users.noreply.github.com> Date: Wed, 19 Jun 2024 14:46:32 +0200 Subject: [PATCH] make `clear_texture_via_render_passes` infallible (in practice it was already) --- wgpu-core/src/command/clear.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/wgpu-core/src/command/clear.rs b/wgpu-core/src/command/clear.rs index e75ca798f..66fb59ec7 100644 --- a/wgpu-core/src/command/clear.rs +++ b/wgpu-core/src/command/clear.rs @@ -321,10 +321,10 @@ pub(crate) fn clear_texture( dst_raw, ), TextureClearMode::Surface { .. } => { - clear_texture_via_render_passes(dst_texture, range, true, encoder)? + clear_texture_via_render_passes(dst_texture, range, true, encoder) } TextureClearMode::RenderPass { is_color, .. } => { - clear_texture_via_render_passes(dst_texture, range, is_color, encoder)? + clear_texture_via_render_passes(dst_texture, range, is_color, encoder) } TextureClearMode::None => { return Err(ClearError::NoValidTextureClearMode( @@ -434,7 +434,7 @@ fn clear_texture_via_render_passes( range: TextureInitRange, is_color: bool, encoder: &mut A::CommandEncoder, -) -> Result<(), ClearError> { +) { assert_eq!(dst_texture.desc.dimension, wgt::TextureDimension::D2); let extent_base = wgt::Extent3d { @@ -498,5 +498,4 @@ fn clear_texture_via_render_passes( } } } - Ok(()) }