blob: e3753ab125d2da140b8d6fe14dd1377bd1406703 [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
%gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
%x_7:ptr<uniform, buf0, read> = var @binding_point(0, 0)
%x_GLF_color:ptr<private, vec4<f32>, read_write> = var
}
%func_ = func():f32 {
$B2: {
%x:ptr<function, i32, read_write> = var
%6:f32 = load_vector_element %gl_FragCoord, 0u
%7:bool = lt %6, 1.0f
if %7 [t: $B3] { # if_1
$B3: { # true
ret 5.0f
}
}
%8:ptr<uniform, vec2<f32>, read> = access %x_7, 0u
%9:f32 = load_vector_element %8, 0u
%10:ptr<uniform, vec2<f32>, read> = access %x_7, 0u
%11:f32 = load_vector_element %10, 1u
%12:bool = gt %9, %11
if %12 [t: $B4] { # if_2
$B4: { # true
ret 1.0f
}
}
%13:ptr<uniform, vec2<f32>, read> = access %x_7, 0u
%14:f32 = load_vector_element %13, 0u
%15:i32 = call %tint_f32_to_i32, %14
store %x, %15
%17:i32 = load %x
%18:i32 = let %17
%19:ptr<uniform, vec2<f32>, read> = access %x_7, 0u
%20:f32 = load_vector_element %19, 0u
%21:f32 = clamp %20, 0.0f, 1.0f
%22:i32 = call %tint_f32_to_i32, %21
%23:i32 = mul %22, 3i
%24:i32 = add %18, %23
store %x, %24
%25:i32 = load %x
%x_120:i32 = let %25
%27:f32 = convert %x_120
%28:f32 = add 5.0f, %27
ret %28
}
}
%main_1 = func():void {
$B5: {
%i:ptr<function, i32, read_write> = var
%j:ptr<function, i32, read_write> = var
%data:ptr<function, array<vec2<f32>, 17>, read_write> = var
store %i, 0i
loop [b: $B6, c: $B7] { # loop_1
$B6: { # body
%33:i32 = load %i
%34:i32 = let %33
%35:ptr<uniform, vec2<f32>, read> = access %x_7, 0u
%36:f32 = load_vector_element %35, 0u
%37:i32 = call %tint_f32_to_i32, %36
%38:i32 = add 4i, %37
%39:bool = lt %34, %38
if %39 [t: $B8, f: $B9] { # if_3
$B8: { # true
exit_if # if_3
}
$B9: { # false
exit_loop # loop_1
}
}
%40:f32 = load_vector_element %gl_FragCoord, 0u
%41:bool = gte %40, 0.0f
if %41 [t: $B10] { # if_4
$B10: { # true
store %j, 0i
loop [b: $B11, c: $B12] { # loop_2
$B11: { # body
%x_81:ptr<function, bool, read_write> = var
%x_82:ptr<function, bool, read_write> = var
%44:i32 = load %j
%45:bool = lt %44, 4i
if %45 [t: $B13, f: $B14] { # if_5
$B13: { # true
exit_if # if_5
}
$B14: { # false
exit_loop # loop_2
}
}
%46:i32 = load %j
%x_67:i32 = let %46
%48:i32 = load %i
%x_69:i32 = let %48
%50:f32 = call %func_
%x_71:f32 = let %50
%52:i32 = mul 4i, %x_67
%53:i32 = add %52, %x_69
%54:ptr<function, vec2<f32>, read_write> = access %data, %53
store_vector_element %54, 0u, %x_71
%55:ptr<function, vec2<f32>, read_write> = access %data, 0i
%56:f32 = load_vector_element %55, 0u
%57:bool = eq %56, 5.0f
%x_75:bool = let %57
store %x_82, %x_75
%59:bool = eq %x_75, false
if %59 [t: $B15] { # if_6
$B15: { # true
%60:ptr<function, vec2<f32>, read_write> = access %data, 15i
%61:f32 = load_vector_element %60, 0u
%62:bool = eq %61, 5.0f
store %x_81, %62
%63:bool = load %x_81
store %x_82, %63
exit_if # if_6
}
}
%64:bool = load %x_82
if %64 [t: $B16, f: $B17] { # if_7
$B16: { # true
store %x_GLF_color, vec4<f32>(1.0f, 0.0f, 0.0f, 1.0f)
exit_if # if_7
}
$B17: { # false
store %x_GLF_color, vec4<f32>(0.0f)
exit_if # if_7
}
}
%65:ptr<uniform, vec2<f32>, read> = access %x_7, 0u
%66:f32 = load_vector_element %65, 0u
%67:ptr<uniform, vec2<f32>, read> = access %x_7, 0u
%68:f32 = load_vector_element %67, 1u
%69:bool = gt %66, %68
if %69 [t: $B18] { # if_8
$B18: { # true
ret
}
}
continue # -> $B12
}
$B12: { # continuing
%70:i32 = load %j
%71:i32 = add %70, 1i
store %j, %71
next_iteration # -> $B11
}
}
exit_if # if_4
}
}
continue # -> $B7
}
$B7: { # continuing
%72:i32 = load %i
%73:i32 = add %72, 1i
store %i, %73
next_iteration # -> $B6
}
}
ret
}
}
%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
$B19: {
store %gl_FragCoord, %gl_FragCoord_param
%76:void = call %main_1
%77:vec4<f32> = load %x_GLF_color
%78:main_out = construct %77
ret %78
}
}
%tint_f32_to_i32 = func(%value:f32):i32 {
$B20: {
%80:i32 = convert %value
%81:bool = gte %value, -2147483648.0f
%82:i32 = select -2147483648i, %80, %81
%83:bool = lte %value, 2147483520.0f
%84:i32 = select 2147483647i, %82, %83
ret %84
}
}
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. *
********************************************************************