SPV: Implement OpImage functionality (emit before query).

This commit is contained in:
John Kessenich
2015-12-08 19:32:47 -07:00
parent 45457bcddb
commit 33661450c7
7 changed files with 594 additions and 559 deletions

View File

@@ -7,7 +7,7 @@ Linked fragment stage:
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 211
// Id's are bound by 237
Capability Shader
1: ExtInstImport "GLSL.std.450"
@@ -19,28 +19,28 @@ Linked fragment stage:
Name 9 "lod"
Name 13 "samp1D"
Name 16 "pf"
Name 23 "isamp2D"
Name 25 "pf2"
Name 34 "usamp3D"
Name 38 "pf3"
Name 46 "sampCube"
Name 55 "isamp1DA"
Name 64 "usamp2DA"
Name 73 "isampCubeA"
Name 82 "samp1Ds"
Name 91 "samp2Ds"
Name 100 "sampCubes"
Name 109 "samp1DAs"
Name 118 "samp2DAs"
Name 127 "sampCubeAs"
Name 134 "levels"
Name 140 "usamp2D"
Name 148 "isamp3D"
Name 156 "isampCube"
Name 168 "samp2DA"
Name 176 "usampCubeA"
Name 206 "sampBuf"
Name 210 "sampRect"
Name 24 "isamp2D"
Name 26 "pf2"
Name 36 "usamp3D"
Name 40 "pf3"
Name 49 "sampCube"
Name 59 "isamp1DA"
Name 69 "usamp2DA"
Name 79 "isampCubeA"
Name 89 "samp1Ds"
Name 99 "samp2Ds"
Name 109 "sampCubes"
Name 119 "samp1DAs"
Name 129 "samp2DAs"
Name 139 "sampCubeAs"
Name 147 "levels"
Name 154 "usamp2D"
Name 163 "isamp3D"
Name 172 "isampCube"
Name 186 "samp2DA"
Name 195 "usampCubeA"
Name 232 "sampBuf"
Name 236 "sampRect"
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -51,230 +51,256 @@ Linked fragment stage:
12: TypePointer UniformConstant 11
13(samp1D): 12(ptr) Variable UniformConstant
15: TypePointer Function 6(float)
19: TypeInt 32 1
20: TypeImage 19(int) 2D sampled format:Unknown
21: TypeSampledImage 20
22: TypePointer UniformConstant 21
23(isamp2D): 22(ptr) Variable UniformConstant
30: TypeInt 32 0
31: TypeImage 30(int) 3D sampled format:Unknown
32: TypeSampledImage 31
33: TypePointer UniformConstant 32
34(usamp3D): 33(ptr) Variable UniformConstant
36: TypeVector 6(float) 3
37: TypePointer Function 36(fvec3)
43: TypeImage 6(float) Cube sampled format:Unknown
44: TypeSampledImage 43
45: TypePointer UniformConstant 44
46(sampCube): 45(ptr) Variable UniformConstant
52: TypeImage 19(int) 1D array sampled format:Unknown
53: TypeSampledImage 52
54: TypePointer UniformConstant 53
55(isamp1DA): 54(ptr) Variable UniformConstant
61: TypeImage 30(int) 2D array sampled format:Unknown
62: TypeSampledImage 61
63: TypePointer UniformConstant 62
64(usamp2DA): 63(ptr) Variable UniformConstant
70: TypeImage 19(int) Cube array sampled format:Unknown
71: TypeSampledImage 70
72: TypePointer UniformConstant 71
73(isampCubeA): 72(ptr) Variable UniformConstant
79: TypeImage 6(float) 1D depth sampled format:Unknown
80: TypeSampledImage 79
81: TypePointer UniformConstant 80
82(samp1Ds): 81(ptr) Variable UniformConstant
88: TypeImage 6(float) 2D depth sampled format:Unknown
89: TypeSampledImage 88
90: TypePointer UniformConstant 89
91(samp2Ds): 90(ptr) Variable UniformConstant
97: TypeImage 6(float) Cube depth sampled format:Unknown
98: TypeSampledImage 97
99: TypePointer UniformConstant 98
100(sampCubes): 99(ptr) Variable UniformConstant
106: TypeImage 6(float) 1D depth array sampled format:Unknown
20: TypeInt 32 1
21: TypeImage 20(int) 2D sampled format:Unknown
22: TypeSampledImage 21
23: TypePointer UniformConstant 22
24(isamp2D): 23(ptr) Variable UniformConstant
32: TypeInt 32 0
33: TypeImage 32(int) 3D sampled format:Unknown
34: TypeSampledImage 33
35: TypePointer UniformConstant 34
36(usamp3D): 35(ptr) Variable UniformConstant
38: TypeVector 6(float) 3
39: TypePointer Function 38(fvec3)
46: TypeImage 6(float) Cube sampled format:Unknown
47: TypeSampledImage 46
48: TypePointer UniformConstant 47
49(sampCube): 48(ptr) Variable UniformConstant
56: TypeImage 20(int) 1D array sampled format:Unknown
57: TypeSampledImage 56
58: TypePointer UniformConstant 57
59(isamp1DA): 58(ptr) Variable UniformConstant
66: TypeImage 32(int) 2D array sampled format:Unknown
67: TypeSampledImage 66
68: TypePointer UniformConstant 67
69(usamp2DA): 68(ptr) Variable UniformConstant
76: TypeImage 20(int) Cube array sampled format:Unknown
77: TypeSampledImage 76
78: TypePointer UniformConstant 77
79(isampCubeA): 78(ptr) Variable UniformConstant
86: TypeImage 6(float) 1D depth sampled format:Unknown
87: TypeSampledImage 86
88: TypePointer UniformConstant 87
89(samp1Ds): 88(ptr) Variable UniformConstant
96: TypeImage 6(float) 2D depth sampled format:Unknown
97: TypeSampledImage 96
98: TypePointer UniformConstant 97
99(samp2Ds): 98(ptr) Variable UniformConstant
106: TypeImage 6(float) Cube depth sampled format:Unknown
107: TypeSampledImage 106
108: TypePointer UniformConstant 107
109(samp1DAs): 108(ptr) Variable UniformConstant
115: TypeImage 6(float) 2D depth array sampled format:Unknown
116: TypeSampledImage 115
117: TypePointer UniformConstant 116
118(samp2DAs): 117(ptr) Variable UniformConstant
124: TypeImage 6(float) Cube depth array sampled format:Unknown
125: TypeSampledImage 124
126: TypePointer UniformConstant 125
127(sampCubeAs): 126(ptr) Variable UniformConstant
133: TypePointer Function 19(int)
137: TypeImage 30(int) 2D sampled format:Unknown
138: TypeSampledImage 137
139: TypePointer UniformConstant 138
140(usamp2D): 139(ptr) Variable UniformConstant
145: TypeImage 19(int) 3D sampled format:Unknown
146: TypeSampledImage 145
147: TypePointer UniformConstant 146
148(isamp3D): 147(ptr) Variable UniformConstant
153: TypeImage 19(int) Cube sampled format:Unknown
154: TypeSampledImage 153
155: TypePointer UniformConstant 154
156(isampCube): 155(ptr) Variable UniformConstant
165: TypeImage 6(float) 2D array sampled format:Unknown
166: TypeSampledImage 165
167: TypePointer UniformConstant 166
168(samp2DA): 167(ptr) Variable UniformConstant
173: TypeImage 30(int) Cube array sampled format:Unknown
174: TypeSampledImage 173
175: TypePointer UniformConstant 174
176(usampCubeA): 175(ptr) Variable UniformConstant
203: TypeImage 6(float) Buffer sampled format:Unknown
204: TypeSampledImage 203
205: TypePointer UniformConstant 204
206(sampBuf): 205(ptr) Variable UniformConstant
207: TypeImage 6(float) Rect sampled format:Unknown
208: TypeSampledImage 207
209: TypePointer UniformConstant 208
210(sampRect): 209(ptr) Variable UniformConstant
109(sampCubes): 108(ptr) Variable UniformConstant
116: TypeImage 6(float) 1D depth array sampled format:Unknown
117: TypeSampledImage 116
118: TypePointer UniformConstant 117
119(samp1DAs): 118(ptr) Variable UniformConstant
126: TypeImage 6(float) 2D depth array sampled format:Unknown
127: TypeSampledImage 126
128: TypePointer UniformConstant 127
129(samp2DAs): 128(ptr) Variable UniformConstant
136: TypeImage 6(float) Cube depth array sampled format:Unknown
137: TypeSampledImage 136
138: TypePointer UniformConstant 137
139(sampCubeAs): 138(ptr) Variable UniformConstant
146: TypePointer Function 20(int)
151: TypeImage 32(int) 2D sampled format:Unknown
152: TypeSampledImage 151
153: TypePointer UniformConstant 152
154(usamp2D): 153(ptr) Variable UniformConstant
160: TypeImage 20(int) 3D sampled format:Unknown
161: TypeSampledImage 160
162: TypePointer UniformConstant 161
163(isamp3D): 162(ptr) Variable UniformConstant
169: TypeImage 20(int) Cube sampled format:Unknown
170: TypeSampledImage 169
171: TypePointer UniformConstant 170
172(isampCube): 171(ptr) Variable UniformConstant
183: TypeImage 6(float) 2D array sampled format:Unknown
184: TypeSampledImage 183
185: TypePointer UniformConstant 184
186(samp2DA): 185(ptr) Variable UniformConstant
192: TypeImage 32(int) Cube array sampled format:Unknown
193: TypeSampledImage 192
194: TypePointer UniformConstant 193
195(usampCubeA): 194(ptr) Variable UniformConstant
229: TypeImage 6(float) Buffer sampled format:Unknown
230: TypeSampledImage 229
231: TypePointer UniformConstant 230
232(sampBuf): 231(ptr) Variable UniformConstant
233: TypeImage 6(float) Rect sampled format:Unknown
234: TypeSampledImage 233
235: TypePointer UniformConstant 234
236(sampRect): 235(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
9(lod): 8(ptr) Variable Function
16(pf): 15(ptr) Variable Function
25(pf2): 8(ptr) Variable Function
38(pf3): 37(ptr) Variable Function
134(levels): 133(ptr) Variable Function
26(pf2): 8(ptr) Variable Function
40(pf3): 39(ptr) Variable Function
147(levels): 146(ptr) Variable Function
14: 11 Load 13(samp1D)
17: 6(float) Load 16(pf)
18: 7(fvec2) ImageQueryLod 14 17
Store 9(lod) 18
24: 21 Load 23(isamp2D)
26: 7(fvec2) Load 25(pf2)
27: 7(fvec2) ImageQueryLod 24 26
28: 7(fvec2) Load 9(lod)
29: 7(fvec2) FAdd 28 27
Store 9(lod) 29
35: 32 Load 34(usamp3D)
39: 36(fvec3) Load 38(pf3)
40: 7(fvec2) ImageQueryLod 35 39
41: 7(fvec2) Load 9(lod)
42: 7(fvec2) FAdd 41 40
Store 9(lod) 42
47: 44 Load 46(sampCube)
48: 36(fvec3) Load 38(pf3)
49: 7(fvec2) ImageQueryLod 47 48
50: 7(fvec2) Load 9(lod)
51: 7(fvec2) FAdd 50 49
Store 9(lod) 51
56: 53 Load 55(isamp1DA)
57: 6(float) Load 16(pf)
58: 7(fvec2) ImageQueryLod 56 57
59: 7(fvec2) Load 9(lod)
60: 7(fvec2) FAdd 59 58
Store 9(lod) 60
65: 62 Load 64(usamp2DA)
66: 7(fvec2) Load 25(pf2)
67: 7(fvec2) ImageQueryLod 65 66
68: 7(fvec2) Load 9(lod)
69: 7(fvec2) FAdd 68 67
Store 9(lod) 69
74: 71 Load 73(isampCubeA)
75: 36(fvec3) Load 38(pf3)
76: 7(fvec2) ImageQueryLod 74 75
77: 7(fvec2) Load 9(lod)
78: 7(fvec2) FAdd 77 76
Store 9(lod) 78
83: 80 Load 82(samp1Ds)
84: 6(float) Load 16(pf)
85: 7(fvec2) ImageQueryLod 83 84
86: 7(fvec2) Load 9(lod)
87: 7(fvec2) FAdd 86 85
Store 9(lod) 87
92: 89 Load 91(samp2Ds)
93: 7(fvec2) Load 25(pf2)
94: 7(fvec2) ImageQueryLod 92 93
95: 7(fvec2) Load 9(lod)
96: 7(fvec2) FAdd 95 94
Store 9(lod) 96
101: 98 Load 100(sampCubes)
102: 36(fvec3) Load 38(pf3)
103: 7(fvec2) ImageQueryLod 101 102
18: 10 Image 14
19: 7(fvec2) ImageQueryLod 18 17
Store 9(lod) 19
25: 22 Load 24(isamp2D)
27: 7(fvec2) Load 26(pf2)
28: 21 Image 25
29: 7(fvec2) ImageQueryLod 28 27
30: 7(fvec2) Load 9(lod)
31: 7(fvec2) FAdd 30 29
Store 9(lod) 31
37: 34 Load 36(usamp3D)
41: 38(fvec3) Load 40(pf3)
42: 33 Image 37
43: 7(fvec2) ImageQueryLod 42 41
44: 7(fvec2) Load 9(lod)
45: 7(fvec2) FAdd 44 43
Store 9(lod) 45
50: 47 Load 49(sampCube)
51: 38(fvec3) Load 40(pf3)
52: 46 Image 50
53: 7(fvec2) ImageQueryLod 52 51
54: 7(fvec2) Load 9(lod)
55: 7(fvec2) FAdd 54 53
Store 9(lod) 55
60: 57 Load 59(isamp1DA)
61: 6(float) Load 16(pf)
62: 56 Image 60
63: 7(fvec2) ImageQueryLod 62 61
64: 7(fvec2) Load 9(lod)
65: 7(fvec2) FAdd 64 63
Store 9(lod) 65
70: 67 Load 69(usamp2DA)
71: 7(fvec2) Load 26(pf2)
72: 66 Image 70
73: 7(fvec2) ImageQueryLod 72 71
74: 7(fvec2) Load 9(lod)
75: 7(fvec2) FAdd 74 73
Store 9(lod) 75
80: 77 Load 79(isampCubeA)
81: 38(fvec3) Load 40(pf3)
82: 76 Image 80
83: 7(fvec2) ImageQueryLod 82 81
84: 7(fvec2) Load 9(lod)
85: 7(fvec2) FAdd 84 83
Store 9(lod) 85
90: 87 Load 89(samp1Ds)
91: 6(float) Load 16(pf)
92: 86 Image 90
93: 7(fvec2) ImageQueryLod 92 91
94: 7(fvec2) Load 9(lod)
95: 7(fvec2) FAdd 94 93
Store 9(lod) 95
100: 97 Load 99(samp2Ds)
101: 7(fvec2) Load 26(pf2)
102: 96 Image 100
103: 7(fvec2) ImageQueryLod 102 101
104: 7(fvec2) Load 9(lod)
105: 7(fvec2) FAdd 104 103
Store 9(lod) 105
110: 107 Load 109(samp1DAs)
111: 6(float) Load 16(pf)
112: 7(fvec2) ImageQueryLod 110 111
113: 7(fvec2) Load 9(lod)
114: 7(fvec2) FAdd 113 112
Store 9(lod) 114
119: 116 Load 118(samp2DAs)
120: 7(fvec2) Load 25(pf2)
121: 7(fvec2) ImageQueryLod 119 120
122: 7(fvec2) Load 9(lod)
123: 7(fvec2) FAdd 122 121
Store 9(lod) 123
128: 125 Load 127(sampCubeAs)
129: 36(fvec3) Load 38(pf3)
130: 7(fvec2) ImageQueryLod 128 129
131: 7(fvec2) Load 9(lod)
132: 7(fvec2) FAdd 131 130
Store 9(lod) 132
135: 11 Load 13(samp1D)
136: 19(int) ImageQueryLevels 135
Store 134(levels) 136
141: 138 Load 140(usamp2D)
142: 19(int) ImageQueryLevels 141
143: 19(int) Load 134(levels)
144: 19(int) IAdd 143 142
Store 134(levels) 144
149: 146 Load 148(isamp3D)
150: 19(int) ImageQueryLevels 149
151: 19(int) Load 134(levels)
152: 19(int) IAdd 151 150
Store 134(levels) 152
157: 154 Load 156(isampCube)
158: 19(int) ImageQueryLevels 157
159: 19(int) Load 134(levels)
160: 19(int) IAdd 159 158
Store 134(levels) 160
161: 53 Load 55(isamp1DA)
162: 19(int) ImageQueryLevels 161
163: 19(int) Load 134(levels)
164: 19(int) IAdd 163 162
Store 134(levels) 164
169: 166 Load 168(samp2DA)
170: 19(int) ImageQueryLevels 169
171: 19(int) Load 134(levels)
172: 19(int) IAdd 171 170
Store 134(levels) 172
177: 174 Load 176(usampCubeA)
178: 19(int) ImageQueryLevels 177
179: 19(int) Load 134(levels)
180: 19(int) IAdd 179 178
Store 134(levels) 180
181: 80 Load 82(samp1Ds)
182: 19(int) ImageQueryLevels 181
Store 134(levels) 182
183: 89 Load 91(samp2Ds)
184: 19(int) ImageQueryLevels 183
185: 19(int) Load 134(levels)
186: 19(int) IAdd 185 184
Store 134(levels) 186
187: 98 Load 100(sampCubes)
188: 19(int) ImageQueryLevels 187
189: 19(int) Load 134(levels)
190: 19(int) IAdd 189 188
Store 134(levels) 190
191: 107 Load 109(samp1DAs)
192: 19(int) ImageQueryLevels 191
193: 19(int) Load 134(levels)
194: 19(int) IAdd 193 192
Store 134(levels) 194
195: 116 Load 118(samp2DAs)
196: 19(int) ImageQueryLevels 195
197: 19(int) Load 134(levels)
198: 19(int) IAdd 197 196
Store 134(levels) 198
199: 125 Load 127(sampCubeAs)
200: 19(int) ImageQueryLevels 199
201: 19(int) Load 134(levels)
202: 19(int) IAdd 201 200
Store 134(levels) 202
110: 107 Load 109(sampCubes)
111: 38(fvec3) Load 40(pf3)
112: 106 Image 110
113: 7(fvec2) ImageQueryLod 112 111
114: 7(fvec2) Load 9(lod)
115: 7(fvec2) FAdd 114 113
Store 9(lod) 115
120: 117 Load 119(samp1DAs)
121: 6(float) Load 16(pf)
122: 116 Image 120
123: 7(fvec2) ImageQueryLod 122 121
124: 7(fvec2) Load 9(lod)
125: 7(fvec2) FAdd 124 123
Store 9(lod) 125
130: 127 Load 129(samp2DAs)
131: 7(fvec2) Load 26(pf2)
132: 126 Image 130
133: 7(fvec2) ImageQueryLod 132 131
134: 7(fvec2) Load 9(lod)
135: 7(fvec2) FAdd 134 133
Store 9(lod) 135
140: 137 Load 139(sampCubeAs)
141: 38(fvec3) Load 40(pf3)
142: 136 Image 140
143: 7(fvec2) ImageQueryLod 142 141
144: 7(fvec2) Load 9(lod)
145: 7(fvec2) FAdd 144 143
Store 9(lod) 145
148: 11 Load 13(samp1D)
149: 10 Image 148
150: 20(int) ImageQueryLevels 149
Store 147(levels) 150
155: 152 Load 154(usamp2D)
156: 151 Image 155
157: 20(int) ImageQueryLevels 156
158: 20(int) Load 147(levels)
159: 20(int) IAdd 158 157
Store 147(levels) 159
164: 161 Load 163(isamp3D)
165: 160 Image 164
166: 20(int) ImageQueryLevels 165
167: 20(int) Load 147(levels)
168: 20(int) IAdd 167 166
Store 147(levels) 168
173: 170 Load 172(isampCube)
174: 169 Image 173
175: 20(int) ImageQueryLevels 174
176: 20(int) Load 147(levels)
177: 20(int) IAdd 176 175
Store 147(levels) 177
178: 57 Load 59(isamp1DA)
179: 56 Image 178
180: 20(int) ImageQueryLevels 179
181: 20(int) Load 147(levels)
182: 20(int) IAdd 181 180
Store 147(levels) 182
187: 184 Load 186(samp2DA)
188: 183 Image 187
189: 20(int) ImageQueryLevels 188
190: 20(int) Load 147(levels)
191: 20(int) IAdd 190 189
Store 147(levels) 191
196: 193 Load 195(usampCubeA)
197: 192 Image 196
198: 20(int) ImageQueryLevels 197
199: 20(int) Load 147(levels)
200: 20(int) IAdd 199 198
Store 147(levels) 200
201: 87 Load 89(samp1Ds)
202: 86 Image 201
203: 20(int) ImageQueryLevels 202
Store 147(levels) 203
204: 97 Load 99(samp2Ds)
205: 96 Image 204
206: 20(int) ImageQueryLevels 205
207: 20(int) Load 147(levels)
208: 20(int) IAdd 207 206
Store 147(levels) 208
209: 107 Load 109(sampCubes)
210: 106 Image 209
211: 20(int) ImageQueryLevels 210
212: 20(int) Load 147(levels)
213: 20(int) IAdd 212 211
Store 147(levels) 213
214: 117 Load 119(samp1DAs)
215: 116 Image 214
216: 20(int) ImageQueryLevels 215
217: 20(int) Load 147(levels)
218: 20(int) IAdd 217 216
Store 147(levels) 218
219: 127 Load 129(samp2DAs)
220: 126 Image 219
221: 20(int) ImageQueryLevels 220
222: 20(int) Load 147(levels)
223: 20(int) IAdd 222 221
Store 147(levels) 223
224: 137 Load 139(sampCubeAs)
225: 136 Image 224
226: 20(int) ImageQueryLevels 225
227: 20(int) Load 147(levels)
228: 20(int) IAdd 227 226
Store 147(levels) 228
Return
FunctionEnd