blob: d8bc1a555677372e55c77beed7d832ae3868b6dc [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_111:i32 = let %9
%11:bool = lt %x_111, 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_114:i32 = let %12
%14:i32 = call %tint_mod_i32, %x_114, 32i
%16:bool = eq %14, 0i
if %16 [t: $B7, f: $B8] { # if_2
$B7: { # true
%17:f32 = load %result
%x_120:f32 = let %17
%19:f32 = add %x_120, 0.40000000596046447754f
store %result, %19
exit_if # if_2
}
$B8: { # false
%20:i32 = load %i
%x_122:i32 = let %20
%22:f32 = load %thirty_two
%x_124:f32 = let %22
%24:f32 = convert %x_122
%25:f32 = let %24
%26:f32 = round %x_124
%27:f32 = let %26
%28:f32 = convert %x_122
%29:f32 = let %28
%30:f32 = round %x_124
%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_130:f32 = let %36
%38:f32 = add %x_130, 100.0f
store %result, %38
exit_if # if_3
}
}
exit_if # if_2
}
}
%39:i32 = load %i
%x_132:i32 = let %39
%41:f32 = load %limit
%x_134:f32 = let %41
%43:f32 = convert %x_132
%44:bool = gte %43, %x_134
if %44 [t: $B10] { # if_4
$B10: { # true
%45:f32 = load %result
%x_138:f32 = let %45
ret %x_138
}
}
continue # -> $B4
}
$B4: { # continuing
%47:i32 = load %i
%x_139:i32 = let %47
%49:i32 = add %x_139, 1i
store %i, %49
next_iteration # -> $B3
}
}
%50:f32 = load %result
%x_141:f32 = let %50
ret %x_141
}
}
%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_56:f32 = let %61
%63:f32 = div %x_56, 8.0f
%64:f32 = round %63
store %thirty_two_1, %64
%65:f32 = load_vector_element %gl_FragCoord, 0u
%x_60:f32 = let %65
store %param, %x_60
%67:f32 = load %thirty_two_1
%x_61:f32 = let %67
store %param_1, %x_61
%69:f32 = call %compute_value_f1_f1_, %param, %param_1
%x_62:f32 = let %69
store_vector_element %c, 0u, %x_62
%71:f32 = load_vector_element %gl_FragCoord, 1u
%x_65:f32 = let %71
store %param_2, %x_65
%73:f32 = load %thirty_two_1
%x_66:f32 = let %73
store %param_3, %x_66
%75:f32 = call %compute_value_f1_f1_, %param_2, %param_3
%x_67:f32 = let %75
store_vector_element %c, 1u, %x_67
%77:f32 = load_vector_element %c, 0u
%x_70:f32 = let %77
%79:f32 = load_vector_element %c, 1u
%x_72:f32 = let %79
%81:f32 = add %x_70, %x_72
store_vector_element %c, 2u, %81
store %i_1, 0i
loop [b: $B12, c: $B13] { # loop_2
$B12: { # body
%82:i32 = load %i_1
%x_79:i32 = let %82
%84:bool = lt %x_79, 3i
if %84 [t: $B14, f: $B15] { # if_5
$B14: { # true
exit_if # if_5
}
$B15: { # false
exit_loop # loop_2
}
}
%85:i32 = load %i_1
%x_82:i32 = let %85
%87:f32 = load_vector_element %c, %x_82
%x_84:f32 = let %87
%89:bool = gte %x_84, 1.0f
if %89 [t: $B16] { # if_6
$B16: { # true
%90:i32 = load %i_1
%x_88:i32 = let %90
%92:i32 = load %i_1
%x_89:i32 = let %92
%94:f32 = load_vector_element %c, %x_89
%x_91:f32 = let %94
%96:i32 = load %i_1
%x_92:i32 = let %96
%98:f32 = load_vector_element %c, %x_92
%x_94:f32 = let %98
%100:f32 = mul %x_91, %x_94
store_vector_element %c, %x_88, %100
exit_if # if_6
}
}
continue # -> $B13
}
$B13: { # continuing
%101:i32 = load %i_1
%x_97:i32 = let %101
%103:i32 = add %x_97, 1i
store %i_1, %103
next_iteration # -> $B12
}
}
%104:vec3<f32> = load %c
%x_99:vec3<f32> = let %104
%106:vec3<f32> = abs %x_99
%107:vec3<f32> = normalize %106
%x_101:vec3<f32> = let %107
%109:f32 = access %x_101, 0u
%110:f32 = access %x_101, 1u
%111:f32 = access %x_101, 2u
%112:vec4<f32> = construct %109, %110, %111, 1.0f
store %x_GLF_color, %112
ret
}
}
%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
$B17: {
store %gl_FragCoord, %gl_FragCoord_param
%115:void = call %main_1
%116:vec4<f32> = load %x_GLF_color
%117:main_out = construct %116
ret %117
}
}
%tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 {
$B18: {
%120:bool = eq %rhs, 0i
%121:bool = eq %lhs, -2147483648i
%122:bool = eq %rhs, -1i
%123:bool = and %121, %122
%124:bool = or %120, %123
%125:i32 = select %rhs, 1i, %124
%126:i32 = let %125
%127:i32 = div %lhs, %126
%128:i32 = mul %127, %126
%129:i32 = sub %lhs, %128
ret %129
}
}
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. *
********************************************************************