blob: 5a407c976876249bc15624c71211dcf287ea7e4c [file] [log] [blame]
SKIP: FAILED
../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: buf1 = struct @align(8) {
resolution:vec2<f32> @offset(0)
}
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_6:ptr<uniform, buf1, read> = var @binding_point(0, 1)
%x_9:ptr<uniform, buf0, read> = var @binding_point(0, 0)
%x_GLF_color:ptr<private, vec4<f32>, read_write> = var
}
%main_1 = func():void {
$B2: {
%data:ptr<function, array<f32, 10>, read_write> = var
%x_41_phi:ptr<function, i32, read_write> = var
%x_53_phi:ptr<function, i32, read_write> = var
store %x_41_phi, 0i
loop [b: $B3, c: $B4] { # loop_1
$B3: { # body
%x_42:ptr<function, i32, read_write> = var
%10:i32 = load %x_41_phi
%x_41:i32 = let %10
%12:bool = lt %x_41, 10i
if %12 [t: $B5, f: $B6] { # if_1
$B5: { # true
exit_if # if_1
}
$B6: { # false
exit_loop # loop_1
}
}
continue # -> $B4
}
$B4: { # continuing
%13:ptr<uniform, vec2<f32>, read> = access %x_9, 0u
%14:f32 = load_vector_element %13, 1u
%x_49:f32 = let %14
%16:ptr<function, f32, read_write> = access %data, %x_41
%17:i32 = sub 10i, %x_41
%18:f32 = convert %17
%19:f32 = mul %18, %x_49
store %16, %19
%20:i32 = add %x_41, 1i
store %x_42, %20
%21:i32 = load %x_42
store %x_41_phi, %21
next_iteration # -> $B3
}
}
store %x_53_phi, 0i
loop [b: $B7, c: $B8] { # loop_2
$B7: { # body
%x_54:ptr<function, i32, read_write> = var
%x_60_phi:ptr<function, i32, read_write> = var
%24:i32 = load %x_53_phi
%x_53:i32 = let %24
%26:bool = lt %x_53, 9i
if %26 [t: $B9, f: $B10] { # if_2
$B9: { # true
exit_if # if_2
}
$B10: { # false
exit_loop # loop_2
}
}
store %x_60_phi, 0i
loop [b: $B11, c: $B12] { # loop_3
$B11: { # body
%x_83:ptr<function, bool, read_write> = var
%x_84:ptr<function, bool, read_write> = var
%x_61:ptr<function, i32, read_write> = var
%x_85_phi:ptr<function, bool, read_write> = var
%31:i32 = load %x_60_phi
%x_60:i32 = let %31
%33:bool = lt %x_60, 10i
if %33 [t: $B13, f: $B14] { # if_3
$B13: { # true
exit_if # if_3
}
$B14: { # false
exit_loop # loop_3
}
}
%34:i32 = add %x_53, 1i
%35:bool = lt %x_60, %34
if %35 [t: $B15] { # if_4
$B15: { # true
continue # -> $B12
}
}
%x_70_save:i32 = let %x_53
%37:ptr<function, f32, read_write> = access %data, %x_70_save
%38:f32 = load %37
%x_71:f32 = let %38
%x_72_save:i32 = let %x_60
%41:ptr<function, f32, read_write> = access %data, %x_72_save
%42:f32 = load %41
%x_73:f32 = let %42
%44:f32 = load_vector_element %gl_FragCoord, 1u
%x_75:f32 = let %44
%46:ptr<uniform, vec2<f32>, read> = access %x_6, 0u
%47:f32 = load_vector_element %46, 1u
%x_77:f32 = let %47
%49:f32 = mul %x_77, 0.5f
%50:bool = lt %x_75, %49
if %50 [t: $B16, f: $B17] { # if_5
$B16: { # true
%51:bool = gt %x_71, %x_73
store %x_83, %51
%52:bool = load %x_83
store %x_85_phi, %52
exit_if # if_5
}
$B17: { # false
%53:bool = lt %x_71, %x_73
store %x_84, %53
%54:bool = load %x_84
store %x_85_phi, %54
exit_if # if_5
}
}
%55:bool = load %x_85_phi
%x_85:bool = let %55
if %x_85 [t: $B18] { # if_6
$B18: { # true
%57:ptr<function, f32, read_write> = access %data, %x_70_save
%58:f32 = load %57
%x_88:f32 = let %58
%60:ptr<function, f32, read_write> = access %data, %x_72_save
%61:f32 = load %60
%x_89:f32 = let %61
%63:ptr<function, f32, read_write> = access %data, %x_70_save
store %63, %x_89
%64:ptr<function, f32, read_write> = access %data, %x_72_save
store %64, %x_88
exit_if # if_6
}
}
continue # -> $B12
}
$B12: { # continuing
%65:i32 = add %x_60, 1i
store %x_61, %65
%66:i32 = load %x_61
store %x_60_phi, %66
next_iteration # -> $B11
}
}
continue # -> $B8
}
$B8: { # continuing
%67:i32 = add %x_53, 1i
store %x_54, %67
%68:i32 = load %x_54
store %x_53_phi, %68
next_iteration # -> $B7
}
}
%69:f32 = load_vector_element %gl_FragCoord, 0u
%x_91:f32 = let %69
%71:ptr<uniform, vec2<f32>, read> = access %x_6, 0u
%72:f32 = load_vector_element %71, 0u
%x_93:f32 = let %72
%74:f32 = mul %x_93, 0.5f
%75:bool = lt %x_91, %74
if %75 [t: $B19, f: $B20] { # if_7
$B19: { # true
%76:ptr<function, f32, read_write> = access %data, 0i
%77:f32 = load %76
%x_100:f32 = let %77
%79:ptr<function, f32, read_write> = access %data, 5i
%80:f32 = load %79
%x_103:f32 = let %80
%82:ptr<function, f32, read_write> = access %data, 9i
%83:f32 = load %82
%x_106:f32 = let %83
%85:f32 = mul %x_100, 0.10000000149011611938f
%86:f32 = mul %x_103, 0.10000000149011611938f
%87:f32 = mul %x_106, 0.10000000149011611938f
%88:vec4<f32> = construct %85, %86, %87, 1.0f
store %x_GLF_color, %88
exit_if # if_7
}
$B20: { # false
%89:ptr<function, f32, read_write> = access %data, 5i
%90:f32 = load %89
%x_110:f32 = let %90
%92:ptr<function, f32, read_write> = access %data, 9i
%93:f32 = load %92
%x_113:f32 = let %93
%95:ptr<function, f32, read_write> = access %data, 0i
%96:f32 = load %95
%x_116:f32 = let %96
%98:f32 = mul %x_110, 0.10000000149011611938f
%99:f32 = mul %x_113, 0.10000000149011611938f
%100:f32 = mul %x_116, 0.10000000149011611938f
%101:vec4<f32> = construct %98, %99, %100, 1.0f
store %x_GLF_color, %101
exit_if # if_7
}
}
ret
}
}
%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
$B21: {
store %gl_FragCoord, %gl_FragCoord_param
%104:void = call %main_1
%105:vec4<f32> = load %x_GLF_color
%106:main_out = construct %105
ret %106
}
}
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. *
********************************************************************