blob: 390eee5d2d5f04310fc7a93e523b4c3363af7684 [file] [log] [blame]
SKIP: FAILED
../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: buf0 = struct @align(8) {
injectionSwitch:vec2<f32> @offset(0)
}
BinarySearchObject = struct @align(4) {
prime_numbers:array<i32, 10> @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
}
%binarySearch_struct_BinarySearchObject_i1_10_1_ = func(%obj:ptr<function, BinarySearchObject, read_write>):i32 {
$B2: {
%m:ptr<function, i32, read_write> = var
loop [b: $B3, c: $B4] { # loop_1
$B3: { # body
%6:ptr<uniform, vec2<f32>, read> = access %x_8, 0u
%7:f32 = load_vector_element %6, 0u
%8:bool = gt %7, 1.0f
if %8 [t: $B5, f: $B6] { # if_1
$B5: { # true
exit_if # if_1
}
$B6: { # false
exit_loop # loop_1
}
}
%9:ptr<uniform, vec2<f32>, read> = access %x_8, 0u
%10:f32 = load_vector_element %9, 0u
%11:i32 = call %tint_f32_to_i32, %10
store %m, %11
%13:i32 = load %m
%14:ptr<function, i32, read_write> = access %obj, 0u, %13
%15:i32 = load %14
%16:bool = eq %15, 1i
if %16 [t: $B7] { # if_2
$B7: { # true
ret 1i
}
}
continue # -> $B4
}
$B4: { # continuing
next_iteration # -> $B3
}
}
ret 1i
}
}
%main_1 = func():void {
$B8: {
%i:ptr<function, i32, read_write> = var
%obj_1:ptr<function, BinarySearchObject, read_write> = var
%param:ptr<function, BinarySearchObject, read_write> = var
store %i, 0i
loop [b: $B9, c: $B10] { # loop_2
$B9: { # body
%21:i32 = load %i
%22:bool = lt %21, 10i
if %22 [t: $B11, f: $B12] { # if_3
$B11: { # true
exit_if # if_3
}
$B12: { # false
exit_loop # loop_2
}
}
%23:i32 = load %i
%24:bool = neq %23, 3i
if %24 [t: $B13] { # if_4
$B13: { # true
%25:i32 = load %i
%26:i32 = let %25
%27:ptr<uniform, vec2<f32>, read> = access %x_8, 0u
%28:f32 = load_vector_element %27, 0u
%29:i32 = call %tint_f32_to_i32, %28
%30:i32 = sub %26, %29
%31:bool = eq %30, 4i
if %31 [t: $B14, f: $B15] { # if_5
$B14: { # true
%32:i32 = load %i
%x_21:i32 = let %32
%34:ptr<function, i32, read_write> = access %obj_1, 0u, %x_21
store %34, 11i
exit_if # if_5
}
$B15: { # false
%35:i32 = load %i
%36:bool = eq %35, 6i
if %36 [t: $B16] { # if_6
$B16: { # true
%37:i32 = load %i
%x_23:i32 = let %37
%39:ptr<function, i32, read_write> = access %obj_1, 0u, %x_23
store %39, 17i
exit_if # if_6
}
}
continue # -> $B10
}
}
exit_if # if_4
}
}
loop [b: $B17, c: $B18] { # loop_3
$B17: { # body
continue # -> $B18
}
$B18: { # continuing
%40:ptr<uniform, vec2<f32>, read> = access %x_8, 0u
%41:f32 = load_vector_element %40, 1u
%x_82:f32 = let %41
%43:bool = gt 0.0f, %x_82
%44:bool = eq %43, false
break_if %44 # -> [t: exit_loop loop_3, f: $B17]
}
}
continue # -> $B10
}
$B10: { # continuing
%45:i32 = load %i
%46:i32 = add %45, 1i
store %i, %46
next_iteration # -> $B9
}
}
%47:BinarySearchObject = load %obj_1
store %param, %47
%48:i32 = call %binarySearch_struct_BinarySearchObject_i1_10_1_, %param
%x_26:i32 = let %48
store %x_GLF_color, vec4<f32>(1.0f, 0.0f, 0.0f, 1.0f)
ret
}
}
%tint_symbol = @fragment func():main_out {
$B19: {
%51:void = call %main_1
%52:vec4<f32> = load %x_GLF_color
%53:main_out = construct %52
ret %53
}
}
%tint_f32_to_i32 = func(%value:f32):i32 {
$B20: {
%55:i32 = convert %value
%56:bool = gte %value, -2147483648.0f
%57:i32 = select -2147483648i, %55, %56
%58:bool = lte %value, 2147483520.0f
%59:i32 = select 2147483647i, %57, %58
ret %59
}
}
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. *
********************************************************************