HLSL: Wrap the entry-point; need to write 'in' args, and support 'inout' args.

This needs some render testing, but is destined to be part of master.

This also leads to a variety of other simplifications.
 - IO are global symbols, so only need one list of linkage nodes (deferred)
 - no longer need parse-context-wide 'inEntryPoint' state, entry-point is localized
 - several parts of splitting/flattening are now localized
This commit is contained in:
John Kessenich 2017-01-19 15:41:47 -07:00
parent 18adbdbbb8
commit 02467d8d94
171 changed files with 37604 additions and 32679 deletions

View file

@ -2,7 +2,7 @@ hlsl.intrinsics.promote.frag
Shader version: 450
gl_FragCoord origin is upper left
0:? Sequence
0:20 Function Definition: main( (temp structure{temp 4-component vector of float color})
0:20 Function Definition: @main( (temp structure{temp 4-component vector of float color})
0:20 Function Parameters:
0:? Sequence
0:23 Sequence
@ -421,19 +421,22 @@ gl_FragCoord origin is upper left
0:77 0 (const int)
0:77 Construct vec4 (temp 4-component vector of float)
0:77 'r00' (temp float)
0:78 Sequence
0:78 Sequence
0:78 move second child to first child (temp 4-component vector of float)
0:? 'color' (layout(location=0 ) out 4-component vector of float)
0:78 color: direct index for structure (temp 4-component vector of float)
0:78 'ps_output' (temp structure{temp 4-component vector of float color})
0:78 Constant:
0:78 0 (const int)
0:78 Branch: Return
0:78 Branch: Return with expression
0:78 'ps_output' (temp structure{temp 4-component vector of float color})
0:20 Function Definition: main( (temp void)
0:20 Function Parameters:
0:? Sequence
0:20 Sequence
0:20 move second child to first child (temp 4-component vector of float)
0:? 'color' (layout(location=0 ) out 4-component vector of float)
0:20 color: direct index for structure (temp 4-component vector of float)
0:20 Function Call: @main( (temp structure{temp 4-component vector of float color})
0:20 Constant:
0:20 0 (const int)
0:? Linker Objects
0:? 'color' (layout(location=0 ) out 4-component vector of float)
0:? 'g_tTexbfs' (layout(r32f ) uniform samplerBuffer)
0:? 'g_tTex1df4' (uniform texture1D)
0:? 'color' (layout(location=0 ) out 4-component vector of float)
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int i, layout(offset=4 ) uniform uint u, layout(offset=8 ) uniform float f, layout(offset=12 ) uniform bool b, layout(offset=16 ) uniform 2-component vector of int i2, layout(offset=24 ) uniform 2-component vector of uint u2, layout(offset=32 ) uniform 2-component vector of float f2, layout(offset=40 ) uniform 2-component vector of bool b2, layout(offset=48 ) uniform uint upos, layout(offset=52 ) uniform float fpos})
@ -443,7 +446,7 @@ Linked fragment stage:
Shader version: 450
gl_FragCoord origin is upper left
0:? Sequence
0:20 Function Definition: main( (temp structure{temp 4-component vector of float color})
0:20 Function Definition: @main( (temp structure{temp 4-component vector of float color})
0:20 Function Parameters:
0:? Sequence
0:23 Sequence
@ -862,24 +865,27 @@ gl_FragCoord origin is upper left
0:77 0 (const int)
0:77 Construct vec4 (temp 4-component vector of float)
0:77 'r00' (temp float)
0:78 Sequence
0:78 Sequence
0:78 move second child to first child (temp 4-component vector of float)
0:? 'color' (layout(location=0 ) out 4-component vector of float)
0:78 color: direct index for structure (temp 4-component vector of float)
0:78 'ps_output' (temp structure{temp 4-component vector of float color})
0:78 Constant:
0:78 0 (const int)
0:78 Branch: Return
0:78 Branch: Return with expression
0:78 'ps_output' (temp structure{temp 4-component vector of float color})
0:20 Function Definition: main( (temp void)
0:20 Function Parameters:
0:? Sequence
0:20 Sequence
0:20 move second child to first child (temp 4-component vector of float)
0:? 'color' (layout(location=0 ) out 4-component vector of float)
0:20 color: direct index for structure (temp 4-component vector of float)
0:20 Function Call: @main( (temp structure{temp 4-component vector of float color})
0:20 Constant:
0:20 0 (const int)
0:? Linker Objects
0:? 'color' (layout(location=0 ) out 4-component vector of float)
0:? 'g_tTexbfs' (layout(r32f ) uniform samplerBuffer)
0:? 'g_tTex1df4' (uniform texture1D)
0:? 'color' (layout(location=0 ) out 4-component vector of float)
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int i, layout(offset=4 ) uniform uint u, layout(offset=8 ) uniform float f, layout(offset=12 ) uniform bool b, layout(offset=16 ) uniform 2-component vector of int i2, layout(offset=24 ) uniform 2-component vector of uint u2, layout(offset=32 ) uniform 2-component vector of float f2, layout(offset=40 ) uniform 2-component vector of bool b2, layout(offset=48 ) uniform uint upos, layout(offset=52 ) uniform float fpos})
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 320
// Id's are bound by 325
Capability Shader
Capability Sampled1D
@ -887,427 +893,434 @@ gl_FragCoord origin is upper left
Capability ImageQuery
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 316
EntryPoint Fragment 4 "main" 322
ExecutionMode 4 OriginUpperLeft
Name 4 "main"
Name 8 "r00"
Name 14 "$Global"
MemberName 14($Global) 0 "i"
MemberName 14($Global) 1 "u"
MemberName 14($Global) 2 "f"
MemberName 14($Global) 3 "b"
MemberName 14($Global) 4 "i2"
MemberName 14($Global) 5 "u2"
MemberName 14($Global) 6 "f2"
MemberName 14($Global) 7 "b2"
MemberName 14($Global) 8 "upos"
MemberName 14($Global) 9 "fpos"
Name 16 ""
Name 33 "r01"
Name 44 "r02"
Name 54 "r03"
Name 61 "r04"
Name 69 "r10"
Name 86 "r11"
Name 97 "r12"
Name 109 "r13"
Name 116 "r14"
Name 123 "r20"
Name 133 "r21"
Name 145 "r22"
Name 157 "r30"
Name 166 "r31"
Name 175 "r32"
Name 184 "r33"
Name 192 "r34"
Name 200 "r40"
Name 211 "r41"
Name 224 "r42"
Name 238 "r43"
Name 250 "r50"
Name 254 "g_tTexbfs"
Name 264 "r51"
Name 273 "sizeQueryTemp"
Name 276 "g_tTex1df4"
Name 279 "WidthI"
Name 282 "sizeQueryTemp"
Name 288 "NumberOfLevelsU"
Name 291 "sizeQueryTemp"
Name 294 "WidthU"
Name 296 "NumberOfLevelsI"
Name 300 "sizeQueryTemp"
Name 308 "PS_OUTPUT"
MemberName 308(PS_OUTPUT) 0 "color"
Name 310 "ps_output"
Name 316 "color"
MemberDecorate 14($Global) 0 Offset 0
MemberDecorate 14($Global) 1 Offset 4
MemberDecorate 14($Global) 2 Offset 8
MemberDecorate 14($Global) 3 Offset 12
MemberDecorate 14($Global) 4 Offset 16
MemberDecorate 14($Global) 5 Offset 24
MemberDecorate 14($Global) 6 Offset 32
MemberDecorate 14($Global) 7 Offset 40
MemberDecorate 14($Global) 8 Offset 48
MemberDecorate 14($Global) 9 Offset 52
Decorate 14($Global) Block
Decorate 16 DescriptorSet 0
Decorate 254(g_tTexbfs) DescriptorSet 0
Decorate 276(g_tTex1df4) DescriptorSet 0
Decorate 316(color) Location 0
Name 8 "PS_OUTPUT"
MemberName 8(PS_OUTPUT) 0 "color"
Name 10 "@main("
Name 13 "r00"
Name 19 "$Global"
MemberName 19($Global) 0 "i"
MemberName 19($Global) 1 "u"
MemberName 19($Global) 2 "f"
MemberName 19($Global) 3 "b"
MemberName 19($Global) 4 "i2"
MemberName 19($Global) 5 "u2"
MemberName 19($Global) 6 "f2"
MemberName 19($Global) 7 "b2"
MemberName 19($Global) 8 "upos"
MemberName 19($Global) 9 "fpos"
Name 21 ""
Name 38 "r01"
Name 49 "r02"
Name 59 "r03"
Name 66 "r04"
Name 74 "r10"
Name 91 "r11"
Name 102 "r12"
Name 114 "r13"
Name 121 "r14"
Name 128 "r20"
Name 138 "r21"
Name 150 "r22"
Name 162 "r30"
Name 171 "r31"
Name 180 "r32"
Name 189 "r33"
Name 197 "r34"
Name 205 "r40"
Name 216 "r41"
Name 229 "r42"
Name 243 "r43"
Name 255 "r50"
Name 259 "g_tTexbfs"
Name 268 "r51"
Name 277 "sizeQueryTemp"
Name 280 "g_tTex1df4"
Name 283 "WidthI"
Name 286 "sizeQueryTemp"
Name 292 "NumberOfLevelsU"
Name 295 "sizeQueryTemp"
Name 298 "WidthU"
Name 300 "NumberOfLevelsI"
Name 304 "sizeQueryTemp"
Name 313 "ps_output"
Name 322 "color"
MemberDecorate 19($Global) 0 Offset 0
MemberDecorate 19($Global) 1 Offset 4
MemberDecorate 19($Global) 2 Offset 8
MemberDecorate 19($Global) 3 Offset 12
MemberDecorate 19($Global) 4 Offset 16
MemberDecorate 19($Global) 5 Offset 24
MemberDecorate 19($Global) 6 Offset 32
MemberDecorate 19($Global) 7 Offset 40
MemberDecorate 19($Global) 8 Offset 48
MemberDecorate 19($Global) 9 Offset 52
Decorate 19($Global) Block
Decorate 21 DescriptorSet 0
Decorate 259(g_tTexbfs) DescriptorSet 0
Decorate 280(g_tTex1df4) DescriptorSet 0
Decorate 322(color) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypePointer Function 6(float)
9: TypeInt 32 1
10: TypeInt 32 0
11: TypeVector 9(int) 2
12: TypeVector 10(int) 2
13: TypeVector 6(float) 2
14($Global): TypeStruct 9(int) 10(int) 6(float) 10(int) 11(ivec2) 12(ivec2) 13(fvec2) 12(ivec2) 10(int) 6(float)
15: TypePointer Uniform 14($Global)
16: 15(ptr) Variable Uniform
17: 9(int) Constant 3
18: TypePointer Uniform 10(int)
21: TypeBool
22: 10(int) Constant 0
24: 6(float) Constant 0
25: 6(float) Constant 1065353216
27: 9(int) Constant 2
28: TypePointer Uniform 6(float)
32: TypePointer Function 10(int)
37: 10(int) Constant 1
39: 9(int) Constant 1
43: TypePointer Function 9(int)
48: 9(int) Constant 0
50: TypePointer Uniform 9(int)
68: TypePointer Function 13(fvec2)
70: 9(int) Constant 7
71: TypePointer Uniform 12(ivec2)
74: TypeVector 21(bool) 2
75: 12(ivec2) ConstantComposite 22 22
77: 13(fvec2) ConstantComposite 24 24
78: 13(fvec2) ConstantComposite 25 25
80: 9(int) Constant 6
81: TypePointer Uniform 13(fvec2)
85: TypePointer Function 12(ivec2)
90: 12(ivec2) ConstantComposite 37 37
92: 9(int) Constant 5
96: TypePointer Function 11(ivec2)
101: 11(ivec2) ConstantComposite 48 48
102: 11(ivec2) ConstantComposite 39 39
104: 9(int) Constant 4
105: TypePointer Uniform 11(ivec2)
251: TypeImage 6(float) Buffer sampled format:R32f
252: TypeSampledImage 251
253: TypePointer UniformConstant 252
254(g_tTexbfs): 253(ptr) Variable UniformConstant
256: 9(int) Constant 8
261: TypeVector 6(float) 4
266: 9(int) Constant 9
274: TypeImage 6(float) 1D sampled format:Unknown
275: TypePointer UniformConstant 274
276(g_tTex1df4): 275(ptr) Variable UniformConstant
284: 10(int) Constant 6
308(PS_OUTPUT): TypeStruct 261(fvec4)
309: TypePointer Function 308(PS_OUTPUT)
313: TypePointer Function 261(fvec4)
315: TypePointer Output 261(fvec4)
316(color): 315(ptr) Variable Output
7: TypeVector 6(float) 4
8(PS_OUTPUT): TypeStruct 7(fvec4)
9: TypeFunction 8(PS_OUTPUT)
12: TypePointer Function 6(float)
14: TypeInt 32 1
15: TypeInt 32 0
16: TypeVector 14(int) 2
17: TypeVector 15(int) 2
18: TypeVector 6(float) 2
19($Global): TypeStruct 14(int) 15(int) 6(float) 15(int) 16(ivec2) 17(ivec2) 18(fvec2) 17(ivec2) 15(int) 6(float)
20: TypePointer Uniform 19($Global)
21: 20(ptr) Variable Uniform
22: 14(int) Constant 3
23: TypePointer Uniform 15(int)
26: TypeBool
27: 15(int) Constant 0
29: 6(float) Constant 0
30: 6(float) Constant 1065353216
32: 14(int) Constant 2
33: TypePointer Uniform 6(float)
37: TypePointer Function 15(int)
42: 15(int) Constant 1
44: 14(int) Constant 1
48: TypePointer Function 14(int)
53: 14(int) Constant 0
55: TypePointer Uniform 14(int)
73: TypePointer Function 18(fvec2)
75: 14(int) Constant 7
76: TypePointer Uniform 17(ivec2)
79: TypeVector 26(bool) 2
80: 17(ivec2) ConstantComposite 27 27
82: 18(fvec2) ConstantComposite 29 29
83: 18(fvec2) ConstantComposite 30 30
85: 14(int) Constant 6
86: TypePointer Uniform 18(fvec2)
90: TypePointer Function 17(ivec2)
95: 17(ivec2) ConstantComposite 42 42
97: 14(int) Constant 5
101: TypePointer Function 16(ivec2)
106: 16(ivec2) ConstantComposite 53 53
107: 16(ivec2) ConstantComposite 44 44
109: 14(int) Constant 4
110: TypePointer Uniform 16(ivec2)
256: TypeImage 6(float) Buffer sampled format:R32f
257: TypeSampledImage 256
258: TypePointer UniformConstant 257
259(g_tTexbfs): 258(ptr) Variable UniformConstant
261: 14(int) Constant 8
270: 14(int) Constant 9
278: TypeImage 6(float) 1D sampled format:Unknown
279: TypePointer UniformConstant 278
280(g_tTex1df4): 279(ptr) Variable UniformConstant
288: 15(int) Constant 6
312: TypePointer Function 8(PS_OUTPUT)
316: TypePointer Function 7(fvec4)
321: TypePointer Output 7(fvec4)
322(color): 321(ptr) Variable Output
4(main): 2 Function None 3
5: Label
8(r00): 7(ptr) Variable Function
33(r01): 32(ptr) Variable Function
44(r02): 43(ptr) Variable Function
54(r03): 7(ptr) Variable Function
61(r04): 7(ptr) Variable Function
69(r10): 68(ptr) Variable Function
86(r11): 85(ptr) Variable Function
97(r12): 96(ptr) Variable Function
109(r13): 68(ptr) Variable Function
116(r14): 68(ptr) Variable Function
123(r20): 68(ptr) Variable Function
133(r21): 85(ptr) Variable Function
145(r22): 68(ptr) Variable Function
157(r30): 68(ptr) Variable Function
166(r31): 85(ptr) Variable Function
175(r32): 96(ptr) Variable Function
184(r33): 68(ptr) Variable Function
192(r34): 68(ptr) Variable Function
200(r40): 68(ptr) Variable Function
211(r41): 85(ptr) Variable Function
224(r42): 68(ptr) Variable Function
238(r43): 96(ptr) Variable Function
250(r50): 7(ptr) Variable Function
264(r51): 7(ptr) Variable Function
273(sizeQueryTemp): 32(ptr) Variable Function
279(WidthI): 43(ptr) Variable Function
282(sizeQueryTemp): 32(ptr) Variable Function
288(NumberOfLevelsU): 32(ptr) Variable Function
291(sizeQueryTemp): 32(ptr) Variable Function
294(WidthU): 32(ptr) Variable Function
296(NumberOfLevelsI): 43(ptr) Variable Function
300(sizeQueryTemp): 32(ptr) Variable Function
310(ps_output): 309(ptr) Variable Function
19: 18(ptr) AccessChain 16 17
20: 10(int) Load 19
23: 21(bool) INotEqual 20 22
26: 6(float) Select 23 25 24
29: 28(ptr) AccessChain 16 27
30: 6(float) Load 29
31: 6(float) ExtInst 1(GLSL.std.450) 40(FMax) 26 30
Store 8(r00) 31
34: 18(ptr) AccessChain 16 17
35: 10(int) Load 34
36: 21(bool) INotEqual 35 22
38: 10(int) Select 36 37 22
40: 18(ptr) AccessChain 16 39
41: 10(int) Load 40
42: 10(int) ExtInst 1(GLSL.std.450) 41(UMax) 38 41
Store 33(r01) 42
45: 18(ptr) AccessChain 16 17
46: 10(int) Load 45
47: 21(bool) INotEqual 46 22
49: 9(int) Select 47 39 48
51: 50(ptr) AccessChain 16 48
52: 9(int) Load 51
53: 9(int) ExtInst 1(GLSL.std.450) 42(SMax) 49 52
Store 44(r02) 53
55: 50(ptr) AccessChain 16 48
56: 9(int) Load 55
57: 6(float) ConvertSToF 56
58: 28(ptr) AccessChain 16 27
59: 6(float) Load 58
60: 6(float) ExtInst 1(GLSL.std.450) 40(FMax) 57 59
Store 54(r03) 60
62: 18(ptr) AccessChain 16 39
63: 10(int) Load 62
64: 6(float) ConvertUToF 63
65: 28(ptr) AccessChain 16 27
66: 6(float) Load 65
67: 6(float) ExtInst 1(GLSL.std.450) 40(FMax) 64 66
Store 61(r04) 67
72: 71(ptr) AccessChain 16 70
73: 12(ivec2) Load 72
76: 74(bvec2) INotEqual 73 75
79: 13(fvec2) Select 76 78 77
82: 81(ptr) AccessChain 16 80
83: 13(fvec2) Load 82
84: 13(fvec2) ExtInst 1(GLSL.std.450) 40(FMax) 79 83
Store 69(r10) 84
87: 71(ptr) AccessChain 16 70
88: 12(ivec2) Load 87
89: 74(bvec2) INotEqual 88 75
91: 12(ivec2) Select 89 90 75
93: 71(ptr) AccessChain 16 92
94: 12(ivec2) Load 93
95: 12(ivec2) ExtInst 1(GLSL.std.450) 41(UMax) 91 94
Store 86(r11) 95
98: 71(ptr) AccessChain 16 70
99: 12(ivec2) Load 98
100: 74(bvec2) INotEqual 99 75
103: 11(ivec2) Select 100 102 101
106: 105(ptr) AccessChain 16 104
107: 11(ivec2) Load 106
108: 11(ivec2) ExtInst 1(GLSL.std.450) 42(SMax) 103 107
Store 97(r12) 108
110: 105(ptr) AccessChain 16 104
111: 11(ivec2) Load 110
112: 13(fvec2) ConvertSToF 111
113: 81(ptr) AccessChain 16 80
114: 13(fvec2) Load 113
115: 13(fvec2) ExtInst 1(GLSL.std.450) 40(FMax) 112 114
Store 109(r13) 115
117: 71(ptr) AccessChain 16 92
118: 12(ivec2) Load 117
119: 13(fvec2) ConvertUToF 118
120: 81(ptr) AccessChain 16 80
121: 13(fvec2) Load 120
122: 13(fvec2) ExtInst 1(GLSL.std.450) 40(FMax) 119 121
Store 116(r14) 122
124: 105(ptr) AccessChain 16 104
125: 11(ivec2) Load 124
126: 13(fvec2) ConvertSToF 125
127: 71(ptr) AccessChain 16 92
128: 12(ivec2) Load 127
129: 13(fvec2) ConvertUToF 128
130: 81(ptr) AccessChain 16 80
131: 13(fvec2) Load 130
132: 13(fvec2) ExtInst 1(GLSL.std.450) 43(FClamp) 126 129 131
Store 123(r20) 132
134: 71(ptr) AccessChain 16 70
135: 12(ivec2) Load 134
136: 74(bvec2) INotEqual 135 75
137: 12(ivec2) Select 136 90 75
138: 71(ptr) AccessChain 16 92
139: 12(ivec2) Load 138
140: 71(ptr) AccessChain 16 70
141: 12(ivec2) Load 140
142: 74(bvec2) INotEqual 141 75
143: 12(ivec2) Select 142 90 75
144: 12(ivec2) ExtInst 1(GLSL.std.450) 44(UClamp) 137 139 143
Store 133(r21) 144
146: 71(ptr) AccessChain 16 70
147: 12(ivec2) Load 146
148: 74(bvec2) INotEqual 147 75
149: 13(fvec2) Select 148 78 77
150: 81(ptr) AccessChain 16 80
151: 13(fvec2) Load 150
152: 71(ptr) AccessChain 16 70
153: 12(ivec2) Load 152
154: 74(bvec2) INotEqual 153 75
155: 13(fvec2) Select 154 78 77
156: 13(fvec2) ExtInst 1(GLSL.std.450) 43(FClamp) 149 151 155
Store 145(r22) 156
158: 18(ptr) AccessChain 16 17
159: 10(int) Load 158
160: 21(bool) INotEqual 159 22
161: 6(float) Select 160 25 24
162: 13(fvec2) CompositeConstruct 161 161
163: 81(ptr) AccessChain 16 80
164: 13(fvec2) Load 163
165: 13(fvec2) ExtInst 1(GLSL.std.450) 40(FMax) 162 164
Store 157(r30) 165
167: 18(ptr) AccessChain 16 17
168: 10(int) Load 167
169: 21(bool) INotEqual 168 22
170: 10(int) Select 169 37 22
171: 12(ivec2) CompositeConstruct 170 170
172: 71(ptr) AccessChain 16 92
173: 12(ivec2) Load 172
174: 12(ivec2) ExtInst 1(GLSL.std.450) 41(UMax) 171 173
Store 166(r31) 174
176: 18(ptr) AccessChain 16 17
177: 10(int) Load 176
178: 21(bool) INotEqual 177 22
179: 9(int) Select 178 39 48
180: 11(ivec2) CompositeConstruct 179 179
181: 105(ptr) AccessChain 16 104
182: 11(ivec2) Load 181
183: 11(ivec2) ExtInst 1(GLSL.std.450) 42(SMax) 180 182
Store 175(r32) 183
185: 50(ptr) AccessChain 16 48
186: 9(int) Load 185
187: 6(float) ConvertSToF 186
188: 13(fvec2) CompositeConstruct 187 187
189: 81(ptr) AccessChain 16 80
190: 13(fvec2) Load 189
191: 13(fvec2) ExtInst 1(GLSL.std.450) 40(FMax) 188 190
Store 184(r33) 191
193: 18(ptr) AccessChain 16 39
194: 10(int) Load 193
195: 6(float) ConvertUToF 194
196: 13(fvec2) CompositeConstruct 195 195
197: 81(ptr) AccessChain 16 80
198: 13(fvec2) Load 197
199: 13(fvec2) ExtInst 1(GLSL.std.450) 40(FMax) 196 198
Store 192(r34) 199
201: 50(ptr) AccessChain 16 48
202: 9(int) Load 201
203: 6(float) ConvertSToF 202
204: 13(fvec2) CompositeConstruct 203 203
205: 71(ptr) AccessChain 16 92
206: 12(ivec2) Load 205
207: 13(fvec2) ConvertUToF 206
208: 81(ptr) AccessChain 16 80
209: 13(fvec2) Load 208
210: 13(fvec2) ExtInst 1(GLSL.std.450) 43(FClamp) 204 207 209
Store 200(r40) 210
212: 71(ptr) AccessChain 16 70
213: 12(ivec2) Load 212
214: 74(bvec2) INotEqual 213 75
215: 12(ivec2) Select 214 90 75
216: 18(ptr) AccessChain 16 39
217: 10(int) Load 216
218: 12(ivec2) CompositeConstruct 217 217
219: 71(ptr) AccessChain 16 70
220: 12(ivec2) Load 219
221: 74(bvec2) INotEqual 220 75
222: 12(ivec2) Select 221 90 75
223: 12(ivec2) ExtInst 1(GLSL.std.450) 44(UClamp) 215 218 222
Store 211(r41) 223
225: 71(ptr) AccessChain 16 70
226: 12(ivec2) Load 225
227: 74(bvec2) INotEqual 226 75
228: 13(fvec2) Select 227 78 77
229: 28(ptr) AccessChain 16 27
230: 6(float) Load 229
231: 13(fvec2) CompositeConstruct 230 230
232: 18(ptr) AccessChain 16 17
233: 10(int) Load 232
234: 21(bool) INotEqual 233 22
235: 6(float) Select 234 25 24
236: 13(fvec2) CompositeConstruct 235 235
237: 13(fvec2) ExtInst 1(GLSL.std.450) 43(FClamp) 228 231 236
Store 224(r42) 237
239: 50(ptr) AccessChain 16 48
240: 9(int) Load 239
241: 10(int) Bitcast 240
242: 12(ivec2) CompositeConstruct 241 241
243: 105(ptr) AccessChain 16 104
244: 11(ivec2) Load 243
245: 12(ivec2) Bitcast 244
246: 71(ptr) AccessChain 16 92
247: 12(ivec2) Load 246
248: 12(ivec2) ExtInst 1(GLSL.std.450) 44(UClamp) 242 245 247
249: 11(ivec2) Bitcast 248
Store 238(r43) 249
255: 252 Load 254(g_tTexbfs)
257: 18(ptr) AccessChain 16 256
258: 10(int) Load 257
259: 9(int) Bitcast 258
260: 251 Image 255
262: 261(fvec4) ImageFetch 260 259
263: 6(float) CompositeExtract 262 0
Store 250(r50) 263
265: 252 Load 254(g_tTexbfs)
267: 28(ptr) AccessChain 16 266
268: 6(float) Load 267
269: 9(int) ConvertFToS 268
270: 251 Image 265
271: 261(fvec4) ImageFetch 270 269
272: 6(float) CompositeExtract 271 0
Store 264(r51) 272
277: 274 Load 276(g_tTex1df4)
278: 9(int) ImageQuerySize 277
Store 273(sizeQueryTemp) 278
280: 10(int) Load 273(sizeQueryTemp)
281: 9(int) Bitcast 280
Store 279(WidthI) 281
283: 274 Load 276(g_tTex1df4)
285: 9(int) ImageQuerySizeLod 283 284
Store 282(sizeQueryTemp) 285
286: 10(int) Load 282(sizeQueryTemp)
287: 9(int) Bitcast 286
Store 279(WidthI) 287
289: 274 Load 276(g_tTex1df4)
290: 9(int) ImageQueryLevels 289
Store 288(NumberOfLevelsU) 290
292: 274 Load 276(g_tTex1df4)
293: 9(int) ImageQuerySizeLod 292 284
Store 291(sizeQueryTemp) 293
295: 10(int) Load 291(sizeQueryTemp)
Store 294(WidthU) 295
297: 274 Load 276(g_tTex1df4)
298: 9(int) ImageQueryLevels 297
299: 9(int) Bitcast 298
Store 296(NumberOfLevelsI) 299
301: 274 Load 276(g_tTex1df4)
302: 9(int) ImageQuerySizeLod 301 284
Store 300(sizeQueryTemp) 302
303: 10(int) Load 300(sizeQueryTemp)
304: 9(int) Bitcast 303
Store 279(WidthI) 304
305: 274 Load 276(g_tTex1df4)
306: 9(int) ImageQueryLevels 305
307: 9(int) Bitcast 306
Store 296(NumberOfLevelsI) 307
311: 6(float) Load 8(r00)
312: 261(fvec4) CompositeConstruct 311 311 311 311
314: 313(ptr) AccessChain 310(ps_output) 48
Store 314 312
317: 313(ptr) AccessChain 310(ps_output) 48
318: 261(fvec4) Load 317
Store 316(color) 318
323:8(PS_OUTPUT) FunctionCall 10(@main()
324: 7(fvec4) CompositeExtract 323 0
Store 322(color) 324
Return
FunctionEnd
10(@main():8(PS_OUTPUT) Function None 9
11: Label
13(r00): 12(ptr) Variable Function
38(r01): 37(ptr) Variable Function
49(r02): 48(ptr) Variable Function
59(r03): 12(ptr) Variable Function
66(r04): 12(ptr) Variable Function
74(r10): 73(ptr) Variable Function
91(r11): 90(ptr) Variable Function
102(r12): 101(ptr) Variable Function
114(r13): 73(ptr) Variable Function
121(r14): 73(ptr) Variable Function
128(r20): 73(ptr) Variable Function
138(r21): 90(ptr) Variable Function
150(r22): 73(ptr) Variable Function
162(r30): 73(ptr) Variable Function
171(r31): 90(ptr) Variable Function
180(r32): 101(ptr) Variable Function
189(r33): 73(ptr) Variable Function
197(r34): 73(ptr) Variable Function
205(r40): 73(ptr) Variable Function
216(r41): 90(ptr) Variable Function
229(r42): 73(ptr) Variable Function
243(r43): 101(ptr) Variable Function
255(r50): 12(ptr) Variable Function
268(r51): 12(ptr) Variable Function
277(sizeQueryTemp): 37(ptr) Variable Function
283(WidthI): 48(ptr) Variable Function
286(sizeQueryTemp): 37(ptr) Variable Function
292(NumberOfLevelsU): 37(ptr) Variable Function
295(sizeQueryTemp): 37(ptr) Variable Function
298(WidthU): 37(ptr) Variable Function
300(NumberOfLevelsI): 48(ptr) Variable Function
304(sizeQueryTemp): 37(ptr) Variable Function
313(ps_output): 312(ptr) Variable Function
24: 23(ptr) AccessChain 21 22
25: 15(int) Load 24
28: 26(bool) INotEqual 25 27
31: 6(float) Select 28 30 29
34: 33(ptr) AccessChain 21 32
35: 6(float) Load 34
36: 6(float) ExtInst 1(GLSL.std.450) 40(FMax) 31 35
Store 13(r00) 36
39: 23(ptr) AccessChain 21 22
40: 15(int) Load 39
41: 26(bool) INotEqual 40 27
43: 15(int) Select 41 42 27
45: 23(ptr) AccessChain 21 44
46: 15(int) Load 45
47: 15(int) ExtInst 1(GLSL.std.450) 41(UMax) 43 46
Store 38(r01) 47
50: 23(ptr) AccessChain 21 22
51: 15(int) Load 50
52: 26(bool) INotEqual 51 27
54: 14(int) Select 52 44 53
56: 55(ptr) AccessChain 21 53
57: 14(int) Load 56
58: 14(int) ExtInst 1(GLSL.std.450) 42(SMax) 54 57
Store 49(r02) 58
60: 55(ptr) AccessChain 21 53
61: 14(int) Load 60
62: 6(float) ConvertSToF 61
63: 33(ptr) AccessChain 21 32
64: 6(float) Load 63
65: 6(float) ExtInst 1(GLSL.std.450) 40(FMax) 62 64
Store 59(r03) 65
67: 23(ptr) AccessChain 21 44
68: 15(int) Load 67
69: 6(float) ConvertUToF 68
70: 33(ptr) AccessChain 21 32
71: 6(float) Load 70
72: 6(float) ExtInst 1(GLSL.std.450) 40(FMax) 69 71
Store 66(r04) 72
77: 76(ptr) AccessChain 21 75
78: 17(ivec2) Load 77
81: 79(bvec2) INotEqual 78 80
84: 18(fvec2) Select 81 83 82
87: 86(ptr) AccessChain 21 85
88: 18(fvec2) Load 87
89: 18(fvec2) ExtInst 1(GLSL.std.450) 40(FMax) 84 88
Store 74(r10) 89
92: 76(ptr) AccessChain 21 75
93: 17(ivec2) Load 92
94: 79(bvec2) INotEqual 93 80
96: 17(ivec2) Select 94 95 80
98: 76(ptr) AccessChain 21 97
99: 17(ivec2) Load 98
100: 17(ivec2) ExtInst 1(GLSL.std.450) 41(UMax) 96 99
Store 91(r11) 100
103: 76(ptr) AccessChain 21 75
104: 17(ivec2) Load 103
105: 79(bvec2) INotEqual 104 80
108: 16(ivec2) Select 105 107 106
111: 110(ptr) AccessChain 21 109
112: 16(ivec2) Load 111
113: 16(ivec2) ExtInst 1(GLSL.std.450) 42(SMax) 108 112
Store 102(r12) 113
115: 110(ptr) AccessChain 21 109
116: 16(ivec2) Load 115
117: 18(fvec2) ConvertSToF 116
118: 86(ptr) AccessChain 21 85
119: 18(fvec2) Load 118
120: 18(fvec2) ExtInst 1(GLSL.std.450) 40(FMax) 117 119
Store 114(r13) 120
122: 76(ptr) AccessChain 21 97
123: 17(ivec2) Load 122
124: 18(fvec2) ConvertUToF 123
125: 86(ptr) AccessChain 21 85
126: 18(fvec2) Load 125
127: 18(fvec2) ExtInst 1(GLSL.std.450) 40(FMax) 124 126
Store 121(r14) 127
129: 110(ptr) AccessChain 21 109
130: 16(ivec2) Load 129
131: 18(fvec2) ConvertSToF 130
132: 76(ptr) AccessChain 21 97
133: 17(ivec2) Load 132
134: 18(fvec2) ConvertUToF 133
135: 86(ptr) AccessChain 21 85
136: 18(fvec2) Load 135
137: 18(fvec2) ExtInst 1(GLSL.std.450) 43(FClamp) 131 134 136
Store 128(r20) 137
139: 76(ptr) AccessChain 21 75
140: 17(ivec2) Load 139
141: 79(bvec2) INotEqual 140 80
142: 17(ivec2) Select 141 95 80
143: 76(ptr) AccessChain 21 97
144: 17(ivec2) Load 143
145: 76(ptr) AccessChain 21 75
146: 17(ivec2) Load 145
147: 79(bvec2) INotEqual 146 80
148: 17(ivec2) Select 147 95 80
149: 17(ivec2) ExtInst 1(GLSL.std.450) 44(UClamp) 142 144 148
Store 138(r21) 149
151: 76(ptr) AccessChain 21 75
152: 17(ivec2) Load 151
153: 79(bvec2) INotEqual 152 80
154: 18(fvec2) Select 153 83 82
155: 86(ptr) AccessChain 21 85
156: 18(fvec2) Load 155
157: 76(ptr) AccessChain 21 75
158: 17(ivec2) Load 157
159: 79(bvec2) INotEqual 158 80
160: 18(fvec2) Select 159 83 82
161: 18(fvec2) ExtInst 1(GLSL.std.450) 43(FClamp) 154 156 160
Store 150(r22) 161
163: 23(ptr) AccessChain 21 22
164: 15(int) Load 163
165: 26(bool) INotEqual 164 27
166: 6(float) Select 165 30 29
167: 18(fvec2) CompositeConstruct 166 166
168: 86(ptr) AccessChain 21 85
169: 18(fvec2) Load 168
170: 18(fvec2) ExtInst 1(GLSL.std.450) 40(FMax) 167 169
Store 162(r30) 170
172: 23(ptr) AccessChain 21 22
173: 15(int) Load 172
174: 26(bool) INotEqual 173 27
175: 15(int) Select 174 42 27
176: 17(ivec2) CompositeConstruct 175 175
177: 76(ptr) AccessChain 21 97
178: 17(ivec2) Load 177
179: 17(ivec2) ExtInst 1(GLSL.std.450) 41(UMax) 176 178
Store 171(r31) 179
181: 23(ptr) AccessChain 21 22
182: 15(int) Load 181
183: 26(bool) INotEqual 182 27
184: 14(int) Select 183 44 53
185: 16(ivec2) CompositeConstruct 184 184
186: 110(ptr) AccessChain 21 109
187: 16(ivec2) Load 186
188: 16(ivec2) ExtInst 1(GLSL.std.450) 42(SMax) 185 187
Store 180(r32) 188
190: 55(ptr) AccessChain 21 53
191: 14(int) Load 190
192: 6(float) ConvertSToF 191
193: 18(fvec2) CompositeConstruct 192 192
194: 86(ptr) AccessChain 21 85
195: 18(fvec2) Load 194
196: 18(fvec2) ExtInst 1(GLSL.std.450) 40(FMax) 193 195
Store 189(r33) 196
198: 23(ptr) AccessChain 21 44
199: 15(int) Load 198
200: 6(float) ConvertUToF 199
201: 18(fvec2) CompositeConstruct 200 200
202: 86(ptr) AccessChain 21 85
203: 18(fvec2) Load 202
204: 18(fvec2) ExtInst 1(GLSL.std.450) 40(FMax) 201 203
Store 197(r34) 204
206: 55(ptr) AccessChain 21 53
207: 14(int) Load 206
208: 6(float) ConvertSToF 207
209: 18(fvec2) CompositeConstruct 208 208
210: 76(ptr) AccessChain 21 97
211: 17(ivec2) Load 210
212: 18(fvec2) ConvertUToF 211
213: 86(ptr) AccessChain 21 85
214: 18(fvec2) Load 213
215: 18(fvec2) ExtInst 1(GLSL.std.450) 43(FClamp) 209 212 214
Store 205(r40) 215
217: 76(ptr) AccessChain 21 75
218: 17(ivec2) Load 217
219: 79(bvec2) INotEqual 218 80
220: 17(ivec2) Select 219 95 80
221: 23(ptr) AccessChain 21 44
222: 15(int) Load 221
223: 17(ivec2) CompositeConstruct 222 222
224: 76(ptr) AccessChain 21 75
225: 17(ivec2) Load 224
226: 79(bvec2) INotEqual 225 80
227: 17(ivec2) Select 226 95 80
228: 17(ivec2) ExtInst 1(GLSL.std.450) 44(UClamp) 220 223 227
Store 216(r41) 228
230: 76(ptr) AccessChain 21 75
231: 17(ivec2) Load 230
232: 79(bvec2) INotEqual 231 80
233: 18(fvec2) Select 232 83 82
234: 33(ptr) AccessChain 21 32
235: 6(float) Load 234
236: 18(fvec2) CompositeConstruct 235 235
237: 23(ptr) AccessChain 21 22
238: 15(int) Load 237
239: 26(bool) INotEqual 238 27
240: 6(float) Select 239 30 29
241: 18(fvec2) CompositeConstruct 240 240
242: 18(fvec2) ExtInst 1(GLSL.std.450) 43(FClamp) 233 236 241
Store 229(r42) 242
244: 55(ptr) AccessChain 21 53
245: 14(int) Load 244
246: 15(int) Bitcast 245
247: 17(ivec2) CompositeConstruct 246 246
248: 110(ptr) AccessChain 21 109
249: 16(ivec2) Load 248
250: 17(ivec2) Bitcast 249
251: 76(ptr) AccessChain 21 97
252: 17(ivec2) Load 251
253: 17(ivec2) ExtInst 1(GLSL.std.450) 44(UClamp) 247 250 252
254: 16(ivec2) Bitcast 253
Store 243(r43) 254
260: 257 Load 259(g_tTexbfs)
262: 23(ptr) AccessChain 21 261
263: 15(int) Load 262
264: 14(int) Bitcast 263
265: 256 Image 260
266: 7(fvec4) ImageFetch 265 264
267: 6(float) CompositeExtract 266 0
Store 255(r50) 267
269: 257 Load 259(g_tTexbfs)
271: 33(ptr) AccessChain 21 270
272: 6(float) Load 271
273: 14(int) ConvertFToS 272
274: 256 Image 269
275: 7(fvec4) ImageFetch 274 273
276: 6(float) CompositeExtract 275 0
Store 268(r51) 276
281: 278 Load 280(g_tTex1df4)
282: 14(int) ImageQuerySize 281
Store 277(sizeQueryTemp) 282
284: 15(int) Load 277(sizeQueryTemp)
285: 14(int) Bitcast 284
Store 283(WidthI) 285
287: 278 Load 280(g_tTex1df4)
289: 14(int) ImageQuerySizeLod 287 288
Store 286(sizeQueryTemp) 289
290: 15(int) Load 286(sizeQueryTemp)
291: 14(int) Bitcast 290
Store 283(WidthI) 291
293: 278 Load 280(g_tTex1df4)
294: 14(int) ImageQueryLevels 293
Store 292(NumberOfLevelsU) 294
296: 278 Load 280(g_tTex1df4)
297: 14(int) ImageQuerySizeLod 296 288
Store 295(sizeQueryTemp) 297
299: 15(int) Load 295(sizeQueryTemp)
Store 298(WidthU) 299
301: 278 Load 280(g_tTex1df4)
302: 14(int) ImageQueryLevels 301
303: 14(int) Bitcast 302
Store 300(NumberOfLevelsI) 303
305: 278 Load 280(g_tTex1df4)
306: 14(int) ImageQuerySizeLod 305 288
Store 304(sizeQueryTemp) 306
307: 15(int) Load 304(sizeQueryTemp)
308: 14(int) Bitcast 307
Store 283(WidthI) 308
309: 278 Load 280(g_tTex1df4)
310: 14(int) ImageQueryLevels 309
311: 14(int) Bitcast 310
Store 300(NumberOfLevelsI) 311
314: 6(float) Load 13(r00)
315: 7(fvec4) CompositeConstruct 314 314 314 314
317: 316(ptr) AccessChain 313(ps_output) 53
Store 317 315
318:8(PS_OUTPUT) Load 313(ps_output)
ReturnValue 318
FunctionEnd