blob: 6641a996e49fdadebe6aa66c817847926daab440 [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_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
%x_20:ptr<uniform, buf1, read> = var @binding_point(0, 1)
}
%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
%10:i32 = load %i
%x_125:i32 = let %10
%12:bool = lt %x_125, 800i
if %12 [t: $B5, f: $B6] { # if_1
$B5: { # true
exit_if # if_1
}
$B6: { # false
exit_loop # loop_1
}
}
%13:i32 = load %i
%x_128:i32 = let %13
%15:i32 = call %tint_mod_i32, %x_128, 32i
%17:bool = eq %15, 0i
if %17 [t: $B7, f: $B8] { # if_2
$B7: { # true
%18:f32 = load %result
%x_134:f32 = let %18
%20:f32 = add %x_134, 0.40000000596046447754f
store %result, %20
exit_if # if_2
}
$B8: { # false
%21:i32 = load %i
%x_136:i32 = let %21
%23:f32 = load %thirty_two
%x_138:f32 = let %23
%25:f32 = convert %x_136
%26:f32 = let %25
%27:f32 = round %x_138
%28:f32 = let %27
%29:f32 = convert %x_136
%30:f32 = let %29
%31:f32 = round %x_138
%32:f32 = div %30, %31
%33:f32 = floor %32
%34:f32 = mul %28, %33
%35:f32 = sub %26, %34
%36:bool = lte %35, 0.00999999977648258209f
if %36 [t: $B9] { # if_3
$B9: { # true
%37:f32 = load %result
%x_144:f32 = let %37
%39:f32 = add %x_144, 100.0f
store %result, %39
exit_if # if_3
}
}
exit_if # if_2
}
}
%40:i32 = load %i
%x_146:i32 = let %40
%42:f32 = load %limit
%x_148:f32 = let %42
%44:f32 = convert %x_146
%45:bool = gte %44, %x_148
if %45 [t: $B10] { # if_4
$B10: { # true
%46:f32 = load %result
%x_152:f32 = let %46
ret %x_152
}
}
continue # -> $B4
}
$B4: { # continuing
%48:i32 = load %i
%x_153:i32 = let %48
%50:i32 = add %x_153, 1i
store %i, %50
next_iteration # -> $B3
}
}
%51:f32 = load %result
%x_155:f32 = let %51
ret %x_155
}
}
%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
%x_58:ptr<function, vec3<f32>, read_write> = var
store %c, vec3<f32>(7.0f, 8.0f, 9.0f)
%62:ptr<uniform, vec2<f32>, read> = access %x_13, 0u
%63:f32 = load_vector_element %62, 0u
%x_60:f32 = let %63
%65:f32 = div %x_60, 8.0f
%66:f32 = round %65
store %thirty_two_1, %66
%67:f32 = load_vector_element %gl_FragCoord, 0u
%x_64:f32 = let %67
store %param, %x_64
%69:f32 = load %thirty_two_1
%x_65:f32 = let %69
store %param_1, %x_65
%71:f32 = call %compute_value_f1_f1_, %param, %param_1
%x_66:f32 = let %71
store_vector_element %c, 0u, %x_66
%73:f32 = load_vector_element %gl_FragCoord, 1u
%x_69:f32 = let %73
store %param_2, %x_69
%75:f32 = load %thirty_two_1
%x_70:f32 = let %75
store %param_3, %x_70
%77:f32 = call %compute_value_f1_f1_, %param_2, %param_3
%x_71:f32 = let %77
store_vector_element %c, 1u, %x_71
%79:f32 = load_vector_element %c, 0u
%x_74:f32 = let %79
%81:f32 = load_vector_element %c, 1u
%x_76:f32 = let %81
%83:f32 = add %x_74, %x_76
store_vector_element %c, 2u, %83
store %i_1, 0i
loop [b: $B12, c: $B13] { # loop_2
$B12: { # body
%84:i32 = load %i_1
%x_83:i32 = let %84
%86:bool = lt %x_83, 3i
if %86 [t: $B14, f: $B15] { # if_5
$B14: { # true
exit_if # if_5
}
$B15: { # false
exit_loop # loop_2
}
}
%87:i32 = load %i_1
%x_86:i32 = let %87
%89:f32 = load_vector_element %c, %x_86
%x_88:f32 = let %89
%91:bool = gte %x_88, 1.0f
if %91 [t: $B16] { # if_6
$B16: { # true
%92:i32 = load %i_1
%x_92:i32 = let %92
%94:i32 = load %i_1
%x_93:i32 = let %94
%96:f32 = load_vector_element %c, %x_93
%x_95:f32 = let %96
%98:i32 = load %i_1
%x_96:i32 = let %98
%100:f32 = load_vector_element %c, %x_96
%x_98:f32 = let %100
%102:f32 = mul %x_95, %x_98
store_vector_element %c, %x_92, %102
exit_if # if_6
}
}
continue # -> $B13
}
$B13: { # continuing
%103:i32 = load %i_1
%x_101:i32 = let %103
%105:i32 = add %x_101, 1i
store %i_1, %105
next_iteration # -> $B12
}
}
%106:ptr<uniform, vec2<f32>, read> = access %x_20, 0u
%107:f32 = load_vector_element %106, 0u
%x_104:f32 = let %107
%109:ptr<uniform, vec2<f32>, read> = access %x_20, 0u
%110:f32 = load_vector_element %109, 1u
%x_106:f32 = let %110
%112:bool = lt %x_104, %x_106
if %112 [t: $B17, f: $B18] { # if_7
$B17: { # true
%113:vec3<f32> = load %c
%x_111:vec3<f32> = let %113
%115:vec3<f32> = abs %x_111
store %x_58, %115
exit_if # if_7
}
$B18: { # false
%116:vec3<f32> = load %c
%x_113:vec3<f32> = let %116
store %x_58, %x_113
exit_if # if_7
}
}
%118:vec3<f32> = load %x_58
%x_114:vec3<f32> = let %118
%120:vec3<f32> = normalize %x_114
%x_115:vec3<f32> = let %120
%122:f32 = access %x_115, 0u
%123:f32 = access %x_115, 1u
%124:f32 = access %x_115, 2u
%125:vec4<f32> = construct %122, %123, %124, 1.0f
store %x_GLF_color, %125
ret
}
}
%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
$B19: {
store %gl_FragCoord, %gl_FragCoord_param
%128:void = call %main_1
%129:vec4<f32> = load %x_GLF_color
%130:main_out = construct %129
ret %130
}
}
%tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 {
$B20: {
%133:bool = eq %rhs, 0i
%134:bool = eq %lhs, -2147483648i
%135:bool = eq %rhs, -1i
%136:bool = and %134, %135
%137:bool = or %133, %136
%138:i32 = select %rhs, 1i, %137
%139:i32 = let %138
%140:i32 = div %lhs, %139
%141:i32 = mul %140, %139
%142:i32 = sub %lhs, %141
ret %142
}
}
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. *
********************************************************************