| SKIP: FAILED |
| |
| ../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: buf0 = struct @align(8) { |
| injectionSwitch: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 |
| %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 |
| %15:i32 = load %f |
| store %k, %15 |
| %16:i32 = load %f |
| store %i, %16 |
| %17:i32 = load %mid |
| %18:i32 = add %17, 1i |
| store %j, %18 |
| loop [b: $B3, c: $B4] { # loop_1 |
| $B3: { # body |
| %19:i32 = load %i |
| %20:i32 = load %mid |
| %21:bool = lte %19, %20 |
| %22:i32 = load %j |
| %23:i32 = load %to |
| %24:bool = lte %22, %23 |
| %25:bool = and %21, %24 |
| if %25 [t: $B5, f: $B6] { # if_1 |
| $B5: { # true |
| exit_if # if_1 |
| } |
| $B6: { # false |
| exit_loop # loop_1 |
| } |
| } |
| %26:i32 = load %i |
| %27:ptr<private, i32, read_write> = access %data, %26 |
| %28:i32 = load %27 |
| %29:i32 = load %j |
| %30:ptr<private, i32, read_write> = access %data, %29 |
| %31:i32 = load %30 |
| %32:bool = lt %28, %31 |
| if %32 [t: $B7, f: $B8] { # if_2 |
| $B7: { # true |
| %33:i32 = load %k |
| %x_329:i32 = let %33 |
| %35:i32 = load %k |
| %36:i32 = add %35, 1i |
| store %k, %36 |
| %37:i32 = load %i |
| %x_331:i32 = let %37 |
| %39:i32 = load %i |
| %40:i32 = add %39, 1i |
| store %i, %40 |
| %41:ptr<private, i32, read_write> = access %temp, %x_329 |
| %42:ptr<private, i32, read_write> = access %data, %x_331 |
| %43:i32 = load %42 |
| store %41, %43 |
| exit_if # if_2 |
| } |
| $B8: { # false |
| %44:i32 = load %k |
| %x_336:i32 = let %44 |
| %46:i32 = load %k |
| %47:i32 = add %46, 1i |
| store %k, %47 |
| %48:i32 = load %j |
| %x_338:i32 = let %48 |
| %50:i32 = load %j |
| %51:i32 = add %50, 1i |
| store %j, %51 |
| %52:ptr<private, i32, read_write> = access %temp, %x_336 |
| %53:ptr<private, i32, read_write> = access %data, %x_338 |
| %54:i32 = load %53 |
| store %52, %54 |
| exit_if # if_2 |
| } |
| } |
| continue # -> $B4 |
| } |
| $B4: { # continuing |
| next_iteration # -> $B3 |
| } |
| } |
| loop [b: $B9, c: $B10] { # loop_2 |
| $B9: { # body |
| %55:i32 = load %i |
| %56:bool = lt %55, 10i |
| %57:i32 = load %i |
| %58:i32 = load %mid |
| %59:bool = lte %57, %58 |
| %60:bool = and %56, %59 |
| if %60 [t: $B11, f: $B12] { # if_3 |
| $B11: { # true |
| exit_if # if_3 |
| } |
| $B12: { # false |
| exit_loop # loop_2 |
| } |
| } |
| %61:i32 = load %k |
| %x_354:i32 = let %61 |
| %63:i32 = load %k |
| %64:i32 = add %63, 1i |
| store %k, %64 |
| %65:i32 = load %i |
| %x_356:i32 = let %65 |
| %67:i32 = load %i |
| %68:i32 = add %67, 1i |
| store %i, %68 |
| %69:ptr<private, i32, read_write> = access %temp, %x_354 |
| %70:ptr<private, i32, read_write> = access %data, %x_356 |
| %71:i32 = load %70 |
| store %69, %71 |
| continue # -> $B10 |
| } |
| $B10: { # continuing |
| next_iteration # -> $B9 |
| } |
| } |
| %72:i32 = load %f |
| store %i_1, %72 |
| loop [b: $B13, c: $B14] { # loop_3 |
| $B13: { # body |
| %73:i32 = load %i_1 |
| %74:i32 = load %to |
| %75:bool = lte %73, %74 |
| if %75 [t: $B15, f: $B16] { # if_4 |
| $B15: { # true |
| exit_if # if_4 |
| } |
| $B16: { # false |
| exit_loop # loop_3 |
| } |
| } |
| %76:i32 = load %i_1 |
| %x_370:i32 = let %76 |
| %78:ptr<private, i32, read_write> = access %data, %x_370 |
| %79:i32 = load %i_1 |
| %80:ptr<private, i32, read_write> = access %temp, %79 |
| %81:i32 = load %80 |
| store %78, %81 |
| continue # -> $B14 |
| } |
| $B14: { # continuing |
| %82:i32 = load %i_1 |
| %83:i32 = add %82, 1i |
| store %i_1, %83 |
| next_iteration # -> $B13 |
| } |
| } |
| ret |
| } |
| } |
| %main_1 = func():void { |
| $B17: { |
| %x_85:ptr<function, i32, read_write> = var |
| %x_86:ptr<function, i32, read_write> = var |
| %x_87:ptr<function, i32, read_write> = var |
| %x_88:ptr<function, i32, read_write> = var |
| %x_89:ptr<function, i32, read_write> = var |
| %x_90:ptr<function, i32, read_write> = var |
| %x_91:ptr<function, i32, read_write> = var |
| %x_92:ptr<function, i32, read_write> = var |
| %x_93:ptr<function, i32, read_write> = var |
| %x_94:ptr<function, i32, read_write> = var |
| %i_3:ptr<function, i32, read_write> = var |
| %j_1:ptr<function, i32, read_write> = var |
| %grey:ptr<function, f32, read_write> = var |
| %98:ptr<uniform, vec2<f32>, read> = access %x_28, 0u |
| %99:f32 = load_vector_element %98, 0u |
| %100:i32 = call %tint_f32_to_i32, %99 |
| store %i_3, %100 |
| loop [b: $B18, c: $B19] { # loop_4 |
| $B18: { # body |
| %102:i32 = load %i_3 |
| %x_102:i32 = let %102 |
| switch %x_102 [c: (9i, $B20), c: (8i, $B21), c: (7i, $B22), c: (6i, $B23), c: (5i, $B24), c: (4i, $B25), c: (3i, $B26), c: (2i, $B27), c: (1i, $B28), c: (0i, $B29), c: (default, $B30)] { # switch_1 |
| $B20: { # case |
| %104:i32 = load %i_3 |
| %x_132:i32 = let %104 |
| %106:ptr<private, i32, read_write> = access %data, %x_132 |
| store %106, -5i |
| exit_switch # switch_1 |
| } |
| $B21: { # case |
| %107:i32 = load %i_3 |
| %x_130:i32 = let %107 |
| %109:ptr<private, i32, read_write> = access %data, %x_130 |
| store %109, -4i |
| exit_switch # switch_1 |
| } |
| $B22: { # case |
| %110:i32 = load %i_3 |
| %x_128:i32 = let %110 |
| %112:ptr<private, i32, read_write> = access %data, %x_128 |
| store %112, -3i |
| exit_switch # switch_1 |
| } |
| $B23: { # case |
| %113:i32 = load %i_3 |
| %x_126:i32 = let %113 |
| %115:ptr<private, i32, read_write> = access %data, %x_126 |
| store %115, -2i |
| exit_switch # switch_1 |
| } |
| $B24: { # case |
| %116:i32 = load %i_3 |
| %x_124:i32 = let %116 |
| %118:ptr<private, i32, read_write> = access %data, %x_124 |
| store %118, -1i |
| exit_switch # switch_1 |
| } |
| $B25: { # case |
| %119:i32 = load %i_3 |
| %x_122:i32 = let %119 |
| %121:ptr<private, i32, read_write> = access %data, %x_122 |
| store %121, 0i |
| exit_switch # switch_1 |
| } |
| $B26: { # case |
| %122:i32 = load %i_3 |
| %x_120:i32 = let %122 |
| %124:ptr<private, i32, read_write> = access %data, %x_120 |
| store %124, 1i |
| exit_switch # switch_1 |
| } |
| $B27: { # case |
| %125:i32 = load %i_3 |
| %x_118:i32 = let %125 |
| %127:ptr<private, i32, read_write> = access %data, %x_118 |
| store %127, 2i |
| exit_switch # switch_1 |
| } |
| $B28: { # case |
| %128:i32 = load %i_3 |
| %x_116:i32 = let %128 |
| %130:ptr<private, i32, read_write> = access %data, %x_116 |
| store %130, 3i |
| exit_switch # switch_1 |
| } |
| $B29: { # case |
| %131:i32 = load %i_3 |
| %x_114:i32 = let %131 |
| %133:ptr<private, i32, read_write> = access %data, %x_114 |
| store %133, 4i |
| exit_switch # switch_1 |
| } |
| $B30: { # case |
| exit_switch # switch_1 |
| } |
| } |
| %134:i32 = load %i_3 |
| %135:i32 = add %134, 1i |
| store %i_3, %135 |
| continue # -> $B19 |
| } |
| $B19: { # continuing |
| %136:i32 = load %i_3 |
| %x_136:i32 = let %136 |
| %138:bool = lt %x_136, 10i |
| %139:bool = eq %138, false |
| break_if %139 # -> [t: exit_loop loop_4, f: $B18] |
| } |
| } |
| store %j_1, 0i |
| loop [b: $B31, c: $B32] { # loop_5 |
| $B31: { # body |
| %140:i32 = load %j_1 |
| %141:bool = lt %140, 10i |
| if %141 [t: $B33, f: $B34] { # if_5 |
| $B33: { # true |
| exit_if # if_5 |
| } |
| $B34: { # false |
| exit_loop # loop_5 |
| } |
| } |
| %142:i32 = load %j_1 |
| %x_145:i32 = let %142 |
| %144:ptr<private, i32, read_write> = access %temp, %x_145 |
| %145:i32 = load %j_1 |
| %146:ptr<private, i32, read_write> = access %data, %145 |
| %147:i32 = load %146 |
| store %144, %147 |
| continue # -> $B32 |
| } |
| $B32: { # continuing |
| %148:i32 = load %j_1 |
| %149:i32 = add %148, 1i |
| store %j_1, %149 |
| next_iteration # -> $B31 |
| } |
| } |
| store %x_94, 0i |
| store %x_93, 9i |
| store %x_92, 1i |
| loop [b: $B35, c: $B36] { # loop_6 |
| $B35: { # body |
| %150:i32 = load %x_92 |
| %151:i32 = load %x_93 |
| %152:bool = lte %150, %151 |
| if %152 [t: $B37, f: $B38] { # if_6 |
| $B37: { # true |
| exit_if # if_6 |
| } |
| $B38: { # false |
| exit_loop # loop_6 |
| } |
| } |
| %153:i32 = load %x_94 |
| store %x_91, %153 |
| loop [b: $B39, c: $B40] { # loop_7 |
| $B39: { # body |
| %154:i32 = load %x_91 |
| %155:i32 = load %x_93 |
| %156:bool = lt %154, %155 |
| if %156 [t: $B41, f: $B42] { # if_7 |
| $B41: { # true |
| exit_if # if_7 |
| } |
| $B42: { # false |
| exit_loop # loop_7 |
| } |
| } |
| %157:i32 = load %x_91 |
| store %x_90, %157 |
| %158:i32 = load %x_91 |
| %x_170:i32 = let %158 |
| %160:i32 = load %x_92 |
| %x_171:i32 = let %160 |
| %162:array<i32, 10> = load %data |
| %x_173:array<i32, 10> = let %162 |
| store %data, array<i32, 10>(0i) |
| store %data, %x_173 |
| %164:i32 = add %x_170, %x_171 |
| %165:i32 = sub %164, 1i |
| store %x_89, %165 |
| %166:i32 = load %x_91 |
| %167:i32 = load %x_92 |
| %168:i32 = mul 2i, %167 |
| %169:i32 = add %166, %168 |
| %170:i32 = sub %169, 1i |
| %171:i32 = load %x_93 |
| %172:i32 = min %170, %171 |
| store %x_88, %172 |
| %173:i32 = load %x_90 |
| store %x_87, %173 |
| %174:i32 = load %x_89 |
| store %x_86, %174 |
| %175:i32 = load %x_88 |
| store %x_85, %175 |
| %176:void = call %merge_i1_i1_i1_, %x_87, %x_86, %x_85 |
| continue # -> $B40 |
| } |
| $B40: { # continuing |
| %177:i32 = load %x_91 |
| %178:i32 = load %x_92 |
| %179:i32 = mul 2i, %178 |
| %180:i32 = add %177, %179 |
| store %x_91, %180 |
| next_iteration # -> $B39 |
| } |
| } |
| continue # -> $B36 |
| } |
| $B36: { # continuing |
| %181:i32 = load %x_92 |
| %182:i32 = mul 2i, %181 |
| store %x_92, %182 |
| next_iteration # -> $B35 |
| } |
| } |
| %183:f32 = load_vector_element %gl_FragCoord, 1u |
| %184:i32 = call %tint_f32_to_i32, %183 |
| %185:bool = lt %184, 30i |
| if %185 [t: $B43, f: $B44] { # if_8 |
| $B43: { # true |
| %186:ptr<private, i32, read_write> = access %data, 0i |
| %187:i32 = load %186 |
| %188:f32 = convert %187 |
| %189:f32 = div %188, 10.0f |
| %190:f32 = add 0.5f, %189 |
| store %grey, %190 |
| exit_if # if_8 |
| } |
| $B44: { # false |
| %191:f32 = load_vector_element %gl_FragCoord, 1u |
| %192:i32 = call %tint_f32_to_i32, %191 |
| %193:bool = lt %192, 60i |
| if %193 [t: $B45, f: $B46] { # if_9 |
| $B45: { # true |
| %194:ptr<private, i32, read_write> = access %data, 1i |
| %195:i32 = load %194 |
| %196:f32 = convert %195 |
| %197:f32 = div %196, 10.0f |
| %198:f32 = add 0.5f, %197 |
| store %grey, %198 |
| exit_if # if_9 |
| } |
| $B46: { # false |
| %199:f32 = load_vector_element %gl_FragCoord, 1u |
| %200:i32 = call %tint_f32_to_i32, %199 |
| %201:bool = lt %200, 90i |
| if %201 [t: $B47, f: $B48] { # if_10 |
| $B47: { # true |
| %202:ptr<private, i32, read_write> = access %data, 2i |
| %203:i32 = load %202 |
| %204:f32 = convert %203 |
| %205:f32 = div %204, 10.0f |
| %206:f32 = add 0.5f, %205 |
| store %grey, %206 |
| exit_if # if_10 |
| } |
| $B48: { # false |
| %207:f32 = load_vector_element %gl_FragCoord, 1u |
| %208:i32 = call %tint_f32_to_i32, %207 |
| %209:bool = lt %208, 120i |
| if %209 [t: $B49, f: $B50] { # if_11 |
| $B49: { # true |
| %210:ptr<private, i32, read_write> = access %data, 3i |
| %211:i32 = load %210 |
| %212:f32 = convert %211 |
| %213:f32 = div %212, 10.0f |
| %214:f32 = add 0.5f, %213 |
| store %grey, %214 |
| exit_if # if_11 |
| } |
| $B50: { # false |
| %215:f32 = load_vector_element %gl_FragCoord, 1u |
| %216:i32 = call %tint_f32_to_i32, %215 |
| %217:bool = lt %216, 150i |
| if %217 [t: $B51, f: $B52] { # if_12 |
| $B51: { # true |
| store %continue_execution, false |
| exit_if # if_12 |
| } |
| $B52: { # false |
| %218:f32 = load_vector_element %gl_FragCoord, 1u |
| %219:i32 = call %tint_f32_to_i32, %218 |
| %220:bool = lt %219, 180i |
| if %220 [t: $B53, f: $B54] { # if_13 |
| $B53: { # true |
| %221:ptr<private, i32, read_write> = access %data, 5i |
| %222:i32 = load %221 |
| %223:f32 = convert %222 |
| %224:f32 = div %223, 10.0f |
| %225:f32 = add 0.5f, %224 |
| store %grey, %225 |
| exit_if # if_13 |
| } |
| $B54: { # false |
| %226:f32 = load_vector_element %gl_FragCoord, 1u |
| %227:i32 = call %tint_f32_to_i32, %226 |
| %228:bool = lt %227, 210i |
| if %228 [t: $B55, f: $B56] { # if_14 |
| $B55: { # true |
| %229:ptr<private, i32, read_write> = access %data, 6i |
| %230:i32 = load %229 |
| %231:f32 = convert %230 |
| %232:f32 = div %231, 10.0f |
| %233:f32 = add 0.5f, %232 |
| store %grey, %233 |
| exit_if # if_14 |
| } |
| $B56: { # false |
| %234:f32 = load_vector_element %gl_FragCoord, 1u |
| %235:i32 = call %tint_f32_to_i32, %234 |
| %236:bool = lt %235, 240i |
| if %236 [t: $B57, f: $B58] { # if_15 |
| $B57: { # true |
| %237:ptr<private, i32, read_write> = access %data, 7i |
| %238:i32 = load %237 |
| %239:f32 = convert %238 |
| %240:f32 = div %239, 10.0f |
| %241:f32 = add 0.5f, %240 |
| store %grey, %241 |
| exit_if # if_15 |
| } |
| $B58: { # false |
| %242:f32 = load_vector_element %gl_FragCoord, 1u |
| %243:i32 = call %tint_f32_to_i32, %242 |
| %244:bool = lt %243, 270i |
| if %244 [t: $B59, f: $B60] { # if_16 |
| $B59: { # true |
| %245:ptr<private, i32, read_write> = access %data, 8i |
| %246:i32 = load %245 |
| %247:f32 = convert %246 |
| %248:f32 = div %247, 10.0f |
| %249:f32 = add 0.5f, %248 |
| store %grey, %249 |
| exit_if # if_16 |
| } |
| $B60: { # 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 |
| } |
| } |
| %250:f32 = load %grey |
| %251:vec3<f32> = construct %250 |
| %x_297:vec3<f32> = let %251 |
| %253:f32 = access %x_297, 0u |
| %254:f32 = access %x_297, 1u |
| %255:f32 = access %x_297, 2u |
| %256:vec4<f32> = construct %253, %254, %255, 1.0f |
| store %x_GLF_color, %256 |
| ret |
| } |
| } |
| %tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out { |
| $B61: { |
| store %gl_FragCoord, %gl_FragCoord_param |
| %259:void = call %main_1 |
| %260:vec4<f32> = load %x_GLF_color |
| %261:main_out = construct %260 |
| %262:bool = load %continue_execution |
| %263:bool = eq %262, false |
| if %263 [t: $B62] { # if_17 |
| $B62: { # true |
| terminate_invocation |
| } |
| } |
| ret %261 |
| } |
| } |
| %mergeSort_ = func():void { |
| $B63: { |
| %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: $B64, c: $B65] { # loop_8 |
| $B64: { # body |
| %275:i32 = load %m |
| %276:i32 = load %high |
| %277:bool = lte %275, %276 |
| if %277 [t: $B66, f: $B67] { # if_18 |
| $B66: { # true |
| exit_if # if_18 |
| } |
| $B67: { # false |
| exit_loop # loop_8 |
| } |
| } |
| %278:i32 = load %low |
| store %i_2, %278 |
| loop [b: $B68, c: $B69] { # loop_9 |
| $B68: { # body |
| %279:i32 = load %i_2 |
| %280:i32 = load %high |
| %281:bool = lt %279, %280 |
| if %281 [t: $B70, f: $B71] { # if_19 |
| $B70: { # true |
| exit_if # if_19 |
| } |
| $B71: { # false |
| exit_loop # loop_9 |
| } |
| } |
| %282:i32 = load %i_2 |
| store %f_1, %282 |
| %283:i32 = load %i_2 |
| %284:i32 = load %m |
| %285:i32 = add %283, %284 |
| %286:i32 = sub %285, 1i |
| store %mid_1, %286 |
| %287:i32 = load %i_2 |
| %288:i32 = load %m |
| %289:i32 = mul 2i, %288 |
| %290:i32 = add %287, %289 |
| %291:i32 = sub %290, 1i |
| %292:i32 = load %high |
| %293:i32 = min %291, %292 |
| store %to_1, %293 |
| %294:i32 = load %f_1 |
| store %param, %294 |
| %295:i32 = load %mid_1 |
| store %param_1, %295 |
| %296:i32 = load %to_1 |
| store %param_2, %296 |
| %297:void = call %merge_i1_i1_i1_, %param, %param_1, %param_2 |
| continue # -> $B69 |
| } |
| $B69: { # continuing |
| %298:i32 = load %i_2 |
| %299:i32 = load %m |
| %300:i32 = mul 2i, %299 |
| %301:i32 = add %298, %300 |
| store %i_2, %301 |
| next_iteration # -> $B68 |
| } |
| } |
| continue # -> $B65 |
| } |
| $B65: { # continuing |
| %302:i32 = load %m |
| %303:i32 = mul 2i, %302 |
| store %m, %303 |
| next_iteration # -> $B64 |
| } |
| } |
| ret |
| } |
| } |
| %tint_f32_to_i32 = func(%value:f32):i32 { |
| $B72: { |
| %305:i32 = convert %value |
| %306:bool = gte %value, -2147483648.0f |
| %307:i32 = select -2147483648i, %305, %306 |
| %308:bool = lte %value, 2147483520.0f |
| %309:i32 = select 2147483647i, %307, %308 |
| ret %309 |
| } |
| } |
| |
| 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. * |
| ******************************************************************** |