| 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 |
| store %k, %16 |
| %17:i32 = load %f |
| store %i, %17 |
| %18:i32 = load %mid |
| %19:i32 = add %18, 1i |
| store %j, %19 |
| loop [b: $B3, c: $B4] { # loop_1 |
| $B3: { # body |
| %20:i32 = load %i |
| %21:i32 = load %mid |
| %22:bool = lte %20, %21 |
| %23:i32 = load %j |
| %24:i32 = load %to |
| %25:bool = lte %23, %24 |
| %26:bool = and %22, %25 |
| if %26 [t: $B5, f: $B6] { # if_1 |
| $B5: { # true |
| exit_if # if_1 |
| } |
| $B6: { # false |
| exit_loop # loop_1 |
| } |
| } |
| %27:i32 = load %i |
| %28:ptr<private, i32, read_write> = access %data, %27 |
| %29:i32 = load %28 |
| %30:i32 = load %j |
| %31:ptr<private, i32, read_write> = access %data, %30 |
| %32:i32 = load %31 |
| %33:bool = lt %29, %32 |
| if %33 [t: $B7, f: $B8] { # if_2 |
| $B7: { # true |
| %34:i32 = load %k |
| %x_280:i32 = let %34 |
| %36:i32 = load %k |
| %37:i32 = add %36, 1i |
| store %k, %37 |
| %38:i32 = load %i |
| %x_282:i32 = let %38 |
| %40:i32 = load %i |
| %41:i32 = add %40, 1i |
| store %i, %41 |
| %42:ptr<private, i32, read_write> = access %temp, %x_280 |
| %43:ptr<private, i32, read_write> = access %data, %x_282 |
| %44:i32 = load %43 |
| store %42, %44 |
| exit_if # if_2 |
| } |
| $B8: { # false |
| %45:i32 = load %k |
| %x_287:i32 = let %45 |
| %47:i32 = load %k |
| %48:i32 = add %47, 1i |
| store %k, %48 |
| %49:i32 = load %j |
| %x_289:i32 = let %49 |
| %51:i32 = load %j |
| %52:i32 = add %51, 1i |
| store %j, %52 |
| %53:ptr<private, i32, read_write> = access %temp, %x_287 |
| %54:ptr<private, i32, read_write> = access %data, %x_289 |
| %55:i32 = load %54 |
| store %53, %55 |
| exit_if # if_2 |
| } |
| } |
| continue # -> $B4 |
| } |
| $B4: { # continuing |
| next_iteration # -> $B3 |
| } |
| } |
| loop [b: $B9, c: $B10] { # loop_2 |
| $B9: { # body |
| %56:i32 = load %i |
| %57:bool = lt %56, 10i |
| %58:i32 = load %i |
| %59:i32 = load %mid |
| %60:bool = lte %58, %59 |
| %61:bool = and %57, %60 |
| if %61 [t: $B11, f: $B12] { # if_3 |
| $B11: { # true |
| exit_if # if_3 |
| } |
| $B12: { # false |
| exit_loop # loop_2 |
| } |
| } |
| %62:i32 = load %k |
| %x_305:i32 = let %62 |
| %64:i32 = load %k |
| %65:i32 = add %64, 1i |
| store %k, %65 |
| %66:i32 = load %i |
| %x_307:i32 = let %66 |
| %68:i32 = load %i |
| %69:i32 = add %68, 1i |
| store %i, %69 |
| %70:ptr<private, i32, read_write> = access %temp, %x_305 |
| %71:ptr<private, i32, read_write> = access %data, %x_307 |
| %72:i32 = load %71 |
| store %70, %72 |
| continue # -> $B10 |
| } |
| $B10: { # continuing |
| next_iteration # -> $B9 |
| } |
| } |
| %73:i32 = load %f |
| store %i_1, %73 |
| loop [b: $B13, c: $B14] { # loop_3 |
| $B13: { # body |
| %74:i32 = load %i_1 |
| %75:i32 = load %to |
| %76:bool = lte %74, %75 |
| if %76 [t: $B15, f: $B16] { # if_4 |
| $B15: { # true |
| exit_if # if_4 |
| } |
| $B16: { # false |
| exit_loop # loop_3 |
| } |
| } |
| %77:i32 = load %i_1 |
| %x_321:i32 = let %77 |
| %79:ptr<private, i32, read_write> = access %data, %x_321 |
| %80:i32 = load %i_1 |
| %81:ptr<private, i32, read_write> = access %temp, %80 |
| %82:i32 = load %81 |
| store %79, %82 |
| continue # -> $B14 |
| } |
| $B14: { # continuing |
| %83:i32 = load %i_1 |
| %84:i32 = add %83, 1i |
| store %i_1, %84 |
| 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 |
| %96:i32 = load %m |
| %97:i32 = load %high |
| %98:bool = lte %96, %97 |
| if %98 [t: $B20, f: $B21] { # if_5 |
| $B20: { # true |
| exit_if # if_5 |
| } |
| $B21: { # false |
| exit_loop # loop_4 |
| } |
| } |
| %99:i32 = load %low |
| store %i_2, %99 |
| loop [b: $B22, c: $B23] { # loop_5 |
| $B22: { # body |
| %100:i32 = load %i_2 |
| %101:i32 = load %high |
| %102:bool = lt %100, %101 |
| if %102 [t: $B24, f: $B25] { # if_6 |
| $B24: { # true |
| exit_if # if_6 |
| } |
| $B25: { # false |
| exit_loop # loop_5 |
| } |
| } |
| %103:i32 = load %i_2 |
| store %f_1, %103 |
| %104:i32 = load %i_2 |
| %105:i32 = load %m |
| %106:i32 = add %104, %105 |
| %107:i32 = sub %106, 1i |
| store %mid_1, %107 |
| %108:i32 = load %i_2 |
| %109:i32 = load %m |
| %110:i32 = mul 2i, %109 |
| %111:i32 = add %108, %110 |
| %112:i32 = sub %111, 1i |
| %113:i32 = load %high |
| %114:i32 = min %112, %113 |
| store %to_1, %114 |
| %115:i32 = load %f_1 |
| store %param, %115 |
| %116:i32 = load %mid_1 |
| store %param_1, %116 |
| %117:i32 = load %to_1 |
| store %param_2, %117 |
| %118:void = call %merge_i1_i1_i1_, %param, %param_1, %param_2 |
| continue # -> $B23 |
| } |
| $B23: { # continuing |
| %119:i32 = load %i_2 |
| %120:i32 = load %m |
| %121:i32 = mul 2i, %120 |
| %122:i32 = add %119, %121 |
| store %i_2, %122 |
| next_iteration # -> $B22 |
| } |
| } |
| continue # -> $B19 |
| } |
| $B19: { # continuing |
| %123:i32 = load %m |
| %124:i32 = mul 2i, %123 |
| store %m, %124 |
| 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 |
| %129:ptr<uniform, vec2<f32>, read> = access %x_28, 0u |
| %130:f32 = load_vector_element %129, 0u |
| %131:i32 = call %tint_f32_to_i32, %130 |
| store %i_3, %131 |
| loop [b: $B27, c: $B28] { # loop_6 |
| $B27: { # body |
| %133:i32 = load %i_3 |
| %x_93:i32 = let %133 |
| 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 |
| %135:i32 = load %i_3 |
| %x_123:i32 = let %135 |
| %137:ptr<private, i32, read_write> = access %data, %x_123 |
| store %137, -5i |
| exit_switch # switch_1 |
| } |
| $B30: { # case |
| %138:i32 = load %i_3 |
| %x_121:i32 = let %138 |
| %140:ptr<private, i32, read_write> = access %data, %x_121 |
| store %140, -4i |
| exit_switch # switch_1 |
| } |
| $B31: { # case |
| %141:i32 = load %i_3 |
| %x_119:i32 = let %141 |
| %143:ptr<private, i32, read_write> = access %data, %x_119 |
| store %143, -3i |
| exit_switch # switch_1 |
| } |
| $B32: { # case |
| %144:i32 = load %i_3 |
| %x_117:i32 = let %144 |
| %146:ptr<private, i32, read_write> = access %data, %x_117 |
| store %146, -2i |
| exit_switch # switch_1 |
| } |
| $B33: { # case |
| %147:i32 = load %i_3 |
| %x_115:i32 = let %147 |
| %149:ptr<private, i32, read_write> = access %data, %x_115 |
| store %149, -1i |
| exit_switch # switch_1 |
| } |
| $B34: { # case |
| %150:i32 = load %i_3 |
| %x_113:i32 = let %150 |
| %152:ptr<private, i32, read_write> = access %data, %x_113 |
| store %152, 0i |
| exit_switch # switch_1 |
| } |
| $B35: { # case |
| %153:i32 = load %i_3 |
| %x_111:i32 = let %153 |
| %155:ptr<private, i32, read_write> = access %data, %x_111 |
| store %155, 1i |
| exit_switch # switch_1 |
| } |
| $B36: { # case |
| %156:i32 = load %i_3 |
| %x_109:i32 = let %156 |
| %158:ptr<private, i32, read_write> = access %data, %x_109 |
| store %158, 2i |
| exit_switch # switch_1 |
| } |
| $B37: { # case |
| %159:i32 = load %i_3 |
| %x_107:i32 = let %159 |
| %161:ptr<private, i32, read_write> = access %data, %x_107 |
| store %161, 3i |
| exit_switch # switch_1 |
| } |
| $B38: { # case |
| %162:i32 = load %i_3 |
| %x_105:i32 = let %162 |
| %164:ptr<private, i32, read_write> = access %data, %x_105 |
| store %164, 4i |
| exit_switch # switch_1 |
| } |
| $B39: { # case |
| exit_switch # switch_1 |
| } |
| } |
| %165:i32 = load %i_3 |
| %166:i32 = add %165, 1i |
| store %i_3, %166 |
| continue # -> $B28 |
| } |
| $B28: { # continuing |
| %167:i32 = load %i_3 |
| %x_127:i32 = let %167 |
| %169:bool = lt %x_127, 10i |
| %170:bool = eq %169, false |
| break_if %170 # -> [t: exit_loop loop_6, f: $B27] |
| } |
| } |
| store %j_1, 0i |
| loop [b: $B40, c: $B41] { # loop_7 |
| $B40: { # body |
| %171:i32 = load %j_1 |
| %172:bool = lt %171, 10i |
| if %172 [t: $B42, f: $B43] { # if_7 |
| $B42: { # true |
| exit_if # if_7 |
| } |
| $B43: { # false |
| exit_loop # loop_7 |
| } |
| } |
| %173:i32 = load %j_1 |
| %x_136:i32 = let %173 |
| %175:ptr<private, i32, read_write> = access %temp, %x_136 |
| %176:i32 = load %j_1 |
| %177:ptr<private, i32, read_write> = access %data, %176 |
| %178:i32 = load %177 |
| store %175, %178 |
| continue # -> $B41 |
| } |
| $B41: { # continuing |
| %179:i32 = load %j_1 |
| %180:i32 = add %179, 1i |
| store %j_1, %180 |
| next_iteration # -> $B40 |
| } |
| } |
| %181:void = call %mergeSort_ |
| %182:f32 = load_vector_element %gl_FragCoord, 1u |
| %183:i32 = call %tint_f32_to_i32, %182 |
| %184:bool = lt %183, 30i |
| if %184 [t: $B44, f: $B45] { # if_8 |
| $B44: { # true |
| %185:ptr<private, i32, read_write> = access %data, 0i |
| %186:i32 = load %185 |
| %187:f32 = convert %186 |
| %188:f32 = div %187, 10.0f |
| %189:f32 = add 0.5f, %188 |
| store %grey, %189 |
| exit_if # if_8 |
| } |
| $B45: { # false |
| %190:f32 = load_vector_element %gl_FragCoord, 1u |
| %191:i32 = call %tint_f32_to_i32, %190 |
| %192:bool = lt %191, 60i |
| if %192 [t: $B46, f: $B47] { # if_9 |
| $B46: { # true |
| %193:ptr<private, i32, read_write> = access %data, 1i |
| %194:i32 = load %193 |
| %195:f32 = convert %194 |
| %196:f32 = div %195, 10.0f |
| %197:f32 = add 0.5f, %196 |
| store %grey, %197 |
| exit_if # if_9 |
| } |
| $B47: { # false |
| %198:f32 = load_vector_element %gl_FragCoord, 1u |
| %199:i32 = call %tint_f32_to_i32, %198 |
| %200:bool = lt %199, 90i |
| if %200 [t: $B48, f: $B49] { # if_10 |
| $B48: { # true |
| %201:ptr<private, i32, read_write> = access %data, 2i |
| %202:i32 = load %201 |
| %203:f32 = convert %202 |
| %204:f32 = div %203, 10.0f |
| %205:f32 = add 0.5f, %204 |
| store %grey, %205 |
| exit_if # if_10 |
| } |
| $B49: { # false |
| %206:f32 = load_vector_element %gl_FragCoord, 1u |
| %207:i32 = call %tint_f32_to_i32, %206 |
| %208:bool = lt %207, 120i |
| if %208 [t: $B50, f: $B51] { # if_11 |
| $B50: { # true |
| %209:ptr<private, i32, read_write> = access %data, 3i |
| %210:i32 = load %209 |
| %211:f32 = convert %210 |
| %212:f32 = div %211, 10.0f |
| %213:f32 = add 0.5f, %212 |
| store %grey, %213 |
| exit_if # if_11 |
| } |
| $B51: { # false |
| %214:f32 = load_vector_element %gl_FragCoord, 1u |
| %215:i32 = call %tint_f32_to_i32, %214 |
| %216:bool = lt %215, 150i |
| if %216 [t: $B52, f: $B53] { # if_12 |
| $B52: { # true |
| store %continue_execution, false |
| exit_if # if_12 |
| } |
| $B53: { # false |
| %217:f32 = load_vector_element %gl_FragCoord, 1u |
| %218:i32 = call %tint_f32_to_i32, %217 |
| %219:bool = lt %218, 180i |
| if %219 [t: $B54, f: $B55] { # if_13 |
| $B54: { # true |
| %220:ptr<private, i32, read_write> = access %data, 5i |
| %221:i32 = load %220 |
| %222:f32 = convert %221 |
| %223:f32 = div %222, 10.0f |
| %224:f32 = add 0.5f, %223 |
| store %grey, %224 |
| exit_if # if_13 |
| } |
| $B55: { # false |
| %225:f32 = load_vector_element %gl_FragCoord, 1u |
| %226:i32 = call %tint_f32_to_i32, %225 |
| %227:bool = lt %226, 210i |
| if %227 [t: $B56, f: $B57] { # if_14 |
| $B56: { # true |
| %228:ptr<private, i32, read_write> = access %data, 6i |
| %229:i32 = load %228 |
| %230:f32 = convert %229 |
| %231:f32 = div %230, 10.0f |
| %232:f32 = add 0.5f, %231 |
| store %grey, %232 |
| exit_if # if_14 |
| } |
| $B57: { # false |
| %233:f32 = load_vector_element %gl_FragCoord, 1u |
| %234:i32 = call %tint_f32_to_i32, %233 |
| %235:bool = lt %234, 240i |
| if %235 [t: $B58, f: $B59] { # if_15 |
| $B58: { # true |
| %236:ptr<private, i32, read_write> = access %data, 7i |
| %237:i32 = load %236 |
| %238:f32 = convert %237 |
| %239:f32 = div %238, 10.0f |
| %240:f32 = add 0.5f, %239 |
| store %grey, %240 |
| exit_if # if_15 |
| } |
| $B59: { # false |
| %241:f32 = load_vector_element %gl_FragCoord, 1u |
| %242:i32 = call %tint_f32_to_i32, %241 |
| %243:bool = lt %242, 270i |
| if %243 [t: $B60, f: $B61] { # if_16 |
| $B60: { # true |
| %244:ptr<private, i32, read_write> = access %data, 8i |
| %245:i32 = load %244 |
| %246:f32 = convert %245 |
| %247:f32 = div %246, 10.0f |
| %248:f32 = add 0.5f, %247 |
| store %grey, %248 |
| 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 |
| } |
| } |
| %249:f32 = load %grey |
| %250:vec3<f32> = construct %249 |
| %x_248:vec3<f32> = let %250 |
| %252:f32 = access %x_248, 0u |
| %253:f32 = access %x_248, 1u |
| %254:f32 = access %x_248, 2u |
| %255:vec4<f32> = construct %252, %253, %254, 1.0f |
| store %x_GLF_color, %255 |
| ret |
| } |
| } |
| %tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out { |
| $B62: { |
| store %gl_FragCoord, %gl_FragCoord_param |
| %258:void = call %main_1 |
| %259:vec4<f32> = load %x_GLF_color |
| %260:main_out = construct %259 |
| %261:bool = load %continue_execution |
| %262:bool = eq %261, false |
| if %262 [t: $B63] { # if_17 |
| $B63: { # true |
| terminate_invocation |
| } |
| } |
| ret %260 |
| } |
| } |
| %tint_f32_to_i32 = func(%value:f32):i32 { |
| $B64: { |
| %264:i32 = convert %value |
| %265:bool = gte %value, -2147483648.0f |
| %266:i32 = select -2147483648i, %264, %265 |
| %267:bool = lte %value, 2147483520.0f |
| %268:i32 = select 2147483647i, %266, %267 |
| ret %268 |
| } |
| } |
| |
| 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. * |
| ******************************************************************** |