| 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 |
| %x_7:ptr<uniform, buf0, read> = var @binding_point(0, 0) |
| %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var |
| %x_GLF_color:ptr<private, vec4<f32>, read_write> = var |
| } |
| |
| %main_1 = func():void { |
| $B2: { |
| %c:ptr<function, vec3<f32>, read_write> = var |
| %x_51:ptr<function, f32, read_write> = var |
| %x_55:ptr<function, f32, read_write> = var |
| %x_56:ptr<function, f32, read_write> = var |
| %x_81:ptr<function, f32, read_write> = var |
| %x_82:ptr<function, f32, read_write> = var |
| %x_118:ptr<function, f32, read_write> = var |
| %x_119:ptr<function, f32, read_write> = var |
| %x_55_phi:ptr<function, f32, read_write> = var |
| %x_58_phi:ptr<function, i32, read_write> = var |
| %x_81_phi:ptr<function, f32, read_write> = var |
| %x_82_phi:ptr<function, f32, read_write> = var |
| %x_83_phi:ptr<function, bool, read_write> = var |
| %x_85_phi:ptr<function, f32, read_write> = var |
| %x_122_phi:ptr<function, f32, read_write> = var |
| %x_129_phi:ptr<function, i32, read_write> = var |
| store %c, vec3<f32>(7.0f, 8.0f, 9.0f) |
| %21:ptr<uniform, vec2<f32>, read> = access %x_7, 0u |
| %22:f32 = load_vector_element %21, 0u |
| %x_47:f32 = let %22 |
| %24:f32 = mul %x_47, 0.125f |
| %25:f32 = round %24 |
| %x_49:f32 = let %25 |
| %27:f32 = load_vector_element %gl_FragCoord, 0u |
| store %x_51, %27 |
| switch 0u [c: (default, $B3)] { # switch_1 |
| $B3: { # case |
| store %x_55_phi, -0.5f |
| store %x_58_phi, 1i |
| loop [b: $B4, c: $B5] { # loop_1 |
| $B4: { # body |
| %x_68:ptr<function, f32, read_write> = var |
| %x_76:ptr<function, f32, read_write> = var |
| %x_59:ptr<function, i32, read_write> = var |
| %x_56_phi:ptr<function, f32, read_write> = var |
| %32:f32 = load %x_55_phi |
| store %x_55, %32 |
| %33:i32 = load %x_58_phi |
| %x_58:i32 = let %33 |
| store %x_81_phi, 0.0f |
| %35:f32 = load %x_55 |
| store %x_82_phi, %35 |
| store %x_83_phi, false |
| %36:bool = lt %x_58, 800i |
| if %36 [t: $B6, f: $B7] { # if_1 |
| $B6: { # true |
| exit_if # if_1 |
| } |
| $B7: { # false |
| exit_loop # loop_1 |
| } |
| } |
| %x_75:ptr<function, f32, read_write> = var |
| %x_76_phi:ptr<function, f32, read_write> = var |
| %39:i32 = call %tint_mod_i32, %x_58, 32i |
| %41:bool = eq %39, 0i |
| if %41 [t: $B8, f: $B9] { # if_2 |
| $B8: { # true |
| %42:f32 = load %x_55 |
| %43:f32 = add %42, 0.40000000596046447754f |
| store %x_68, %43 |
| %44:f32 = load %x_68 |
| store %x_56_phi, %44 |
| exit_if # if_2 |
| } |
| $B9: { # false |
| %45:f32 = load %x_55 |
| store %x_76_phi, %45 |
| %46:f32 = convert %x_58 |
| %47:f32 = let %46 |
| %48:f32 = round %x_49 |
| %49:f32 = let %48 |
| %50:f32 = convert %x_58 |
| %51:f32 = let %50 |
| %52:f32 = round %x_49 |
| %53:f32 = div %51, %52 |
| %54:f32 = floor %53 |
| %55:f32 = mul %49, %54 |
| %56:f32 = sub %47, %55 |
| %57:bool = lte %56, 0.00999999977648258209f |
| if %57 [t: $B10] { # if_3 |
| $B10: { # true |
| %58:f32 = load %x_55 |
| %59:f32 = add %58, 100.0f |
| store %x_75, %59 |
| %60:f32 = load %x_75 |
| store %x_76_phi, %60 |
| exit_if # if_3 |
| } |
| } |
| %61:f32 = load %x_76_phi |
| store %x_76, %61 |
| %62:f32 = load %x_76 |
| store %x_56_phi, %62 |
| exit_if # if_2 |
| } |
| } |
| %63:f32 = load %x_56_phi |
| store %x_56, %63 |
| %64:f32 = convert %x_58 |
| %65:f32 = load %x_51 |
| %66:bool = gte %64, %65 |
| if %66 [t: $B11] { # if_4 |
| $B11: { # true |
| %67:f32 = load %x_56 |
| store %x_81_phi, %67 |
| %68:f32 = load %x_56 |
| store %x_82_phi, %68 |
| store %x_83_phi, true |
| exit_loop # loop_1 |
| } |
| } |
| continue # -> $B5 |
| } |
| $B5: { # continuing |
| %69:i32 = add %x_58, 1i |
| store %x_59, %69 |
| %70:f32 = load %x_56 |
| store %x_55_phi, %70 |
| %71:i32 = load %x_59 |
| store %x_58_phi, %71 |
| next_iteration # -> $B4 |
| } |
| } |
| %72:f32 = load %x_81_phi |
| store %x_81, %72 |
| %73:f32 = load %x_82_phi |
| store %x_82, %73 |
| %74:bool = load %x_83_phi |
| %x_83:bool = let %74 |
| %76:f32 = load %x_81 |
| store %x_85_phi, %76 |
| if %x_83 [t: $B12] { # if_5 |
| $B12: { # true |
| exit_switch # switch_1 |
| } |
| } |
| %77:f32 = load %x_82 |
| store %x_85_phi, %77 |
| exit_switch # switch_1 |
| } |
| } |
| %x_88:ptr<function, f32, read_write> = var |
| %x_92:ptr<function, f32, read_write> = var |
| %x_93:ptr<function, f32, read_write> = var |
| %x_92_phi:ptr<function, f32, read_write> = var |
| %x_95_phi:ptr<function, i32, read_write> = var |
| %x_118_phi:ptr<function, f32, read_write> = var |
| %x_119_phi:ptr<function, f32, read_write> = var |
| %x_120_phi:ptr<function, bool, read_write> = var |
| %86:f32 = load %x_85_phi |
| %x_85:f32 = let %86 |
| store_vector_element %c, 0u, %x_85 |
| %88:f32 = load_vector_element %gl_FragCoord, 1u |
| store %x_88, %88 |
| switch 0u [c: (default, $B13)] { # switch_2 |
| $B13: { # case |
| store %x_92_phi, -0.5f |
| store %x_95_phi, 1i |
| loop [b: $B14, c: $B15] { # loop_2 |
| $B14: { # body |
| %x_105:ptr<function, f32, read_write> = var |
| %x_113:ptr<function, f32, read_write> = var |
| %x_96:ptr<function, i32, read_write> = var |
| %x_93_phi:ptr<function, f32, read_write> = var |
| %93:f32 = load %x_92_phi |
| store %x_92, %93 |
| %94:i32 = load %x_95_phi |
| %x_95:i32 = let %94 |
| store %x_118_phi, 0.0f |
| %96:f32 = load %x_92 |
| store %x_119_phi, %96 |
| store %x_120_phi, false |
| %97:bool = lt %x_95, 800i |
| if %97 [t: $B16, f: $B17] { # if_6 |
| $B16: { # true |
| exit_if # if_6 |
| } |
| $B17: { # false |
| exit_loop # loop_2 |
| } |
| } |
| %x_112:ptr<function, f32, read_write> = var |
| %x_113_phi:ptr<function, f32, read_write> = var |
| %100:i32 = call %tint_mod_i32, %x_95, 32i |
| %101:bool = eq %100, 0i |
| if %101 [t: $B18, f: $B19] { # if_7 |
| $B18: { # true |
| %102:f32 = load %x_92 |
| %103:f32 = add %102, 0.40000000596046447754f |
| store %x_105, %103 |
| %104:f32 = load %x_105 |
| store %x_93_phi, %104 |
| exit_if # if_7 |
| } |
| $B19: { # false |
| %105:f32 = load %x_92 |
| store %x_113_phi, %105 |
| %106:f32 = convert %x_95 |
| %107:f32 = let %106 |
| %108:f32 = round %x_49 |
| %109:f32 = let %108 |
| %110:f32 = convert %x_95 |
| %111:f32 = let %110 |
| %112:f32 = round %x_49 |
| %113:f32 = div %111, %112 |
| %114:f32 = floor %113 |
| %115:f32 = mul %109, %114 |
| %116:f32 = sub %107, %115 |
| %117:bool = lte %116, 0.00999999977648258209f |
| if %117 [t: $B20] { # if_8 |
| $B20: { # true |
| %118:f32 = load %x_92 |
| %119:f32 = add %118, 100.0f |
| store %x_112, %119 |
| %120:f32 = load %x_112 |
| store %x_113_phi, %120 |
| exit_if # if_8 |
| } |
| } |
| %121:f32 = load %x_113_phi |
| store %x_113, %121 |
| %122:f32 = load %x_113 |
| store %x_93_phi, %122 |
| exit_if # if_7 |
| } |
| } |
| %123:f32 = load %x_93_phi |
| store %x_93, %123 |
| %124:f32 = convert %x_95 |
| %125:f32 = load %x_88 |
| %126:bool = gte %124, %125 |
| if %126 [t: $B21] { # if_9 |
| $B21: { # true |
| %127:f32 = load %x_93 |
| store %x_118_phi, %127 |
| %128:f32 = load %x_93 |
| store %x_119_phi, %128 |
| store %x_120_phi, true |
| exit_loop # loop_2 |
| } |
| } |
| continue # -> $B15 |
| } |
| $B15: { # continuing |
| %129:i32 = add %x_95, 1i |
| store %x_96, %129 |
| %130:f32 = load %x_93 |
| store %x_92_phi, %130 |
| %131:i32 = load %x_96 |
| store %x_95_phi, %131 |
| next_iteration # -> $B14 |
| } |
| } |
| %132:f32 = load %x_118_phi |
| store %x_118, %132 |
| %133:f32 = load %x_119_phi |
| store %x_119, %133 |
| %134:bool = load %x_120_phi |
| %x_120:bool = let %134 |
| %136:f32 = load %x_118 |
| store %x_122_phi, %136 |
| if %x_120 [t: $B22] { # if_10 |
| $B22: { # true |
| exit_switch # switch_2 |
| } |
| } |
| %137:f32 = load %x_119 |
| store %x_122_phi, %137 |
| exit_switch # switch_2 |
| } |
| } |
| %138:f32 = load %x_122_phi |
| %x_122:f32 = let %138 |
| store_vector_element %c, 1u, %x_122 |
| %140:f32 = load_vector_element %c, 0u |
| %x_124:f32 = let %140 |
| %142:f32 = load_vector_element %c, 1u |
| %x_125:f32 = let %142 |
| %144:f32 = add %x_124, %x_125 |
| store_vector_element %c, 2u, %144 |
| store %x_129_phi, 0i |
| loop [b: $B23, c: $B24] { # loop_3 |
| $B23: { # body |
| %x_130:ptr<function, i32, read_write> = var |
| %146:i32 = load %x_129_phi |
| %x_129:i32 = let %146 |
| %148:bool = lt %x_129, 3i |
| if %148 [t: $B25, f: $B26] { # if_11 |
| $B25: { # true |
| exit_if # if_11 |
| } |
| $B26: { # false |
| exit_loop # loop_3 |
| } |
| } |
| %149:f32 = load_vector_element %c, %x_129 |
| %x_136:f32 = let %149 |
| %151:bool = gte %x_136, 1.0f |
| if %151 [t: $B27] { # if_12 |
| $B27: { # true |
| %152:f32 = load_vector_element %c, %x_129 |
| %x_140:f32 = let %152 |
| %154:f32 = load_vector_element %c, %x_129 |
| %x_141:f32 = let %154 |
| %156:f32 = mul %x_140, %x_141 |
| store_vector_element %c, %x_129, %156 |
| exit_if # if_12 |
| } |
| } |
| continue # -> $B24 |
| } |
| $B24: { # continuing |
| %157:i32 = add %x_129, 1i |
| store %x_130, %157 |
| %158:i32 = load %x_130 |
| store %x_129_phi, %158 |
| next_iteration # -> $B23 |
| } |
| } |
| %159:vec3<f32> = load %c |
| %x_143:vec3<f32> = let %159 |
| %161:vec3<f32> = abs %x_143 |
| %162:vec3<f32> = normalize %161 |
| %x_145:vec3<f32> = let %162 |
| %164:f32 = access %x_145, 0u |
| %165:f32 = access %x_145, 1u |
| %166:f32 = access %x_145, 2u |
| %167:vec4<f32> = construct %164, %165, %166, 1.0f |
| store %x_GLF_color, %167 |
| ret |
| } |
| } |
| %tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out { |
| $B28: { |
| store %gl_FragCoord, %gl_FragCoord_param |
| %170:void = call %main_1 |
| %171:vec4<f32> = load %x_GLF_color |
| %172:main_out = construct %171 |
| ret %172 |
| } |
| } |
| %tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 { |
| $B29: { |
| %175:bool = eq %rhs, 0i |
| %176:bool = eq %lhs, -2147483648i |
| %177:bool = eq %rhs, -1i |
| %178:bool = and %176, %177 |
| %179:bool = or %175, %178 |
| %180:i32 = select %rhs, 1i, %179 |
| %181:i32 = let %180 |
| %182:i32 = div %lhs, %181 |
| %183:i32 = mul %182, %181 |
| %184:i32 = sub %lhs, %183 |
| ret %184 |
| } |
| } |
| |
| 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. * |
| ******************************************************************** |