• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1spv.pp.line.frag
2WARNING: spv.pp.line.frag:7: varying deprecated in version 130; may be removed in future release
3WARNING: spv.pp.line.frag:8: varying deprecated in version 130; may be removed in future release
4
5// Module Version 10000
6// Generated by (magic number): 8000b
7// Id's are bound by 84
8
9                              Capability Shader
10                              Capability Sampled1D
11               2:             ExtInstImport  "GLSL.std.450"
12                              MemoryModel Logical GLSL450
13                              EntryPoint Fragment 5  "main" 60 72 75 78
14                              ExecutionMode 5 OriginUpperLeft
15               1:             String  "spv.pp.line.frag"
16              13:             String  "header.h"
17                              Source GLSL 140 1  "// OpModuleProcessed auto-map-locations
18// OpModuleProcessed auto-map-bindings
19// OpModuleProcessed client vulkan100
20// OpModuleProcessed target-env vulkan1.0
21// OpModuleProcessed keep-uncalled
22// OpModuleProcessed entry-point main
23#line 1
24#version 140
25#extension GL_GOOGLE_cpp_style_line_directive : require
26
27uniform sampler1D       texSampler1D;
28uniform sampler2D       texSampler2D;
29
30varying float blend;
31varying vec4 u;
32
33in  vec2 coords2D;
34
35#line 0 "header.h"
36float myAbs(float x) {
37    if (x > 0) {
38        return x;
39    }
40    else {
41        return -x;
42    }
43}
44
45#line 22 "spv.pp.line.frag"
46void main()
47{
48    float blendscale = myAbs(1.789);
49    float bias       = 2.0;
50    float coords1D   = 1.789;
51    vec4  color      = vec4(0.0, 0.0, 0.0, 0.0);
52#line 53
53    color += texture    (texSampler1D, coords1D);
54    color += texture    (texSampler1D, coords1D, bias);
55#line 102
56    color += texture        (texSampler2D, coords2D);
57    color += texture        (texSampler2D, coords2D, bias);
58
59    gl_FragColor = mix(color, u, blend * blendscale);
60}
61"
62                              SourceExtension  "GL_GOOGLE_cpp_style_line_directive"
63                              Name 5  "main"
64                              Name 11  "myAbs(f1;"
65                              Name 10  "x"
66                              Name 27  "blendscale"
67                              Name 29  "param"
68                              Name 31  "bias"
69                              Name 33  "coords1D"
70                              Name 36  "color"
71                              Name 41  "texSampler1D"
72                              Name 56  "texSampler2D"
73                              Name 60  "coords2D"
74                              Name 72  "gl_FragColor"
75                              Name 75  "u"
76                              Name 78  "blend"
77                              Decorate 41(texSampler1D) DescriptorSet 0
78                              Decorate 41(texSampler1D) Binding 0
79                              Decorate 56(texSampler2D) DescriptorSet 0
80                              Decorate 56(texSampler2D) Binding 1
81                              Decorate 60(coords2D) Location 2
82                              Decorate 72(gl_FragColor) Location 0
83                              Decorate 75(u) Location 1
84                              Decorate 78(blend) Location 0
85               3:             TypeVoid
86               4:             TypeFunction 3
87               7:             TypeFloat 32
88               8:             TypePointer Function 7(float)
89               9:             TypeFunction 7(float) 8(ptr)
90              15:    7(float) Constant 0
91              16:             TypeBool
92              28:    7(float) Constant 1071971828
93              32:    7(float) Constant 1073741824
94              34:             TypeVector 7(float) 4
95              35:             TypePointer Function 34(fvec4)
96              37:   34(fvec4) ConstantComposite 15 15 15 15
97              38:             TypeImage 7(float) 1D sampled format:Unknown
98              39:             TypeSampledImage 38
99              40:             TypePointer UniformConstant 39
10041(texSampler1D):     40(ptr) Variable UniformConstant
101              53:             TypeImage 7(float) 2D sampled format:Unknown
102              54:             TypeSampledImage 53
103              55:             TypePointer UniformConstant 54
10456(texSampler2D):     55(ptr) Variable UniformConstant
105              58:             TypeVector 7(float) 2
106              59:             TypePointer Input 58(fvec2)
107    60(coords2D):     59(ptr) Variable Input
108              71:             TypePointer Output 34(fvec4)
10972(gl_FragColor):     71(ptr) Variable Output
110              74:             TypePointer Input 34(fvec4)
111           75(u):     74(ptr) Variable Input
112              77:             TypePointer Input 7(float)
113       78(blend):     77(ptr) Variable Input
114                              Line 1 23 11
115         5(main):           3 Function None 4
116               6:             Label
117  27(blendscale):      8(ptr) Variable Function
118       29(param):      8(ptr) Variable Function
119        31(bias):      8(ptr) Variable Function
120    33(coords1D):      8(ptr) Variable Function
121       36(color):     35(ptr) Variable Function
122                              Line 1 25 0
123                              Store 29(param) 28
124              30:    7(float) FunctionCall 11(myAbs(f1;) 29(param)
125                              Store 27(blendscale) 30
126                              Line 1 26 0
127                              Store 31(bias) 32
128                              Line 1 27 0
129                              Store 33(coords1D) 28
130                              Line 1 28 0
131                              Store 36(color) 37
132                              Line 1 54 0
133              42:          39 Load 41(texSampler1D)
134              43:    7(float) Load 33(coords1D)
135              44:   34(fvec4) ImageSampleImplicitLod 42 43
136              45:   34(fvec4) Load 36(color)
137              46:   34(fvec4) FAdd 45 44
138                              Store 36(color) 46
139                              Line 1 55 0
140              47:          39 Load 41(texSampler1D)
141              48:    7(float) Load 33(coords1D)
142              49:    7(float) Load 31(bias)
143              50:   34(fvec4) ImageSampleImplicitLod 47 48 Bias 49
144              51:   34(fvec4) Load 36(color)
145              52:   34(fvec4) FAdd 51 50
146                              Store 36(color) 52
147                              Line 1 103 0
148              57:          54 Load 56(texSampler2D)
149              61:   58(fvec2) Load 60(coords2D)
150              62:   34(fvec4) ImageSampleImplicitLod 57 61
151              63:   34(fvec4) Load 36(color)
152              64:   34(fvec4) FAdd 63 62
153                              Store 36(color) 64
154                              Line 1 104 0
155              65:          54 Load 56(texSampler2D)
156              66:   58(fvec2) Load 60(coords2D)
157              67:    7(float) Load 31(bias)
158              68:   34(fvec4) ImageSampleImplicitLod 65 66 Bias 67
159              69:   34(fvec4) Load 36(color)
160              70:   34(fvec4) FAdd 69 68
161                              Store 36(color) 70
162                              Line 1 106 0
163              73:   34(fvec4) Load 36(color)
164              76:   34(fvec4) Load 75(u)
165              79:    7(float) Load 78(blend)
166              80:    7(float) Load 27(blendscale)
167              81:    7(float) FMul 79 80
168              82:   34(fvec4) CompositeConstruct 81 81 81 81
169              83:   34(fvec4) ExtInst 2(GLSL.std.450) 46(FMix) 73 76 82
170                              Store 72(gl_FragColor) 83
171                              Return
172                              FunctionEnd
173                              Line 13 1 20
174   11(myAbs(f1;):    7(float) Function None 9
175           10(x):      8(ptr) FunctionParameter
176              12:             Label
177                              Line 13 2 0
178              14:    7(float) Load 10(x)
179              17:    16(bool) FOrdGreaterThan 14 15
180                              SelectionMerge 19 None
181                              BranchConditional 17 18 22
182              18:               Label
183                                Line 13 3 0
184              20:    7(float)   Load 10(x)
185                                ReturnValue 20
186              22:               Label
187                                Line 13 6 0
188              23:    7(float)   Load 10(x)
189              24:    7(float)   FNegate 23
190                                ReturnValue 24
191              19:             Label
192                              Unreachable
193                              FunctionEnd
194