| SKIP: FAILED |
| |
| <dawn>/src/tint/lang/msl/writer/printer/printer.cc:355 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 = block { # 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 |
| } |
| |
| %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 { |
| %b2 = block { |
| %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 |
| %x_262:i32 = load %f |
| store %k, %x_262 |
| %x_263:i32 = load %f |
| store %i, %x_263 |
| %x_264:i32 = load %mid |
| %17:i32 = add %x_264, 1i |
| store %j, %17 |
| loop [b: %b3, c: %b4] { # loop_1 |
| %b3 = block { # body |
| %x_270:i32 = load %i |
| %x_271:i32 = load %mid |
| %x_273:i32 = load %j |
| %x_274:i32 = load %to |
| %22:bool = lte %x_270, %x_271 |
| %23:bool = lte %x_273, %x_274 |
| %24:bool = and %22, %23 |
| if %24 [t: %b5, f: %b6] { # if_1 |
| %b5 = block { # true |
| exit_if # if_1 |
| } |
| %b6 = block { # false |
| exit_loop # loop_1 |
| } |
| } |
| %x_278:i32 = load %i |
| %26:ptr<private, i32, read_write> = access %data, %x_278 |
| %x_280:i32 = load %26 |
| %x_281:i32 = load %j |
| %29:ptr<private, i32, read_write> = access %data, %x_281 |
| %x_283:i32 = load %29 |
| %31:bool = lt %x_280, %x_283 |
| if %31 [t: %b7, f: %b8] { # if_2 |
| %b7 = block { # true |
| %x_288:i32 = load %k |
| %33:i32 = add %x_288, 1i |
| store %k, %33 |
| %x_290:i32 = load %i |
| %35:i32 = add %x_290, 1i |
| store %i, %35 |
| %36:ptr<private, i32, read_write> = access %data, %x_290 |
| %x_293:i32 = load %36 |
| %38:ptr<private, i32, read_write> = access %temp, %x_288 |
| store %38, %x_293 |
| exit_if # if_2 |
| } |
| %b8 = block { # false |
| %x_295:i32 = load %k |
| %40:i32 = add %x_295, 1i |
| store %k, %40 |
| %x_297:i32 = load %j |
| %42:i32 = add %x_297, 1i |
| store %j, %42 |
| %43:ptr<private, i32, read_write> = access %data, %x_297 |
| %x_300:i32 = load %43 |
| %45:ptr<private, i32, read_write> = access %temp, %x_295 |
| store %45, %x_300 |
| exit_if # if_2 |
| } |
| } |
| continue %b4 |
| } |
| %b4 = block { # continuing |
| next_iteration %b3 |
| } |
| } |
| loop [b: %b9, c: %b10] { # loop_2 |
| %b9 = block { # body |
| %x_306:i32 = load %i |
| %x_308:i32 = load %i |
| %x_309:i32 = load %mid |
| %49:bool = lt %x_306, 10i |
| %50:bool = lte %x_308, %x_309 |
| %51:bool = and %49, %50 |
| if %51 [t: %b11, f: %b12] { # if_3 |
| %b11 = block { # true |
| exit_if # if_3 |
| } |
| %b12 = block { # false |
| exit_loop # loop_2 |
| } |
| } |
| %x_313:i32 = load %k |
| %53:i32 = add %x_313, 1i |
| store %k, %53 |
| %x_315:i32 = load %i |
| %55:i32 = add %x_315, 1i |
| store %i, %55 |
| %56:ptr<private, i32, read_write> = access %data, %x_315 |
| %x_318:i32 = load %56 |
| %58:ptr<private, i32, read_write> = access %temp, %x_313 |
| store %58, %x_318 |
| continue %b10 |
| } |
| %b10 = block { # continuing |
| next_iteration %b9 |
| } |
| } |
| %x_320:i32 = load %f |
| store %i_1, %x_320 |
| loop [b: %b13, c: %b14] { # loop_3 |
| %b13 = block { # body |
| %x_325:i32 = load %i_1 |
| %x_326:i32 = load %to |
| %62:bool = lte %x_325, %x_326 |
| if %62 [t: %b15, f: %b16] { # if_4 |
| %b15 = block { # true |
| exit_if # if_4 |
| } |
| %b16 = block { # false |
| exit_loop # loop_3 |
| } |
| } |
| %x_329:i32 = load %i_1 |
| %x_330:i32 = load %i_1 |
| %65:ptr<private, i32, read_write> = access %temp, %x_330 |
| %x_332:i32 = load %65 |
| %67:ptr<private, i32, read_write> = access %data, %x_329 |
| store %67, %x_332 |
| continue %b14 |
| } |
| %b14 = block { # continuing |
| %x_334:i32 = load %i_1 |
| %69:i32 = add %x_334, 1i |
| store %i_1, %69 |
| next_iteration %b13 |
| } |
| } |
| ret |
| } |
| } |
| %mergeSort_ = func():void -> %b17 { |
| %b17 = block { |
| %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 = block { # body |
| %x_341:i32 = load %m |
| %x_342:i32 = load %high |
| %83:bool = lte %x_341, %x_342 |
| if %83 [t: %b20, f: %b21] { # if_5 |
| %b20 = block { # true |
| exit_if # if_5 |
| } |
| %b21 = block { # false |
| exit_loop # loop_4 |
| } |
| } |
| %x_345:i32 = load %low |
| store %i_2, %x_345 |
| loop [b: %b22, c: %b23] { # loop_5 |
| %b22 = block { # body |
| %x_350:i32 = load %i_2 |
| %x_351:i32 = load %high |
| %87:bool = lt %x_350, %x_351 |
| if %87 [t: %b24, f: %b25] { # if_6 |
| %b24 = block { # true |
| exit_if # if_6 |
| } |
| %b25 = block { # false |
| exit_loop # loop_5 |
| } |
| } |
| %x_354:i32 = load %i_2 |
| store %f_1, %x_354 |
| %x_355:i32 = load %i_2 |
| %x_356:i32 = load %m |
| %91:i32 = add %x_355, %x_356 |
| %92:i32 = sub %91, 1i |
| store %mid_1, %92 |
| %x_359:i32 = load %i_2 |
| %x_360:i32 = load %m |
| %x_364:i32 = load %high |
| %96:i32 = mul 2i, %x_360 |
| %97:i32 = add %x_359, %96 |
| %98:i32 = sub %97, 1i |
| %99:i32 = min %98, %x_364 |
| store %to_1, %99 |
| %x_366:i32 = load %f_1 |
| store %param, %x_366 |
| %x_367:i32 = load %mid_1 |
| store %param_1, %x_367 |
| %x_368:i32 = load %to_1 |
| store %param_2, %x_368 |
| %103:void = call %merge_i1_i1_i1_, %param, %param_1, %param_2 |
| continue %b23 |
| } |
| %b23 = block { # continuing |
| %x_370:i32 = load %m |
| %x_372:i32 = load %i_2 |
| %106:i32 = mul 2i, %x_370 |
| %107:i32 = add %x_372, %106 |
| store %i_2, %107 |
| next_iteration %b22 |
| } |
| } |
| continue %b19 |
| } |
| %b19 = block { # continuing |
| %x_374:i32 = load %m |
| %109:i32 = mul 2i, %x_374 |
| store %m, %109 |
| next_iteration %b18 |
| } |
| } |
| ret |
| } |
| } |
| %main_1 = func():void -> %b26 { |
| %b26 = block { |
| %i_3:ptr<function, i32, read_write> = var |
| %j_1:ptr<function, i32, read_write> = var |
| %grey:ptr<function, f32, read_write> = var |
| %114:ptr<uniform, vec2<f32>, read> = access %x_28, 0u |
| %x_86:f32 = load_vector_element %114, 0u |
| %116:i32 = convert %x_86 |
| store %i_3, %116 |
| loop [b: %b27, c: %b28] { # loop_6 |
| %b27 = block { # body |
| %x_92:i32 = load %i_3 |
| switch %x_92 [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 = block { # case |
| %x_122:i32 = load %i_3 |
| %119:ptr<private, i32, read_write> = access %data, %x_122 |
| store %119, -5i |
| exit_switch # switch_1 |
| } |
| %b30 = block { # case |
| %x_120:i32 = load %i_3 |
| %121:ptr<private, i32, read_write> = access %data, %x_120 |
| store %121, -4i |
| exit_switch # switch_1 |
| } |
| %b31 = block { # case |
| %x_118:i32 = load %i_3 |
| %123:ptr<private, i32, read_write> = access %data, %x_118 |
| store %123, -3i |
| exit_switch # switch_1 |
| } |
| %b32 = block { # case |
| %x_116:i32 = load %i_3 |
| %125:ptr<private, i32, read_write> = access %data, %x_116 |
| store %125, -2i |
| exit_switch # switch_1 |
| } |
| %b33 = block { # case |
| %x_114:i32 = load %i_3 |
| %127:ptr<private, i32, read_write> = access %data, %x_114 |
| store %127, -1i |
| exit_switch # switch_1 |
| } |
| %b34 = block { # case |
| %x_112:i32 = load %i_3 |
| %129:ptr<private, i32, read_write> = access %data, %x_112 |
| store %129, 0i |
| exit_switch # switch_1 |
| } |
| %b35 = block { # case |
| %x_110:i32 = load %i_3 |
| %131:ptr<private, i32, read_write> = access %data, %x_110 |
| store %131, 1i |
| exit_switch # switch_1 |
| } |
| %b36 = block { # case |
| %x_108:i32 = load %i_3 |
| %133:ptr<private, i32, read_write> = access %data, %x_108 |
| store %133, 2i |
| exit_switch # switch_1 |
| } |
| %b37 = block { # case |
| %x_106:i32 = load %i_3 |
| %135:ptr<private, i32, read_write> = access %data, %x_106 |
| store %135, 3i |
| exit_switch # switch_1 |
| } |
| %b38 = block { # case |
| %x_104:i32 = load %i_3 |
| %137:ptr<private, i32, read_write> = access %data, %x_104 |
| store %137, 4i |
| exit_switch # switch_1 |
| } |
| %b39 = block { # case |
| exit_switch # switch_1 |
| } |
| } |
| %x_124:i32 = load %i_3 |
| %139:i32 = add %x_124, 1i |
| store %i_3, %139 |
| continue %b28 |
| } |
| %b28 = block { # continuing |
| %x_126:i32 = load %i_3 |
| %141:bool = lt %x_126, 10i |
| %142:bool = eq %141, false |
| break_if %142 %b27 |
| } |
| } |
| store %j_1, 0i |
| loop [b: %b40, c: %b41] { # loop_7 |
| %b40 = block { # body |
| %x_132:i32 = load %j_1 |
| %x_133:bool = lt %x_132, 10i |
| %145:ptr<uniform, vec2<f32>, read> = access %x_28, 0u |
| %x_135:f32 = load_vector_element %145, 0u |
| %147:bool = lte %x_135, 1.0f |
| %148:bool = eq %147, false |
| if %148 [t: %b42] { # if_7 |
| %b42 = block { # true |
| store %grey, 1.0f |
| exit_if # if_7 |
| } |
| } |
| if %x_133 [t: %b43, f: %b44] { # if_8 |
| %b43 = block { # true |
| exit_if # if_8 |
| } |
| %b44 = block { # false |
| exit_loop # loop_7 |
| } |
| } |
| %x_140:i32 = load %j_1 |
| %x_141:i32 = load %j_1 |
| %151:ptr<private, i32, read_write> = access %data, %x_141 |
| %x_143:i32 = load %151 |
| %153:ptr<private, i32, read_write> = access %temp, %x_140 |
| store %153, %x_143 |
| continue %b41 |
| } |
| %b41 = block { # continuing |
| %x_145:i32 = load %j_1 |
| %155:i32 = add %x_145, 1i |
| store %j_1, %155 |
| next_iteration %b40 |
| } |
| } |
| %156:void = call %mergeSort_ |
| %x_149:f32 = load_vector_element %gl_FragCoord, 1u |
| %158:i32 = convert %x_149 |
| %159:bool = lt %158, 30i |
| if %159 [t: %b45, f: %b46] { # if_9 |
| %b45 = block { # true |
| %160:ptr<private, i32, read_write> = access %data, 0i |
| %x_156:i32 = load %160 |
| %162:f32 = convert %x_156 |
| %163:f32 = div %162, 10.0f |
| %164:f32 = add 0.5f, %163 |
| store %grey, %164 |
| exit_if # if_9 |
| } |
| %b46 = block { # false |
| %x_161:f32 = load_vector_element %gl_FragCoord, 1u |
| %166:i32 = convert %x_161 |
| %167:bool = lt %166, 60i |
| if %167 [t: %b47, f: %b48] { # if_10 |
| %b47 = block { # true |
| %168:ptr<private, i32, read_write> = access %data, 1i |
| %x_168:i32 = load %168 |
| %170:f32 = convert %x_168 |
| %171:f32 = div %170, 10.0f |
| %172:f32 = add 0.5f, %171 |
| store %grey, %172 |
| exit_if # if_10 |
| } |
| %b48 = block { # false |
| %x_173:f32 = load_vector_element %gl_FragCoord, 1u |
| %174:i32 = convert %x_173 |
| %175:bool = lt %174, 90i |
| if %175 [t: %b49, f: %b50] { # if_11 |
| %b49 = block { # true |
| %176:ptr<private, i32, read_write> = access %data, 2i |
| %x_180:i32 = load %176 |
| %178:f32 = convert %x_180 |
| %179:f32 = div %178, 10.0f |
| %180:f32 = add 0.5f, %179 |
| store %grey, %180 |
| exit_if # if_11 |
| } |
| %b50 = block { # false |
| %x_185:f32 = load_vector_element %gl_FragCoord, 1u |
| %182:i32 = convert %x_185 |
| %183:bool = lt %182, 120i |
| if %183 [t: %b51, f: %b52] { # if_12 |
| %b51 = block { # true |
| %184:ptr<private, i32, read_write> = access %data, 3i |
| %x_192:i32 = load %184 |
| %186:f32 = convert %x_192 |
| %187:f32 = div %186, 10.0f |
| %188:f32 = add 0.5f, %187 |
| store %grey, %188 |
| exit_if # if_12 |
| } |
| %b52 = block { # false |
| %x_197:f32 = load_vector_element %gl_FragCoord, 1u |
| %190:i32 = convert %x_197 |
| %191:bool = lt %190, 150i |
| if %191 [t: %b53, f: %b54] { # if_13 |
| %b53 = block { # true |
| discard |
| exit_if # if_13 |
| } |
| %b54 = block { # false |
| %x_204:f32 = load_vector_element %gl_FragCoord, 1u |
| %193:i32 = convert %x_204 |
| %194:bool = lt %193, 180i |
| if %194 [t: %b55, f: %b56] { # if_14 |
| %b55 = block { # true |
| %195:ptr<private, i32, read_write> = access %data, 5i |
| %x_211:i32 = load %195 |
| %197:f32 = convert %x_211 |
| %198:f32 = div %197, 10.0f |
| %199:f32 = add 0.5f, %198 |
| store %grey, %199 |
| exit_if # if_14 |
| } |
| %b56 = block { # false |
| %x_216:f32 = load_vector_element %gl_FragCoord, 1u |
| %201:i32 = convert %x_216 |
| %202:bool = lt %201, 210i |
| if %202 [t: %b57, f: %b58] { # if_15 |
| %b57 = block { # true |
| %203:ptr<private, i32, read_write> = access %data, 6i |
| %x_223:i32 = load %203 |
| %205:f32 = convert %x_223 |
| %206:f32 = div %205, 10.0f |
| %207:f32 = add 0.5f, %206 |
| store %grey, %207 |
| exit_if # if_15 |
| } |
| %b58 = block { # false |
| %x_228:f32 = load_vector_element %gl_FragCoord, 1u |
| %209:i32 = convert %x_228 |
| %210:bool = lt %209, 240i |
| if %210 [t: %b59, f: %b60] { # if_16 |
| %b59 = block { # true |
| %211:ptr<private, i32, read_write> = access %data, 7i |
| %x_235:i32 = load %211 |
| %213:f32 = convert %x_235 |
| %214:f32 = div %213, 10.0f |
| %215:f32 = add 0.5f, %214 |
| store %grey, %215 |
| exit_if # if_16 |
| } |
| %b60 = block { # false |
| %x_240:f32 = load_vector_element %gl_FragCoord, 1u |
| %guard233:ptr<function, bool, read_write> = var, true |
| %218:i32 = convert %x_240 |
| %219:bool = lt %218, 270i |
| if %219 [t: %b61, f: %b62] { # if_17 |
| %b61 = block { # true |
| %220:ptr<private, i32, read_write> = access %data, 8i |
| %x_247:i32 = load %220 |
| %222:f32 = convert %x_247 |
| %223:f32 = div %222, 10.0f |
| %224:f32 = add 0.5f, %223 |
| store %grey, %224 |
| store %guard233, false |
| exit_if # if_17 |
| } |
| %b62 = block { # false |
| %225:bool = load %guard233 |
| if %225 [t: %b63] { # if_18 |
| %b63 = block { # true |
| %226:ptr<uniform, vec2<f32>, read> = access %x_28, 0u |
| %x_252:f32 = load_vector_element %226, 1u |
| %228:bool = lt 0.0f, %x_252 |
| %229:bool = eq %228, false |
| if %229 [t: %b64] { # if_19 |
| %b64 = block { # true |
| store %guard233, false |
| exit_if # if_19 |
| } |
| } |
| %230:bool = load %guard233 |
| if %230 [t: %b65] { # if_20 |
| %b65 = block { # true |
| discard |
| exit_if # if_20 |
| } |
| } |
| exit_if # if_18 |
| } |
| } |
| exit_if # if_17 |
| } |
| } |
| 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 |
| } |
| } |
| %x_255:f32 = load %grey |
| %x_256:vec3<f32> = construct %x_255, %x_255, %x_255 |
| %233:f32 = access %x_256, 0u |
| %234:f32 = access %x_256, 1u |
| %235:f32 = access %x_256, 2u |
| %236:vec4<f32> = construct %233, %234, %235, 1.0f |
| store %x_GLF_color, %236 |
| ret |
| } |
| } |
| %tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out -> %b66 { |
| %b66 = block { |
| store %gl_FragCoord, %gl_FragCoord_param |
| %239:void = call %main_1 |
| %240:vec4<f32> = load %x_GLF_color |
| %241:main_out = construct %240 |
| ret %241 |
| } |
| } |
| |
| 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. * |
| ******************************************************************** |