blob: 8bb64da2c2dd16145c43cc3b4e96bd9e9cf7002e [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_10: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: {
%x_91:ptr<function, f32, read_write> = var
%x_94:ptr<function, i32, read_write> = var
store %x_91, -0.5f
store %x_94, 1i
loop [b: $B3, c: $B4] { # loop_1
$B3: { # body
%x_104:ptr<function, f32, read_write> = var
%x_113:ptr<function, f32, read_write> = var
%x_92:ptr<function, f32, read_write> = var
%x_95:ptr<function, i32, read_write> = var
%13:i32 = load %x_94
%14:bool = lt %13, 800i
if %14 [t: $B5, f: $B6] { # if_1
$B5: { # true
exit_if # if_1
}
$B6: { # false
exit_loop # loop_1
}
}
%x_112:ptr<function, f32, read_write> = var
%16:i32 = load %x_94
%17:i32 = call %tint_mod_i32, %16, 32i
%19:bool = eq %17, 0i
if %19 [t: $B7, f: $B8] { # if_2
$B7: { # true
%20:f32 = load %x_91
%21:f32 = add %20, 0.40000000596046447754f
store %x_104, %21
%22:f32 = load %x_104
store %x_92, %22
exit_if # if_2
}
$B8: { # false
%23:f32 = load %thirty_two
%x_106:f32 = let %23
%25:f32 = load %x_91
store %x_113, %25
%26:i32 = load %x_94
%27:f32 = convert %26
%28:f32 = let %27
%29:f32 = round %x_106
%30:f32 = let %29
%31:i32 = load %x_94
%32:f32 = convert %31
%33:f32 = let %32
%34:f32 = round %x_106
%35:f32 = div %33, %34
%36:f32 = floor %35
%37:f32 = mul %30, %36
%38:f32 = sub %28, %37
%39:bool = lte %38, 0.00999999977648258209f
if %39 [t: $B9] { # if_3
$B9: { # true
%40:f32 = load %x_91
%41:f32 = add %40, 100.0f
store %x_112, %41
%42:f32 = load %x_112
store %x_113, %42
exit_if # if_3
}
}
%43:f32 = load %x_113
store %x_92, %43
exit_if # if_2
}
}
%44:i32 = load %x_94
%45:f32 = convert %44
%46:f32 = load %limit
%47:bool = gte %45, %46
if %47 [t: $B10] { # if_4
$B10: { # true
%48:f32 = load %x_92
ret %48
}
}
continue # -> $B4
}
$B4: { # continuing
%49:i32 = load %x_94
%50:i32 = add %49, 1i
store %x_95, %50
%51:f32 = load %x_92
store %x_91, %51
%52:i32 = load %x_95
store %x_94, %52
next_iteration # -> $B3
}
}
%53:f32 = load %x_91
ret %53
}
}
%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_68:ptr<function, i32, read_write> = var
store %c, vec3<f32>(7.0f, 8.0f, 9.0f)
%61:ptr<uniform, vec2<f32>, read> = access %x_10, 0u
%62:f32 = load_vector_element %61, 0u
%63:f32 = mul %62, 0.125f
%64:f32 = round %63
%x_54:f32 = let %64
%66:f32 = load_vector_element %gl_FragCoord, 0u
store %param, %66
store %param_1, %x_54
%67:f32 = call %compute_value_f1_f1_, %param, %param_1
%x_57:f32 = let %67
store_vector_element %c, 0u, %x_57
%69:f32 = load_vector_element %gl_FragCoord, 1u
store %param_2, %69
store %param_3, %x_54
%70:f32 = call %compute_value_f1_f1_, %param_2, %param_3
%x_61:f32 = let %70
store_vector_element %c, 1u, %x_61
%72:f32 = load_vector_element %c, 0u
%73:f32 = load_vector_element %c, 1u
%74:f32 = add %72, %73
store_vector_element %c, 2u, %74
store %x_68, 0i
loop [b: $B12, c: $B13] { # loop_2
$B12: { # body
%x_69:ptr<function, i32, read_write> = var
%76:i32 = load %x_68
%77:bool = lt %76, 3i
if %77 [t: $B14, f: $B15] { # if_5
$B14: { # true
exit_if # if_5
}
$B15: { # false
exit_loop # loop_2
}
}
%78:i32 = load %x_68
%79:f32 = load_vector_element %c, %78
%80:bool = gte %79, 1.0f
if %80 [t: $B16] { # if_6
$B16: { # true
%81:i32 = load %x_68
%82:i32 = load %x_68
%83:f32 = load_vector_element %c, %82
%84:i32 = load %x_68
%85:f32 = load_vector_element %c, %84
%86:f32 = mul %83, %85
store_vector_element %c, %81, %86
exit_if # if_6
}
}
continue # -> $B13
}
$B13: { # continuing
%87:i32 = load %x_68
%88:i32 = add %87, 1i
store %x_69, %88
%89:i32 = load %x_69
store %x_68, %89
next_iteration # -> $B12
}
}
%90:vec3<f32> = load %c
%91:vec3<f32> = abs %90
%92:vec3<f32> = normalize %91
%x_84:vec3<f32> = let %92
%94:f32 = access %x_84, 0u
%95:f32 = access %x_84, 1u
%96:f32 = access %x_84, 2u
%97:vec4<f32> = construct %94, %95, %96, 1.0f
store %x_GLF_color, %97
ret
}
}
%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
$B17: {
store %gl_FragCoord, %gl_FragCoord_param
%100:void = call %main_1
%101:vec4<f32> = load %x_GLF_color
%102:main_out = construct %101
ret %102
}
}
%tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 {
$B18: {
%105:bool = eq %rhs, 0i
%106:bool = eq %lhs, -2147483648i
%107:bool = eq %rhs, -1i
%108:bool = and %106, %107
%109:bool = or %105, %108
%110:i32 = select %rhs, 1i, %109
%111:i32 = let %110
%112:i32 = div %lhs, %111
%113:i32 = mul %112, %111
%114:i32 = sub %lhs, %113
ret %114
}
}
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. *
********************************************************************