You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: clear_texture.rs
    path of file: ./repos/wgpu/tests/tests
    
    the code of the file until where you have to start completion: use wgpu_test::{
    gpu_test, image::ReadbackBuffers, FailureCase, GpuTestConfiguration, TestParameters,
    TestingContext,
};

static TEXTURE_FORMATS_UNCOMPRESSED_GLES_COMPAT: &[wgpu::TextureFormat] = &[
    wgpu::TextureFormat::R8Unorm,
    wgpu::TextureFormat::R8Snorm,
    wgpu::TextureFormat::R8Uint,
    wgpu::TextureFormat::R8Sint,
    wgpu::TextureFormat::R16Uint,
    wgpu::TextureFormat::R16Sint,
    wgpu::TextureFormat::R16Float,
    wgpu::TextureFormat::R32Uint,
    wgpu::TextureFormat::R32Sint,
    wgpu::TextureFormat::R32Float,
    wgpu::TextureFormat::Rg16Uint,
    wgpu::TextureFormat::Rg16Sint,
    wgpu::TextureFormat::Rg16Float,
    wgpu::TextureFormat::Rgba8Unorm,
    wgpu::TextureFormat::Rgba8UnormSrgb,
    wgpu
    
async fn clear_texture_tests(ctx: TestingContext, formats: &'static [wgpu::TextureFormat]) {
    for &format in formats {
        let (block_width, block_height) = format.block_dimensions();
        let rounded_width = block_width * wgpu::COPY_BYTES_PER_ROW_ALIGNMENT;
        let rounded_height = block_height * wgpu::COPY_BYTES_PER_ROW_ALIGNMENT;

        let is_compressed_or_depth_stencil_format =
            format.is_compressed() || format.is_depth_stencil_format();
        let supports_1d = !is_compressed_or_depth_stencil_format;
        let supports_3d = !is_compressed_or_depth_stencil_format;

        // 1D texture
        if supports_1d {
            single_texture_clear_test(
                &ctx,
                format,
                wgpu::Extent3d {
                    width: rounded_width,
                    height: 1,
                    depth_or_array_layers: 1,
                },
                wgpu::TextureDimension::D1,
            )
            .await;
        }
        // 2D texture
        single_texture_clear_test(
            &ctx,
            format,
            wgpu::Extent3d {
                width: rounded_width,
                height: rounded_height,
                depth_or_array_layers: 1,
            },
            wgpu::TextureDimension::D2,
        )
        .await;
        // 2D array texture
        single_texture_clear_test(
            &ctx,
            format,
            wgpu::Extent3d {
                width: rounded_width,
                height: rounded_height,
                depth_or_array_layers: 4,
            },
            wgpu::TextureDimension::D2,
        )
        .await;
        if supports_3d {
            // volume texture
            single_texture_clear_test(
                &ctx,
                format,
                wgpu::Extent3d {
                    width: rounded_width,
                    height: rounded_height,
                    depth_or_array_layers: 16,
                },
                wgpu::TextureDimension::D3,
            )
            .await;
        }
    }
}