blob: 624813ee4dd63f7981507e7148eefc622138e9f6 [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
%x_17:i32 = let %7
%9:bool = eq %x_17, 1i
if %9 [t: $B3, f: $B4] { # if_1
$B3: { # true
%10:i32 = load %x
%x_18:i32 = let %10
%12:ptr<function, i32, read_write> = access %s, 0u
%13:i32 = load %12
%x_19:i32 = let %13
%15:i32 = add %x_18, %x_19
ret %15
}
$B4: { # false
%16:i32 = load %x
%x_21:i32 = let %16
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
%26:ptr<uniform, i32, read> = access %x_11, 0u
%27:i32 = load %26
%x_22:i32 = let %27
%29:ptr<function, i32, read_write> = access %arr, 0i, 0u
store %29, %x_22
store %i, 0i
loop [b: $B6, c: $B7] { # loop_1
$B6: { # body
%30:i32 = load %i
%x_23:i32 = let %30
%32:ptr<uniform, i32, read> = access %x_11, 0u
%33:i32 = load %32
%x_24:i32 = let %33
%35:i32 = add 5i, %x_24
%36:bool = lt %x_23, %35
if %36 [t: $B8, f: $B9] { # if_2
$B8: { # true
exit_if # if_2
}
$B9: { # false
exit_loop # loop_1
}
}
%37:i32 = load %i
%x_26:i32 = let %37
%39:i32 = call %tint_mod_i32, %x_26, 2i
%41:bool = neq %39, 0i
if %41 [t: $B10, f: $B11] { # if_3
$B10: { # true
%42:ptr<function, S, read_write> = access %arr, 0i
%43:S = load %42
%x_74:S = let %43
store %param, %x_74
%45:i32 = load %i
%x_28:i32 = let %45
store %param_1, %x_28
%47:i32 = call %func_struct_S_i11_i1_, %param, %param_1
%x_29:i32 = let %47
%49:S = load %param
%x_75:S = let %49
%51:ptr<function, S, read_write> = access %arr, 0i
store %51, %x_75
store %a, %x_29
exit_if # if_3
}
$B11: { # false
%52:ptr<function, S, read_write> = access %arr, 0i
%53:S = load %52
%x_78:S = let %53
store %param_2, %x_78
store %param_3, 1i
%55:i32 = call %func_struct_S_i11_i1_, %param_2, %param_3
%x_30:i32 = let %55
%57:S = load %param_2
%x_79:S = let %57
%59:ptr<function, S, read_write> = access %arr, 0i
store %59, %x_79
store %a, %x_30
exit_if # if_3
}
}
continue # -> $B7
}
$B7: { # continuing
%60:i32 = load %i
%x_31:i32 = let %60
%62:i32 = add %x_31, 1i
store %i, %62
next_iteration # -> $B6
}
}
%63:i32 = load %a
%x_33:i32 = let %63
%65:bool = eq %x_33, 6i
if %65 [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: {
%67:void = call %main_1
%68:vec4<f32> = load %x_GLF_color
%69:main_out = construct %68
ret %69
}
}
%tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 {
$B15: {
%72:bool = eq %rhs, 0i
%73:bool = eq %lhs, -2147483648i
%74:bool = eq %rhs, -1i
%75:bool = and %73, %74
%76:bool = or %72, %75
%77:i32 = select %rhs, 1i, %76
%78:i32 = let %77
%79:i32 = div %lhs, %78
%80:i32 = mul %79, %78
%81:i32 = sub %lhs, %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. *
********************************************************************