blob: 08020c720ec5b955f98d68bd8c89fb6c51cde0f1 [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
%gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
%x_6:ptr<uniform, buf0, read> = var @binding_point(0, 0)
%x_GLF_color:ptr<private, vec4<f32>, read_write> = var
}
%main_1 = func():void {
$B2: {
%x_77:ptr<function, array<vec4<f32>, 8>, read_write> = var
%x_78:ptr<function, array<vec4<f32>, 8>, read_write> = var
%x_79:ptr<function, array<vec4<f32>, 8>, read_write> = var
%x_80:ptr<function, array<vec4<f32>, 16>, read_write> = var
%x_89:ptr<function, vec4<f32>, read_write> = var
%x_92:ptr<function, i32, read_write> = var
%11:vec4<f32> = load %gl_FragCoord
%12:vec2<f32> = swizzle %11, xy
%13:ptr<uniform, vec2<f32>, read> = access %x_6, 0u
%14:vec2<f32> = load %13
%15:vec2<f32> = div %12, %14
%16:vec2<f32> = mul %15, 32.0f
%17:vec2<f32> = floor %16
%x_87:vec2<f32> = let %17
store %x_89, vec4<f32>(0.5f, 0.5f, 1.0f, 1.0f)
store %x_92, 0i
loop [b: $B3, c: $B4] { # loop_1
$B3: { # body
%x_121:ptr<function, bool, read_write> = var
%x_136:ptr<function, vec4<f32>, read_write> = var
%x_90:ptr<function, vec4<f32>, read_write> = var
%x_93:ptr<function, i32, read_write> = var
%23:i32 = load %x_92
%24:bool = lt %23, 8i
if %24 [t: $B5, f: $B6] { # if_1
$B5: { # true
exit_if # if_1
}
$B6: { # false
exit_loop # loop_1
}
}
%x_98:ptr<function, vec4<f32>, read_write> = var
store %x_77, array<vec4<f32>, 8>(vec4<f32>(4.0f, 4.0f, 20.0f, 4.0f), vec4<f32>(4.0f, 4.0f, 4.0f, 20.0f), vec4<f32>(4.0f, 20.0f, 20.0f, 4.0f), vec4<f32>(20.0f, 4.0f, 4.0f, 8.0f), vec4<f32>(8.0f, 6.0f, 4.0f, 2.0f), vec4<f32>(2.0f, 12.0f, 2.0f, 4.0f), vec4<f32>(16.0f, 2.0f, 4.0f, 4.0f), vec4<f32>(12.0f, 22.0f, 4.0f, 4.0f))
%26:i32 = load %x_92
%27:ptr<function, vec4<f32>, read_write> = access %x_77, %26
%28:vec4<f32> = load %27
store %x_98, %28
switch 0u [c: (default, $B7)] { # switch_1
$B7: { # case
%29:f32 = access %x_87, 0u
%x_101:f32 = let %29
%31:f32 = load_vector_element %x_98, 0u
%x_102:f32 = let %31
%33:bool = lt %x_101, %x_102
if %33 [t: $B8] { # if_2
$B8: { # true
store %x_121, false
exit_switch # switch_1
}
}
%34:f32 = access %x_87, 1u
%x_106:f32 = let %34
%36:f32 = load_vector_element %x_98, 1u
%x_107:f32 = let %36
%38:bool = lt %x_106, %x_107
if %38 [t: $B9] { # if_3
$B9: { # true
store %x_121, false
exit_switch # switch_1
}
}
%39:f32 = load_vector_element %x_98, 2u
%40:f32 = add %x_102, %39
%41:bool = gt %x_101, %40
if %41 [t: $B10] { # if_4
$B10: { # true
store %x_121, false
exit_switch # switch_1
}
}
%42:f32 = load_vector_element %x_98, 3u
%43:f32 = add %x_107, %42
%44:bool = gt %x_106, %43
if %44 [t: $B11] { # if_5
$B11: { # true
store %x_121, false
exit_switch # switch_1
}
}
store %x_121, true
exit_switch # switch_1
}
}
%45:vec4<f32> = load %x_89
store %x_90, %45
%46:bool = load %x_121
if %46 [t: $B12] { # if_6
$B12: { # true
store %x_78, array<vec4<f32>, 8>(vec4<f32>(4.0f, 4.0f, 20.0f, 4.0f), vec4<f32>(4.0f, 4.0f, 4.0f, 20.0f), vec4<f32>(4.0f, 20.0f, 20.0f, 4.0f), vec4<f32>(20.0f, 4.0f, 4.0f, 8.0f), vec4<f32>(8.0f, 6.0f, 4.0f, 2.0f), vec4<f32>(2.0f, 12.0f, 2.0f, 4.0f), vec4<f32>(16.0f, 2.0f, 4.0f, 4.0f), vec4<f32>(12.0f, 22.0f, 4.0f, 4.0f))
%47:i32 = load %x_92
%48:ptr<function, vec4<f32>, read_write> = access %x_78, %47
%49:f32 = load_vector_element %48, 0u
%x_125:f32 = let %49
store %x_79, array<vec4<f32>, 8>(vec4<f32>(4.0f, 4.0f, 20.0f, 4.0f), vec4<f32>(4.0f, 4.0f, 4.0f, 20.0f), vec4<f32>(4.0f, 20.0f, 20.0f, 4.0f), vec4<f32>(20.0f, 4.0f, 4.0f, 8.0f), vec4<f32>(8.0f, 6.0f, 4.0f, 2.0f), vec4<f32>(2.0f, 12.0f, 2.0f, 4.0f), vec4<f32>(16.0f, 2.0f, 4.0f, 4.0f), vec4<f32>(12.0f, 22.0f, 4.0f, 4.0f))
%51:i32 = load %x_92
%52:ptr<function, vec4<f32>, read_write> = access %x_79, %51
%53:f32 = load_vector_element %52, 1u
%x_128:f32 = let %53
store %x_80, array<vec4<f32>, 16>(vec4<f32>(0.0f, 0.0f, 0.0f, 1.0f), vec4<f32>(0.5f, 0.0f, 0.0f, 1.0f), vec4<f32>(0.0f, 0.5f, 0.0f, 1.0f), vec4<f32>(0.5f, 0.5f, 0.0f, 1.0f), vec4<f32>(0.0f, 0.0f, 0.5f, 1.0f), vec4<f32>(0.5f, 0.0f, 0.5f, 1.0f), vec4<f32>(0.0f, 0.5f, 0.5f, 1.0f), vec4<f32>(0.5f, 0.5f, 0.5f, 1.0f), vec4<f32>(0.0f, 0.0f, 0.0f, 1.0f), vec4<f32>(1.0f, 0.0f, 0.0f, 1.0f), vec4<f32>(0.0f, 1.0f, 0.0f, 1.0f), vec4<f32>(1.0f, 1.0f, 0.0f, 1.0f), vec4<f32>(0.0f, 0.0f, 1.0f, 1.0f), vec4<f32>(1.0f, 0.0f, 1.0f, 1.0f), vec4<f32>(0.0f, 1.0f, 1.0f, 1.0f), vec4<f32>(1.0f))
%55:i32 = call %tint_f32_to_i32, %x_125
%57:i32 = let %55
%58:i32 = call %tint_f32_to_i32, %x_128
%59:i32 = mul %57, %58
%60:i32 = load %x_92
%61:i32 = mul %60, 9i
%62:i32 = add %59, %61
%63:i32 = add %62, 11i
%64:i32 = call %tint_mod_i32, %63, 16i
%66:ptr<function, vec4<f32>, read_write> = access %x_80, %64
%67:vec4<f32> = load %66
store %x_136, %67
%68:vec4<f32> = load %x_136
store %x_90, %68
exit_if # if_6
}
}
continue # -> $B4
}
$B4: { # continuing
%69:i32 = load %x_92
%70:i32 = add %69, 1i
store %x_93, %70
%71:vec4<f32> = load %x_90
store %x_89, %71
%72:i32 = load %x_93
store %x_92, %72
next_iteration # -> $B3
}
}
%73:vec4<f32> = load %x_89
store %x_GLF_color, %73
ret
}
}
%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
$B13: {
store %gl_FragCoord, %gl_FragCoord_param
%76:void = call %main_1
%77:vec4<f32> = load %x_GLF_color
%78:main_out = construct %77
ret %78
}
}
%tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 {
$B14: {
%81:bool = eq %rhs, 0i
%82:bool = eq %lhs, -2147483648i
%83:bool = eq %rhs, -1i
%84:bool = and %82, %83
%85:bool = or %81, %84
%86:i32 = select %rhs, 1i, %85
%87:i32 = let %86
%88:i32 = div %lhs, %87
%89:i32 = mul %88, %87
%90:i32 = sub %lhs, %89
ret %90
}
}
%tint_f32_to_i32 = func(%value:f32):i32 {
$B15: {
%92:i32 = convert %value
%93:bool = gte %value, -2147483648.0f
%94:i32 = select -2147483648i, %92, %93
%95:bool = lte %value, 2147483520.0f
%96:i32 = select 2147483647i, %94, %95
ret %96
}
}
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. *
********************************************************************