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: background.rs
    path of file: ./repos/Egregoria/engine/src/passes
    
    the code of the file until where you have to start completion: use crate::{
    CompiledModule, GfxContext, PipelineKey, RenderParams, Texture, Uniform, UvVertex, TL,
};
use wgpu::{
    BindGroupLayout, BlendState, CommandEncoder, DepthBiasState, FragmentState, IndexFormat,
    MultisampleState, PipelineLayoutDescriptor, PrimitiveState, RenderPassColorAttachment,
    RenderPassDescriptor, RenderPipeline, RenderPipelineDescriptor, TextureFormat, TextureView,
    VertexState,
};

pub fn render_background(gfx: &GfxContext, enc: &mut CommandEncoder, frame: &TextureView) {
    profiling::scope!("bg pass");
    let ops = wgpu::Operations {
        load: wgpu::LoadOp::Load, // Don't clear! We're drawing after main pass
        store: wgpu::StoreOp::Store,
    };

    let attachment = if gfx.samples > 1 {
        RenderPassColorAttachment {
            view: &gfx.fbos.color_msaa,
            resolve
    
pub fn render_background(gfx: &GfxContext, enc: &mut CommandEncoder, frame: &TextureView) {
    profiling::scope!("bg pass");
    let ops = wgpu::Operations {
        load: wgpu::LoadOp::Load, // Don't clear! We're drawing after main pass
        store: wgpu::StoreOp::Store,
    };

    let attachment = if gfx.samples > 1 {
        RenderPassColorAttachment {
            view: &gfx.fbos.color_msaa,
            resolve_target: Some(frame),
            ops,
        }
    } else {
        RenderPassColorAttachment {
            view: frame,
            resolve_target: None,
            ops,
        }
    };

    let mut bg_pass = enc.begin_render_pass(&RenderPassDescriptor {
        label: Some("bg pass"),
        color_attachments: &[Some(attachment)],
        depth_stencil_attachment: Some(wgpu::RenderPassDepthStencilAttachment {
            view: &gfx.fbos.depth.view,
            depth_ops: Some(wgpu::Operations {
                load: wgpu::LoadOp::Load,
                store: wgpu::StoreOp::Discard,
            }),
            stencil_ops: None,
        }),
        timestamp_writes: None,
        occlusion_query_set: None,
    });

    bg_pass.set_pipeline(gfx.get_pipeline(BackgroundPipeline));
    bg_pass.set_bind_group(0, &gfx.render_params.bg, &[]);
    bg_pass.set_bind_group(1, &gfx.bnoise_bg, &[]);
    bg_pass.set_bind_group(2, &gfx.sky_bg, &[]);
    bg_pass.set_vertex_buffer(0, gfx.screen_uv_vertices.slice(..));
    bg_pass.set_index_buffer(gfx.rect_indices.slice(..), IndexFormat::Uint32);
    bg_pass.draw_indexed(0..6, 0, 0..1);
}