| 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_10:ptr<uniform, buf0, read> = var @binding_point(0, 0) |
| %x_GLF_color:ptr<private, vec4<f32>, read_write> = var |
| } |
| |
| %collatz_i1_ = func(%v:ptr<function, i32, read_write>):i32 { |
| $B2: { |
| %count:ptr<function, i32, read_write> = var |
| store %count, 0i |
| loop [b: $B3, c: $B4] { # loop_1 |
| $B3: { # body |
| %7:i32 = load %v |
| %8:bool = gt %7, 1i |
| if %8 [t: $B5, f: $B6] { # if_1 |
| $B5: { # true |
| exit_if # if_1 |
| } |
| $B6: { # false |
| exit_loop # loop_1 |
| } |
| } |
| %9:i32 = load %v |
| %10:i32 = and %9, 1i |
| %11:bool = eq %10, 1i |
| if %11 [t: $B7, f: $B8] { # if_2 |
| $B7: { # true |
| %12:i32 = load %v |
| %13:i32 = mul 3i, %12 |
| %14:i32 = add %13, 1i |
| store %v, %14 |
| exit_if # if_2 |
| } |
| $B8: { # false |
| %15:i32 = load %v |
| %16:i32 = call %tint_div_i32, %15, 2i |
| store %v, %16 |
| exit_if # if_2 |
| } |
| } |
| %18:i32 = load %count |
| %19:i32 = add %18, 1i |
| store %count, %19 |
| continue # -> $B4 |
| } |
| $B4: { # continuing |
| next_iteration # -> $B3 |
| } |
| } |
| %20:i32 = load %count |
| %x_105:i32 = let %20 |
| ret %x_105 |
| } |
| } |
| %main_1 = func():void { |
| $B9: { |
| %lin:ptr<function, vec2<f32>, read_write> = var |
| %v_1:ptr<function, i32, read_write> = var |
| %param:ptr<function, i32, read_write> = var |
| %indexable:ptr<function, array<vec4<f32>, 16>, read_write> = var |
| %27:vec4<f32> = load %gl_FragCoord |
| %28:vec2<f32> = swizzle %27, xy |
| %29:ptr<uniform, vec2<f32>, read> = access %x_10, 0u |
| %30:vec2<f32> = load %29 |
| %31:vec2<f32> = div %28, %30 |
| store %lin, %31 |
| %32:vec2<f32> = load %lin |
| %33:vec2<f32> = mul %32, 8.0f |
| %34:vec2<f32> = floor %33 |
| store %lin, %34 |
| %35:f32 = load_vector_element %lin, 0u |
| %36:i32 = call %tint_f32_to_i32, %35 |
| %38:i32 = mul %36, 8i |
| %39:i32 = let %38 |
| %40:f32 = load_vector_element %lin, 1u |
| %41:i32 = call %tint_f32_to_i32, %40 |
| %42:i32 = add %39, %41 |
| store %v_1, %42 |
| %43:i32 = load %v_1 |
| store %param, %43 |
| %44:i32 = call %collatz_i1_, %param |
| %x_80:i32 = let %44 |
| 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)) |
| %46:i32 = call %tint_mod_i32, %x_80, 16i |
| %48:ptr<function, vec4<f32>, read_write> = access %indexable, %46 |
| %49:vec4<f32> = load %48 |
| store %x_GLF_color, %49 |
| ret |
| } |
| } |
| %tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out { |
| $B10: { |
| store %gl_FragCoord, %gl_FragCoord_param |
| %52:void = call %main_1 |
| %53:vec4<f32> = load %x_GLF_color |
| %54:main_out = construct %53 |
| ret %54 |
| } |
| } |
| %tint_div_i32 = func(%lhs:i32, %rhs:i32):i32 { |
| $B11: { |
| %57:bool = eq %rhs, 0i |
| %58:bool = eq %lhs, -2147483648i |
| %59:bool = eq %rhs, -1i |
| %60:bool = and %58, %59 |
| %61:bool = or %57, %60 |
| %62:i32 = select %rhs, 1i, %61 |
| %63:i32 = div %lhs, %62 |
| ret %63 |
| } |
| } |
| %tint_mod_i32 = func(%lhs_1:i32, %rhs_1:i32):i32 { # %lhs_1: 'lhs', %rhs_1: 'rhs' |
| $B12: { |
| %66:bool = eq %rhs_1, 0i |
| %67:bool = eq %lhs_1, -2147483648i |
| %68:bool = eq %rhs_1, -1i |
| %69:bool = and %67, %68 |
| %70:bool = or %66, %69 |
| %71:i32 = select %rhs_1, 1i, %70 |
| %72:i32 = let %71 |
| %73:i32 = div %lhs_1, %72 |
| %74:i32 = mul %73, %72 |
| %75:i32 = sub %lhs_1, %74 |
| ret %75 |
| } |
| } |
| %tint_f32_to_i32 = func(%value:f32):i32 { |
| $B13: { |
| %77:i32 = convert %value |
| %78:bool = gte %value, -2147483648.0f |
| %79:i32 = select -2147483648i, %77, %78 |
| %80:bool = lte %value, 2147483520.0f |
| %81:i32 = select 2147483647i, %79, %80 |
| ret %81 |
| } |
| } |
| |
| 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. * |
| ******************************************************************** |