blob: 35c6b0ef6fae798b9f8525abe0718782bbbbcdbb [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_9:ptr<uniform, buf1, read> = var @binding_point(0, 1)
%x_13:ptr<uniform, buf0, read> = var @binding_point(0, 0)
%x_GLF_color:ptr<private, vec4<f32>, read_write> = var
}
%checkSwap_f1_f1_ = func(%a:ptr<function, f32, read_write>, %b:ptr<function, f32, read_write>):bool {
$B2: {
%x_147:ptr<function, bool, read_write> = var
%x_158:ptr<function, f32, read_write> = var
%x_159:ptr<function, f32, read_write> = var
%x_160:ptr<function, f32, read_write> = var
%x_179:ptr<function, f32, read_write> = var
%x_178:ptr<function, f32, read_write> = var
%x_180:ptr<function, f32, read_write> = var
%x_185:ptr<function, f32, read_write> = var
%x_184:ptr<function, f32, read_write> = var
%x_186:ptr<function, f32, read_write> = var
%18:f32 = load_vector_element %gl_FragCoord, 1u
%19:ptr<uniform, vec2<f32>, read> = access %x_9, 0u
%20:f32 = load_vector_element %19, 1u
%21:f32 = div %20, 2.0f
%22:bool = lt %18, %21
%x_153:bool = let %22
if %x_153 [t: $B3, f: $B4] { # if_1
$B3: { # true
%24:f32 = load %a
store %x_158, %24
%25:f32 = load %x_158
store %x_160, %25
exit_if # if_1
}
$B4: { # false
store %x_159, 0.0f
%26:f32 = load %x_159
store %x_160, %26
exit_if # if_1
}
}
%x_166:ptr<function, f32, read_write> = var
%x_167:ptr<function, f32, read_write> = var
%x_168:ptr<function, f32, read_write> = var
%guard155:ptr<function, bool, read_write> = var, true
if false [t: $B5, f: $B6] { # if_2
$B5: { # true
exit_if # if_2
}
$B6: { # false
%31:bool = load %guard155
if %31 [t: $B7] { # if_3
$B7: { # true
if %x_153 [t: $B8, f: $B9] { # if_4
$B8: { # true
%32:f32 = load %b
store %x_166, %32
%33:f32 = load %x_166
store %x_168, %33
exit_if # if_4
}
$B9: { # false
store %x_167, 0.0f
%34:f32 = load %x_167
store %x_168, %34
exit_if # if_4
}
}
%35:f32 = load %x_160
%36:f32 = load %x_168
%37:bool = gt %35, %36
%x_169:bool = let %37
if %x_153 [t: $B10] { # if_5
$B10: { # true
store %x_147, %x_169
exit_if # if_5
}
}
if true [t: $B11, f: $B12] { # if_6
$B11: { # true
exit_if # if_6
}
$B12: { # false
store %guard155, false
exit_if # if_6
}
}
%39:bool = load %guard155
if %39 [t: $B13] { # if_7
$B13: { # true
store %guard155, false
exit_if # if_7
}
}
exit_if # if_3
}
}
exit_if # if_2
}
}
if %x_153 [t: $B14, f: $B15] { # if_8
$B14: { # true
store %x_179, 0.0f
%40:f32 = load %x_179
store %x_180, %40
exit_if # if_8
}
$B15: { # false
%41:f32 = load %a
store %x_178, %41
%42:f32 = load %x_178
store %x_180, %42
exit_if # if_8
}
}
if %x_153 [t: $B16, f: $B17] { # if_9
$B16: { # true
store %x_185, 0.0f
%43:f32 = load %x_185
store %x_186, %43
exit_if # if_9
}
$B17: { # false
%44:f32 = load %b
store %x_184, %44
%45:f32 = load %x_184
store %x_186, %45
exit_if # if_9
}
}
if %x_153 [t: $B18, f: $B19] { # if_10
$B18: { # true
exit_if # if_10
}
$B19: { # false
%46:f32 = load %x_180
%47:f32 = load %x_186
%48:bool = lt %46, %47
store %x_147, %48
exit_if # if_10
}
}
%49:bool = load %x_147
%x_191:bool = let %49
ret %x_191
}
}
%main_1 = func():void {
$B20: {
%i:ptr<function, i32, read_write> = var
%data:ptr<function, array<f32, 10>, read_write> = var
%i_1:ptr<function, i32, read_write> = var
%j:ptr<function, i32, read_write> = var
%doSwap:ptr<function, bool, read_write> = var
%param:ptr<function, f32, read_write> = var
%param_1:ptr<function, f32, read_write> = var
%temp:ptr<function, f32, read_write> = var
store %i, 0i
loop [b: $B21, c: $B22] { # loop_1
$B21: { # body
%60:i32 = load %i
%61:bool = lt %60, 10i
if %61 [t: $B23, f: $B24] { # if_11
$B23: { # true
exit_if # if_11
}
$B24: { # false
exit_loop # loop_1
}
}
%62:i32 = load %i
%x_62:i32 = let %62
%64:ptr<function, f32, read_write> = access %data, %x_62
%65:i32 = load %i
%66:i32 = sub 10i, %65
%67:f32 = convert %66
%68:ptr<uniform, vec2<f32>, read> = access %x_13, 0u
%69:f32 = load_vector_element %68, 1u
%70:f32 = mul %67, %69
store %64, %70
continue # -> $B22
}
$B22: { # continuing
%71:i32 = load %i
%72:i32 = add %71, 1i
store %i, %72
next_iteration # -> $B21
}
}
store %i_1, 0i
loop [b: $B25, c: $B26] { # loop_2
$B25: { # body
%73:i32 = load %i_1
%74:bool = lt %73, 9i
if %74 [t: $B27, f: $B28] { # if_12
$B27: { # true
exit_if # if_12
}
$B28: { # false
exit_loop # loop_2
}
}
store %j, 0i
loop [b: $B29, c: $B30] { # loop_3
$B29: { # body
%75:i32 = load %j
%76:bool = lt %75, 10i
if %76 [t: $B31, f: $B32] { # if_13
$B31: { # true
exit_if # if_13
}
$B32: { # false
exit_loop # loop_3
}
}
%77:i32 = load %j
%78:i32 = load %i_1
%79:i32 = add %78, 1i
%80:bool = lt %77, %79
if %80 [t: $B33] { # if_14
$B33: { # true
continue # -> $B30
}
}
%81:i32 = load %j
%x_93:i32 = let %81
%83:i32 = load %i_1
%84:ptr<function, f32, read_write> = access %data, %83
%85:f32 = load %84
store %param, %85
%86:ptr<function, f32, read_write> = access %data, %x_93
%87:f32 = load %86
store %param_1, %87
%88:bool = call %checkSwap_f1_f1_, %param, %param_1
%x_98:bool = let %88
store %doSwap, %x_98
%90:bool = load %doSwap
if %90 [t: $B34] { # if_15
$B34: { # true
%91:i32 = load %i_1
%92:ptr<function, f32, read_write> = access %data, %91
%93:f32 = load %92
store %temp, %93
%94:i32 = load %i_1
%x_105:i32 = let %94
%96:ptr<function, f32, read_write> = access %data, %x_105
%97:i32 = load %j
%98:ptr<function, f32, read_write> = access %data, %97
%99:f32 = load %98
store %96, %99
%100:i32 = load %j
%x_110:i32 = let %100
%102:ptr<function, f32, read_write> = access %data, %x_110
%103:f32 = load %temp
store %102, %103
exit_if # if_15
}
}
continue # -> $B30
}
$B30: { # continuing
%104:i32 = load %j
%105:i32 = add %104, 1i
store %j, %105
next_iteration # -> $B29
}
}
continue # -> $B26
}
$B26: { # continuing
%106:i32 = load %i_1
%107:i32 = add %106, 1i
store %i_1, %107
next_iteration # -> $B25
}
}
%108:f32 = load_vector_element %gl_FragCoord, 0u
%109:ptr<uniform, vec2<f32>, read> = access %x_9, 0u
%110:f32 = load_vector_element %109, 0u
%111:f32 = div %110, 2.0f
%112:bool = lt %108, %111
if %112 [t: $B35, f: $B36] { # if_16
$B35: { # true
%113:ptr<function, f32, read_write> = access %data, 0i
%114:f32 = load %113
%115:f32 = div %114, 10.0f
%116:ptr<function, f32, read_write> = access %data, 5i
%117:f32 = load %116
%118:f32 = div %117, 10.0f
%119:ptr<function, f32, read_write> = access %data, 9i
%120:f32 = load %119
%121:f32 = div %120, 10.0f
%122:vec4<f32> = construct %115, %118, %121, 1.0f
store %x_GLF_color, %122
exit_if # if_16
}
$B36: { # false
%123:ptr<function, f32, read_write> = access %data, 5i
%124:f32 = load %123
%125:f32 = div %124, 10.0f
%126:ptr<function, f32, read_write> = access %data, 9i
%127:f32 = load %126
%128:f32 = div %127, 10.0f
%129:ptr<function, f32, read_write> = access %data, 0i
%130:f32 = load %129
%131:f32 = div %130, 10.0f
%132:vec4<f32> = construct %125, %128, %131, 1.0f
store %x_GLF_color, %132
exit_if # if_16
}
}
ret
}
}
%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
$B37: {
store %gl_FragCoord, %gl_FragCoord_param
%135:void = call %main_1
%136:vec4<f32> = load %x_GLF_color
%137:main_out = construct %136
ret %137
}
}
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. *
********************************************************************