| 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 |
| %x_8: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 |
| } |
| |
| %main_1 = func():void { |
| $B2: { |
| %temp:ptr<function, array<i32, 10>, read_write> = var |
| %data:ptr<function, array<i32, 10>, read_write> = var |
| %x_65:ptr<function, i32, read_write> = var |
| %x_93:ptr<function, i32, read_write> = var |
| %x_102:ptr<function, i32, read_write> = var |
| %x_180:ptr<function, f32, read_write> = var |
| %x_279:ptr<function, f32, read_write> = var |
| %x_280:ptr<function, f32, read_write> = var |
| %14:ptr<uniform, vec2<f32>, read> = access %x_8, 0u |
| %15:f32 = load_vector_element %14, 0u |
| %x_62:f32 = let %15 |
| %17:i32 = call %tint_f32_to_i32, %x_62 |
| store %x_65, %17 |
| loop [b: $B3, c: $B4] { # loop_1 |
| $B3: { # body |
| %x_66:ptr<function, i32, read_write> = var |
| %20:i32 = load %x_65 |
| switch %20 [c: (9i, $B5), c: (8i, $B6), c: (7i, $B7), c: (6i, $B8), c: (5i, $B9), c: (4i, $B10), c: (3i, $B11), c: (2i, $B12), c: (1i, $B13), c: (0i, $B14), c: (default, $B15)] { # switch_1 |
| $B5: { # case |
| %21:i32 = load %x_65 |
| %22:ptr<function, i32, read_write> = access %data, %21 |
| store %22, -5i |
| exit_switch # switch_1 |
| } |
| $B6: { # case |
| %23:i32 = load %x_65 |
| %24:ptr<function, i32, read_write> = access %data, %23 |
| store %24, -4i |
| exit_switch # switch_1 |
| } |
| $B7: { # case |
| %25:i32 = load %x_65 |
| %26:ptr<function, i32, read_write> = access %data, %25 |
| store %26, -3i |
| exit_switch # switch_1 |
| } |
| $B8: { # case |
| %27:i32 = load %x_65 |
| %28:ptr<function, i32, read_write> = access %data, %27 |
| store %28, -2i |
| exit_switch # switch_1 |
| } |
| $B9: { # case |
| %29:i32 = load %x_65 |
| %30:ptr<function, i32, read_write> = access %data, %29 |
| store %30, -1i |
| exit_switch # switch_1 |
| } |
| $B10: { # case |
| %31:i32 = load %x_65 |
| %32:ptr<function, i32, read_write> = access %data, %31 |
| store %32, 0i |
| exit_switch # switch_1 |
| } |
| $B11: { # case |
| %33:i32 = load %x_65 |
| %34:ptr<function, i32, read_write> = access %data, %33 |
| store %34, 1i |
| exit_switch # switch_1 |
| } |
| $B12: { # case |
| %35:i32 = load %x_65 |
| %36:ptr<function, i32, read_write> = access %data, %35 |
| store %36, 2i |
| exit_switch # switch_1 |
| } |
| $B13: { # case |
| %37:i32 = load %x_65 |
| %38:ptr<function, i32, read_write> = access %data, %37 |
| store %38, 3i |
| exit_switch # switch_1 |
| } |
| $B14: { # case |
| %39:i32 = load %x_65 |
| %40:ptr<function, i32, read_write> = access %data, %39 |
| store %40, 4i |
| exit_switch # switch_1 |
| } |
| $B15: { # case |
| exit_switch # switch_1 |
| } |
| } |
| %41:i32 = load %x_65 |
| %42:i32 = add %41, 1i |
| store %x_66, %42 |
| continue # -> $B4 |
| } |
| $B4: { # continuing |
| %43:i32 = load %x_66 |
| store %x_65, %43 |
| %44:i32 = load %x_66 |
| %45:bool = lt %44, 10i |
| %46:bool = eq %45, false |
| break_if %46 # -> [t: exit_loop loop_1, f: $B3] |
| } |
| } |
| store %x_93, 0i |
| loop [b: $B16, c: $B17] { # loop_2 |
| $B16: { # body |
| %x_94:ptr<function, i32, read_write> = var |
| %48:i32 = load %x_93 |
| %49:bool = lt %48, 10i |
| if %49 [t: $B18, f: $B19] { # if_1 |
| $B18: { # true |
| exit_if # if_1 |
| } |
| $B19: { # false |
| exit_loop # loop_2 |
| } |
| } |
| continue # -> $B17 |
| } |
| $B17: { # continuing |
| %50:i32 = load %x_93 |
| %51:ptr<function, i32, read_write> = access %temp, %50 |
| %52:i32 = load %x_93 |
| %53:ptr<function, i32, read_write> = access %data, %52 |
| %54:i32 = load %53 |
| store %51, %54 |
| %55:i32 = load %x_93 |
| %56:i32 = add %55, 1i |
| store %x_94, %56 |
| %57:i32 = load %x_94 |
| store %x_93, %57 |
| next_iteration # -> $B16 |
| } |
| } |
| store %x_102, 1i |
| loop [b: $B20, c: $B21] { # loop_3 |
| $B20: { # body |
| %x_109:ptr<function, i32, read_write> = var |
| %x_103:ptr<function, i32, read_write> = var |
| %60:i32 = load %x_102 |
| %61:bool = lte %60, 9i |
| if %61 [t: $B22, f: $B23] { # if_2 |
| $B22: { # true |
| exit_if # if_2 |
| } |
| $B23: { # false |
| exit_loop # loop_3 |
| } |
| } |
| store %x_109, 0i |
| loop [b: $B24, c: $B25] { # loop_4 |
| $B24: { # body |
| %x_121:ptr<function, i32, read_write> = var |
| %x_124:ptr<function, i32, read_write> = var |
| %x_126:ptr<function, i32, read_write> = var |
| %x_148:ptr<function, i32, read_write> = var |
| %x_151:ptr<function, i32, read_write> = var |
| %x_161:ptr<function, i32, read_write> = var |
| %68:i32 = load %x_109 |
| %69:bool = lt %68, 9i |
| if %69 [t: $B26, f: $B27] { # if_3 |
| $B26: { # true |
| exit_if # if_3 |
| } |
| $B27: { # false |
| exit_loop # loop_4 |
| } |
| } |
| %70:i32 = load %x_109 |
| %71:i32 = load %x_102 |
| %72:i32 = add %70, %71 |
| %x_115:i32 = let %72 |
| %74:i32 = sub %x_115, 1i |
| %x_116:i32 = let %74 |
| %76:i32 = load %x_109 |
| %77:i32 = load %x_102 |
| %78:i32 = mul 2i, %77 |
| %79:i32 = add %76, %78 |
| %x_110:i32 = let %79 |
| %81:i32 = sub %x_110, 1i |
| %82:i32 = min %81, 9i |
| %x_119:i32 = let %82 |
| %84:i32 = load %x_109 |
| store %x_121, %84 |
| store %x_124, %x_115 |
| %85:i32 = load %x_109 |
| store %x_126, %85 |
| loop [b: $B28, c: $B29] { # loop_5 |
| $B28: { # body |
| %x_141:ptr<function, i32, read_write> = var |
| %x_144:ptr<function, i32, read_write> = var |
| %x_125:ptr<function, i32, read_write> = var |
| %x_127:ptr<function, i32, read_write> = var |
| %90:i32 = load %x_126 |
| %91:bool = lte %90, %x_116 |
| %92:i32 = load %x_124 |
| %93:bool = lte %92, %x_119 |
| %94:bool = and %91, %93 |
| if %94 [t: $B30, f: $B31] { # if_4 |
| $B30: { # true |
| exit_if # if_4 |
| } |
| $B31: { # false |
| exit_loop # loop_5 |
| } |
| } |
| %95:i32 = load %x_126 |
| %x_133_save:i32 = let %95 |
| %97:i32 = load %x_124 |
| %x_135_save:i32 = let %97 |
| %99:i32 = load %x_121 |
| %100:i32 = add %99, 1i |
| %x_122:i32 = let %100 |
| %102:i32 = load %x_126 |
| %103:ptr<function, i32, read_write> = access %data, %102 |
| %104:i32 = load %103 |
| %105:i32 = load %x_124 |
| %106:ptr<function, i32, read_write> = access %data, %105 |
| %107:i32 = load %106 |
| %108:bool = lt %104, %107 |
| if %108 [t: $B32, f: $B33] { # if_5 |
| $B32: { # true |
| %109:i32 = load %x_126 |
| %110:i32 = add %109, 1i |
| store %x_141, %110 |
| %111:i32 = load %x_121 |
| %112:ptr<function, i32, read_write> = access %temp, %111 |
| %113:ptr<function, i32, read_write> = access %data, %x_133_save |
| %114:i32 = load %113 |
| store %112, %114 |
| %115:i32 = load %x_124 |
| store %x_125, %115 |
| %116:i32 = load %x_141 |
| store %x_127, %116 |
| exit_if # if_5 |
| } |
| $B33: { # false |
| %117:i32 = load %x_124 |
| %118:i32 = add %117, 1i |
| store %x_144, %118 |
| %119:i32 = load %x_121 |
| %120:ptr<function, i32, read_write> = access %temp, %119 |
| %121:ptr<function, i32, read_write> = access %data, %x_135_save |
| %122:i32 = load %121 |
| store %120, %122 |
| %123:i32 = load %x_144 |
| store %x_125, %123 |
| %124:i32 = load %x_126 |
| store %x_127, %124 |
| exit_if # if_5 |
| } |
| } |
| continue # -> $B29 |
| } |
| $B29: { # continuing |
| store %x_121, %x_122 |
| %125:i32 = load %x_125 |
| store %x_124, %125 |
| %126:i32 = load %x_127 |
| store %x_126, %126 |
| next_iteration # -> $B28 |
| } |
| } |
| %127:i32 = load %x_121 |
| store %x_148, %127 |
| %128:i32 = load %x_126 |
| store %x_151, %128 |
| loop [b: $B34, c: $B35] { # loop_6 |
| $B34: { # body |
| %x_149:ptr<function, i32, read_write> = var |
| %x_152:ptr<function, i32, read_write> = var |
| %131:i32 = load %x_151 |
| %132:bool = lt %131, 10i |
| %133:i32 = load %x_151 |
| %134:bool = lte %133, %x_116 |
| %135:bool = and %132, %134 |
| if %135 [t: $B36, f: $B37] { # if_6 |
| $B36: { # true |
| exit_if # if_6 |
| } |
| $B37: { # false |
| exit_loop # loop_6 |
| } |
| } |
| continue # -> $B35 |
| } |
| $B35: { # continuing |
| %136:i32 = load %x_148 |
| %137:i32 = add %136, 1i |
| store %x_149, %137 |
| %138:i32 = load %x_151 |
| %139:i32 = add %138, 1i |
| store %x_152, %139 |
| %140:i32 = load %x_148 |
| %141:ptr<function, i32, read_write> = access %temp, %140 |
| %142:i32 = load %x_151 |
| %143:ptr<function, i32, read_write> = access %data, %142 |
| %144:i32 = load %143 |
| store %141, %144 |
| %145:i32 = load %x_149 |
| store %x_148, %145 |
| %146:i32 = load %x_152 |
| store %x_151, %146 |
| next_iteration # -> $B34 |
| } |
| } |
| %147:i32 = load %x_109 |
| store %x_161, %147 |
| loop [b: $B38, c: $B39] { # loop_7 |
| $B38: { # body |
| %x_162:ptr<function, i32, read_write> = var |
| %149:i32 = load %x_161 |
| %150:bool = lte %149, %x_119 |
| if %150 [t: $B40, f: $B41] { # if_7 |
| $B40: { # true |
| exit_if # if_7 |
| } |
| $B41: { # false |
| exit_loop # loop_7 |
| } |
| } |
| continue # -> $B39 |
| } |
| $B39: { # continuing |
| %151:i32 = load %x_161 |
| %152:ptr<function, i32, read_write> = access %data, %151 |
| %153:i32 = load %x_161 |
| %154:ptr<function, i32, read_write> = access %temp, %153 |
| %155:i32 = load %154 |
| store %152, %155 |
| %156:i32 = load %x_161 |
| %157:i32 = add %156, 1i |
| store %x_162, %157 |
| %158:i32 = load %x_162 |
| store %x_161, %158 |
| next_iteration # -> $B38 |
| } |
| } |
| continue # -> $B25 |
| } |
| $B25: { # continuing |
| store %x_109, %x_110 |
| next_iteration # -> $B24 |
| } |
| } |
| continue # -> $B21 |
| } |
| $B21: { # continuing |
| %159:i32 = load %x_102 |
| %160:i32 = mul 2i, %159 |
| store %x_103, %160 |
| %161:i32 = load %x_103 |
| store %x_102, %161 |
| next_iteration # -> $B20 |
| } |
| } |
| %x_171:ptr<function, i32, read_write> = var |
| %x_189:ptr<function, f32, read_write> = var |
| %x_278:ptr<function, f32, read_write> = var |
| %165:f32 = load_vector_element %gl_FragCoord, 1u |
| %166:i32 = call %tint_f32_to_i32, %165 |
| store %x_171, %166 |
| %167:i32 = load %x_171 |
| %168:bool = lt %167, 30i |
| if %168 [t: $B42, f: $B43] { # if_8 |
| $B42: { # true |
| %169:ptr<function, i32, read_write> = access %data, 0i |
| %170:i32 = load %169 |
| %171:f32 = convert %170 |
| %172:f32 = mul %171, 0.10000000149011611938f |
| %173:f32 = add 0.5f, %172 |
| store %x_180, %173 |
| %174:f32 = load %x_180 |
| store %x_280, %174 |
| exit_if # if_8 |
| } |
| $B43: { # false |
| %x_198:ptr<function, f32, read_write> = var |
| %x_277:ptr<function, f32, read_write> = var |
| %177:i32 = load %x_171 |
| %178:bool = lt %177, 60i |
| if %178 [t: $B44, f: $B45] { # if_9 |
| $B44: { # true |
| %179:ptr<function, i32, read_write> = access %data, 1i |
| %180:i32 = load %179 |
| %181:f32 = convert %180 |
| %182:f32 = mul %181, 0.10000000149011611938f |
| %183:f32 = add 0.5f, %182 |
| store %x_189, %183 |
| %184:f32 = load %x_189 |
| store %x_279, %184 |
| exit_if # if_9 |
| } |
| $B45: { # false |
| %x_207:ptr<function, f32, read_write> = var |
| %x_249:ptr<function, f32, read_write> = var |
| %187:i32 = load %x_171 |
| %188:bool = lt %187, 90i |
| if %188 [t: $B46, f: $B47] { # if_10 |
| $B46: { # true |
| %189:ptr<function, i32, read_write> = access %data, 2i |
| %190:i32 = load %189 |
| %191:f32 = convert %190 |
| %192:f32 = mul %191, 0.10000000149011611938f |
| %193:f32 = add 0.5f, %192 |
| store %x_198, %193 |
| %194:f32 = load %x_198 |
| store %x_278, %194 |
| exit_if # if_10 |
| } |
| $B47: { # false |
| %195:i32 = load %x_171 |
| %196:bool = lt %195, 120i |
| if %196 [t: $B48, f: $B49] { # if_11 |
| $B48: { # true |
| %197:ptr<function, i32, read_write> = access %data, 3i |
| %198:i32 = load %197 |
| %199:f32 = convert %198 |
| %200:f32 = mul %199, 0.10000000149011611938f |
| %201:f32 = add 0.5f, %200 |
| store %x_207, %201 |
| %202:f32 = load %x_207 |
| store %x_277, %202 |
| exit_if # if_11 |
| } |
| $B49: { # false |
| %x_220:ptr<function, f32, read_write> = var |
| %x_248:ptr<function, f32, read_write> = var |
| %x_256:ptr<function, vec2<f32>, read_write> = var |
| %x_259:ptr<function, i32, read_write> = var |
| %207:i32 = load %x_171 |
| %208:bool = lt %207, 150i |
| if %208 [t: $B50, f: $B51] { # if_12 |
| $B50: { # true |
| store %continue_execution, false |
| exit_if # if_12 |
| } |
| $B51: { # false |
| %x_229:ptr<function, f32, read_write> = var |
| %x_247:ptr<function, f32, read_write> = var |
| %211:i32 = load %x_171 |
| %212:bool = lt %211, 180i |
| if %212 [t: $B52, f: $B53] { # if_13 |
| $B52: { # true |
| %213:ptr<function, i32, read_write> = access %data, 5i |
| %214:i32 = load %213 |
| %215:f32 = convert %214 |
| %216:f32 = mul %215, 0.10000000149011611938f |
| %217:f32 = add 0.5f, %216 |
| store %x_220, %217 |
| %218:f32 = load %x_220 |
| store %x_249, %218 |
| exit_if # if_13 |
| } |
| $B53: { # false |
| %x_238:ptr<function, f32, read_write> = var |
| %x_246:ptr<function, f32, read_write> = var |
| %221:i32 = load %x_171 |
| %222:bool = lt %221, 210i |
| if %222 [t: $B54, f: $B55] { # if_14 |
| $B54: { # true |
| %223:ptr<function, i32, read_write> = access %data, 6i |
| %224:i32 = load %223 |
| %225:f32 = convert %224 |
| %226:f32 = mul %225, 0.10000000149011611938f |
| %227:f32 = add 0.5f, %226 |
| store %x_229, %227 |
| %228:f32 = load %x_229 |
| store %x_248, %228 |
| exit_if # if_14 |
| } |
| $B55: { # false |
| %229:i32 = load %x_171 |
| %230:bool = lt %229, 240i |
| if %230 [t: $B56, f: $B57] { # if_15 |
| $B56: { # true |
| %231:ptr<function, i32, read_write> = access %data, 7i |
| %232:i32 = load %231 |
| %233:f32 = convert %232 |
| %234:f32 = mul %233, 0.10000000149011611938f |
| %235:f32 = add 0.5f, %234 |
| store %x_238, %235 |
| %236:f32 = load %x_238 |
| store %x_247, %236 |
| exit_if # if_15 |
| } |
| $B57: { # false |
| %237:i32 = load %x_171 |
| %238:bool = lt %237, 270i |
| if %238 [t: $B58, f: $B59] { # if_16 |
| $B58: { # true |
| exit_if # if_16 |
| } |
| $B59: { # false |
| store %continue_execution, false |
| exit_if # if_16 |
| } |
| } |
| %239:ptr<function, i32, read_write> = access %data, 8i |
| %240:i32 = load %239 |
| %241:f32 = convert %240 |
| %242:f32 = mul %241, 0.10000000149011611938f |
| %243:f32 = add 0.5f, %242 |
| store %x_246, %243 |
| %244:f32 = load %x_246 |
| store %x_247, %244 |
| exit_if # if_15 |
| } |
| } |
| %245:f32 = load %x_247 |
| store %x_248, %245 |
| exit_if # if_14 |
| } |
| } |
| %246:f32 = load %x_248 |
| store %x_249, %246 |
| exit_if # if_13 |
| } |
| } |
| %247:ptr<uniform, vec2<f32>, read> = access %x_8, 0u |
| %248:f32 = load_vector_element %247, 1u |
| %249:bool = gt %x_62, %248 |
| %x_252:bool = let %249 |
| if %x_252 [t: $B60] { # if_17 |
| $B60: { # true |
| store %x_GLF_color, vec4<f32>(1.0f) |
| exit_if # if_17 |
| } |
| } |
| store %x_256, vec2<f32>(1.0f) |
| store %x_259, 0i |
| loop [b: $B61, c: $B62] { # loop_8 |
| $B61: { # body |
| %x_272:ptr<function, vec2<f32>, read_write> = var |
| %x_273:ptr<function, vec2<f32>, read_write> = var |
| %x_260:ptr<function, i32, read_write> = var |
| %254:i32 = load %x_259 |
| %255:bool = lte %254, 32i |
| if %255 [t: $B63, f: $B64] { # if_18 |
| $B63: { # true |
| exit_if # if_18 |
| } |
| $B64: { # false |
| exit_loop # loop_8 |
| } |
| } |
| %256:vec2<f32> = load %x_256 |
| store %x_273, %256 |
| %257:f32 = load_vector_element %x_256, 0u |
| %258:bool = lt %257, 0.0f |
| if %258 [t: $B65] { # if_19 |
| $B65: { # true |
| if %x_252 [t: $B66] { # if_20 |
| $B66: { # true |
| store %continue_execution, false |
| exit_if # if_20 |
| } |
| } |
| %259:vec2<f32> = load %x_256 |
| store %x_272, %259 |
| %260:f32 = load_vector_element %x_256, 1u |
| %261:f32 = add %260, 1.0f |
| store_vector_element %x_272, 1u, %261 |
| %262:vec2<f32> = load %x_272 |
| store %x_273, %262 |
| exit_if # if_19 |
| } |
| } |
| %263:vec2<f32> = load %x_273 |
| %x_257_1:ptr<function, vec2<f32>, read_write> = var, %263 |
| %265:f32 = load_vector_element %x_273, 0u |
| %266:f32 = load_vector_element %x_273, 1u |
| %267:f32 = add %265, %266 |
| store_vector_element %x_257_1, 0u, %267 |
| %268:vec2<f32> = load %x_257_1 |
| %x_257:vec2<f32> = let %268 |
| continue # -> $B62 |
| } |
| $B62: { # continuing |
| %270:i32 = load %x_259 |
| %271:i32 = add %270, 1i |
| store %x_260, %271 |
| store %x_256, %x_257 |
| %272:i32 = load %x_260 |
| store %x_259, %272 |
| next_iteration # -> $B61 |
| } |
| } |
| exit_if # if_12 |
| } |
| } |
| %273:f32 = load %x_249 |
| store %x_277, %273 |
| exit_if # if_11 |
| } |
| } |
| %274:f32 = load %x_277 |
| store %x_278, %274 |
| exit_if # if_10 |
| } |
| } |
| %275:f32 = load %x_278 |
| store %x_279, %275 |
| exit_if # if_9 |
| } |
| } |
| %276:f32 = load %x_279 |
| store %x_280, %276 |
| exit_if # if_8 |
| } |
| } |
| %277:f32 = load %x_280 |
| %278:f32 = load %x_280 |
| %279:f32 = load %x_280 |
| %280:vec4<f32> = construct %277, %278, %279, 1.0f |
| store %x_GLF_color, %280 |
| ret |
| } |
| } |
| %tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out { |
| $B67: { |
| store %gl_FragCoord, %gl_FragCoord_param |
| %283:void = call %main_1 |
| %284:vec4<f32> = load %x_GLF_color |
| %285:main_out = construct %284 |
| %286:bool = load %continue_execution |
| %287:bool = eq %286, false |
| if %287 [t: $B68] { # if_21 |
| $B68: { # true |
| terminate_invocation |
| } |
| } |
| ret %285 |
| } |
| } |
| %tint_f32_to_i32 = func(%value:f32):i32 { |
| $B69: { |
| %289:i32 = convert %value |
| %290:bool = gte %value, -2147483648.0f |
| %291:i32 = select -2147483648i, %289, %290 |
| %292:bool = lte %value, 2147483520.0f |
| %293:i32 = select 2147483647i, %291, %292 |
| ret %293 |
| } |
| } |
| |
| 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. * |
| ******************************************************************** |