Function clear_texture

Source
pub(crate) fn clear_texture<T: TextureTrackerSetSingle>(
    dst_texture: &Arc<Texture>,
    range: TextureInitRange,
    encoder: &mut dyn DynCommandEncoder,
    texture_tracker: &mut T,
    alignments: &Alignments,
    zero_buffer: &dyn DynBuffer,
    snatch_guard: &SnatchGuard<'_>,
    instance_flags: InstanceFlags,
) -> Result<(), ClearError>
Expand description

Encode a texture clear operation.

This function encodes a texture clear operation without validating it. Texture clears requested via the API call this function via clear_texture_cmd, which does the validation. This function is also called directly from various places within wgpu that need to clear a texture.