blob: e193c6b71319579cd33cb0b0541ceb310a67d6a2 [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)
}
main_out = struct @align(16) {
x_GLF_color_1:vec4<f32> @offset(0), @location(0)
}
$B1: { # root
%x_13:ptr<uniform, buf0, read> = var @binding_point(0, 0)
%gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
%x_GLF_color:ptr<private, vec4<f32>, read_write> = var
}
%compute_value_f1_f1_ = func(%limit:ptr<function, f32, read_write>, %thirty_two:ptr<function, f32, read_write>):f32 {
$B2: {
%result:ptr<function, f32, read_write> = var
%i:ptr<function, i32, read_write> = var
store %result, -0.5f
store %i, 1i
loop [b: $B3, c: $B4] { # loop_1
$B3: { # body
%9:i32 = load %i
%x_136:i32 = let %9
%11:bool = lt %x_136, 800i
if %11 [t: $B5, f: $B6] { # if_1
$B5: { # true
exit_if # if_1
}
$B6: { # false
exit_loop # loop_1
}
}
%12:i32 = load %i
%x_139:i32 = let %12
%14:i32 = call %tint_mod_i32, %x_139, 32i
%16:bool = eq %14, 0i
if %16 [t: $B7, f: $B8] { # if_2
$B7: { # true
%17:f32 = load %result
%x_145:f32 = let %17
%19:f32 = add %x_145, 0.40000000596046447754f
store %result, %19
exit_if # if_2
}
$B8: { # false
%20:i32 = load %i
%x_147:i32 = let %20
%22:f32 = load %thirty_two
%x_149:f32 = let %22
%24:f32 = convert %x_147
%25:f32 = let %24
%26:f32 = round %x_149
%27:f32 = let %26
%28:f32 = convert %x_147
%29:f32 = let %28
%30:f32 = round %x_149
%31:f32 = div %29, %30
%32:f32 = floor %31
%33:f32 = mul %27, %32
%34:f32 = sub %25, %33
%35:bool = lte %34, 0.00999999977648258209f
if %35 [t: $B9] { # if_3
$B9: { # true
%36:f32 = load %result
%x_155:f32 = let %36
%38:f32 = add %x_155, 100.0f
store %result, %38
exit_if # if_3
}
}
exit_if # if_2
}
}
%39:i32 = load %i
%x_157:i32 = let %39
%41:f32 = load %limit
%x_159:f32 = let %41
%43:f32 = convert %x_157
%44:bool = gte %43, %x_159
if %44 [t: $B10] { # if_4
$B10: { # true
%45:f32 = load %result
%x_163:f32 = let %45
ret %x_163
}
}
continue # -> $B4
}
$B4: { # continuing
%47:i32 = load %i
%x_164:i32 = let %47
%49:i32 = add %x_164, 1i
store %i, %49
next_iteration # -> $B3
}
}
%50:f32 = load %result
%x_166:f32 = let %50
ret %x_166
}
}
%main_1 = func():void {
$B11: {
%c:ptr<function, vec3<f32>, read_write> = var
%thirty_two_1:ptr<function, 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
%i_1:ptr<function, i32, read_write> = var
store %c, vec3<f32>(7.0f, 8.0f, 9.0f)
%60:ptr<uniform, vec2<f32>, read> = access %x_13, 0u
%61:f32 = load_vector_element %60, 0u
%x_63:f32 = let %61
%63:f32 = div %x_63, 8.0f
%64:f32 = round %63
store %thirty_two_1, %64
%65:f32 = load_vector_element %gl_FragCoord, 0u
%x_67:f32 = let %65
store %param, %x_67
%67:f32 = load %thirty_two_1
%x_68:f32 = let %67
store %param_1, %x_68
%69:f32 = call %compute_value_f1_f1_, %param, %param_1
%x_69:f32 = let %69
store_vector_element %c, 0u, %x_69
%71:f32 = load_vector_element %gl_FragCoord, 1u
%x_72:f32 = let %71
store %param_2, %x_72
%73:f32 = load %thirty_two_1
%x_73:f32 = let %73
store %param_3, %x_73
%75:f32 = call %compute_value_f1_f1_, %param_2, %param_3
%x_74:f32 = let %75
store_vector_element %c, 1u, %x_74
%77:vec3<f32> = load %c
%x_76:vec3<f32> = let %77
%79:vec3<f32> = load %c
%x_79:vec3<f32> = let %79
%81:f32 = access %x_79, 0u
%82:f32 = access %x_79, 1u
%83:vec2<f32> = construct %81, %82
%84:vec2<f32> = let %83
%85:f32 = access %x_79, 2u
%86:vec2<f32> = construct %85, 1.0f
%87:mat4x2<f32> = construct %84, %86, vec2<f32>(1.0f, 0.0f), vec2<f32>(1.0f, 0.0f)
%x_87:mat4x2<f32> = let %87
%89:vec3<f32> = mul %x_76, mat3x3<f32>(vec3<f32>(1.0f, 0.0f, 0.0f), vec3<f32>(0.0f, 1.0f, 0.0f), vec3<f32>(0.0f, 0.0f, 1.0f))
%90:f32 = access %89, 0u
%91:f32 = access %x_87, 0u, 0u
%92:f32 = access %x_87, 0u, 1u
%93:f32 = access %x_87, 1u, 0u
%94:vec3<f32> = construct %91, %92, %93
%95:f32 = access %94, 1u
%96:f32 = add %90, %95
store_vector_element %c, 2u, %96
store %i_1, 0i
loop [b: $B12, c: $B13] { # loop_2
$B12: { # body
%97:i32 = load %i_1
%x_99:i32 = let %97
%99:bool = lt %x_99, 3i
if %99 [t: $B14, f: $B15] { # if_5
$B14: { # true
exit_if # if_5
}
$B15: { # false
exit_loop # loop_2
}
}
%100:i32 = load %i_1
%x_102:i32 = let %100
%102:f32 = load_vector_element %c, %x_102
%x_104:f32 = let %102
%104:bool = gte %x_104, 1.0f
if %104 [t: $B16] { # if_6
$B16: { # true
%105:i32 = load %i_1
%x_108:i32 = let %105
%107:i32 = load %i_1
%x_109:i32 = let %107
%109:f32 = load_vector_element %c, %x_109
%x_111:f32 = let %109
%111:i32 = load %i_1
%x_112:i32 = let %111
%113:f32 = load_vector_element %c, %x_112
%x_114:f32 = let %113
%115:f32 = mul %x_111, %x_114
store_vector_element %c, %x_108, %115
%116:f32 = load_vector_element %gl_FragCoord, 1u
%x_118:f32 = let %116
%118:bool = lt %x_118, 0.0f
if %118 [t: $B17] { # if_7
$B17: { # true
exit_loop # loop_2
}
}
exit_if # if_6
}
}
continue # -> $B13
}
$B13: { # continuing
%119:i32 = load %i_1
%x_122:i32 = let %119
%121:i32 = add %x_122, 1i
store %i_1, %121
next_iteration # -> $B12
}
}
%122:vec3<f32> = load %c
%x_124:vec3<f32> = let %122
%124:vec3<f32> = abs %x_124
%125:vec3<f32> = normalize %124
%x_126:vec3<f32> = let %125
%127:f32 = access %x_126, 0u
%128:f32 = access %x_126, 1u
%129:f32 = access %x_126, 2u
%130:vec4<f32> = construct %127, %128, %129, 1.0f
store %x_GLF_color, %130
ret
}
}
%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
$B18: {
store %gl_FragCoord, %gl_FragCoord_param
%133:void = call %main_1
%134:vec4<f32> = load %x_GLF_color
%135:main_out = construct %134
ret %135
}
}
%tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 {
$B19: {
%138:bool = eq %rhs, 0i
%139:bool = eq %lhs, -2147483648i
%140:bool = eq %rhs, -1i
%141:bool = and %139, %140
%142:bool = or %138, %141
%143:i32 = select %rhs, 1i, %142
%144:i32 = let %143
%145:i32 = div %lhs, %144
%146:i32 = mul %145, %144
%147:i32 = sub %lhs, %146
ret %147
}
}
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. *
********************************************************************