blob: 1c92161b3add5284001d2125c4f4f401e72c63cf [file] [log] [blame]
SKIP: FAILED
../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: buf0 = struct @align(8) {
resolution:vec2<f32> @offset(0)
}
buf1 = 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_10:ptr<uniform, buf0, read> = var @binding_point(0, 0)
%gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
%x_16:ptr<uniform, buf1, read> = var @binding_point(0, 1)
%x_GLF_color:ptr<private, vec4<f32>, read_write> = var
%continue_execution:ptr<private, bool, read_write> = var, true
}
%compute_value_f1_f1_ = func(%limit:ptr<function, f32, read_write>, %thirty_two:ptr<function, f32, read_write>):f32 {
$B2: {
%x_104:ptr<function, f32, read_write> = var
%x_104_phi:ptr<function, f32, read_write> = var
%x_107_phi:ptr<function, i32, read_write> = var
store %x_104_phi, -0.5f
store %x_107_phi, 1i
loop [b: $B3, c: $B4] { # loop_1
$B3: { # body
%x_126:ptr<function, f32, read_write> = var
%x_125:ptr<function, f32, read_write> = var
%x_108:ptr<function, i32, read_write> = var
%x_105_phi:ptr<function, f32, read_write> = var
%16:f32 = load %x_104_phi
store %x_104, %16
%17:i32 = load %x_107_phi
%x_107:i32 = let %17
%19:bool = lt %x_107, 800i
if %19 [t: $B5, f: $B6] { # if_1
$B5: { # true
exit_if # if_1
}
$B6: { # false
exit_loop # loop_1
}
}
%x_124:ptr<function, f32, read_write> = var
%x_125_phi:ptr<function, f32, read_write> = var
%22:i32 = call %tint_mod_i32, %x_107, 32i
%24:bool = eq %22, 0i
if %24 [t: $B7, f: $B8] { # if_2
$B7: { # true
%25:f32 = load %x_104
%26:f32 = add %25, 0.40000000596046447754f
store %x_126, %26
%27:f32 = load %x_126
store %x_105_phi, %27
exit_if # if_2
}
$B8: { # false
%28:f32 = load %thirty_two
%x_118:f32 = let %28
%30:f32 = load %x_104
store %x_125_phi, %30
%31:f32 = convert %x_107
%32:f32 = let %31
%33:f32 = round %x_118
%34:f32 = let %33
%35:f32 = convert %x_107
%36:f32 = let %35
%37:f32 = round %x_118
%38:f32 = div %36, %37
%39:f32 = floor %38
%40:f32 = mul %34, %39
%41:f32 = sub %32, %40
%42:bool = lte %41, 0.00999999977648258209f
if %42 [t: $B9] { # if_3
$B9: { # true
%43:f32 = load %x_104
%44:f32 = add %43, 100.0f
store %x_124, %44
%45:f32 = load %x_124
store %x_125_phi, %45
exit_if # if_3
}
}
%46:f32 = load %x_125_phi
store %x_125, %46
%47:f32 = load %x_125
store %x_105_phi, %47
exit_if # if_2
}
}
%x_105:ptr<function, f32, read_write> = var
%49:f32 = load %x_105_phi
store %x_105, %49
%50:f32 = load %limit
%x_128:f32 = let %50
%52:f32 = convert %x_107
%53:bool = gte %52, %x_128
if %53 [t: $B10] { # if_4
$B10: { # true
%54:f32 = load %x_105
ret %54
}
}
continue # -> $B4
}
$B4: { # continuing
%55:i32 = add %x_107, 1i
store %x_108, %55
%56:f32 = load %x_105
store %x_104_phi, %56
%57:i32 = load %x_108
store %x_107_phi, %57
next_iteration # -> $B3
}
}
%58:f32 = load %x_104
ret %58
}
}
%main_1 = func():void {
$B11: {
%c:ptr<function, vec3<f32>, read_write> = var
%param:ptr<function, f32, read_write> = var
%param_1:ptr<function, f32, read_write> = var
%param_2:ptr<function, f32, read_write> = var
%param_3:ptr<function, f32, read_write> = var
%x_54:ptr<function, vec3<f32>, read_write> = var
%x_74_phi:ptr<function, i32, read_write> = var
store %c, vec3<f32>(7.0f, 8.0f, 9.0f)
%67:ptr<uniform, vec2<f32>, read> = access %x_10, 0u
%68:f32 = load_vector_element %67, 0u
%x_56:f32 = let %68
%70:f32 = mul %x_56, 0.125f
%71:f32 = round %70
%x_58:f32 = let %71
%73:f32 = load_vector_element %gl_FragCoord, 0u
%x_60:f32 = let %73
store %param, %x_60
store %param_1, %x_58
%75:f32 = call %compute_value_f1_f1_, %param, %param_1
%x_61:f32 = let %75
store_vector_element %c, 0u, %x_61
%77:f32 = load_vector_element %gl_FragCoord, 1u
%x_64:f32 = let %77
store %param_2, %x_64
store %param_3, %x_58
%79:f32 = call %compute_value_f1_f1_, %param_2, %param_3
%x_65:f32 = let %79
store_vector_element %c, 1u, %x_65
%81:f32 = load_vector_element %c, 0u
%x_67:f32 = let %81
%83:vec3<f32> = load %c
%x_68:vec3<f32> = let %83
store %x_54, %x_68
%85:f32 = load_vector_element %x_54, 1u
%x_70:f32 = let %85
%87:f32 = add %x_67, %x_70
store_vector_element %c, 2u, %87
store %x_74_phi, 0i
loop [b: $B12, c: $B13] { # loop_2
$B12: { # body
%x_75:ptr<function, i32, read_write> = var
%89:i32 = load %x_74_phi
%x_74:i32 = let %89
%91:bool = lt %x_74, 3i
if %91 [t: $B14, f: $B15] { # if_5
$B14: { # true
exit_if # if_5
}
$B15: { # false
exit_loop # loop_2
}
}
%92:f32 = load_vector_element %c, %x_74
%x_81:f32 = let %92
%94:bool = gte %x_81, 1.0f
if %94 [t: $B16] { # if_6
$B16: { # true
%95:ptr<uniform, vec2<f32>, read> = access %x_16, 0u
%96:f32 = load_vector_element %95, 0u
%x_86:f32 = let %96
%98:ptr<uniform, vec2<f32>, read> = access %x_16, 0u
%99:f32 = load_vector_element %98, 1u
%x_88:f32 = let %99
%101:bool = gt %x_86, %x_88
if %101 [t: $B17] { # if_7
$B17: { # true
store %continue_execution, false
exit_if # if_7
}
}
%102:f32 = load_vector_element %c, %x_74
%x_92:f32 = let %102
%104:f32 = load_vector_element %c, %x_74
%x_93:f32 = let %104
%106:f32 = mul %x_92, %x_93
store_vector_element %c, %x_74, %106
exit_if # if_6
}
}
continue # -> $B13
}
$B13: { # continuing
%107:i32 = add %x_74, 1i
store %x_75, %107
%108:i32 = load %x_75
store %x_74_phi, %108
next_iteration # -> $B12
}
}
%109:vec3<f32> = load %c
%x_95:vec3<f32> = let %109
%111:vec3<f32> = abs %x_95
%112:vec3<f32> = normalize %111
%x_97:vec3<f32> = let %112
%114:f32 = access %x_97, 0u
%115:f32 = access %x_97, 1u
%116:f32 = access %x_97, 2u
%117:vec4<f32> = construct %114, %115, %116, 1.0f
store %x_GLF_color, %117
ret
}
}
%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
$B18: {
store %gl_FragCoord, %gl_FragCoord_param
%120:void = call %main_1
%121:vec4<f32> = load %x_GLF_color
%122:main_out = construct %121
%123:bool = load %continue_execution
%124:bool = eq %123, false
if %124 [t: $B19] { # if_8
$B19: { # true
terminate_invocation
}
}
ret %122
}
}
%tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 {
$B20: {
%127:bool = eq %rhs, 0i
%128:bool = eq %lhs, -2147483648i
%129:bool = eq %rhs, -1i
%130:bool = and %128, %129
%131:bool = or %127, %130
%132:i32 = select %rhs, 1i, %131
%133:i32 = let %132
%134:i32 = div %lhs, %133
%135:i32 = mul %134, %133
%136:i32 = sub %lhs, %135
ret %136
}
}
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. *
********************************************************************