summaryrefslogtreecommitdiffstats
path: root/src/glsl/builtins/ir/step
blob: efcd7bc80234daa3f94dc46faea79a764e3fe4fa (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
((function step
   (signature float
     (parameters
       (declare (in) float edge)
       (declare (in) float x))
     ((return (expression float b2f (expression bool >= (var_ref x) (var_ref edge))))))

   (signature vec2
     (parameters
       (declare (in) float edge)
       (declare (in) vec2 x))
     ((declare () vec2 t)
      (assign (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))
      (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))
      (return (var_ref t))))

   (signature vec3
     (parameters
       (declare (in) float edge)
       (declare (in) vec3 x))
     ((declare () vec3 t)
      (assign (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))
      (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))
      (assign (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(var_ref edge))))
      (return (var_ref t))))

   (signature vec4
     (parameters
       (declare (in) float edge)
       (declare (in) vec4 x))
     ((declare () vec4 t)
      (assign (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))
      (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))
      (assign (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(var_ref edge))))
      (assign (w) (var_ref t) (expression float b2f (expression bool >= (swiz w (var_ref x))(var_ref edge))))
      (return (var_ref t))))

   (signature vec2
     (parameters
       (declare (in) vec2 edge)
       (declare (in) vec2 x))
     ((declare () vec2 t)
      (assign (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))
      (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))
      (return (var_ref t))))

   (signature vec3
     (parameters
       (declare (in) vec3 edge)
       (declare (in) vec3 x))
     ((declare () vec3 t)
      (assign (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))
      (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))
      (assign (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(swiz z (var_ref edge)))))
      (return (var_ref t))))

   (signature vec4
     (parameters
       (declare (in) vec4 edge)
       (declare (in) vec4 x))
     ((declare () vec4 t)
      (assign (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))
      (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))
      (assign (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(swiz z (var_ref edge)))))
      (assign (w) (var_ref t) (expression float b2f (expression bool >= (swiz w (var_ref x))(swiz w (var_ref edge)))))
      (return (var_ref t))))
))