mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 16:24:24 +00:00
make clear_texture_via_render_passes
infallible (in practice it was already)
This commit is contained in:
parent
8d805c99d3
commit
2a7f09aebc
@ -321,10 +321,10 @@ pub(crate) fn clear_texture<A: HalApi>(
|
||||
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<A: HalApi>(
|
||||
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<A: HalApi>(
|
||||
}
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user