| 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 |
| %11:f32 = load_vector_element %quad, 0u |
| %12:bool = lt %10, %11 |
| if %12 [t: $B3] { # if_1 |
| $B3: { # true |
| ret false |
| } |
| } |
| %13:f32 = load_vector_element %pos, 1u |
| %14:f32 = load_vector_element %quad, 1u |
| %15:bool = lt %13, %14 |
| if %15 [t: $B4] { # if_2 |
| $B4: { # true |
| ret false |
| } |
| } |
| %16:f32 = load_vector_element %pos, 0u |
| %17:f32 = load_vector_element %quad, 0u |
| %18:f32 = load_vector_element %quad, 2u |
| %19:f32 = add %17, %18 |
| %20:bool = gt %16, %19 |
| if %20 [t: $B5] { # if_3 |
| $B5: { # true |
| ret false |
| } |
| } |
| %21:f32 = load_vector_element %pos, 1u |
| %22:f32 = load_vector_element %quad, 1u |
| %23:f32 = load_vector_element %quad, 3u |
| %24:f32 = add %22, %23 |
| %25:bool = gt %21, %24 |
| if %25 [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 |
| %36:i32 = load %i |
| %37:bool = lt %36, 8i |
| if %37 [t: $B10, f: $B11] { # if_5 |
| $B10: { # true |
| exit_if # if_5 |
| } |
| $B11: { # false |
| exit_loop # loop_1 |
| } |
| } |
| %38:i32 = load %i |
| %x_159:i32 = let %38 |
| %40:vec2<f32> = load %pos_1 |
| store %param, %40 |
| 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)) |
| %41:ptr<function, vec4<f32>, read_write> = access %indexable, %x_159 |
| %42:vec4<f32> = load %41 |
| store %param_1, %42 |
| %43:bool = call %collision_vf2_vf4_, %param, %param_1 |
| %x_163:bool = let %43 |
| if %x_163 [t: $B12] { # if_6 |
| $B12: { # true |
| %45:i32 = load %i |
| %x_166:i32 = let %45 |
| 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)) |
| %47:ptr<function, vec4<f32>, read_write> = access %indexable_1, %x_166 |
| %48:f32 = load_vector_element %47, 0u |
| %x_168:f32 = let %48 |
| %50:i32 = load %i |
| %x_170:i32 = let %50 |
| 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)) |
| %52:ptr<function, vec4<f32>, read_write> = access %indexable_2, %x_170 |
| %53:f32 = load_vector_element %52, 1u |
| %x_172:f32 = let %53 |
| %55:i32 = load %i |
| %x_175:i32 = let %55 |
| 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)) |
| %57:i32 = call %tint_f32_to_i32, %x_168 |
| %59:i32 = let %57 |
| %60:i32 = call %tint_f32_to_i32, %x_172 |
| %61:i32 = mul %59, %60 |
| %62:i32 = mul %x_175, 9i |
| %63:i32 = add %61, %62 |
| %64:i32 = add %63, 11i |
| %65:i32 = call %tint_mod_i32, %64, 16i |
| %67:ptr<function, vec4<f32>, read_write> = access %indexable_3, %65 |
| %68:vec4<f32> = load %67 |
| store %res, %68 |
| exit_if # if_6 |
| } |
| } |
| continue # -> $B9 |
| } |
| $B9: { # continuing |
| %69:i32 = load %i |
| %70:i32 = add %69, 1i |
| store %i, %70 |
| next_iteration # -> $B8 |
| } |
| } |
| %71:vec4<f32> = load %res |
| %x_184:vec4<f32> = let %71 |
| 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 |
| %76:vec4<f32> = load %gl_FragCoord |
| %77:vec2<f32> = swizzle %76, xy |
| %78:ptr<uniform, vec2<f32>, read> = access %x_20, 0u |
| %79:vec2<f32> = load %78 |
| %80:vec2<f32> = div %77, %79 |
| store %lin, %80 |
| %81:vec2<f32> = load %lin |
| %82:vec2<f32> = mul %81, 32.0f |
| %83:vec2<f32> = floor %82 |
| store %lin, %83 |
| %84:vec2<f32> = load %lin |
| store %param_2, %84 |
| %85:vec4<f32> = call %match_vf2_, %param_2 |
| %x_114:vec4<f32> = let %85 |
| 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 |
| %89:void = call %main_1 |
| %90:vec4<f32> = load %x_GLF_color |
| %91:main_out = construct %90 |
| ret %91 |
| } |
| } |
| %tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 { |
| $B15: { |
| %94:bool = eq %rhs, 0i |
| %95:bool = eq %lhs, -2147483648i |
| %96:bool = eq %rhs, -1i |
| %97:bool = and %95, %96 |
| %98:bool = or %94, %97 |
| %99:i32 = select %rhs, 1i, %98 |
| %100:i32 = let %99 |
| %101:i32 = div %lhs, %100 |
| %102:i32 = mul %101, %100 |
| %103:i32 = sub %lhs, %102 |
| ret %103 |
| } |
| } |
| %tint_f32_to_i32 = func(%value:f32):i32 { |
| $B16: { |
| %105:i32 = convert %value |
| %106:bool = gte %value, -2147483648.0f |
| %107:i32 = select -2147483648i, %105, %106 |
| %108:bool = lte %value, 2147483520.0f |
| %109:i32 = select 2147483647i, %107, %108 |
| ret %109 |
| } |
| } |
| |
| 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. * |
| ******************************************************************** |