blob: 9bad63a3a823a04b3e0f9dda3471931645d24fed [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_6:ptr<uniform, buf0, read> = var @binding_point(0, 0)
%x_GLF_color:ptr<private, vec4<f32>, read_write> = var
}
%main_1 = func():void {
$B2: {
loop [b: $B3] { # loop_1
$B3: { # body
%x_45:ptr<function, bool, read_write> = var
%x_48:ptr<function, i32, read_write> = var
%x_50:ptr<function, i32, read_write> = var
%x_52:ptr<function, i32, read_write> = var
%x_49:ptr<function, i32, read_write> = var
%x_46:ptr<function, bool, read_write> = var
%x_111:ptr<function, i32, read_write> = var
%x_112:ptr<function, bool, read_write> = var
%x_115:ptr<function, i32, read_write> = var
%x_118:ptr<function, i32, read_write> = var
%x_120:ptr<function, i32, read_write> = var
%x_116:ptr<function, i32, read_write> = var
%x_161:ptr<function, i32, read_write> = var
%18:ptr<uniform, vec2<f32>, read> = access %x_6, 0u
%19:f32 = load_vector_element %18, 0u
%x_40:f32 = let %19
%21:bool = lt %x_40, -1.0f
%x_41:bool = let %21
store %x_45, false
store %x_48, 0i
store %x_50, 0i
store %x_52, 0i
loop [b: $B4, c: $B5] { # loop_2
$B4: { # body
%x_62:ptr<function, i32, read_write> = var
%x_65:ptr<function, i32, read_write> = var
%x_67:ptr<function, i32, read_write> = var
%x_66:ptr<function, i32, read_write> = var
%x_63:ptr<function, i32, read_write> = var
%x_51:ptr<function, i32, read_write> = var
%x_53:ptr<function, i32, read_write> = var
%30:f32 = load_vector_element %gl_FragCoord, 1u
%x_55:f32 = let %30
%32:i32 = load %x_48
store %x_111, %32
%33:bool = load %x_45
store %x_112, %33
%34:i32 = load %x_52
%35:i32 = let %34
%36:bool = gt %x_55, -1.0f
%37:i32 = select 100i, 10i, %36
%38:bool = lt %35, %37
if %38 [t: $B6, f: $B7] { # if_1
$B6: { # true
exit_if # if_1
}
$B7: { # false
exit_loop # loop_2
}
}
%39:i32 = load %x_48
store %x_62, %39
%40:i32 = load %x_50
store %x_65, %40
store %x_67, 0i
loop [b: $B8, c: $B9] { # loop_3
$B8: { # body
%x_97:ptr<function, i32, read_write> = var
%x_68:ptr<function, i32, read_write> = var
%43:i32 = load %x_65
store %x_51, %43
%44:i32 = load %x_62
store %x_49, %44
%45:bool = load %x_45
store %x_46, %45
%46:i32 = load %x_67
%47:bool = lt %46, 2i
if %47 [t: $B10, f: $B11] { # if_2
$B10: { # true
exit_if # if_2
}
$B11: { # false
exit_loop # loop_3
}
}
loop [b: $B12] { # loop_4
$B12: { # body
%x_78:ptr<function, bool, read_write> = var
%x_86:ptr<function, i32, read_write> = var
%x_98:ptr<function, bool, read_write> = var
%51:f32 = load_vector_element %gl_FragCoord, 0u
%52:bool = lt %51, -1.0f
store %x_78, %52
%53:bool = lt %x_40, 0.0f
%54:bool = eq %53, false
if %54 [t: $B13] { # if_3
$B13: { # true
%55:bool = load %x_78
if %55 [t: $B14] { # if_4
$B14: { # true
store %x_66, 0i
exit_loop # loop_4
}
}
store %x_86, 1i
loop [b: $B15, c: $B16] { # loop_5
$B15: { # body
%x_87:ptr<function, i32, read_write> = var
%57:i32 = load %x_65
store %x_97, %57
store %x_98, false
%58:i32 = load %x_86
%59:bool = lt %58, 3i
if %59 [t: $B17, f: $B18] { # if_5
$B17: { # true
exit_if # if_5
}
$B18: { # false
exit_loop # loop_5
}
}
%60:bool = load %x_78
if %60 [t: $B19] { # if_6
$B19: { # true
continue # -> $B16
}
}
%61:i32 = load %x_86
%62:bool = gt %61, 0i
if %62 [t: $B20] { # if_7
$B20: { # true
store %x_97, 1i
store %x_98, true
exit_loop # loop_5
}
}
continue # -> $B16
}
$B16: { # continuing
%63:i32 = load %x_86
%64:i32 = add %63, 1i
store %x_87, %64
%65:i32 = load %x_87
store %x_86, %65
next_iteration # -> $B15
}
}
%66:i32 = load %x_97
store %x_66, %66
%67:bool = load %x_98
if %67 [t: $B21] { # if_8
$B21: { # true
exit_loop # loop_4
}
}
exit_if # if_3
}
}
store %x_66, 0i
exit_loop # loop_4
}
}
%68:i32 = load %x_62
%69:i32 = load %x_66
%70:i32 = add %68, %69
store %x_63, %70
if %x_41 [t: $B22] { # if_9
$B22: { # true
loop [b: $B23, c: $B24] { # loop_6
$B23: { # body
if %x_41 [t: $B25, f: $B26] { # if_10
$B25: { # true
exit_if # if_10
}
$B26: { # false
exit_loop # loop_6
}
}
continue # -> $B24
}
$B24: { # continuing
%71:i32 = load %x_52
%72:f32 = convert %71
%73:vec4<f32> = construct %72
store %x_GLF_color, %73
next_iteration # -> $B23
}
}
%74:i32 = load %x_66
store %x_51, %74
%75:i32 = load %x_63
store %x_49, %75
store %x_46, true
exit_loop # loop_3
}
}
continue # -> $B9
}
$B9: { # continuing
%76:i32 = load %x_67
%77:i32 = add %76, 1i
store %x_68, %77
%78:i32 = load %x_63
store %x_62, %78
%79:i32 = load %x_66
store %x_65, %79
%80:i32 = load %x_68
store %x_67, %80
next_iteration # -> $B8
}
}
%81:i32 = load %x_49
store %x_111, %81
%82:bool = load %x_46
store %x_112, %82
%83:bool = load %x_46
if %83 [t: $B27] { # if_11
$B27: { # true
exit_loop # loop_2
}
}
%84:bool = eq %x_41, false
if %84 [t: $B28] { # if_12
$B28: { # true
%85:i32 = load %x_49
store %x_111, %85
%86:bool = load %x_46
store %x_112, %86
exit_loop # loop_2
}
}
continue # -> $B5
}
$B5: { # continuing
%87:i32 = load %x_52
%88:i32 = add %87, 1i
store %x_53, %88
%89:bool = load %x_46
store %x_45, %89
%90:i32 = load %x_49
store %x_48, %90
%91:i32 = load %x_51
store %x_50, %91
%92:i32 = load %x_53
store %x_52, %92
next_iteration # -> $B4
}
}
%93:bool = load %x_112
if %93 [t: $B29] { # if_13
$B29: { # true
exit_loop # loop_1
}
}
%94:i32 = load %x_111
store %x_115, %94
store %x_118, 0i
store %x_120, 0i
loop [b: $B30, c: $B31] { # loop_7
$B30: { # body
%x_154:ptr<function, i32, read_write> = var
%x_119:ptr<function, i32, read_write> = var
%x_121:ptr<function, i32, read_write> = var
%98:ptr<uniform, vec2<f32>, read> = access %x_6, 0u
%99:f32 = load_vector_element %98, 1u
%x_123:f32 = let %99
%101:i32 = load %x_115
store %x_161, %101
%102:i32 = load %x_120
%103:i32 = let %102
%104:f32 = add %x_123, 1.0f
%105:i32 = call %tint_f32_to_i32, %104
%107:bool = lt %103, %105
if %107 [t: $B32, f: $B33] { # if_14
$B32: { # true
exit_if # if_14
}
$B33: { # false
exit_loop # loop_7
}
}
loop [b: $B34] { # loop_8
$B34: { # body
%x_135:ptr<function, bool, read_write> = var
%x_143:ptr<function, i32, read_write> = var
%x_155:ptr<function, bool, read_write> = var
%111:f32 = load_vector_element %gl_FragCoord, 0u
%112:bool = lt %111, -1.0f
store %x_135, %112
%113:bool = lt %x_40, 0.0f
%114:bool = eq %113, false
if %114 [t: $B35] { # if_15
$B35: { # true
%115:bool = load %x_135
if %115 [t: $B36] { # if_16
$B36: { # true
store %x_119, 0i
exit_loop # loop_8
}
}
store %x_143, 1i
loop [b: $B37, c: $B38] { # loop_9
$B37: { # body
%x_144:ptr<function, i32, read_write> = var
%117:i32 = load %x_118
store %x_154, %117
store %x_155, false
%118:i32 = load %x_143
%119:bool = lt %118, 3i
if %119 [t: $B39, f: $B40] { # if_17
$B39: { # true
exit_if # if_17
}
$B40: { # false
exit_loop # loop_9
}
}
%120:bool = load %x_135
if %120 [t: $B41] { # if_18
$B41: { # true
continue # -> $B38
}
}
%121:i32 = load %x_143
%122:bool = gt %121, 0i
if %122 [t: $B42] { # if_19
$B42: { # true
store %x_154, 1i
store %x_155, true
exit_loop # loop_9
}
}
continue # -> $B38
}
$B38: { # continuing
%123:i32 = load %x_143
%124:i32 = add %123, 1i
store %x_144, %124
%125:i32 = load %x_144
store %x_143, %125
next_iteration # -> $B37
}
}
%126:i32 = load %x_154
store %x_119, %126
%127:bool = load %x_155
if %127 [t: $B43] { # if_20
$B43: { # true
exit_loop # loop_8
}
}
exit_if # if_15
}
}
store %x_119, 0i
exit_loop # loop_8
}
}
%128:i32 = load %x_115
%129:i32 = load %x_119
%130:i32 = add %128, %129
store %x_116, %130
%131:bool = eq %x_41, false
%132:bool = select %x_41, false, %131
if %132 [t: $B44] { # if_21
$B44: { # true
%133:i32 = load %x_116
store %x_161, %133
exit_loop # loop_7
}
}
continue # -> $B31
}
$B31: { # continuing
%134:i32 = load %x_120
%135:i32 = add %134, 1i
store %x_121, %135
%136:i32 = load %x_116
store %x_115, %136
%137:i32 = load %x_119
store %x_118, %137
%138:i32 = load %x_121
store %x_120, %138
next_iteration # -> $B30
}
}
%139:i32 = load %x_161
%140:bool = eq %139, 4i
if %140 [t: $B45, f: $B46] { # if_22
$B45: { # true
store %x_GLF_color, vec4<f32>(1.0f, 0.0f, 0.0f, 1.0f)
exit_if # if_22
}
$B46: { # false
store %x_GLF_color, vec4<f32>(0.0f)
exit_if # if_22
}
}
exit_loop # loop_1
}
}
ret
}
}
%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
$B47: {
store %gl_FragCoord, %gl_FragCoord_param
%143:void = call %main_1
%144:vec4<f32> = load %x_GLF_color
%145:main_out = construct %144
ret %145
}
}
%tint_f32_to_i32 = func(%value:f32):i32 {
$B48: {
%147:i32 = convert %value
%148:bool = gte %value, -2147483648.0f
%149:i32 = select -2147483648i, %147, %148
%150:bool = lte %value, 2147483520.0f
%151:i32 = select 2147483647i, %149, %150
ret %151
}
}
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. *
********************************************************************