wgpu/tests/out/shadow.ron.snap
2021-03-07 12:11:49 -05:00

1235 lines
32 KiB
Plaintext

---
source: tests/snapshots.rs
expression: output
---
(
types: [
(
name: None,
inner: Scalar(
kind: Float,
width: 4,
),
),
(
name: None,
inner: Vector(
size: Tri,
kind: Float,
width: 4,
),
),
(
name: None,
inner: Scalar(
kind: Uint,
width: 4,
),
),
(
name: None,
inner: Vector(
size: Quad,
kind: Float,
width: 4,
),
),
(
name: None,
inner: Scalar(
kind: Bool,
width: 1,
),
),
(
name: None,
inner: Vector(
size: Bi,
kind: Float,
width: 4,
),
),
(
name: None,
inner: Image(
dim: D2,
arrayed: true,
class: Sampled(
kind: Float,
multi: false,
),
),
),
(
name: None,
inner: Sampler(
comparison: false,
),
),
(
name: None,
inner: Vector(
size: Bi,
kind: Float,
width: 4,
),
),
(
name: None,
inner: Scalar(
kind: Sint,
width: 4,
),
),
(
name: None,
inner: Vector(
size: Quad,
kind: Uint,
width: 4,
),
),
(
name: Some("Globals"),
inner: Struct(
block: true,
members: [
(
name: Some("num_lights"),
span: None,
ty: 11,
),
],
),
),
(
name: None,
inner: Matrix(
columns: Quad,
rows: Quad,
width: 4,
),
),
(
name: Some("Light"),
inner: Struct(
block: true,
members: [
(
name: Some("proj"),
span: None,
ty: 13,
),
(
name: Some("pos"),
span: None,
ty: 4,
),
(
name: Some("color"),
span: None,
ty: 4,
),
],
),
),
(
name: None,
inner: Array(
base: 14,
size: Dynamic,
stride: Some(96),
),
),
(
name: Some("Lights"),
inner: Struct(
block: true,
members: [
(
name: Some("data"),
span: None,
ty: 15,
),
],
),
),
(
name: None,
inner: Image(
dim: D2,
arrayed: true,
class: Depth,
),
),
(
name: None,
inner: Sampler(
comparison: true,
),
),
],
constants: [
(
name: None,
specialization: None,
inner: Scalar(
width: 4,
value: Uint(0),
),
),
(
name: None,
specialization: None,
inner: Scalar(
width: 4,
value: Uint(1),
),
),
(
name: None,
specialization: None,
inner: Scalar(
width: 4,
value: Uint(2),
),
),
(
name: None,
specialization: None,
inner: Scalar(
width: 4,
value: Uint(3),
),
),
(
name: None,
specialization: None,
inner: Scalar(
width: 4,
value: Float(0),
),
),
(
name: None,
specialization: None,
inner: Scalar(
width: 4,
value: Float(1),
),
),
(
name: None,
specialization: None,
inner: Scalar(
width: 4,
value: Float(0.5),
),
),
(
name: None,
specialization: None,
inner: Scalar(
width: 4,
value: Float(-0.5),
),
),
(
name: None,
specialization: None,
inner: Scalar(
width: 4,
value: Float(0.05000000074505806),
),
),
(
name: None,
specialization: None,
inner: Composite(
ty: 2,
components: [
9,
9,
9,
],
),
),
(
name: None,
specialization: None,
inner: Scalar(
width: 4,
value: Uint(10),
),
),
(
name: None,
specialization: None,
inner: Scalar(
width: 4,
value: Uint(0),
),
),
(
name: None,
specialization: None,
inner: Scalar(
width: 4,
value: Uint(1),
),
),
(
name: None,
specialization: None,
inner: Scalar(
width: 4,
value: Float(0),
),
),
(
name: None,
specialization: None,
inner: Scalar(
width: 4,
value: Sint(0),
),
),
(
name: None,
specialization: None,
inner: Scalar(
width: 4,
value: Sint(0),
),
),
(
name: None,
specialization: None,
inner: Scalar(
width: 4,
value: Sint(0),
),
),
(
name: None,
specialization: None,
inner: Scalar(
width: 4,
value: Sint(0),
),
),
(
name: None,
specialization: None,
inner: Scalar(
width: 4,
value: Sint(0),
),
),
(
name: None,
specialization: None,
inner: Scalar(
width: 4,
value: Sint(1),
),
),
(
name: None,
specialization: None,
inner: Scalar(
width: 4,
value: Sint(0),
),
),
(
name: None,
specialization: None,
inner: Scalar(
width: 4,
value: Sint(0),
),
),
(
name: None,
specialization: None,
inner: Scalar(
width: 4,
value: Sint(1),
),
),
(
name: None,
specialization: None,
inner: Scalar(
width: 4,
value: Sint(1),
),
),
(
name: None,
specialization: None,
inner: Scalar(
width: 4,
value: Sint(0),
),
),
(
name: None,
specialization: None,
inner: Scalar(
width: 4,
value: Sint(1),
),
),
(
name: None,
specialization: None,
inner: Scalar(
width: 4,
value: Sint(2),
),
),
(
name: None,
specialization: None,
inner: Scalar(
width: 4,
value: Sint(0),
),
),
(
name: None,
specialization: None,
inner: Scalar(
width: 4,
value: Sint(1),
),
),
(
name: None,
specialization: None,
inner: Scalar(
width: 4,
value: Sint(2),
),
),
(
name: None,
specialization: None,
inner: Scalar(
width: 4,
value: Sint(0),
),
),
(
name: None,
specialization: None,
inner: Scalar(
width: 4,
value: Sint(2),
),
),
(
name: None,
specialization: None,
inner: Scalar(
width: 4,
value: Sint(0),
),
),
(
name: None,
specialization: None,
inner: Scalar(
width: 4,
value: Sint(0),
),
),
(
name: None,
specialization: None,
inner: Scalar(
width: 4,
value: Sint(2),
),
),
(
name: None,
specialization: None,
inner: Scalar(
width: 4,
value: Sint(1),
),
),
(
name: None,
specialization: None,
inner: Scalar(
width: 4,
value: Sint(0),
),
),
(
name: None,
specialization: None,
inner: Scalar(
width: 4,
value: Sint(2),
),
),
(
name: None,
specialization: None,
inner: Scalar(
width: 4,
value: Sint(2),
),
),
],
global_variables: [
(
name: Some("t_shadow"),
class: Handle,
binding: Some(Resource(
group: 0,
binding: 2,
)),
ty: 17,
init: None,
interpolation: None,
storage_access: (
bits: 0,
),
),
(
name: Some("sampler_shadow"),
class: Handle,
binding: Some(Resource(
group: 0,
binding: 3,
)),
ty: 18,
init: None,
interpolation: None,
storage_access: (
bits: 0,
),
),
(
name: Some("u_globals"),
class: Uniform,
binding: Some(Resource(
group: 0,
binding: 0,
)),
ty: 12,
init: None,
interpolation: None,
storage_access: (
bits: 0,
),
),
(
name: Some("s_lights"),
class: Storage,
binding: Some(Resource(
group: 0,
binding: 1,
)),
ty: 16,
init: None,
interpolation: None,
storage_access: (
bits: 1,
),
),
(
name: Some("in_position_fs"),
class: Input,
binding: Some(Location(1)),
ty: 4,
init: None,
interpolation: None,
storage_access: (
bits: 0,
),
),
(
name: Some("in_normal_fs"),
class: Input,
binding: Some(Location(0)),
ty: 2,
init: None,
interpolation: None,
storage_access: (
bits: 0,
),
),
(
name: Some("out_color_fs"),
class: Output,
binding: Some(Location(0)),
ty: 4,
init: None,
interpolation: None,
storage_access: (
bits: 0,
),
),
],
functions: [
(
name: None,
arguments: [
(
name: None,
ty: 3,
),
(
name: None,
ty: 4,
),
],
return_type: Some(1),
local_variables: [],
expressions: [
GlobalVariable(3),
GlobalVariable(6),
GlobalVariable(5),
GlobalVariable(1),
GlobalVariable(2),
GlobalVariable(4),
GlobalVariable(7),
Constant(20),
Constant(7),
Constant(33),
Constant(31),
Constant(29),
Constant(27),
Constant(25),
Constant(15),
Constant(12),
Constant(23),
Constant(8),
Constant(36),
Constant(34),
Constant(14),
Constant(32),
Constant(30),
Constant(17),
Constant(26),
Constant(39),
Constant(13),
Constant(11),
Constant(9),
Constant(6),
Constant(21),
Constant(35),
Constant(19),
Constant(37),
Constant(18),
Constant(28),
Constant(16),
Constant(24),
Constant(38),
Constant(22),
Constant(10),
Constant(5),
FunctionArgument(0),
FunctionArgument(1),
AccessIndex(
base: 44,
index: 3,
),
Binary(
op: LessEqual,
left: 45,
right: 42,
),
AccessIndex(
base: 44,
index: 0,
),
AccessIndex(
base: 44,
index: 1,
),
Compose(
ty: 9,
components: [
47,
48,
],
),
Compose(
ty: 9,
components: [
9,
18,
],
),
Binary(
op: Multiply,
left: 49,
right: 50,
),
AccessIndex(
base: 44,
index: 3,
),
Binary(
op: Divide,
left: 30,
right: 52,
),
Binary(
op: Multiply,
left: 51,
right: 53,
),
Compose(
ty: 9,
components: [
9,
9,
],
),
Binary(
op: Add,
left: 54,
right: 55,
),
AccessIndex(
base: 56,
index: 0,
),
AccessIndex(
base: 56,
index: 1,
),
As(
expr: 43,
kind: Sint,
convert: false,
),
As(
expr: 59,
kind: Float,
convert: true,
),
Compose(
ty: 2,
components: [
57,
58,
60,
],
),
AccessIndex(
base: 44,
index: 2,
),
AccessIndex(
base: 44,
index: 3,
),
Binary(
op: Divide,
left: 30,
right: 63,
),
Binary(
op: Multiply,
left: 62,
right: 64,
),
AccessIndex(
base: 61,
index: 0,
),
AccessIndex(
base: 61,
index: 1,
),
Compose(
ty: 6,
components: [
66,
67,
],
),
AccessIndex(
base: 61,
index: 2,
),
As(
expr: 69,
kind: Uint,
convert: true,
),
ImageSample(
image: 4,
sampler: 5,
coordinate: 68,
array_index: Some(70),
offset: None,
level: Exact(21),
depth_ref: Some(65),
),
],
body: [
Emit((
start: 44,
end: 46,
)),
If(
condition: 46,
accept: [
Return(
value: Some(30),
),
],
reject: [],
),
Emit((
start: 46,
end: 71,
)),
Return(
value: Some(71),
),
],
),
],
entry_points: [
(
name: "fs_main",
stage: Fragment,
early_depth_test: None,
workgroup_size: (0, 0, 0),
function: (
name: Some("fs_main"),
arguments: [],
return_type: None,
local_variables: [
(
name: Some("color"),
ty: 2,
init: Some(10),
),
(
name: Some("i"),
ty: 3,
init: Some(12),
),
],
expressions: [
GlobalVariable(3),
GlobalVariable(6),
GlobalVariable(5),
GlobalVariable(1),
GlobalVariable(2),
GlobalVariable(4),
GlobalVariable(7),
Constant(20),
Constant(7),
Constant(33),
Constant(31),
Constant(29),
Constant(27),
Constant(25),
Constant(15),
Constant(12),
Constant(23),
Constant(8),
Constant(36),
Constant(34),
Constant(14),
Constant(32),
Constant(30),
Constant(17),
Constant(26),
Constant(39),
Constant(13),
Constant(11),
Constant(9),
Constant(6),
Constant(21),
Constant(35),
Constant(19),
Constant(37),
Constant(18),
Constant(28),
Constant(16),
Constant(24),
Constant(38),
Constant(22),
Constant(10),
Constant(5),
LocalVariable(1),
LocalVariable(2),
Load(
pointer: 44,
),
AccessIndex(
base: 1,
index: 0,
),
Access(
base: 46,
index: 37,
),
Load(
pointer: 47,
),
Math(
fun: Min,
arg: 48,
arg1: Some(28),
arg2: None,
),
Binary(
op: GreaterEqual,
left: 45,
right: 49,
),
Load(
pointer: 43,
),
Load(
pointer: 44,
),
AccessIndex(
base: 6,
index: 0,
),
Load(
pointer: 44,
),
Access(
base: 53,
index: 54,
),
AccessIndex(
base: 55,
index: 0,
),
Load(
pointer: 56,
),
Load(
pointer: 3,
),
Binary(
op: Multiply,
left: 57,
right: 58,
),
Call(1),
Load(
pointer: 2,
),
Math(
fun: Normalize,
arg: 61,
arg1: None,
arg2: None,
),
AccessIndex(
base: 6,
index: 0,
),
Load(
pointer: 44,
),
Access(
base: 63,
index: 64,
),
AccessIndex(
base: 65,
index: 1,
),
Access(
base: 66,
index: 31,
),
Load(
pointer: 67,
),
AccessIndex(
base: 6,
index: 0,
),
Load(
pointer: 44,
),
Access(
base: 69,
index: 70,
),
AccessIndex(
base: 71,
index: 1,
),
Access(
base: 72,
index: 38,
),
Load(
pointer: 73,
),
AccessIndex(
base: 6,
index: 0,
),
Load(
pointer: 44,
),
Access(
base: 75,
index: 76,
),
AccessIndex(
base: 77,
index: 1,
),
Access(
base: 78,
index: 13,
),
Load(
pointer: 79,
),
Compose(
ty: 2,
components: [
68,
74,
80,
],
),
Access(
base: 3,
index: 36,
),
Load(
pointer: 82,
),
Access(
base: 3,
index: 12,
),
Load(
pointer: 84,
),
Access(
base: 3,
index: 23,
),
Load(
pointer: 86,
),
Compose(
ty: 2,
components: [
83,
85,
87,
],
),
Binary(
op: Subtract,
left: 81,
right: 88,
),
Math(
fun: Normalize,
arg: 89,
arg1: None,
arg2: None,
),
Math(
fun: Dot,
arg: 62,
arg1: Some(90),
arg2: None,
),
Math(
fun: Max,
arg: 42,
arg1: Some(91),
arg2: None,
),
Binary(
op: Multiply,
left: 60,
right: 92,
),
AccessIndex(
base: 6,
index: 0,
),
Load(
pointer: 44,
),
Access(
base: 94,
index: 95,
),
AccessIndex(
base: 96,
index: 2,
),
Access(
base: 97,
index: 10,
),
Load(
pointer: 98,
),
AccessIndex(
base: 6,
index: 0,
),
Load(
pointer: 44,
),
Access(
base: 100,
index: 101,
),
AccessIndex(
base: 102,
index: 2,
),
Access(
base: 103,
index: 19,
),
Load(
pointer: 104,
),
AccessIndex(
base: 6,
index: 0,
),
Load(
pointer: 44,
),
Access(
base: 106,
index: 107,
),
AccessIndex(
base: 108,
index: 2,
),
Access(
base: 109,
index: 26,
),
Load(
pointer: 110,
),
Compose(
ty: 2,
components: [
99,
105,
111,
],
),
Binary(
op: Multiply,
left: 112,
right: 93,
),
Binary(
op: Add,
left: 51,
right: 113,
),
Load(
pointer: 44,
),
Binary(
op: Add,
left: 115,
right: 27,
),
Load(
pointer: 43,
),
Compose(
ty: 4,
components: [
117,
30,
],
),
],
body: [
Loop(
body: [
Emit((
start: 44,
end: 50,
)),
If(
condition: 50,
accept: [
Break,
],
reject: [],
),
Emit((
start: 50,
end: 59,
)),
Call(
function: 1,
arguments: [
52,
59,
],
result: Some(60),
),
Emit((
start: 60,
end: 114,
)),
Store(
pointer: 43,
value: 114,
),
],
continuing: [
Emit((
start: 114,
end: 116,
)),
Store(
pointer: 44,
value: 116,
),
],
),
Emit((
start: 116,
end: 118,
)),
Store(
pointer: 7,
value: 118,
),
Return(
value: None,
),
],
),
),
],
)