mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-22 14:55:05 +00:00
140 lines
4.0 KiB
Plaintext
140 lines
4.0 KiB
Plaintext
(
|
|
features: [],
|
|
expectations: [
|
|
(
|
|
name: "Quad",
|
|
buffer: (index: 0, epoch: 1),
|
|
offset: 0,
|
|
data: File("quad.bin", 16384),
|
|
)
|
|
],
|
|
actions: [
|
|
CreateShaderModule(
|
|
id: Id(0, 1),
|
|
desc: (
|
|
label: None,
|
|
flags: (bits: 3),
|
|
),
|
|
data: "quad.wgsl",
|
|
),
|
|
CreateTexture(Id(0, 1), (
|
|
label: Some("Output Texture"),
|
|
size: (
|
|
width: 64,
|
|
height: 64,
|
|
),
|
|
mip_level_count: 1,
|
|
sample_count: 1,
|
|
dimension: r#2d,
|
|
format: "rgba8unorm",
|
|
usage: 27,
|
|
view_formats: [],
|
|
)),
|
|
CreateTextureView(
|
|
id: Id(0, 1),
|
|
parent_id: Id(0, 1),
|
|
desc: (),
|
|
),
|
|
CreateBuffer(
|
|
Id(0, 1),
|
|
(
|
|
label: Some("Output Buffer"),
|
|
size: 16384,
|
|
usage: 9,
|
|
mapped_at_creation: false,
|
|
),
|
|
),
|
|
CreatePipelineLayout(Id(0, 1), (
|
|
label: None,
|
|
bind_group_layouts: [],
|
|
push_constant_ranges: [],
|
|
)),
|
|
CreateRenderPipeline(
|
|
id: Id(0, 1),
|
|
desc: (
|
|
label: None,
|
|
layout: Some(Id(0, 1)),
|
|
vertex: (
|
|
stage: (
|
|
module: Id(0, 1),
|
|
entry_point: None,
|
|
constants: {},
|
|
zero_initialize_workgroup_memory: true,
|
|
vertex_pulling_transform: false,
|
|
),
|
|
buffers: [],
|
|
),
|
|
fragment: Some((
|
|
stage: (
|
|
module: Id(0, 1),
|
|
entry_point: None,
|
|
constants: {},
|
|
zero_initialize_workgroup_memory: true,
|
|
vertex_pulling_transform: false,
|
|
),
|
|
targets: [
|
|
Some((
|
|
format: "rgba8unorm",
|
|
)),
|
|
],
|
|
)),
|
|
),
|
|
),
|
|
Submit(1, [
|
|
RunRenderPass(
|
|
base: (
|
|
commands: [
|
|
SetPipeline(Id(0, 1)),
|
|
Draw(
|
|
vertex_count: 3,
|
|
instance_count: 1,
|
|
first_vertex: 0,
|
|
first_instance: 0,
|
|
),
|
|
],
|
|
dynamic_offsets: [],
|
|
string_data: [],
|
|
push_constant_data: [],
|
|
),
|
|
target_colors: [
|
|
Some((
|
|
view: Id(0, 1),
|
|
resolve_target: None,
|
|
channel: (
|
|
load_op: clear,
|
|
store_op: store,
|
|
clear_value: (
|
|
r: 0,
|
|
g: 0,
|
|
b: 0,
|
|
a: 1,
|
|
),
|
|
read_only: false,
|
|
),
|
|
)),
|
|
],
|
|
target_depth_stencil: None,
|
|
),
|
|
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,
|
|
),
|
|
),
|
|
]),
|
|
],
|
|
)
|