| 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_303:i32 = load %f |
| store %k, %x_303 |
| %x_304:i32 = load %f |
| store %i, %x_304 |
| %x_305:i32 = load %mid |
| %17:i32 = add %x_305, 1i |
| store %j, %17 |
| loop [b: %b3, c: %b4] { # loop_1 |
| %b3 = block { # body |
| %x_311:i32 = load %i |
| %x_312:i32 = load %mid |
| %x_314:i32 = load %j |
| %x_315:i32 = load %to |
| %22:bool = lte %x_311, %x_312 |
| %23:bool = lte %x_314, %x_315 |
| %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_319:i32 = load %i |
| %26:ptr<private, i32, read_write> = access %data, %x_319 |
| %x_321:i32 = load %26 |
| %x_322:i32 = load %j |
| %29:ptr<private, i32, read_write> = access %data, %x_322 |
| %x_324:i32 = load %29 |
| %31:bool = lt %x_321, %x_324 |
| if %31 [t: %b7, f: %b8] { # if_2 |
| %b7 = block { # true |
| %x_329:i32 = load %k |
| %33:i32 = add %x_329, 1i |
| store %k, %33 |
| %x_331:i32 = load %i |
| %35:i32 = add %x_331, 1i |
| store %i, %35 |
| %36:ptr<private, i32, read_write> = access %data, %x_331 |
| %x_334:i32 = load %36 |
| %38:ptr<private, i32, read_write> = access %temp, %x_329 |
| store %38, %x_334 |
| exit_if # if_2 |
| } |
| %b8 = block { # false |
| %x_336:i32 = load %k |
| %40:i32 = add %x_336, 1i |
| store %k, %40 |
| %x_338:i32 = load %j |
| %42:i32 = add %x_338, 1i |
| store %j, %42 |
| %43:ptr<private, i32, read_write> = access %data, %x_338 |
| %x_341:i32 = load %43 |
| %45:ptr<private, i32, read_write> = access %temp, %x_336 |
| store %45, %x_341 |
| exit_if # if_2 |
| } |
| } |
| continue %b4 |
| } |
| %b4 = block { # continuing |
| next_iteration %b3 |
| } |
| } |
| loop [b: %b9, c: %b10] { # loop_2 |
| %b9 = block { # body |
| %x_347:i32 = load %i |
| %x_349:i32 = load %i |
| %x_350:i32 = load %mid |
| %49:bool = lt %x_347, 10i |
| %50:bool = lte %x_349, %x_350 |
| %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_354:i32 = load %k |
| %53:i32 = add %x_354, 1i |
| store %k, %53 |
| %x_356:i32 = load %i |
| %55:i32 = add %x_356, 1i |
| store %i, %55 |
| %56:ptr<private, i32, read_write> = access %data, %x_356 |
| %x_359:i32 = load %56 |
| %58:ptr<private, i32, read_write> = access %temp, %x_354 |
| store %58, %x_359 |
| continue %b10 |
| } |
| %b10 = block { # continuing |
| next_iteration %b9 |
| } |
| } |
| %x_361:i32 = load %f |
| store %i_1, %x_361 |
| loop [b: %b13, c: %b14] { # loop_3 |
| %b13 = block { # body |
| %x_366:i32 = load %i_1 |
| %x_367:i32 = load %to |
| %62:bool = lte %x_366, %x_367 |
| if %62 [t: %b15, f: %b16] { # if_4 |
| %b15 = block { # true |
| exit_if # if_4 |
| } |
| %b16 = block { # false |
| exit_loop # loop_3 |
| } |
| } |
| %x_370:i32 = load %i_1 |
| %x_371:i32 = load %i_1 |
| %65:ptr<private, i32, read_write> = access %temp, %x_371 |
| %x_373:i32 = load %65 |
| %67:ptr<private, i32, read_write> = access %data, %x_370 |
| store %67, %x_373 |
| continue %b14 |
| } |
| %b14 = block { # continuing |
| %x_375:i32 = load %i_1 |
| %69:i32 = add %x_375, 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 |
| %x_173:array<i32, 10> = load %data |
| store %data, array<i32, 10>(0i) |
| store %data, %x_173 |
| %133:i32 = add %x_170, %x_171 |
| %134:i32 = sub %133, 1i |
| store %x_89, %134 |
| %x_175:i32 = load %x_91 |
| %x_176:i32 = load %x_92 |
| %x_180:i32 = load %x_93 |
| %138:i32 = mul 2i, %x_176 |
| %139:i32 = add %x_175, %138 |
| %140:i32 = sub %139, 1i |
| %141:i32 = min %140, %x_180 |
| store %x_88, %141 |
| %x_182:i32 = load %x_90 |
| store %x_87, %x_182 |
| %x_183:i32 = load %x_89 |
| store %x_86, %x_183 |
| %x_184:i32 = load %x_88 |
| store %x_85, %x_184 |
| %145:void = call %merge_i1_i1_i1_, %x_87, %x_86, %x_85 |
| continue %b40 |
| } |
| %b40 = block { # continuing |
| %x_186:i32 = load %x_92 |
| %x_188:i32 = load %x_91 |
| %148:i32 = mul 2i, %x_186 |
| %149:i32 = add %x_188, %148 |
| store %x_91, %149 |
| next_iteration %b39 |
| } |
| } |
| continue %b36 |
| } |
| %b36 = block { # continuing |
| %x_190:i32 = load %x_92 |
| %151:i32 = mul 2i, %x_190 |
| store %x_92, %151 |
| next_iteration %b35 |
| } |
| } |
| %x_194:f32 = load_vector_element %gl_FragCoord, 1u |
| %153:i32 = convert %x_194 |
| %154:bool = lt %153, 30i |
| if %154 [t: %b43, f: %b44] { # if_8 |
| %b43 = block { # true |
| %155:ptr<private, i32, read_write> = access %data, 0i |
| %x_201:i32 = load %155 |
| %157:f32 = convert %x_201 |
| %158:f32 = div %157, 10.0f |
| %159:f32 = add 0.5f, %158 |
| store %grey, %159 |
| exit_if # if_8 |
| } |
| %b44 = block { # false |
| %x_206:f32 = load_vector_element %gl_FragCoord, 1u |
| %161:i32 = convert %x_206 |
| %162:bool = lt %161, 60i |
| if %162 [t: %b45, f: %b46] { # if_9 |
| %b45 = block { # true |
| %163:ptr<private, i32, read_write> = access %data, 1i |
| %x_213:i32 = load %163 |
| %165:f32 = convert %x_213 |
| %166:f32 = div %165, 10.0f |
| %167:f32 = add 0.5f, %166 |
| store %grey, %167 |
| exit_if # if_9 |
| } |
| %b46 = block { # false |
| %x_218:f32 = load_vector_element %gl_FragCoord, 1u |
| %169:i32 = convert %x_218 |
| %170:bool = lt %169, 90i |
| if %170 [t: %b47, f: %b48] { # if_10 |
| %b47 = block { # true |
| %171:ptr<private, i32, read_write> = access %data, 2i |
| %x_225:i32 = load %171 |
| %173:f32 = convert %x_225 |
| %174:f32 = div %173, 10.0f |
| %175:f32 = add 0.5f, %174 |
| store %grey, %175 |
| exit_if # if_10 |
| } |
| %b48 = block { # false |
| %x_230:f32 = load_vector_element %gl_FragCoord, 1u |
| %177:i32 = convert %x_230 |
| %178:bool = lt %177, 120i |
| if %178 [t: %b49, f: %b50] { # if_11 |
| %b49 = block { # true |
| %179:ptr<private, i32, read_write> = access %data, 3i |
| %x_237:i32 = load %179 |
| %181:f32 = convert %x_237 |
| %182:f32 = div %181, 10.0f |
| %183:f32 = add 0.5f, %182 |
| store %grey, %183 |
| exit_if # if_11 |
| } |
| %b50 = block { # false |
| %x_242:f32 = load_vector_element %gl_FragCoord, 1u |
| %185:i32 = convert %x_242 |
| %186:bool = lt %185, 150i |
| if %186 [t: %b51, f: %b52] { # if_12 |
| %b51 = block { # true |
| discard |
| exit_if # if_12 |
| } |
| %b52 = block { # false |
| %x_249:f32 = load_vector_element %gl_FragCoord, 1u |
| %188:i32 = convert %x_249 |
| %189:bool = lt %188, 180i |
| if %189 [t: %b53, f: %b54] { # if_13 |
| %b53 = block { # true |
| %190:ptr<private, i32, read_write> = access %data, 5i |
| %x_256:i32 = load %190 |
| %192:f32 = convert %x_256 |
| %193:f32 = div %192, 10.0f |
| %194:f32 = add 0.5f, %193 |
| store %grey, %194 |
| exit_if # if_13 |
| } |
| %b54 = block { # false |
| %x_261:f32 = load_vector_element %gl_FragCoord, 1u |
| %196:i32 = convert %x_261 |
| %197:bool = lt %196, 210i |
| if %197 [t: %b55, f: %b56] { # if_14 |
| %b55 = block { # true |
| %198:ptr<private, i32, read_write> = access %data, 6i |
| %x_268:i32 = load %198 |
| %200:f32 = convert %x_268 |
| %201:f32 = div %200, 10.0f |
| %202:f32 = add 0.5f, %201 |
| store %grey, %202 |
| exit_if # if_14 |
| } |
| %b56 = block { # false |
| %x_273:f32 = load_vector_element %gl_FragCoord, 1u |
| %204:i32 = convert %x_273 |
| %205:bool = lt %204, 240i |
| if %205 [t: %b57, f: %b58] { # if_15 |
| %b57 = block { # true |
| %206:ptr<private, i32, read_write> = access %data, 7i |
| %x_280:i32 = load %206 |
| %208:f32 = convert %x_280 |
| %209:f32 = div %208, 10.0f |
| %210:f32 = add 0.5f, %209 |
| store %grey, %210 |
| exit_if # if_15 |
| } |
| %b58 = block { # false |
| %x_285:f32 = load_vector_element %gl_FragCoord, 1u |
| %212:i32 = convert %x_285 |
| %213:bool = lt %212, 270i |
| if %213 [t: %b59, f: %b60] { # if_16 |
| %b59 = block { # true |
| %214:ptr<private, i32, read_write> = access %data, 8i |
| %x_292:i32 = load %214 |
| %216:f32 = convert %x_292 |
| %217:f32 = div %216, 10.0f |
| %218:f32 = add 0.5f, %217 |
| store %grey, %218 |
| 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_296:f32 = load %grey |
| %x_297:vec3<f32> = construct %x_296, %x_296, %x_296 |
| %221:f32 = access %x_297, 0u |
| %222:f32 = access %x_297, 1u |
| %223:f32 = access %x_297, 2u |
| %224:vec4<f32> = construct %221, %222, %223, 1.0f |
| store %x_GLF_color, %224 |
| ret |
| } |
| } |
| %tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out -> %b61 { |
| %b61 = block { |
| store %gl_FragCoord, %gl_FragCoord_param |
| %227:void = call %main_1 |
| %228:vec4<f32> = load %x_GLF_color |
| %229:main_out = construct %228 |
| ret %229 |
| } |
| } |
| %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_382:i32 = load %m |
| %x_383:i32 = load %high |
| %243:bool = lte %x_382, %x_383 |
| if %243 [t: %b65, f: %b66] { # if_17 |
| %b65 = block { # true |
| exit_if # if_17 |
| } |
| %b66 = block { # false |
| exit_loop # loop_8 |
| } |
| } |
| %x_386:i32 = load %low |
| store %i_2, %x_386 |
| loop [b: %b67, c: %b68] { # loop_9 |
| %b67 = block { # body |
| %x_391:i32 = load %i_2 |
| %x_392:i32 = load %high |
| %247:bool = lt %x_391, %x_392 |
| if %247 [t: %b69, f: %b70] { # if_18 |
| %b69 = block { # true |
| exit_if # if_18 |
| } |
| %b70 = block { # false |
| exit_loop # loop_9 |
| } |
| } |
| %x_395:i32 = load %i_2 |
| store %f_1, %x_395 |
| %x_396:i32 = load %i_2 |
| %x_397:i32 = load %m |
| %251:i32 = add %x_396, %x_397 |
| %252:i32 = sub %251, 1i |
| store %mid_1, %252 |
| %x_400:i32 = load %i_2 |
| %x_401:i32 = load %m |
| %x_405:i32 = load %high |
| %256:i32 = mul 2i, %x_401 |
| %257:i32 = add %x_400, %256 |
| %258:i32 = sub %257, 1i |
| %259:i32 = min %258, %x_405 |
| store %to_1, %259 |
| %x_407:i32 = load %f_1 |
| store %param, %x_407 |
| %x_408:i32 = load %mid_1 |
| store %param_1, %x_408 |
| %x_409:i32 = load %to_1 |
| store %param_2, %x_409 |
| %263:void = call %merge_i1_i1_i1_, %param, %param_1, %param_2 |
| continue %b68 |
| } |
| %b68 = block { # continuing |
| %x_411:i32 = load %m |
| %x_413:i32 = load %i_2 |
| %266:i32 = mul 2i, %x_411 |
| %267:i32 = add %x_413, %266 |
| store %i_2, %267 |
| next_iteration %b67 |
| } |
| } |
| continue %b64 |
| } |
| %b64 = block { # continuing |
| %x_415:i32 = load %m |
| %269:i32 = mul 2i, %x_415 |
| store %m, %269 |
| 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. * |
| ******************************************************************** |