2020-08-29 23:03:10 +00:00
|
|
|
(
|
2024-01-28 01:42:02 +00:00
|
|
|
features: [],
|
2020-08-29 23:03:10 +00:00
|
|
|
expectations: [
|
|
|
|
(
|
|
|
|
name: "Quad",
|
2020-09-05 03:45:00 +00:00
|
|
|
buffer: (index: 0, epoch: 1),
|
2020-08-29 23:03:10 +00:00
|
|
|
offset: 0,
|
|
|
|
data: File("quad.bin", 16384),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
actions: [
|
|
|
|
CreateShaderModule(
|
|
|
|
id: Id(0, 1, Empty),
|
2020-12-06 20:14:14 +00:00
|
|
|
desc: (
|
|
|
|
label: None,
|
2021-02-21 16:25:35 +00:00
|
|
|
flags: (bits: 3),
|
2020-12-06 20:14:14 +00:00
|
|
|
),
|
2020-12-05 16:28:16 +00:00
|
|
|
data: "quad.wgsl",
|
2020-08-29 23:03:10 +00:00
|
|
|
),
|
|
|
|
CreateTexture(Id(0, 1, Empty), (
|
|
|
|
label: Some("Output Texture"),
|
|
|
|
size: (
|
|
|
|
width: 64,
|
|
|
|
height: 64,
|
|
|
|
),
|
|
|
|
mip_level_count: 1,
|
|
|
|
sample_count: 1,
|
2021-12-03 15:58:53 +00:00
|
|
|
dimension: r#2d,
|
2022-09-29 17:43:50 +00:00
|
|
|
format: "rgba8unorm",
|
2021-12-03 15:58:53 +00:00
|
|
|
usage: 27,
|
2023-01-18 21:03:56 +00:00
|
|
|
view_formats: [],
|
2020-08-29 23:03:10 +00:00
|
|
|
)),
|
|
|
|
CreateTextureView(
|
|
|
|
id: Id(0, 1, Empty),
|
|
|
|
parent_id: Id(0, 1, Empty),
|
|
|
|
desc: (),
|
|
|
|
),
|
|
|
|
CreateBuffer(
|
2020-09-05 03:45:00 +00:00
|
|
|
Id(0, 1, Empty),
|
2020-08-29 23:03:10 +00:00
|
|
|
(
|
|
|
|
label: Some("Output Buffer"),
|
|
|
|
size: 16384,
|
2021-12-03 15:58:53 +00:00
|
|
|
usage: 9,
|
2020-08-29 23:03:10 +00:00
|
|
|
mapped_at_creation: false,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
CreatePipelineLayout(Id(0, 1, Empty), (
|
|
|
|
label: None,
|
|
|
|
bind_group_layouts: [],
|
|
|
|
push_constant_ranges: [],
|
|
|
|
)),
|
2021-03-03 21:48:23 +00:00
|
|
|
CreateRenderPipeline(
|
|
|
|
id: Id(0, 1, Empty),
|
|
|
|
desc: (
|
|
|
|
label: None,
|
|
|
|
layout: Some(Id(0, 1, Empty)),
|
|
|
|
vertex: (
|
|
|
|
stage: (
|
|
|
|
module: Id(0, 1, Empty),
|
2024-02-26 17:03:14 +00:00
|
|
|
entry_point: None,
|
2023-11-13 16:48:24 +00:00
|
|
|
constants: {},
|
2021-03-03 21:48:23 +00:00
|
|
|
),
|
|
|
|
buffers: [],
|
2021-01-27 19:43:08 +00:00
|
|
|
),
|
2021-03-03 21:48:23 +00:00
|
|
|
fragment: Some((
|
|
|
|
stage: (
|
|
|
|
module: Id(0, 1, Empty),
|
2024-02-26 17:03:14 +00:00
|
|
|
entry_point: None,
|
2023-11-13 16:48:24 +00:00
|
|
|
constants: {},
|
2021-01-27 19:43:08 +00:00
|
|
|
),
|
2021-03-03 21:48:23 +00:00
|
|
|
targets: [
|
2022-06-27 23:10:18 +00:00
|
|
|
Some((
|
2022-09-29 17:43:50 +00:00
|
|
|
format: "rgba8unorm",
|
2022-06-27 23:10:18 +00:00
|
|
|
)),
|
2021-03-03 21:48:23 +00:00
|
|
|
],
|
|
|
|
)),
|
|
|
|
),
|
|
|
|
),
|
2020-08-29 23:03:10 +00:00
|
|
|
Submit(1, [
|
|
|
|
RunRenderPass(
|
|
|
|
base: (
|
|
|
|
commands: [
|
|
|
|
SetPipeline(Id(0, 1, Empty)),
|
|
|
|
Draw(
|
|
|
|
vertex_count: 3,
|
|
|
|
instance_count: 1,
|
|
|
|
first_vertex: 0,
|
|
|
|
first_instance: 0,
|
|
|
|
),
|
|
|
|
],
|
|
|
|
dynamic_offsets: [],
|
|
|
|
string_data: [],
|
|
|
|
push_constant_data: [],
|
|
|
|
),
|
|
|
|
target_colors: [
|
2022-06-27 23:10:18 +00:00
|
|
|
Some((
|
2021-03-23 12:01:59 +00:00
|
|
|
view: Id(0, 1, Empty),
|
2020-08-29 23:03:10 +00:00
|
|
|
resolve_target: None,
|
|
|
|
channel: (
|
2021-12-03 15:58:53 +00:00
|
|
|
load_op: clear,
|
|
|
|
store_op: store,
|
2020-08-29 23:03:10 +00:00
|
|
|
clear_value: (
|
|
|
|
r: 0,
|
|
|
|
g: 0,
|
|
|
|
b: 0,
|
|
|
|
a: 1,
|
|
|
|
),
|
|
|
|
read_only: false,
|
|
|
|
),
|
2022-06-27 23:10:18 +00:00
|
|
|
)),
|
2020-08-29 23:03:10 +00:00
|
|
|
],
|
|
|
|
target_depth_stencil: None,
|
|
|
|
),
|
|
|
|
CopyTextureToBuffer(
|
|
|
|
src: (
|
|
|
|
texture: Id(0, 1, Empty),
|
|
|
|
mip_level: 0,
|
|
|
|
array_layer: 0,
|
|
|
|
),
|
|
|
|
dst: (
|
2020-09-05 03:45:00 +00:00
|
|
|
buffer: Id(0, 1, Empty),
|
2020-08-29 23:03:10 +00:00
|
|
|
layout: (
|
|
|
|
offset: 0,
|
2021-03-20 10:53:14 +00:00
|
|
|
bytes_per_row: Some(256),
|
|
|
|
rows_per_image: Some(64),
|
2020-08-29 23:03:10 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
size: (
|
|
|
|
width: 64,
|
|
|
|
height: 64,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
]),
|
|
|
|
],
|
2022-09-29 17:43:50 +00:00
|
|
|
)
|