blob: 611a5c8e054edc4615fbfe057063c04a2d0162b5 [file] [log] [blame]
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_69:ptr<function, i32, read_write> = var
%x_69_phi:ptr<function, i32, read_write> = var
%x_72_phi:ptr<function, i32, read_write> = var
%9:vec4<f32> = load %gl_FragCoord
%x_55:vec4<f32> = let %9
%11:ptr<uniform, vec2<f32>, read> = access %x_6, 0u
%12:vec2<f32> = load %11
%x_58:vec2<f32> = let %12
%14:f32 = access %x_55, 0u
%15:f32 = access %x_55, 1u
%16:vec2<f32> = construct %14, %15
%17:vec2<f32> = div %16, %x_58
%x_59:vec2<f32> = let %17
%19:f32 = access %x_59, 0u
%20:f32 = mul %19, 10.0f
%21:i32 = call %tint_f32_to_i32, %20
%23:i32 = let %21
%24:f32 = access %x_59, 1u
%25:f32 = mul %24, 10.0f
%26:i32 = call %tint_f32_to_i32, %25
%27:i32 = mul %26, 10i
%28:i32 = add %23, %27
%x_67:i32 = let %28
store %x_69_phi, 100i
store %x_72_phi, 0i
loop [b: $B3, c: $B4] { # loop_1
$B3: { # body
%x_70:ptr<function, i32, read_write> = var
%x_73:ptr<function, i32, read_write> = var
%32:i32 = load %x_69_phi
store %x_69, %32
%33:i32 = load %x_72_phi
%x_72:i32 = let %33
%35:bool = lt %x_72, %x_67
if %35 [t: $B5, f: $B6] { # if_1
$B5: { # true
exit_if # if_1
}
$B6: { # false
exit_loop # loop_1
}
}
continue # -> $B4
}
$B4: { # continuing
%36:i32 = load %x_69
%37:i32 = bitcast %36
%38:i32 = mul 4i, %37
%39:i32 = let %38
%40:i32 = load %x_69
%41:i32 = bitcast %40
%42:i32 = sub 1000i, %41
%43:i32 = mul %39, %42
%44:i32 = call %tint_div_i32, %43, 1000i
store %x_70, %44
%46:i32 = add %x_72, 1i
store %x_73, %46
%47:i32 = load %x_70
store %x_69_phi, %47
%48:i32 = load %x_73
store %x_72_phi, %48
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))
%49:array<vec4<f32>, 16> = load %indexable
%x_80:array<vec4<f32>, 16> = let %49
store %indexable, array<vec4<f32>, 16>(vec4<f32>(0.0f))
store %indexable, %x_80
%x_81:vec2<f32> = let vec2<f32>(1.0f, 0.5f)
%52:i32 = load %x_69
%53:i32 = call %tint_mod_i32, %52, 16i
%55:i32 = bitcast %53
%56:ptr<function, vec4<f32>, read_write> = access %indexable, %55
%57:vec4<f32> = load %56
%x_83:vec4<f32> = let %57
store %x_GLF_color, %x_83
ret
}
}
%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
$B7: {
store %gl_FragCoord, %gl_FragCoord_param
%61:void = call %main_1
%62:vec4<f32> = load %x_GLF_color
%63:main_out = construct %62
ret %63
}
}
%tint_div_i32 = func(%lhs:i32, %rhs:i32):i32 {
$B8: {
%66:bool = eq %rhs, 0i
%67:bool = eq %lhs, -2147483648i
%68:bool = eq %rhs, -1i
%69:bool = and %67, %68
%70:bool = or %66, %69
%71:i32 = select %rhs, 1i, %70
%72:i32 = div %lhs, %71
ret %72
}
}
%tint_mod_i32 = func(%lhs_1:i32, %rhs_1:i32):i32 { # %lhs_1: 'lhs', %rhs_1: 'rhs'
$B9: {
%75:bool = eq %rhs_1, 0i
%76:bool = eq %lhs_1, -2147483648i
%77:bool = eq %rhs_1, -1i
%78:bool = and %76, %77
%79:bool = or %75, %78
%80:i32 = select %rhs_1, 1i, %79
%81:i32 = let %80
%82:i32 = div %lhs_1, %81
%83:i32 = mul %82, %81
%84:i32 = sub %lhs_1, %83
ret %84
}
}
%tint_f32_to_i32 = func(%value:f32):i32 {
$B10: {
%86:i32 = convert %value
%87:bool = gte %value, -2147483648.0f
%88:i32 = select -2147483648i, %86, %87
%89:bool = lte %value, 2147483520.0f
%90:i32 = select 2147483647i, %88, %89
ret %90
}
}
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. *
********************************************************************