| 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: { |
| %x_116:ptr<function, vec4<bool>, read_write> = var, vec4<bool>(false) |
| %10:f32 = load_vector_element %pos, 0u |
| %x_118:f32 = let %10 |
| %12:f32 = load_vector_element %quad, 0u |
| %x_120:f32 = let %12 |
| %14:bool = lt %x_118, %x_120 |
| if %14 [t: $B3] { # if_1 |
| $B3: { # true |
| ret false |
| } |
| } |
| %15:f32 = load_vector_element %pos, 1u |
| %x_125:f32 = let %15 |
| %17:f32 = load_vector_element %quad, 1u |
| %x_127:f32 = let %17 |
| %19:bool = lt %x_125, %x_127 |
| if %19 [t: $B4] { # if_2 |
| $B4: { # true |
| ret false |
| } |
| } |
| %20:f32 = load_vector_element %pos, 0u |
| %x_132:f32 = let %20 |
| %22:f32 = load_vector_element %quad, 0u |
| %x_134:f32 = let %22 |
| %24:f32 = load_vector_element %quad, 2u |
| %x_136:f32 = let %24 |
| %26:f32 = add %x_134, %x_136 |
| %27:bool = gt %x_132, %26 |
| if %27 [t: $B5] { # if_3 |
| $B5: { # true |
| ret false |
| } |
| } |
| %28:f32 = load_vector_element %pos, 1u |
| %x_142:f32 = let %28 |
| %30:f32 = load_vector_element %quad, 1u |
| %x_144:f32 = let %30 |
| %32:f32 = load_vector_element %quad, 3u |
| %x_146:f32 = let %32 |
| %34:f32 = add %x_144, %x_146 |
| %35:bool = gt %x_142, %34 |
| if %35 [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 |
| %46:i32 = load %i |
| %x_156:i32 = let %46 |
| %48:bool = lt %x_156, 8i |
| if %48 [t: $B10, f: $B11] { # if_5 |
| $B10: { # true |
| exit_if # if_5 |
| } |
| $B11: { # false |
| exit_loop # loop_1 |
| } |
| } |
| %49:i32 = load %i |
| %x_159:i32 = let %49 |
| %51:vec2<f32> = load %pos_1 |
| %x_160:vec2<f32> = let %51 |
| store %param, %x_160 |
| 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)) |
| %53:ptr<function, vec4<f32>, read_write> = access %indexable, %x_159 |
| %54:vec4<f32> = load %53 |
| %x_162:vec4<f32> = let %54 |
| store %param_1, %x_162 |
| %56:bool = call %collision_vf2_vf4_, %param, %param_1 |
| %x_163:bool = let %56 |
| if %x_163 [t: $B12] { # if_6 |
| $B12: { # true |
| %58:i32 = load %i |
| %x_166:i32 = let %58 |
| 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)) |
| %60:ptr<function, vec4<f32>, read_write> = access %indexable_1, %x_166 |
| %61:f32 = load_vector_element %60, 0u |
| %x_168:f32 = let %61 |
| %63:i32 = load %i |
| %x_170:i32 = let %63 |
| 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)) |
| %65:ptr<function, vec4<f32>, read_write> = access %indexable_2, %x_170 |
| %66:f32 = load_vector_element %65, 1u |
| %x_172:f32 = let %66 |
| %68:i32 = load %i |
| %x_175:i32 = let %68 |
| 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)) |
| %70:i32 = call %tint_f32_to_i32, %x_168 |
| %72:i32 = let %70 |
| %73:i32 = call %tint_f32_to_i32, %x_172 |
| %74:i32 = mul %72, %73 |
| %75:i32 = mul %x_175, 9i |
| %76:i32 = add %74, %75 |
| %77:i32 = add %76, 11i |
| %78:i32 = call %tint_mod_i32, %77, 16i |
| %80:ptr<function, vec4<f32>, read_write> = access %indexable_3, %78 |
| %81:vec4<f32> = load %80 |
| %x_181:vec4<f32> = let %81 |
| store %res, %x_181 |
| exit_if # if_6 |
| } |
| } |
| continue # -> $B9 |
| } |
| $B9: { # continuing |
| %83:i32 = load %i |
| %x_182:i32 = let %83 |
| %85:i32 = add %x_182, 1i |
| store %i, %85 |
| next_iteration # -> $B8 |
| } |
| } |
| %86:vec4<f32> = load %res |
| %x_184:vec4<f32> = let %86 |
| ret %x_184 |
| } |
| } |
| %main_1 = func():void { |
| $B13: { |
| %lin:ptr<function, vec2<f32>, read_write> = var |
| %param_2:ptr<function, vec2<f32>, read_write> = var |
| %91:vec4<f32> = load %gl_FragCoord |
| %x_105:vec4<f32> = let %91 |
| %93:ptr<uniform, vec2<f32>, read> = access %x_20, 0u |
| %94:vec2<f32> = load %93 |
| %x_108:vec2<f32> = let %94 |
| %96:f32 = access %x_105, 0u |
| %97:f32 = access %x_105, 1u |
| %98:vec2<f32> = construct %96, %97 |
| %99:vec2<f32> = div %98, %x_108 |
| store %lin, %99 |
| %100:vec2<f32> = load %lin |
| %x_110:vec2<f32> = let %100 |
| %102:vec2<f32> = mul %x_110, 32.0f |
| %103:vec2<f32> = floor %102 |
| store %lin, %103 |
| %104:vec2<f32> = load %lin |
| %x_113:vec2<f32> = let %104 |
| store %param_2, %x_113 |
| %106:vec4<f32> = call %match_vf2_, %param_2 |
| %x_114:vec4<f32> = let %106 |
| store %x_GLF_color, %x_114 |
| ret |
| } |
| } |
| %tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out { |
| $B14: { |
| store %gl_FragCoord, %gl_FragCoord_param |
| %110:void = call %main_1 |
| %111:vec4<f32> = load %x_GLF_color |
| %112:main_out = construct %111 |
| ret %112 |
| } |
| } |
| %tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 { |
| $B15: { |
| %115:bool = eq %rhs, 0i |
| %116:bool = eq %lhs, -2147483648i |
| %117:bool = eq %rhs, -1i |
| %118:bool = and %116, %117 |
| %119:bool = or %115, %118 |
| %120:i32 = select %rhs, 1i, %119 |
| %121:i32 = let %120 |
| %122:i32 = div %lhs, %121 |
| %123:i32 = mul %122, %121 |
| %124:i32 = sub %lhs, %123 |
| ret %124 |
| } |
| } |
| %tint_f32_to_i32 = func(%value:f32):i32 { |
| $B16: { |
| %126:i32 = convert %value |
| %127:bool = gte %value, -2147483648.0f |
| %128:i32 = select -2147483648i, %126, %127 |
| %129:bool = lte %value, 2147483520.0f |
| %130:i32 = select 2147483647i, %128, %129 |
| ret %130 |
| } |
| } |
| |
| 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. * |
| ******************************************************************** |