blob: 746b0806af1cda6bd156e330386d3bb56b628b4f [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
%14:i32 = call %tint_f32_to_i32, %13
store %one, %14
loop [b: $B3, c: $B4] { # loop_1
$B3: { # body
store %i, 0i
loop [b: $B5, c: $B6] { # loop_2
$B5: { # body
%16:i32 = load %i
%17:i32 = load %one
%18:bool = lt %16, %17
if %18 [t: $B7, f: $B8] { # if_1
$B7: { # true
exit_if # if_1
}
$B8: { # false
exit_loop # loop_2
}
}
%19:i32 = load %i
%20:bool = eq %19, 0i
if %20 [t: $B9] { # if_2
$B9: { # true
%21:ptr<uniform, vec2<f32>, read> = access %x_9, 0u
%22:f32 = load_vector_element %21, 0u
%23:ptr<uniform, vec2<f32>, read> = access %x_9, 0u
%24:f32 = load_vector_element %23, 1u
%25:bool = gt %22, %24
store %alwaysFalse, %25
%26:bool = load %alwaysFalse
%27:bool = eq %26, false
if %27 [t: $B10] { # if_3
$B10: { # true
%28:i32 = load %one
%x_73:i32 = let %28
%30:ptr<function, f32, read_write> = access %floats, %x_73
store %30, 1.0f
store %x_GLF_color, vec4<f32>(1.0f, 1.0f, 0.0f, 1.0f)
exit_if # if_3
}
}
%31:i32 = load %one
%x_75:i32 = let %31
store_vector_element %v, %x_75, 1.0f
%33:bool = load %alwaysFalse
if %33 [t: $B11] { # if_4
$B11: { # true
store %continue_execution, false
exit_if # if_4
}
}
%34:ptr<uniform, vec2<f32>, read> = access %x_9, 0u
%35:f32 = load_vector_element %34, 1u
%36:bool = lt %35, 0.0f
if %36 [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
%37:i32 = load %i
%38:i32 = add %37, 1i
store %i, %38
next_iteration # -> $B5
}
}
continue # -> $B4
}
$B4: { # continuing
%39:i32 = load %one
%x_87:i32 = let %39
%41:bool = lt %x_87, 0i
%42:bool = eq %41, false
break_if %42 # -> [t: exit_loop loop_1, f: $B3]
}
}
%x_102:ptr<function, bool, read_write> = var
%x_103:ptr<function, bool, read_write> = var
%45:f32 = load_vector_element %gl_FragCoord, 1u
%46:bool = gte %45, 0.0f
if %46 [t: $B13, f: $B14] { # if_6
$B13: { # true
%47:f32 = load_vector_element %v, 1u
%48:bool = eq %47, 1.0f
%x_97:bool = let %48
store %x_103, %x_97
if %x_97 [t: $B15] { # if_7
$B15: { # true
%50:ptr<function, f32, read_write> = access %floats, 1i
%51:f32 = load %50
%52:bool = eq %51, 1.0f
store %x_102, %52
%53:bool = load %x_102
store %x_103, %53
exit_if # if_7
}
}
%54:bool = load %x_103
if %54 [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
%57:void = call %main_1
%58:vec4<f32> = load %x_GLF_color
%59:main_out = construct %58
%60:bool = load %continue_execution
%61:bool = eq %60, false
if %61 [t: $B18] { # if_9
$B18: { # true
terminate_invocation
}
}
ret %59
}
}
%tint_f32_to_i32 = func(%value:f32):i32 {
$B19: {
%63:i32 = convert %value
%64:bool = gte %value, -2147483648.0f
%65:i32 = select -2147483648i, %63, %64
%66:bool = lte %value, 2147483520.0f
%67:i32 = select 2147483647i, %65, %66
ret %67
}
}
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. *
********************************************************************