blob: db21ff14e5d2d94314a1f2ba8e41f825194aed01 [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
%11:bool = lt %10, 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
%13:i32 = call %tint_mod_i32, %12, 32i
%15:bool = eq %13, 0i
if %15 [t: $B7, f: $B8] { # if_2
$B7: { # true
%16:f32 = load %result
%17:f32 = add %16, 0.40000000596046447754f
store %result, %17
exit_if # if_2
}
$B8: { # false
%18:f32 = load %thirty_two
%x_138:f32 = let %18
%20:i32 = load %i
%21:f32 = convert %20
%22:f32 = let %21
%23:f32 = round %x_138
%24:f32 = let %23
%25:i32 = load %i
%26:f32 = convert %25
%27:f32 = let %26
%28:f32 = round %x_138
%29:f32 = div %27, %28
%30:f32 = floor %29
%31:f32 = mul %24, %30
%32:f32 = sub %22, %31
%33:bool = lte %32, 0.00999999977648258209f
if %33 [t: $B9] { # if_3
$B9: { # true
%34:f32 = load %result
%35:f32 = add %34, 100.0f
store %result, %35
exit_if # if_3
}
}
exit_if # if_2
}
}
%36:i32 = load %i
%37:f32 = convert %36
%38:f32 = load %limit
%39:bool = gte %37, %38
if %39 [t: $B10] { # if_4
$B10: { # true
%40:f32 = load %result
%x_152:f32 = let %40
ret %x_152
}
}
continue # -> $B4
}
$B4: { # continuing
%42:i32 = load %i
%43:i32 = add %42, 1i
store %i, %43
next_iteration # -> $B3
}
}
%44:f32 = load %result
%x_155:f32 = let %44
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)
%55:ptr<uniform, vec2<f32>, read> = access %x_13, 0u
%56:f32 = load_vector_element %55, 0u
%57:f32 = div %56, 8.0f
%58:f32 = round %57
store %thirty_two_1, %58
%59:f32 = load_vector_element %gl_FragCoord, 0u
store %param, %59
%60:f32 = load %thirty_two_1
store %param_1, %60
%61:f32 = call %compute_value_f1_f1_, %param, %param_1
%x_66:f32 = let %61
store_vector_element %c, 0u, %x_66
%63:f32 = load_vector_element %gl_FragCoord, 1u
store %param_2, %63
%64:f32 = load %thirty_two_1
store %param_3, %64
%65:f32 = call %compute_value_f1_f1_, %param_2, %param_3
%x_71:f32 = let %65
store_vector_element %c, 1u, %x_71
%67:f32 = load_vector_element %c, 0u
%68:f32 = load_vector_element %c, 1u
%69:f32 = add %67, %68
store_vector_element %c, 2u, %69
store %i_1, 0i
loop [b: $B12, c: $B13] { # loop_2
$B12: { # body
%70:i32 = load %i_1
%71:bool = lt %70, 3i
if %71 [t: $B14, f: $B15] { # if_5
$B14: { # true
exit_if # if_5
}
$B15: { # false
exit_loop # loop_2
}
}
%72:i32 = load %i_1
%73:f32 = load_vector_element %c, %72
%74:bool = gte %73, 1.0f
if %74 [t: $B16] { # if_6
$B16: { # true
%75:i32 = load %i_1
%x_92:i32 = let %75
%77:i32 = load %i_1
%78:f32 = load_vector_element %c, %77
%79:i32 = load %i_1
%80:f32 = load_vector_element %c, %79
%81:f32 = mul %78, %80
store_vector_element %c, %x_92, %81
exit_if # if_6
}
}
continue # -> $B13
}
$B13: { # continuing
%82:i32 = load %i_1
%83:i32 = add %82, 1i
store %i_1, %83
next_iteration # -> $B12
}
}
%84:ptr<uniform, vec2<f32>, read> = access %x_20, 0u
%85:f32 = load_vector_element %84, 0u
%86:ptr<uniform, vec2<f32>, read> = access %x_20, 0u
%87:f32 = load_vector_element %86, 1u
%88:bool = lt %85, %87
if %88 [t: $B17, f: $B18] { # if_7
$B17: { # true
%89:vec3<f32> = load %c
%90:vec3<f32> = abs %89
store %x_58, %90
exit_if # if_7
}
$B18: { # false
%91:vec3<f32> = load %c
store %x_58, %91
exit_if # if_7
}
}
%92:vec3<f32> = load %x_58
%93:vec3<f32> = normalize %92
%x_115:vec3<f32> = let %93
%95:f32 = access %x_115, 0u
%96:f32 = access %x_115, 1u
%97:f32 = access %x_115, 2u
%98:vec4<f32> = construct %95, %96, %97, 1.0f
store %x_GLF_color, %98
ret
}
}
%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
$B19: {
store %gl_FragCoord, %gl_FragCoord_param
%101:void = call %main_1
%102:vec4<f32> = load %x_GLF_color
%103:main_out = construct %102
ret %103
}
}
%tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 {
$B20: {
%106:bool = eq %rhs, 0i
%107:bool = eq %lhs, -2147483648i
%108:bool = eq %rhs, -1i
%109:bool = and %107, %108
%110:bool = or %106, %109
%111:i32 = select %rhs, 1i, %110
%112:i32 = let %111
%113:i32 = div %lhs, %112
%114:i32 = mul %113, %112
%115:i32 = sub %lhs, %114
ret %115
}
}
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. *
********************************************************************