blob: 880baacc69576c6fcb0f0dccc0ea20a2f7d15daa [file] [log] [blame]
SKIP: FAILED
../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: strided_arr = struct @align(4) {
el:i32 @offset(0)
}
buf0 = struct @align(4) {
x_GLF_uniform_int_values:array<strided_arr, 5> @offset(0)
}
main_out = struct @align(16) {
x_GLF_color_1:vec4<f32> @offset(0), @location(0)
}
$B1: { # root
%x_8:ptr<uniform, buf0, read> = var @binding_point(0, 0)
%x_GLF_color:ptr<private, vec4<f32>, read_write> = var
}
%func_f1_ = func(%f:ptr<function, f32, read_write>):i32 {
$B2: {
%a:ptr<function, i32, read_write> = var
%b:ptr<function, i32, read_write> = var
%i:ptr<function, i32, read_write> = var
%8:ptr<uniform, i32, read> = access %x_8, 0u, 1i, 0u
%9:i32 = load %8
store %a, %9
%10:ptr<uniform, i32, read> = access %x_8, 0u, 2i, 0u
%11:i32 = load %10
store %b, %11
%12:ptr<uniform, i32, read> = access %x_8, 0u, 2i, 0u
%13:i32 = load %12
store %i, %13
loop [b: $B3, c: $B4] { # loop_1
$B3: { # body
%14:i32 = load %i
%15:ptr<uniform, i32, read> = access %x_8, 0u, 4i, 0u
%16:i32 = load %15
%17:bool = lt %14, %16
if %17 [t: $B5, f: $B6] { # if_1
$B5: { # true
exit_if # if_1
}
$B6: { # false
exit_loop # loop_1
}
}
%18:i32 = load %a
%19:ptr<uniform, i32, read> = access %x_8, 0u, 3i, 0u
%20:i32 = load %19
%21:bool = gt %18, %20
if %21 [t: $B7] { # if_2
$B7: { # true
exit_loop # loop_1
}
}
%22:f32 = load %f
%23:i32 = call %tint_f32_to_i32, %22
%25:i32 = let %23
%26:ptr<uniform, i32, read> = access %x_8, 0u, 1i, 0u
%27:i32 = load %26
%28:i32 = call %tint_div_i32, %27, 2i
%30:i32 = sub %25, %28
%31:i32 = load %i
%32:i32 = add %30, %31
store %a, %32
%33:i32 = load %b
%34:i32 = add %33, 1i
store %b, %34
continue # -> $B4
}
$B4: { # continuing
%35:i32 = load %i
%36:i32 = add %35, 1i
store %i, %36
next_iteration # -> $B3
}
}
%37:i32 = load %b
%38:ptr<uniform, i32, read> = access %x_8, 0u, 0i, 0u
%39:i32 = load %38
%40:bool = eq %37, %39
if %40 [t: $B8, f: $B9] { # if_3
$B8: { # true
%41:ptr<uniform, i32, read> = access %x_8, 0u, 1i, 0u
%42:i32 = load %41
%x_100:i32 = let %42
ret %x_100
}
$B9: { # false
%44:ptr<uniform, i32, read> = access %x_8, 0u, 2i, 0u
%45:i32 = load %44
%x_102:i32 = let %45
ret %x_102
}
}
unreachable
}
}
%main_1 = func():void {
$B10: {
%param:ptr<function, f32, read_write> = var
store %param, 0.69999998807907104492f
%49:i32 = call %func_f1_, %param
%x_34:i32 = let %49
%51:ptr<uniform, i32, read> = access %x_8, 0u, 1i, 0u
%52:i32 = load %51
%53:bool = eq %x_34, %52
if %53 [t: $B11, f: $B12] { # if_4
$B11: { # true
%54:ptr<uniform, i32, read> = access %x_8, 0u, 1i, 0u
%55:i32 = load %54
%56:f32 = convert %55
%57:f32 = let %56
%58:ptr<uniform, i32, read> = access %x_8, 0u, 2i, 0u
%59:i32 = load %58
%60:f32 = convert %59
%61:f32 = let %60
%62:ptr<uniform, i32, read> = access %x_8, 0u, 2i, 0u
%63:i32 = load %62
%64:f32 = convert %63
%65:f32 = let %64
%66:ptr<uniform, i32, read> = access %x_8, 0u, 1i, 0u
%67:i32 = load %66
%68:f32 = convert %67
%69:vec4<f32> = construct %57, %61, %65, %68
store %x_GLF_color, %69
exit_if # if_4
}
$B12: { # false
%70:ptr<uniform, i32, read> = access %x_8, 0u, 2i, 0u
%71:i32 = load %70
%72:f32 = convert %71
%73:vec4<f32> = construct %72
store %x_GLF_color, %73
exit_if # if_4
}
}
ret
}
}
%tint_symbol = @fragment func():main_out {
$B13: {
%75:void = call %main_1
%76:vec4<f32> = load %x_GLF_color
%77:main_out = construct %76
ret %77
}
}
%tint_div_i32 = func(%lhs:i32, %rhs:i32):i32 {
$B14: {
%80:bool = eq %rhs, 0i
%81:bool = eq %lhs, -2147483648i
%82:bool = eq %rhs, -1i
%83:bool = and %81, %82
%84:bool = or %80, %83
%85:i32 = select %rhs, 1i, %84
%86:i32 = div %lhs, %85
ret %86
}
}
%tint_f32_to_i32 = func(%value:f32):i32 {
$B15: {
%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. *
********************************************************************