| SKIP: FAILED |
| |
| ../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: buf0 = 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 |
| %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var |
| %x_6:ptr<uniform, buf0, read> = var @binding_point(0, 0) |
| %x_GLF_color:ptr<private, vec4<f32>, read_write> = var |
| } |
| |
| %main_1 = func():void { |
| $B2: { |
| %indexable:ptr<function, array<vec4<f32>, 16>, read_write> = var |
| %x_76:ptr<function, vec2<i32>, read_write> = var |
| %x_109:ptr<function, vec2<i32>, read_write> = var |
| %x_115:ptr<function, i32, read_write> = var |
| %x_76_phi:ptr<function, vec2<i32>, read_write> = var |
| %x_79_phi:ptr<function, i32, read_write> = var |
| %x_110_phi:ptr<function, vec2<i32>, read_write> = var |
| %x_112_phi:ptr<function, vec2<i32>, read_write> = var |
| %13:vec4<f32> = load %gl_FragCoord |
| %x_55:vec4<f32> = let %13 |
| %15:ptr<uniform, vec2<f32>, read> = access %x_6, 0u |
| %16:vec2<f32> = load %15 |
| %x_58:vec2<f32> = let %16 |
| %18:f32 = access %x_55, 0u |
| %19:f32 = access %x_55, 1u |
| %20:vec2<f32> = construct %18, %19 |
| %21:vec2<f32> = div %20, %x_58 |
| %x_59:vec2<f32> = let %21 |
| %23:f32 = access %x_59, 0u |
| %24:f32 = mul %23, 8.0f |
| %25:i32 = call %tint_f32_to_i32, %24 |
| %x_62:i32 = let %25 |
| %28:f32 = access %x_59, 1u |
| %29:f32 = mul %28, 8.0f |
| %30:i32 = call %tint_f32_to_i32, %29 |
| %x_65:i32 = let %30 |
| %32:i32 = and %x_62, 5i |
| %33:i32 = and %x_65, 10i |
| %34:i32 = or %32, %33 |
| %35:i32 = mul %34, 8i |
| %36:i32 = and %x_65, 5i |
| %37:i32 = and %x_62, 10i |
| %38:i32 = or %36, %37 |
| %39:i32 = add %35, %38 |
| %40:vec2<i32> = construct %39, 0i |
| %x_74:vec2<i32> = let %40 |
| store %x_76_phi, %x_74 |
| store %x_79_phi, 0i |
| loop [b: $B3, c: $B4] { # loop_1 |
| $B3: { # body |
| %x_90:ptr<function, vec2<i32>, read_write> = var |
| %x_98:ptr<function, vec2<i32>, read_write> = var |
| %x_80:ptr<function, i32, read_write> = var |
| %x_91_phi:ptr<function, vec2<i32>, read_write> = var |
| %x_99_phi:ptr<function, vec2<i32>, read_write> = var |
| %47:vec2<i32> = load %x_76_phi |
| store %x_76, %47 |
| %48:i32 = load %x_79_phi |
| %x_79:i32 = let %48 |
| %50:bool = lt %x_79, 100i |
| if %50 [t: $B5, f: $B6] { # if_1 |
| $B5: { # true |
| exit_if # if_1 |
| } |
| $B6: { # false |
| exit_loop # loop_1 |
| } |
| } |
| %51:vec2<i32> = load %x_76 |
| store %x_91_phi, %51 |
| %52:i32 = load_vector_element %x_76, 0u |
| %53:bool = gt %52, 0i |
| if %53 [t: $B7] { # if_2 |
| $B7: { # true |
| %54:vec2<i32> = load %x_76 |
| store %x_90, %54 |
| %55:i32 = load_vector_element %x_76, 1u |
| %56:i32 = sub %55, 1i |
| store_vector_element %x_90, 1u, %56 |
| %57:vec2<i32> = load %x_90 |
| store %x_91_phi, %57 |
| exit_if # if_2 |
| } |
| } |
| %58:vec2<i32> = load %x_91_phi |
| %x_91:vec2<i32> = let %58 |
| store %x_99_phi, %x_91 |
| %60:i32 = access %x_91, 0u |
| %61:bool = lt %60, 0i |
| if %61 [t: $B8] { # if_3 |
| $B8: { # true |
| store %x_98, %x_91 |
| %62:i32 = access %x_91, 1u |
| %63:i32 = add %62, 1i |
| store_vector_element %x_98, 1u, %63 |
| %64:vec2<i32> = load %x_98 |
| store %x_99_phi, %64 |
| exit_if # if_3 |
| } |
| } |
| %65:vec2<i32> = load %x_99_phi |
| %x_99:vec2<i32> = let %65 |
| %x_77_1:ptr<function, vec2<i32>, read_write> = var, %x_99 |
| %68:i32 = access %x_99, 0u |
| %69:i32 = access %x_99, 1u |
| %70:i32 = call %tint_div_i32, %69, 2i |
| %72:i32 = add %68, %70 |
| store_vector_element %x_77_1, 0u, %72 |
| %73:vec2<i32> = load %x_77_1 |
| %x_77:vec2<i32> = let %73 |
| continue # -> $B4 |
| } |
| $B4: { # continuing |
| %75:i32 = add %x_79, 1i |
| store %x_80, %75 |
| store %x_76_phi, %x_77 |
| %76:i32 = load %x_80 |
| store %x_79_phi, %76 |
| next_iteration # -> $B3 |
| } |
| } |
| %77:i32 = load_vector_element %x_76, 0u |
| %x_104:i32 = let %77 |
| %79:vec2<i32> = load %x_76 |
| store %x_110_phi, %79 |
| %80:bool = lt %x_104, 0i |
| if %80 [t: $B9] { # if_4 |
| $B9: { # true |
| %81:vec2<i32> = load %x_76 |
| store %x_109, %81 |
| %82:i32 = negation %x_104 |
| store_vector_element %x_109, 0u, %82 |
| %83:vec2<i32> = load %x_109 |
| store %x_110_phi, %83 |
| exit_if # if_4 |
| } |
| } |
| %84:vec2<i32> = load %x_110_phi |
| %x_110:vec2<i32> = let %84 |
| store %x_112_phi, %x_110 |
| loop [b: $B10, c: $B11] { # loop_2 |
| $B10: { # body |
| %x_113:ptr<function, vec2<i32>, read_write> = var |
| %87:vec2<i32> = load %x_112_phi |
| %x_112:vec2<i32> = let %87 |
| %89:i32 = access %x_112, 0u |
| store %x_115, %89 |
| %90:i32 = load %x_115 |
| %91:bool = gt %90, 15i |
| if %91 [t: $B12, f: $B13] { # if_5 |
| $B12: { # true |
| exit_if # if_5 |
| } |
| $B13: { # false |
| exit_loop # loop_2 |
| } |
| } |
| continue # -> $B11 |
| } |
| $B11: { # continuing |
| store %x_113, %x_112 |
| %92:i32 = load %x_115 |
| %93:i32 = sub %92, 16i |
| %94:i32 = bitcast %93 |
| store_vector_element %x_113, 0u, %94 |
| %95:vec2<i32> = load %x_113 |
| store %x_112_phi, %95 |
| next_iteration # -> $B10 |
| } |
| } |
| store %indexable, array<vec4<f32>, 16>(vec4<f32>(0.0f, 0.0f, 0.0f, 1.0f), vec4<f32>(0.5f, 0.0f, 0.0f, 1.0f), vec4<f32>(0.0f, 0.5f, 0.0f, 1.0f), vec4<f32>(0.5f, 0.5f, 0.0f, 1.0f), vec4<f32>(0.0f, 0.0f, 0.5f, 1.0f), vec4<f32>(0.5f, 0.0f, 0.5f, 1.0f), vec4<f32>(0.0f, 0.5f, 0.5f, 1.0f), vec4<f32>(0.5f, 0.5f, 0.5f, 1.0f), vec4<f32>(0.0f, 0.0f, 0.0f, 1.0f), vec4<f32>(1.0f, 0.0f, 0.0f, 1.0f), vec4<f32>(0.0f, 1.0f, 0.0f, 1.0f), vec4<f32>(1.0f, 1.0f, 0.0f, 1.0f), vec4<f32>(0.0f, 0.0f, 1.0f, 1.0f), vec4<f32>(1.0f, 0.0f, 1.0f, 1.0f), vec4<f32>(0.0f, 1.0f, 1.0f, 1.0f), vec4<f32>(1.0f)) |
| %96:i32 = load %x_115 |
| %97:ptr<function, vec4<f32>, read_write> = access %indexable, %96 |
| %98:vec4<f32> = load %97 |
| %x_120:vec4<f32> = let %98 |
| store %x_GLF_color, %x_120 |
| ret |
| } |
| } |
| %tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out { |
| $B14: { |
| store %gl_FragCoord, %gl_FragCoord_param |
| %102:void = call %main_1 |
| %103:vec4<f32> = load %x_GLF_color |
| %104:main_out = construct %103 |
| ret %104 |
| } |
| } |
| %tint_div_i32 = func(%lhs:i32, %rhs:i32):i32 { |
| $B15: { |
| %107:bool = eq %rhs, 0i |
| %108:bool = eq %lhs, -2147483648i |
| %109:bool = eq %rhs, -1i |
| %110:bool = and %108, %109 |
| %111:bool = or %107, %110 |
| %112:i32 = select %rhs, 1i, %111 |
| %113:i32 = div %lhs, %112 |
| ret %113 |
| } |
| } |
| %tint_f32_to_i32 = func(%value:f32):i32 { |
| $B16: { |
| %115:i32 = convert %value |
| %116:bool = gte %value, -2147483648.0f |
| %117:i32 = select -2147483648i, %115, %116 |
| %118:bool = lte %value, 2147483520.0f |
| %119:i32 = select 2147483647i, %117, %118 |
| ret %119 |
| } |
| } |
| |
| 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. * |
| ******************************************************************** |