blob: eeebc2af9b7d1cba4ac3076a1d55943c4458152e [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)
}
main_out = struct @align(16) {
x_GLF_color_1:vec4<f32> @offset(0), @location(0)
}
tmp_struct = struct @align(4) {
nmb:array<i32, 1> @offset(0)
}
$B1: { # root
%x_11:ptr<uniform, buf0, read> = var @binding_point(0, 0)
%x_GLF_color:ptr<private, vec4<f32>, read_write> = var
%continue_execution:ptr<private, bool, read_write> = var, true
}
%main_1 = func():void {
$B2: {
%x_24:ptr<function, array<i32, 1>, read_write> = var
%x_68:ptr<function, bool, read_write> = var, false
%x_17:ptr<function, i32, read_write> = var
%x_18:ptr<function, i32, read_write> = var
%x_19:ptr<function, i32, read_write> = var
%x_20:ptr<function, i32, read_write> = var
%x_69:ptr<function, bool, read_write> = var, false
%tmp_float:ptr<function, f32, read_write> = var
%color:ptr<function, vec3<f32>, read_write> = var
loop [b: $B3] { # loop_1
$B3: { # body
%x_25:ptr<function, i32, read_write> = var
%x_101:ptr<function, vec3<f32>, read_write> = var
%x_79_phi:ptr<function, bool, read_write> = var
%x_26_phi:ptr<function, i32, read_write> = var
%18:ptr<uniform, vec2<f32>, read> = access %x_11, 0u
%19:f32 = load_vector_element %18, 1u
%x_75:f32 = let %19
store %tmp_float, %x_75
%21:vec3<f32> = construct %x_75, %x_75, %x_75
%x_76:vec3<f32> = let %21
store %color, %x_76
store %x_24, array<i32, 1>(0i)
store %x_68, false
store %x_79_phi, false
loop [b: $B4] { # loop_2
$B4: { # body
%x_21_phi:ptr<function, i32, read_write> = var
%x_25_phi:ptr<function, i32, read_write> = var
%x_93_phi:ptr<function, bool, read_write> = var
%26:bool = load %x_79_phi
%x_79:bool = let %26
store %x_18, 1i
store %x_21_phi, 1i
loop [b: $B5, c: $B6] { # loop_3
$B5: { # body
%28:i32 = load %x_21_phi
%x_21:i32 = let %28
store %x_25_phi, 0i
store %x_93_phi, %x_79
%30:bool = gt %x_21, 10i
if %30 [t: $B7, f: $B8] { # if_1
$B7: { # true
exit_if # if_1
}
$B8: { # false
exit_loop # loop_3
}
}
%31:i32 = sub %x_21, 1i
%x_22:i32 = let %31
store %x_19, %x_22
%33:ptr<function, i32, read_write> = access %x_24, %x_22
%34:i32 = load %33
%x_23:i32 = let %34
%36:bool = eq %x_23, 1i
if %36 [t: $B9] { # if_2
$B9: { # true
store %x_68, true
store %x_17, 1i
store %x_25_phi, 1i
store %x_93_phi, true
exit_loop # loop_3
}
}
store %x_18, %x_22
continue # -> $B6
}
$B6: { # continuing
store %x_21_phi, %x_22
next_iteration # -> $B5
}
}
%37:i32 = load %x_25_phi
store %x_25, %37
%38:bool = load %x_93_phi
%x_93:bool = let %38
%40:i32 = load %x_25
store %x_26_phi, %40
if %x_93 [t: $B10] { # if_3
$B10: { # true
exit_loop # loop_2
}
}
store %x_68, true
store %x_17, -1i
store %x_26_phi, -1i
exit_loop # loop_2
}
}
%41:i32 = load %x_26_phi
%x_26:i32 = let %41
store %x_20, %x_26
%43:bool = eq %x_26, -1i
if %43 [t: $B11, f: $B12] { # if_4
$B11: { # true
store %continue_execution, false
exit_if # if_4
}
$B12: { # false
store %x_GLF_color, vec4<f32>(0.0f)
%44:f32 = access %x_76, 1u
%45:f32 = access %x_76, 2u
%46:vec2<f32> = construct %44, %45
%47:vec2<f32> = add %46, vec2<f32>(1.0f)
%x_100:vec2<f32> = let %47
%49:f32 = access %x_76, 0u
%50:f32 = access %x_100, 0u
%51:f32 = access %x_100, 1u
%52:vec3<f32> = construct %49, %50, %51
store %x_101, %52
%53:vec3<f32> = load %x_101
store %color, %53
%54:ptr<uniform, vec2<f32>, read> = access %x_11, 0u
%55:f32 = load_vector_element %54, 0u
%x_103:f32 = let %55
%57:bool = gt %x_103, 1.0f
if %57 [t: $B13] { # if_5
$B13: { # true
store %x_69, true
exit_loop # loop_1
}
}
exit_if # if_4
}
}
%58:f32 = load_vector_element %x_101, 0u
%59:f32 = load_vector_element %x_101, 1u
%60:f32 = load_vector_element %x_101, 2u
%61:vec4<f32> = construct %58, %59, %60, 1.0f
store %x_GLF_color, %61
store %x_69, true
exit_loop # loop_1
}
}
ret
}
}
%tint_symbol = @fragment func():main_out {
$B14: {
%63:void = call %main_1
%64:vec4<f32> = load %x_GLF_color
%65:main_out = construct %64
%66:bool = load %continue_execution
%67:bool = eq %66, false
if %67 [t: $B15] { # if_6
$B15: { # true
terminate_invocation
}
}
ret %65
}
}
%binarySearch_struct_tmp_struct_i1_1_1_ = func(%obj:ptr<function, tmp_struct, read_write>):i32 {
$B16: {
%x_112:ptr<function, bool, read_write> = var, false
%x_16:ptr<function, i32, read_write> = var
%one:ptr<function, i32, read_write> = var
%zero:ptr<function, i32, read_write> = var
%x_27:ptr<function, i32, read_write> = var
%x_114_phi:ptr<function, bool, read_write> = var
%x_28_phi:ptr<function, i32, read_write> = var
store %x_114_phi, false
loop [b: $B17] { # loop_4
$B17: { # body
%x_15_phi:ptr<function, i32, read_write> = var
%x_27_phi:ptr<function, i32, read_write> = var
%x_128_phi:ptr<function, bool, read_write> = var
%80:bool = load %x_114_phi
%x_114:bool = let %80
store %one, 1i
store %x_15_phi, 1i
loop [b: $B18, c: $B19] { # loop_5
$B18: { # body
%82:i32 = load %x_15_phi
%x_15:i32 = let %82
store %x_27_phi, 0i
store %x_128_phi, %x_114
%84:bool = gt %x_15, 10i
if %84 [t: $B20, f: $B21] { # if_7
$B20: { # true
exit_if # if_7
}
$B21: { # false
exit_loop # loop_5
}
}
%85:i32 = sub %x_15, 1i
%x_13:i32 = let %85
store %zero, %x_13
%87:ptr<function, i32, read_write> = access %obj, 0u, %x_13
%88:i32 = load %87
%x_14:i32 = let %88
%90:bool = eq %x_14, 1i
if %90 [t: $B22] { # if_8
$B22: { # true
store %x_112, true
store %x_16, 1i
store %x_27_phi, 1i
store %x_128_phi, true
exit_loop # loop_5
}
}
store %one, %x_13
continue # -> $B19
}
$B19: { # continuing
store %x_15_phi, %x_13
next_iteration # -> $B18
}
}
%91:i32 = load %x_27_phi
store %x_27, %91
%92:bool = load %x_128_phi
%x_128:bool = let %92
%94:i32 = load %x_27
store %x_28_phi, %94
if %x_128 [t: $B23] { # if_9
$B23: { # true
exit_loop # loop_4
}
}
store %x_112, true
store %x_16, -1i
store %x_28_phi, -1i
exit_loop # loop_4
}
}
%95:i32 = load %x_28_phi
%x_28:i32 = let %95
ret %x_28
}
}
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. *
********************************************************************