blob: 04428d8278fd71b60fb9f558b05f2b09a7049593 [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_81:ptr<function, array<vec4<f32>, 8>, read_write> = var, array<vec4<f32>, 8>(vec4<f32>(0.0f))
%x_82:ptr<function, array<vec4<f32>, 8>, read_write> = var
%x_83:ptr<function, array<vec4<f32>, 8>, read_write> = var
%x_84:ptr<function, array<vec4<f32>, 8>, read_write> = var
%x_85:ptr<function, array<vec4<f32>, 16>, read_write> = var
%x_95:ptr<function, vec4<f32>, read_write> = var
%x_98:ptr<function, i32, read_write> = var
store %x_81, 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))
%12:array<vec4<f32>, 8> = load %x_81
%x_86:array<vec4<f32>, 8> = let %12
%14:vec4<f32> = load %gl_FragCoord
%15:vec2<f32> = swizzle %14, xy
%16:ptr<uniform, vec2<f32>, read> = access %x_6, 0u
%17:vec2<f32> = load %16
%18:vec2<f32> = div %15, %17
%19:vec2<f32> = mul %18, 32.0f
%20:vec2<f32> = floor %19
%x_93:vec2<f32> = let %20
store %x_95, vec4<f32>(0.5f, 0.5f, 1.0f, 1.0f)
store %x_98, 0i
loop [b: $B3, c: $B4] { # loop_1
$B3: { # body
%x_127:ptr<function, bool, read_write> = var
%x_143:ptr<function, vec4<f32>, read_write> = var
%x_96:ptr<function, vec4<f32>, read_write> = var
%x_99:ptr<function, i32, read_write> = var
%26:i32 = load %x_98
%27:bool = lt %26, 8i
if %27 [t: $B5, f: $B6] { # if_1
$B5: { # true
exit_if # if_1
}
$B6: { # false
exit_loop # loop_1
}
}
%x_104:ptr<function, vec4<f32>, read_write> = var
store %x_82, %x_86
%29:i32 = load %x_98
%30:ptr<function, vec4<f32>, read_write> = access %x_82, %29
%31:vec4<f32> = load %30
store %x_104, %31
switch 0u [c: (default, $B7)] { # switch_1
$B7: { # case
%32:f32 = access %x_93, 0u
%x_107:f32 = let %32
%34:f32 = load_vector_element %x_104, 0u
%x_108:f32 = let %34
%36:bool = lt %x_107, %x_108
if %36 [t: $B8] { # if_2
$B8: { # true
store %x_127, false
exit_switch # switch_1
}
}
%37:f32 = access %x_93, 1u
%x_112:f32 = let %37
%39:f32 = load_vector_element %x_104, 1u
%x_113:f32 = let %39
%41:bool = lt %x_112, %x_113
if %41 [t: $B9] { # if_3
$B9: { # true
store %x_127, false
exit_switch # switch_1
}
}
%42:f32 = load_vector_element %x_104, 2u
%43:f32 = add %x_108, %42
%44:bool = gt %x_107, %43
if %44 [t: $B10] { # if_4
$B10: { # true
store %x_127, false
exit_switch # switch_1
}
}
%45:f32 = load_vector_element %x_104, 3u
%46:f32 = add %x_113, %45
%47:bool = gt %x_112, %46
if %47 [t: $B11] { # if_5
$B11: { # true
store %x_127, false
exit_switch # switch_1
}
}
store %x_127, true
exit_switch # switch_1
}
}
%48:vec4<f32> = load %x_95
store %x_96, %48
%49:bool = load %x_127
if %49 [t: $B12] { # if_6
$B12: { # true
store %x_83, 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))
%50:i32 = load %x_98
%51:ptr<function, vec4<f32>, read_write> = access %x_83, %50
%52:f32 = load_vector_element %51, 0u
%x_131:f32 = let %52
store %x_84, 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))
%54:i32 = load %x_98
%55:ptr<function, vec4<f32>, read_write> = access %x_84, %54
%56:f32 = load_vector_element %55, 1u
%x_134:f32 = let %56
%58:array<vec4<f32>, 8> = load %x_81
%x_135:array<vec4<f32>, 8> = let %58
store %x_81, array<vec4<f32>, 8>(vec4<f32>(0.0f))
store %x_81, %x_135
store %x_85, 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))
%60:i32 = call %tint_f32_to_i32, %x_131
%62:i32 = let %60
%63:i32 = call %tint_f32_to_i32, %x_134
%64:i32 = mul %62, %63
%65:i32 = load %x_98
%66:i32 = mul %65, 9i
%67:i32 = add %64, %66
%68:i32 = add %67, 11i
%69:i32 = call %tint_mod_i32, %68, 16i
%71:ptr<function, vec4<f32>, read_write> = access %x_85, %69
%72:vec4<f32> = load %71
store %x_143, %72
%73:vec4<f32> = load %x_143
store %x_96, %73
exit_if # if_6
}
}
continue # -> $B4
}
$B4: { # continuing
%74:i32 = load %x_98
%75:i32 = add %74, 1i
store %x_99, %75
%76:vec4<f32> = load %x_96
store %x_95, %76
%77:i32 = load %x_99
store %x_98, %77
next_iteration # -> $B3
}
}
%78:vec4<f32> = load %x_95
store %x_GLF_color, %78
ret
}
}
%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
$B13: {
store %gl_FragCoord, %gl_FragCoord_param
%81:void = call %main_1
%82:vec4<f32> = load %x_GLF_color
%83:main_out = construct %82
ret %83
}
}
%tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 {
$B14: {
%86:bool = eq %rhs, 0i
%87:bool = eq %lhs, -2147483648i
%88:bool = eq %rhs, -1i
%89:bool = and %87, %88
%90:bool = or %86, %89
%91:i32 = select %rhs, 1i, %90
%92:i32 = let %91
%93:i32 = div %lhs, %92
%94:i32 = mul %93, %92
%95:i32 = sub %lhs, %94
ret %95
}
}
%tint_f32_to_i32 = func(%value:f32):i32 {
$B15: {
%97:i32 = convert %value
%98:bool = gte %value, -2147483648.0f
%99:i32 = select -2147483648i, %97, %98
%100:bool = lte %value, 2147483520.0f
%101:i32 = select 2147483647i, %99, %100
ret %101
}
}
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. *
********************************************************************