| 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_20:ptr<uniform, buf0, read> = var @binding_point(0, 0) |
| %x_GLF_color:ptr<private, vec4<f32>, read_write> = var |
| %index:ptr<private, i32, read_write> = var |
| %state:ptr<private, array<i32, 16>, read_write> = var |
| } |
| |
| %collision_vf2_vf4_ = func(%pos:ptr<function, vec2<f32>, read_write>, %quad:ptr<function, vec4<f32>, read_write>):bool { |
| $B2: { |
| %9:f32 = load_vector_element %pos, 0u |
| %x_114:f32 = let %9 |
| %11:f32 = load_vector_element %quad, 0u |
| %x_116:f32 = let %11 |
| %13:bool = lt %x_114, %x_116 |
| if %13 [t: $B3] { # if_1 |
| $B3: { # true |
| ret false |
| } |
| } |
| %14:f32 = load_vector_element %pos, 1u |
| %x_121:f32 = let %14 |
| %16:f32 = load_vector_element %quad, 1u |
| %x_123:f32 = let %16 |
| %18:bool = lt %x_121, %x_123 |
| if %18 [t: $B4] { # if_2 |
| $B4: { # true |
| ret false |
| } |
| } |
| %19:f32 = load_vector_element %pos, 0u |
| %x_128:f32 = let %19 |
| %21:f32 = load_vector_element %quad, 0u |
| %x_130:f32 = let %21 |
| %23:f32 = load_vector_element %quad, 2u |
| %x_132:f32 = let %23 |
| %25:f32 = add %x_130, %x_132 |
| %26:bool = gt %x_128, %25 |
| if %26 [t: $B5] { # if_3 |
| $B5: { # true |
| ret false |
| } |
| } |
| %27:f32 = load_vector_element %pos, 1u |
| %x_138:f32 = let %27 |
| %29:f32 = load_vector_element %quad, 1u |
| %x_140:f32 = let %29 |
| %31:f32 = load_vector_element %quad, 3u |
| %x_142:f32 = let %31 |
| %33:f32 = add %x_140, %x_142 |
| %34:bool = gt %x_138, %33 |
| if %34 [t: $B6] { # if_4 |
| $B6: { # true |
| ret false |
| } |
| } |
| ret true |
| } |
| } |
| %match_vf2_ = func(%pos_1:ptr<function, vec2<f32>, read_write>):vec4<f32> { |
| $B7: { |
| %res:ptr<function, vec4<f32>, read_write> = var |
| %i:ptr<function, i32, read_write> = var |
| %param:ptr<function, vec2<f32>, read_write> = var |
| %param_1:ptr<function, vec4<f32>, read_write> = var |
| %indexable:ptr<function, array<vec4<f32>, 8>, read_write> = var |
| %indexable_1:ptr<function, array<vec4<f32>, 8>, read_write> = var |
| %indexable_2:ptr<function, array<vec4<f32>, 8>, read_write> = var |
| %indexable_3:ptr<function, array<vec4<f32>, 16>, read_write> = var |
| store %res, vec4<f32>(0.5f, 0.5f, 1.0f, 1.0f) |
| store %i, 0i |
| loop [b: $B8, c: $B9] { # loop_1 |
| $B8: { # body |
| %45:i32 = load %i |
| %x_152:i32 = let %45 |
| %47:bool = lt %x_152, 8i |
| if %47 [t: $B10, f: $B11] { # if_5 |
| $B10: { # true |
| exit_if # if_5 |
| } |
| $B11: { # false |
| exit_loop # loop_1 |
| } |
| } |
| %48:i32 = load %i |
| %x_155:i32 = let %48 |
| %50:vec2<f32> = load %pos_1 |
| %x_156:vec2<f32> = let %50 |
| store %param, %x_156 |
| store %indexable, array<vec4<f32>, 8>(vec4<f32>(4.0f, 4.0f, 20.0f, 4.0f), vec4<f32>(4.0f, 4.0f, 4.0f, 20.0f), vec4<f32>(4.0f, 20.0f, 20.0f, 4.0f), vec4<f32>(20.0f, 4.0f, 4.0f, 8.0f), vec4<f32>(8.0f, 6.0f, 4.0f, 2.0f), vec4<f32>(2.0f, 12.0f, 2.0f, 4.0f), vec4<f32>(16.0f, 2.0f, 4.0f, 4.0f), vec4<f32>(12.0f, 22.0f, 4.0f, 4.0f)) |
| %52:ptr<function, vec4<f32>, read_write> = access %indexable, %x_155 |
| %53:vec4<f32> = load %52 |
| %x_158:vec4<f32> = let %53 |
| store %param_1, %x_158 |
| %55:bool = call %collision_vf2_vf4_, %param, %param_1 |
| %x_159:bool = let %55 |
| if %x_159 [t: $B12] { # if_6 |
| $B12: { # true |
| %57:i32 = load %i |
| %x_162:i32 = let %57 |
| store %indexable_1, array<vec4<f32>, 8>(vec4<f32>(4.0f, 4.0f, 20.0f, 4.0f), vec4<f32>(4.0f, 4.0f, 4.0f, 20.0f), vec4<f32>(4.0f, 20.0f, 20.0f, 4.0f), vec4<f32>(20.0f, 4.0f, 4.0f, 8.0f), vec4<f32>(8.0f, 6.0f, 4.0f, 2.0f), vec4<f32>(2.0f, 12.0f, 2.0f, 4.0f), vec4<f32>(16.0f, 2.0f, 4.0f, 4.0f), vec4<f32>(12.0f, 22.0f, 4.0f, 4.0f)) |
| %59:ptr<function, vec4<f32>, read_write> = access %indexable_1, %x_162 |
| %60:f32 = load_vector_element %59, 0u |
| %x_164:f32 = let %60 |
| %62:i32 = load %i |
| %x_166:i32 = let %62 |
| store %indexable_2, array<vec4<f32>, 8>(vec4<f32>(4.0f, 4.0f, 20.0f, 4.0f), vec4<f32>(4.0f, 4.0f, 4.0f, 20.0f), vec4<f32>(4.0f, 20.0f, 20.0f, 4.0f), vec4<f32>(20.0f, 4.0f, 4.0f, 8.0f), vec4<f32>(8.0f, 6.0f, 4.0f, 2.0f), vec4<f32>(2.0f, 12.0f, 2.0f, 4.0f), vec4<f32>(16.0f, 2.0f, 4.0f, 4.0f), vec4<f32>(12.0f, 22.0f, 4.0f, 4.0f)) |
| %64:ptr<function, vec4<f32>, read_write> = access %indexable_2, %x_166 |
| %65:f32 = load_vector_element %64, 1u |
| %x_168:f32 = let %65 |
| %67:i32 = load %i |
| %x_171:i32 = let %67 |
| store %indexable_3, 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)) |
| %69:i32 = call %tint_f32_to_i32, %x_164 |
| %71:i32 = let %69 |
| %72:i32 = call %tint_f32_to_i32, %x_168 |
| %73:i32 = mul %71, %72 |
| %74:i32 = mul %x_171, 9i |
| %75:i32 = add %73, %74 |
| %76:i32 = add %75, 11i |
| %77:i32 = call %tint_mod_i32, %76, 16i |
| %79:ptr<function, vec4<f32>, read_write> = access %indexable_3, %77 |
| %80:vec4<f32> = load %79 |
| %x_177:vec4<f32> = let %80 |
| store %res, %x_177 |
| exit_if # if_6 |
| } |
| } |
| continue # -> $B9 |
| } |
| $B9: { # continuing |
| %82:i32 = load %i |
| %x_178:i32 = let %82 |
| %84:i32 = add %x_178, 1i |
| store %i, %84 |
| next_iteration # -> $B8 |
| } |
| } |
| %85:vec4<f32> = load %res |
| %x_180:vec4<f32> = let %85 |
| ret %x_180 |
| } |
| } |
| %main_1 = func():void { |
| $B13: { |
| %lin:ptr<function, vec2<f32>, read_write> = var |
| %param_2:ptr<function, vec2<f32>, read_write> = var |
| %90:vec4<f32> = load %gl_FragCoord |
| %x_102:vec4<f32> = let %90 |
| %92:ptr<uniform, vec2<f32>, read> = access %x_20, 0u |
| %93:vec2<f32> = load %92 |
| %x_105:vec2<f32> = let %93 |
| %95:f32 = access %x_102, 0u |
| %96:f32 = access %x_102, 1u |
| %97:vec2<f32> = construct %95, %96 |
| %98:vec2<f32> = div %97, %x_105 |
| store %lin, %98 |
| %99:vec2<f32> = load %lin |
| %x_107:vec2<f32> = let %99 |
| %101:vec2<f32> = mul %x_107, 32.0f |
| %102:vec2<f32> = floor %101 |
| store %lin, %102 |
| %103:vec2<f32> = load %lin |
| %x_110:vec2<f32> = let %103 |
| store %param_2, %x_110 |
| %105:vec4<f32> = call %match_vf2_, %param_2 |
| %x_111:vec4<f32> = let %105 |
| store %x_GLF_color, %x_111 |
| ret |
| } |
| } |
| %tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out { |
| $B14: { |
| store %gl_FragCoord, %gl_FragCoord_param |
| %109:void = call %main_1 |
| %110:vec4<f32> = load %x_GLF_color |
| %111:main_out = construct %110 |
| ret %111 |
| } |
| } |
| %tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 { |
| $B15: { |
| %114:bool = eq %rhs, 0i |
| %115:bool = eq %lhs, -2147483648i |
| %116:bool = eq %rhs, -1i |
| %117:bool = and %115, %116 |
| %118:bool = or %114, %117 |
| %119:i32 = select %rhs, 1i, %118 |
| %120:i32 = let %119 |
| %121:i32 = div %lhs, %120 |
| %122:i32 = mul %121, %120 |
| %123:i32 = sub %lhs, %122 |
| ret %123 |
| } |
| } |
| %tint_f32_to_i32 = func(%value:f32):i32 { |
| $B16: { |
| %125:i32 = convert %value |
| %126:bool = gte %value, -2147483648.0f |
| %127:i32 = select -2147483648i, %125, %126 |
| %128:bool = lte %value, 2147483520.0f |
| %129:i32 = select 2147483647i, %127, %128 |
| ret %129 |
| } |
| } |
| |
| 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. * |
| ******************************************************************** |