blob: 69ebfca61f693a488a8253ab838b21366813b0b1 [file] [log] [blame]
SKIP: FAILED
../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: buf0 = struct @align(4) {
one:i32 @offset(0)
}
S = struct @align(4) {
data:i32 @offset(0)
}
main_out = struct @align(16) {
x_GLF_color_1:vec4<f32> @offset(0), @location(0)
}
$B1: { # root
%x_11:ptr<uniform, buf0, read> = var @binding_point(0, 0)
%x_GLF_color:ptr<private, vec4<f32>, read_write> = var
}
%func_struct_S_i11_i1_ = func(%s:ptr<function, S, read_write>, %x:ptr<function, i32, read_write>):i32 {
$B2: {
%6:ptr<function, i32, read_write> = access %s, 0u
%7:i32 = load %6
%8:bool = eq %7, 1i
if %8 [t: $B3, f: $B4] { # if_1
$B3: { # true
%9:i32 = load %x
%x_18:i32 = let %9
%11:ptr<function, i32, read_write> = access %s, 0u
%12:i32 = load %11
%x_19:i32 = let %12
%14:i32 = add %x_18, %x_19
ret %14
}
$B4: { # false
%15:i32 = load %x
%x_21:i32 = let %15
ret %x_21
}
}
unreachable
}
}
%main_1 = func():void {
$B5: {
%a:ptr<function, i32, read_write> = var
%arr:ptr<function, array<S, 1>, read_write> = var
%i:ptr<function, i32, read_write> = var
%param:ptr<function, S, read_write> = var
%param_1:ptr<function, i32, read_write> = var
%param_2:ptr<function, S, read_write> = var
%param_3:ptr<function, i32, read_write> = var
store %a, 0i
%25:ptr<function, i32, read_write> = access %arr, 0i, 0u
%26:ptr<uniform, i32, read> = access %x_11, 0u
%27:i32 = load %26
store %25, %27
store %i, 0i
loop [b: $B6, c: $B7] { # loop_1
$B6: { # body
%28:i32 = load %i
%29:ptr<uniform, i32, read> = access %x_11, 0u
%30:i32 = load %29
%31:i32 = add 5i, %30
%32:bool = lt %28, %31
if %32 [t: $B8, f: $B9] { # if_2
$B8: { # true
exit_if # if_2
}
$B9: { # false
exit_loop # loop_1
}
}
%33:i32 = load %i
%34:i32 = call %tint_mod_i32, %33, 2i
%36:bool = neq %34, 0i
if %36 [t: $B10, f: $B11] { # if_3
$B10: { # true
%37:ptr<function, S, read_write> = access %arr, 0i
%38:S = load %37
store %param, %38
%39:i32 = load %i
store %param_1, %39
%40:i32 = call %func_struct_S_i11_i1_, %param, %param_1
%x_29:i32 = let %40
%42:ptr<function, S, read_write> = access %arr, 0i
%43:S = load %param
store %42, %43
store %a, %x_29
exit_if # if_3
}
$B11: { # false
%44:ptr<function, S, read_write> = access %arr, 0i
%45:S = load %44
store %param_2, %45
store %param_3, 1i
%46:i32 = call %func_struct_S_i11_i1_, %param_2, %param_3
%x_30:i32 = let %46
%48:ptr<function, S, read_write> = access %arr, 0i
%49:S = load %param_2
store %48, %49
store %a, %x_30
exit_if # if_3
}
}
continue # -> $B7
}
$B7: { # continuing
%50:i32 = load %i
%51:i32 = add %50, 1i
store %i, %51
next_iteration # -> $B6
}
}
%52:i32 = load %a
%53:bool = eq %52, 6i
if %53 [t: $B12, f: $B13] { # if_4
$B12: { # true
store %x_GLF_color, vec4<f32>(1.0f, 0.0f, 0.0f, 1.0f)
exit_if # if_4
}
$B13: { # false
store %x_GLF_color, vec4<f32>(0.0f)
exit_if # if_4
}
}
ret
}
}
%tint_symbol = @fragment func():main_out {
$B14: {
%55:void = call %main_1
%56:vec4<f32> = load %x_GLF_color
%57:main_out = construct %56
ret %57
}
}
%tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 {
$B15: {
%60:bool = eq %rhs, 0i
%61:bool = eq %lhs, -2147483648i
%62:bool = eq %rhs, -1i
%63:bool = and %61, %62
%64:bool = or %60, %63
%65:i32 = select %rhs, 1i, %64
%66:i32 = let %65
%67:i32 = div %lhs, %66
%68:i32 = mul %67, %66
%69:i32 = sub %lhs, %68
ret %69
}
}
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. *
********************************************************************