(
    features: "",
    expectations: [
        (
            name: "Sampled Texture",
            buffer: (index: 0, epoch: 1),
            offset: 0,
            data: File("zero-16k.bin", 16384),
        ),
        (
            name: "Storage Texture",
            buffer: (index: 1, epoch: 1),
            offset: 0,
            data: File("zero-16k.bin", 16384),
        ),
        // MISSING: Texture binding arrays
        // MISSING: Partial views
    ],
    actions: [
        CreateTexture(Id(0, 1), (
            label: Some("Sampled Texture"),
            size: (
                width: 64,
                height: 64,
            ),
            mip_level_count: 1,
            sample_count: 1,
            dimension: r#2d,
            format: "rgba8unorm",
            usage: "TEXTURE_BINDING | COPY_SRC",
            view_formats: [],
        )),
        CreateTextureView(
            id: Id(0, 1),
            parent_id: Id(0, 1),
            desc: (),
        ),
        CreateBuffer(
            Id(0, 1),
            (
                label: Some("Sampled Texture Buffer"),
                size: 16384,
                usage: "MAP_READ | COPY_DST",
                mapped_at_creation: false,
            ),
        ),
        CreateTexture(Id(1, 1), (
            label: Some("Storage Texture"),
            size: (
                width: 64,
                height: 64,
            ),
            mip_level_count: 1,
            sample_count: 1,
            dimension: r#2d,
            format: "rgba8unorm",
            usage: "STORAGE_BINDING | COPY_SRC",
            view_formats: [],
        )),
        CreateTextureView(
            id: Id(1, 1),
            parent_id: Id(1, 1),
            desc: (),
        ),
        CreateBuffer(
            Id(1, 1),
            (
                label: Some("Storage Texture Buffer"),
                size: 16384,
                usage: "MAP_READ | COPY_DST",
                mapped_at_creation: false,
            ),
        ),


        CreateBindGroupLayout(Id(0, 1), (
            label: None,
            entries: [
                (
                    binding: 0,
                    visibility: "COMPUTE",
                    ty: Texture (
                        sample_type: Float(filterable: true),
                        view_dimension: r#2d,
                        multisampled: false,
                    ),
                    count: None,
                ),
                (
                    binding: 1,
                    visibility: "COMPUTE",
                    ty: StorageTexture (
                        access: r#write-only,
                        format: "rgba8unorm",
                        view_dimension: r#2d,
                    ),
                    count: None,
                ),
            ],
        )),
        CreateBindGroup(Id(0, 1), (
            label: None,
            layout: Id(0, 1),
            entries: [
                (
                    binding: 0,
                    resource: TextureView(Id(0, 1)),
                ),
                (
                    binding: 1,
                    resource: TextureView(Id(1, 1)),
                ),
            ],
        )),
        CreatePipelineLayout(Id(0, 1), (
            label: None,
            bind_group_layouts: [
                Id(0, 1),
            ],
            push_constant_ranges: [],
        )),
        CreateShaderModule(
            id: Id(0, 1),
            desc: (
                label: None,
                flags: (bits: 3),
            ),
            data: "zero-init-texture-binding.wgsl",
        ),
        CreateComputePipeline(
            id: Id(0, 1),
            desc: (
                label: None,
                layout: Some(Id(0, 1)),
                stage: (
                    module: Id(0, 1),
                    entry_point: None,
                    constants: {},
                    zero_initialize_workgroup_memory: true,
                    vertex_pulling_transform: false,
                ),
            ),
        ),

        Submit(1, [
            RunComputePass(
                base: (
                    commands: [
                        SetPipeline(Id(0, 1)),
                        SetBindGroup(
                            index: 0,
                            num_dynamic_offsets: 0,
                            bind_group_id: Some(Id(0, 1)),
                        ),
                        Dispatch((4, 1, 1)),
                    ],
                    dynamic_offsets: [],
                    string_data: [],
                    push_constant_data: [],
                ),
            ),
            CopyTextureToBuffer(
                src: (
                    texture: Id(0, 1),
                    mip_level: 0,
                    array_layer: 0,
                ),
                dst:  (
                    buffer: Id(0, 1),
                    layout: (
                        offset: 0,
                        bytes_per_row: Some(256),
                        rows_per_image: Some(64),
                    ),
                ),
                size: (
                    width: 64,
                    height: 64,
                ),
            ),
            CopyTextureToBuffer(
                src: (
                    texture: Id(1, 1),
                    mip_level: 0,
                    array_layer: 0,
                ),
                dst:  (
                    buffer: Id(1, 1),
                    layout: (
                        offset: 0,
                        bytes_per_row: Some(256),
                        rows_per_image: Some(64),
                    ),
                ),
                size: (
                    width: 64,
                    height: 64,
                ),
            ),
        ]),
    ],
)
