| SKIP: FAILED |
| |
| ../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: buf0 = struct @align(8) { |
| injectionSwitch: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_10:ptr<uniform, buf0, read> = var @binding_point(0, 0) |
| %x_GLF_color:ptr<private, vec4<f32>, read_write> = var |
| } |
| |
| %func_ = func():f32 { |
| $B2: { |
| %alwaysFalse:ptr<function, bool, read_write> = var |
| %value:ptr<function, vec4<f32>, read_write> = var |
| %a:ptr<function, vec2<f32>, read_write> = var |
| %i:ptr<function, i32, read_write> = var |
| %x_121:ptr<function, bool, read_write> = var |
| %x_122_phi:ptr<function, bool, read_write> = var |
| %11:f32 = load_vector_element %gl_FragCoord, 0u |
| %x_71:f32 = let %11 |
| %13:bool = lt %x_71, -1.0f |
| store %alwaysFalse, %13 |
| %14:bool = load %alwaysFalse |
| %x_73:bool = let %14 |
| if %x_73 [t: $B3] { # if_1 |
| $B3: { # true |
| %16:vec2<f32> = load %a |
| %x_76:vec2<f32> = let %16 |
| %18:vec4<f32> = load %value |
| %x_77:vec4<f32> = let %18 |
| %20:f32 = access %x_76, 0u |
| %21:f32 = access %x_76, 1u |
| %22:f32 = access %x_77, 2u |
| %23:f32 = access %x_77, 3u |
| %24:vec4<f32> = construct %20, %21, %22, %23 |
| store %value, %24 |
| exit_if # if_1 |
| } |
| } |
| %25:bool = load %alwaysFalse |
| %x_79:bool = let %25 |
| %27:bool = eq %x_79, false |
| if %27 [t: $B4] { # if_2 |
| $B4: { # true |
| %28:ptr<uniform, vec2<f32>, read> = access %x_10, 0u |
| %29:vec2<f32> = load %28 |
| %x_84:vec2<f32> = let %29 |
| %31:vec4<f32> = load %value |
| %x_85:vec4<f32> = let %31 |
| %33:f32 = access %x_84, 0u |
| %34:f32 = access %x_84, 1u |
| %35:f32 = access %x_85, 2u |
| %36:f32 = access %x_85, 3u |
| %37:vec4<f32> = construct %33, %34, %35, %36 |
| store %value, %37 |
| exit_if # if_2 |
| } |
| } |
| %38:vec4<f32> = load %gl_FragCoord |
| %x_87:vec4<f32> = let %38 |
| %40:vec4<f32> = load %value |
| %x_89:vec4<f32> = let %40 |
| %42:vec4<f32> = load %value |
| %x_93:vec4<f32> = let %42 |
| %44:f32 = access %x_87, 0u |
| %45:f32 = access %x_87, 1u |
| %46:vec2<f32> = construct %44, %45 |
| %47:vec2<f32> = let %46 |
| %48:f32 = access %x_89, 0u |
| %49:f32 = access %x_89, 1u |
| %50:vec2<f32> = construct %48, %49 |
| %51:vec2<f32> = mul %47, %50 |
| %52:vec2<f32> = mul %51, vec2<f32>(2.0f) |
| %53:vec2<f32> = let %52 |
| %54:f32 = access %x_93, 0u |
| %55:f32 = access %x_93, 1u |
| %56:vec2<f32> = construct %54, %55 |
| %57:vec2<f32> = add %53, %56 |
| %x_95:vec2<f32> = let %57 |
| %59:vec4<f32> = load %value |
| %x_96:vec4<f32> = let %59 |
| %61:f32 = access %x_96, 0u |
| %62:f32 = access %x_96, 1u |
| %63:f32 = access %x_95, 0u |
| %64:f32 = access %x_95, 1u |
| %65:vec4<f32> = construct %61, %62, %63, %64 |
| store %value, %65 |
| store %i, 0i |
| loop [b: $B5, c: $B6] { # loop_1 |
| $B5: { # body |
| %66:i32 = load %i |
| %x_102:i32 = let %66 |
| %68:ptr<uniform, vec2<f32>, read> = access %x_10, 0u |
| %69:f32 = load_vector_element %68, 1u |
| %x_104:f32 = let %69 |
| %71:i32 = call %tint_f32_to_i32, %x_104 |
| %73:i32 = add %71, 1i |
| %74:bool = lt %x_102, %73 |
| if %74 [t: $B7, f: $B8] { # if_3 |
| $B7: { # true |
| exit_if # if_3 |
| } |
| $B8: { # false |
| exit_loop # loop_1 |
| } |
| } |
| %75:i32 = load %i |
| %x_109:i32 = let %75 |
| %77:f32 = convert %x_109 |
| store_vector_element %value, 0u, %77 |
| continue # -> $B6 |
| } |
| $B6: { # continuing |
| %78:i32 = load %i |
| %x_112:i32 = let %78 |
| %80:i32 = add %x_112, 1i |
| store %i, %80 |
| next_iteration # -> $B5 |
| } |
| } |
| %81:f32 = load_vector_element %value, 0u |
| %x_115:f32 = let %81 |
| %83:bool = eq %x_115, 1.0f |
| %x_116:bool = let %83 |
| store %x_122_phi, %x_116 |
| if %x_116 [t: $B9] { # if_4 |
| $B9: { # true |
| %85:f32 = load_vector_element %value, 1u |
| %x_120:f32 = let %85 |
| %87:bool = eq %x_120, 1.0f |
| store %x_121, %87 |
| %88:bool = load %x_121 |
| store %x_122_phi, %88 |
| exit_if # if_4 |
| } |
| } |
| %89:bool = load %x_122_phi |
| %x_122:bool = let %89 |
| if %x_122 [t: $B10, f: $B11] { # if_5 |
| $B10: { # true |
| ret 1.0f |
| } |
| $B11: { # false |
| ret 0.0f |
| } |
| } |
| unreachable |
| } |
| } |
| %main_1 = func():void { |
| $B12: { |
| %count:ptr<function, i32, read_write> = var |
| %i_1:ptr<function, i32, read_write> = var |
| store %count, 0i |
| store %i_1, 0i |
| loop [b: $B13, c: $B14] { # loop_2 |
| $B13: { # body |
| %94:i32 = load %i_1 |
| %x_51:i32 = let %94 |
| %96:ptr<uniform, vec2<f32>, read> = access %x_10, 0u |
| %97:f32 = load_vector_element %96, 1u |
| %x_53:f32 = let %97 |
| %99:i32 = call %tint_f32_to_i32, %x_53 |
| %100:i32 = add %99, 1i |
| %101:bool = lt %x_51, %100 |
| if %101 [t: $B15, f: $B16] { # if_6 |
| $B15: { # true |
| exit_if # if_6 |
| } |
| $B16: { # false |
| exit_loop # loop_2 |
| } |
| } |
| %102:f32 = call %func_ |
| %x_58:f32 = let %102 |
| %104:i32 = load %count |
| %x_60:i32 = let %104 |
| %106:i32 = call %tint_f32_to_i32, %x_58 |
| %107:i32 = add %x_60, %106 |
| store %count, %107 |
| continue # -> $B14 |
| } |
| $B14: { # continuing |
| %108:i32 = load %i_1 |
| %x_62:i32 = let %108 |
| %110:i32 = add %x_62, 1i |
| store %i_1, %110 |
| next_iteration # -> $B13 |
| } |
| } |
| %111:i32 = load %count |
| %x_64:i32 = let %111 |
| %113:bool = eq %x_64, 2i |
| if %113 [t: $B17, f: $B18] { # if_7 |
| $B17: { # true |
| store %x_GLF_color, vec4<f32>(1.0f, 0.0f, 0.0f, 1.0f) |
| exit_if # if_7 |
| } |
| $B18: { # false |
| store %x_GLF_color, vec4<f32>(0.0f, 0.0f, 0.0f, 1.0f) |
| exit_if # if_7 |
| } |
| } |
| ret |
| } |
| } |
| %tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out { |
| $B19: { |
| store %gl_FragCoord, %gl_FragCoord_param |
| %116:void = call %main_1 |
| %117:vec4<f32> = load %x_GLF_color |
| %118:main_out = construct %117 |
| ret %118 |
| } |
| } |
| %tint_f32_to_i32 = func(%value_1:f32):i32 { # %value_1: 'value' |
| $B20: { |
| %120:i32 = convert %value_1 |
| %121:bool = gte %value_1, -2147483648.0f |
| %122:i32 = select -2147483648i, %120, %121 |
| %123:bool = lte %value_1, 2147483520.0f |
| %124:i32 = select 2147483647i, %122, %123 |
| ret %124 |
| } |
| } |
| |
| 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. * |
| ******************************************************************** |