| 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_80:ptr<function, vec2<i32>, read_write> = var |
| %x_113:ptr<function, vec2<i32>, read_write> = var |
| %x_119:ptr<function, i32, read_write> = var |
| %x_80_phi:ptr<function, vec2<i32>, read_write> = var |
| %x_83_phi:ptr<function, i32, read_write> = var |
| %x_114_phi:ptr<function, vec2<i32>, read_write> = var |
| %x_116_phi:ptr<function, vec2<i32>, read_write> = var |
| %13:vec4<f32> = load %gl_FragCoord |
| %x_58:vec4<f32> = let %13 |
| %15:ptr<uniform, vec2<f32>, read> = access %x_6, 0u |
| %16:vec2<f32> = load %15 |
| %x_61:vec2<f32> = let %16 |
| %18:f32 = access %x_58, 0u |
| %19:f32 = access %x_58, 1u |
| %20:vec2<f32> = construct %18, %19 |
| %21:vec2<f32> = div %20, %x_61 |
| %x_62:vec2<f32> = let %21 |
| %23:f32 = access %x_62, 0u |
| %24:f32 = mul %23, 8.0f |
| %25:i32 = call %tint_f32_to_i32, %24 |
| %x_65:i32 = let %25 |
| %28:f32 = access %x_62, 1u |
| %29:f32 = mul %28, 8.0f |
| %30:i32 = call %tint_f32_to_i32, %29 |
| %x_69:i32 = let %30 |
| %32:i32 = and %x_65, 5i |
| %33:i32 = and %x_69, 10i |
| %34:i32 = or %32, %33 |
| %35:i32 = mul %34, 8i |
| %36:i32 = and %x_69, 5i |
| %37:i32 = and %x_65, 10i |
| %38:i32 = or %36, %37 |
| %39:i32 = add %35, %38 |
| %40:vec2<i32> = construct %39, 0i |
| %x_78:vec2<i32> = let %40 |
| store %x_80_phi, %x_78 |
| store %x_83_phi, 0i |
| loop [b: $B3, c: $B4] { # loop_1 |
| $B3: { # body |
| %x_94:ptr<function, vec2<i32>, read_write> = var |
| %x_102:ptr<function, vec2<i32>, read_write> = var |
| %x_84:ptr<function, i32, read_write> = var |
| %x_95_phi:ptr<function, vec2<i32>, read_write> = var |
| %x_103_phi:ptr<function, vec2<i32>, read_write> = var |
| %47:vec2<i32> = load %x_80_phi |
| store %x_80, %47 |
| %48:i32 = load %x_83_phi |
| %x_83:i32 = let %48 |
| %50:bool = lt %x_83, 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_80 |
| store %x_95_phi, %51 |
| %52:i32 = load_vector_element %x_80, 0u |
| %53:bool = gt %52, 0i |
| if %53 [t: $B7] { # if_2 |
| $B7: { # true |
| %54:vec2<i32> = load %x_80 |
| store %x_94, %54 |
| %55:i32 = load_vector_element %x_80, 1u |
| %56:i32 = sub %55, 1i |
| store_vector_element %x_94, 1u, %56 |
| %57:vec2<i32> = load %x_94 |
| store %x_95_phi, %57 |
| exit_if # if_2 |
| } |
| } |
| %58:vec2<i32> = load %x_95_phi |
| %x_95:vec2<i32> = let %58 |
| store %x_103_phi, %x_95 |
| %60:i32 = access %x_95, 0u |
| %61:bool = lt %60, 0i |
| if %61 [t: $B8] { # if_3 |
| $B8: { # true |
| store %x_102, %x_95 |
| %62:i32 = access %x_95, 1u |
| %63:i32 = add %62, 1i |
| store_vector_element %x_102, 1u, %63 |
| %64:vec2<i32> = load %x_102 |
| store %x_103_phi, %64 |
| exit_if # if_3 |
| } |
| } |
| %65:vec2<i32> = load %x_103_phi |
| %x_103:vec2<i32> = let %65 |
| %x_81_1:ptr<function, vec2<i32>, read_write> = var, %x_103 |
| %68:i32 = access %x_103, 0u |
| %69:i32 = access %x_103, 1u |
| %70:i32 = call %tint_div_i32, %69, 2i |
| %72:i32 = add %68, %70 |
| store_vector_element %x_81_1, 0u, %72 |
| %73:vec2<i32> = load %x_81_1 |
| %x_81:vec2<i32> = let %73 |
| continue # -> $B4 |
| } |
| $B4: { # continuing |
| %75:i32 = add %x_83, 1i |
| store %x_84, %75 |
| store %x_80_phi, %x_81 |
| %76:i32 = load %x_84 |
| store %x_83_phi, %76 |
| next_iteration # -> $B3 |
| } |
| } |
| %77:i32 = load_vector_element %x_80, 0u |
| %x_108:i32 = let %77 |
| %79:vec2<i32> = load %x_80 |
| store %x_114_phi, %79 |
| %80:bool = lt %x_108, 0i |
| if %80 [t: $B9] { # if_4 |
| $B9: { # true |
| %81:vec2<i32> = load %x_80 |
| store %x_113, %81 |
| %82:i32 = negation %x_108 |
| store_vector_element %x_113, 0u, %82 |
| %83:vec2<i32> = load %x_113 |
| store %x_114_phi, %83 |
| exit_if # if_4 |
| } |
| } |
| %84:vec2<i32> = load %x_114_phi |
| %x_114:vec2<i32> = let %84 |
| store %x_116_phi, %x_114 |
| loop [b: $B10, c: $B11] { # loop_2 |
| $B10: { # body |
| %x_117:ptr<function, vec2<i32>, read_write> = var |
| %87:vec2<i32> = load %x_116_phi |
| %x_116:vec2<i32> = let %87 |
| %89:i32 = access %x_116, 0u |
| store %x_119, %89 |
| %90:i32 = load %x_119 |
| %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_117, %x_116 |
| %92:i32 = load %x_119 |
| %93:i32 = sub %92, 16i |
| %94:i32 = bitcast %93 |
| store_vector_element %x_117, 0u, %94 |
| %95:vec2<i32> = load %x_117 |
| store %x_116_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_119 |
| %97:ptr<function, vec4<f32>, read_write> = access %indexable, %96 |
| %98:vec4<f32> = load %97 |
| %x_124:vec4<f32> = let %98 |
| store %x_GLF_color, %x_124 |
| 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. * |
| ******************************************************************** |