Parser & SPV: Implement two extensions regarding GLSL sparse texture.
Implement extension "GL_ARB_sparse_texture2". Implement extension "GL_ARB_sparse_texture_clamp".
This commit is contained in:
522
Test/baseResults/spv.sparseTexture.frag.out
Normal file
522
Test/baseResults/spv.sparseTexture.frag.out
Normal file
@@ -0,0 +1,522 @@
|
||||
spv.sparseTexture.frag
|
||||
Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
|
||||
|
||||
|
||||
Linked fragment stage:
|
||||
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 399
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 384
|
||||
ExecutionMode 4 OriginLowerLeft
|
||||
Source GLSL 450
|
||||
SourceExtension "GL_ARB_sparse_texture2"
|
||||
Name 4 "main"
|
||||
Name 8 "resident"
|
||||
Name 13 "texel"
|
||||
Name 18 "itexel"
|
||||
Name 23 "utexel"
|
||||
Name 29 "s2D"
|
||||
Name 33 "c2"
|
||||
Name 35 "ResType"
|
||||
Name 44 "s3D"
|
||||
Name 48 "c3"
|
||||
Name 59 "isCube"
|
||||
Name 62 "ResType"
|
||||
Name 71 "s2DShadow"
|
||||
Name 77 "ResType"
|
||||
Name 86 "sCubeArrayShadow"
|
||||
Name 89 "c4"
|
||||
Name 108 "usCubeArray"
|
||||
Name 111 "ResType"
|
||||
Name 140 "us2DRect"
|
||||
Name 154 "s2DArrayShadow"
|
||||
Name 186 "s2DMS"
|
||||
Name 223 "is2DArray"
|
||||
Name 256 "sCubeShadow"
|
||||
Name 289 "s2DRectShadow"
|
||||
Name 360 "offsets"
|
||||
Name 384 "outColor"
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 1
|
||||
7: TypePointer Function 6(int)
|
||||
9: 6(int) Constant 0
|
||||
10: TypeFloat 32
|
||||
11: TypeVector 10(float) 4
|
||||
12: TypePointer Function 11(fvec4)
|
||||
14: 10(float) Constant 0
|
||||
15: 11(fvec4) ConstantComposite 14 14 14 14
|
||||
16: TypeVector 6(int) 4
|
||||
17: TypePointer Function 16(ivec4)
|
||||
19: 16(ivec4) ConstantComposite 9 9 9 9
|
||||
20: TypeInt 32 0
|
||||
21: TypeVector 20(int) 4
|
||||
22: TypePointer Function 21(ivec4)
|
||||
24: 20(int) Constant 0
|
||||
25: 21(ivec4) ConstantComposite 24 24 24 24
|
||||
26: TypeImage 10(float) 2D sampled format:Unknown
|
||||
27: TypeSampledImage 26
|
||||
28: TypePointer UniformConstant 27
|
||||
29(s2D): 28(ptr) Variable UniformConstant
|
||||
31: TypeVector 10(float) 2
|
||||
32: TypePointer UniformConstant 31(fvec2)
|
||||
33(c2): 32(ptr) Variable UniformConstant
|
||||
35(ResType): TypeStruct 6(int) 11(fvec4)
|
||||
41: TypeImage 10(float) 3D sampled format:Unknown
|
||||
42: TypeSampledImage 41
|
||||
43: TypePointer UniformConstant 42
|
||||
44(s3D): 43(ptr) Variable UniformConstant
|
||||
46: TypeVector 10(float) 3
|
||||
47: TypePointer UniformConstant 46(fvec3)
|
||||
48(c3): 47(ptr) Variable UniformConstant
|
||||
50: 10(float) Constant 1073741824
|
||||
56: TypeImage 6(int) Cube sampled format:Unknown
|
||||
57: TypeSampledImage 56
|
||||
58: TypePointer UniformConstant 57
|
||||
59(isCube): 58(ptr) Variable UniformConstant
|
||||
62(ResType): TypeStruct 6(int) 16(ivec4)
|
||||
68: TypeImage 10(float) 2D depth sampled format:Unknown
|
||||
69: TypeSampledImage 68
|
||||
70: TypePointer UniformConstant 69
|
||||
71(s2DShadow): 70(ptr) Variable UniformConstant
|
||||
74: TypePointer Function 10(float)
|
||||
77(ResType): TypeStruct 6(int) 10(float)
|
||||
83: TypeImage 10(float) Cube depth array sampled format:Unknown
|
||||
84: TypeSampledImage 83
|
||||
85: TypePointer UniformConstant 84
|
||||
86(sCubeArrayShadow): 85(ptr) Variable UniformConstant
|
||||
88: TypePointer UniformConstant 11(fvec4)
|
||||
89(c4): 88(ptr) Variable UniformConstant
|
||||
91: 10(float) Constant 1065353216
|
||||
105: TypeImage 20(int) Cube array sampled format:Unknown
|
||||
106: TypeSampledImage 105
|
||||
107: TypePointer UniformConstant 106
|
||||
108(usCubeArray): 107(ptr) Variable UniformConstant
|
||||
111(ResType): TypeStruct 6(int) 21(ivec4)
|
||||
119: 20(int) Constant 1
|
||||
129: TypeVector 6(int) 3
|
||||
130: 6(int) Constant 2
|
||||
131: 129(ivec3) ConstantComposite 130 130 130
|
||||
137: TypeImage 20(int) Rect sampled format:Unknown
|
||||
138: TypeSampledImage 137
|
||||
139: TypePointer UniformConstant 138
|
||||
140(us2DRect): 139(ptr) Variable UniformConstant
|
||||
143: TypeVector 6(int) 2
|
||||
144: 6(int) Constant 3
|
||||
145: 143(ivec2) ConstantComposite 144 144
|
||||
151: TypeImage 10(float) 2D depth array sampled format:Unknown
|
||||
152: TypeSampledImage 151
|
||||
153: TypePointer UniformConstant 152
|
||||
154(s2DArrayShadow): 153(ptr) Variable UniformConstant
|
||||
157: 6(int) Constant 5
|
||||
158: 143(ivec2) ConstantComposite 157 157
|
||||
159: 20(int) Constant 2
|
||||
183: TypeImage 10(float) 2D multi-sampled sampled format:Unknown
|
||||
184: TypeSampledImage 183
|
||||
185: TypePointer UniformConstant 184
|
||||
186(s2DMS): 185(ptr) Variable UniformConstant
|
||||
190: 6(int) Constant 4
|
||||
199: 129(ivec3) ConstantComposite 190 190 190
|
||||
220: TypeImage 6(int) 2D array sampled format:Unknown
|
||||
221: TypeSampledImage 220
|
||||
222: TypePointer UniformConstant 221
|
||||
223(is2DArray): 222(ptr) Variable UniformConstant
|
||||
226: 6(int) Constant 6
|
||||
227: 143(ivec2) ConstantComposite 226 226
|
||||
235: 6(int) Constant 7
|
||||
236: 143(ivec2) ConstantComposite 235 235
|
||||
253: TypeImage 10(float) Cube depth sampled format:Unknown
|
||||
254: TypeSampledImage 253
|
||||
255: TypePointer UniformConstant 254
|
||||
256(sCubeShadow): 255(ptr) Variable UniformConstant
|
||||
286: TypeImage 10(float) Rect depth sampled format:Unknown
|
||||
287: TypeSampledImage 286
|
||||
288: TypePointer UniformConstant 287
|
||||
289(s2DRectShadow): 288(ptr) Variable UniformConstant
|
||||
294: 20(int) Constant 3
|
||||
306: 143(ivec2) ConstantComposite 130 130
|
||||
335: 143(ivec2) ConstantComposite 190 190
|
||||
357: 20(int) Constant 4
|
||||
358: TypeArray 143(ivec2) 357
|
||||
359: TypePointer UniformConstant 358
|
||||
360(offsets): 359(ptr) Variable UniformConstant
|
||||
383: TypePointer Output 11(fvec4)
|
||||
384(outColor): 383(ptr) Variable Output
|
||||
387: TypeBool
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
8(resident): 7(ptr) Variable Function
|
||||
13(texel): 12(ptr) Variable Function
|
||||
18(itexel): 17(ptr) Variable Function
|
||||
23(utexel): 22(ptr) Variable Function
|
||||
385: 12(ptr) Variable Function
|
||||
Store 8(resident) 9
|
||||
Store 13(texel) 15
|
||||
Store 18(itexel) 19
|
||||
Store 23(utexel) 25
|
||||
30: 27 Load 29(s2D)
|
||||
34: 31(fvec2) Load 33(c2)
|
||||
36: 35(ResType) ImageSparseSampleImplicitLod 30 34
|
||||
37: 11(fvec4) CompositeExtract 36 1
|
||||
Store 13(texel) 37
|
||||
38: 6(int) CompositeExtract 36 0
|
||||
39: 6(int) Load 8(resident)
|
||||
40: 6(int) BitwiseOr 39 38
|
||||
Store 8(resident) 40
|
||||
45: 42 Load 44(s3D)
|
||||
49: 46(fvec3) Load 48(c3)
|
||||
51: 35(ResType) ImageSparseSampleImplicitLod 45 49 Bias 50
|
||||
52: 11(fvec4) CompositeExtract 51 1
|
||||
Store 13(texel) 52
|
||||
53: 6(int) CompositeExtract 51 0
|
||||
54: 6(int) Load 8(resident)
|
||||
55: 6(int) BitwiseOr 54 53
|
||||
Store 8(resident) 55
|
||||
60: 57 Load 59(isCube)
|
||||
61: 46(fvec3) Load 48(c3)
|
||||
63: 62(ResType) ImageSparseSampleImplicitLod 60 61
|
||||
64: 16(ivec4) CompositeExtract 63 1
|
||||
Store 18(itexel) 64
|
||||
65: 6(int) CompositeExtract 63 0
|
||||
66: 6(int) Load 8(resident)
|
||||
67: 6(int) BitwiseOr 66 65
|
||||
Store 8(resident) 67
|
||||
72: 69 Load 71(s2DShadow)
|
||||
73: 46(fvec3) Load 48(c3)
|
||||
75: 74(ptr) AccessChain 13(texel) 24
|
||||
76: 10(float) CompositeExtract 73 2
|
||||
78: 77(ResType) ImageSparseSampleDrefImplicitLod 72 73 76
|
||||
79: 10(float) CompositeExtract 78 1
|
||||
Store 75 79
|
||||
80: 6(int) CompositeExtract 78 0
|
||||
81: 6(int) Load 8(resident)
|
||||
82: 6(int) BitwiseOr 81 80
|
||||
Store 8(resident) 82
|
||||
87: 84 Load 86(sCubeArrayShadow)
|
||||
90: 11(fvec4) Load 89(c4)
|
||||
92: 74(ptr) AccessChain 13(texel) 24
|
||||
93: 77(ResType) ImageSparseSampleDrefImplicitLod 87 90 91
|
||||
94: 10(float) CompositeExtract 93 1
|
||||
Store 92 94
|
||||
95: 6(int) CompositeExtract 93 0
|
||||
96: 6(int) Load 8(resident)
|
||||
97: 6(int) BitwiseOr 96 95
|
||||
Store 8(resident) 97
|
||||
98: 27 Load 29(s2D)
|
||||
99: 31(fvec2) Load 33(c2)
|
||||
100: 35(ResType) ImageSparseSampleExplicitLod 98 99 Lod 50
|
||||
101: 11(fvec4) CompositeExtract 100 1
|
||||
Store 13(texel) 101
|
||||
102: 6(int) CompositeExtract 100 0
|
||||
103: 6(int) Load 8(resident)
|
||||
104: 6(int) BitwiseOr 103 102
|
||||
Store 8(resident) 104
|
||||
109: 106 Load 108(usCubeArray)
|
||||
110: 11(fvec4) Load 89(c4)
|
||||
112:111(ResType) ImageSparseSampleExplicitLod 109 110 Lod 91
|
||||
113: 21(ivec4) CompositeExtract 112 1
|
||||
Store 23(utexel) 113
|
||||
114: 6(int) CompositeExtract 112 0
|
||||
115: 6(int) Load 8(resident)
|
||||
116: 6(int) BitwiseOr 115 114
|
||||
Store 8(resident) 116
|
||||
117: 69 Load 71(s2DShadow)
|
||||
118: 46(fvec3) Load 48(c3)
|
||||
120: 74(ptr) AccessChain 13(texel) 119
|
||||
121: 10(float) CompositeExtract 118 2
|
||||
122: 77(ResType) ImageSparseSampleDrefExplicitLod 117 118 121 Lod 50
|
||||
123: 10(float) CompositeExtract 122 1
|
||||
Store 120 123
|
||||
124: 6(int) CompositeExtract 122 0
|
||||
125: 6(int) Load 8(resident)
|
||||
126: 6(int) BitwiseOr 125 124
|
||||
Store 8(resident) 126
|
||||
127: 42 Load 44(s3D)
|
||||
128: 46(fvec3) Load 48(c3)
|
||||
132: 35(ResType) ImageSparseSampleImplicitLod 127 128 Bias ConstOffset 50 131
|
||||
133: 11(fvec4) CompositeExtract 132 1
|
||||
Store 13(texel) 133
|
||||
134: 6(int) CompositeExtract 132 0
|
||||
135: 6(int) Load 8(resident)
|
||||
136: 6(int) BitwiseOr 135 134
|
||||
Store 8(resident) 136
|
||||
141: 138 Load 140(us2DRect)
|
||||
142: 31(fvec2) Load 33(c2)
|
||||
146:111(ResType) ImageSparseSampleImplicitLod 141 142 ConstOffset 145
|
||||
147: 21(ivec4) CompositeExtract 146 1
|
||||
Store 23(utexel) 147
|
||||
148: 6(int) CompositeExtract 146 0
|
||||
149: 6(int) Load 8(resident)
|
||||
150: 6(int) BitwiseOr 149 148
|
||||
Store 8(resident) 150
|
||||
155: 152 Load 154(s2DArrayShadow)
|
||||
156: 11(fvec4) Load 89(c4)
|
||||
160: 74(ptr) AccessChain 13(texel) 159
|
||||
161: 10(float) CompositeExtract 156 3
|
||||
162: 77(ResType) ImageSparseSampleDrefImplicitLod 155 156 161 ConstOffset 158
|
||||
163: 10(float) CompositeExtract 162 1
|
||||
Store 160 163
|
||||
164: 6(int) CompositeExtract 162 0
|
||||
165: 6(int) Load 8(resident)
|
||||
166: 6(int) BitwiseOr 165 164
|
||||
Store 8(resident) 166
|
||||
167: 27 Load 29(s2D)
|
||||
168: 31(fvec2) Load 33(c2)
|
||||
169: 143(ivec2) ConvertFToS 168
|
||||
170: 35(ResType) ImageSparseFetch 167 169 Lod 130
|
||||
171: 11(fvec4) CompositeExtract 170 1
|
||||
Store 13(texel) 171
|
||||
172: 6(int) CompositeExtract 170 0
|
||||
173: 6(int) Load 8(resident)
|
||||
174: 6(int) BitwiseOr 173 172
|
||||
Store 8(resident) 174
|
||||
175: 138 Load 140(us2DRect)
|
||||
176: 31(fvec2) Load 33(c2)
|
||||
177: 143(ivec2) ConvertFToS 176
|
||||
178:111(ResType) ImageSparseFetch 175 177
|
||||
179: 21(ivec4) CompositeExtract 178 1
|
||||
Store 23(utexel) 179
|
||||
180: 6(int) CompositeExtract 178 0
|
||||
181: 6(int) Load 8(resident)
|
||||
182: 6(int) BitwiseOr 181 180
|
||||
Store 8(resident) 182
|
||||
187: 184 Load 186(s2DMS)
|
||||
188: 31(fvec2) Load 33(c2)
|
||||
189: 143(ivec2) ConvertFToS 188
|
||||
191: 35(ResType) ImageSparseFetch 187 189 Sample 190
|
||||
192: 11(fvec4) CompositeExtract 191 1
|
||||
Store 13(texel) 192
|
||||
193: 6(int) CompositeExtract 191 0
|
||||
194: 6(int) Load 8(resident)
|
||||
195: 6(int) BitwiseOr 194 193
|
||||
Store 8(resident) 195
|
||||
196: 42 Load 44(s3D)
|
||||
197: 46(fvec3) Load 48(c3)
|
||||
198: 129(ivec3) ConvertFToS 197
|
||||
200: 35(ResType) ImageSparseFetch 196 198 Lod ConstOffset 130 199
|
||||
201: 11(fvec4) CompositeExtract 200 1
|
||||
Store 13(texel) 201
|
||||
202: 6(int) CompositeExtract 200 0
|
||||
203: 6(int) Load 8(resident)
|
||||
204: 6(int) BitwiseOr 203 202
|
||||
Store 8(resident) 204
|
||||
205: 138 Load 140(us2DRect)
|
||||
206: 31(fvec2) Load 33(c2)
|
||||
207: 143(ivec2) ConvertFToS 206
|
||||
208:111(ResType) ImageSparseFetch 205 207 ConstOffset 145
|
||||
209: 21(ivec4) CompositeExtract 208 1
|
||||
Store 23(utexel) 209
|
||||
210: 6(int) CompositeExtract 208 0
|
||||
211: 6(int) Load 8(resident)
|
||||
212: 6(int) BitwiseOr 211 210
|
||||
Store 8(resident) 212
|
||||
213: 27 Load 29(s2D)
|
||||
214: 31(fvec2) Load 33(c2)
|
||||
215: 35(ResType) ImageSparseSampleExplicitLod 213 214 Lod ConstOffset 50 158
|
||||
216: 11(fvec4) CompositeExtract 215 1
|
||||
Store 13(texel) 216
|
||||
217: 6(int) CompositeExtract 215 0
|
||||
218: 6(int) Load 8(resident)
|
||||
219: 6(int) BitwiseOr 218 217
|
||||
Store 8(resident) 219
|
||||
224: 221 Load 223(is2DArray)
|
||||
225: 46(fvec3) Load 48(c3)
|
||||
228: 62(ResType) ImageSparseSampleExplicitLod 224 225 Lod ConstOffset 50 227
|
||||
229: 16(ivec4) CompositeExtract 228 1
|
||||
Store 18(itexel) 229
|
||||
230: 6(int) CompositeExtract 228 0
|
||||
231: 6(int) Load 8(resident)
|
||||
232: 6(int) BitwiseOr 231 230
|
||||
Store 8(resident) 232
|
||||
233: 69 Load 71(s2DShadow)
|
||||
234: 46(fvec3) Load 48(c3)
|
||||
237: 74(ptr) AccessChain 13(texel) 159
|
||||
238: 10(float) CompositeExtract 234 2
|
||||
239: 77(ResType) ImageSparseSampleDrefExplicitLod 233 234 238 Lod ConstOffset 50 236
|
||||
240: 10(float) CompositeExtract 239 1
|
||||
Store 237 240
|
||||
241: 6(int) CompositeExtract 239 0
|
||||
242: 6(int) Load 8(resident)
|
||||
243: 6(int) BitwiseOr 242 241
|
||||
Store 8(resident) 243
|
||||
244: 42 Load 44(s3D)
|
||||
245: 46(fvec3) Load 48(c3)
|
||||
246: 46(fvec3) Load 48(c3)
|
||||
247: 46(fvec3) Load 48(c3)
|
||||
248: 35(ResType) ImageSparseSampleExplicitLod 244 245 Grad 246 247
|
||||
249: 11(fvec4) CompositeExtract 248 1
|
||||
Store 13(texel) 249
|
||||
250: 6(int) CompositeExtract 248 0
|
||||
251: 6(int) Load 8(resident)
|
||||
252: 6(int) BitwiseOr 251 250
|
||||
Store 8(resident) 252
|
||||
257: 254 Load 256(sCubeShadow)
|
||||
258: 11(fvec4) Load 89(c4)
|
||||
259: 46(fvec3) Load 48(c3)
|
||||
260: 46(fvec3) Load 48(c3)
|
||||
261: 74(ptr) AccessChain 13(texel) 119
|
||||
262: 10(float) CompositeExtract 258 3
|
||||
263: 77(ResType) ImageSparseSampleDrefExplicitLod 257 258 262 Grad 259 260
|
||||
264: 10(float) CompositeExtract 263 1
|
||||
Store 261 264
|
||||
265: 6(int) CompositeExtract 263 0
|
||||
266: 6(int) Load 8(resident)
|
||||
267: 6(int) BitwiseOr 266 265
|
||||
Store 8(resident) 267
|
||||
268: 106 Load 108(usCubeArray)
|
||||
269: 11(fvec4) Load 89(c4)
|
||||
270: 46(fvec3) Load 48(c3)
|
||||
271: 46(fvec3) Load 48(c3)
|
||||
272:111(ResType) ImageSparseSampleExplicitLod 268 269 Grad 270 271
|
||||
273: 21(ivec4) CompositeExtract 272 1
|
||||
Store 23(utexel) 273
|
||||
274: 6(int) CompositeExtract 272 0
|
||||
275: 6(int) Load 8(resident)
|
||||
276: 6(int) BitwiseOr 275 274
|
||||
Store 8(resident) 276
|
||||
277: 27 Load 29(s2D)
|
||||
278: 31(fvec2) Load 33(c2)
|
||||
279: 31(fvec2) Load 33(c2)
|
||||
280: 31(fvec2) Load 33(c2)
|
||||
281: 35(ResType) ImageSparseSampleExplicitLod 277 278 Grad ConstOffset 279 280 158
|
||||
282: 11(fvec4) CompositeExtract 281 1
|
||||
Store 13(texel) 282
|
||||
283: 6(int) CompositeExtract 281 0
|
||||
284: 6(int) Load 8(resident)
|
||||
285: 6(int) BitwiseOr 284 283
|
||||
Store 8(resident) 285
|
||||
290: 287 Load 289(s2DRectShadow)
|
||||
291: 46(fvec3) Load 48(c3)
|
||||
292: 31(fvec2) Load 33(c2)
|
||||
293: 31(fvec2) Load 33(c2)
|
||||
295: 74(ptr) AccessChain 13(texel) 294
|
||||
296: 10(float) CompositeExtract 291 2
|
||||
297: 77(ResType) ImageSparseSampleDrefExplicitLod 290 291 296 Grad ConstOffset 292 293 227
|
||||
298: 10(float) CompositeExtract 297 1
|
||||
Store 295 298
|
||||
299: 6(int) CompositeExtract 297 0
|
||||
300: 6(int) Load 8(resident)
|
||||
301: 6(int) BitwiseOr 300 299
|
||||
Store 8(resident) 301
|
||||
302: 221 Load 223(is2DArray)
|
||||
303: 46(fvec3) Load 48(c3)
|
||||
304: 31(fvec2) Load 33(c2)
|
||||
305: 31(fvec2) Load 33(c2)
|
||||
307: 62(ResType) ImageSparseSampleExplicitLod 302 303 Grad ConstOffset 304 305 306
|
||||
308: 16(ivec4) CompositeExtract 307 1
|
||||
Store 18(itexel) 308
|
||||
309: 6(int) CompositeExtract 307 0
|
||||
310: 6(int) Load 8(resident)
|
||||
311: 6(int) BitwiseOr 310 309
|
||||
Store 8(resident) 311
|
||||
312: 27 Load 29(s2D)
|
||||
313: 31(fvec2) Load 33(c2)
|
||||
314: 35(ResType) ImageSparseGather 312 313 9
|
||||
315: 11(fvec4) CompositeExtract 314 1
|
||||
Store 13(texel) 315
|
||||
316: 6(int) CompositeExtract 314 0
|
||||
317: 6(int) Load 8(resident)
|
||||
318: 6(int) BitwiseOr 317 316
|
||||
Store 8(resident) 318
|
||||
319: 221 Load 223(is2DArray)
|
||||
320: 46(fvec3) Load 48(c3)
|
||||
321: 62(ResType) ImageSparseGather 319 320 130
|
||||
322: 16(ivec4) CompositeExtract 321 1
|
||||
Store 18(itexel) 322
|
||||
323: 6(int) CompositeExtract 321 0
|
||||
324: 6(int) Load 8(resident)
|
||||
325: 6(int) BitwiseOr 324 323
|
||||
Store 8(resident) 325
|
||||
326: 152 Load 154(s2DArrayShadow)
|
||||
327: 46(fvec3) Load 48(c3)
|
||||
328: 35(ResType) ImageSparseDrefGather 326 327 50
|
||||
329: 11(fvec4) CompositeExtract 328 1
|
||||
Store 13(texel) 329
|
||||
330: 6(int) CompositeExtract 328 0
|
||||
331: 6(int) Load 8(resident)
|
||||
332: 6(int) BitwiseOr 331 330
|
||||
Store 8(resident) 332
|
||||
333: 27 Load 29(s2D)
|
||||
334: 31(fvec2) Load 33(c2)
|
||||
336: 35(ResType) ImageSparseGather 333 334 9 ConstOffset 335
|
||||
337: 11(fvec4) CompositeExtract 336 1
|
||||
Store 13(texel) 337
|
||||
338: 6(int) CompositeExtract 336 0
|
||||
339: 6(int) Load 8(resident)
|
||||
340: 6(int) BitwiseOr 339 338
|
||||
Store 8(resident) 340
|
||||
341: 221 Load 223(is2DArray)
|
||||
342: 46(fvec3) Load 48(c3)
|
||||
343: 62(ResType) ImageSparseGather 341 342 130 ConstOffset 158
|
||||
344: 16(ivec4) CompositeExtract 343 1
|
||||
Store 18(itexel) 344
|
||||
345: 6(int) CompositeExtract 343 0
|
||||
346: 6(int) Load 8(resident)
|
||||
347: 6(int) BitwiseOr 346 345
|
||||
Store 8(resident) 347
|
||||
348: 287 Load 289(s2DRectShadow)
|
||||
349: 31(fvec2) Load 33(c2)
|
||||
350: 35(ResType) ImageSparseDrefGather 348 349 50 ConstOffset 236
|
||||
351: 11(fvec4) CompositeExtract 350 1
|
||||
Store 13(texel) 351
|
||||
352: 6(int) CompositeExtract 350 0
|
||||
353: 6(int) Load 8(resident)
|
||||
354: 6(int) BitwiseOr 353 352
|
||||
Store 8(resident) 354
|
||||
355: 27 Load 29(s2D)
|
||||
356: 31(fvec2) Load 33(c2)
|
||||
361: 358 Load 360(offsets)
|
||||
362: 35(ResType) ImageSparseGather 355 356 9 ConstOffsets 361
|
||||
363: 11(fvec4) CompositeExtract 362 1
|
||||
Store 13(texel) 363
|
||||
364: 6(int) CompositeExtract 362 0
|
||||
365: 6(int) Load 8(resident)
|
||||
366: 6(int) BitwiseOr 365 364
|
||||
Store 8(resident) 366
|
||||
367: 221 Load 223(is2DArray)
|
||||
368: 46(fvec3) Load 48(c3)
|
||||
369: 358 Load 360(offsets)
|
||||
370: 62(ResType) ImageSparseGather 367 368 130 ConstOffsets 369
|
||||
371: 16(ivec4) CompositeExtract 370 1
|
||||
Store 18(itexel) 371
|
||||
372: 6(int) CompositeExtract 370 0
|
||||
373: 6(int) Load 8(resident)
|
||||
374: 6(int) BitwiseOr 373 372
|
||||
Store 8(resident) 374
|
||||
375: 287 Load 289(s2DRectShadow)
|
||||
376: 31(fvec2) Load 33(c2)
|
||||
377: 358 Load 360(offsets)
|
||||
378: 35(ResType) ImageSparseDrefGather 375 376 50 ConstOffsets 377
|
||||
379: 11(fvec4) CompositeExtract 378 1
|
||||
Store 13(texel) 379
|
||||
380: 6(int) CompositeExtract 378 0
|
||||
381: 6(int) Load 8(resident)
|
||||
382: 6(int) BitwiseOr 381 380
|
||||
Store 8(resident) 382
|
||||
386: 6(int) Load 8(resident)
|
||||
388: 387(bool) ImageSparseTexelsResident 386
|
||||
SelectionMerge 390 None
|
||||
BranchConditional 388 389 392
|
||||
389: Label
|
||||
391: 11(fvec4) Load 13(texel)
|
||||
Store 385 391
|
||||
Branch 390
|
||||
392: Label
|
||||
393: 16(ivec4) Load 18(itexel)
|
||||
394: 11(fvec4) ConvertSToF 393
|
||||
395: 21(ivec4) Load 23(utexel)
|
||||
396: 11(fvec4) ConvertUToF 395
|
||||
397: 11(fvec4) FAdd 394 396
|
||||
Store 385 397
|
||||
Branch 390
|
||||
390: Label
|
||||
398: 11(fvec4) Load 385
|
||||
Store 384(outColor) 398
|
||||
Return
|
||||
FunctionEnd
|
||||
456
Test/baseResults/spv.sparseTextureClamp.frag.out
Normal file
456
Test/baseResults/spv.sparseTextureClamp.frag.out
Normal file
@@ -0,0 +1,456 @@
|
||||
spv.sparseTextureClamp.frag
|
||||
Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
|
||||
|
||||
|
||||
Linked fragment stage:
|
||||
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 360
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 345
|
||||
ExecutionMode 4 OriginLowerLeft
|
||||
Source GLSL 450
|
||||
SourceExtension "GL_ARB_sparse_texture_clamp"
|
||||
Name 4 "main"
|
||||
Name 8 "resident"
|
||||
Name 13 "texel"
|
||||
Name 18 "itexel"
|
||||
Name 23 "utexel"
|
||||
Name 29 "s2D"
|
||||
Name 33 "c2"
|
||||
Name 36 "lodClamp"
|
||||
Name 38 "ResType"
|
||||
Name 47 "s3D"
|
||||
Name 51 "c3"
|
||||
Name 63 "isCube"
|
||||
Name 67 "ResType"
|
||||
Name 76 "s2DShadow"
|
||||
Name 83 "ResType"
|
||||
Name 92 "sCubeArrayShadow"
|
||||
Name 95 "c4"
|
||||
Name 154 "us2DRect"
|
||||
Name 161 "ResType"
|
||||
Name 170 "s2DArrayShadow"
|
||||
Name 218 "sCubeShadow"
|
||||
Name 235 "usCubeArray"
|
||||
Name 286 "s2DRectShadow"
|
||||
Name 305 "is2DArray"
|
||||
Name 345 "outColor"
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 1
|
||||
7: TypePointer Function 6(int)
|
||||
9: 6(int) Constant 0
|
||||
10: TypeFloat 32
|
||||
11: TypeVector 10(float) 4
|
||||
12: TypePointer Function 11(fvec4)
|
||||
14: 10(float) Constant 0
|
||||
15: 11(fvec4) ConstantComposite 14 14 14 14
|
||||
16: TypeVector 6(int) 4
|
||||
17: TypePointer Function 16(ivec4)
|
||||
19: 16(ivec4) ConstantComposite 9 9 9 9
|
||||
20: TypeInt 32 0
|
||||
21: TypeVector 20(int) 4
|
||||
22: TypePointer Function 21(ivec4)
|
||||
24: 20(int) Constant 0
|
||||
25: 21(ivec4) ConstantComposite 24 24 24 24
|
||||
26: TypeImage 10(float) 2D sampled format:Unknown
|
||||
27: TypeSampledImage 26
|
||||
28: TypePointer UniformConstant 27
|
||||
29(s2D): 28(ptr) Variable UniformConstant
|
||||
31: TypeVector 10(float) 2
|
||||
32: TypePointer UniformConstant 31(fvec2)
|
||||
33(c2): 32(ptr) Variable UniformConstant
|
||||
35: TypePointer UniformConstant 10(float)
|
||||
36(lodClamp): 35(ptr) Variable UniformConstant
|
||||
38(ResType): TypeStruct 6(int) 11(fvec4)
|
||||
44: TypeImage 10(float) 3D sampled format:Unknown
|
||||
45: TypeSampledImage 44
|
||||
46: TypePointer UniformConstant 45
|
||||
47(s3D): 46(ptr) Variable UniformConstant
|
||||
49: TypeVector 10(float) 3
|
||||
50: TypePointer UniformConstant 49(fvec3)
|
||||
51(c3): 50(ptr) Variable UniformConstant
|
||||
54: 10(float) Constant 1073741824
|
||||
60: TypeImage 6(int) Cube sampled format:Unknown
|
||||
61: TypeSampledImage 60
|
||||
62: TypePointer UniformConstant 61
|
||||
63(isCube): 62(ptr) Variable UniformConstant
|
||||
67(ResType): TypeStruct 6(int) 16(ivec4)
|
||||
73: TypeImage 10(float) 2D depth sampled format:Unknown
|
||||
74: TypeSampledImage 73
|
||||
75: TypePointer UniformConstant 74
|
||||
76(s2DShadow): 75(ptr) Variable UniformConstant
|
||||
80: TypePointer Function 10(float)
|
||||
83(ResType): TypeStruct 6(int) 10(float)
|
||||
89: TypeImage 10(float) Cube depth array sampled format:Unknown
|
||||
90: TypeSampledImage 89
|
||||
91: TypePointer UniformConstant 90
|
||||
92(sCubeArrayShadow): 91(ptr) Variable UniformConstant
|
||||
94: TypePointer UniformConstant 11(fvec4)
|
||||
95(c4): 94(ptr) Variable UniformConstant
|
||||
97: 10(float) Constant 1065353216
|
||||
142: TypeVector 6(int) 3
|
||||
143: 6(int) Constant 2
|
||||
144: 142(ivec3) ConstantComposite 143 143 143
|
||||
151: TypeImage 20(int) Rect sampled format:Unknown
|
||||
152: TypeSampledImage 151
|
||||
153: TypePointer UniformConstant 152
|
||||
154(us2DRect): 153(ptr) Variable UniformConstant
|
||||
157: TypeVector 6(int) 2
|
||||
158: 6(int) Constant 3
|
||||
159: 157(ivec2) ConstantComposite 158 158
|
||||
161(ResType): TypeStruct 6(int) 21(ivec4)
|
||||
167: TypeImage 10(float) 2D depth array sampled format:Unknown
|
||||
168: TypeSampledImage 167
|
||||
169: TypePointer UniformConstant 168
|
||||
170(s2DArrayShadow): 169(ptr) Variable UniformConstant
|
||||
173: 6(int) Constant 5
|
||||
174: 157(ivec2) ConstantComposite 173 173
|
||||
176: 20(int) Constant 2
|
||||
215: TypeImage 10(float) Cube depth sampled format:Unknown
|
||||
216: TypeSampledImage 215
|
||||
217: TypePointer UniformConstant 216
|
||||
218(sCubeShadow): 217(ptr) Variable UniformConstant
|
||||
224: 20(int) Constant 1
|
||||
232: TypeImage 20(int) Cube array sampled format:Unknown
|
||||
233: TypeSampledImage 232
|
||||
234: TypePointer UniformConstant 233
|
||||
235(usCubeArray): 234(ptr) Variable UniformConstant
|
||||
283: TypeImage 10(float) Rect depth sampled format:Unknown
|
||||
284: TypeSampledImage 283
|
||||
285: TypePointer UniformConstant 284
|
||||
286(s2DRectShadow): 285(ptr) Variable UniformConstant
|
||||
291: 6(int) Constant 6
|
||||
292: 157(ivec2) ConstantComposite 291 291
|
||||
294: 20(int) Constant 3
|
||||
302: TypeImage 6(int) 2D array sampled format:Unknown
|
||||
303: TypeSampledImage 302
|
||||
304: TypePointer UniformConstant 303
|
||||
305(is2DArray): 304(ptr) Variable UniformConstant
|
||||
310: 157(ivec2) ConstantComposite 143 143
|
||||
344: TypePointer Output 11(fvec4)
|
||||
345(outColor): 344(ptr) Variable Output
|
||||
348: TypeBool
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
8(resident): 7(ptr) Variable Function
|
||||
13(texel): 12(ptr) Variable Function
|
||||
18(itexel): 17(ptr) Variable Function
|
||||
23(utexel): 22(ptr) Variable Function
|
||||
346: 12(ptr) Variable Function
|
||||
Store 8(resident) 9
|
||||
Store 13(texel) 15
|
||||
Store 18(itexel) 19
|
||||
Store 23(utexel) 25
|
||||
30: 27 Load 29(s2D)
|
||||
34: 31(fvec2) Load 33(c2)
|
||||
37: 10(float) Load 36(lodClamp)
|
||||
39: 38(ResType) ImageSparseSampleImplicitLod 30 34 MinLod 37
|
||||
40: 11(fvec4) CompositeExtract 39 1
|
||||
Store 13(texel) 40
|
||||
41: 6(int) CompositeExtract 39 0
|
||||
42: 6(int) Load 8(resident)
|
||||
43: 6(int) BitwiseOr 42 41
|
||||
Store 8(resident) 43
|
||||
48: 45 Load 47(s3D)
|
||||
52: 49(fvec3) Load 51(c3)
|
||||
53: 10(float) Load 36(lodClamp)
|
||||
55: 38(ResType) ImageSparseSampleImplicitLod 48 52 Bias MinLod 54 53
|
||||
56: 11(fvec4) CompositeExtract 55 1
|
||||
Store 13(texel) 56
|
||||
57: 6(int) CompositeExtract 55 0
|
||||
58: 6(int) Load 8(resident)
|
||||
59: 6(int) BitwiseOr 58 57
|
||||
Store 8(resident) 59
|
||||
64: 61 Load 63(isCube)
|
||||
65: 49(fvec3) Load 51(c3)
|
||||
66: 10(float) Load 36(lodClamp)
|
||||
68: 67(ResType) ImageSparseSampleImplicitLod 64 65 MinLod 66
|
||||
69: 16(ivec4) CompositeExtract 68 1
|
||||
Store 18(itexel) 69
|
||||
70: 6(int) CompositeExtract 68 0
|
||||
71: 6(int) Load 8(resident)
|
||||
72: 6(int) BitwiseOr 71 70
|
||||
Store 8(resident) 72
|
||||
77: 74 Load 76(s2DShadow)
|
||||
78: 49(fvec3) Load 51(c3)
|
||||
79: 10(float) Load 36(lodClamp)
|
||||
81: 80(ptr) AccessChain 13(texel) 24
|
||||
82: 10(float) CompositeExtract 78 2
|
||||
84: 83(ResType) ImageSparseSampleDrefImplicitLod 77 78 82 MinLod 79
|
||||
85: 10(float) CompositeExtract 84 1
|
||||
Store 81 85
|
||||
86: 6(int) CompositeExtract 84 0
|
||||
87: 6(int) Load 8(resident)
|
||||
88: 6(int) BitwiseOr 87 86
|
||||
Store 8(resident) 88
|
||||
93: 90 Load 92(sCubeArrayShadow)
|
||||
96: 11(fvec4) Load 95(c4)
|
||||
98: 10(float) Load 36(lodClamp)
|
||||
99: 80(ptr) AccessChain 13(texel) 24
|
||||
100: 83(ResType) ImageSparseSampleDrefImplicitLod 93 96 97 MinLod 98
|
||||
101: 10(float) CompositeExtract 100 1
|
||||
Store 99 101
|
||||
102: 6(int) CompositeExtract 100 0
|
||||
103: 6(int) Load 8(resident)
|
||||
104: 6(int) BitwiseOr 103 102
|
||||
Store 8(resident) 104
|
||||
105: 27 Load 29(s2D)
|
||||
106: 31(fvec2) Load 33(c2)
|
||||
107: 10(float) Load 36(lodClamp)
|
||||
108: 11(fvec4) ImageSampleImplicitLod 105 106 MinLod 107
|
||||
109: 11(fvec4) Load 13(texel)
|
||||
110: 11(fvec4) FAdd 109 108
|
||||
Store 13(texel) 110
|
||||
111: 45 Load 47(s3D)
|
||||
112: 49(fvec3) Load 51(c3)
|
||||
113: 10(float) Load 36(lodClamp)
|
||||
114: 11(fvec4) ImageSampleImplicitLod 111 112 Bias MinLod 54 113
|
||||
115: 11(fvec4) Load 13(texel)
|
||||
116: 11(fvec4) FAdd 115 114
|
||||
Store 13(texel) 116
|
||||
117: 61 Load 63(isCube)
|
||||
118: 49(fvec3) Load 51(c3)
|
||||
119: 10(float) Load 36(lodClamp)
|
||||
120: 16(ivec4) ImageSampleImplicitLod 117 118 MinLod 119
|
||||
121: 16(ivec4) Load 18(itexel)
|
||||
122: 16(ivec4) IAdd 121 120
|
||||
Store 18(itexel) 122
|
||||
123: 74 Load 76(s2DShadow)
|
||||
124: 49(fvec3) Load 51(c3)
|
||||
125: 10(float) Load 36(lodClamp)
|
||||
126: 10(float) CompositeExtract 124 2
|
||||
127: 10(float) ImageSampleDrefImplicitLod 123 124 126 MinLod 125
|
||||
128: 80(ptr) AccessChain 13(texel) 24
|
||||
129: 10(float) Load 128
|
||||
130: 10(float) FAdd 129 127
|
||||
131: 80(ptr) AccessChain 13(texel) 24
|
||||
Store 131 130
|
||||
132: 90 Load 92(sCubeArrayShadow)
|
||||
133: 11(fvec4) Load 95(c4)
|
||||
134: 10(float) Load 36(lodClamp)
|
||||
135: 10(float) ImageSampleDrefImplicitLod 132 133 97 MinLod 134
|
||||
136: 80(ptr) AccessChain 13(texel) 24
|
||||
137: 10(float) Load 136
|
||||
138: 10(float) FAdd 137 135
|
||||
139: 80(ptr) AccessChain 13(texel) 24
|
||||
Store 139 138
|
||||
140: 45 Load 47(s3D)
|
||||
141: 49(fvec3) Load 51(c3)
|
||||
145: 10(float) Load 36(lodClamp)
|
||||
146: 38(ResType) ImageSparseSampleImplicitLod 140 141 Bias ConstOffset MinLod 54 144 145
|
||||
147: 11(fvec4) CompositeExtract 146 1
|
||||
Store 13(texel) 147
|
||||
148: 6(int) CompositeExtract 146 0
|
||||
149: 6(int) Load 8(resident)
|
||||
150: 6(int) BitwiseOr 149 148
|
||||
Store 8(resident) 150
|
||||
155: 152 Load 154(us2DRect)
|
||||
156: 31(fvec2) Load 33(c2)
|
||||
160: 10(float) Load 36(lodClamp)
|
||||
162:161(ResType) ImageSparseSampleImplicitLod 155 156 ConstOffset MinLod 159 160
|
||||
163: 21(ivec4) CompositeExtract 162 1
|
||||
Store 23(utexel) 163
|
||||
164: 6(int) CompositeExtract 162 0
|
||||
165: 6(int) Load 8(resident)
|
||||
166: 6(int) BitwiseOr 165 164
|
||||
Store 8(resident) 166
|
||||
171: 168 Load 170(s2DArrayShadow)
|
||||
172: 11(fvec4) Load 95(c4)
|
||||
175: 10(float) Load 36(lodClamp)
|
||||
177: 80(ptr) AccessChain 13(texel) 176
|
||||
178: 10(float) CompositeExtract 172 3
|
||||
179: 83(ResType) ImageSparseSampleDrefImplicitLod 171 172 178 ConstOffset MinLod 174 175
|
||||
180: 10(float) CompositeExtract 179 1
|
||||
Store 177 180
|
||||
181: 6(int) CompositeExtract 179 0
|
||||
182: 6(int) Load 8(resident)
|
||||
183: 6(int) BitwiseOr 182 181
|
||||
Store 8(resident) 183
|
||||
184: 45 Load 47(s3D)
|
||||
185: 49(fvec3) Load 51(c3)
|
||||
186: 10(float) Load 36(lodClamp)
|
||||
187: 11(fvec4) ImageSampleImplicitLod 184 185 Bias ConstOffset MinLod 54 144 186
|
||||
188: 11(fvec4) Load 13(texel)
|
||||
189: 11(fvec4) FAdd 188 187
|
||||
Store 13(texel) 189
|
||||
190: 152 Load 154(us2DRect)
|
||||
191: 31(fvec2) Load 33(c2)
|
||||
192: 10(float) Load 36(lodClamp)
|
||||
193: 21(ivec4) ImageSampleImplicitLod 190 191 ConstOffset MinLod 159 192
|
||||
194: 21(ivec4) Load 23(utexel)
|
||||
195: 21(ivec4) IAdd 194 193
|
||||
Store 23(utexel) 195
|
||||
196: 168 Load 170(s2DArrayShadow)
|
||||
197: 11(fvec4) Load 95(c4)
|
||||
198: 10(float) Load 36(lodClamp)
|
||||
199: 10(float) CompositeExtract 197 3
|
||||
200: 10(float) ImageSampleDrefImplicitLod 196 197 199 ConstOffset MinLod 174 198
|
||||
201: 80(ptr) AccessChain 13(texel) 176
|
||||
202: 10(float) Load 201
|
||||
203: 10(float) FAdd 202 200
|
||||
204: 80(ptr) AccessChain 13(texel) 176
|
||||
Store 204 203
|
||||
205: 45 Load 47(s3D)
|
||||
206: 49(fvec3) Load 51(c3)
|
||||
207: 49(fvec3) Load 51(c3)
|
||||
208: 49(fvec3) Load 51(c3)
|
||||
209: 10(float) Load 36(lodClamp)
|
||||
210: 38(ResType) ImageSparseSampleExplicitLod 205 206 Grad MinLod 207 208 209
|
||||
211: 11(fvec4) CompositeExtract 210 1
|
||||
Store 13(texel) 211
|
||||
212: 6(int) CompositeExtract 210 0
|
||||
213: 6(int) Load 8(resident)
|
||||
214: 6(int) BitwiseOr 213 212
|
||||
Store 8(resident) 214
|
||||
219: 216 Load 218(sCubeShadow)
|
||||
220: 11(fvec4) Load 95(c4)
|
||||
221: 49(fvec3) Load 51(c3)
|
||||
222: 49(fvec3) Load 51(c3)
|
||||
223: 10(float) Load 36(lodClamp)
|
||||
225: 80(ptr) AccessChain 13(texel) 224
|
||||
226: 10(float) CompositeExtract 220 3
|
||||
227: 83(ResType) ImageSparseSampleDrefExplicitLod 219 220 226 Grad MinLod 221 222 223
|
||||
228: 10(float) CompositeExtract 227 1
|
||||
Store 225 228
|
||||
229: 6(int) CompositeExtract 227 0
|
||||
230: 6(int) Load 8(resident)
|
||||
231: 6(int) BitwiseOr 230 229
|
||||
Store 8(resident) 231
|
||||
236: 233 Load 235(usCubeArray)
|
||||
237: 11(fvec4) Load 95(c4)
|
||||
238: 49(fvec3) Load 51(c3)
|
||||
239: 49(fvec3) Load 51(c3)
|
||||
240: 10(float) Load 36(lodClamp)
|
||||
241:161(ResType) ImageSparseSampleExplicitLod 236 237 Grad MinLod 238 239 240
|
||||
242: 21(ivec4) CompositeExtract 241 1
|
||||
Store 23(utexel) 242
|
||||
243: 6(int) CompositeExtract 241 0
|
||||
244: 6(int) Load 8(resident)
|
||||
245: 6(int) BitwiseOr 244 243
|
||||
Store 8(resident) 245
|
||||
246: 45 Load 47(s3D)
|
||||
247: 49(fvec3) Load 51(c3)
|
||||
248: 49(fvec3) Load 51(c3)
|
||||
249: 49(fvec3) Load 51(c3)
|
||||
250: 10(float) Load 36(lodClamp)
|
||||
251: 11(fvec4) ImageSampleExplicitLod 246 247 Grad MinLod 248 249 250
|
||||
252: 11(fvec4) Load 13(texel)
|
||||
253: 11(fvec4) FAdd 252 251
|
||||
Store 13(texel) 253
|
||||
254: 216 Load 218(sCubeShadow)
|
||||
255: 11(fvec4) Load 95(c4)
|
||||
256: 49(fvec3) Load 51(c3)
|
||||
257: 49(fvec3) Load 51(c3)
|
||||
258: 10(float) Load 36(lodClamp)
|
||||
259: 10(float) CompositeExtract 255 3
|
||||
260: 10(float) ImageSampleDrefExplicitLod 254 255 259 Grad MinLod 256 257 258
|
||||
261: 80(ptr) AccessChain 13(texel) 224
|
||||
262: 10(float) Load 261
|
||||
263: 10(float) FAdd 262 260
|
||||
264: 80(ptr) AccessChain 13(texel) 224
|
||||
Store 264 263
|
||||
265: 233 Load 235(usCubeArray)
|
||||
266: 11(fvec4) Load 95(c4)
|
||||
267: 49(fvec3) Load 51(c3)
|
||||
268: 49(fvec3) Load 51(c3)
|
||||
269: 10(float) Load 36(lodClamp)
|
||||
270: 21(ivec4) ImageSampleExplicitLod 265 266 Grad MinLod 267 268 269
|
||||
271: 21(ivec4) Load 23(utexel)
|
||||
272: 21(ivec4) IAdd 271 270
|
||||
Store 23(utexel) 272
|
||||
273: 27 Load 29(s2D)
|
||||
274: 31(fvec2) Load 33(c2)
|
||||
275: 31(fvec2) Load 33(c2)
|
||||
276: 31(fvec2) Load 33(c2)
|
||||
277: 10(float) Load 36(lodClamp)
|
||||
278: 38(ResType) ImageSparseSampleExplicitLod 273 274 Grad ConstOffset MinLod 275 276 174 277
|
||||
279: 11(fvec4) CompositeExtract 278 1
|
||||
Store 13(texel) 279
|
||||
280: 6(int) CompositeExtract 278 0
|
||||
281: 6(int) Load 8(resident)
|
||||
282: 6(int) BitwiseOr 281 280
|
||||
Store 8(resident) 282
|
||||
287: 284 Load 286(s2DRectShadow)
|
||||
288: 49(fvec3) Load 51(c3)
|
||||
289: 31(fvec2) Load 33(c2)
|
||||
290: 31(fvec2) Load 33(c2)
|
||||
293: 10(float) Load 36(lodClamp)
|
||||
295: 80(ptr) AccessChain 13(texel) 294
|
||||
296: 10(float) CompositeExtract 288 2
|
||||
297: 83(ResType) ImageSparseSampleDrefExplicitLod 287 288 296 Grad ConstOffset MinLod 289 290 292 293
|
||||
298: 10(float) CompositeExtract 297 1
|
||||
Store 295 298
|
||||
299: 6(int) CompositeExtract 297 0
|
||||
300: 6(int) Load 8(resident)
|
||||
301: 6(int) BitwiseOr 300 299
|
||||
Store 8(resident) 301
|
||||
306: 303 Load 305(is2DArray)
|
||||
307: 49(fvec3) Load 51(c3)
|
||||
308: 31(fvec2) Load 33(c2)
|
||||
309: 31(fvec2) Load 33(c2)
|
||||
311: 10(float) Load 36(lodClamp)
|
||||
312: 67(ResType) ImageSparseSampleExplicitLod 306 307 Grad ConstOffset MinLod 308 309 310 311
|
||||
313: 16(ivec4) CompositeExtract 312 1
|
||||
Store 18(itexel) 313
|
||||
314: 6(int) CompositeExtract 312 0
|
||||
315: 6(int) Load 8(resident)
|
||||
316: 6(int) BitwiseOr 315 314
|
||||
Store 8(resident) 316
|
||||
317: 27 Load 29(s2D)
|
||||
318: 31(fvec2) Load 33(c2)
|
||||
319: 31(fvec2) Load 33(c2)
|
||||
320: 31(fvec2) Load 33(c2)
|
||||
321: 10(float) Load 36(lodClamp)
|
||||
322: 11(fvec4) ImageSampleExplicitLod 317 318 Grad ConstOffset MinLod 319 320 174 321
|
||||
323: 11(fvec4) Load 13(texel)
|
||||
324: 11(fvec4) FAdd 323 322
|
||||
Store 13(texel) 324
|
||||
325: 284 Load 286(s2DRectShadow)
|
||||
326: 49(fvec3) Load 51(c3)
|
||||
327: 31(fvec2) Load 33(c2)
|
||||
328: 31(fvec2) Load 33(c2)
|
||||
329: 10(float) Load 36(lodClamp)
|
||||
330: 10(float) CompositeExtract 326 2
|
||||
331: 10(float) ImageSampleDrefExplicitLod 325 326 330 Grad ConstOffset MinLod 327 328 292 329
|
||||
332: 80(ptr) AccessChain 13(texel) 294
|
||||
333: 10(float) Load 332
|
||||
334: 10(float) FAdd 333 331
|
||||
335: 80(ptr) AccessChain 13(texel) 294
|
||||
Store 335 334
|
||||
336: 303 Load 305(is2DArray)
|
||||
337: 49(fvec3) Load 51(c3)
|
||||
338: 31(fvec2) Load 33(c2)
|
||||
339: 31(fvec2) Load 33(c2)
|
||||
340: 10(float) Load 36(lodClamp)
|
||||
341: 16(ivec4) ImageSampleExplicitLod 336 337 Grad ConstOffset MinLod 338 339 310 340
|
||||
342: 16(ivec4) Load 18(itexel)
|
||||
343: 16(ivec4) IAdd 342 341
|
||||
Store 18(itexel) 343
|
||||
347: 6(int) Load 8(resident)
|
||||
349: 348(bool) ImageSparseTexelsResident 347
|
||||
SelectionMerge 351 None
|
||||
BranchConditional 349 350 353
|
||||
350: Label
|
||||
352: 11(fvec4) Load 13(texel)
|
||||
Store 346 352
|
||||
Branch 351
|
||||
353: Label
|
||||
354: 16(ivec4) Load 18(itexel)
|
||||
355: 11(fvec4) ConvertSToF 354
|
||||
356: 21(ivec4) Load 23(utexel)
|
||||
357: 11(fvec4) ConvertUToF 356
|
||||
358: 11(fvec4) FAdd 355 357
|
||||
Store 346 358
|
||||
Branch 351
|
||||
351: Label
|
||||
359: 11(fvec4) Load 346
|
||||
Store 345(outColor) 359
|
||||
Return
|
||||
FunctionEnd
|
||||
80
Test/spv.sparseTexture.frag
Normal file
80
Test/spv.sparseTexture.frag
Normal file
@@ -0,0 +1,80 @@
|
||||
#version 450
|
||||
#extension GL_ARB_sparse_texture2: enable
|
||||
|
||||
uniform sampler2D s2D;
|
||||
uniform sampler3D s3D;
|
||||
uniform sampler2DShadow s2DShadow;
|
||||
uniform samplerCubeShadow sCubeShadow;
|
||||
uniform sampler2DArrayShadow s2DArrayShadow;
|
||||
uniform sampler2DRectShadow s2DRectShadow;
|
||||
uniform samplerCubeArrayShadow sCubeArrayShadow;
|
||||
uniform sampler2DMS s2DMS;
|
||||
|
||||
uniform isamplerCube isCube;
|
||||
uniform isampler2DArray is2DArray;
|
||||
|
||||
uniform usamplerCubeArray usCubeArray;
|
||||
uniform usampler2DRect us2DRect;
|
||||
|
||||
uniform vec2 c2;
|
||||
uniform vec3 c3;
|
||||
uniform vec4 c4;
|
||||
|
||||
uniform ivec2 offsets[4];
|
||||
|
||||
out vec4 outColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
int resident = 0;
|
||||
vec4 texel = vec4(0.0);
|
||||
ivec4 itexel = ivec4(0);
|
||||
uvec4 utexel = uvec4(0);
|
||||
|
||||
resident |= sparseTextureARB(s2D, c2, texel);
|
||||
resident |= sparseTextureARB(s3D, c3, texel, 2.0);
|
||||
resident |= sparseTextureARB(isCube, c3, itexel);
|
||||
resident |= sparseTextureARB(s2DShadow, c3, texel.x);
|
||||
resident |= sparseTextureARB(sCubeArrayShadow, c4, 1.0, texel.x);
|
||||
|
||||
resident |= sparseTextureLodARB(s2D, c2, 2.0, texel);
|
||||
resident |= sparseTextureLodARB(usCubeArray, c4, 1.0, utexel);
|
||||
resident |= sparseTextureLodARB(s2DShadow, c3, 2.0, texel.y);
|
||||
|
||||
resident |= sparseTextureOffsetARB(s3D, c3, ivec3(2), texel, 2.0);
|
||||
resident |= sparseTextureOffsetARB(us2DRect, c2, ivec2(3), utexel);
|
||||
resident |= sparseTextureOffsetARB(s2DArrayShadow, c4, ivec2(5), texel.z);
|
||||
|
||||
resident |= sparseTexelFetchARB(s2D, ivec2(c2), 2, texel);
|
||||
resident |= sparseTexelFetchARB(us2DRect, ivec2(c2), utexel);
|
||||
resident |= sparseTexelFetchARB(s2DMS, ivec2(c2), 4, texel);
|
||||
|
||||
resident |= sparseTexelFetchOffsetARB(s3D, ivec3(c3), 2, ivec3(4), texel);
|
||||
resident |= sparseTexelFetchOffsetARB(us2DRect, ivec2(c2), ivec2(3), utexel);
|
||||
|
||||
resident |= sparseTextureLodOffsetARB(s2D, c2, 2.0, ivec2(5), texel);
|
||||
resident |= sparseTextureLodOffsetARB(is2DArray, c3, 2.0, ivec2(6), itexel);
|
||||
resident |= sparseTextureLodOffsetARB(s2DShadow, c3, 2.0, ivec2(7), texel.z);
|
||||
|
||||
resident |= sparseTextureGradARB(s3D, c3, c3, c3, texel);
|
||||
resident |= sparseTextureGradARB(sCubeShadow, c4, c3, c3, texel.y);
|
||||
resident |= sparseTextureGradARB(usCubeArray, c4, c3, c3, utexel);
|
||||
|
||||
resident |= sparseTextureGradOffsetARB(s2D, c2, c2, c2, ivec2(5), texel);
|
||||
resident |= sparseTextureGradOffsetARB(s2DRectShadow, c3, c2, c2, ivec2(6), texel.w);
|
||||
resident |= sparseTextureGradOffsetARB(is2DArray, c3, c2, c2, ivec2(2), itexel);
|
||||
|
||||
resident |= sparseTextureGatherARB(s2D, c2, texel);
|
||||
resident |= sparseTextureGatherARB(is2DArray, c3, itexel, 2);
|
||||
resident |= sparseTextureGatherARB(s2DArrayShadow, c3, 2.0, texel);
|
||||
|
||||
resident |= sparseTextureGatherOffsetARB(s2D, c2, ivec2(4), texel);
|
||||
resident |= sparseTextureGatherOffsetARB(is2DArray, c3, ivec2(5), itexel, 2);
|
||||
resident |= sparseTextureGatherOffsetARB(s2DRectShadow, c2, 2.0, ivec2(7), texel);
|
||||
|
||||
resident |= sparseTextureGatherOffsetsARB(s2D, c2, offsets, texel);
|
||||
resident |= sparseTextureGatherOffsetsARB(is2DArray, c3, offsets, itexel, 2);
|
||||
resident |= sparseTextureGatherOffsetsARB(s2DRectShadow, c2, 2.0, offsets, texel);
|
||||
|
||||
outColor = sparseTexelsResidentARB(resident) ? texel : vec4(itexel) + vec4(utexel);
|
||||
}
|
||||
70
Test/spv.sparseTextureClamp.frag
Normal file
70
Test/spv.sparseTextureClamp.frag
Normal file
@@ -0,0 +1,70 @@
|
||||
#version 450
|
||||
#extension GL_ARB_sparse_texture_clamp: enable
|
||||
|
||||
uniform sampler2D s2D;
|
||||
uniform sampler3D s3D;
|
||||
uniform sampler2DShadow s2DShadow;
|
||||
uniform samplerCubeShadow sCubeShadow;
|
||||
uniform sampler2DArrayShadow s2DArrayShadow;
|
||||
uniform sampler2DRectShadow s2DRectShadow;
|
||||
uniform samplerCubeArrayShadow sCubeArrayShadow;
|
||||
|
||||
uniform isamplerCube isCube;
|
||||
uniform isampler2DArray is2DArray;
|
||||
|
||||
uniform usamplerCubeArray usCubeArray;
|
||||
uniform usampler2DRect us2DRect;
|
||||
|
||||
uniform vec2 c2;
|
||||
uniform vec3 c3;
|
||||
uniform vec4 c4;
|
||||
|
||||
uniform float lodClamp;
|
||||
|
||||
out vec4 outColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
int resident = 0;
|
||||
vec4 texel = vec4(0.0);
|
||||
ivec4 itexel = ivec4(0);
|
||||
uvec4 utexel = uvec4(0);
|
||||
|
||||
resident |= sparseTextureClampARB(s2D, c2, lodClamp, texel);
|
||||
resident |= sparseTextureClampARB(s3D, c3, lodClamp, texel, 2.0);
|
||||
resident |= sparseTextureClampARB(isCube, c3, lodClamp, itexel);
|
||||
resident |= sparseTextureClampARB(s2DShadow, c3, lodClamp, texel.x);
|
||||
resident |= sparseTextureClampARB(sCubeArrayShadow, c4, 1.0, lodClamp, texel.x);
|
||||
|
||||
texel += textureClampARB(s2D, c2, lodClamp);
|
||||
texel += textureClampARB(s3D, c3, lodClamp, 2.0);
|
||||
itexel += textureClampARB(isCube, c3, lodClamp);
|
||||
texel.x += textureClampARB(s2DShadow, c3, lodClamp);
|
||||
texel.x += textureClampARB(sCubeArrayShadow, c4, 1.0, lodClamp);
|
||||
|
||||
resident |= sparseTextureOffsetClampARB(s3D, c3, ivec3(2), lodClamp, texel, 2.0);
|
||||
resident |= sparseTextureOffsetClampARB(us2DRect, c2, ivec2(3), lodClamp, utexel);
|
||||
resident |= sparseTextureOffsetClampARB(s2DArrayShadow, c4, ivec2(5), lodClamp, texel.z);
|
||||
|
||||
texel += textureOffsetClampARB(s3D, c3, ivec3(2), lodClamp, 2.0);
|
||||
utexel += textureOffsetClampARB(us2DRect, c2, ivec2(3), lodClamp);
|
||||
texel.z += textureOffsetClampARB(s2DArrayShadow, c4, ivec2(5), lodClamp);
|
||||
|
||||
resident |= sparseTextureGradClampARB(s3D, c3, c3, c3, lodClamp, texel);
|
||||
resident |= sparseTextureGradClampARB(sCubeShadow, c4, c3, c3, lodClamp, texel.y);
|
||||
resident |= sparseTextureGradClampARB(usCubeArray, c4, c3, c3, lodClamp, utexel);
|
||||
|
||||
texel += textureGradClampARB(s3D, c3, c3, c3, lodClamp);
|
||||
texel.y += textureGradClampARB(sCubeShadow, c4, c3, c3, lodClamp);
|
||||
utexel += textureGradClampARB(usCubeArray, c4, c3, c3, lodClamp);
|
||||
|
||||
resident |= sparseTextureGradOffsetClampARB(s2D, c2, c2, c2, ivec2(5), lodClamp, texel);
|
||||
resident |= sparseTextureGradOffsetClampARB(s2DRectShadow, c3, c2, c2, ivec2(6), lodClamp, texel.w);
|
||||
resident |= sparseTextureGradOffsetClampARB(is2DArray, c3, c2, c2, ivec2(2), lodClamp, itexel);
|
||||
|
||||
texel += textureGradOffsetClampARB(s2D, c2, c2, c2, ivec2(5), lodClamp);
|
||||
texel.w += textureGradOffsetClampARB(s2DRectShadow, c3, c2, c2, ivec2(6), lodClamp);
|
||||
itexel += textureGradOffsetClampARB(is2DArray, c3, c2, c2, ivec2(2), lodClamp);
|
||||
|
||||
outColor = sparseTexelsResidentARB(resident) ? texel : vec4(itexel) + vec4(utexel);
|
||||
}
|
||||
@@ -66,6 +66,8 @@ spv.qualifiers.vert
|
||||
spv.shiftOps.frag
|
||||
spv.simpleFunctionCall.frag
|
||||
spv.simpleMat.vert
|
||||
spv.sparseTexture.frag
|
||||
spv.sparseTextureClamp.frag
|
||||
spv.structAssignment.frag
|
||||
spv.structDeref.frag
|
||||
spv.structure.frag
|
||||
|
||||
Reference in New Issue
Block a user