| 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_77:ptr<function, vec2<i32>, read_write> = var |
| %x_110:ptr<function, vec2<i32>, read_write> = var |
| %x_116:ptr<function, i32, read_write> = var |
| %x_77_phi:ptr<function, vec2<i32>, read_write> = var |
| %x_80_phi:ptr<function, i32, read_write> = var |
| %x_111_phi:ptr<function, vec2<i32>, read_write> = var |
| %x_113_phi:ptr<function, vec2<i32>, read_write> = var |
| %13:vec4<f32> = load %gl_FragCoord |
| %x_56:vec4<f32> = let %13 |
| %15:ptr<uniform, vec2<f32>, read> = access %x_6, 0u |
| %16:vec2<f32> = load %15 |
| %x_59:vec2<f32> = let %16 |
| %18:f32 = access %x_56, 0u |
| %19:f32 = access %x_56, 1u |
| %20:vec2<f32> = construct %18, %19 |
| %21:vec2<f32> = div %20, %x_59 |
| %x_60:vec2<f32> = let %21 |
| %23:f32 = access %x_60, 0u |
| %24:f32 = mul %23, 8.0f |
| %25:i32 = call %tint_f32_to_i32, %24 |
| %x_63:i32 = let %25 |
| %28:f32 = access %x_60, 1u |
| %29:f32 = mul %28, 8.0f |
| %30:i32 = call %tint_f32_to_i32, %29 |
| %x_66:i32 = let %30 |
| %32:i32 = and %x_63, 5i |
| %33:i32 = and %x_66, 10i |
| %34:i32 = or %32, %33 |
| %35:i32 = mul %34, 8i |
| %36:i32 = and %x_66, 5i |
| %37:i32 = and %x_63, 10i |
| %38:i32 = or %36, %37 |
| %39:i32 = add %35, %38 |
| %40:vec2<i32> = construct %39, 0i |
| %x_75:vec2<i32> = let %40 |
| store %x_77_phi, %x_75 |
| store %x_80_phi, 0i |
| loop [b: $B3, c: $B4] { # loop_1 |
| $B3: { # body |
| %x_91:ptr<function, vec2<i32>, read_write> = var |
| %x_99:ptr<function, vec2<i32>, read_write> = var |
| %x_81:ptr<function, i32, read_write> = var |
| %x_92_phi:ptr<function, vec2<i32>, read_write> = var |
| %x_100_phi:ptr<function, vec2<i32>, read_write> = var |
| %47:vec2<i32> = load %x_77_phi |
| store %x_77, %47 |
| %48:i32 = load %x_80_phi |
| %x_80:i32 = let %48 |
| %50:bool = lt %x_80, 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_77 |
| store %x_92_phi, %51 |
| %52:i32 = load_vector_element %x_77, 0u |
| %53:bool = gt %52, 0i |
| if %53 [t: $B7] { # if_2 |
| $B7: { # true |
| %54:vec2<i32> = load %x_77 |
| store %x_91, %54 |
| %55:i32 = load_vector_element %x_77, 1u |
| %56:i32 = sub %55, 1i |
| store_vector_element %x_91, 1u, %56 |
| %57:vec2<i32> = load %x_91 |
| store %x_92_phi, %57 |
| exit_if # if_2 |
| } |
| } |
| %58:vec2<i32> = load %x_92_phi |
| %x_92:vec2<i32> = let %58 |
| store %x_100_phi, %x_92 |
| %60:i32 = access %x_92, 0u |
| %61:bool = lt %60, 0i |
| if %61 [t: $B8] { # if_3 |
| $B8: { # true |
| store %x_99, %x_92 |
| %62:i32 = access %x_92, 1u |
| %63:i32 = add %62, 1i |
| store_vector_element %x_99, 1u, %63 |
| %64:vec2<i32> = load %x_99 |
| store %x_100_phi, %64 |
| exit_if # if_3 |
| } |
| } |
| %65:vec2<i32> = load %x_100_phi |
| %x_100:vec2<i32> = let %65 |
| %x_78_1:ptr<function, vec2<i32>, read_write> = var, %x_100 |
| %68:i32 = access %x_100, 0u |
| %69:i32 = access %x_100, 1u |
| %70:i32 = call %tint_div_i32, %69, 2i |
| %72:i32 = add %68, %70 |
| store_vector_element %x_78_1, 0u, %72 |
| %73:vec2<i32> = load %x_78_1 |
| %x_78:vec2<i32> = let %73 |
| continue # -> $B4 |
| } |
| $B4: { # continuing |
| %75:i32 = add %x_80, 1i |
| store %x_81, %75 |
| store %x_77_phi, %x_78 |
| %76:i32 = load %x_81 |
| store %x_80_phi, %76 |
| next_iteration # -> $B3 |
| } |
| } |
| %77:i32 = load_vector_element %x_77, 0u |
| %x_105:i32 = let %77 |
| %79:vec2<i32> = load %x_77 |
| store %x_111_phi, %79 |
| %80:bool = lt %x_105, 0i |
| if %80 [t: $B9] { # if_4 |
| $B9: { # true |
| store %x_110, vec2<i32>(0i) |
| %81:i32 = negation %x_105 |
| store_vector_element %x_110, 0u, %81 |
| %82:vec2<i32> = load %x_110 |
| store %x_111_phi, %82 |
| exit_if # if_4 |
| } |
| } |
| %83:vec2<i32> = load %x_111_phi |
| %x_111:vec2<i32> = let %83 |
| store %x_113_phi, %x_111 |
| loop [b: $B10, c: $B11] { # loop_2 |
| $B10: { # body |
| %x_114:ptr<function, vec2<i32>, read_write> = var |
| %86:vec2<i32> = load %x_113_phi |
| %x_113:vec2<i32> = let %86 |
| %88:i32 = access %x_113, 0u |
| store %x_116, %88 |
| %89:i32 = load %x_116 |
| %90:bool = gt %89, 15i |
| if %90 [t: $B12, f: $B13] { # if_5 |
| $B12: { # true |
| exit_if # if_5 |
| } |
| $B13: { # false |
| exit_loop # loop_2 |
| } |
| } |
| continue # -> $B11 |
| } |
| $B11: { # continuing |
| store %x_114, vec2<i32>(0i) |
| %91:i32 = load %x_116 |
| %92:i32 = sub %91, 16i |
| %93:i32 = bitcast %92 |
| store_vector_element %x_114, 0u, %93 |
| %94:vec2<i32> = load %x_114 |
| store %x_113_phi, %94 |
| 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)) |
| %95:i32 = load %x_116 |
| %96:ptr<function, vec4<f32>, read_write> = access %indexable, %95 |
| %97:vec4<f32> = load %96 |
| %x_121:vec4<f32> = let %97 |
| store %x_GLF_color, %x_121 |
| ret |
| } |
| } |
| %tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out { |
| $B14: { |
| store %gl_FragCoord, %gl_FragCoord_param |
| %101:void = call %main_1 |
| %102:vec4<f32> = load %x_GLF_color |
| %103:main_out = construct %102 |
| ret %103 |
| } |
| } |
| %tint_div_i32 = func(%lhs:i32, %rhs:i32):i32 { |
| $B15: { |
| %106:bool = eq %rhs, 0i |
| %107:bool = eq %lhs, -2147483648i |
| %108:bool = eq %rhs, -1i |
| %109:bool = and %107, %108 |
| %110:bool = or %106, %109 |
| %111:i32 = select %rhs, 1i, %110 |
| %112:i32 = div %lhs, %111 |
| ret %112 |
| } |
| } |
| %tint_f32_to_i32 = func(%value:f32):i32 { |
| $B16: { |
| %114:i32 = convert %value |
| %115:bool = gte %value, -2147483648.0f |
| %116:i32 = select -2147483648i, %114, %115 |
| %117:bool = lte %value, 2147483520.0f |
| %118:i32 = select 2147483647i, %116, %117 |
| ret %118 |
| } |
| } |
| |
| 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. * |
| ******************************************************************** |