summaryrefslogtreecommitdiff
path: root/tests/indent/wgsl/basic.wgsl
blob: 7dd50f87ea25d28ee1f7ff605a9730ab10fe88cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
struct Vertex {
  @location(0) position: vec3<f32>,
  @location(1) color: vec4<f32>,
};

@vertex
fn vertex(vertex: Vertex) -> VertexOutput {
  var out: VertexOutput;
  out.a = 1;
  if (1) {
    out.a = 3;
  }
  if (2) {
    dsa;
  }

  loop {
    if (i >= 4) { break; }
  }
  out.b = 2;
  return out;
}

@vertex
fn vertex(vertex: Vertex,
  foo: dso,
  foo: dsa
) -> VertexOutput {
  var out: VertexOutput;
  out.a = 1;
  out.b = 2;
  return out;
}

@vertex
fn vertex(vertex: Vertex,
  foo: dso,
  foo: dsa) -> VertexOutput {
  var out: VertexOutput;
  out.a = 1;
  out.b = 2;
  return out;
}