| 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_302:i32 = load %f |
| store %k, %x_302 |
| %x_303:i32 = load %f |
| store %i, %x_303 |
| %x_304:i32 = load %mid |
| %17:i32 = add %x_304, 1i |
| store %j, %17 |
| loop [b: %b3, c: %b4] { # loop_1 |
| %b3 = block { # body |
| %x_310:i32 = load %i |
| %x_311:i32 = load %mid |
| %x_313:i32 = load %j |
| %x_314:i32 = load %to |
| %22:bool = lte %x_310, %x_311 |
| %23:bool = lte %x_313, %x_314 |
| %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_318:i32 = load %i |
| %26:ptr<private, i32, read_write> = access %data, %x_318 |
| %x_320:i32 = load %26 |
| %x_321:i32 = load %j |
| %29:ptr<private, i32, read_write> = access %data, %x_321 |
| %x_323:i32 = load %29 |
| %31:bool = lt %x_320, %x_323 |
| if %31 [t: %b7, f: %b8] { # if_2 |
| %b7 = block { # true |
| %x_328:i32 = load %k |
| %33:i32 = add %x_328, 1i |
| store %k, %33 |
| %x_330:i32 = load %i |
| %35:i32 = add %x_330, 1i |
| store %i, %35 |
| %36:ptr<private, i32, read_write> = access %data, %x_330 |
| %x_333:i32 = load %36 |
| %38:ptr<private, i32, read_write> = access %temp, %x_328 |
| store %38, %x_333 |
| exit_if # if_2 |
| } |
| %b8 = block { # false |
| %x_335:i32 = load %k |
| %40:i32 = add %x_335, 1i |
| store %k, %40 |
| %x_337:i32 = load %j |
| %42:i32 = add %x_337, 1i |
| store %j, %42 |
| %43:ptr<private, i32, read_write> = access %data, %x_337 |
| %x_340:i32 = load %43 |
| %45:ptr<private, i32, read_write> = access %temp, %x_335 |
| store %45, %x_340 |
| exit_if # if_2 |
| } |
| } |
| continue %b4 |
| } |
| %b4 = block { # continuing |
| next_iteration %b3 |
| } |
| } |
| loop [b: %b9, c: %b10] { # loop_2 |
| %b9 = block { # body |
| %x_346:i32 = load %i |
| %x_348:i32 = load %i |
| %x_349:i32 = load %mid |
| %49:bool = lt %x_346, 10i |
| %50:bool = lte %x_348, %x_349 |
| %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_353:i32 = load %k |
| %53:i32 = add %x_353, 1i |
| store %k, %53 |
| %x_355:i32 = load %i |
| %55:i32 = add %x_355, 1i |
| store %i, %55 |
| %56:ptr<private, i32, read_write> = access %data, %x_355 |
| %x_358:i32 = load %56 |
| %58:ptr<private, i32, read_write> = access %temp, %x_353 |
| store %58, %x_358 |
| continue %b10 |
| } |
| %b10 = block { # continuing |
| next_iteration %b9 |
| } |
| } |
| %x_360:i32 = load %f |
| store %i_1, %x_360 |
| loop [b: %b13, c: %b14] { # loop_3 |
| %b13 = block { # body |
| %x_365:i32 = load %i_1 |
| %x_366:i32 = load %to |
| %62:bool = lte %x_365, %x_366 |
| if %62 [t: %b15, f: %b16] { # if_4 |
| %b15 = block { # true |
| exit_if # if_4 |
| } |
| %b16 = block { # false |
| exit_loop # loop_3 |
| } |
| } |
| %x_369:i32 = load %i_1 |
| %x_370:i32 = load %i_1 |
| %65:ptr<private, i32, read_write> = access %temp, %x_370 |
| %x_372:i32 = load %65 |
| %67:ptr<private, i32, read_write> = access %data, %x_369 |
| store %67, %x_372 |
| continue %b14 |
| } |
| %b14 = block { # continuing |
| %x_374:i32 = load %i_1 |
| %69:i32 = add %x_374, 1i |
| store %i_1, %69 |
| next_iteration %b13 |
| } |
| } |
| ret |
| } |
| } |
| %main_1 = func():void -> %b17 { |
| %b17 = block { |
| %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 |
| %84:ptr<uniform, vec2<f32>, read> = access %x_28, 0u |
| %x_96:f32 = load_vector_element %84, 0u |
| %86:i32 = convert %x_96 |
| store %i_3, %86 |
| loop [b: %b18, c: %b19] { # loop_4 |
| %b18 = block { # body |
| %x_102:i32 = load %i_3 |
| 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 = block { # case |
| %x_132:i32 = load %i_3 |
| %89:ptr<private, i32, read_write> = access %data, %x_132 |
| store %89, -5i |
| exit_switch # switch_1 |
| } |
| %b21 = block { # case |
| %x_130:i32 = load %i_3 |
| %91:ptr<private, i32, read_write> = access %data, %x_130 |
| store %91, -4i |
| exit_switch # switch_1 |
| } |
| %b22 = block { # case |
| %x_128:i32 = load %i_3 |
| %93:ptr<private, i32, read_write> = access %data, %x_128 |
| store %93, -3i |
| exit_switch # switch_1 |
| } |
| %b23 = block { # case |
| %x_126:i32 = load %i_3 |
| %95:ptr<private, i32, read_write> = access %data, %x_126 |
| store %95, -2i |
| exit_switch # switch_1 |
| } |
| %b24 = block { # case |
| %x_124:i32 = load %i_3 |
| %97:ptr<private, i32, read_write> = access %data, %x_124 |
| store %97, -1i |
| exit_switch # switch_1 |
| } |
| %b25 = block { # case |
| %x_122:i32 = load %i_3 |
| %99:ptr<private, i32, read_write> = access %data, %x_122 |
| store %99, 0i |
| exit_switch # switch_1 |
| } |
| %b26 = block { # case |
| %x_120:i32 = load %i_3 |
| %101:ptr<private, i32, read_write> = access %data, %x_120 |
| store %101, 1i |
| exit_switch # switch_1 |
| } |
| %b27 = block { # case |
| %x_118:i32 = load %i_3 |
| %103:ptr<private, i32, read_write> = access %data, %x_118 |
| store %103, 2i |
| exit_switch # switch_1 |
| } |
| %b28 = block { # case |
| %x_116:i32 = load %i_3 |
| %105:ptr<private, i32, read_write> = access %data, %x_116 |
| store %105, 3i |
| exit_switch # switch_1 |
| } |
| %b29 = block { # case |
| %x_114:i32 = load %i_3 |
| %107:ptr<private, i32, read_write> = access %data, %x_114 |
| store %107, 4i |
| exit_switch # switch_1 |
| } |
| %b30 = block { # case |
| exit_switch # switch_1 |
| } |
| } |
| %x_134:i32 = load %i_3 |
| %109:i32 = add %x_134, 1i |
| store %i_3, %109 |
| continue %b19 |
| } |
| %b19 = block { # continuing |
| %x_136:i32 = load %i_3 |
| %111:bool = lt %x_136, 10i |
| %112:bool = eq %111, false |
| break_if %112 %b18 |
| } |
| } |
| store %j_1, 0i |
| loop [b: %b31, c: %b32] { # loop_5 |
| %b31 = block { # body |
| %x_142:i32 = load %j_1 |
| %114:bool = lt %x_142, 10i |
| if %114 [t: %b33, f: %b34] { # if_5 |
| %b33 = block { # true |
| exit_if # if_5 |
| } |
| %b34 = block { # false |
| exit_loop # loop_5 |
| } |
| } |
| %x_145:i32 = load %j_1 |
| %x_146:i32 = load %j_1 |
| %117:ptr<private, i32, read_write> = access %data, %x_146 |
| %x_148:i32 = load %117 |
| %119:ptr<private, i32, read_write> = access %temp, %x_145 |
| store %119, %x_148 |
| continue %b32 |
| } |
| %b32 = block { # continuing |
| %x_150:i32 = load %j_1 |
| %121:i32 = add %x_150, 1i |
| store %j_1, %121 |
| next_iteration %b31 |
| } |
| } |
| store %x_94, 0i |
| store %x_93, 9i |
| store %x_92, 1i |
| loop [b: %b35, c: %b36] { # loop_6 |
| %b35 = block { # body |
| %x_156:i32 = load %x_92 |
| %x_157:i32 = load %x_93 |
| %124:bool = lte %x_156, %x_157 |
| if %124 [t: %b37, f: %b38] { # if_6 |
| %b37 = block { # true |
| exit_if # if_6 |
| } |
| %b38 = block { # false |
| exit_loop # loop_6 |
| } |
| } |
| %x_160:i32 = load %x_94 |
| store %x_91, %x_160 |
| loop [b: %b39, c: %b40] { # loop_7 |
| %b39 = block { # body |
| %x_165:i32 = load %x_91 |
| %x_166:i32 = load %x_93 |
| %128:bool = lt %x_165, %x_166 |
| if %128 [t: %b41, f: %b42] { # if_7 |
| %b41 = block { # true |
| exit_if # if_7 |
| } |
| %b42 = block { # false |
| exit_loop # loop_7 |
| } |
| } |
| %x_169:i32 = load %x_91 |
| store %x_90, %x_169 |
| %x_170:i32 = load %x_91 |
| %x_171:i32 = load %x_92 |
| %132:i32 = add %x_170, %x_171 |
| %133:i32 = sub %132, 1i |
| store %x_89, %133 |
| %x_174:i32 = load %x_91 |
| %x_175:i32 = load %x_92 |
| %x_179:i32 = load %x_93 |
| %137:i32 = mul 2i, %x_175 |
| %138:i32 = add %x_174, %137 |
| %139:i32 = sub %138, 1i |
| %140:i32 = min %139, %x_179 |
| store %x_88, %140 |
| %x_181:i32 = load %x_90 |
| store %x_87, %x_181 |
| %x_182:i32 = load %x_89 |
| store %x_86, %x_182 |
| %x_183:i32 = load %x_88 |
| store %x_85, %x_183 |
| %144:void = call %merge_i1_i1_i1_, %x_87, %x_86, %x_85 |
| continue %b40 |
| } |
| %b40 = block { # continuing |
| %x_185:i32 = load %x_92 |
| %x_187:i32 = load %x_91 |
| %147:i32 = mul 2i, %x_185 |
| %148:i32 = add %x_187, %147 |
| store %x_91, %148 |
| next_iteration %b39 |
| } |
| } |
| continue %b36 |
| } |
| %b36 = block { # continuing |
| %x_189:i32 = load %x_92 |
| %150:i32 = mul 2i, %x_189 |
| store %x_92, %150 |
| next_iteration %b35 |
| } |
| } |
| %x_193:f32 = load_vector_element %gl_FragCoord, 1u |
| %152:i32 = convert %x_193 |
| %153:bool = lt %152, 30i |
| if %153 [t: %b43, f: %b44] { # if_8 |
| %b43 = block { # true |
| %154:ptr<private, i32, read_write> = access %data, 0i |
| %x_200:i32 = load %154 |
| %156:f32 = convert %x_200 |
| %157:f32 = div %156, 10.0f |
| %158:f32 = add 0.5f, %157 |
| store %grey, %158 |
| exit_if # if_8 |
| } |
| %b44 = block { # false |
| %x_205:f32 = load_vector_element %gl_FragCoord, 1u |
| %160:i32 = convert %x_205 |
| %161:bool = lt %160, 60i |
| if %161 [t: %b45, f: %b46] { # if_9 |
| %b45 = block { # true |
| %162:ptr<private, i32, read_write> = access %data, 1i |
| %x_212:i32 = load %162 |
| %164:f32 = convert %x_212 |
| %165:f32 = div %164, 10.0f |
| %166:f32 = add 0.5f, %165 |
| store %grey, %166 |
| exit_if # if_9 |
| } |
| %b46 = block { # false |
| %x_217:f32 = load_vector_element %gl_FragCoord, 1u |
| %168:i32 = convert %x_217 |
| %169:bool = lt %168, 90i |
| if %169 [t: %b47, f: %b48] { # if_10 |
| %b47 = block { # true |
| %170:ptr<private, i32, read_write> = access %data, 2i |
| %x_224:i32 = load %170 |
| %172:f32 = convert %x_224 |
| %173:f32 = div %172, 10.0f |
| %174:f32 = add 0.5f, %173 |
| store %grey, %174 |
| exit_if # if_10 |
| } |
| %b48 = block { # false |
| %x_229:f32 = load_vector_element %gl_FragCoord, 1u |
| %176:i32 = convert %x_229 |
| %177:bool = lt %176, 120i |
| if %177 [t: %b49, f: %b50] { # if_11 |
| %b49 = block { # true |
| %178:ptr<private, i32, read_write> = access %data, 3i |
| %x_236:i32 = load %178 |
| %180:f32 = convert %x_236 |
| %181:f32 = div %180, 10.0f |
| %182:f32 = add 0.5f, %181 |
| store %grey, %182 |
| exit_if # if_11 |
| } |
| %b50 = block { # false |
| %x_241:f32 = load_vector_element %gl_FragCoord, 1u |
| %184:i32 = convert %x_241 |
| %185:bool = lt %184, 150i |
| if %185 [t: %b51, f: %b52] { # if_12 |
| %b51 = block { # true |
| discard |
| exit_if # if_12 |
| } |
| %b52 = block { # false |
| %x_248:f32 = load_vector_element %gl_FragCoord, 1u |
| %187:i32 = convert %x_248 |
| %188:bool = lt %187, 180i |
| if %188 [t: %b53, f: %b54] { # if_13 |
| %b53 = block { # true |
| %189:ptr<private, i32, read_write> = access %data, 5i |
| %x_255:i32 = load %189 |
| %191:f32 = convert %x_255 |
| %192:f32 = div %191, 10.0f |
| %193:f32 = add 0.5f, %192 |
| store %grey, %193 |
| exit_if # if_13 |
| } |
| %b54 = block { # false |
| %x_260:f32 = load_vector_element %gl_FragCoord, 1u |
| %195:i32 = convert %x_260 |
| %196:bool = lt %195, 210i |
| if %196 [t: %b55, f: %b56] { # if_14 |
| %b55 = block { # true |
| %197:ptr<private, i32, read_write> = access %data, 6i |
| %x_267:i32 = load %197 |
| %199:f32 = convert %x_267 |
| %200:f32 = div %199, 10.0f |
| %201:f32 = add 0.5f, %200 |
| store %grey, %201 |
| exit_if # if_14 |
| } |
| %b56 = block { # false |
| %x_272:f32 = load_vector_element %gl_FragCoord, 1u |
| %203:i32 = convert %x_272 |
| %204:bool = lt %203, 240i |
| if %204 [t: %b57, f: %b58] { # if_15 |
| %b57 = block { # true |
| %205:ptr<private, i32, read_write> = access %data, 7i |
| %x_279:i32 = load %205 |
| %207:f32 = convert %x_279 |
| %208:f32 = div %207, 10.0f |
| %209:f32 = add 0.5f, %208 |
| store %grey, %209 |
| exit_if # if_15 |
| } |
| %b58 = block { # false |
| %x_284:f32 = load_vector_element %gl_FragCoord, 1u |
| %211:i32 = convert %x_284 |
| %212:bool = lt %211, 270i |
| if %212 [t: %b59, f: %b60] { # if_16 |
| %b59 = block { # true |
| %213:ptr<private, i32, read_write> = access %data, 8i |
| %x_291:i32 = load %213 |
| %215:f32 = convert %x_291 |
| %216:f32 = div %215, 10.0f |
| %217:f32 = add 0.5f, %216 |
| store %grey, %217 |
| exit_if # if_16 |
| } |
| %b60 = block { # false |
| discard |
| 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 |
| } |
| } |
| %x_295:f32 = load %grey |
| %x_296:vec3<f32> = construct %x_295, %x_295, %x_295 |
| %220:f32 = access %x_296, 0u |
| %221:f32 = access %x_296, 1u |
| %222:f32 = access %x_296, 2u |
| %223:vec4<f32> = construct %220, %221, %222, 1.0f |
| store %x_GLF_color, %223 |
| ret |
| } |
| } |
| %tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out -> %b61 { |
| %b61 = block { |
| store %gl_FragCoord, %gl_FragCoord_param |
| %226:void = call %main_1 |
| %227:vec4<f32> = load %x_GLF_color |
| %228:main_out = construct %227 |
| ret %228 |
| } |
| } |
| %mergeSort_ = func():void -> %b62 { |
| %b62 = 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: %b63, c: %b64] { # loop_8 |
| %b63 = block { # body |
| %x_381:i32 = load %m |
| %x_382:i32 = load %high |
| %242:bool = lte %x_381, %x_382 |
| if %242 [t: %b65, f: %b66] { # if_17 |
| %b65 = block { # true |
| exit_if # if_17 |
| } |
| %b66 = block { # false |
| exit_loop # loop_8 |
| } |
| } |
| %x_385:i32 = load %low |
| store %i_2, %x_385 |
| loop [b: %b67, c: %b68] { # loop_9 |
| %b67 = block { # body |
| %x_390:i32 = load %i_2 |
| %x_391:i32 = load %high |
| %246:bool = lt %x_390, %x_391 |
| if %246 [t: %b69, f: %b70] { # if_18 |
| %b69 = block { # true |
| exit_if # if_18 |
| } |
| %b70 = block { # false |
| exit_loop # loop_9 |
| } |
| } |
| %x_394:i32 = load %i_2 |
| store %f_1, %x_394 |
| %x_395:i32 = load %i_2 |
| %x_396:i32 = load %m |
| %250:i32 = add %x_395, %x_396 |
| %251:i32 = sub %250, 1i |
| store %mid_1, %251 |
| %x_399:i32 = load %i_2 |
| %x_400:i32 = load %m |
| %x_404:i32 = load %high |
| %255:i32 = mul 2i, %x_400 |
| %256:i32 = add %x_399, %255 |
| %257:i32 = sub %256, 1i |
| %258:i32 = min %257, %x_404 |
| store %to_1, %258 |
| %x_406:i32 = load %f_1 |
| store %param, %x_406 |
| %x_407:i32 = load %mid_1 |
| store %param_1, %x_407 |
| %x_408:i32 = load %to_1 |
| store %param_2, %x_408 |
| %262:void = call %merge_i1_i1_i1_, %param, %param_1, %param_2 |
| continue %b68 |
| } |
| %b68 = block { # continuing |
| %x_410:i32 = load %m |
| %x_412:i32 = load %i_2 |
| %265:i32 = mul 2i, %x_410 |
| %266:i32 = add %x_412, %265 |
| store %i_2, %266 |
| next_iteration %b67 |
| } |
| } |
| continue %b64 |
| } |
| %b64 = block { # continuing |
| %x_414:i32 = load %m |
| %268:i32 = mul 2i, %x_414 |
| store %m, %268 |
| next_iteration %b63 |
| } |
| } |
| ret |
| } |
| } |
| |
| 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. * |
| ******************************************************************** |