| 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_72:ptr<function, i32, read_write> = var |
| %x_72_phi:ptr<function, i32, read_write> = var |
| %x_75_phi:ptr<function, i32, read_write> = var |
| %9:vec4<f32> = load %gl_FragCoord |
| %x_54:vec4<f32> = let %9 |
| %11:f32 = access %x_54, 0u |
| %12:f32 = access %x_54, 1u |
| %13:vec2<f32> = construct %11, %12 |
| %x_55:vec2<f32> = let %13 |
| %15:ptr<uniform, vec2<f32>, read> = access %x_6, 0u |
| %16:vec2<f32> = load %15 |
| %x_58:vec2<f32> = let %16 |
| %18:vec2<f32> = div %x_55, %x_58 |
| %x_59:vec2<f32> = let %18 |
| %20:f32 = access %x_59, 0u |
| %21:vec4<f32> = construct 0.0f, %x_55, 0.5f |
| %22:f32 = access %21, 3u |
| %23:vec4<f32> = construct %22, 10.0f, vec2<f32>(0.0f) |
| %24:f32 = access %23, 1u |
| %25:f32 = mul %20, %24 |
| %26:i32 = call %tint_f32_to_i32, %25 |
| %28:i32 = let %26 |
| %29:f32 = access %x_59, 1u |
| %30:f32 = mul %29, 10.0f |
| %31:i32 = call %tint_f32_to_i32, %30 |
| %32:i32 = mul %31, 10i |
| %33:i32 = add %28, %32 |
| %x_70:i32 = let %33 |
| store %x_72_phi, 100i |
| store %x_75_phi, 0i |
| loop [b: $B3, c: $B4] { # loop_1 |
| $B3: { # body |
| %x_73:ptr<function, i32, read_write> = var |
| %x_76:ptr<function, i32, read_write> = var |
| %37:i32 = load %x_72_phi |
| store %x_72, %37 |
| %38:i32 = load %x_75_phi |
| %x_75:i32 = let %38 |
| %40:bool = lt %x_75, %x_70 |
| if %40 [t: $B5, f: $B6] { # if_1 |
| $B5: { # true |
| exit_if # if_1 |
| } |
| $B6: { # false |
| exit_loop # loop_1 |
| } |
| } |
| continue # -> $B4 |
| } |
| $B4: { # continuing |
| %41:i32 = load %x_72 |
| %42:i32 = bitcast %41 |
| %43:i32 = mul 4i, %42 |
| %44:i32 = let %43 |
| %45:i32 = load %x_72 |
| %46:i32 = bitcast %45 |
| %47:i32 = sub 1000i, %46 |
| %48:i32 = mul %44, %47 |
| %49:i32 = call %tint_div_i32, %48, 1000i |
| store %x_73, %49 |
| %51:i32 = add %x_75, 1i |
| store %x_76, %51 |
| %52:i32 = load %x_73 |
| store %x_72_phi, %52 |
| %53:i32 = load %x_76 |
| store %x_75_phi, %53 |
| next_iteration # -> $B3 |
| } |
| } |
| 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)) |
| %54:i32 = load %x_72 |
| %55:i32 = call %tint_mod_i32, %54, 16i |
| %57:i32 = bitcast %55 |
| %58:ptr<function, vec4<f32>, read_write> = access %indexable, %57 |
| %59:vec4<f32> = load %58 |
| %x_84:vec4<f32> = let %59 |
| store %x_GLF_color, %x_84 |
| ret |
| } |
| } |
| %tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out { |
| $B7: { |
| store %gl_FragCoord, %gl_FragCoord_param |
| %63:void = call %main_1 |
| %64:vec4<f32> = load %x_GLF_color |
| %65:main_out = construct %64 |
| ret %65 |
| } |
| } |
| %tint_div_i32 = func(%lhs:i32, %rhs:i32):i32 { |
| $B8: { |
| %68:bool = eq %rhs, 0i |
| %69:bool = eq %lhs, -2147483648i |
| %70:bool = eq %rhs, -1i |
| %71:bool = and %69, %70 |
| %72:bool = or %68, %71 |
| %73:i32 = select %rhs, 1i, %72 |
| %74:i32 = div %lhs, %73 |
| ret %74 |
| } |
| } |
| %tint_mod_i32 = func(%lhs_1:i32, %rhs_1:i32):i32 { # %lhs_1: 'lhs', %rhs_1: 'rhs' |
| $B9: { |
| %77:bool = eq %rhs_1, 0i |
| %78:bool = eq %lhs_1, -2147483648i |
| %79:bool = eq %rhs_1, -1i |
| %80:bool = and %78, %79 |
| %81:bool = or %77, %80 |
| %82:i32 = select %rhs_1, 1i, %81 |
| %83:i32 = let %82 |
| %84:i32 = div %lhs_1, %83 |
| %85:i32 = mul %84, %83 |
| %86:i32 = sub %lhs_1, %85 |
| ret %86 |
| } |
| } |
| %tint_f32_to_i32 = func(%value:f32):i32 { |
| $B10: { |
| %88:i32 = convert %value |
| %89:bool = gte %value, -2147483648.0f |
| %90:i32 = select -2147483648i, %88, %89 |
| %91:bool = lte %value, 2147483520.0f |
| %92:i32 = select 2147483647i, %90, %91 |
| ret %92 |
| } |
| } |
| |
| 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. * |
| ******************************************************************** |