blob: 2440ec1b36c3b18c20ff025d5f4a9fd2d9b29bdd [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_20:ptr<uniform, buf0, read> = var @binding_point(0, 0)
%x_GLF_color:ptr<private, vec4<f32>, read_write> = var
}
%collision_vf2_vf4_ = func(%pos:ptr<function, vec2<f32>, read_write>, %quad:ptr<function, vec4<f32>, read_write>):bool {
$B2: {
%7:f32 = load_vector_element %pos, 0u
%8:f32 = load_vector_element %quad, 0u
%9:bool = lt %7, %8
if %9 [t: $B3] { # if_1
$B3: { # true
ret false
}
}
%10:f32 = load_vector_element %pos, 1u
%11:f32 = load_vector_element %quad, 1u
%12:bool = lt %10, %11
if %12 [t: $B4] { # if_2
$B4: { # true
ret false
}
}
%13:f32 = load_vector_element %pos, 0u
%14:f32 = load_vector_element %quad, 0u
%15:f32 = load_vector_element %quad, 2u
%16:f32 = add %14, %15
%17:bool = gt %13, %16
if %17 [t: $B5] { # if_3
$B5: { # true
ret false
}
}
%18:f32 = load_vector_element %pos, 1u
%19:f32 = load_vector_element %quad, 1u
%20:f32 = load_vector_element %quad, 3u
%21:f32 = add %19, %20
%22:bool = gt %18, %21
if %22 [t: $B6] { # if_4
$B6: { # true
ret false
}
}
ret true
}
}
%match_vf2_ = func(%pos_1:ptr<function, vec2<f32>, read_write>):vec4<f32> {
$B7: {
%res:ptr<function, vec4<f32>, read_write> = var
%x_144:ptr<function, f32, read_write> = var
%x_145:ptr<function, f32, read_write> = var
%i:ptr<function, i32, read_write> = var
%param:ptr<function, vec2<f32>, read_write> = var
%param_1:ptr<function, vec4<f32>, read_write> = var
%indexable:ptr<function, array<vec4<f32>, 8>, read_write> = var
%indexable_1:ptr<function, array<vec4<f32>, 8>, read_write> = var
%indexable_2:ptr<function, array<vec4<f32>, 8>, read_write> = var
%indexable_3:ptr<function, array<vec4<f32>, 16>, read_write> = var
%35:f32 = load_vector_element %gl_FragCoord, 0u
%36:bool = lt %35, 0.0f
if %36 [t: $B8, f: $B9] { # if_5
$B8: { # true
store %x_144, -1.0f
exit_if # if_5
}
$B9: { # false
%37:f32 = load_vector_element %gl_FragCoord, 0u
%38:bool = gte %37, 0.0f
if %38 [t: $B10, f: $B11] { # if_6
$B10: { # true
%39:f32 = load_vector_element %gl_FragCoord, 0u
%40:bool = gte %39, 0.0f
%41:f32 = select 1.0f, 0.5f, %40
store %x_145, %41
exit_if # if_6
}
$B11: { # false
store %x_145, 1.0f
exit_if # if_6
}
}
%42:f32 = load %x_145
%43:f32 = min %42, 0.5f
store %x_144, %43
exit_if # if_5
}
}
%44:f32 = load %x_144
%45:f32 = clamp 0.5f, 0.5f, %44
%46:vec4<f32> = construct %45, 0.5f, 1.0f, 1.0f
store %res, %46
store %i, 0i
loop [b: $B12, c: $B13] { # loop_1
$B12: { # body
%47:i32 = load %i
%48:bool = lt %47, 8i
if %48 [t: $B14, f: $B15] { # if_7
$B14: { # true
exit_if # if_7
}
$B15: { # false
exit_loop # loop_1
}
}
%49:i32 = load %i
%x_174:i32 = let %49
%51:vec2<f32> = load %pos_1
store %param, %51
store %indexable, 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))
%52:ptr<function, vec4<f32>, read_write> = access %indexable, %x_174
%53:vec4<f32> = load %52
store %param_1, %53
%54:bool = call %collision_vf2_vf4_, %param, %param_1
%x_178:bool = let %54
if %x_178 [t: $B16] { # if_8
$B16: { # true
%56:i32 = load %i
%x_181:i32 = let %56
store %indexable_1, 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))
%58:ptr<function, vec4<f32>, read_write> = access %indexable_1, %x_181
%59:f32 = load_vector_element %58, 0u
%x_183:f32 = let %59
%61:i32 = load %i
%x_185:i32 = let %61
store %indexable_2, 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))
%63:ptr<function, vec4<f32>, read_write> = access %indexable_2, %x_185
%64:f32 = load_vector_element %63, 1u
%x_187:f32 = let %64
%66:i32 = load %i
%x_190:i32 = let %66
store %indexable_3, 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))
%68:i32 = call %tint_f32_to_i32, %x_183
%70:i32 = let %68
%71:i32 = call %tint_f32_to_i32, %x_187
%72:i32 = mul %70, %71
%73:i32 = mul %x_190, 9i
%74:i32 = add %72, %73
%75:i32 = add %74, 11i
%76:i32 = call %tint_mod_i32, %75, 16i
%78:ptr<function, vec4<f32>, read_write> = access %indexable_3, %76
%79:vec4<f32> = load %78
store %res, %79
exit_if # if_8
}
}
continue # -> $B13
}
$B13: { # continuing
%80:i32 = load %i
%81:i32 = add %80, 1i
store %i, %81
next_iteration # -> $B12
}
}
%82:vec4<f32> = load %res
%x_199:vec4<f32> = let %82
ret %x_199
}
}
%main_1 = func():void {
$B17: {
%lin:ptr<function, vec2<f32>, read_write> = var
%param_2:ptr<function, vec2<f32>, read_write> = var
%87:vec4<f32> = load %gl_FragCoord
%88:vec2<f32> = swizzle %87, xy
%89:ptr<uniform, vec2<f32>, read> = access %x_20, 0u
%90:vec2<f32> = load %89
%91:vec2<f32> = div %88, %90
store %lin, %91
%92:vec2<f32> = load %lin
%93:vec2<f32> = mul %92, 32.0f
%94:vec2<f32> = floor %93
store %lin, %94
%95:vec2<f32> = load %lin
store %param_2, %95
%96:vec4<f32> = call %match_vf2_, %param_2
%x_107:vec4<f32> = let %96
store %x_GLF_color, %x_107
ret
}
}
%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
$B18: {
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 {
$B19: {
%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
}
}
%tint_f32_to_i32 = func(%value:f32):i32 {
$B20: {
%116:i32 = convert %value
%117:bool = gte %value, -2147483648.0f
%118:i32 = select -2147483648i, %116, %117
%119:bool = lte %value, 2147483520.0f
%120:i32 = select 2147483647i, %118, %119
ret %120
}
}
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. *
********************************************************************