blob: 88427449978bcd48a83f2973b9e2da8b778676df [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)
}
$B1: { # root
%x_9:ptr<uniform, buf0, read> = var @binding_point(0, 0)
%x_GLF_color:ptr<private, vec4<f32>, read_write> = var
%gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
%continue_execution:ptr<private, bool, read_write> = var, true
}
%main_1 = func():void {
$B2: {
%v:ptr<function, vec2<f32>, read_write> = var
%floats:ptr<function, array<f32, 9>, read_write> = var
%one:ptr<function, i32, read_write> = var
%i:ptr<function, i32, read_write> = var
%alwaysFalse:ptr<function, bool, read_write> = var
store %v, vec2<f32>(0.0f)
%11:ptr<function, f32, read_write> = access %floats, 1i
store %11, 0.0f
%12:ptr<uniform, vec2<f32>, read> = access %x_9, 0u
%13:f32 = load_vector_element %12, 1u
%x_46:f32 = let %13
%15:i32 = call %tint_f32_to_i32, %x_46
store %one, %15
loop [b: $B3, c: $B4] { # loop_1
$B3: { # body
store %i, 0i
loop [b: $B5, c: $B6] { # loop_2
$B5: { # body
%17:i32 = load %i
%x_56:i32 = let %17
%19:i32 = load %one
%x_57:i32 = let %19
%21:bool = lt %x_56, %x_57
if %21 [t: $B7, f: $B8] { # if_1
$B7: { # true
exit_if # if_1
}
$B8: { # false
exit_loop # loop_2
}
}
%22:i32 = load %i
%x_60:i32 = let %22
%24:bool = eq %x_60, 0i
if %24 [t: $B9] { # if_2
$B9: { # true
%25:ptr<uniform, vec2<f32>, read> = access %x_9, 0u
%26:f32 = load_vector_element %25, 0u
%x_65:f32 = let %26
%28:ptr<uniform, vec2<f32>, read> = access %x_9, 0u
%29:f32 = load_vector_element %28, 1u
%x_67:f32 = let %29
%31:bool = gt %x_65, %x_67
store %alwaysFalse, %31
%32:bool = load %alwaysFalse
%x_69:bool = let %32
%34:bool = eq %x_69, false
if %34 [t: $B10] { # if_3
$B10: { # true
%35:i32 = load %one
%x_73:i32 = let %35
%37:ptr<function, f32, read_write> = access %floats, %x_73
store %37, 1.0f
store %x_GLF_color, vec4<f32>(1.0f, 1.0f, 0.0f, 1.0f)
exit_if # if_3
}
}
%38:i32 = load %one
%x_75:i32 = let %38
store_vector_element %v, %x_75, 1.0f
%40:bool = load %alwaysFalse
%x_77:bool = let %40
if %x_77 [t: $B11] { # if_4
$B11: { # true
store %continue_execution, false
exit_if # if_4
}
}
%42:ptr<uniform, vec2<f32>, read> = access %x_9, 0u
%43:f32 = load_vector_element %42, 1u
%x_81:f32 = let %43
%45:bool = lt %x_81, 0.0f
if %45 [t: $B12] { # if_5
$B12: { # true
store %x_GLF_color, vec4<f32>(0.0f, 1.0f, 0.0f, 1.0f)
exit_if # if_5
}
}
exit_if # if_2
}
}
continue # -> $B6
}
$B6: { # continuing
%46:i32 = load %i
%x_85:i32 = let %46
%48:i32 = add %x_85, 1i
store %i, %48
next_iteration # -> $B5
}
}
continue # -> $B4
}
$B4: { # continuing
%49:i32 = load %one
%x_87:i32 = let %49
%51:bool = lt %x_87, 0i
%52:bool = eq %51, false
break_if %52 # -> [t: exit_loop loop_1, f: $B3]
}
}
%x_102:ptr<function, bool, read_write> = var
%x_103_phi:ptr<function, bool, read_write> = var
%55:f32 = load_vector_element %gl_FragCoord, 1u
%x_90:f32 = let %55
%57:bool = gte %x_90, 0.0f
if %57 [t: $B13, f: $B14] { # if_6
$B13: { # true
%58:f32 = load_vector_element %v, 1u
%x_96:f32 = let %58
%60:bool = eq %x_96, 1.0f
%x_97:bool = let %60
store %x_103_phi, %x_97
if %x_97 [t: $B15] { # if_7
$B15: { # true
%62:ptr<function, f32, read_write> = access %floats, 1i
%63:f32 = load %62
%x_101:f32 = let %63
%65:bool = eq %x_101, 1.0f
store %x_102, %65
%66:bool = load %x_102
store %x_103_phi, %66
exit_if # if_7
}
}
%67:bool = load %x_103_phi
%x_103:bool = let %67
if %x_103 [t: $B16] { # if_8
$B16: { # true
store %x_GLF_color, vec4<f32>(1.0f, 0.0f, 0.0f, 1.0f)
exit_if # if_8
}
}
exit_if # if_6
}
$B14: { # false
store %x_GLF_color, vec4<f32>(0.0f)
exit_if # if_6
}
}
ret
}
}
%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
$B17: {
store %gl_FragCoord, %gl_FragCoord_param
%71:void = call %main_1
%72:vec4<f32> = load %x_GLF_color
%73:main_out = construct %72
%74:bool = load %continue_execution
%75:bool = eq %74, false
if %75 [t: $B18] { # if_9
$B18: { # true
terminate_invocation
}
}
ret %73
}
}
%tint_f32_to_i32 = func(%value:f32):i32 {
$B19: {
%77:i32 = convert %value
%78:bool = gte %value, -2147483648.0f
%79:i32 = select -2147483648i, %77, %78
%80:bool = lte %value, 2147483520.0f
%81:i32 = select 2147483647i, %79, %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. *
********************************************************************