| SKIP: FAILED |
| |
| ../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: buf0 = struct @align(8) { |
| injectionSwitch:vec2<f32> @offset(0) |
| } |
| |
| buf1 = struct @align(8) { |
| resolution:vec2<f32> @offset(0) |
| } |
| |
| main_out = struct @align(16) { |
| x_GLF_color_1:vec4<f32> @offset(0), @location(0) |
| } |
| |
| $B1: { # root |
| %data:ptr<private, array<i32, 10>, read_write> = var |
| %temp:ptr<private, array<i32, 10>, read_write> = var |
| %x_28:ptr<uniform, buf0, read> = var @binding_point(0, 0) |
| %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var |
| %x_GLF_color:ptr<private, vec4<f32>, read_write> = var |
| %x_32:ptr<uniform, buf1, read> = var @binding_point(0, 1) |
| %continue_execution:ptr<private, bool, read_write> = var, true |
| } |
| |
| %merge_i1_i1_i1_ = func(%f:ptr<function, i32, read_write>, %mid:ptr<function, i32, read_write>, %to:ptr<function, i32, read_write>):void { |
| $B2: { |
| %k:ptr<function, i32, read_write> = var |
| %i:ptr<function, i32, read_write> = var |
| %j:ptr<function, i32, read_write> = var |
| %i_1:ptr<function, i32, read_write> = var |
| %16:i32 = load %f |
| %x_254:i32 = let %16 |
| store %k, %x_254 |
| %18:i32 = load %f |
| %x_255:i32 = let %18 |
| store %i, %x_255 |
| %20:i32 = load %mid |
| %x_256:i32 = let %20 |
| %22:i32 = add %x_256, 1i |
| store %j, %22 |
| loop [b: $B3, c: $B4] { # loop_1 |
| $B3: { # body |
| %23:i32 = load %i |
| %x_262:i32 = let %23 |
| %25:i32 = load %mid |
| %x_263:i32 = let %25 |
| %27:i32 = load %j |
| %x_265:i32 = let %27 |
| %29:i32 = load %to |
| %x_266:i32 = let %29 |
| %31:bool = lte %x_262, %x_263 |
| %32:bool = lte %x_265, %x_266 |
| %33:bool = and %31, %32 |
| if %33 [t: $B5, f: $B6] { # if_1 |
| $B5: { # true |
| exit_if # if_1 |
| } |
| $B6: { # false |
| exit_loop # loop_1 |
| } |
| } |
| %34:i32 = load %i |
| %x_270:i32 = let %34 |
| %36:ptr<private, i32, read_write> = access %data, %x_270 |
| %37:i32 = load %36 |
| %x_272:i32 = let %37 |
| %39:i32 = load %j |
| %x_273:i32 = let %39 |
| %41:ptr<private, i32, read_write> = access %data, %x_273 |
| %42:i32 = load %41 |
| %x_275:i32 = let %42 |
| %44:bool = lt %x_272, %x_275 |
| if %44 [t: $B7, f: $B8] { # if_2 |
| $B7: { # true |
| %45:i32 = load %k |
| %x_280:i32 = let %45 |
| %47:i32 = add %x_280, 1i |
| store %k, %47 |
| %48:i32 = load %i |
| %x_282:i32 = let %48 |
| %50:i32 = add %x_282, 1i |
| store %i, %50 |
| %51:ptr<private, i32, read_write> = access %data, %x_282 |
| %52:i32 = load %51 |
| %x_285:i32 = let %52 |
| %54:ptr<private, i32, read_write> = access %temp, %x_280 |
| store %54, %x_285 |
| exit_if # if_2 |
| } |
| $B8: { # false |
| %55:i32 = load %k |
| %x_287:i32 = let %55 |
| %57:i32 = add %x_287, 1i |
| store %k, %57 |
| %58:i32 = load %j |
| %x_289:i32 = let %58 |
| %60:i32 = add %x_289, 1i |
| store %j, %60 |
| %61:ptr<private, i32, read_write> = access %data, %x_289 |
| %62:i32 = load %61 |
| %x_292:i32 = let %62 |
| %64:ptr<private, i32, read_write> = access %temp, %x_287 |
| store %64, %x_292 |
| exit_if # if_2 |
| } |
| } |
| continue # -> $B4 |
| } |
| $B4: { # continuing |
| next_iteration # -> $B3 |
| } |
| } |
| loop [b: $B9, c: $B10] { # loop_2 |
| $B9: { # body |
| %65:i32 = load %i |
| %x_298:i32 = let %65 |
| %67:i32 = load %i |
| %x_300:i32 = let %67 |
| %69:i32 = load %mid |
| %x_301:i32 = let %69 |
| %71:bool = lt %x_298, 10i |
| %72:bool = lte %x_300, %x_301 |
| %73:bool = and %71, %72 |
| if %73 [t: $B11, f: $B12] { # if_3 |
| $B11: { # true |
| exit_if # if_3 |
| } |
| $B12: { # false |
| exit_loop # loop_2 |
| } |
| } |
| %74:i32 = load %k |
| %x_305:i32 = let %74 |
| %76:i32 = add %x_305, 1i |
| store %k, %76 |
| %77:i32 = load %i |
| %x_307:i32 = let %77 |
| %79:i32 = add %x_307, 1i |
| store %i, %79 |
| %80:ptr<private, i32, read_write> = access %data, %x_307 |
| %81:i32 = load %80 |
| %x_310:i32 = let %81 |
| %83:ptr<private, i32, read_write> = access %temp, %x_305 |
| store %83, %x_310 |
| continue # -> $B10 |
| } |
| $B10: { # continuing |
| next_iteration # -> $B9 |
| } |
| } |
| %84:i32 = load %f |
| %x_312:i32 = let %84 |
| store %i_1, %x_312 |
| loop [b: $B13, c: $B14] { # loop_3 |
| $B13: { # body |
| %86:i32 = load %i_1 |
| %x_317:i32 = let %86 |
| %88:i32 = load %to |
| %x_318:i32 = let %88 |
| %90:bool = lte %x_317, %x_318 |
| if %90 [t: $B15, f: $B16] { # if_4 |
| $B15: { # true |
| exit_if # if_4 |
| } |
| $B16: { # false |
| exit_loop # loop_3 |
| } |
| } |
| %91:i32 = load %i_1 |
| %x_321:i32 = let %91 |
| %93:i32 = load %i_1 |
| %x_322:i32 = let %93 |
| %95:ptr<private, i32, read_write> = access %temp, %x_322 |
| %96:i32 = load %95 |
| %x_324:i32 = let %96 |
| %98:ptr<private, i32, read_write> = access %data, %x_321 |
| store %98, %x_324 |
| continue # -> $B14 |
| } |
| $B14: { # continuing |
| %99:i32 = load %i_1 |
| %x_326:i32 = let %99 |
| %101:i32 = add %x_326, 1i |
| store %i_1, %101 |
| next_iteration # -> $B13 |
| } |
| } |
| ret |
| } |
| } |
| %mergeSort_ = func():void { |
| $B17: { |
| %low:ptr<function, i32, read_write> = var |
| %high:ptr<function, i32, read_write> = var |
| %m:ptr<function, i32, read_write> = var |
| %i_2:ptr<function, i32, read_write> = var |
| %f_1:ptr<function, i32, read_write> = var |
| %mid_1:ptr<function, i32, read_write> = var |
| %to_1:ptr<function, i32, read_write> = var |
| %param:ptr<function, i32, read_write> = var |
| %param_1:ptr<function, i32, read_write> = var |
| %param_2:ptr<function, i32, read_write> = var |
| store %low, 0i |
| store %high, 9i |
| store %m, 1i |
| loop [b: $B18, c: $B19] { # loop_4 |
| $B18: { # body |
| %113:i32 = load %m |
| %x_333:i32 = let %113 |
| %115:i32 = load %high |
| %x_334:i32 = let %115 |
| %117:bool = lte %x_333, %x_334 |
| if %117 [t: $B20, f: $B21] { # if_5 |
| $B20: { # true |
| exit_if # if_5 |
| } |
| $B21: { # false |
| exit_loop # loop_4 |
| } |
| } |
| %118:i32 = load %low |
| %x_337:i32 = let %118 |
| store %i_2, %x_337 |
| loop [b: $B22, c: $B23] { # loop_5 |
| $B22: { # body |
| %120:i32 = load %i_2 |
| %x_342:i32 = let %120 |
| %122:i32 = load %high |
| %x_343:i32 = let %122 |
| %124:bool = lt %x_342, %x_343 |
| if %124 [t: $B24, f: $B25] { # if_6 |
| $B24: { # true |
| exit_if # if_6 |
| } |
| $B25: { # false |
| exit_loop # loop_5 |
| } |
| } |
| %125:i32 = load %i_2 |
| %x_346:i32 = let %125 |
| store %f_1, %x_346 |
| %127:i32 = load %i_2 |
| %x_347:i32 = let %127 |
| %129:i32 = load %m |
| %x_348:i32 = let %129 |
| %131:i32 = add %x_347, %x_348 |
| %132:i32 = sub %131, 1i |
| store %mid_1, %132 |
| %133:i32 = load %i_2 |
| %x_351:i32 = let %133 |
| %135:i32 = load %m |
| %x_352:i32 = let %135 |
| %137:i32 = load %high |
| %x_356:i32 = let %137 |
| %139:i32 = mul 2i, %x_352 |
| %140:i32 = add %x_351, %139 |
| %141:i32 = sub %140, 1i |
| %142:i32 = min %141, %x_356 |
| store %to_1, %142 |
| %143:i32 = load %f_1 |
| %x_358:i32 = let %143 |
| store %param, %x_358 |
| %145:i32 = load %mid_1 |
| %x_359:i32 = let %145 |
| store %param_1, %x_359 |
| %147:i32 = load %to_1 |
| %x_360:i32 = let %147 |
| store %param_2, %x_360 |
| %149:void = call %merge_i1_i1_i1_, %param, %param_1, %param_2 |
| continue # -> $B23 |
| } |
| $B23: { # continuing |
| %150:i32 = load %m |
| %x_362:i32 = let %150 |
| %152:i32 = load %i_2 |
| %x_364:i32 = let %152 |
| %154:i32 = mul 2i, %x_362 |
| %155:i32 = add %x_364, %154 |
| store %i_2, %155 |
| next_iteration # -> $B22 |
| } |
| } |
| continue # -> $B19 |
| } |
| $B19: { # continuing |
| %156:i32 = load %m |
| %x_366:i32 = let %156 |
| %158:i32 = mul 2i, %x_366 |
| store %m, %158 |
| next_iteration # -> $B18 |
| } |
| } |
| ret |
| } |
| } |
| %main_1 = func():void { |
| $B26: { |
| %i_3:ptr<function, i32, read_write> = var |
| %j_1:ptr<function, i32, read_write> = var |
| %grey:ptr<function, f32, read_write> = var |
| %163:ptr<uniform, vec2<f32>, read> = access %x_28, 0u |
| %164:f32 = load_vector_element %163, 0u |
| %x_87:f32 = let %164 |
| %166:i32 = call %tint_f32_to_i32, %x_87 |
| store %i_3, %166 |
| loop [b: $B27, c: $B28] { # loop_6 |
| $B27: { # body |
| %168:i32 = load %i_3 |
| %x_93:i32 = let %168 |
| switch %x_93 [c: (9i, $B29), c: (8i, $B30), c: (7i, $B31), c: (6i, $B32), c: (5i, $B33), c: (4i, $B34), c: (3i, $B35), c: (2i, $B36), c: (1i, $B37), c: (0i, $B38), c: (default, $B39)] { # switch_1 |
| $B29: { # case |
| %170:i32 = load %i_3 |
| %x_123:i32 = let %170 |
| %172:ptr<private, i32, read_write> = access %data, %x_123 |
| store %172, -5i |
| exit_switch # switch_1 |
| } |
| $B30: { # case |
| %173:i32 = load %i_3 |
| %x_121:i32 = let %173 |
| %175:ptr<private, i32, read_write> = access %data, %x_121 |
| store %175, -4i |
| exit_switch # switch_1 |
| } |
| $B31: { # case |
| %176:i32 = load %i_3 |
| %x_119:i32 = let %176 |
| %178:ptr<private, i32, read_write> = access %data, %x_119 |
| store %178, -3i |
| exit_switch # switch_1 |
| } |
| $B32: { # case |
| %179:i32 = load %i_3 |
| %x_117:i32 = let %179 |
| %181:ptr<private, i32, read_write> = access %data, %x_117 |
| store %181, -2i |
| exit_switch # switch_1 |
| } |
| $B33: { # case |
| %182:i32 = load %i_3 |
| %x_115:i32 = let %182 |
| %184:ptr<private, i32, read_write> = access %data, %x_115 |
| store %184, -1i |
| exit_switch # switch_1 |
| } |
| $B34: { # case |
| %185:i32 = load %i_3 |
| %x_113:i32 = let %185 |
| %187:ptr<private, i32, read_write> = access %data, %x_113 |
| store %187, 0i |
| exit_switch # switch_1 |
| } |
| $B35: { # case |
| %188:i32 = load %i_3 |
| %x_111:i32 = let %188 |
| %190:ptr<private, i32, read_write> = access %data, %x_111 |
| store %190, 1i |
| exit_switch # switch_1 |
| } |
| $B36: { # case |
| %191:i32 = load %i_3 |
| %x_109:i32 = let %191 |
| %193:ptr<private, i32, read_write> = access %data, %x_109 |
| store %193, 2i |
| exit_switch # switch_1 |
| } |
| $B37: { # case |
| %194:i32 = load %i_3 |
| %x_107:i32 = let %194 |
| %196:ptr<private, i32, read_write> = access %data, %x_107 |
| store %196, 3i |
| exit_switch # switch_1 |
| } |
| $B38: { # case |
| %197:i32 = load %i_3 |
| %x_105:i32 = let %197 |
| %199:ptr<private, i32, read_write> = access %data, %x_105 |
| store %199, 4i |
| exit_switch # switch_1 |
| } |
| $B39: { # case |
| exit_switch # switch_1 |
| } |
| } |
| %200:i32 = load %i_3 |
| %x_125:i32 = let %200 |
| %202:i32 = add %x_125, 1i |
| store %i_3, %202 |
| continue # -> $B28 |
| } |
| $B28: { # continuing |
| %203:i32 = load %i_3 |
| %x_127:i32 = let %203 |
| %205:bool = lt %x_127, 10i |
| %206:bool = eq %205, false |
| break_if %206 # -> [t: exit_loop loop_6, f: $B27] |
| } |
| } |
| store %j_1, 0i |
| loop [b: $B40, c: $B41] { # loop_7 |
| $B40: { # body |
| %207:i32 = load %j_1 |
| %x_133:i32 = let %207 |
| %209:bool = lt %x_133, 10i |
| if %209 [t: $B42, f: $B43] { # if_7 |
| $B42: { # true |
| exit_if # if_7 |
| } |
| $B43: { # false |
| exit_loop # loop_7 |
| } |
| } |
| %210:i32 = load %j_1 |
| %x_136:i32 = let %210 |
| %212:i32 = load %j_1 |
| %x_137:i32 = let %212 |
| %214:ptr<private, i32, read_write> = access %data, %x_137 |
| %215:i32 = load %214 |
| %x_139:i32 = let %215 |
| %217:ptr<private, i32, read_write> = access %temp, %x_136 |
| store %217, %x_139 |
| continue # -> $B41 |
| } |
| $B41: { # continuing |
| %218:i32 = load %j_1 |
| %x_141:i32 = let %218 |
| %220:i32 = add %x_141, 1i |
| store %j_1, %220 |
| next_iteration # -> $B40 |
| } |
| } |
| %221:void = call %mergeSort_ |
| %222:f32 = load_vector_element %gl_FragCoord, 1u |
| %x_145:f32 = let %222 |
| %224:i32 = call %tint_f32_to_i32, %x_145 |
| %225:bool = lt %224, 30i |
| if %225 [t: $B44, f: $B45] { # if_8 |
| $B44: { # true |
| %226:ptr<private, i32, read_write> = access %data, 0i |
| %227:i32 = load %226 |
| %x_152:i32 = let %227 |
| %229:f32 = convert %x_152 |
| %230:f32 = div %229, 10.0f |
| %231:f32 = add 0.5f, %230 |
| store %grey, %231 |
| exit_if # if_8 |
| } |
| $B45: { # false |
| %232:f32 = load_vector_element %gl_FragCoord, 1u |
| %x_157:f32 = let %232 |
| %234:i32 = call %tint_f32_to_i32, %x_157 |
| %235:bool = lt %234, 60i |
| if %235 [t: $B46, f: $B47] { # if_9 |
| $B46: { # true |
| %236:ptr<private, i32, read_write> = access %data, 1i |
| %237:i32 = load %236 |
| %x_164:i32 = let %237 |
| %239:f32 = convert %x_164 |
| %240:f32 = div %239, 10.0f |
| %241:f32 = add 0.5f, %240 |
| store %grey, %241 |
| exit_if # if_9 |
| } |
| $B47: { # false |
| %242:f32 = load_vector_element %gl_FragCoord, 1u |
| %x_169:f32 = let %242 |
| %244:i32 = call %tint_f32_to_i32, %x_169 |
| %245:bool = lt %244, 90i |
| if %245 [t: $B48, f: $B49] { # if_10 |
| $B48: { # true |
| %246:ptr<private, i32, read_write> = access %data, 2i |
| %247:i32 = load %246 |
| %x_176:i32 = let %247 |
| %249:f32 = convert %x_176 |
| %250:f32 = div %249, 10.0f |
| %251:f32 = add 0.5f, %250 |
| store %grey, %251 |
| exit_if # if_10 |
| } |
| $B49: { # false |
| %252:f32 = load_vector_element %gl_FragCoord, 1u |
| %x_181:f32 = let %252 |
| %254:i32 = call %tint_f32_to_i32, %x_181 |
| %255:bool = lt %254, 120i |
| if %255 [t: $B50, f: $B51] { # if_11 |
| $B50: { # true |
| %256:ptr<private, i32, read_write> = access %data, 3i |
| %257:i32 = load %256 |
| %x_188:i32 = let %257 |
| %259:f32 = convert %x_188 |
| %260:f32 = div %259, 10.0f |
| %261:f32 = add 0.5f, %260 |
| store %grey, %261 |
| exit_if # if_11 |
| } |
| $B51: { # false |
| %262:f32 = load_vector_element %gl_FragCoord, 1u |
| %x_193:f32 = let %262 |
| %264:i32 = call %tint_f32_to_i32, %x_193 |
| %265:bool = lt %264, 150i |
| if %265 [t: $B52, f: $B53] { # if_12 |
| $B52: { # true |
| store %continue_execution, false |
| exit_if # if_12 |
| } |
| $B53: { # false |
| %266:f32 = load_vector_element %gl_FragCoord, 1u |
| %x_200:f32 = let %266 |
| %268:i32 = call %tint_f32_to_i32, %x_200 |
| %269:bool = lt %268, 180i |
| if %269 [t: $B54, f: $B55] { # if_13 |
| $B54: { # true |
| %270:ptr<private, i32, read_write> = access %data, 5i |
| %271:i32 = load %270 |
| %x_207:i32 = let %271 |
| %273:f32 = convert %x_207 |
| %274:f32 = div %273, 10.0f |
| %275:f32 = add 0.5f, %274 |
| store %grey, %275 |
| exit_if # if_13 |
| } |
| $B55: { # false |
| %276:f32 = load_vector_element %gl_FragCoord, 1u |
| %x_212:f32 = let %276 |
| %278:i32 = call %tint_f32_to_i32, %x_212 |
| %279:bool = lt %278, 210i |
| if %279 [t: $B56, f: $B57] { # if_14 |
| $B56: { # true |
| %280:ptr<private, i32, read_write> = access %data, 6i |
| %281:i32 = load %280 |
| %x_219:i32 = let %281 |
| %283:f32 = convert %x_219 |
| %284:f32 = div %283, 10.0f |
| %285:f32 = add 0.5f, %284 |
| store %grey, %285 |
| exit_if # if_14 |
| } |
| $B57: { # false |
| %286:f32 = load_vector_element %gl_FragCoord, 1u |
| %x_224:f32 = let %286 |
| %288:i32 = call %tint_f32_to_i32, %x_224 |
| %289:bool = lt %288, 240i |
| if %289 [t: $B58, f: $B59] { # if_15 |
| $B58: { # true |
| %290:ptr<private, i32, read_write> = access %data, 7i |
| %291:i32 = load %290 |
| %x_231:i32 = let %291 |
| %293:f32 = convert %x_231 |
| %294:f32 = div %293, 10.0f |
| %295:f32 = add 0.5f, %294 |
| store %grey, %295 |
| exit_if # if_15 |
| } |
| $B59: { # false |
| %296:f32 = load_vector_element %gl_FragCoord, 1u |
| %x_236:f32 = let %296 |
| %298:i32 = call %tint_f32_to_i32, %x_236 |
| %299:bool = lt %298, 270i |
| if %299 [t: $B60, f: $B61] { # if_16 |
| $B60: { # true |
| %300:ptr<private, i32, read_write> = access %data, 8i |
| %301:i32 = load %300 |
| %x_243:i32 = let %301 |
| %303:f32 = convert %x_243 |
| %304:f32 = div %303, 10.0f |
| %305:f32 = add 0.5f, %304 |
| store %grey, %305 |
| exit_if # if_16 |
| } |
| $B61: { # false |
| store %continue_execution, false |
| exit_if # if_16 |
| } |
| } |
| exit_if # if_15 |
| } |
| } |
| exit_if # if_14 |
| } |
| } |
| exit_if # if_13 |
| } |
| } |
| exit_if # if_12 |
| } |
| } |
| exit_if # if_11 |
| } |
| } |
| exit_if # if_10 |
| } |
| } |
| exit_if # if_9 |
| } |
| } |
| exit_if # if_8 |
| } |
| } |
| %306:f32 = load %grey |
| %x_247:f32 = let %306 |
| %308:vec3<f32> = construct %x_247, %x_247, %x_247 |
| %x_248:vec3<f32> = let %308 |
| %310:f32 = access %x_248, 0u |
| %311:f32 = access %x_248, 1u |
| %312:f32 = access %x_248, 2u |
| %313:vec4<f32> = construct %310, %311, %312, 1.0f |
| store %x_GLF_color, %313 |
| ret |
| } |
| } |
| %tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out { |
| $B62: { |
| store %gl_FragCoord, %gl_FragCoord_param |
| %316:void = call %main_1 |
| %317:vec4<f32> = load %x_GLF_color |
| %318:main_out = construct %317 |
| %319:bool = load %continue_execution |
| %320:bool = eq %319, false |
| if %320 [t: $B63] { # if_17 |
| $B63: { # true |
| terminate_invocation |
| } |
| } |
| ret %318 |
| } |
| } |
| %tint_f32_to_i32 = func(%value:f32):i32 { |
| $B64: { |
| %322:i32 = convert %value |
| %323:bool = gte %value, -2147483648.0f |
| %324:i32 = select -2147483648i, %322, %323 |
| %325:bool = lte %value, 2147483520.0f |
| %326:i32 = select 2147483647i, %324, %325 |
| ret %326 |
| } |
| } |
| |
| unhandled variable address space |
| ******************************************************************** |
| * The tint shader compiler has encountered an unexpected error. * |
| * * |
| * Please help us fix this issue by submitting a bug report at * |
| * crbug.com/tint with the source program that triggered the bug. * |
| ******************************************************************** |