| 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_53:ptr<function, f32, read_write> = var |
| %x_57:ptr<function, f32, read_write> = var |
| %x_58:ptr<function, f32, read_write> = var |
| %x_83:ptr<function, f32, read_write> = var |
| %x_84:ptr<function, f32, read_write> = var |
| %x_124:ptr<function, f32, read_write> = var |
| %x_125:ptr<function, f32, read_write> = var |
| %x_57_phi:ptr<function, f32, read_write> = var |
| %x_60_phi:ptr<function, i32, read_write> = var |
| %x_83_phi:ptr<function, f32, read_write> = var |
| %x_84_phi:ptr<function, f32, read_write> = var |
| %x_85_phi:ptr<function, bool, read_write> = var |
| %x_87_phi:ptr<function, f32, read_write> = var |
| %x_128_phi:ptr<function, f32, read_write> = var |
| %x_135_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:vec2<f32> = construct 1.0f, %x_47 |
| %x_48:vec2<f32> = let %24 |
| %26:f32 = mul %x_47, 0.125f |
| %27:f32 = round %26 |
| %x_50:f32 = let %27 |
| %x_51:vec2<f32> = let vec2<f32>(0.0f, -0.5f) |
| %30:f32 = load_vector_element %gl_FragCoord, 0u |
| store %x_53, %30 |
| switch 0u [c: (default, $B3)] { # switch_1 |
| $B3: { # case |
| store %x_57_phi, -0.5f |
| store %x_60_phi, 1i |
| loop [b: $B4, c: $B5] { # loop_1 |
| $B4: { # body |
| %x_70:ptr<function, f32, read_write> = var |
| %x_78:ptr<function, f32, read_write> = var |
| %x_61:ptr<function, i32, read_write> = var |
| %x_58_phi:ptr<function, f32, read_write> = var |
| %35:f32 = load %x_57_phi |
| store %x_57, %35 |
| %36:i32 = load %x_60_phi |
| %x_60:i32 = let %36 |
| store %x_83_phi, 0.0f |
| %38:f32 = load %x_57 |
| store %x_84_phi, %38 |
| store %x_85_phi, false |
| %39:bool = lt %x_60, 800i |
| if %39 [t: $B6, f: $B7] { # if_1 |
| $B6: { # true |
| exit_if # if_1 |
| } |
| $B7: { # false |
| exit_loop # loop_1 |
| } |
| } |
| %x_77:ptr<function, f32, read_write> = var |
| %x_78_phi:ptr<function, f32, read_write> = var |
| %42:i32 = call %tint_mod_i32, %x_60, 32i |
| %44:bool = eq %42, 0i |
| if %44 [t: $B8, f: $B9] { # if_2 |
| $B8: { # true |
| %45:f32 = load %x_57 |
| %46:f32 = add %45, 0.40000000596046447754f |
| store %x_70, %46 |
| %47:f32 = load %x_70 |
| store %x_58_phi, %47 |
| exit_if # if_2 |
| } |
| $B9: { # false |
| %48:f32 = load %x_57 |
| store %x_78_phi, %48 |
| %49:f32 = convert %x_60 |
| %50:f32 = let %49 |
| %51:f32 = round %x_50 |
| %52:f32 = let %51 |
| %53:f32 = convert %x_60 |
| %54:f32 = let %53 |
| %55:f32 = round %x_50 |
| %56:f32 = div %54, %55 |
| %57:f32 = floor %56 |
| %58:f32 = mul %52, %57 |
| %59:f32 = sub %50, %58 |
| %60:bool = lte %59, 0.00999999977648258209f |
| if %60 [t: $B10] { # if_3 |
| $B10: { # true |
| %61:f32 = load %x_57 |
| %62:f32 = add %61, 100.0f |
| store %x_77, %62 |
| %63:f32 = load %x_77 |
| store %x_78_phi, %63 |
| exit_if # if_3 |
| } |
| } |
| %64:f32 = load %x_78_phi |
| store %x_78, %64 |
| %65:f32 = load %x_78 |
| store %x_58_phi, %65 |
| exit_if # if_2 |
| } |
| } |
| %66:f32 = load %x_58_phi |
| store %x_58, %66 |
| %67:f32 = convert %x_60 |
| %68:f32 = load %x_53 |
| %69:bool = gte %67, %68 |
| if %69 [t: $B11] { # if_4 |
| $B11: { # true |
| %70:f32 = load %x_58 |
| store %x_83_phi, %70 |
| %71:f32 = load %x_58 |
| store %x_84_phi, %71 |
| store %x_85_phi, true |
| exit_loop # loop_1 |
| } |
| } |
| continue # -> $B5 |
| } |
| $B5: { # continuing |
| %72:i32 = add %x_60, 1i |
| store %x_61, %72 |
| %73:f32 = load %x_58 |
| store %x_57_phi, %73 |
| %74:i32 = load %x_61 |
| store %x_60_phi, %74 |
| next_iteration # -> $B4 |
| } |
| } |
| %75:f32 = load %x_83_phi |
| store %x_83, %75 |
| %76:f32 = load %x_84_phi |
| store %x_84, %76 |
| %77:bool = load %x_85_phi |
| %x_85:bool = let %77 |
| %79:f32 = load %x_83 |
| store %x_87_phi, %79 |
| if %x_85 [t: $B12] { # if_5 |
| $B12: { # true |
| exit_switch # switch_1 |
| } |
| } |
| %80:f32 = load %x_84 |
| store %x_87_phi, %80 |
| exit_switch # switch_1 |
| } |
| } |
| %x_92:ptr<function, f32, read_write> = var |
| %x_98:ptr<function, f32, read_write> = var |
| %x_99:ptr<function, f32, read_write> = var |
| %x_98_phi:ptr<function, f32, read_write> = var |
| %x_101_phi:ptr<function, i32, read_write> = var |
| %x_124_phi:ptr<function, f32, read_write> = var |
| %x_125_phi:ptr<function, f32, read_write> = var |
| %x_126_phi:ptr<function, bool, read_write> = var |
| %89:f32 = load %x_87_phi |
| %x_87:f32 = let %89 |
| %91:f32 = load %x_84 |
| %92:f32 = load %x_83 |
| %93:vec4<f32> = construct %91, 0.40000000596046447754f, %92, 0.40000000596046447754f |
| %x_89:vec4<f32> = let %93 |
| store_vector_element %c, 0u, %x_87 |
| %95:f32 = load_vector_element %gl_FragCoord, 1u |
| store %x_92, %95 |
| switch 0u [c: (default, $B13)] { # switch_2 |
| $B13: { # case |
| %96:f32 = load %x_57 |
| %97:vec4<f32> = construct %x_51, 0.0f, %96 |
| %x_95:vec4<f32> = let %97 |
| %99:vec3<f32> = construct %x_48, -0.5f |
| %100:f32 = access %99, 2u |
| %x_96:f32 = let %100 |
| store %x_98_phi, %x_96 |
| store %x_101_phi, 1i |
| loop [b: $B14, c: $B15] { # loop_2 |
| $B14: { # body |
| %x_111:ptr<function, f32, read_write> = var |
| %x_119:ptr<function, f32, read_write> = var |
| %x_102:ptr<function, i32, read_write> = var |
| %x_99_phi:ptr<function, f32, read_write> = var |
| %106:f32 = load %x_98_phi |
| store %x_98, %106 |
| %107:i32 = load %x_101_phi |
| %x_101:i32 = let %107 |
| store %x_124_phi, 0.0f |
| %109:f32 = load %x_98 |
| store %x_125_phi, %109 |
| store %x_126_phi, false |
| %110:bool = lt %x_101, 800i |
| if %110 [t: $B16, f: $B17] { # if_6 |
| $B16: { # true |
| exit_if # if_6 |
| } |
| $B17: { # false |
| exit_loop # loop_2 |
| } |
| } |
| %x_118:ptr<function, f32, read_write> = var |
| %x_119_phi:ptr<function, f32, read_write> = var |
| %113:i32 = call %tint_mod_i32, %x_101, 32i |
| %114:bool = eq %113, 0i |
| if %114 [t: $B18, f: $B19] { # if_7 |
| $B18: { # true |
| %115:f32 = load %x_98 |
| %116:f32 = add %115, 0.40000000596046447754f |
| store %x_111, %116 |
| %117:f32 = load %x_111 |
| store %x_99_phi, %117 |
| exit_if # if_7 |
| } |
| $B19: { # false |
| %118:f32 = load %x_98 |
| store %x_119_phi, %118 |
| %119:f32 = convert %x_101 |
| %120:f32 = let %119 |
| %121:f32 = round %x_50 |
| %122:f32 = let %121 |
| %123:f32 = convert %x_101 |
| %124:f32 = let %123 |
| %125:f32 = round %x_50 |
| %126:f32 = div %124, %125 |
| %127:f32 = floor %126 |
| %128:f32 = mul %122, %127 |
| %129:f32 = sub %120, %128 |
| %130:bool = lte %129, 0.00999999977648258209f |
| if %130 [t: $B20] { # if_8 |
| $B20: { # true |
| %131:f32 = load %x_98 |
| %132:f32 = add %131, 100.0f |
| store %x_118, %132 |
| %133:f32 = load %x_118 |
| store %x_119_phi, %133 |
| exit_if # if_8 |
| } |
| } |
| %134:f32 = load %x_119_phi |
| store %x_119, %134 |
| %135:f32 = load %x_119 |
| store %x_99_phi, %135 |
| exit_if # if_7 |
| } |
| } |
| %136:f32 = load %x_99_phi |
| store %x_99, %136 |
| %137:f32 = convert %x_101 |
| %138:f32 = load %x_92 |
| %139:bool = gte %137, %138 |
| if %139 [t: $B21] { # if_9 |
| $B21: { # true |
| %140:f32 = load %x_99 |
| store %x_124_phi, %140 |
| %141:f32 = load %x_99 |
| store %x_125_phi, %141 |
| store %x_126_phi, true |
| exit_loop # loop_2 |
| } |
| } |
| continue # -> $B15 |
| } |
| $B15: { # continuing |
| %142:i32 = add %x_101, 1i |
| store %x_102, %142 |
| %143:f32 = load %x_99 |
| store %x_98_phi, %143 |
| %144:i32 = load %x_102 |
| store %x_101_phi, %144 |
| next_iteration # -> $B14 |
| } |
| } |
| %145:f32 = load %x_124_phi |
| store %x_124, %145 |
| %146:f32 = load %x_125_phi |
| store %x_125, %146 |
| %147:bool = load %x_126_phi |
| %x_126:bool = let %147 |
| %149:f32 = load %x_124 |
| store %x_128_phi, %149 |
| if %x_126 [t: $B22] { # if_10 |
| $B22: { # true |
| exit_switch # switch_2 |
| } |
| } |
| %150:f32 = load %x_125 |
| store %x_128_phi, %150 |
| exit_switch # switch_2 |
| } |
| } |
| %151:f32 = load %x_128_phi |
| %x_128:f32 = let %151 |
| store_vector_element %c, 1u, %x_128 |
| %153:f32 = load_vector_element %c, 0u |
| %x_130:f32 = let %153 |
| %155:f32 = load_vector_element %c, 1u |
| %x_131:f32 = let %155 |
| %157:f32 = add %x_130, %x_131 |
| store_vector_element %c, 2u, %157 |
| store %x_135_phi, 0i |
| loop [b: $B23, c: $B24] { # loop_3 |
| $B23: { # body |
| %x_136:ptr<function, i32, read_write> = var |
| %159:i32 = load %x_135_phi |
| %x_135:i32 = let %159 |
| %161:bool = lt %x_135, 3i |
| if %161 [t: $B25, f: $B26] { # if_11 |
| $B25: { # true |
| exit_if # if_11 |
| } |
| $B26: { # false |
| exit_loop # loop_3 |
| } |
| } |
| %162:f32 = load_vector_element %c, %x_135 |
| %x_142:f32 = let %162 |
| %164:bool = gte %x_142, 1.0f |
| if %164 [t: $B27] { # if_12 |
| $B27: { # true |
| %165:f32 = load_vector_element %c, %x_135 |
| %x_146:f32 = let %165 |
| %167:f32 = load_vector_element %c, %x_135 |
| %x_147:f32 = let %167 |
| %169:f32 = mul %x_146, %x_147 |
| store_vector_element %c, %x_135, %169 |
| exit_if # if_12 |
| } |
| } |
| continue # -> $B24 |
| } |
| $B24: { # continuing |
| %170:i32 = add %x_135, 1i |
| store %x_136, %170 |
| %171:i32 = load %x_136 |
| store %x_135_phi, %171 |
| next_iteration # -> $B23 |
| } |
| } |
| %172:vec3<f32> = load %c |
| %x_149:vec3<f32> = let %172 |
| %174:vec3<f32> = abs %x_149 |
| %175:vec3<f32> = normalize %174 |
| %x_151:vec3<f32> = let %175 |
| %177:f32 = access %x_151, 0u |
| %178:f32 = access %x_151, 1u |
| %179:f32 = access %x_151, 2u |
| %180:vec4<f32> = construct %177, %178, %179, 1.0f |
| store %x_GLF_color, %180 |
| ret |
| } |
| } |
| %tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out { |
| $B28: { |
| store %gl_FragCoord, %gl_FragCoord_param |
| %183:void = call %main_1 |
| %184:vec4<f32> = load %x_GLF_color |
| %185:main_out = construct %184 |
| ret %185 |
| } |
| } |
| %tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 { |
| $B29: { |
| %188:bool = eq %rhs, 0i |
| %189:bool = eq %lhs, -2147483648i |
| %190:bool = eq %rhs, -1i |
| %191:bool = and %189, %190 |
| %192:bool = or %188, %191 |
| %193:i32 = select %rhs, 1i, %192 |
| %194:i32 = let %193 |
| %195:i32 = div %lhs, %194 |
| %196:i32 = mul %195, %194 |
| %197:i32 = sub %lhs, %196 |
| ret %197 |
| } |
| } |
| |
| 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. * |
| ******************************************************************** |