mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-29 02:03:35 +00:00
58 lines
1.5 KiB
Plaintext
58 lines
1.5 KiB
Plaintext
(
|
|
features: [],
|
|
expectations: [
|
|
(
|
|
name: "Copy to Buffer",
|
|
buffer: (index: 0, epoch: 1),
|
|
offset: 0,
|
|
data: File("zero-16k.bin", 16384),
|
|
),
|
|
// MISSING: Partial copies
|
|
],
|
|
actions: [
|
|
CreateTexture(Id(0, 1), (
|
|
label: Some("Copy To Buffer Texture"),
|
|
size: (
|
|
width: 64,
|
|
height: 64,
|
|
),
|
|
mip_level_count: 1,
|
|
sample_count: 1,
|
|
dimension: r#2d,
|
|
format: "rgba8unorm",
|
|
usage: 1, // COPY_SRC
|
|
view_formats: [],
|
|
)),
|
|
CreateBuffer(
|
|
Id(0, 1),
|
|
(
|
|
label: Some("Copy to Buffer Buffer"),
|
|
size: 16384,
|
|
usage: 9,
|
|
mapped_at_creation: false,
|
|
),
|
|
),
|
|
Submit(1, [
|
|
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,
|
|
),
|
|
),
|
|
]),
|
|
],
|
|
)
|